docs(shared): add the missing language-switcher row to the CIBG gap register (RB-32)
The register at libs/shared/docs/cibg-gaps.mdx had 8 rows for 9 CIBG-GAP EXTENSION markers in code. language-switcher carries a well-formed marker with no matching row, exactly as ADR-C-008 and adr-c-007.md's handoff note flag. Add the row from the component's own marker comment. Also add a small guard to check-tokens.sh (folded into check:tokens, as ADR-C-008 suggests as an optional step): it diffs the marker set in code against the register's rows and fails CI on drift. Verified working with a scratch marker file before removing it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -101,7 +101,7 @@ Every ticket tracing to a `BIO-` finding, plus every row on agent 07's authorita
|
|||||||
16-row "Compliance review required" list, carries it — regardless of priority.
|
16-row "Compliance review required" list, carries it — regardless of priority.
|
||||||
|
|
||||||
| ID | Module | Category | Description | Baseline metric improved | Effort | Risk | Priority | CD batch # | Depends on | Compliance | Status |
|
| ID | Module | Category | Description | Baseline metric improved | Effort | Risk | Priority | CD batch # | Depends on | Compliance | Status |
|
||||||
| --------- | -------------------------------- | ------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------ | -------- | -------- | ---------- | ---------- | ------------ | -------- |
|
| --------- | -------------------------------- | ------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------ | -------- | -------- | ---------- | ---------- | ------------ | --------------- |
|
||||||
| **RB-01** | backend/Program.cs + Data | security | Add an owner/capability check to `GET /uploads/{id}/content` and `/uploads/status`; 404 not 403 | §3c Data 75.5% branch vs 99.0% line (BL-005) | S | Low | **P1** | 1 | — | **SIGN-OFF** | **done** |
|
| **RB-01** | backend/Program.cs + Data | security | Add an owner/capability check to `GET /uploads/{id}/content` and `/uploads/status`; 404 not 403 | §3c Data 75.5% branch vs 99.0% line (BL-005) | S | Low | **P1** | 1 | — | **SIGN-OFF** | **done** |
|
||||||
| **RB-02** | backend/Program.cs + Data | privacy | Stop concatenating the BSN into `AuthzAudit.Resource`; assert on **values** in the test | §3c Data 75.5% branch (BL-005) | S | Low | **P1** | 1 | — | **SIGN-OFF** | **done** |
|
| **RB-02** | backend/Program.cs + Data | privacy | Stop concatenating the BSN into `AuthzAudit.Resource`; assert on **values** in the test | §3c Data 75.5% branch (BL-005) | S | Low | **P1** | 1 | — | **SIGN-OFF** | **done** |
|
||||||
| **RB-03** | backend/Contracts | privacy | `MaskTail(a.Owner, 3)` in `ToAdminSummaryDto` — both cross-owner lists inherit it | §3a bhp/behandeling 91.6%/81.5%; §7 Mapping row | S | Low | **P1** | 1 | — | **SIGN-OFF** | **done** |
|
| **RB-03** | backend/Contracts | privacy | `MaskTail(a.Owner, 3)` in `ToAdminSummaryDto` — both cross-owner lists inherit it | §3a bhp/behandeling 91.6%/81.5%; §7 Mapping row | S | Low | **P1** | 1 | — | **SIGN-OFF** | **done** |
|
||||||
@@ -133,7 +133,7 @@ Every ticket tracing to a `BIO-` finding, plus every row on agent 07's authorita
|
|||||||
| **RB-29** | backend/Domain | testability | Thread the existing `at` through `LetterHtml.ResolveAuto` instead of reading `UtcNow` | §3c Domain 82.0% branch; §4b `LetterHtml.cs` CC 21 | S | Low | P2 | 5 | — | — | **done** |
|
| **RB-29** | backend/Domain | testability | Thread the existing `at` through `LetterHtml.ResolveAuto` instead of reading `UtcNow` | §3c Domain 82.0% branch; §4b `LetterHtml.cs` CC 21 | S | Low | P2 | 5 | — | — | **done** |
|
||||||
| **RB-30** | backend/Data + Domain | testability | Extract 5 brief guards into `Domain/Letters/BriefRules.cs`; add `tests/Domain/BriefRuleTests.cs` | §3c Data **75.5% branch** (BL-005); §4b `BriefStore.cs` CC 17, `ToDto` CC 16 | M | Med | P2 | 5 | — | **SIGN-OFF** | **done** |
|
| **RB-30** | backend/Data + Domain | testability | Extract 5 brief guards into `Domain/Letters/BriefRules.cs`; add `tests/Domain/BriefRuleTests.cs` | §3c Data **75.5% branch** (BL-005); §4b `BriefStore.cs` CC 17, `ToDto` CC 16 | M | Med | P2 | 5 | — | **SIGN-OFF** | **done** |
|
||||||
| **RB-31** | 4 app contexts (specs only) | ADR conform. | Replace hand-rolled state literals with `given(reduce, initial)` replays in 4 machine specs | §7 Elm machines 9 (1 has a `*.testing.ts`); §3a herreg 67.8% / brief 68.8% branch | M | Low | P2 | 6 | — | — | open |
|
| **RB-31** | 4 app contexts (specs only) | ADR conform. | Replace hand-rolled state literals with `given(reduce, initial)` replays in 4 machine specs | §7 Elm machines 9 (1 has a `*.testing.ts`); §3a herreg 67.8% / brief 68.8% branch | M | Low | P2 | 6 | — | — | open |
|
||||||
| **RB-32** | libs/shared/docs | ADR conform. | Add the missing `language-switcher` row to the CIBG gap register (9 markers vs 8 rows) | §2 libs/shared 86 files / 5 194 lines; §6 layout Ca 22 | S | Low | P3 | 6 | — | — | open |
|
| **RB-32** | libs/shared/docs | ADR conform. | Add the missing `language-switcher` row to the CIBG gap register (9 markers vs 8 rows) | §2 libs/shared 86 files / 5 194 lines; §6 layout Ca 22 | S | Low | P3 | 6 | — | — | **implemented** |
|
||||||
| **RB-33** | libs/shared/testing | ADR conform. | Adopt `unwrapOk` at its one call site — **or delete it**; both satisfy ADR-0006 §3 | BL-004; §3a libs/shared/testing 3 files, 100% line | S | Low | P3 | 6 | — | — | open |
|
| **RB-33** | libs/shared/testing | ADR conform. | Adopt `unwrapOk` at its one call site — **or delete it**; both satisfy ADR-0006 §3 | BL-004; §3a libs/shared/testing 3 files, 100% line | S | Low | P3 | 6 | — | — | open |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -0,0 +1,86 @@
|
|||||||
|
# RB-32 — add the missing `language-switcher` row to the CIBG gap register
|
||||||
|
|
||||||
|
Status: **implemented** · 2026-08-28 · Source finding: `06-adr-conformance.md`
|
||||||
|
ADR-C-008 · `99-backlog.md` RB-32 · Depends on
|
||||||
|
`implementation/adr-c-007.md` (the same file, left one row short on purpose,
|
||||||
|
filed forward as this ticket)
|
||||||
|
|
||||||
|
## What was wrong
|
||||||
|
|
||||||
|
ADR-0003 §Consequences' final bullet requires every `// CIBG-GAP EXTENSION:`
|
||||||
|
marker in code to have a row in `libs/shared/docs/cibg-gaps.mdx`, "so it's
|
||||||
|
auditable rather than silently drifting." `libs/shared/src/layout/language-switcher/
|
||||||
|
language-switcher.component.ts:7-9` carries a full, well-formed marker
|
||||||
|
("Taal instellen" — no vendored Huisstijl class ships for it — see
|
||||||
|
`cibg-gaps.mdx`) but the register table had no row for it.
|
||||||
|
|
||||||
|
## Verified before editing
|
||||||
|
|
||||||
|
```
|
||||||
|
grep -rln "CIBG-GAP EXTENSION" apps libs --include=*.ts | wc -l # 9
|
||||||
|
```
|
||||||
|
|
||||||
|
Nine files carry the marker: `debug-state`, `language-switcher`, `wizard-shell`,
|
||||||
|
`application-link`, `placeholder-chip`, `rich-text-editor`, `skeleton`,
|
||||||
|
`spinner`, `status-badge`. The register table had 8 rows, and `language-switcher`
|
||||||
|
was the one missing — matching ADR-C-008's finding exactly, re-verified rather
|
||||||
|
than trusted from the finding's own snapshot (per this ticket's DoD point 1, and
|
||||||
|
per `adr-c-007.md`'s own note that it left this exact row for a later ticket).
|
||||||
|
|
||||||
|
## What changed
|
||||||
|
|
||||||
|
One row added to `libs/shared/docs/cibg-gaps.mdx`'s register table, matching the
|
||||||
|
existing rows' two-column shape (component name, closest CIBG concept, reason —
|
||||||
|
wording taken from the component's own marker comment, not invented):
|
||||||
|
|
||||||
|
| Component | Closest CIBG concept | Why hand-rolled |
|
||||||
|
| ------------------- | -------------------- | -------------------------------------------------------------------------------------------------- |
|
||||||
|
| `language-switcher` | Taal instellen | No vendored Huisstijl class ships for it; a small hand-rolled surface built from the token bridge. |
|
||||||
|
|
||||||
|
No other row was touched. The 8 existing rows were each re-checked against their
|
||||||
|
component's current marker comment while the file was open; none needed a change.
|
||||||
|
|
||||||
|
## Optional CI script: taken
|
||||||
|
|
||||||
|
ADR-C-008 flags a ~10-line `grep -l CIBG-GAP | diff`-style script folded into
|
||||||
|
`check:tokens` as an explicitly optional second step. It is genuinely small and
|
||||||
|
fits the existing script's shape, so `scripts/check-tokens.sh` gained one more
|
||||||
|
guard after its existing hardcoded-colour check:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
gap_register='libs/shared/docs/cibg-gaps.mdx'
|
||||||
|
markers=$(grep -rl 'CIBG-GAP EXTENSION' apps libs --include='*.component.ts' | xargs -n1 dirname | xargs -n1 basename | sort -u)
|
||||||
|
rows=$(grep -oP '^\| `\K[^`]+' "$gap_register" | sort -u)
|
||||||
|
missing=$(comm -23 <(echo "$markers") <(echo "$rows"))
|
||||||
|
if [ -n "$missing" ]; then
|
||||||
|
echo "$missing"
|
||||||
|
echo "FAIL: CIBG-GAP EXTENSION marker(s) with no row in $gap_register"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo 'OK: every CIBG-GAP EXTENSION marker has a cibg-gaps.mdx row'
|
||||||
|
```
|
||||||
|
|
||||||
|
The marker's component directory basename (`dirname` of the flagged file,
|
||||||
|
`.component.ts` files only) is compared against the table's backtick-quoted
|
||||||
|
first column, extracted with `grep -oP`. This matches for all 9 current
|
||||||
|
markers, including the two rows with a parenthetical suffix
|
||||||
|
(`` `wizard-shell` (error summary only) ``, `` `application-link` (non-navigating
|
||||||
|
row) ``) — the regex stops at the closing backtick, before the parenthetical.
|
||||||
|
|
||||||
|
**Verified working, not just written.** Added a scratch component
|
||||||
|
(`libs/shared/src/ui/scratch-gap-test/scratch-gap-test.component.ts`, a single
|
||||||
|
`// CIBG-GAP EXTENSION:` line plus a dummy export) with no matching row. Ran
|
||||||
|
`bash scripts/check-tokens.sh`: failed with exit 1, printing `scratch-gap-test`
|
||||||
|
and the expected `FAIL:` line. Deleted the scratch file and its directory (`rm`,
|
||||||
|
not `git checkout` — it was never tracked). Re-ran the script: passed, exit 0.
|
||||||
|
`git status` confirms no trace of the scratch file remains.
|
||||||
|
|
||||||
|
## Verification
|
||||||
|
|
||||||
|
- `npm run check:tokens` (includes the new guard): passes — 9 markers, 9 rows,
|
||||||
|
after the register row was added.
|
||||||
|
- `npm run ci`: result and step count reported in the implementing agent's final
|
||||||
|
answer.
|
||||||
|
- No code changed outside `libs/shared/docs/cibg-gaps.mdx`,
|
||||||
|
`scripts/check-tokens.sh`, `99-backlog.md`, and this note — a doc-only ticket
|
||||||
|
plus its optional, self-verifying guard script.
|
||||||
@@ -31,6 +31,7 @@ placed above the `@Component` decorator, plus `parameters: { cibgGap: true }` an
|
|||||||
| `debug-state` | n/a | Dev-only tool, deliberately off-theme — see the component's own `ponytail:` note. |
|
| `debug-state` | n/a | Dev-only tool, deliberately off-theme — see the component's own `ponytail:` note. |
|
||||||
| `status-badge` | n/a | Deliberate custom status dot, not Bootstrap's `.badge` (pill padding/colour don't fit). |
|
| `status-badge` | n/a | Deliberate custom status dot, not Bootstrap's `.badge` (pill padding/colour don't fit). |
|
||||||
| `placeholder-chip` | n/a | No vendored inline-chip/tag class. |
|
| `placeholder-chip` | n/a | No vendored inline-chip/tag class. |
|
||||||
|
| `language-switcher` | Taal instellen | No vendored Huisstijl class ships for it; a small hand-rolled surface built from the token bridge. |
|
||||||
|
|
||||||
Not a gap: `confirmation` renders entirely with vendored `.confirmation*` classes (no `styles:
|
Not a gap: `confirmation` renders entirely with vendored `.confirmation*` classes (no `styles:
|
||||||
[...]` block) — its header comment names the pattern, no marker needed. The `upload/` suite
|
[...]` block) — its header comment names the pattern, no marker needed. The `upload/` suite
|
||||||
|
|||||||
@@ -18,3 +18,17 @@ if [ -n "$hits" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo 'OK: no hardcoded colours in components'
|
echo 'OK: no hardcoded colours in components'
|
||||||
|
|
||||||
|
# ADR-C-008 guard: every `// CIBG-GAP EXTENSION:` marker (ADR-0003 §Consequences)
|
||||||
|
# must have a row in the register, so the table cannot drift from the code
|
||||||
|
# again without CI catching it.
|
||||||
|
gap_register='libs/shared/docs/cibg-gaps.mdx'
|
||||||
|
markers=$(grep -rl 'CIBG-GAP EXTENSION' apps libs --include='*.component.ts' | xargs -n1 dirname | xargs -n1 basename | sort -u)
|
||||||
|
rows=$(grep -oP '^\| `\K[^`]+' "$gap_register" | sort -u)
|
||||||
|
missing=$(comm -23 <(echo "$markers") <(echo "$rows"))
|
||||||
|
if [ -n "$missing" ]; then
|
||||||
|
echo "$missing"
|
||||||
|
echo "FAIL: CIBG-GAP EXTENSION marker(s) with no row in $gap_register"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo 'OK: every CIBG-GAP EXTENSION marker has a cibg-gaps.mdx row'
|
||||||
|
|||||||
Reference in New Issue
Block a user