Skip to content

Testing plan: record-feedback appends duplicate sibling headings when a gate is approved twice on one day ​

Everything is proved in this repository with the existing pytest suite, plus one run of the pinned markdownlint over a twice-recorded artifact. The hook is pure file I/O on a temporary directory; no service, credential or network is involved.

Test matrix ​

#TypeApplies?Scope / what it provesWhere it runs
T1Unitn/a — _unique_heading is exercised through the hook in T2; a separate unit test would assert the same strings twice
T2Integration (scenario)yestwo and three same-day recordings into one artifact yield distinct ### headings; a first recording is unchanged; earlier headings are untouched (R1, R2, R3.1)uv run pytest cli/tests/test_graph_integration.py
T3Contractn/a — no API, schema or CLI shape changes
T4End-to-endn/a — the gate calls the same hook function T2 calls; no live GitHub needed
T5UI / visualn/a — no UI
T6Snapshotn/a — no snapshot surfaces
T7Performancen/a — one linear scan of an artifact the hook already reads
T8Security / abuse casen/a — the heading takes no untrusted input (design §Security design); the existing authorization tests for classify-feedback are unchanged and run in T12
T9Accessibilityn/a — no UI
T10Migration / upgraden/a — artifacts already on disk are read, never rewritten (R2.2)
T11Real linter over a recorded artifactyesthe shape T2 asserts is the shape MD024 accepts (R3.2)npx --yes markdownlint-cli2@0.18.1 <artifact>
T12Full suite + lint/typeyesnothing else depended on the old headingmake check

Scenarios & requirement trace ​

RowRequirement(s)Scenario / case
T2R1.1, R1.3, R3.1Scenario: a gate approved twice on one day records distinct headings
T2R1.2, R2.1, R2.2same scenario: the first heading stays <date> — approved, byte-identical after the later recordings
T11R3.2the artifact T2's scenario produces, written out and linted
T12R2.1the issue-247 tests (attribution, empty body) still pass

Verification environment ​

The repository checkout with make install-dev done; Node.js for npx (T11 only). No credentials.

Evidence plan ​

RowEvidencePath under evidence/
T2the new test failing before the fix, passing afterintegration.md
T11the recorded artifact and the linter's summarymarkdownlint.md
T12make check summarylint-and-typecheck.md

Verification activities ​

  • [x] T2 — the new scenario fails on the pre-fix hook and passes after
  • [x] T11 — markdownlint reports 0 issues on a twice-recorded artifact
  • [x] T12 — make check passes

Verification results ​

ActivityCommand / procedureOutcomeEvidence
T2uv run pytest cli/tests/test_graph_integration.pythe new scenario failed on the pre-fix hook (second heading repeated the first); after the fix 30 passedintegration.md
T11the real gate chain records three approvals into a scratch artifact; npx --yes markdownlint-cli2@0.18.1 with the repository's config0 errors; the same artifact with the suffixes removed gives two MD024 errorsmarkdownlint.md
T12make check, with the daemon's THE_LOOP_* variables unsetexit 0: lint clean, 6789 passedlint-and-typecheck.md

Not executed: none. T12's first run inside the session failed 22 unrelated tests that read the operator's live config through inherited environment variables; the note in the evidence explains it.

Released under the MIT License.