context: round-2 brief for spec-revocation-check
This commit is contained in:
30
context/briefs/spec-revocation-check-r2.md
Normal file
30
context/briefs/spec-revocation-check-r2.md
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
# Round 2: spec-revocation-check — `--tag` must scope the malformed-marker check
|
||||||
|
|
||||||
|
## Rules
|
||||||
|
Same as round 1 (context/briefs/spec-revocation-check.md): stay in the worktree, don't push, don't work
|
||||||
|
around permission prompts, stdlib only, spec-first (update specs/spec-revocation-check.spec.md in the same
|
||||||
|
commit). Do not commit `scripts/__pycache__/*` changes (a tracked .pyc gets regenerated by run-all —
|
||||||
|
`git checkout -- scripts/__pycache__` before committing; the supervisor gate fails on a dirty tree).
|
||||||
|
|
||||||
|
## Defect (found by running round 1 on a real repo)
|
||||||
|
Run against a real amended repo with `--tag M33`, the script reported 57 "malformed markers" — every one a
|
||||||
|
valid revocation of a DIFFERENT tag or the untagged form, e.g.
|
||||||
|
`*(Amended M23: … — Revokes prior text: "the values.yaml `accelerator:` key is informational only …".)*`
|
||||||
|
or `> **Revokes prior text:** the pre-2026-09-23 wording named the keys` (an older free-prose style).
|
||||||
|
With `--tag X`, the user is asking to check tag X's amendment only.
|
||||||
|
|
||||||
|
## Required behaviour
|
||||||
|
1. With `--tag X`: only lines containing the literal `Revokes prior text (X)` are parsed; such a line that
|
||||||
|
does not parse is malformed. Lines with other tags, untagged markers or free-prose styles are ignored
|
||||||
|
entirely (not counted, not reported), and their quotes are NOT used to cover deletions either.
|
||||||
|
2. Without `--tag`: current behaviour (any tag + untagged form), but free-prose markers with no quote
|
||||||
|
(e.g. `**Revokes prior text:** the pre-… wording`) are reported as malformed only with `--strict`;
|
||||||
|
default is to count them in the summary as `ignored (unquoted-style)` without failing.
|
||||||
|
3. Summary line gains the ignored count.
|
||||||
|
4. Tests: add a fixture reproducing the real case (an older untagged mid-line marker, an M23-tagged marker
|
||||||
|
and a free-prose `**Revokes prior text:**` line alongside a valid `(M33)` amendment) → `--tag M33`
|
||||||
|
exits 0; a malformed `(M33)` line → exits 1; no `--tag` → the free-prose line is ignored by default and
|
||||||
|
malformed with `--strict`. Prove the new negatives fail with the check disabled, as in round 1.
|
||||||
|
|
||||||
|
## Done when
|
||||||
|
`./tests/test-spec-revocation-check.sh` passes on a CLEAN tree; report files, tests, open questions.
|
||||||
Reference in New Issue
Block a user