fix(integration): resolve cross-app ids at call time - #616
Merged
Conversation
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.
Contributor
Quality Report — ConductionNL/learniq @
|
| 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.
Contributor
Quality Report — ConductionNL/learniq @
|
| 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.
Contributor
Quality Report — ConductionNL/learniq @
|
| 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.
Contributor
Quality Report — ConductionNL/learniq @
|
| 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.
Contributor
Quality Report — ConductionNL/learniq @
|
| 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A cross-app id reference is a duck-typed runtime lookup.
isInstalled('openconnector')against an instance runningintegriqdoes not error — it returnsfalse, 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:developmentbeta/mainSo 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
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.