repo-harness 0.13.0 → 0.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +17 -25
- package/CLAUDE.md +17 -25
- package/README.es.md +2 -2
- package/README.fr.md +2 -2
- package/README.ja.md +2 -2
- package/README.md +2 -2
- package/README.zh-CN.md +2 -2
- package/assets/AGENTS.md +13 -9
- package/assets/CLAUDE.md +13 -9
- package/assets/hooks/AGENTS.md +8 -5
- package/assets/hooks/CLAUDE.md +8 -5
- package/assets/skill-version.json +2 -2
- package/assets/templates/helpers/verify-contract.sh +35 -1
- package/assets/templates/helpers/verify-sprint.sh +10 -10
- package/dist/hook-entry.js +12694 -0
- package/package.json +6 -3
- package/scripts/check-npm-release.sh +14 -0
- package/scripts/lib/project-init-lib.sh +1 -2
- package/scripts/verify-contract.sh +35 -1
- package/scripts/verify-sprint.sh +10 -10
- package/src/cli/hook/mutation-guard.ts +39 -126
- package/src/cli/hook/session-context.ts +11 -2
- package/src/cli/hook-entry.ts +12 -0
- package/src/cli/mcp/oauth.ts +21 -4
- package/src/cli/runtime/helper-runner.ts +1 -1
- package/src/core/adoption/gitignore-plan.ts +1 -2
- package/src/core/adoption/source-checkout.ts +1 -1
- package/src/core/state/artifact-parsers.ts +22 -0
- package/src/core/state/project-effective-state.ts +17 -1
- package/src/core/workflow/operation-readiness.ts +12 -2
- package/src/effects/evidence/post-bash-importer.ts +16 -0
- package/src/effects/state/collect-state-inputs.ts +55 -29
- package/src/effects/state/resolve-effective-state.ts +8 -0
package/AGENTS.md
CHANGED
|
@@ -71,46 +71,38 @@ bun src/cli/index.ts init --repo . --dry-run
|
|
|
71
71
|
<!-- BEGIN ARCHITECTURE CONTRACT -->
|
|
72
72
|
## Architecture Contract
|
|
73
73
|
|
|
74
|
-
- Functional block: `scripts/
|
|
75
|
-
- Capability ID: `
|
|
76
|
-
- Matched prefix: `scripts/
|
|
77
|
-
- Architecture domain: `
|
|
78
|
-
- Architecture capability: `
|
|
79
|
-
- Architecture module: `docs/architecture/modules/
|
|
80
|
-
- Last architecture event: 2026-
|
|
81
|
-
- Last changed path: `
|
|
82
|
-
- Severity:
|
|
83
|
-
- Change type:
|
|
74
|
+
- Functional block: `scripts/verify-sprint.sh`
|
|
75
|
+
- Capability ID: `verification-evals-checks`
|
|
76
|
+
- Matched prefix: `scripts/verify-sprint.sh`
|
|
77
|
+
- Architecture domain: `verification`
|
|
78
|
+
- Architecture capability: `evals-checks`
|
|
79
|
+
- Architecture module: `docs/architecture/modules/verification/evals-checks.md`
|
|
80
|
+
- Last architecture event: 2026-08-05T00:46:11+0800
|
|
81
|
+
- Last changed path: `tasks/workstreams/verification/evals-checks/github-issues-158-159.md`
|
|
82
|
+
- Severity: medium
|
|
83
|
+
- Change type: workstream-sync
|
|
84
84
|
- Module responsibility: Keep this block aligned with the local boundary described by surrounding human-owned context.
|
|
85
|
-
- Entrypoints: `scripts/
|
|
85
|
+
- Entrypoints: `scripts/verify-sprint.sh`
|
|
86
86
|
- Allowed dependencies: Follow root `AGENTS.md` / `CLAUDE.md` and this local contract.
|
|
87
87
|
- Forbidden dependencies: Do not cross sibling app/service/package boundaries without an architecture snapshot or explicit plan.
|
|
88
|
-
- Runtime path: `scripts/
|
|
88
|
+
- Runtime path: `scripts/verify-sprint.sh`
|
|
89
89
|
- LSP/tooling profile: `typescript-lsp`
|
|
90
90
|
- Verification: Use root required checks plus local commands recorded in this capability contract.
|
|
91
91
|
- Latest snapshot: `(none yet)`
|
|
92
|
-
- Semantic diagram source: `docs/architecture/modules/
|
|
92
|
+
- Semantic diagram source: `docs/architecture/modules/verification/evals-checks.md`
|
|
93
93
|
- Latest human diagram: `(none yet)`
|
|
94
94
|
- Pending architecture request: `(none)`
|
|
95
95
|
|
|
96
96
|
## Active Workstreams
|
|
97
97
|
|
|
98
|
-
- `tasks/workstreams/
|
|
98
|
+
- `tasks/workstreams/verification/evals-checks/github-issues-158-159.md`
|
|
99
99
|
- status: completed
|
|
100
|
-
- current_slice: completed-
|
|
101
|
-
- source_plan:
|
|
102
|
-
- `tasks/workstreams/workflow-engine/inspection-migration/20260712-inspection-migration.md`
|
|
103
|
-
- status: completed
|
|
104
|
-
- current_slice: completed-20260712-repo-owned-agent-fleet
|
|
105
|
-
- source_plan: `plans/archive/plan-20260712-2053-repo-owned-agent-fleet.md`
|
|
106
|
-
- `tasks/workstreams/workflow-engine/inspection-migration/agent-fleet-specialists.md`
|
|
107
|
-
- status: completed
|
|
108
|
-
- current_slice: completed-20260713-policy-seed
|
|
109
|
-
- source_plan: `plans/archive/plan-20260712-2215-agent-fleet-specialists.md`
|
|
100
|
+
- current_slice: completed-20260805-deployed-emitter-binding
|
|
101
|
+
- source_plan: plans/plan-20260805-0001-github-issues-158-159.md
|
|
110
102
|
|
|
111
103
|
## Current Session Projection
|
|
112
104
|
|
|
113
|
-
- Durable progress lives under `tasks/workstreams/
|
|
105
|
+
- Durable progress lives under `tasks/workstreams/verification/evals-checks`.
|
|
114
106
|
- `tasks/current.md` is the tracked derived status snapshot; it is not a live lock or task source.
|
|
115
107
|
- `tasks/todos.md` is the deferred-goal ledger; current execution slices stay in the active plan's `## Task Breakdown`.
|
|
116
108
|
<!-- END ARCHITECTURE CONTRACT -->
|
package/CLAUDE.md
CHANGED
|
@@ -71,46 +71,38 @@ bun src/cli/index.ts init --repo . --dry-run
|
|
|
71
71
|
<!-- BEGIN ARCHITECTURE CONTRACT -->
|
|
72
72
|
## Architecture Contract
|
|
73
73
|
|
|
74
|
-
- Functional block: `scripts/
|
|
75
|
-
- Capability ID: `
|
|
76
|
-
- Matched prefix: `scripts/
|
|
77
|
-
- Architecture domain: `
|
|
78
|
-
- Architecture capability: `
|
|
79
|
-
- Architecture module: `docs/architecture/modules/
|
|
80
|
-
- Last architecture event: 2026-
|
|
81
|
-
- Last changed path: `
|
|
82
|
-
- Severity:
|
|
83
|
-
- Change type:
|
|
74
|
+
- Functional block: `scripts/verify-sprint.sh`
|
|
75
|
+
- Capability ID: `verification-evals-checks`
|
|
76
|
+
- Matched prefix: `scripts/verify-sprint.sh`
|
|
77
|
+
- Architecture domain: `verification`
|
|
78
|
+
- Architecture capability: `evals-checks`
|
|
79
|
+
- Architecture module: `docs/architecture/modules/verification/evals-checks.md`
|
|
80
|
+
- Last architecture event: 2026-08-05T00:46:11+0800
|
|
81
|
+
- Last changed path: `tasks/workstreams/verification/evals-checks/github-issues-158-159.md`
|
|
82
|
+
- Severity: medium
|
|
83
|
+
- Change type: workstream-sync
|
|
84
84
|
- Module responsibility: Keep this block aligned with the local boundary described by surrounding human-owned context.
|
|
85
|
-
- Entrypoints: `scripts/
|
|
85
|
+
- Entrypoints: `scripts/verify-sprint.sh`
|
|
86
86
|
- Allowed dependencies: Follow root `AGENTS.md` / `CLAUDE.md` and this local contract.
|
|
87
87
|
- Forbidden dependencies: Do not cross sibling app/service/package boundaries without an architecture snapshot or explicit plan.
|
|
88
|
-
- Runtime path: `scripts/
|
|
88
|
+
- Runtime path: `scripts/verify-sprint.sh`
|
|
89
89
|
- LSP/tooling profile: `typescript-lsp`
|
|
90
90
|
- Verification: Use root required checks plus local commands recorded in this capability contract.
|
|
91
91
|
- Latest snapshot: `(none yet)`
|
|
92
|
-
- Semantic diagram source: `docs/architecture/modules/
|
|
92
|
+
- Semantic diagram source: `docs/architecture/modules/verification/evals-checks.md`
|
|
93
93
|
- Latest human diagram: `(none yet)`
|
|
94
94
|
- Pending architecture request: `(none)`
|
|
95
95
|
|
|
96
96
|
## Active Workstreams
|
|
97
97
|
|
|
98
|
-
- `tasks/workstreams/
|
|
98
|
+
- `tasks/workstreams/verification/evals-checks/github-issues-158-159.md`
|
|
99
99
|
- status: completed
|
|
100
|
-
- current_slice: completed-
|
|
101
|
-
- source_plan:
|
|
102
|
-
- `tasks/workstreams/workflow-engine/inspection-migration/20260712-inspection-migration.md`
|
|
103
|
-
- status: completed
|
|
104
|
-
- current_slice: completed-20260712-repo-owned-agent-fleet
|
|
105
|
-
- source_plan: `plans/archive/plan-20260712-2053-repo-owned-agent-fleet.md`
|
|
106
|
-
- `tasks/workstreams/workflow-engine/inspection-migration/agent-fleet-specialists.md`
|
|
107
|
-
- status: completed
|
|
108
|
-
- current_slice: completed-20260713-policy-seed
|
|
109
|
-
- source_plan: `plans/archive/plan-20260712-2215-agent-fleet-specialists.md`
|
|
100
|
+
- current_slice: completed-20260805-deployed-emitter-binding
|
|
101
|
+
- source_plan: plans/plan-20260805-0001-github-issues-158-159.md
|
|
110
102
|
|
|
111
103
|
## Current Session Projection
|
|
112
104
|
|
|
113
|
-
- Durable progress lives under `tasks/workstreams/
|
|
105
|
+
- Durable progress lives under `tasks/workstreams/verification/evals-checks`.
|
|
114
106
|
- `tasks/current.md` is the tracked derived status snapshot; it is not a live lock or task source.
|
|
115
107
|
- `tasks/todos.md` is the deferred-goal ledger; current execution slices stay in the active plan's `## Task Breakdown`.
|
|
116
108
|
<!-- END ARCHITECTURE CONTRACT -->
|
package/README.es.md
CHANGED
|
@@ -466,8 +466,8 @@ repositorio adopte la misma política.
|
|
|
466
466
|
|
|
467
467
|
## Versión actual
|
|
468
468
|
|
|
469
|
-
- Paquete npm: `repo-harness@0.13.
|
|
470
|
-
- Sello de workflow generado: `repo-harness@0.13.
|
|
469
|
+
- Paquete npm: `repo-harness@0.13.2`
|
|
470
|
+
- Sello de workflow generado: `repo-harness@0.13.2+template@0.13.2`
|
|
471
471
|
- Repositorio de GitHub: `Ancienttwo/repo-harness`
|
|
472
472
|
- Notas de versión e historial: [`docs/CHANGELOG.md`](docs/CHANGELOG.md)
|
|
473
473
|
|
package/README.fr.md
CHANGED
|
@@ -461,8 +461,8 @@ adopte la même policy.
|
|
|
461
461
|
|
|
462
462
|
## Release actuelle
|
|
463
463
|
|
|
464
|
-
- Package npm : `repo-harness@0.13.
|
|
465
|
-
- Generated workflow stamp : `repo-harness@0.13.
|
|
464
|
+
- Package npm : `repo-harness@0.13.2`
|
|
465
|
+
- Generated workflow stamp : `repo-harness@0.13.2+template@0.13.2`
|
|
466
466
|
- Dépôt GitHub : `Ancienttwo/repo-harness`
|
|
467
467
|
- Notes et historique de release : [`docs/CHANGELOG.md`](docs/CHANGELOG.md)
|
|
468
468
|
|
package/README.ja.md
CHANGED
|
@@ -469,8 +469,8 @@ commit script や hooks に組み込まないでください。
|
|
|
469
469
|
|
|
470
470
|
## 現在の Release
|
|
471
471
|
|
|
472
|
-
- npm package:`repo-harness@0.13.
|
|
473
|
-
- Generated workflow stamp:`repo-harness@0.13.
|
|
472
|
+
- npm package:`repo-harness@0.13.2`
|
|
473
|
+
- Generated workflow stamp:`repo-harness@0.13.2+template@0.13.2`
|
|
474
474
|
- GitHub repository:`Ancienttwo/repo-harness`
|
|
475
475
|
- Release notes and history:[`docs/CHANGELOG.md`](docs/CHANGELOG.md)
|
|
476
476
|
|
package/README.md
CHANGED
|
@@ -441,8 +441,8 @@ repo-harness commit scripts or hooks unless that repo adopts the same policy.
|
|
|
441
441
|
|
|
442
442
|
## Current Release
|
|
443
443
|
|
|
444
|
-
- npm package: `repo-harness@0.13.
|
|
445
|
-
- Generated workflow stamp: `repo-harness@0.13.
|
|
444
|
+
- npm package: `repo-harness@0.13.2`
|
|
445
|
+
- Generated workflow stamp: `repo-harness@0.13.2+template@0.13.2`
|
|
446
446
|
- GitHub repository: `Ancienttwo/repo-harness`
|
|
447
447
|
- Release notes and history: [`docs/CHANGELOG.md`](docs/CHANGELOG.md)
|
|
448
448
|
|
package/README.zh-CN.md
CHANGED
|
@@ -448,8 +448,8 @@ policy。
|
|
|
448
448
|
|
|
449
449
|
## 当前 Release
|
|
450
450
|
|
|
451
|
-
- npm package:`repo-harness@0.13.
|
|
452
|
-
- Generated workflow stamp:`repo-harness@0.13.
|
|
451
|
+
- npm package:`repo-harness@0.13.2`
|
|
452
|
+
- Generated workflow stamp:`repo-harness@0.13.2+template@0.13.2`
|
|
453
453
|
- GitHub repository:`Ancienttwo/repo-harness`
|
|
454
454
|
- Release notes 和 history:[`docs/CHANGELOG.md`](docs/CHANGELOG.md)
|
|
455
455
|
|
package/assets/AGENTS.md
CHANGED
|
@@ -31,27 +31,27 @@ Owns the workflow-engine-contract-assets capability boundary declared in .ai/con
|
|
|
31
31
|
<!-- BEGIN ARCHITECTURE CONTRACT -->
|
|
32
32
|
## Architecture Contract
|
|
33
33
|
|
|
34
|
-
- Functional block:
|
|
34
|
+
- Functional block: `assets/templates`
|
|
35
35
|
- Capability ID: `workflow-engine-contract-assets`
|
|
36
|
-
- Matched prefix:
|
|
36
|
+
- Matched prefix: `assets/templates`
|
|
37
37
|
- Architecture domain: `workflow-engine`
|
|
38
38
|
- Architecture capability: `contract-assets`
|
|
39
39
|
- Architecture module: `docs/architecture/modules/workflow-engine/contract-assets.md`
|
|
40
|
-
- Last architecture event: 2026-
|
|
41
|
-
- Last changed path:
|
|
42
|
-
- Severity:
|
|
43
|
-
- Change type:
|
|
40
|
+
- Last architecture event: 2026-08-05T00:46:13+0800
|
|
41
|
+
- Last changed path: `tasks/workstreams/workflow-engine/contract-assets/github-issues-158-159.md`
|
|
42
|
+
- Severity: medium
|
|
43
|
+
- Change type: workstream-sync
|
|
44
44
|
- Module responsibility: Keep this block aligned with the local boundary described by surrounding human-owned context.
|
|
45
|
-
- Entrypoints:
|
|
45
|
+
- Entrypoints: `assets/templates`
|
|
46
46
|
- Allowed dependencies: Follow root `AGENTS.md` / `CLAUDE.md` and this local contract.
|
|
47
47
|
- Forbidden dependencies: Do not cross sibling app/service/package boundaries without an architecture snapshot or explicit plan.
|
|
48
|
-
- Runtime path:
|
|
48
|
+
- Runtime path: `assets/templates`
|
|
49
49
|
- LSP/tooling profile: `typescript-lsp`
|
|
50
50
|
- Verification: Use root required checks plus local commands recorded in this capability contract.
|
|
51
51
|
- Latest snapshot: `(none yet)`
|
|
52
52
|
- Semantic diagram source: `docs/architecture/modules/workflow-engine/contract-assets.md`
|
|
53
53
|
- Latest human diagram: `(none yet)`
|
|
54
|
-
- Pending architecture request: `
|
|
54
|
+
- Pending architecture request: `(none)`
|
|
55
55
|
|
|
56
56
|
## Active Workstreams
|
|
57
57
|
|
|
@@ -71,6 +71,10 @@ Owns the workflow-engine-contract-assets capability boundary declared in .ai/con
|
|
|
71
71
|
- status: completed
|
|
72
72
|
- current_slice: completed-20260529-cleanup-script-policy
|
|
73
73
|
- source_plan: (none)
|
|
74
|
+
- `tasks/workstreams/workflow-engine/contract-assets/github-issues-158-159.md`
|
|
75
|
+
- status: completed
|
|
76
|
+
- current_slice: completed-20260805-packaged-helper-projection
|
|
77
|
+
- source_plan: plans/plan-20260805-0001-github-issues-158-159.md
|
|
74
78
|
|
|
75
79
|
## Current Session Projection
|
|
76
80
|
|
package/assets/CLAUDE.md
CHANGED
|
@@ -31,27 +31,27 @@ Owns the workflow-engine-contract-assets capability boundary declared in .ai/con
|
|
|
31
31
|
<!-- BEGIN ARCHITECTURE CONTRACT -->
|
|
32
32
|
## Architecture Contract
|
|
33
33
|
|
|
34
|
-
- Functional block:
|
|
34
|
+
- Functional block: `assets/templates`
|
|
35
35
|
- Capability ID: `workflow-engine-contract-assets`
|
|
36
|
-
- Matched prefix:
|
|
36
|
+
- Matched prefix: `assets/templates`
|
|
37
37
|
- Architecture domain: `workflow-engine`
|
|
38
38
|
- Architecture capability: `contract-assets`
|
|
39
39
|
- Architecture module: `docs/architecture/modules/workflow-engine/contract-assets.md`
|
|
40
|
-
- Last architecture event: 2026-
|
|
41
|
-
- Last changed path:
|
|
42
|
-
- Severity:
|
|
43
|
-
- Change type:
|
|
40
|
+
- Last architecture event: 2026-08-05T00:46:13+0800
|
|
41
|
+
- Last changed path: `tasks/workstreams/workflow-engine/contract-assets/github-issues-158-159.md`
|
|
42
|
+
- Severity: medium
|
|
43
|
+
- Change type: workstream-sync
|
|
44
44
|
- Module responsibility: Keep this block aligned with the local boundary described by surrounding human-owned context.
|
|
45
|
-
- Entrypoints:
|
|
45
|
+
- Entrypoints: `assets/templates`
|
|
46
46
|
- Allowed dependencies: Follow root `AGENTS.md` / `CLAUDE.md` and this local contract.
|
|
47
47
|
- Forbidden dependencies: Do not cross sibling app/service/package boundaries without an architecture snapshot or explicit plan.
|
|
48
|
-
- Runtime path:
|
|
48
|
+
- Runtime path: `assets/templates`
|
|
49
49
|
- LSP/tooling profile: `typescript-lsp`
|
|
50
50
|
- Verification: Use root required checks plus local commands recorded in this capability contract.
|
|
51
51
|
- Latest snapshot: `(none yet)`
|
|
52
52
|
- Semantic diagram source: `docs/architecture/modules/workflow-engine/contract-assets.md`
|
|
53
53
|
- Latest human diagram: `(none yet)`
|
|
54
|
-
- Pending architecture request: `
|
|
54
|
+
- Pending architecture request: `(none)`
|
|
55
55
|
|
|
56
56
|
## Active Workstreams
|
|
57
57
|
|
|
@@ -71,6 +71,10 @@ Owns the workflow-engine-contract-assets capability boundary declared in .ai/con
|
|
|
71
71
|
- status: completed
|
|
72
72
|
- current_slice: completed-20260529-cleanup-script-policy
|
|
73
73
|
- source_plan: (none)
|
|
74
|
+
- `tasks/workstreams/workflow-engine/contract-assets/github-issues-158-159.md`
|
|
75
|
+
- status: completed
|
|
76
|
+
- current_slice: completed-20260805-packaged-helper-projection
|
|
77
|
+
- source_plan: plans/plan-20260805-0001-github-issues-158-159.md
|
|
74
78
|
|
|
75
79
|
## Current Session Projection
|
|
76
80
|
|
package/assets/hooks/AGENTS.md
CHANGED
|
@@ -49,10 +49,10 @@ Owns the runtime-harness-hook-adapters capability boundary declared in .ai/conte
|
|
|
49
49
|
- Architecture domain: `runtime-harness`
|
|
50
50
|
- Architecture capability: `hook-adapters`
|
|
51
51
|
- Architecture module: `docs/architecture/modules/runtime-harness/hook-adapters.md`
|
|
52
|
-
- Last architecture event: 2026-
|
|
53
|
-
- Last changed path: `
|
|
54
|
-
- Severity:
|
|
55
|
-
- Change type:
|
|
52
|
+
- Last architecture event: 2026-08-05T00:46:12+0800
|
|
53
|
+
- Last changed path: `tasks/workstreams/runtime-harness/hook-adapters/github-issues-158-159.md`
|
|
54
|
+
- Severity: medium
|
|
55
|
+
- Change type: workstream-sync
|
|
56
56
|
- Module responsibility: Keep this block aligned with the local boundary described by surrounding human-owned context.
|
|
57
57
|
- Entrypoints: `src/cli/hook`
|
|
58
58
|
- Allowed dependencies: Follow root `AGENTS.md` / `CLAUDE.md` and this local contract.
|
|
@@ -67,7 +67,10 @@ Owns the runtime-harness-hook-adapters capability boundary declared in .ai/conte
|
|
|
67
67
|
|
|
68
68
|
## Active Workstreams
|
|
69
69
|
|
|
70
|
-
-
|
|
70
|
+
- `tasks/workstreams/runtime-harness/hook-adapters/github-issues-158-159.md`
|
|
71
|
+
- status: completed
|
|
72
|
+
- current_slice: completed-20260805-contract-scoped-check-repair
|
|
73
|
+
- source_plan: plans/plan-20260805-0001-github-issues-158-159.md
|
|
71
74
|
|
|
72
75
|
## Current Session Projection
|
|
73
76
|
|
package/assets/hooks/CLAUDE.md
CHANGED
|
@@ -49,10 +49,10 @@ Owns the runtime-harness-hook-adapters capability boundary declared in .ai/conte
|
|
|
49
49
|
- Architecture domain: `runtime-harness`
|
|
50
50
|
- Architecture capability: `hook-adapters`
|
|
51
51
|
- Architecture module: `docs/architecture/modules/runtime-harness/hook-adapters.md`
|
|
52
|
-
- Last architecture event: 2026-
|
|
53
|
-
- Last changed path: `
|
|
54
|
-
- Severity:
|
|
55
|
-
- Change type:
|
|
52
|
+
- Last architecture event: 2026-08-05T00:46:12+0800
|
|
53
|
+
- Last changed path: `tasks/workstreams/runtime-harness/hook-adapters/github-issues-158-159.md`
|
|
54
|
+
- Severity: medium
|
|
55
|
+
- Change type: workstream-sync
|
|
56
56
|
- Module responsibility: Keep this block aligned with the local boundary described by surrounding human-owned context.
|
|
57
57
|
- Entrypoints: `src/cli/hook`
|
|
58
58
|
- Allowed dependencies: Follow root `AGENTS.md` / `CLAUDE.md` and this local contract.
|
|
@@ -67,7 +67,10 @@ Owns the runtime-harness-hook-adapters capability boundary declared in .ai/conte
|
|
|
67
67
|
|
|
68
68
|
## Active Workstreams
|
|
69
69
|
|
|
70
|
-
-
|
|
70
|
+
- `tasks/workstreams/runtime-harness/hook-adapters/github-issues-158-159.md`
|
|
71
|
+
- status: completed
|
|
72
|
+
- current_slice: completed-20260805-contract-scoped-check-repair
|
|
73
|
+
- source_plan: plans/plan-20260805-0001-github-issues-158-159.md
|
|
71
74
|
|
|
72
75
|
## Current Session Projection
|
|
73
76
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
set -euo pipefail
|
|
3
3
|
|
|
4
4
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
5
|
-
VERIFICATION_BUDGET_MS=
|
|
5
|
+
VERIFICATION_BUDGET_MS=1200000
|
|
6
6
|
|
|
7
7
|
# Delegate evidence_requirements parsing to the one shared lib function
|
|
8
8
|
# (workflow_contract_evidence_requirement) instead of re-implementing a second
|
|
@@ -521,6 +521,38 @@ is_evidence_producer_command() {
|
|
|
521
521
|
return 1
|
|
522
522
|
}
|
|
523
523
|
|
|
524
|
+
# Bounded runner logs live in the round's mktemp dir, which the EXIT trap
|
|
525
|
+
# destroys, so a failing criterion leaves only its exit_code in the report and
|
|
526
|
+
# nothing that names WHICH test or command failed. Retain the log of a failing
|
|
527
|
+
# criterion next to the run snapshot that shares this round's run id. Passing
|
|
528
|
+
# criteria retain nothing: green rounds would otherwise fill runs/ with
|
|
529
|
+
# multi-MB logs nobody reads.
|
|
530
|
+
FAILURE_LOG_DIR=".ai/harness/runs"
|
|
531
|
+
|
|
532
|
+
# Deterministic, filesystem-safe slug for a criterion (a test path or a whole
|
|
533
|
+
# shell command), bounded in length so a long command line cannot produce an
|
|
534
|
+
# unusable filename.
|
|
535
|
+
criterion_slug() {
|
|
536
|
+
local slug
|
|
537
|
+
slug="$(printf '%s' "$1" | tr -C 'A-Za-z0-9._-' '-' | sed -E 's/-+/-/g; s/^-//; s/-$//')"
|
|
538
|
+
slug="${slug:-criterion}"
|
|
539
|
+
printf '%s' "${slug:0:80}"
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
# Diagnostic only: a retention failure is reported but never changes the
|
|
543
|
+
# round's verdict, since losing a log must not turn a passing round red.
|
|
544
|
+
retain_failure_log() {
|
|
545
|
+
local log_path="$1" criterion="$2" retained
|
|
546
|
+
|
|
547
|
+
[[ -f "$log_path" ]] || return 0
|
|
548
|
+
retained="$FAILURE_LOG_DIR/${run_id}-$(criterion_slug "$criterion").log"
|
|
549
|
+
if ! mkdir -p "$FAILURE_LOG_DIR" 2>/dev/null || ! cp "$log_path" "$retained" 2>/dev/null; then
|
|
550
|
+
echo "[ContractVerify] WARN: could not retain failure log for: $criterion" >&2
|
|
551
|
+
return 0
|
|
552
|
+
fi
|
|
553
|
+
log_check "LOG" "retained failure log: $retained"
|
|
554
|
+
}
|
|
555
|
+
|
|
524
556
|
run_bounded() {
|
|
525
557
|
local log_path="$1" result_path="$2"
|
|
526
558
|
shift 2
|
|
@@ -950,6 +982,7 @@ if ((${#tests_pass[@]})); then
|
|
|
950
982
|
record_timed_result "tests_pass" "$path" true "tests_pass: $path (${bounded_duration}ms)" "$bounded_duration" false 0 "$bounded_signal"
|
|
951
983
|
else
|
|
952
984
|
record_timed_result "tests_pass" "$path" false "tests_pass: $path (${bounded_duration}ms, exit=$bounded_exit)" "$bounded_duration" "$bounded_timed_out" "$bounded_exit" "$bounded_signal"
|
|
985
|
+
retain_failure_log "$log_path" "$path"
|
|
953
986
|
fi
|
|
954
987
|
test_index=$((test_index + 1))
|
|
955
988
|
if [[ "$bounded_timed_out" == "true" ]]; then
|
|
@@ -987,6 +1020,7 @@ if ((${#commands_succeed[@]})) && [[ "$verification_budget_exhausted" -eq 0 ]];
|
|
|
987
1020
|
record_timed_result "commands_succeed" "$cmd" true "commands_succeed: $cmd (${bounded_duration}ms)" "$bounded_duration" false 0 "$bounded_signal"
|
|
988
1021
|
else
|
|
989
1022
|
record_timed_result "commands_succeed" "$cmd" false "commands_succeed: $cmd (${bounded_duration}ms, exit=$bounded_exit)" "$bounded_duration" "$bounded_timed_out" "$bounded_exit" "$bounded_signal"
|
|
1023
|
+
retain_failure_log "$log_path" "$cmd"
|
|
990
1024
|
fi
|
|
991
1025
|
command_index=$((command_index + 1))
|
|
992
1026
|
if [[ "$bounded_timed_out" == "true" ]]; then
|
|
@@ -424,24 +424,24 @@ allowed_paths_check_json() {
|
|
|
424
424
|
# the ledger yet, so skipping emission here satisfies nothing and changes no
|
|
425
425
|
# verify-run semantics.
|
|
426
426
|
#
|
|
427
|
-
#
|
|
428
|
-
#
|
|
429
|
-
#
|
|
430
|
-
#
|
|
431
|
-
#
|
|
432
|
-
# context (e.g. an adopted repo, or these fixture-based helper tests) has no
|
|
433
|
-
# src/ tree at all, so when neither resolves this is indistinguishable from
|
|
434
|
-
# "cannot bind" -- treated the same way (skip, do not fail).
|
|
427
|
+
# The package runner executes this helper from assets/templates/helpers while
|
|
428
|
+
# the authoritative emitter ships under scripts/. Direct source-helper runs
|
|
429
|
+
# already find the emitter as a sibling. REPO_HARNESS_SOURCE_ROOT remains the
|
|
430
|
+
# explicit source-checkout override used by the other source-authority calls.
|
|
431
|
+
# When none resolves, emission still fails closed as "cannot bind".
|
|
435
432
|
emit_verify_evidence() {
|
|
436
433
|
local command_line="$1"
|
|
437
434
|
local run_trace_file="$2"
|
|
438
435
|
local status="${3:-pass}"
|
|
439
436
|
local emit_script="$helper_dir/emit-verify-evidence.ts"
|
|
437
|
+
local package_emit_script="$helper_dir/../../../scripts/emit-verify-evidence.ts"
|
|
440
438
|
if [[ ! -f "$emit_script" ]]; then
|
|
441
|
-
if [[ -
|
|
439
|
+
if [[ -f "$package_emit_script" ]]; then
|
|
440
|
+
emit_script="$package_emit_script"
|
|
441
|
+
elif [[ -n "${REPO_HARNESS_SOURCE_ROOT:-}" && -f "${REPO_HARNESS_SOURCE_ROOT}/scripts/emit-verify-evidence.ts" ]]; then
|
|
442
442
|
emit_script="${REPO_HARNESS_SOURCE_ROOT}/scripts/emit-verify-evidence.ts"
|
|
443
443
|
else
|
|
444
|
-
echo "verify-sprint: evidence emission cannot bind: no $helper_dir/emit-verify-evidence.ts and no usable REPO_HARNESS_SOURCE_ROOT
|
|
444
|
+
echo "verify-sprint: evidence emission cannot bind: no $helper_dir/emit-verify-evidence.ts, no $package_emit_script, and no usable REPO_HARNESS_SOURCE_ROOT override; skipping emission, verify result unchanged" >&2
|
|
445
445
|
return 3
|
|
446
446
|
fi
|
|
447
447
|
fi
|