Skip to content

Commit 019e5fd

Browse files
committed
feat: Added the M060 S02 ownership-boundary verifier, regression suite,…
- scripts/verify-m060-s02.ts - scripts/verify-m060-s02.test.ts - package.json - scripts/REGISTRY.md GSD-Task: S02/T02
1 parent 735693d commit 019e5fd

File tree

11 files changed

+762
-35
lines changed

11 files changed

+762
-35
lines changed

.gsd/audit/events.jsonl

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3552,3 +3552,22 @@
35523552
{"eventId":"db30f72e-87ad-45e8-85ee-87b37f54848a","traceId":"activity:execute-task:M060/S02/T01","turnId":"M060/S02/T01","category":"execution","type":"activity-log-saved","ts":"2026-04-21T18:01:20.564Z","payload":{"unitType":"execute-task","unitId":"M060/S02/T01","filePath":"/home/keith/src/kodiai/.gsd/activity/3183-execute-task-M060-S02-T01.jsonl","entryCount":26}}
35533553
{"eventId":"6b7ab219-9466-4125-9db5-e6403237c8bb","traceId":"cd93ce0c-1552-4d31-b655-46880a80321a","causedBy":"cd93ce0c-1552-4d31-b655-46880a80321a:3","category":"orchestration","type":"journal-unit-end","ts":"2026-04-21T18:01:20.885Z","payload":{"seq":4,"data":{"unitType":"execute-task","unitId":"M060/S02/T01","status":"completed","artifactVerified":true}}}
35543554
{"eventId":"e13b875e-b7ff-436d-b274-071d14418f1c","traceId":"cd93ce0c-1552-4d31-b655-46880a80321a","turnId":"25c849b3-f8fe-47c1-94c8-d6a0cfc1a82e","category":"gitops","type":"turn-git-checkpoint","ts":"2026-04-21T18:01:20.894Z","payload":{"unitType":"execute-task","unitId":"M060/S02/T01","action":"next","push":false,"status":"ok"}}
3555+
{"eventId":"f3cfd23c-327d-47f6-9d79-6753e1064ce4","traceId":"cd93ce0c-1552-4d31-b655-46880a80321a","turnId":"25c849b3-f8fe-47c1-94c8-d6a0cfc1a82e","category":"gitops","type":"turn-git-publish","ts":"2026-04-21T18:01:21.232Z","payload":{"unitType":"execute-task","unitId":"M060/S02/T01","action":"commit","push":false,"status":"ok","dirty":true,"commitMessage":"feat: Added a canonical M060/M027 ownership-boundary section to the M02…\n\n- .gsd/milestones/M027/M027-SUMMARY.md\n- .gsd/DECISIONS.md\n\nGSD-Task: S02/T01"}}
3556+
{"eventId":"bac29034-94d5-408a-81bd-2d7546c6ac43","traceId":"verification:M060/S02/T01","turnId":"M060/S02/T01","category":"gate","type":"gate-run","ts":"2026-04-21T18:01:21.298Z","payload":{"gateId":"verification-gate","gateType":"verification","outcome":"pass","failureClass":"verification","attempt":1,"maxAttempts":1,"retryable":false}}
3557+
{"eventId":"c4198562-be33-4a91-9968-421bb740644b","traceId":"verification:M060/S02/T01","turnId":"M060/S02/T01","category":"gate","type":"gate-run","ts":"2026-04-21T18:01:21.302Z","payload":{"gateId":"post-execution-checks","gateType":"artifact","outcome":"pass","failureClass":"none","attempt":1,"maxAttempts":1,"retryable":false}}
3558+
{"eventId":"39dd977f-948e-4107-a811-d02ef317cca6","traceId":"cd93ce0c-1552-4d31-b655-46880a80321a","turnId":"25c849b3-f8fe-47c1-94c8-d6a0cfc1a82e","category":"gitops","type":"turn-git-publish","ts":"2026-04-21T18:01:21.314Z","payload":{"unitType":"execute-task","unitId":"M060/S02/T01","action":"next","push":false,"status":"ok"}}
3559+
{"eventId":"7af51559-413d-405b-846a-23561c22be8c","traceId":"cd93ce0c-1552-4d31-b655-46880a80321a","category":"orchestration","type":"journal-iteration-end","ts":"2026-04-21T18:01:21.314Z","payload":{"seq":5,"data":{"iteration":34}}}
3560+
{"eventId":"f74e061a-0234-4df4-ba96-5387f801ffd2","traceId":"cd93ce0c-1552-4d31-b655-46880a80321a","turnId":"25c849b3-f8fe-47c1-94c8-d6a0cfc1a82e","category":"orchestration","type":"turn-result","ts":"2026-04-21T18:01:21.314Z","payload":{"unitType":"execute-task","unitId":"M060/S02/T01","status":"completed","failureClass":"none","phaseCount":5}}
3561+
{"eventId":"5a63f713-66e7-4776-88f7-dc94075ee77b","traceId":"cd93ce0c-1552-4d31-b655-46880a80321a","turnId":"25c849b3-f8fe-47c1-94c8-d6a0cfc1a82e","category":"gitops","type":"turn-git-record","ts":"2026-04-21T18:01:21.314Z","payload":{"unitType":"execute-task","unitId":"M060/S02/T01","action":"commit","push":false,"status":"ok","turnStatus":"completed","finishedAt":"2026-04-21T18:01:21.314Z"}}
3562+
{"eventId":"bc012148-c7ef-42c6-9cb6-766b9db3851b","traceId":"28932f1b-02a6-4c06-89b4-981ecf465a04","turnId":"81b73bb7-f42c-45c8-a3c3-845cd5887ed1","category":"gitops","type":"turn-git-turn-start","ts":"2026-04-21T18:01:21.315Z","payload":{"action":"commit","push":false,"status":"ok","iteration":35}}
3563+
{"eventId":"991df77e-676c-41b6-b36a-5b9f4c4cf832","traceId":"28932f1b-02a6-4c06-89b4-981ecf465a04","turnId":"81b73bb7-f42c-45c8-a3c3-845cd5887ed1","category":"orchestration","type":"turn-start","ts":"2026-04-21T18:01:21.315Z","payload":{"iteration":35}}
3564+
{"eventId":"c7aee62e-fbf8-492f-9c82-b9317d0a929e","traceId":"28932f1b-02a6-4c06-89b4-981ecf465a04","category":"orchestration","type":"journal-iteration-start","ts":"2026-04-21T18:01:21.315Z","payload":{"seq":1,"data":{"iteration":35}}}
3565+
{"eventId":"5d369ffe-dfc0-4ff4-a779-57b08c0f6fe6","traceId":"pre-dispatch:28932f1b-02a6-4c06-89b4-981ecf465a04","turnId":"iter-35","category":"gate","type":"gate-run","ts":"2026-04-21T18:01:21.315Z","payload":{"gateId":"resource-version-guard","gateType":"policy","outcome":"pass","failureClass":"none","attempt":1,"maxAttempts":1,"retryable":false}}
3566+
{"eventId":"f8138297-03fa-4a7e-8dd7-7ba774e7bf2a","traceId":"pre-dispatch:28932f1b-02a6-4c06-89b4-981ecf465a04","turnId":"iter-35","category":"gate","type":"gate-run","ts":"2026-04-21T18:01:21.743Z","payload":{"gateId":"pre-dispatch-health-gate","gateType":"execution","outcome":"pass","failureClass":"none","attempt":1,"maxAttempts":1,"retryable":false}}
3567+
{"eventId":"cfc7800e-8a54-4793-9b31-af78904496a3","traceId":"28932f1b-02a6-4c06-89b4-981ecf465a04","category":"orchestration","type":"journal-dispatch-match","ts":"2026-04-21T18:01:21.770Z","payload":{"seq":2,"rule":"executing → execute-task","data":{"unitType":"execute-task","unitId":"M060/S02/T02"}}}
3568+
{"eventId":"6b544729-750e-4ee2-ab8c-2a34a3156555","traceId":"28932f1b-02a6-4c06-89b4-981ecf465a04","turnId":"81b73bb7-f42c-45c8-a3c3-845cd5887ed1","category":"gitops","type":"turn-git-stage","ts":"2026-04-21T18:01:21.786Z","payload":{"action":"next","push":false,"status":"ok"}}
3569+
{"eventId":"0be24fdf-87fe-473f-8edc-4ac22503082c","traceId":"28932f1b-02a6-4c06-89b4-981ecf465a04","category":"orchestration","type":"journal-unit-start","ts":"2026-04-21T18:01:21.786Z","payload":{"seq":3,"data":{"unitType":"execute-task","unitId":"M060/S02/T02"}}}
3570+
{"eventId":"0a8b2a8e-dfc4-48a4-9fcf-d32b59538a03","traceId":"28932f1b-02a6-4c06-89b4-981ecf465a04","turnId":"81b73bb7-f42c-45c8-a3c3-845cd5887ed1","category":"metrics","type":"unit-metrics-snapshot","ts":"2026-04-21T18:05:26.320Z","payload":{"unitType":"execute-task","unitId":"M060/S02/T02","model":"gpt-5.4","tokens":{"input":94262,"output":10189,"cacheRead":1372928,"cacheWrite":0,"total":1477379},"cost":0.731722,"toolCalls":26}}
3571+
{"eventId":"ca2c7cd8-5f6c-47d1-90b4-aeac97c279a9","traceId":"activity:execute-task:M060/S02/T02","turnId":"M060/S02/T02","category":"execution","type":"activity-log-saved","ts":"2026-04-21T18:05:26.322Z","payload":{"unitType":"execute-task","unitId":"M060/S02/T02","filePath":"/home/keith/src/kodiai/.gsd/activity/3184-execute-task-M060-S02-T02.jsonl","entryCount":46}}
3572+
{"eventId":"d294a4cc-e97a-458a-8b29-7cc19895a403","traceId":"28932f1b-02a6-4c06-89b4-981ecf465a04","causedBy":"28932f1b-02a6-4c06-89b4-981ecf465a04:3","category":"orchestration","type":"journal-unit-end","ts":"2026-04-21T18:05:26.644Z","payload":{"seq":4,"data":{"unitType":"execute-task","unitId":"M060/S02/T02","status":"completed","artifactVerified":true}}}
3573+
{"eventId":"d5afaf42-d112-424d-a71a-bed37d8af660","traceId":"28932f1b-02a6-4c06-89b4-981ecf465a04","turnId":"81b73bb7-f42c-45c8-a3c3-845cd5887ed1","category":"gitops","type":"turn-git-checkpoint","ts":"2026-04-21T18:05:26.652Z","payload":{"unitType":"execute-task","unitId":"M060/S02/T02","action":"next","push":false,"status":"ok"}}

.gsd/milestones/M060/slices/S02/S02-PLAN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Add the durable narrative contract for the M060/M027 split in the tracked milest
6767
- Files: `.gsd/milestones/M027/M027-SUMMARY.md`, `.gsd/DECISIONS.md`, `src/knowledge/test-coverage-exemptions.ts`, `scripts/verify-m060-s01.ts`, `scripts/verify-m027-s01.ts`, `scripts/verify-m027-s02.ts`, `scripts/verify-m027-s03.ts`, `scripts/verify-m027-s04.ts`
6868
- Verify: rg -n "M060/M027 ownership boundary|direct same-name unit tests|persisted-corpus audit|issue_comments" .gsd/milestones/M027/M027-SUMMARY.md .gsd/DECISIONS.md && test -s .gsd/milestones/M027/M027-SUMMARY.md && test -s .gsd/DECISIONS.md
6969

70-
- [ ] **T02: Add a machine-checked boundary verifier and regression suite** `est:55m`
70+
- [x] **T02: Add a machine-checked boundary verifier and regression suite** `est:55m`
7171
## Description
7272
Add the deterministic repo-local verifier and regression tests that keep the boundary truthful and wired into the existing script registry.
7373

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"schemaVersion": 1,
3+
"taskId": "T01",
4+
"unitId": "M060/S02/T01",
5+
"timestamp": 1776794481271,
6+
"passed": true,
7+
"discoverySource": "task-plan",
8+
"checks": [
9+
{
10+
"command": "test -s .gsd/milestones/M027/M027-SUMMARY.md",
11+
"exitCode": 0,
12+
"durationMs": 7,
13+
"verdict": "pass"
14+
},
15+
{
16+
"command": "test -s .gsd/DECISIONS.md",
17+
"exitCode": 0,
18+
"durationMs": 7,
19+
"verdict": "pass"
20+
}
21+
]
22+
}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
id: T02
3+
parent: S02
4+
milestone: M060
5+
key_files:
6+
- scripts/verify-m060-s02.ts
7+
- scripts/verify-m060-s02.test.ts
8+
- package.json
9+
- scripts/REGISTRY.md
10+
key_decisions:
11+
- Used marker-based boundary checks against the canonical M027 summary and rendered D171 decision row instead of introducing a second ownership manifest.
12+
- Kept the `issue_comments` summary assertion scoped to the real invariant language so the verifier detects semantic drift without depending on one exact sentence rendering.
13+
duration:
14+
verification_result: passed
15+
completed_at: 2026-04-21T18:05:21.726Z
16+
blocker_discovered: false
17+
---
18+
19+
# T02: Added the M060 S02 ownership-boundary verifier, regression suite, and script wiring for machine-checked M060/M027 proof-class drift detection.
20+
21+
**Added the M060 S02 ownership-boundary verifier, regression suite, and script wiring for machine-checked M060/M027 proof-class drift detection.**
22+
23+
## What Happened
24+
25+
I added `scripts/verify-m060-s02.ts` as a deterministic repo-local verifier that follows the existing M060 verifier pattern: stable check IDs, human-readable output, `--json` output, localized status codes, and failing-code aggregation on stderr. The new verifier checks four boundary surfaces: package wiring, `scripts/REGISTRY.md` wiring, rendered decision D171 in `.gsd/DECISIONS.md`, and the canonical M027 ownership section in `.gsd/milestones/M027/M027-SUMMARY.md`. The summary check is anchored to the existing S01 manifest by reporting the runtime-target and type-only-exemption counts from `src/knowledge/test-coverage-exemptions.ts` instead of introducing a second hard-maintained file list, and it verifies the proof-class split without falsely requiring file exclusivity. I added `scripts/verify-m060-s02.test.ts` with passing and failing fixtures covering package wiring, registry wiring, missing decision render markers, missing summary boundary markers, unreadable files, invalid `package.json`, and missing D171. During verification I found that my first `issue_comments` summary marker was too strict for the canonical summary text, so I narrowed it to the real invariant (`issue_comments`, audited/repairable under M027, outside the live retriever) and reran the suite. I then wired `verify:m060:s02` into `package.json` and registered both new files in `scripts/REGISTRY.md`.
26+
27+
## Verification
28+
29+
Ran `bun test ./scripts/verify-m060-s02.test.ts` and confirmed all six regression cases pass. Ran `bun run verify:m060:s02` and `bun run verify:m060:s02 --json` to confirm the new verifier emits stable check IDs, localized status codes, and `overallPassed=true`. Reran `bun run verify:m060:s01` to confirm the existing S01 direct-test coverage contract still passes after the new S02 wiring landed.
30+
31+
## Verification Evidence
32+
33+
| # | Command | Exit Code | Verdict | Duration |
34+
|---|---------|-----------|---------|----------|
35+
| 1 | `bun test ./scripts/verify-m060-s02.test.ts` | 0 | ✅ pass | 26ms |
36+
| 2 | `bun run verify:m060:s02` | 0 | ✅ pass | 24ms |
37+
| 3 | `bun run verify:m060:s02 --json` | 0 | ✅ pass | 28ms |
38+
| 4 | `bun run verify:m060:s01` | 0 | ✅ pass | 31ms |
39+
40+
## Deviations
41+
42+
None.
43+
44+
## Known Issues
45+
46+
None.
47+
48+
## Files Created/Modified
49+
50+
- `scripts/verify-m060-s02.ts`
51+
- `scripts/verify-m060-s02.test.ts`
52+
- `package.json`
53+
- `scripts/REGISTRY.md`

.gsd/notifications.jsonl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
{"id":"0b3de6f6-e434-483e-abd2-695a769f119b","ts":"2026-04-10T11:53:19.067Z","severity":"info","message":"Verification gate: 4/4 checks passed","source":"notify","read":false}
2-
{"id":"91fd41f5-2dce-4fde-a6ba-a721f05d91de","ts":"2026-04-10T12:06:26.015Z","severity":"warning","message":"[dispatch] Implementation artifact check inconclusive for M045 — proceeding (git context unavailable)","source":"workflow-logger","read":false}
31
{"id":"fc68a478-0ecb-4a40-8248-5a675bacbff8","ts":"2026-04-10T12:06:26.016Z","severity":"warning","message":"Milestone M045 has planned operational verification (\"An operator command must emit named pass/fail checks and JSON output that expose cross-surface contr\") but the validation output does not address it. Re-run validation with verification class awareness, or update the validation to document operational compliance.","source":"notify","read":false}
42
{"id":"933d12ab-f38d-43b8-aa56-4db5c0960553","ts":"2026-04-10T12:06:26.021Z","severity":"info","message":"Auto-mode paused (Escape). Type to interact, or /gsd auto to resume.","source":"notify","read":false}
53
{"id":"dffb6609-eefe-4d72-abce-63e02bcbd4ce","ts":"2026-04-10T12:43:42.030Z","severity":"info","message":"Auto-mode resumed.","source":"notify","read":false}
@@ -498,3 +496,5 @@
498496
{"id":"990aa24d-5a4a-4797-8765-d5ef6abf8f99","ts":"2026-04-21T17:36:10.421Z","severity":"warning","message":"[safety] file-change: scripts/verify-m060-s01.test.ts — Modified but not in task plan's expected output\n[safety] file-change: scripts/verify-m060-s01.ts — Modified but not in task plan's expected output","source":"notify","read":false}
499497
{"id":"ff04d3f2-22b5-4148-85d9-e0714c4d8f17","ts":"2026-04-21T17:52:34.488Z","severity":"info","message":"Committed: test: Added direct fail-open tests for wiki linkshere fetching, popular…","source":"notify","read":false}
500498
{"id":"0baf51c2-63b2-4aba-bb95-bef68f1d2b50","ts":"2026-04-21T17:52:34.776Z","severity":"info","message":"Verification gate: 4/4 checks passed","source":"notify","read":false}
499+
{"id":"d512687f-453d-4497-a29f-38c66644d961","ts":"2026-04-21T18:01:21.232Z","severity":"info","message":"Committed: feat: Added a canonical M060/M027 ownership-boundary section to the M02…","source":"notify","read":false}
500+
{"id":"b7cfe502-d2aa-4679-b6ca-d3f8deb143ae","ts":"2026-04-21T18:01:21.299Z","severity":"info","message":"Verification gate: 2/2 checks passed","source":"notify","read":false}

.gsd/safety/evidence-M060-S02-T01.json

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)