AUD-S17: sync the C4 diagrams to the shipped architecture (ARCH-05) - #24
Conversation
…aph (AUD-S17) The container diagram showed rego, gRPC, WASM and a GitHub adapter as if they existed, and its package sketch named internal/format, internal/policy and internal/harness — none of which are packages. Redrawn from `go list ./internal/... ./cmd/...`: every solid node is one of the 22 real internal packages, cmd/assent, or the root schemas package, and every solid edge is backed by a real import between those two packages. The six D-012 designed seams (GitHub adapter E10, rego backend E11, serve E12, remote packs E13, gRPC/WASM provider tiers per ADR-0004) are kept but drawn dashed with an explicit PLANNED marker and a shipped-vs-planned legend. The phantom subcommands explain/scan/stats/init are dropped: no code, no epic, and absent from the README maturity table. The context diagram gets the same pass — GitHub forge and the GitHub Actions forge trigger marked PLANNED (E10), the Keycloak/LDAP permission sources corrected to the three real builtins plus the generic HTTP/exec transport. REQ-AUD-S17-01
…he C4 pages The AUD-S17 sweep for the same lie elsewhere in the docs tree. vision.md claimed rules are written "in Rego or Kyverno-style YAML" and that assent spans "GitLab + GitHub" today; both are false in the present tense — the shipped path is the YAML envelope with CEL assertions against the GitLab adapter. Three word-level edits pointing at E11 / E10, not a prose rewrite. policy-profiles.md described `assent compare` as Phase 5+ / E6 future work; E6 shipped, so it now reads as shipped. The ADRs are left alone deliberately: they are dated records, and ADR-0004 already carries "gRPC deferred" in its status line.
… in vision.md Two P2s from the independent review of PR #24. S17-01: the "how to read this page" admonition claimed cmd/assent imports every ingestion, core, provider, render and forge package directly. False, on a page whose whole thesis is verified accuracy. Derived from go list instead: cmd/assent directly imports 15 of the 22 internal packages plus root schemas, reaches internal/glob and internal/render/locale only transitively, and never links the remaining five (the no-production-importer set). Both derivation commands are named inline so the next reader can re-check rather than trust. S17-03: vision.md's Modes paragraph still asserted in the present tense that the pipeline runs as explain, a historical scan, and stats — the same three phantom subcommands this lane deleted from the C4 page, while docs/usage/walkthrough.md already marks all three Planned. The docs tree disagreed with itself; the modes are now split into shipped (CI job, local dry-run) and planned, with a pointer to the walkthrough.
|
Review fixes pushed — S17-01 — the composition-root claim is now derived, not asserted. S17-03 — Changelog — extended rather than amended: Not touched, per routing: S17-02 (drift gate for these pages) and S17-08 ( |
… in vision.md Two P2s from the independent review of PR #24. S17-01: the "how to read this page" admonition claimed cmd/assent imports every ingestion, core, provider, render and forge package directly. False, on a page whose whole thesis is verified accuracy. Derived from go list instead: cmd/assent directly imports 15 of the 22 internal packages plus root schemas, reaches internal/glob and internal/render/locale only transitively, and never links the remaining five (the no-production-importer set). Both derivation commands are named inline so the next reader can re-check rather than trust. S17-03: vision.md's Modes paragraph still asserted in the present tense that the pipeline runs as explain, a historical scan, and stats — the same three phantom subcommands this lane deleted from the C4 page, while docs/usage/walkthrough.md already marks all three Planned. The docs tree disagreed with itself; the modes are now split into shipped (CI job, local dry-run) and planned, with a pointer to the walkthrough.
AUD-S17 / REQ-AUD-S17-01 (ARCH-05) — the C4 pages showed
rego, gRPC, WASM and a GitHub adapter as if they existed, and the package sketch named three packages that have never existed. Redrawn fromgo list ./internal/... ./cmd/..., not from the old diagram.go listoutput this was derived from22 internal packages +
cmd/assent(+ the rootschemaspackage, which appears in the import graph).Element mapping — container diagram
Forge adapter (read) GitLab | GitHubinternal/forge/gitlab+internal/forge(port) shipped; GitHub adapter → PLANNED (E10), dashedPolicy loader (.assent/ from TARGET ref)internal/core/policy(+internal/cataloguefor pack activation)Format adapters JSON · YAML · HCL/tfvarsinternal/change— there is nointernal/format;diff_hcl.go/diff.go/limits.golive thereStructural differ + classifierinternal/change(differ) +internal/core/classify(classification)PolicyInputinternal/evaldecode(strict decode) — the node named a type, not a containerPolicy engine (envelope…)internal/core/aggregateassert backend (CEL-leaf trees, cel-go)internal/core/aggregate(asserttree.go,evalscalar.go,compilecheck.go) — merged, it is not a separate containerrego backend (OPA, capability-sandboxed)regoimplementation exists —schemas/evaluation_input_test.goactively pins the evaluation-input schema backend-neutral. (ADR-0010's layout example still shows a.assent/rego/tree unmarked; left as a dated record — residual #3.)Decision + Findings + Trace + Pinsinternal/core/decision(dropped "Trace" — no such artifact)Built-ins: forge groups, OIDC/Keycloak, LDAP, owners-fileinternal/provider/builtin— real builtins arebuiltin/gitlab-groups(aliasforge-groups),repo-file,resource-owner. Keycloak/LDAP/OIDC have no builtin; moved to the context page as "reachable via the generic HTTP/exec transport"HTTP / exec providers (digest-pinned)internal/provider(transport.go— real HTTP + digest-pinned exec)gRPC / WASM tiersgrpc/wasmunderinternal/+cmd/Renderer (escaped, redacted, lifecycle)internal/render(+internal/render/locale)Forge adapter (write)internal/forge/gitlab— merged with the read node; one adapter, not twoJSON report artifactinternal/core/decision(report emission)New nodes for real packages the old diagram omitted entirely:
internal/glob,internal/core/hash,internal/core(test-only purity guard),internal/lint,internal/adoptertest,internal/compare,internal/schemadrift,internal/forge/fake,internal/forge/conformance,schemas.Element mapping — context diagram
Forge — GitLab (first) / GitHub (next)GitLab: shipped adapter (internal/forge/gitlab). GitHub: PLANNED (E10) — no adapter code existsCI runner — GitLab CI / GitHub ActionsPermission sources — Keycloak / LDAP / forge groups / ownership filesNo long-lived service in v1serveHTTP API is PLANNED (E12)"Deleted (mapped to nothing real, not plausibly planned)
explain,scan,stats,init— the old package sketch advertised all four. The real dispatch table isrun doctor lint test compare catalogue render eval-input version help. No code, no epic in the meta-plan, and absent from the README maturity table → deleted rather than marked planned.internal/format,internal/policy,internal/harness— never existed. Replaced by an explicit "there is no …" note so the next reader does not re-invent them.internal/core/decision.Judgment call: planned vs deleted
The rule applied, so it is reviewable: named in D-012 (or holding a deferred epic E10–E13) → marked PLANNED with its epic; otherwise deleted. D-012 names exactly
rego, gRPC, WASM, GitHub adapter,serveand remote packs as designed seams, and the README maturity table already tiers them. Nothing new was decided, so no ADR — D-012 is cited in both legends.Legend (present on both pages)
Container page:
go list ./internal/... ./cmd/...PLANNED — E<n>/PLANNED — ADR-0004The context page uses in-label markers plus a prose legend, because
C4Contextcannot style nodes.Verification
Both acceptance claims were machine-checked, not eyeballed:
go list. Result: every non-PLANNED node is a real package; every PLANNED node carries the marker; zero unmarked non-existent elements.go list -f '{{.ImportPath}}|{{.Imports}}'. Result: 20/20 backed by a real import. This caught two errors mid-lane: aforge/gitlab → changeedge that does not exist, and ahash → decisionedge that does not exist.cmd/assent; no missing, no extra.Notable finding
internal/core/hash(ADR-0017 canonical digests) has no production importer at this commit — onlyinternal/changetests import it. Same forinternal/schemadrift(test-only importers). Both are documented in a new "Packages with no production importer" section rather than drawn with a fake edge. AUD-S16 is specified to wireinternal/compare → hash, so that row is explicitly dated "at this commit" and names S16.Scope notes
docs/vision.mdis outside the stateddocs/architecture/**ownership. It is in scope under the story's "check for the same lie elsewhere" clause. Three word-level edits only (Rego-as-present-tense ×2, "GitLab + GitHub" ×1) — no prose rewrite.docs/architecture/policy-profiles.mdgot one word-level fix (assent comparedescribed as future; E6 shipped).internal/**untouched (another lane owns it).Residuals for the backlog
internal/README.mddocuments 21 packages;go listreturns 22 —internal/core(test-only purity guard) is missing from its tables. Not fixed here:internal/**is another lane's scope.go listvs the mermaid block), the same waycmd/assent/main_clidoc_test.gopinsdocs/usage/cli.md. Without it, ARCH-05 can rot a fourth time..assent/rego/layout (docs/adr/0010-config-files-repo-layout.md:29,102,105— an escape-hatch directory, atier 2: regorule, andrego: { file: ../rego/naming.rego }), presented as current repo layout. Deliberately not fixed here: ADRs are dated records and rewriting them exceeds this story. It is the highest-value thing a fourth ARCH audit would find, so it is logged rather than left implicit.docs/architecture/policy-profiles.mdis not in the mkdocs nav — published-adjacent but unreachable.validation.omitted_files: infomeans it can never fail the build. Noted because this lane edited the file.Closed by review — both blocks parse cleanly under mermaid 11.16. Note for the future:npmis offline in the lane environment, so the mermaid source could not be parsed.task docs-buildstill does not validate mermaid (superfences only emits<pre class="mermaid">), so this was verified by hand, not by a gate. The PLANNED markers live in the label text rather than only inclassDef, so AC1 holds even if the dashed styling fails to render.Gates
task docs-build(strict)task check(full, incl.changelog-verify)task changelog-verifystandaloneCorrection to an earlier version of this body, which claimed
task checkwas "green, exit 0, zero failures" without qualification. That was one observation, not the whole picture.TestExecDigestPin/match_allows_execfails intermittently withsignal: killed— the test spawns a real binary against a ~1s deadline and loses the race under full-suite-raceload. Observed here: red on run 1, green on runs 2 and 3 (exit 0); green standalone and green under-raceon its own package. The independent reviewer reproduced the red and confirmed it fails identically on the base commit7247e6d, against a Go file this markdown-only diff does not touch. So it is a pre-existing, load-dependent flake that does not count against this lane — but it is not honest to report an unqualified green. The flake is being handled separately; deliberately not fixed here.