Skip to content

✨ feat(examples): EX-S06 REF-EX C1-C4 in-tree fixtures - #62

Merged
konih merged 2 commits into
mainfrom
lane/ex-s06
Aug 16, 2026
Merged

✨ feat(examples): EX-S06 REF-EX C1-C4 in-tree fixtures#62
konih merged 2 commits into
mainfrom
lane/ex-s06

Conversation

@konih

@konih konih commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes REF-EX C1–C4 by extending the already-merged topic-registry and service-catalog example packs with four new rules + both-polarity test fixtures:

  • C1 list-no-shrink — identity-keyed consumers map in topic-registry; a key-delete drives a non-APPROVE decision.
  • C2 privilege-tier allow-listservice-catalog's tier field restricted to [1,3], deliberately excluding 2 so the lane's own fixture — not a coincidental pre-existing golden — supplies the proving-polarity coverage credit.
  • C3 wildcard-grant blockacl.grants containing "*" drives a BLOCK; vacuous (no-op) when acl is absent.
  • C4 soft-delete-as-field-add — adding status: retired drives a non-APPROVE decision; unrelated field modifies don't fire it.

Went through two independent-review rounds. Round 1 found the C2 fixture was decorative — a pre-existing S02 golden coincidentally supplied its coverage credit — root-caused and fixed by narrowing the allow-list so the new fixture is now structurally exclusive per internal/adoptertest/coverage.go's coverage-crediting mechanism. Round 2 verdict: APPROVE, only non-blocking P3 notes remain (tracked below, not blockers).

Rebased onto origin/main @ befce0f (EX-S08's dogfood-discovery refactor). Only overlap with EX-S08 was CHANGELOG.md (both branches appended to the same section) — resolved by regenerating via task changelog-write rather than hand-editing. All other files are disjoint.

Test plan

  • task check green (incl. changelog-verify, depguard, lint, workflow-pins, dogfood-wiring, ci-audit)
  • task coverage green — 91.1% (required 91%)
  • ./bin/assent test --coverage examples/packs/topic-registry — 8/8 rules COVERED, both polarities
  • ./bin/assent test --coverage examples/packs/service-catalog — 8/8 rules COVERED, both polarities
  • Independent review round 2: APPROVE

Known non-blocking follow-ups (P3, not blockers)

  • Cross-fixture tier-allow-list interaction is undocumented in allowed-fields/negative/expect.yaml.
  • REQ-EX-S06-05's C2 coverage is coverage-gated-only, not lint-gated.

konih added 2 commits August 16, 2026 12:15
EX-S06 — extend the S02/S03 topic-registry and service-catalog packs with four
generalized reference-derived patterns, each proven both-polarity via a
dedicated assent test directory:

- C1 list-no-shrink (topic-registry): identity-keyed `consumers` map; a key
  DELETE requires review (reuses the non-destructive obligation), a key ADD
  proves silently. Pointer-scoped to /*/consumers/*, vacuous on every S02
  golden (none declare consumers).
- C2 privilege-tier allow-list (service-catalog): /services/*/tier must be in
  [1,2,3]; an out-of-range value (e.g. 0) fails on top of the existing
  only-safe-fields escalation. Reuses the allowed-fields obligation; no
  unkeyed nested list reintroduced (D-061).
- C3 wildcard-grant block (topic-registry): nested acl.grants map keyed by
  principal; a grant keyed by the literal wildcard "*" BLOCKs, an explicit
  named principal does not. New `wildcard-grant` obligation added to
  bindings.yaml require: (safe — coverage marks an obligation covered the
  instant an enforce rule names it, independent of whether any subject
  matches).
- C4 soft-delete-as-field-add (topic-registry): adding `status: retired` (a
  field base lacked) requires review instead of silently approving; adding
  any other status value proves silently. An explicit edge case proves an
  unrelated field modify does not fire the rule.

Verified: `assent test --coverage` green on both packs (8/8 rules covered in
both polarities each); all pre-existing S02/S03 goldens unchanged and green;
empirically confirmed REQ-EX-S06-05 by deleting each new rule file and
observing the pack gate go red (lint for the required wildcard-grant
obligation, --coverage for the reused-obligation rules).
Review finding F1: the C2 privilege-tier positive fixture (tier 1->3) was
decorative, not load-bearing — deleting it left `assent test --coverage`
still reporting tier-allow-list COVERED, because the pre-existing S02
allowed-fields/negative golden coincidentally moves tier 1->2, which was
already inside the old [1,2,3] allow-list and silently supplied the
rule's proving-polarity credit on its own.

Narrow the allow-list to [1, 3] (tier 2 deprecated/consolidated, existing
tier-2 services grandfathered since they never trigger a tier MODIFY).
This flips that S02 fixture's 1->2 change to a tolerated failing firing
instead of a proving one, making this pack's own privilege-tier/ positive
fixture (1->3, unaffected by the narrower list) the sole source of
proving-polarity credit.

Empirically re-verified: with only the positive fixture deleted,
`--coverage` now reports "MISSING catalog/tier-allow-list: no proving
case" (red); restored, green again (8/8 rules, both polarities). Full
`assent test`/`--coverage`/`lint` clean on both packs; `task check` green.
@konih
konih merged commit 0774dcf into main Aug 16, 2026
6 checks passed
@konih
konih deleted the lane/ex-s06 branch August 16, 2026 10:23
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