Enhancement(#41): /gsd-ship extracts per-commit gate_status into a PR-body TDD Audit + squash trailer (#585)
* feat(#41): extract per-commit gate_status into ship PR body TDD Audit /gsd:ship's generate_pr_body now reconstructs the TDD gate trail that a squash-merge would otherwise discard. A new TDD Audit section walks the merge-base..HEAD commit range (merges excluded), reads each commit's gate_status: trailer via Git's native trailer machinery, pairs each test: commit with its following feat:/fix: implementation commit, and counts commits lacking a recognized trailer as missing. A single aggregate `gate_status: skill=N, fallback=N, exempt=N, missing=N` trailer is emitted as the final line of the PR body so a GitHub squash-merge carries the audit footprint into the base branch. Hardening (per adversarial review): impl pairing is restricted to feat:/fix: (refactor/docs/chore are skipped, never mistaken for GREEN); the gate_status cell is normalized to a known token and never rendered raw; commits with multiple gate_status trailers are treated as missing; every table cell escapes pipes and strips CR/LF; records guard against delimiter-injection from adversarial commit messages. Scoped additively: no changes to commands, agents, templates, or SDK. Closes #41 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * docs(#41): add changeset for ship TDD Audit enhancement Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -13,8 +13,19 @@ Every generated `/gsd-ship` PR body keeps the required core sections:
|
||||
- `Requirements Addressed`
|
||||
- `Verification`
|
||||
- `Key Decisions`
|
||||
- `TDD Audit`
|
||||
|
||||
Custom sections are append-only. They render after `Key Decisions`; they cannot replace, remove, or reorder the core sections.
|
||||
Custom sections are append-only. They render after `Key Decisions` (and before the `TDD Audit`); they cannot replace, remove, or reorder the core sections.
|
||||
|
||||
### TDD Audit section
|
||||
|
||||
The `TDD Audit` section is always appended last. It walks the commits in the `merge-base..HEAD` range (merges excluded), reads each commit's `gate_status:` Git trailer (`skill` | `fallback` | `exempt`), and pairs each `test:` commit with its following `feat:`/`fix:` implementation commit in a table. Commits that carry no recognized trailer are counted as `missing`.
|
||||
|
||||
The section closes with a single aggregate trailer line that a GitHub squash-merge carries into the base branch:
|
||||
|
||||
```
|
||||
gate_status: skill=3, fallback=1, exempt=0, missing=0
|
||||
```
|
||||
|
||||
## Configure Sections During Onboarding
|
||||
|
||||
|
||||
Reference in New Issue
Block a user