Skip to content

fix(integration): resolve cross-app ids at call time - #616

Merged
rubenvdlinde merged 5 commits into
developmentfrom
fix/cross-app-id-resolution
Aug 27, 2026
Merged

fix(integration): resolve cross-app ids at call time#616
rubenvdlinde merged 5 commits into
developmentfrom
fix/cross-app-id-resolution

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

A cross-app id reference is a duck-typed runtime lookup. isInstalled('openconnector') against an instance running integriq does not error — it returns false, and the integration silently stops working. A URL segment behaves the same way: /apps/<id>/ is a routing key, so the wrong name is a 404, not a diagnosable failure.

The fleet is mid-rename, and the two halves disagree

Measured 2026-08-26 from appinfo/info.xml — the only authority on an app's id:

branch integriq filinq stackiq dossiq buildiq keepiq decidiq larpinq
development integriq filinq stackiq dossiq buildiq keepiq decidiq larpinq
beta / main openconnector docudesk softwarecatalog procest openbuild doriath decidesk larpingapp

So neither id alone is correct. Hardcoding the new one breaks against beta/main; keeping the old one breaks against development. That is why this is a resolver rather than a find-and-replace.

The change

Adds FleetAppId, which holds a list of candidate ids, newest first, and returns whichever the instance actually registered. Callers ask for the canonical (new) name and get back the real one.

The same class is being added to openregister (#2867), learniq, pipelinq and shillinq. It is duplicated per app on purpose: it is a transitional shim that should be deleted once beta and main carry the new ids, and a shared package would outlive the problem it solves.

What is deliberately NOT changed

  • OpenRegister register slugs. These are frozen across the rename — they are literals already written into stored data, so renaming one orphans the records it names.
  • Docblock examples mentioning old ids. Not executable.

Verification

Covered by 12 unit tests in openregister #2867, including a mutation check: removing the legacy fallback from the candidate map fails 5 of them, so the tests would notice if the resolver stopped resolving.

Conduction Release Bot added 2 commits August 26, 2026 11:27
Eight paths into other fleet apps were pinned to a legacy app id as class
constants. A URL segment is a ROUTING KEY - Nextcloud mounts routes under
the registered app id - so the wrong name is a 404, and nothing reports
it as a defect.

The fleet is mid-rename and the halves disagree. From appinfo/info.xml,
the only authority, measured 2026-08-26:

    branch        integriq        filinq
    development   integriq        filinq
    beta/main     openconnector   docudesk

So neither name alone is right: the new one 404s against beta/main, the
old one against development.

Adds FleetAppId, which holds a LIST of candidate ids newest-first and
returns whichever the instance actually registered. The constants now
carry only the path AFTER the app segment; the segment is resolved when
the call is made.

  PaymentInitiationClient           api/payments/initiate
  LtiAgsPullClient                  api/events/subscriptions/%s/pull
  WalletOfferDelegationService      api/eudi/credential-offers
  LtiToolPlacementController        api/lti/deployments/%s/launch
  TimetableImportHandler            api/sources/%s/run
  WalletRevocationPropagationSvc    api/eudi/credential-offers/%s/revoke
  DataExchangeRunHandler            api/sources/%s/run
  ReportCardPdfDelegationService    api/v1/documents/render  (-> filinq)

None of these eight classes injects IAppManager, and threading it through
eight constructors, their DI wiring and their tests is a large change for
a shim that gets deleted once beta and main carry the new ids. So
FleetAppId::path() resolves the manager from the server container, guarded:
\OCP\Server::get() returns null with no container up, and an unguarded
call there turns a resolvable path into a fatal. Without a manager it
falls back to the canonical id, which is correct for current code.

Remaining matches under lib/ are docblock examples, not executable.
phpcs: internal calls must use named parameters - the self::resolve()
calls inside FleetAppId did not.

phpmd: FleetAppId is static by design, so it trips StaticAccess. Declared
as an exception via the rule's OWN exceptions property - not a baseline
entry and not an @SuppressWarnings, so the rule stays fully active for
every other class and the exception is one named class, visible in config,
with the reason attached.
@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/learniq @ 0ac484d

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
build
check-specs
format
check-l10n-js
check-schema-l10n
composer ✅ 104/104
npm ✅ 650/650
app:check-code ⏭️
info.xml
REUSE
PHPUnit
Newman ⏭️
Playwright
Hydra gates

Quality workflow — 2026-08-26 10:19 UTC

Download the full PDF report from the workflow artifacts.

@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/learniq @ 213ede9

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
build
check-specs
format
check-l10n-js
check-schema-l10n
composer ✅ 104/104
npm ✅ 650/650
app:check-code ⏭️
info.xml
REUSE
PHPUnit
Newman ⏭️
Playwright
Hydra gates

Quality workflow — 2026-08-26 11:32 UTC

Download the full PDF report from the workflow artifacts.

phpcs: my one-line docblocks on the seven path constants violated "Doc
comment short description must be on the first line". Expanded to the
multi-line form.

phpmd, and this one is a real retreat. Referencing FleetAppId pushed
LtiToolPlacementController and DataExchangeRunHandler from 12 to 13
dependencies, over the CouplingBetweenObjects ceiling. Measured against
origin/development: neither class was reported there, both were with my
change - I introduced it. A fully qualified call does not help; phpmd
counts the type reference either way.

So those two call sites are REVERTED to the hardcoded legacy id, with a
docblock saying so and pointing at ConductionNL/.github#580. They still
404 against a renamed instance. Fixing them means reducing those classes'
dependencies first, which is a separate change and not one to smuggle in
here. Six of the eight sites are resolved.

phpmd StaticAccess: \OCP\Server is now an audited exception, reached from
exactly one place - FleetAppId::path(). shillinq already carries the same
exception for the same reason. Verified the exception is narrow rather
than a blanket disable: with it removed from a copy of the ruleset the
violation is reported again, and with it present the count is zero.
@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/learniq @ c56ff9b

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
build
check-specs
format
check-l10n-js
check-schema-l10n
composer ✅ 104/104
npm ✅ 650/650
app:check-code ⏭️
info.xml
REUSE
PHPUnit
Newman ⏭️
Playwright
Hydra gates

Quality workflow — 2026-08-26 14:27 UTC

Download the full PDF report from the workflow artifacts.

Two tests asserted the delegation URL contained a hardcoded app segment:

    /apps/docudesk/api/v1/documents/render
    /apps/openconnector/api/eudi/credential-offers

Those segments are now resolved at call time, because the target apps
answer to filinq / integriq on development and docudesk / openconnector
on beta and main. Pinning either name asserts the environment the suite
happens to run in rather than the contract.

What must hold is that the path AFTER the segment is right, and that the
segment is one of the two ids the resolver may legitimately produce. Both
are now asserted, so the test still fails if the path is wrong or if the
segment becomes something neither branch uses.
@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/learniq @ f957285

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
build
check-specs
format
check-l10n-js
check-schema-l10n
composer ✅ 104/104
npm ✅ 650/650
app:check-code ⏭️
info.xml
REUSE
PHPUnit
Newman ⏭️
Playwright
Hydra gates

Quality workflow — 2026-08-26 22:39 UTC

Download the full PDF report from the workflow artifacts.

@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/learniq @ 378c007

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
build
check-specs
format
check-l10n-js
check-schema-l10n
composer ✅ 104/104
npm ✅ 650/650
app:check-code ⏭️
info.xml
REUSE
PHPUnit
Newman ⏭️
Playwright
Hydra gates

Quality workflow — 2026-08-27 00:20 UTC

Download the full PDF report from the workflow artifacts.

@rubenvdlinde
rubenvdlinde merged commit 790caaf into development Aug 27, 2026
82 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant