harness-everything 1.2.2 → 1.3.1

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.
Files changed (147) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +29 -0
  4. package/ci/archive/325-prep/README.md +9 -2
  5. package/ci/archive/325-prep/doc-reconciliation-red.js +34 -8
  6. package/ci/fixtures/468-dispatch/agy-quota-PROVENANCE.md +19 -0
  7. package/ci/fixtures/468-dispatch/agy-quota-direct-individual.stderr +2 -0
  8. package/ci/fixtures/468-dispatch/agy-quota-direct-third-party.stderr +2 -0
  9. package/ci/fixtures/468-dispatch/agy-quota-exec-individual.log +3 -0
  10. package/ci/fixtures/553-t2a/body-edit/base/.agents/harness-everything/project-docs.json +11 -0
  11. package/ci/fixtures/553-t2a/body-edit/base/docs/a.md +6 -0
  12. package/ci/fixtures/553-t2a/body-edit/base/docs/b.md +1 -0
  13. package/ci/fixtures/553-t2a/body-edit/candidate/docs/a.md +6 -0
  14. package/ci/fixtures/553-t2c/derived-regenerate-must/base/docs/adr/EVID-001-verify-all-evidence.md +11 -0
  15. package/ci/fixtures/553-t2c/derived-regenerate-must/base/docs/governed-index.md +19 -0
  16. package/ci/fixtures/553-t2c/derived-regenerate-must/candidate/docs/adr/EVID-001-verify-all-evidence.md +11 -0
  17. package/ci/fixtures/553-t2c/derived-regenerate-must/candidate/docs/governed-index.md +19 -0
  18. package/ci/fixtures/553-t2c/derived-regenerate-must/config.json +17 -0
  19. package/ci/fixtures/doc-obligations/derive/regression-pins.json +153 -0
  20. package/ci/fixtures/state-persist-post-tool-use/harness.js +206 -0
  21. package/ci/fixtures/state-persist-post-tool-use/off-handoff-golden.json +16 -0
  22. package/ci/fixtures/state-persist-post-tool-use/payload-post-tool-use-success.json +13 -0
  23. package/ci/fixtures/stop/fail-session-writes.js +109 -0
  24. package/ci/fixtures/workflow-contract/cases.json +3355 -0
  25. package/ci/fixtures/workflow-contract/wiring-cases.json +560 -0
  26. package/ci/lib/doc-reconciliation-prep-fixtures.js +4 -9
  27. package/ci/mechanism-2an-workflow-replay.test.js +324 -0
  28. package/ci/mechanism-2ax-doc-lifecycle.test.js +132 -0
  29. package/ci/mechanism-325-3a-doc-evidence.test.js +73 -0
  30. package/ci/mechanism-325-3a-doc-obligations.test.js +61 -0
  31. package/ci/mechanism-325-3b-preparation.test.js +208 -49
  32. package/ci/mechanism-325-3b-s1-review.test.js +20 -828
  33. package/ci/mechanism-325-3b-s3-providers.test.js +59 -0
  34. package/ci/mechanism-325-f3-derived-views.test.js +140 -0
  35. package/ci/mechanism-341-opencode-lane.test.js +164 -284
  36. package/ci/mechanism-35-verification-contract.test.js +246 -0
  37. package/ci/mechanism-365-step-edit-accounting.test.js +5 -6
  38. package/ci/mechanism-383-doc-glob-line-terminators.test.js +0 -30
  39. package/ci/mechanism-397-opencode-observations.test.js +151 -18
  40. package/ci/mechanism-468-dispatch-cli.test.js +1496 -4
  41. package/ci/mechanism-548-bigint-identity.test.js +531 -0
  42. package/ci/mechanism-553-e1-unhook-credit.test.js +328 -0
  43. package/ci/mechanism-553-p2a-claude-hooks.test.js +98 -0
  44. package/ci/mechanism-553-p3-plan-start.test.js +212 -0
  45. package/ci/mechanism-553-state-persist-post-tool-use.test.js +307 -0
  46. package/ci/mechanism-553-stop.test.js +427 -0
  47. package/ci/mechanism-553-t2a-derive.test.js +110 -0
  48. package/ci/mechanism-553-t2c-derive.test.js +94 -0
  49. package/ci/mechanism-e1-derived-regenerate.test.js +45 -206
  50. package/ci/mechanism-error-ledger-oracle.test.js +786 -3
  51. package/ci/mechanism-error-ledger-scan.test.js +981 -0
  52. package/ci/mechanism-outline-sanitizer.test.js +0 -8
  53. package/ci/mechanism-pr-a-conflict-check.test.js +38 -305
  54. package/ci/mechanism-prb-outline-review.test.js +101 -3283
  55. package/ci/mechanism-report-writer.test.js +45 -0
  56. package/docs/adr/DOCS-006-reconciliation-pilot.md +4 -2
  57. package/docs/adr/DOCS-008-obligation-abstraction-bounded-consumer.md +3 -3
  58. package/docs/doc-workflow-reconciliation.md +17 -2
  59. package/docs/document-lifecycle.md +6 -2
  60. package/docs/error-handling/details/c8-dispatch-cli.md +109 -13
  61. package/docs/platform-capabilities.md +35 -5
  62. package/error-ledger-bootstrap/SKILL.md +1 -1
  63. package/error-ledger-bootstrap/references/workflow.md +42 -7
  64. package/error-ledger-bootstrap/scripts/promote.js +8 -6
  65. package/error-ledger-bootstrap/scripts/scan.js +525 -12
  66. package/hooks/hooks.json +0 -46
  67. package/hooks/scripts/lib/workflow-obligations.js +0 -55
  68. package/hooks/scripts/state-persist.js +7 -95
  69. package/hooks/scripts/workflow-disposition.js +0 -2
  70. package/hooks/scripts/workflow-stop-gate.js +17 -30
  71. package/opencode-plugin/index.mjs +6 -70
  72. package/opencode-plugin/plugin.json +1 -1
  73. package/package.json +1 -1
  74. package/plugins/harness-everything/.antigravity-plugin/plugin.json +1 -1
  75. package/plugins/harness-everything/.codex-plugin/plugin.json +1 -1
  76. package/plugins/harness-everything/hooks/scripts/lib/workflow-obligations.js +0 -55
  77. package/plugins/harness-everything/hooks/scripts/state-persist.js +7 -95
  78. package/plugins/harness-everything/hooks/scripts/workflow-disposition.js +0 -2
  79. package/plugins/harness-everything/hooks/scripts/workflow-stop-gate.js +17 -30
  80. package/plugins/harness-everything/plugin.json +1 -1
  81. package/plugins/harness-everything/skills/error-ledger-bootstrap/SKILL.md +1 -1
  82. package/plugins/harness-everything/skills/error-ledger-bootstrap/references/workflow.md +42 -7
  83. package/plugins/harness-everything/skills/error-ledger-bootstrap/scripts/promote.js +8 -6
  84. package/plugins/harness-everything/skills/error-ledger-bootstrap/scripts/scan.js +525 -12
  85. package/sbom.cdx.json +7 -7
  86. package/scripts/dispatch.js +499 -87
  87. package/scripts/error-ledger-oracle.js +521 -27
  88. package/scripts/errors-sync.js +4 -3
  89. package/scripts/report-writer.js +4 -3
  90. package/ci/fixtures/doc-obligations/reconciliation-s1/cases.json +0 -6854
  91. package/ci/fixtures/doc-obligations/reconciliation-s1/fail-session-writes.js +0 -116
  92. package/ci/fixtures/doc-obligations/reconciliation-s2a/harness.js +0 -507
  93. package/ci/fixtures/doc-obligations/reconciliation-s2a/run13-workflow-requirements.json +0 -42
  94. package/ci/fixtures/doc-obligations/reconciliation-s2a/vectors.json +0 -617
  95. package/ci/fixtures/doc-obligations/reconciliation-s2b/capture/harness.js +0 -415
  96. package/ci/fixtures/doc-obligations/reconciliation-s2b/capture/payload-post-tool-use-success-minimal.json +0 -9
  97. package/ci/fixtures/doc-obligations/reconciliation-s2b/capture/payload-subagent-start.json +0 -7
  98. package/ci/fixtures/doc-obligations/reconciliation-s2b/capture/payload-subagent-stop-freetext-reject.json +0 -11
  99. package/ci/fixtures/doc-obligations/reconciliation-s2b/capture/payload-subagent-stop-reject.json +0 -11
  100. package/ci/fixtures/doc-obligations/reconciliation-s2b/capture/payload-subagent-stop.json +0 -11
  101. package/ci/fixtures/doc-obligations/reconciliation-s2b/capture/payload-task-result.json +0 -19
  102. package/ci/fixtures/doc-obligations/reconciliation-s2b/corpus/off-capture-only.json +0 -99
  103. package/ci/fixtures/doc-obligations/reconciliation-s2b/corpus/off-legacy.json +0 -67
  104. package/ci/fixtures/doc-obligations/reconciliation-s2b/corpus/on-concurrent-writers.json +0 -62
  105. package/ci/fixtures/doc-obligations/reconciliation-s2b/corpus/on-lookalikes-runtime-mutations.json +0 -67
  106. package/ci/fixtures/doc-obligations/reconciliation-s2b/corpus/on-malformed.json +0 -85
  107. package/ci/fixtures/doc-obligations/reconciliation-s2b/corpus/on-normal-session.json +0 -74
  108. package/ci/fixtures/doc-obligations/reconciliation-s2b/corpus/on-runtime-drift-later-npm-test.json +0 -58
  109. package/ci/fixtures/doc-obligations/reconciliation-s2b/corpus/on-valid-direct-quoted-review.json +0 -85
  110. package/ci/fixtures/doc-obligations/reconciliation-s2b/f4/cases.json +0 -2267
  111. package/ci/fixtures/doc-obligations/reconciliation-s2b/wiring/cases.json +0 -1110
  112. package/ci/lib/doc-reconciliation-file-spy.js +0 -23
  113. package/ci/lib/doc-reconciliation-qualification-preload.js +0 -37
  114. package/ci/lib/doc-reconciliation-replay.js +0 -104
  115. package/ci/lib/doc-reconciliation-staged-tree.js +0 -102
  116. package/ci/mechanism-325-3b-h1-qualification.test.js +0 -206
  117. package/ci/mechanism-325-3b-s1.test.js +0 -188
  118. package/ci/mechanism-325-3b-s2a-core.test.js +0 -840
  119. package/ci/mechanism-325-3b-s2a-producer.test.js +0 -564
  120. package/ci/mechanism-325-3b-s2b-capture.test.js +0 -566
  121. package/ci/mechanism-325-3b-s2b-wiring.test.js +0 -679
  122. package/ci/mechanism-325-f4-invariants.test.js +0 -606
  123. package/ci/mechanism-325-f4-projections.test.js +0 -392
  124. package/ci/mechanism-325-f4-qualification.test.js +0 -228
  125. package/ci/mechanism-325-f4-trust-boundary.test.js +0 -880
  126. package/ci/mechanism-e1-dependency-artifact-scope.test.js +0 -657
  127. package/hooks/scripts/lib/doc-reconciliation-capture.sanitized.jsonl +0 -26
  128. package/hooks/scripts/lib/doc-reconciliation-core.js +0 -336
  129. package/hooks/scripts/lib/doc-reconciliation-events.js +0 -292
  130. package/hooks/scripts/lib/doc-reconciliation-outline-capture.sanitized.jsonl +0 -24
  131. package/hooks/scripts/lib/doc-reconciliation-pilot.js +0 -482
  132. package/hooks/scripts/lib/doc-reconciliation-producer.js +0 -468
  133. package/hooks/scripts/lib/doc-reconciliation-provider.js +0 -3304
  134. package/hooks/scripts/lib/doc-reconciliation-qualification.json +0 -54
  135. package/hooks/scripts/w6-state-operations.js +0 -239
  136. package/plugins/harness-everything/hooks/scripts/lib/doc-reconciliation-capture.sanitized.jsonl +0 -26
  137. package/plugins/harness-everything/hooks/scripts/lib/doc-reconciliation-core.js +0 -336
  138. package/plugins/harness-everything/hooks/scripts/lib/doc-reconciliation-events.js +0 -292
  139. package/plugins/harness-everything/hooks/scripts/lib/doc-reconciliation-outline-capture.sanitized.jsonl +0 -24
  140. package/plugins/harness-everything/hooks/scripts/lib/doc-reconciliation-pilot.js +0 -482
  141. package/plugins/harness-everything/hooks/scripts/lib/doc-reconciliation-producer.js +0 -468
  142. package/plugins/harness-everything/hooks/scripts/lib/doc-reconciliation-provider.js +0 -3304
  143. package/plugins/harness-everything/hooks/scripts/lib/doc-reconciliation-qualification.json +0 -54
  144. package/plugins/harness-everything/hooks/scripts/w6-state-operations.js +0 -239
  145. package/scripts/system-one-eval-laya.js +0 -112
  146. /package/ci/fixtures/{doc-obligations/reconciliation-s2b/capture → state-persist-post-tool-use}/payload-post-tool-use-failure.json +0 -0
  147. /package/ci/fixtures/{doc-obligations/reconciliation-s2b/wiring → workflow-contract}/legacy-off-golden.json +0 -0
@@ -10,7 +10,7 @@
10
10
  "name": "harness-everything",
11
11
  "source": "./",
12
12
  "description": "Harness OS: an orchestrated agent operating system — tier routing, circuit breaker guardrails, verification gates, WAL session memory, and self-evolving workspace rules.",
13
- "version": "1.2.2",
13
+ "version": "1.3.1",
14
14
  "author": {
15
15
  "name": "Miya Daniel"
16
16
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "harness-everything",
3
3
  "description": "Harness OS: an orchestrated agent operating system — tier routing, circuit breaker guardrails, verification gates, WAL session memory, and self-evolving workspace rules.",
4
- "version": "1.2.2",
4
+ "version": "1.3.1",
5
5
  "author": {
6
6
  "name": "Miya Daniel"
7
7
  },
package/CHANGELOG.md CHANGED
@@ -2,6 +2,31 @@
2
2
 
3
3
  All notable changes to this project are documented in this file.
4
4
 
5
+ ## [1.3.1](https://github.com/dyphn1/Harness-everything/compare/v1.3.0...v1.3.1) (2026-11-28)
6
+
7
+ ## [1.3.0](https://github.com/dyphn1/Harness-everything/compare/v1.2.2...v1.3.0) (2026-11-26)
8
+
9
+ ### Features
10
+
11
+ * **dispatch:** agy runner adapter for c8 ([c4bf60c](https://github.com/dyphn1/Harness-everything/commit/c4bf60c91380a67eea88070e67c1409e9dc33c5c)), closes [#466](https://github.com/dyphn1/Harness-everything/issues/466)
12
+ * **dispatch:** managed c8 gate assignment refuses sandboxed verify:all ([a7365bf](https://github.com/dyphn1/Harness-everything/commit/a7365bf189bb4823ef74424ee3db260c840a22bd)), closes [#466](https://github.com/dyphn1/Harness-everything/issues/466)
13
+ * **dispatch:** managed c8 per-attempt tmpdir with evidence retention ([37d070e](https://github.com/dyphn1/Harness-everything/commit/37d070e081d31b8e5bd5431d1c78b83326266494)), closes [#466](https://github.com/dyphn1/Harness-everything/issues/466)
14
+ * **dispatch:** per-pool admission cap for managed c8 ([c30a506](https://github.com/dyphn1/Harness-everything/commit/c30a5068d72b2f029ebf3263c005ab15fa3d9c5f)), closes [#466](https://github.com/dyphn1/Harness-everything/issues/466)
15
+ * **error-ledger-bootstrap:** classify memory lessons by feedback metadata and cues ([ec57a8e](https://github.com/dyphn1/Harness-everything/commit/ec57a8e2ae9339f007881044e82fd4e5e973855a)), closes [#486](https://github.com/dyphn1/Harness-everything/issues/486)
16
+ * **error-ledger-bootstrap:** discover claude memory via the memory index and main worktree ([406a85c](https://github.com/dyphn1/Harness-everything/commit/406a85c2c61fd081a8030276ac383b984453824b)), closes [#486](https://github.com/dyphn1/Harness-everything/issues/486)
17
+ * **error-ledger-bootstrap:** verified tracked-file sites for memory leads ([758bf98](https://github.com/dyphn1/Harness-everything/commit/758bf98ed4a6e042762646cc4e48f13835c78eee)), closes [#486](https://github.com/dyphn1/Harness-everything/issues/486)
18
+ * **error-ledger-oracle:** optional digest-bound labels for candidate precision ([5fe332e](https://github.com/dyphn1/Harness-everything/commit/5fe332e20d654258294b40d12bd09c71cfef1010)), closes [#484](https://github.com/dyphn1/Harness-everything/issues/484)
19
+ * **error-ledger-oracle:** process view with exact signature links ([3d499c6](https://github.com/dyphn1/Harness-everything/commit/3d499c6c56a7347f638c29cb44adac29ccca0381)), closes [#484](https://github.com/dyphn1/Harness-everything/issues/484) [#485](https://github.com/dyphn1/Harness-everything/issues/485)
20
+
21
+ ### Bug Fixes
22
+
23
+ * **dispatch:** classify the live agy quota pair as runner quota ([af1b510](https://github.com/dyphn1/Harness-everything/commit/af1b510450bcc58841f7925716b512379f4d1610)), closes [#544](https://github.com/dyphn1/Harness-everything/issues/544)
24
+ * **dispatch:** treat stale admission slots as occupied and harden c8 path checks ([3d5d615](https://github.com/dyphn1/Harness-everything/commit/3d5d615433e87fe67a5d90c4e6fd921b76b10ed0)), closes [#466](https://github.com/dyphn1/Harness-everything/issues/466)
25
+ * **error-ledger-bootstrap:** empty typed metadata and wrapped-suffix memory sites ([40d4cee](https://github.com/dyphn1/Harness-everything/commit/40d4cee504167637c74f8d888630edb42e41976e)), closes [#486](https://github.com/dyphn1/Harness-everything/issues/486)
26
+ * **report:** accept trailing ascii whitespace on raw codex status line ([d0c81a2](https://github.com/dyphn1/Harness-everything/commit/d0c81a208fe660f416c4ccfb4e5b6a1cb2979619)), closes [#498](https://github.com/dyphn1/Harness-everything/issues/498) [#437](https://github.com/dyphn1/Harness-everything/issues/437) [#441](https://github.com/dyphn1/Harness-everything/issues/441)
27
+ * **report:** keep alias rejection when the inode is zero ([3c31063](https://github.com/dyphn1/Harness-everything/commit/3c31063d62c53bbc4df192e996c25a4b85ac052c)), closes [#548](https://github.com/dyphn1/Harness-everything/issues/548)
28
+ * **windows:** compare file identities with bigint stats ([d3cd874](https://github.com/dyphn1/Harness-everything/commit/d3cd874b5a7984f63260150fc7b274ca94aadda8)), closes [#548](https://github.com/dyphn1/Harness-everything/issues/548)
29
+
5
30
  ## [1.2.2](https://github.com/dyphn1/Harness-everything/compare/v1.2.1...v1.2.2) (2026-11-26)
6
31
 
7
32
  ### Bug Fixes
@@ -271,6 +296,10 @@ Claude-Session: https://claude.ai/code/session_01RPz4xUrN12wGoL19istZUE
271
296
 
272
297
  ## [Unreleased]
273
298
 
299
+ ### E1 pilot retirement
300
+
301
+ * **e1:** the E1 doc-reconciliation pilot is retired (#553). Its runtime modules and the W6 `inventory`/`seal` CLI (`hooks/scripts/w6-state-operations.js`) have been removed, and every `HARNESS_DOC_RECONCILIATION_PILOT` value is now ignored. Finish in-flight E1 work on the previous release, or end it and open a new session to redo review and verification. Recorded evidence stays in place; `doc-check` and document governance are unchanged.
302
+
274
303
  ### BREAKING CHANGES
275
304
 
276
305
  * **opencode:** support OpenCode V2 plugin API only; OpenCode 1.x / V1 is unsupported (#453). Removed the public `HarnessEnforcement` named V1 factory export, host `session.idle`, and legacy session-id event fallbacks; the V2 default export (`{ id, setup(ctx) }`) is now the only public surface. Historical OpenCode 1.18.31 evidence is retained for provenance only and does not establish V2 support.
@@ -4,7 +4,8 @@ Historical evidence only. Nothing here is a GREEN gate.
4
4
 
5
5
  - **Not discovered:** `ci/mechanism-test.js` runs only top-level `ci/mechanism-*.test.js`, so nothing in this directory runs in `npm run test:mechanism`.
6
6
  - **Owner clause (T2, 2026-10-22):** "only archive the prep fingerprint and the RED-plan gates as historical evidence, and tag tests with `locks: <anchor clause>`. List the unmapped tests, but don't delete them."
7
- - **Revision of the historical results:** `0308386058ad942e2764475d48fd65a013910e1e`. The registry was captured at `c271249a8a99d7e0320288af8cb086bb03f8fa1a`.
7
+ - **Original replay SHA (historical results):** `0308386058ad942e2764475d48fd65a013910e1e`. The registry was captured at `c271249a8a99d7e0320288af8cb086bb03f8fa1a`.
8
+ - **T2 source-trace SHA:** `360183f49fe3e41f454cebf8671c0dc15a4d4797` (the original runner was confirmed to stop before replay when the pilot fingerprint file was missing).
8
9
 
9
10
  ## Manifest
10
11
 
@@ -24,7 +25,7 @@ Code changes against the original runner (sha256 `5e85af19…7849c`) are limited
24
25
  - The fixtures `require` path is `../../lib/doc-reconciliation-prep-fixtures`.
25
26
  - The printed re-capture command names `ci/archive/325-prep/doc-reconciliation-red.js`.
26
27
 
27
- The header comment also gained an archive note. Logic, the registry path and the fingerprint files are unchanged.
28
+ The header comment also gained an archive note. At the original relocation, logic, registry path and fingerprint files were unchanged; the later T2-P compatibility adjustment is documented below.
28
29
 
29
30
  ## Commands
30
31
 
@@ -39,6 +40,12 @@ node ci/archive/325-prep/historical-qualification.test.js # 4 FAIL, 6 P
39
40
  - `ci/mechanism-325-3b-preparation.test.js` still runs the archived runner, but only for its infrastructure path (exit 2, child deadline, output bound). Those checks are live.
40
41
  - The live suite no longer reads the registry for qualification.
41
42
 
43
+ ### Archived runner compatibility after pilot retirement
44
+
45
+ The archive fingerprint still covers the three surviving workflow files and the historical pilot file. If and only if `hooks/scripts/lib/doc-reconciliation-pilot.js` is missing with `ENOENT`, the runner reports `runtimeFingerprintAvailable: false` and continues through the real replay and infrastructure classifier. An infrastructure result remains infrastructure; every non-infrastructure result fails with zero qualified gaps. This unavailable state does not print a recapture command, and candidate recapture is refused. Missing or unreadable files elsewhere retain the original infrastructure-error behavior. The live scratch-tree regression removes the source and packaged pilot files and exercises real source/package Stop-gate subprocesses without runtime stubs.
46
+
47
+ This compatibility path keeps the archived infrastructure checks runnable after R2 removes the pilot module. It does not restore qualification as a live GREEN gate or change the recorded historical registry, hashes, fixture, or results.
48
+
42
49
  ## Coordinator disposition (pending)
43
50
 
44
51
  The WA pending-probe gate (`P-ignore-missing-expected-must`, WA report 28–30) is superseded for WB by the coordinator's disposition. The coordinator records that disposition. It is not recorded here.
@@ -37,11 +37,13 @@ const ENTRY_KEYS = ['caseId', 'assertionId', 'distribution', 'baselineSha', 'act
37
37
  // Shared runtime files whose bytes define what the registry describes. Every P01-P08 replay loads the first
38
38
  // three (verified by a preload probe, see h3.md). doc-evidence.js is not loaded by any replay, so it is excluded:
39
39
  // #341 0B refactors it, and including it would turn this suite red for an unrelated reason.
40
+ // R2 retires the pilot module; only its absence is tolerated by this historical runner.
41
+ const RETIRED_PILOT_FINGERPRINT_FILE = 'hooks/scripts/lib/doc-reconciliation-pilot.js';
40
42
  const FINGERPRINT_FILES = [
41
43
  'hooks/scripts/lib/workflow-obligations.js',
42
44
  'hooks/scripts/workflow-disposition.js',
43
45
  'hooks/scripts/workflow-stop-gate.js',
44
- 'hooks/scripts/lib/doc-reconciliation-pilot.js'
46
+ RETIRED_PILOT_FINGERPRINT_FILE
45
47
  ];
46
48
  const CANDIDATE_FILE = 'ci/fixtures/doc-obligations/reconciliation-prep/pending-red.candidate.json';
47
49
  const UNREVIEWED_REASON = 'needs-reason';
@@ -50,12 +52,23 @@ class RegistryError extends Error {}
50
52
 
51
53
  function fingerprint() {
52
54
  const hash = crypto.createHash('sha256');
55
+ let unavailable = false;
53
56
  for (const rel of FINGERPRINT_FILES) {
54
57
  hash.update(`${rel}\0`);
55
- hash.update(fs.readFileSync(path.join(ROOT, rel)));
58
+ let bytes;
59
+ try {
60
+ bytes = fs.readFileSync(path.join(ROOT, rel));
61
+ } catch (error) {
62
+ if (rel === RETIRED_PILOT_FINGERPRINT_FILE && error.code === 'ENOENT') {
63
+ unavailable = true;
64
+ continue;
65
+ }
66
+ throw error;
67
+ }
68
+ hash.update(bytes);
56
69
  hash.update('\0');
57
70
  }
58
- return hash.digest('hex');
71
+ return unavailable ? null : hash.digest('hex');
59
72
  }
60
73
 
61
74
  // Read-only: the commit named in the re-capture command. Falls back to a visible placeholder.
@@ -272,13 +285,16 @@ function run(args) {
272
285
  const registry = loadRegistry(args.registryFile);
273
286
  validateRegistry(registry, corpus);
274
287
  const runtime = fingerprint();
288
+ const runtimeFingerprintAvailable = runtime !== null;
289
+ const runtimeFingerprintMatches = runtimeFingerprintAvailable && registry.runtimeFingerprint === runtime;
275
290
  const cases = corpus.cases.filter(item => args.cases.length === 0 || args.cases.includes(item.id));
276
291
  if (args.cases.length && cases.length !== args.cases.length) throw new RegistryError('a --case names no corpus case');
277
292
  const report = {
278
293
  schemaVersion: 1,
279
294
  mode: args.mode,
280
295
  baselineSha: registry.baselineSha,
281
- runtimeFingerprintMatches: registry.runtimeFingerprint === runtime,
296
+ runtimeFingerprintAvailable,
297
+ runtimeFingerprintMatches,
282
298
  pilotCredit: false,
283
299
  replaysRun: 0,
284
300
  cases: []
@@ -286,8 +302,14 @@ function run(args) {
286
302
  for (const [index, item] of cases.entries()) {
287
303
  const replays = replayAll(item);
288
304
  report.replaysRun += countReplays(replays);
289
- const result = classifyCase(item, replays, registry.entries.filter(entry => entry.caseId === item.id));
290
- if (registry.runtimeFingerprint !== runtime && result.status !== 'INFRASTRUCTURE') {
305
+ const entries = runtimeFingerprintAvailable
306
+ ? registry.entries.filter(entry => entry.caseId === item.id)
307
+ : [];
308
+ const result = classifyCase(item, replays, entries);
309
+ if (!runtimeFingerprintAvailable && result.status !== 'INFRASTRUCTURE') {
310
+ result.status = 'FAIL';
311
+ result.reason = 'runtime fingerprint unavailable because the retired pilot file is missing';
312
+ } else if (!runtimeFingerprintMatches && result.status !== 'INFRASTRUCTURE') {
291
313
  result.status = 'FAIL';
292
314
  result.reason = 'runtime fingerprint differs from the registry capture';
293
315
  }
@@ -298,7 +320,7 @@ function run(args) {
298
320
  break;
299
321
  }
300
322
  }
301
- if (!report.runtimeFingerprintMatches) report.recaptureCommand = recaptureCommand(currentCommit());
323
+ if (runtimeFingerprintAvailable && !runtimeFingerprintMatches) report.recaptureCommand = recaptureCommand(currentCommit());
302
324
  return report;
303
325
  }
304
326
 
@@ -306,6 +328,10 @@ function run(args) {
306
328
  // Reason codes carry over by identity; a gap that is new to the registry gets the unreviewed marker.
307
329
  function recapture(args) {
308
330
  const corpus = fx.readCaseCorpus(args.casesFile);
331
+ const runtimeFingerprint = fingerprint();
332
+ if (runtimeFingerprint === null) {
333
+ throw new RegistryError('runtime fingerprint unavailable because the retired pilot file is missing');
334
+ }
309
335
  const existing = fs.existsSync(args.registryFile) ? loadRegistry(args.registryFile).entries || [] : [];
310
336
  const known = new Map(existing.map(entry => [`${entry.assertionId}|${entry.distribution}`, entry.reasonCode]));
311
337
  const entries = [];
@@ -338,7 +364,7 @@ function recapture(args) {
338
364
  if (problems.length) return { ok: false, problems };
339
365
  return {
340
366
  ok: true,
341
- candidate: { schemaVersion: 1, phase: '325-3b-H2', baselineSha: args.baselineSha, runtimeFingerprint: fingerprint(), entries }
367
+ candidate: { schemaVersion: 1, phase: '325-3b-H2', baselineSha: args.baselineSha, runtimeFingerprint, entries }
342
368
  };
343
369
  }
344
370
 
@@ -0,0 +1,19 @@
1
+ # agy exit-3 quota fixture provenance (I544)
2
+
3
+ The three `agy-quota-*` files are sanitized copies of the live captures in
4
+ `.w/capture/`, recorded 2026-11-26 on macOS with `agy` 1.5.18. The identifier
5
+ and reset duration are redacted; the advice text is retained as captured.
6
+
7
+ | Fixture | Source | Live-backed part | Fixture part |
8
+ | --- | --- | --- | --- |
9
+ | `agy-quota-direct-third-party.stderr` | `.w/capture/direct.sanitized.stderr` | Fresh readiness-equivalent call, quota already exhausted before start: **normal exit 3**, no signal, stdout 0 bytes, exactly these two stderr lines, no report created (2026-11-26 22:52). | Managed readiness wrapper in `ci/mechanism-468-dispatch-cli.test.js`. |
10
+ | `agy-quota-direct-individual.stderr` | `.w/capture/direct-gemini.sanitized.stderr` | Direct `gemini-4-neon-medium` call, individual pool exhausted: **normal exit 3**, no signal, stdout 0 bytes, exactly these two stderr lines, no report (2026-11-26 23:4x). | C8 execution wrapper in `ci/mechanism-468-dispatch-cli.test.js`. |
11
+ | `agy-quota-exec-individual.log` | `.w/capture/exec-individual.sanitized.log` | Managed C8 execution log framing from PR #547 code, `gemini-4-neon-medium`, individual pool: the retained result was **15 RUN_FAILED** (nonzero exit, stderr, no report). | The child exit status is **not** carried by the log. The execution fixture uses this live stderr shape plus a **fixture exit status of 3**. |
12
+
13
+ ## Exit-status boundary
14
+
15
+ Only the two direct calls above establish a live normal exit 3. The managed
16
+ readiness and managed execution rows are derived from those live stderr shapes
17
+ with a fixture exit status. The managed execution fixture is labelled as
18
+ derived until a fresh managed result preserves its original exit status; the
19
+ captured 15 RUN_FAILED result is not retroactively reclassified as exit 3.
@@ -0,0 +1,2 @@
1
+ error: Individual quota reached. Please upgrade your subscription to increase your limits. Resets in <duration>.
2
+ AGY_ERROR: {"short_error":"RESOURCE_EXHAUSTED (code 429): Individual quota reached. Please upgrade your subscription to increase your limits. Resets in <duration>.","status":"RESOURCE_EXHAUSTED","error_code":429,"code_kind":"http","retryable":true,"error_id":"<redacted>"}
@@ -0,0 +1,2 @@
1
+ error: Third-party quota reached. Please switch to Gemini models or upgrade your subscription to increase your limits. Resets in <duration>.
2
+ AGY_ERROR: {"short_error":"RESOURCE_EXHAUSTED (code 429): Third-party quota reached. Please switch to Gemini models or upgrade your subscription to increase your limits. Resets in <duration>.","status":"RESOURCE_EXHAUSTED","error_code":429,"code_kind":"http","retryable":true,"error_id":"<redacted>"}
@@ -0,0 +1,3 @@
1
+ [stderr]
2
+ error: Individual quota reached. Please upgrade your subscription to increase your limits. Resets in <duration>.
3
+ AGY_ERROR: {"short_error":"RESOURCE_EXHAUSTED (code 429): Individual quota reached. Please upgrade your subscription to increase your limits. Resets in <duration>.","status":"RESOURCE_EXHAUSTED","error_code":429,"code_kind":"http","retryable":true,"error_id":"<redacted>"}
@@ -0,0 +1,11 @@
1
+ {
2
+ "governed": [
3
+ {
4
+ "path": "docs/a.md",
5
+ "role": "reference"
6
+ }
7
+ ],
8
+ "domains": [
9
+ "GRPH"
10
+ ]
11
+ }
@@ -0,0 +1,6 @@
1
+ ---
2
+ role: reference
3
+ status: active
4
+ ---
5
+
6
+ The checkout retries once. See [b](b.md).
@@ -0,0 +1,6 @@
1
+ ---
2
+ role: reference
3
+ status: active
4
+ ---
5
+
6
+ The checkout retries twice. See [b](b.md).
@@ -0,0 +1,11 @@
1
+ ---
2
+ id: EVID-001
3
+ role: adr
4
+ status: proposed
5
+ ---
6
+
7
+ # EVID-001
8
+
9
+ ## Decision
10
+
11
+ Baseline evidence identity.
@@ -0,0 +1,19 @@
1
+ # Document lifecycle index
2
+
3
+ ## Active documents
4
+
5
+ - `EVID-001` — `docs/adr/EVID-001-verify-all-evidence.md` (role: adr; status: proposed)
6
+
7
+ ## PRD revision chains
8
+
9
+ _None._
10
+
11
+
12
+ ## Legacy documents
13
+
14
+ _None._
15
+
16
+
17
+ ## Unresolved
18
+
19
+ _None._
@@ -0,0 +1,11 @@
1
+ ---
2
+ id: EVID-001
3
+ role: adr
4
+ status: accepted
5
+ ---
6
+
7
+ # EVID-001
8
+
9
+ ## Decision
10
+
11
+ Candidate evidence identity.
@@ -0,0 +1,19 @@
1
+ # Document lifecycle index
2
+
3
+ ## Active documents
4
+
5
+ - `EVID-001` — `docs/adr/EVID-001-verify-all-evidence.md` (role: adr; status: accepted)
6
+
7
+ ## PRD revision chains
8
+
9
+ _None._
10
+
11
+
12
+ ## Legacy documents
13
+
14
+ _None._
15
+
16
+
17
+ ## Unresolved
18
+
19
+ _None._
@@ -0,0 +1,17 @@
1
+ {
2
+ "governed": [
3
+ {
4
+ "path": "docs/adr/*.md",
5
+ "role": "adr"
6
+ }
7
+ ],
8
+ "domains": [
9
+ "EVID"
10
+ ],
11
+ "derived": [
12
+ {
13
+ "path": "docs/governed-index.md",
14
+ "generator": "node harness-everything/scripts/doc-lifecycle.js index --workspace . --config .agents/harness-everything/project-docs.json --all"
15
+ }
16
+ ]
17
+ }
@@ -0,0 +1,153 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "description": "Fixed regression pins for unchanged deriveDocFacts, deriveDocObligations and checkDocObligations outputs across the four canonical vectors (moved from reconciliation-s2a/vectors.json in #553 T2-D without recapturing digests).",
4
+ "deriveConfig": "ci/fixtures/doc-obligations/derive/config.json",
5
+ "vectors": {
6
+ "normative": {
7
+ "deriveCase": "missing-approval"
8
+ },
9
+ "nonnormative": {
10
+ "deriveCase": "docs-only"
11
+ },
12
+ "code-only": {
13
+ "deriveCase": "code-only"
14
+ },
15
+ "nondocument": {
16
+ "files": {
17
+ "base": {
18
+ "assets/notes.txt": "Release notes draft.\n"
19
+ },
20
+ "candidate": {
21
+ "assets/notes.txt": "Release notes draft, revised.\n"
22
+ }
23
+ }
24
+ }
25
+ },
26
+ "pins": {
27
+ "normative": {
28
+ "deriveFactsSha256": "c78d208ccba00c5e47bd5d72abc595b05f7f340a005da0a14b598cd5c4743437",
29
+ "deriveObligationsSha256": "5ff5fcfe1edaf939a2b8b526b2bff131de1253319f3cbe97b3c4c60f75480deb",
30
+ "checkerResultsSha256": "3a55b457ee4f8eb918fcfeda1f12236e57817d0fd4db185799ffb73b9c162b9a",
31
+ "mustApplicability": [
32
+ [
33
+ "doc-change:doc-lint",
34
+ "applicable"
35
+ ],
36
+ [
37
+ "doc-change:link-check",
38
+ "applicable"
39
+ ],
40
+ [
41
+ "doc-change:derived-regenerate",
42
+ "N/A"
43
+ ],
44
+ [
45
+ "doc-change:quality-review",
46
+ "applicable"
47
+ ],
48
+ [
49
+ "doc-change:conflict-check",
50
+ "applicable"
51
+ ],
52
+ [
53
+ "doc-change:requirement-sync",
54
+ "N/A"
55
+ ]
56
+ ]
57
+ },
58
+ "nonnormative": {
59
+ "deriveFactsSha256": "72659ade94266aa542198aed0ada2dfa243297520f70e40b86b5896592d8a457",
60
+ "deriveObligationsSha256": "ece5929fd7bec6d836312dbc2b90c4c8eabc7f82fc1b49605f7f342b9eb7071d",
61
+ "checkerResultsSha256": "74a20d2e250c40c7dfad7025bfcad080345667e7d558a33f615452c40597854d",
62
+ "mustApplicability": [
63
+ [
64
+ "doc-change:doc-lint",
65
+ "applicable"
66
+ ],
67
+ [
68
+ "doc-change:link-check",
69
+ "applicable"
70
+ ],
71
+ [
72
+ "doc-change:derived-regenerate",
73
+ "N/A"
74
+ ],
75
+ [
76
+ "doc-change:quality-review",
77
+ "N/A"
78
+ ],
79
+ [
80
+ "doc-change:conflict-check",
81
+ "N/A"
82
+ ],
83
+ [
84
+ "doc-change:requirement-sync",
85
+ "N/A"
86
+ ]
87
+ ]
88
+ },
89
+ "code-only": {
90
+ "deriveFactsSha256": "1134fae14ea8f888f12f5dff1bd32b8a2788ba09e91299e7ce3d2a9dc81d0d1f",
91
+ "deriveObligationsSha256": "b8ece9008764bad6e015d99252dd73570164684b768449d89d4ff0de98def44e",
92
+ "checkerResultsSha256": "3080bfcaafb7f330f4d26f4087a60a9a76c7a5154b7581209fc26e365333edcb",
93
+ "mustApplicability": [
94
+ [
95
+ "doc-change:doc-lint",
96
+ "N/A"
97
+ ],
98
+ [
99
+ "doc-change:link-check",
100
+ "N/A"
101
+ ],
102
+ [
103
+ "doc-change:derived-regenerate",
104
+ "N/A"
105
+ ],
106
+ [
107
+ "doc-change:quality-review",
108
+ "N/A"
109
+ ],
110
+ [
111
+ "doc-change:conflict-check",
112
+ "N/A"
113
+ ],
114
+ [
115
+ "doc-change:requirement-sync",
116
+ "unknown"
117
+ ]
118
+ ]
119
+ },
120
+ "nondocument": {
121
+ "deriveFactsSha256": "5ba5a35c74165a94deff0e935799f93b7d5efa1eb554e4fad9717560e0828d43",
122
+ "deriveObligationsSha256": "0cfb1cbd5ebb220a3c174d716dcba67c46b0d58e87bfebf0a930e8e0be9f843b",
123
+ "checkerResultsSha256": "25026cdafe353e58bdc3a74e8b1db6feb1a2f180f9cce04f81527e96d57c251a",
124
+ "mustApplicability": [
125
+ [
126
+ "doc-change:doc-lint",
127
+ "N/A"
128
+ ],
129
+ [
130
+ "doc-change:link-check",
131
+ "N/A"
132
+ ],
133
+ [
134
+ "doc-change:derived-regenerate",
135
+ "N/A"
136
+ ],
137
+ [
138
+ "doc-change:quality-review",
139
+ "N/A"
140
+ ],
141
+ [
142
+ "doc-change:conflict-check",
143
+ "N/A"
144
+ ],
145
+ [
146
+ "doc-change:requirement-sync",
147
+ "N/A"
148
+ ]
149
+ ]
150
+ }
151
+ },
152
+ "pinNote": "sha256 of stable JSON (sorted keys) of the current unchanged outputs; recorded at R2a RED."
153
+ }