retrofit: reverse-spec openregister-app-manifest partial (5 REQs / 9 methods, 100 deferred)#1781
Open
rubenvdlinde wants to merge 1 commit into
Open
Conversation
…methods, 100 deferred) Reverse-engineer the PHP backend half of the openregister-app-manifest capability into 5 cohesive requirements and annotate the 9 in-scope methods. The existing capability spec (MAN-001..MAN-011, from openregister-adopt-app-manifest) covers Vue-side adoption only and explicitly defers the backend /api/manifest endpoint in MAN-009. That endpoint subsequently shipped under an orphan @SPEC reference (openspec/changes/manifest-user-context/tasks.md does not exist on disk). This retrofit folds the shipped behaviour into the canonical capability spec as MAN-012..MAN-016: - MAN-012 /api/manifest/{appId} endpoint contract (status codes, validation, failure modes) - MAN-013 Enrichment no-op without currentUserSchema; anon returns null user - MAN-014 Schema-slug validation (length, charset, fail-closed) - MAN-015 Profile resolution by ncUserId with RBAC + multitenancy preserved - MAN-016 runtime.user populated from explicit allowlist + non-materialised calculations (never raw payload merge) Annotated: - lib/Controller/ManifestController.php (index, loadBundledManifest) - lib/Service/ManifestService.php (getEnrichedManifest, resolveUserProfile, buildUserContext, getCalculations, resolveAllowedFieldNames, loadFieldAllowlist, serialise) Deferred 100 methods as future-pass:next - the batch JSON included 45 files mostly hit by token overlap (Registers/Schemas CRUD, schema cache handlers, GraphQL generation, Vue components). Those are out of capability for app-manifest and need reclustering in a separate coverage-scan pass. This is a Bucket 2a reverse-spec change (ADR-008). No behaviour change.
rubenvdlinde
requested review from
Rem-Dam,
WilcoLouwerse,
bbrands02 and
rjzondervan
as code owners
May 24, 2026 19:08
Contributor
Quality Report — ConductionNL/openregister @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ❌ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ❌ | ||||
| stylelint | ❌ | ||||
| composer | ✅ | ✅ 162/162 | |||
| npm | ✅ | ✅ 532/532 | |||
| PHPUnit | ⏭️ | ||||
| Newman | ⏭️ | ||||
| Playwright | ⏭️ |
Quality workflow — 2026-05-24 19:11 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.
Summary
Reverse-engineer the PHP backend half of the
openregister-app-manifestcapability into 5 cohesive requirements (MAN-012..MAN-016) and annotate the 9 in-scope methods. No behaviour change — this is a Bucket 2a retrofit per ADR-008.The existing capability spec (MAN-001..MAN-011 from
openregister-adopt-app-manifest) covers Vue-side adoption only and explicitly defers the backend/api/manifestendpoint in MAN-009. That endpoint subsequently shipped under an orphan@specreference (openspec/changes/manifest-user-context/tasks.mddoes not exist on disk). This retrofit folds the shipped behaviour into the canonical capability spec.What's added
/api/manifest/{appId}endpoint contract (status codes, app-id validation, failure modes)currentUserSchema; anonymous request returnsruntime.user = null[A-Za-z0-9_-], fail-closed)ncUserIdfilter with RBAC + multitenancy preservedruntime.userpopulated from explicit allowlist + non-materialised calculations (never raw payload merge)Annotated methods (9)
lib/Controller/ManifestController.php—index,loadBundledManifestlib/Service/ManifestService.php—getEnrichedManifest,resolveUserProfile,buildUserContext,getCalculations,resolveAllowedFieldNames,loadFieldAllowlist,serialiseDeferred (100)
The batch JSON listed 109 methods across 45 files. After triage, only ~8% (9 methods) are genuinely in scope for
openregister-app-manifest. The rest are FPs from token overlap onRegister*/Schema*/*Manifest*substrings — Registers/Schemas CRUD, schema cache handlers, GraphQL generation, Vue components. All 100 are enumerated intasks.md§3 asfuture-pass:nextso a downstream coverage-scan can recluster them into the right capability buckets.Notes
@spectags (pointing at the non-existentmanifest-user-contextchange) are left in place at the class docblock layer pending a separate cleanup pass; per-method@spectags are the canonical reference going forward.Test plan
openspec validate retrofit-2026-05-24-openregister-app-manifest --strict