harness-everything 0.50.0 → 0.52.0

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 (97) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.github/workflows/ci.yml +23 -0
  4. package/CHANGELOG.md +174 -115
  5. package/benchmarks/results/doc-evidence-e1/cycle-2026-11-11-a-evid-001.md +123 -0
  6. package/benchmarks/results/doc-evidence-e1/cycle-2026-11-11-b-route-001.md +130 -0
  7. package/ci/mechanism-2am-observations-session-import.test.js +4 -1
  8. package/ci/mechanism-34-observations.test.js +127 -23
  9. package/ci/mechanism-349-ci-change-scope.test.js +260 -0
  10. package/ci/mechanism-handoff-file.test.js +121 -0
  11. package/ci/mechanism-prb-outline-review.test.js +783 -107
  12. package/ci/mechanism-system-one-contract.test.js +9 -2
  13. package/ci/mechanism-system-one-curves.test.js +206 -0
  14. package/ci/mechanism-system-one-cycle.test.js +585 -0
  15. package/ci/mechanism-system-one-evaluation.test.js +32 -5
  16. package/ci/mechanism-system-one-handoff-input.test.js +208 -0
  17. package/ci/mechanism-system-one-install.test.js +202 -77
  18. package/ci/mechanism-system-one-live.test.js +361 -0
  19. package/ci/mechanism-system-one-relevance.test.js +11 -1
  20. package/ci/mechanism-system-one-train.test.js +136 -53
  21. package/ci/release-unreleased-heading.test.js +24 -0
  22. package/ci/system-one-adapter-test.py +331 -0
  23. package/ci/system-one-train-test.py +116 -24
  24. package/docs/adr/EVID-001.md +123 -0
  25. package/docs/adr/ROUTE-001-error-lesson-delivery.md +305 -0
  26. package/docs/doc-workflow-reconciliation.md +29 -16
  27. package/docs/governed-index.md +2 -0
  28. package/docs/platform-capabilities.md +2 -0
  29. package/docs/routing.md +2 -2
  30. package/docs/system-one-cycle.md +68 -0
  31. package/docs/system-one-observations.md +9 -8
  32. package/docs/system-one-routing.md +163 -115
  33. package/docs/system-one-suggestion-gates.md +6 -8
  34. package/docs/system-one-training.md +44 -7
  35. package/docs/workflow-runtime.md +19 -0
  36. package/harness-everything/SKILL.md +1 -1
  37. package/harness-everything/scripts/kernel-router.js +2 -1
  38. package/harness-everything/scripts/system-one/contract.js +19 -15
  39. package/harness-everything/scripts/system-one/cua_adapter.py +211 -17
  40. package/harness-everything/scripts/system-one/evaluate.js +4 -9
  41. package/harness-everything/scripts/system-one/handoff-input.js +76 -0
  42. package/harness-everything/scripts/system-one/install.js +281 -113
  43. package/harness-everything/scripts/system-one/manifest.js +58 -0
  44. package/harness-everything/scripts/system-one/provider.js +96 -2
  45. package/harness-everything/scripts/system-one/resident.js +47 -1
  46. package/harness-everything/scripts/system-one/router.js +80 -1
  47. package/harness-everything/scripts/tier-router.js +21 -6
  48. package/hooks/scripts/lib/doc-reconciliation-pilot.js +12 -0
  49. package/hooks/scripts/lib/doc-reconciliation-provider.js +575 -12
  50. package/hooks/scripts/lib/observations.js +43 -4
  51. package/hooks/scripts/lib/workflow-obligations.js +8 -4
  52. package/hooks/scripts/state-persist.js +26 -7
  53. package/hooks/scripts/w6-state-operations.js +239 -0
  54. package/opencode-plugin/plugin.json +1 -1
  55. package/package.json +2 -2
  56. package/plugins/harness-everything/.codex-plugin/plugin.json +1 -1
  57. package/plugins/harness-everything/hooks/scripts/lib/doc-reconciliation-pilot.js +12 -0
  58. package/plugins/harness-everything/hooks/scripts/lib/doc-reconciliation-provider.js +575 -12
  59. package/plugins/harness-everything/hooks/scripts/lib/observations.js +43 -4
  60. package/plugins/harness-everything/hooks/scripts/lib/workflow-obligations.js +8 -4
  61. package/plugins/harness-everything/hooks/scripts/state-persist.js +26 -7
  62. package/plugins/harness-everything/hooks/scripts/w6-state-operations.js +239 -0
  63. package/plugins/harness-everything/plugin.json +1 -1
  64. package/plugins/harness-everything/scripts/handoff-file.js +223 -0
  65. package/plugins/harness-everything/skills/harness-everything/SKILL.md +1 -1
  66. package/plugins/harness-everything/skills/harness-everything/scripts/kernel-router.js +2 -1
  67. package/plugins/harness-everything/skills/harness-everything/scripts/system-one/contract.js +19 -15
  68. package/plugins/harness-everything/skills/harness-everything/scripts/system-one/cua_adapter.py +211 -17
  69. package/plugins/harness-everything/skills/harness-everything/scripts/system-one/evaluate.js +4 -9
  70. package/plugins/harness-everything/skills/harness-everything/scripts/system-one/handoff-input.js +76 -0
  71. package/plugins/harness-everything/skills/harness-everything/scripts/system-one/install.js +281 -113
  72. package/plugins/harness-everything/skills/harness-everything/scripts/system-one/manifest.js +58 -0
  73. package/plugins/harness-everything/skills/harness-everything/scripts/system-one/provider.js +96 -2
  74. package/plugins/harness-everything/skills/harness-everything/scripts/system-one/resident.js +47 -1
  75. package/plugins/harness-everything/skills/harness-everything/scripts/system-one/router.js +80 -1
  76. package/plugins/harness-everything/skills/harness-everything/scripts/tier-router.js +21 -6
  77. package/sbom.cdx.json +7 -7
  78. package/scripts/ci-change-scope.js +59 -0
  79. package/scripts/handoff-file.js +223 -0
  80. package/scripts/sync-openai-plugin.js +4 -0
  81. package/scripts/system-one-calibrate.js +108 -41
  82. package/scripts/system-one-curves.js +332 -0
  83. package/scripts/system-one-cycle/adjudication-input.js +65 -0
  84. package/scripts/system-one-cycle/build.js +165 -0
  85. package/scripts/system-one-cycle/collect.js +50 -0
  86. package/scripts/system-one-cycle/common.js +137 -0
  87. package/scripts/system-one-cycle/engines.js +62 -0
  88. package/scripts/system-one-cycle/evaluate.js +70 -0
  89. package/scripts/system-one-cycle/judge.js +106 -0
  90. package/scripts/system-one-cycle/label.js +59 -0
  91. package/scripts/system-one-cycle/package.js +173 -0
  92. package/scripts/system-one-cycle/score.py +111 -0
  93. package/scripts/system-one-cycle/train.js +136 -0
  94. package/scripts/system-one-cycle.js +131 -0
  95. package/scripts/system-one-observations-export.js +29 -6
  96. package/scripts/system-one-observations-review.js +4 -5
  97. package/scripts/system-one-train.py +117 -61
@@ -0,0 +1,123 @@
1
+ # Cycle A — EVID-001 retrospective record
2
+
3
+ - **Preparer:** one-shot worker; compiled from the retained trail; **not an independent adjudication**.
4
+ - **Date:** 2026-11-11.
5
+ - **Packet input SHA:** `bde411dea9ea1d7f6a90cc6996aea8e0edbb2692`.
6
+ - **Run identity:** `t1-records-1`, packet revision 1. The preparer's model/effort are not recorded in this cycle trail.
7
+
8
+ ## Task, scope, and starting version
9
+
10
+ | Field | Record |
11
+ |---|---|
12
+ | Task | Produce the row-17 `docs/adr/EVID-001.md`, a retrospective evidence record for the already-shipped `verify:all` gate. Inventory row 17 was described as owner-approved in the outline packet and cites [issue #325](https://github.com/dyphn1/Harness-everything/issues/325). |
13
+ | Agreed scope | Describe the local gate, its exact `--fast` and Node 22 limits, `UNCHECKED` reasons, observed evidence, and differences from hosted CI. No gate/runtime change. The simplified E1 requirements and blocker/budget rules are in [#421 comment 6785927033](https://github.com/dyphn1/Harness-everything/issues/421#issuecomment-6785927033) §5. |
14
+ | Starting version | Repository input `bde411dea9ea1d7f6a90cc6996aea8e0edbb2692`; `git cat-file -e bde411dea9ea1d7f6a90cc6996aea8e0edbb2692:docs/adr/EVID-001.md` exited 128 (`fatal: path ... is not in ...`), so the target did not yet exist at that version. |
15
+ | Scope authority | The local definition records owner decisions D3/D4 and the row-17 scope; it says qualification is after-the-fact, the outline evidence purpose stays, and pilot credit is not a condition. See `LOCAL_ONLY: trail/definition.md; sha256:48f6664f4e80f4007b1a519b36875b630cd4071f6b50ef4e7fc77262d705157f` and `LOCAL_ONLY: trail/advisor-answer-32.md; sha256:a93ff4fecd5318e6b3fe06bde7f24629020abc51401d83007d58fc8f6760e539`. |
16
+
17
+ ## Reading list
18
+
19
+ The final ADR's `Related sources` table is the complete reading list, pinned to artifact SHA-256 `7fab327b223b96ac9f43a8643e636c0ad27070a7df209febbe8b955dcbb7f3b4` at commit `6653a9d4711abbb05332b08984dd0ff5d8f56234`. It contains these 16 rows:
20
+
21
+ | Source group | Sources and purpose |
22
+ |---|---|
23
+ | Runner contract | `scripts/verify-all.js`, `ci/mechanism-38-verify-all.test.js`, and `package.json`: plan, flags, row order, reporting, and the direct contract test. |
24
+ | Repository and hosted CI | `AGENTS.md` verification section, `docs/repository-contract.md`, `.github/workflows/ci.yml`, `.github/workflows/doc-governance.yml`, `.github/workflows/release.yml`, and `.nvmrc`: local/hosted coverage, guard boundary, and runtime lanes. |
25
+ | Gate callers and evidence | `self-evolve/scripts/self-regression.js`, `docs/doc-workflow-reconciliation.md`, `docs/own-repo-governance-e1-plan-2026-10-25-2139.md`, `benchmarks/results/codex-pr-metadata-2026-10-26/verification.md`, and `docs/document-lifecycle.md`: nested checks, run protocol, bound local output, and recorded hosted runs. |
26
+ | Historical limits | `.agents/harness-everything/errors/E-0001-doc-check-identity-split-decision.md` and `E-0009-one-shot-sandbox-env.md`: the unbound historical summaries and specific sandbox limitations, kept distinct from current or hosted evidence. |
27
+
28
+ ## Outline, reviews, triage, and dispatch
29
+
30
+ ```mermaid
31
+ flowchart LR
32
+ O["Outline O: 52fb8098"] --> R["Two independent outline reviews"]
33
+ R --> T["One coordinator/owner triage"]
34
+ T --> D["Draft D: 9ca54e94"]
35
+ D --> F["Independent final review: one blocker, two deferred"]
36
+ F --> C["One blocker correction D2: 6653a9d4"]
37
+ C --> Q["Targeted re-check: F1 closed"]
38
+ Q --> M["PR #430 merged: 7832d339"]
39
+ ```
40
+
41
+ | Stage | Version and outcome |
42
+ |---|---|
43
+ | Outline | O = `52fb8098326bf1b4f9dca812320959eccd13ee89`; outline digest `292eae36446a415da5a717f683e421c7145ec0675a3576a19a05fd78c399f606`. |
44
+ | Outline reviews | Two separate fresh-context reviewers. Review 1: REJECT with three blockers and three deferred. Review 2: ACCEPT WITH CHANGES with four blockers. Both were source-traced; neither ran `verify:all`. |
45
+ | Triage | One consolidated round in `triage-a.md`: T1–T6 in-scope and dispatched to the draft; T7 (AGENTS wording) out of scope, facts stated and issue #429 linked. No second outline review. |
46
+ | Draft dispatch | `packet-a-draft.md` at O; draft D = `9ca54e9416c8aae8e3a16dd0cf4b1ab349a94c32`. The ADR digest at D was `4443b407b5d86445d03ff83b3da64067e48ac4c2099d18a5c1954f1954a25f32`; the governed index was regenerated. |
47
+ | Final review | Bound to D and its ADR digest. ACCEPT WITH CHANGES: F1 blocker (E-0001/E-0009 summaries not bound to SHA plus output); F2 `--clean` wording and F3 missing row-17 inventory source deferred. T1–T3 and T5–T7 addressed; T4 partial. |
48
+ | Correction and re-check | Advisor answer 34 limited the single correction to F1 and left F2/F3 deferred. Fix D2 = `6653a9d4711abbb05332b08984dd0ff5d8f56234`, digest `7fab327b223b96ac9f43a8643e636c0ad27070a7df209febbe8b955dcbb7f3b4`; three evidence qualifiers changed, facts retained. Targeted re-check at D2 closed F1. This was a targeted re-check, not a second full review. |
49
+
50
+ Trail: `LOCAL_ONLY: trail/packet-a-outline.md; sha256:22b372080d8608478cc201d752335285957f7f2e1f7712c5ec3c49be673c120f`; `LOCAL_ONLY: trail/report-a-outline.md; sha256:503f0efb185f0792d42f03b445dad541bfbb72df9dda8aba0f5c21efb26764ee`; `LOCAL_ONLY: trail/report-a-review-1.md; sha256:b1eaf520a33beab082cac2660f28c8d304e74b654a6224a9cceaea5ed0b842a7`; `LOCAL_ONLY: trail/report-a-review-2.md; sha256:594d2e54eb841190097e4ba2a680ce0c7fb0130288430f8bca44fae28af342ab`; `LOCAL_ONLY: trail/triage-a.md; sha256:7801f8b917551b3cbfcccae45a367b182502e82e2767c2904006bf9dd1e60cb6`; `LOCAL_ONLY: trail/packet-a-draft.md; sha256:f6b5b3ee95f020e056ade25cc14dda621ab1897d75d8140295a3d4331d974820`; `LOCAL_ONLY: trail/report-a-draft.md; sha256:13ab3d532b5dfe90e6e8cdac0e85a21f651f3217ac9dbacb55b3c58d7f465623`; `LOCAL_ONLY: trail/report-a-final.md; sha256:332168f4bee0601853e8ba3822837652b5d3f2a69b24cb95ec051a30769fbfc3`; `LOCAL_ONLY: trail/packet-a-fix.md; sha256:a3a124d440e3c774245d4c78eee9fc137a3cdd5533251ec789e6120e5e2a0157`;
51
+
52
+ `LOCAL_ONLY: trail/report-a-fix.md; sha256:49c1cee079de5d4bb6d5840b121237b72c0080a466c1ef396e6d8e50cb834020`; `LOCAL_ONLY: trail/packet-a-recheck.md; sha256:16c141af43c62834da83cec65039cbe3d72789c5c3874ddc41f67ade93ed5c87`; `LOCAL_ONLY: trail/report-a-recheck.md; sha256:691b8cbd2c22b33623e4d3184029a109acb9f9e1d120886a87d95be0b6dc364c`; `LOCAL_ONLY: trail/advisor-answer-34.md; sha256:7f312cb434f7184a3f7b656b68d38fa92b038999ca44ea61e06324d37bbffbea`; `LOCAL_ONLY: trail/advisor-answer-36.md; sha256:197bf990528fed05eb02ee290657424ba33a3ac65dbe725d99b44a0ddf3246c3`.
53
+
54
+ ## Authors, reviewers, and assistance
55
+
56
+ - Draft and correction packets were completed by one-shot workers; their personal identities are unknown. Their logs identify `glm-5.3-flash-free`; effort is not recorded.
57
+ - The outline reviewers, final reviewer, and re-checker are identified by role only. Their logs identify `gpt-6-luna` at `xhigh`; no personal identities are retained. The final reviewer and re-checker were separate from the author/corrector per their read-only packet declarations.
58
+ - Coordinator assistance included scope/outline preparation, advisor answers 32 and 34, reviewer and draft/fix/re-check packet preparation, triage, source/check coordination, branch commits, PR merge, and index handling. Work was assisted; it is not described as unassisted.
59
+ - Git author/committer fields on O, D, and D2 say `Miya Daniel`; the trail does not map that account to each worker. The PR snapshot lists head and merge commits. Do not infer worker identity from the commit author.
60
+ - Model/effort locators: `LOCAL_ONLY: trail/a-outline.log; sha256:3ce846c4957cb0ec0ac5b1b2098e300a03bf6c12ecb4351c49ac477ecaa18935`; `LOCAL_ONLY: trail/a-draft.log; sha256:06c33b16fe959e37586d6b00ac2ed78ee6bd0c8db861ae4fc0f02b96fa52d90a`; `LOCAL_ONLY: trail/a-fix.log; sha256:e93a3ee2938a97aaa6195c61253fb11b6eb034ce072d04818bb310eb659f412a`; `LOCAL_ONLY: trail/a-review-1.log; sha256:4dd35f7b64711abf1716387a4e2a56d67d140ecf5e17c24f463b623583a2ac67`; `LOCAL_ONLY: trail/a-review-2.log; sha256:00cafa39378a8e8a081e2ccc5113f5aea24020dc839095783ed427686411f7d2`; `LOCAL_ONLY: trail/a-final.log; sha256:d69d8fba9eb7a6c0dcbfccfb07b509bd0949609166edc5176befc5bf728c968a`; `LOCAL_ONLY: trail/a-recheck.log; sha256:ed57b483d748b8dd6ad4f6f5c1b515f5fb91edbd77af081b4a4a83d1d5ec762d`.
61
+
62
+ ## Final artifact commit and owner decision
63
+
64
+ | Item | Evidence |
65
+ |---|---|
66
+ | Final artifact | `docs/adr/EVID-001.md` at PR #430 head D2 `6653a9d4711abbb05332b08984dd0ff5d8f56234`; SHA-256 `7fab327b223b96ac9f43a8643e636c0ad27070a7df209febbe8b955dcbb7f3b4`; Git blob `38f439b3bbb311eab0f5b01b6682dc197b421eff`. |
67
+ | Generated companion | `docs/governed-index.md` at D2; SHA-256 `910c8b096acaf8533e86e80d92b3b6b2a260971019e91bec3c702a9e1096e556`; Git blob `26ec7c136d1e42e30227697d109953f42d30413f`. |
68
+ | PR and merge | [PR #430](https://github.com/dyphn1/Harness-everything/pull/430) head D2 merged at `7832d3398772e8ffc5698583e64aaabd3cd3572e`. `git diff --exit-code` of the ADR and index from D2 to the merge exited 0; merge commit is distinct from artifact head. |
69
+ | U5 comment | [PR #430 comment 6790406994](https://github.com/dyphn1/Harness-everything/pull/430#issuecomment-6790406994) says “U5 PASS” for exact base/head, scope limited to the new proposed ADR and regenerated index, and no blocking findings within the simplified cycle scope; it describes independent content checks. It does not by itself establish owner approval of the content. The supplied comment body is truncated after its first review item. |
70
+ | Attribution limit | The PR comment author is `dyphn1`, also the coordinator account. The packet says merge instructions were given in the coordinator session and are recorded only as quoted in PR comments/coordinator notes. Comment authorship alone cannot distinguish owner from coordinator; no separately attributable owner approval/delegated authority is established here. A merge alone is not treated as owner approval. |
71
+
72
+ ## Checks and their scope
73
+
74
+ | Check | Result and scope |
75
+ |---|---|
76
+ | `npm ci` | Exit 0 in the draft clone; dependency installation only. |
77
+ | `node harness-everything/scripts/doc-lifecycle.js lint --workspace . --config .agents/harness-everything/project-docs.json --changed-path docs/adr/EVID-001.md --changed-path docs/governed-index.md` | Exit 0 at draft; diagnostics empty, immutability `not-observed`. Targeted document lifecycle check, not a full quality claim. |
78
+ | `npm run test:consistency`, `npm run test:references`, `npm run test:portability` | Each exit 0 at draft. Checks covered repository/document consistency, skill references, and portability respectively. |
79
+ | `npm run verify:all -- --fast` | Exit 0 at D `9ca54e9416c8aae8e3a16dd0cf4b1ab349a94c32`, Node `v24.14.1` on macOS: 5 PASS, 0 FAIL, 11 UNCHECKED. This is a local deterministic-mechanism layer result before the single correction, not a D2 run or host-independent evidence. |
80
+ | Targeted re-check at D2 | Lifecycle lint exit 0. Index generator exit 0; the reviewer's comparison command exited 2 with `Operation not permitted` and is **UNCHECKED**. The coordinator later reported, outside the sandbox, lifecycle lint exit 0 and index equal to generator output in PR comment 6790350588. |
81
+ | PR #430 hosted checks at D2 | Supplied PR snapshot has 17 checks: 16 SUCCESS, `doc-governance` FAILURE. Do not summarize this as all hosted checks passing. The snapshot does not include a failure diagnosis. |
82
+ | Scope limit | No full `verify:all` at D2 and no live reconciliation-engine observation are in the retained evidence. |
83
+
84
+ The local fast-run log is `LOCAL_ONLY: trail/a-verify-fast.log; sha256:0bba25dd88722402258f31f4808522317988849166f78f2f9ab9d6656caf554f`; the PR snapshot is `LOCAL_ONLY: trail/gh-pr-430.json; sha256:57a845a218ffbac124ece76ac19a101ef1abd59dc12845c1d4c9e42d1f0b12b3`; the final-review and correction evidence is in the locators above.
85
+
86
+ ## Final review version, owner disposition, and result
87
+
88
+ - **Final review version:** independent final review was at D (`9ca54e94…`), ADR SHA-256 `4443b407…`; it was ACCEPT WITH CHANGES. The corrected bytes are D2 (`6653a9d4…`), checked only by the targeted F1 re-check (`report-a-recheck.md`), which says F1 CLOSED. This record does not describe the correction as having received a second full review.
89
+ - **Owner disposition:** U5 PASS is recorded at the exact PR head in comment 6790406994. Separate owner approval remains unknown for the attribution reason above. The final ADR remains `status: proposed`.
90
+ - **Expected:** deliver a source-grounded retrospective ADR with observed results bound to SHA and output, while retaining the exact limits and unresolved facts.
91
+ - **Actual:** document delivered; F1 was corrected by explicitly demoting the E-0001/E-0009 summaries to unverified claims, preserving their facts. F2 (`--clean` with `--fast` wording) and F3 (inventory reading-list row) remain deferred. E-0001's 13-pass row composition remains unknown; no claim is made about a fresh green D2 tree.
92
+ - **Raw report exceptions:** the final review and targeted re-check report bodies were complete, but their hidden harness-label lines followed `STATUS`; raw terminal-line compliance was not clean. The targeted re-check's generated-index comparison was UNCHECKED as above. These reports were not rewritten and no replacement review was commissioned.
93
+
94
+ ## Cost, deferred items, and unknowns
95
+
96
+ - **Packets counted:** 7 task dispatch packets by this rule: outline, two outline-review packets, draft, final-review packet, one fix packet, one targeted re-check packet. `triage-a.md`, advisor answer 34, coordinator integration, and the fast-check log are recorded separately, not counted as dispatch packets.
97
+ - **Correction rounds:** 1 blocker correction round; the correction plus its targeted re-check is one round.
98
+ - **Time, tokens, and monetary/tool cost:** unknown; no retained active-time/token/cost measurement supports a number. Preserved file mtimes and PR timestamps are not used as duration estimates.
99
+ - **Deferred:** F2, F3, the historical E-0001 row composition, full verification at D2, and proving scope reduction effective from these packet counts. The PR snapshot's `doc-governance` failure is retained as a check outcome, not reclassified as pass.
100
+ - **Unknown:** separate owner approval/authority, named identities for the one-shot workers/reviewers, the draft/fix model effort, D2 full-gate behavior, and live engine safety. Missing evidence remains unknown rather than inferred from the merge or local checks.
101
+
102
+ ## Separate outcomes
103
+
104
+ - **document delivered:** yes — ADR artifact commit `6653a9d4711abbb05332b08984dd0ff5d8f56234`, merged by `7832d3398772e8ffc5698583e64aaabd3cd3572e`; Git blob `38f439b3bbb311eab0f5b01b6682dc197b421eff`; SHA-256 `7fab327b223b96ac9f43a8643e636c0ad27070a7df209febbe8b955dcbb7f3b4`.
105
+ - **cycle qualifies: UNCHECKED — adjudication pending**
106
+ - **reconciliation engine safe / expansion GO: UNCHECKED** — the definition records pilot/default OFF and the PR snapshot has `pilot-offline-evidence` SUCCESS; the trail contains no reconciliation execution/credit observation for these cycles. This supports “OFF as recorded,” not a safety finding or engine GO.
107
+
108
+ ## Adjudication (added 2026-11-11, after the independent review)
109
+
110
+ | Evidence | Cycle A record |
111
+ |---|---|
112
+ | Independent-review binding | T3 reviewed the original record at commit `f5b0bf9cf820fdfe14590a998ce0c3033b08b208`, record SHA-256 `f7170c91d35ccd469a62a33a18bfc77fe879cb2140366b0914f021c27dbd4867`; this addendum was not covered by that review. |
113
+ | Independent recommendation | **UNCHECKED.** A-F1: owner approval or delegated authority for the delivered D2 content was not established as separately attributable. `LOCAL_ONLY: report-t3-a.md; sha256:9620e9cf84611bbcf8cb615d20b2fba7b527ba605bf4d42d5737445df3a0c2e3` |
114
+ | Subsequent guard evidence | Document Governance run `42981710583`, base `bde411dea9ea1d7f6a90cc6996aea8e0edbb2692`, candidate `6653a9d4711abbb05332b08984dd0ff5d8f56234`: hosted **FAILURE**, exit `2`, verdict `REVIEW_REQUIRED`, governed membership `8→9` (`governed` and `derived` pass). This is the expected review state for a new governed ADR under [#401 comment 6724640217](https://github.com/dyphn1/Harness-everything/issues/401#issuecomment-6724640217); the job remains **FAILURE**, not PASS. |
115
+ | U5 review binding | [PR #430 comment 6790406994](https://github.com/dyphn1/Harness-everything/pull/430#issuecomment-6790406994) binds U5 PASS to base `bde411dea9ea1d7f6a90cc6996aea8e0edbb2692`, head `6653a9d4711abbb05332b08984dd0ff5d8f56234`, and scope `docs/adr/EVID-001.md` plus regenerated `docs/governed-index.md`, with no runtime or policy-code changes. It explicitly says: “This is a review decision, not an assertion of completed CI, a qualifying #341 E1 cycle, owner acceptance of the ADR status, or approval to merge before pending checks resolve.” |
116
+ | Advisor disposition | A-F1 is in-scope and closable only by version-bound owner confirmation. `LOCAL_ONLY: advisor-answer-37.md; sha256:ec63ab7a3a1ccc927e3a3a38b372e0829d3dd87f49426b05cb0d29135920e062` |
117
+ | Owner confirmation | [Issue #341 comment 6797024694](https://github.com/dyphn1/Harness-everything/issues/341#issuecomment-6797024694), 2026-11-11. Cycle A approval/U5-authority answer: 「是,兩者皆是」. Final decision: 「兩個都 QUALIFYING」. Received from the owner in this session and posted by the coordinator through the shared `dyphn1` account; coordinator-attested evidence of the owner's statement, not independently authenticated GitHub authorship. The original T3 attribution/truncation limit is preserved: the shared account does not authenticate authorship, and the T3 snapshots were truncated at 700 characters; the complete U5 comment is cited above as subsequent evidence. |
118
+
119
+ - **document delivered:** yes — ADR artifact commit `6653a9d4711abbb05332b08984dd0ff5d8f56234`, merged by `7832d3398772e8ffc5698583e64aaabd3cd3572e`; Git blob `38f439b3bbb311eab0f5b01b6682dc197b421eff`; SHA-256 `7fab327b223b96ac9f43a8643e636c0ad27070a7df209febbe8b955dcbb7f3b4`.
120
+ - cycle qualifies: QUALIFYING — owner adjudication 2026-11-11 (issue #341 comment 6797024694); independent recommendation was UNCHECKED pending the owner confirmation recorded above
121
+ - reconciliation engine safe / expansion GO: UNCHECKED — pilot OFF; not decided
122
+
123
+ Basis: independent review of the original record + subsequent guard evidence and owner confirmation + coordinator delta check + owner adjudication; no independent review of this updated record.
@@ -0,0 +1,130 @@
1
+ # Cycle B — ROUTE-001 error-lesson delivery design record
2
+
3
+ - **Preparer:** one-shot worker; compiled from the retained trail; **not an independent adjudication**.
4
+ - **Date:** 2026-11-11.
5
+ - **Packet input SHA:** `bde411dea9ea1d7f6a90cc6996aea8e0edbb2692`.
6
+ - **Run identity:** `t1-records-1`, packet revision 1. The preparer's model/effort are not recorded in this cycle trail.
7
+
8
+ ## Task, scope, and starting version
9
+
10
+ | Field | Record |
11
+ |---|---|
12
+ | Task | Produce one forward-looking design ADR for #402: choose a recurring error class, its ledger lesson, an existing intervention seam, success/failure observations, and the smallest follow-up implementation acceptance. The selected artifact is `docs/adr/ROUTE-001-error-lesson-delivery.md`. |
13
+ | Agreed scope | E-0002 report-terminal-status lesson; prompt context at `UserPromptSubmit`; explicit report-required signal; delivery and output observations kept separate; no engine rewrite or claim that error handling improved. Owner scope and rulings are recorded in [#402 comment 6785928296](https://github.com/dyphn1/Harness-everything/issues/402#issuecomment-6785928296), [#402 comment 6786069987](https://github.com/dyphn1/Harness-everything/issues/402#issuecomment-6786069987), and the later ruling below. |
14
+ | Starting version | Repository input `bde411dea9ea1d7f6a90cc6996aea8e0edbb2692`; `git cat-file -e bde411dea9ea1d7f6a90cc6996aea8e0edbb2692:docs/adr/ROUTE-001-error-lesson-delivery.md` exited 128 (`fatal: path ... is not in ...`), so the target did not yet exist at that version. |
15
+ | Scope authority | The local definition §5 sets the simplified E1 cycle and after-the-fact adjudication; answer 32 establishes the reduction decisions, answer 33 and packet B-draft record the O1–O5 rulings. The ADR remains `status: proposed`. See `LOCAL_ONLY: trail/definition.md; sha256:48f6664f4e80f4007b1a519b36875b630cd4071f6b50ef4e7fc77262d705157f`, `LOCAL_ONLY: trail/advisor-answer-32.md; sha256:a93ff4fecd5318e6b3fe06bde7f24629020abc51401d83007d58fc8f6760e539`, `LOCAL_ONLY: trail/advisor-answer-33.md; sha256:cb5ddcdfa5b348f3edfb3a0d021c54b77aa14754b6247a3f790662bf2a0b8174`, and `LOCAL_ONLY: trail/packet-b-draft.md; sha256:dd03e5f7772495bf4086a8ac825b0a45b073bd54b84783fa131789e789e9b6a1`. |
16
+
17
+ ## Reading list
18
+
19
+ The final ADR's `Reading list` table is the full source inventory, pinned to artifact SHA-256 `6822a091dff2086c4aeabf65685e26e3b5c804495462b128f3b5bddb4113bde2` at commit `6a997cc9dcb478ab6d4f8470a96e7371e0ea5be4`. Its rows cover the following topic sources:
20
+
21
+ | Source group | Sources and purpose |
22
+ |---|---|
23
+ | Lesson and ledger | Error-ledger `README.md`, `index.jsonl`, and E-0001–E-0014; E-0002 is the content authority, the index is only a locator. |
24
+ | Routing and delivery | `AGENTS.md`, `docs/routing.md`, `docs/system-one-observations.md`, `harness-everything/scripts/kernel-router.js`, `hooks/scripts/codex-user-prompt.js`, both hook manifests, `scripts/sync-openai-plugin.js`, and `hooks/scripts/openai-session-start.js`: label rule, actual prompt signal availability, existing seams and packaging boundary. |
25
+ | Existing reflection/candidate paths | `scripts/errors-sync.js`, `hooks/scripts/rule-of-3.js`, tracker/reset hooks, learning-opportunity and telemetry helpers, `zoom-out/` references/templates, `self-evolve/` skills/scripts, workflow docs, `docs/reflection.md`, and the related tests/evals: distinguish ledger lookup/delivery from reflection and candidate lifecycle. |
26
+ | Contract and host boundary | `docs/mechanism-first-skill-mesh.md`, `docs/platform-capabilities.md`, `docs/enforcement-locks.md`, `docs/troubleshooting.md`, `docs/workflow-runtime.md`, `docs/architecture.md`, `harness-everything/SKILL.md`, `README.md`, `VERIFICATION.md`, `opencode-plugin/README.md`, and `opencode-plugin/index.mjs`: no-template intent, existing breaker boundaries, and separate OpenCode implementation. |
27
+ | Durable scope references | #402 comments 6785928296, 6786069987, 6790477633; #394, #359, #141; and #421 comment 6785927033. The issue/comment text was supplied in the trail/packets; it was not fetched online in this run. |
28
+
29
+ The artifact itself names each path and its source relevance. It retains the restored `docs/workflows/harness-everything.md` row and adds the bounded OpenCode source rows; this source evidence does not claim OpenCode was run.
30
+
31
+ ## Outline, reviews, triage, and dispatch
32
+
33
+ ```mermaid
34
+ flowchart LR
35
+ S["Scope packet"] --> O["Outline O: 4320fce8"]
36
+ O --> R["Two independent outline reviews"]
37
+ R --> T["One triage + owner ruling"]
38
+ T --> D["Draft: 171bc079"]
39
+ D --> F["Independent final review at H: blocker + deferred"]
40
+ F --> C["One blocker correction H2: 6a997cc9"]
41
+ C --> Q["Targeted re-check: F1 closed"]
42
+ Q --> M["PR #431 merged: 0f08daa4"]
43
+ ```
44
+
45
+ | Stage | Version and outcome |
46
+ |---|---|
47
+ | Scope preparation | `b-scope-1` selected E-0002 because it fits #402's report-format concern and has post-lesson recurrences; the report also noted E-0009 has more episodes, so E-0002 was never the “top-ranked” class. |
48
+ | Outline | O = `4320fce85e79187ecf39f95494160f712d83d067`; outline digest `bd9430f311a111945b410de371d7efa84363241e12d06dff1234b93c5625b3ed`. |
49
+ | Outline reviews | Two independent, fresh-context review packets. Review 1 content verdict: ACCEPT WITH CHANGES, two deferred findings; its report ended in `STATUS: BLOCKED` because the trailing-label rule conflicted with packet terminal-STATUS format. Triage states the review content was complete and that status was false for substantive completion. Review 2: REJECT, three blockers and one deferred, requiring owner ruling on label/STATUS and stronger delivery evidence/read-list coverage. Both were source-traced except the stated index-count evidence; GitHub issue links were not fetched. |
50
+ | Triage | One triage round in `triage-b.md`: U1/U2 deferred in review and corrected in the draft; U3/U4 blockers; U5 required owner ruling; U6 required an owner boundary; U7 added the requirement to define a prompt-time report-required signal and negative controls. Advisor answer 33 narrowed the changes; no second outline-review round. |
51
+ | Owner ruling | [#402 comment 6790477633](https://github.com/dyphn1/Harness-everything/issues/402#issuecomment-6790477633) is quoted in packet B-draft as agreeing to five points: prompt-context delivery, explicit signal selecting E-0002, E-0002/ROUTE, distinct report-file STATUS vs turn label handling, and no counter/lock/forced reflection for this delivery. Its quoted final direction says a hook hint is enough and counting is unnecessary because it had failed before. |
52
+ | Draft dispatch | Draft bytes have ADR SHA-256 `acac7c0d64ca3f2d83f02e319deb40e3918b4070e5c11e015760546d1f7d718f`; coordinator integration commit D = `171bc079b58422c15d302b6468a1ad539bdc8b0c`. The governed index was regenerated. |
53
+ | Final review | Bound to H = `27e0a6ffa69439f90c6421b7d9493b9e8ac17cfc` after main/index merge; ADR digest `acac7c0d64ca3f2d83f02e319deb40e3918b4070e5c11e015760546d1f7d718f`. ACCEPT WITH CHANGES: one blocker, missing direct Rule-of-3 boundary sources; one deferred issue, undefined “source stale” condition. |
54
+ | Correction and re-check | Advisor answer 35 limited the single correction to the class-level source/boundary gap and preserved “source stale” as deferred. Correction H2 = `6a997cc9dcb478ab6d4f8470a96e7371e0ea5be4`, digest `6822a091dff2086c4aeabf65685e26e3b5c804495462b128f3b5bddb4113bde2`; only the ADR changed. Targeted re-check at H2 closed F1. This was not a second full review. |
55
+
56
+ Trail: `LOCAL_ONLY: trail/packet-b-scope.md; sha256:b570584a4dfa536b6a782253e99bdab78fd4555d1a26aed39449ab53fe763aeb`; `LOCAL_ONLY: trail/report-b-scope.md; sha256:030de9487715c1ae076ab01ef2fd79f93cfc14adec8ef08cadb809e655c47a84`; `LOCAL_ONLY: trail/packet-b-outline.md; sha256:475b0fd5150dee4c4875cf0f168115571fc6dfcaeb281ca633190534fda54ce1`; `LOCAL_ONLY: trail/report-b-outline.md; sha256:388017cb9c16de72e2614073bc4928f59073cfd0fa21a978c282654cab8b5067`; `LOCAL_ONLY: trail/report-b-review-1.md; sha256:8ce189155a7b867e154e63d75d5fef0ec0589e878135cdf0e64b540744142b30`; `LOCAL_ONLY: trail/report-b-review-2.md; sha256:34bce9f454fdd27bd3e52eefac00db6d789dc14f95b352b3a4d2e5eafb8a1fd0`; `LOCAL_ONLY: trail/triage-b.md; sha256:186227ae51d4275be032a04118c718f15fec8f55c8c7335f36c5424c98320a32`.
57
+
58
+ `LOCAL_ONLY: trail/report-b-draft.md; sha256:fd0b73e8fc894805cc1f64e39c50a3750e2c2912f49199434e46827f62d7a399`; `LOCAL_ONLY: trail/report-b-final.md; sha256:d3dfb7d667b6601c10cf990afd5562d2ff8697af8696c71f533b350b23cabcaf`; `LOCAL_ONLY: trail/packet-b-fix.md; sha256:bc214e3ee8dc6f20e1c777964cf42ac0158857fa1cd35d563e3cbb3e72577ca5`; `LOCAL_ONLY: trail/report-b-fix.md; sha256:3e06dcd0bae4381f44727881a34ebce79a2bb15b9a56e3e2624e8921e9b4aa18`; `LOCAL_ONLY: trail/packet-b-recheck.md; sha256:c4fafc8505e27fa3207e49aa02edeee2afb5de78eacab7f72ce2c3dff372a4fa`; `LOCAL_ONLY: trail/report-b-recheck.md; sha256:14b74b38cb6796f399ea5cc4535e09353d06cca76c38d737fc6d29ee3cd598ef`; `LOCAL_ONLY: trail/advisor-answer-33.md; sha256:cb5ddcdfa5b348f3edfb3a0d021c54b77aa14754b6247a3f790662bf2a0b8174`; `LOCAL_ONLY: trail/advisor-answer-35.md; sha256:a1016ecb7268d08ad6f836bb1902cb4b47a4e21807a17943079ffc5d42fa53d4`; `LOCAL_ONLY: trail/advisor-answer-36.md; sha256:197bf990528fed05eb02ee290657424ba33a3ac65dbe725d99b44a0ddf3246c3`.
59
+
60
+ ## Authors, reviewers, and assistance
61
+
62
+ - Scope, outline, draft, and correction packets were performed by one-shot workers. Their logs show `gpt-6-luna` at `xhigh` for scope/review runs and `glm-5.3-flash-free` for build runs; build effort is not recorded. Personal worker/reviewer identities are unknown.
63
+ - Review 1, review 2, final reviewer, and re-checker are identified by role only. The final reviewer and re-checker were separate read-only participants from the author/corrector per their packet declarations.
64
+ - Coordinator assistance included scope and outline preparation; answer 32 plus answers 33 and 35; owner-ruling capture; triage; packet preparation; source/check coordination; branch commits, governed-index regeneration, and PR merge. The work was assisted, not unassisted.
65
+ - Git author/committer fields on O, draft D, and H2 say `Miya Daniel`; no retained evidence maps that identity to each worker. The PR snapshot records D/H/H2 and merge separately. Do not infer a one-shot identity from the commit author.
66
+ - Model/effort locators: `LOCAL_ONLY: trail/b-scope.log; sha256:61ef9788664fc9f0aecaec25ad46791e1a067cfbe75de2680dbf41a1aed6e6b5`; `LOCAL_ONLY: trail/b-outline.log; sha256:f336a3cc8595415eb8d7d1a1c54e464ef315a2ca72302cbdd3e71b2b549eb5dc`; `LOCAL_ONLY: trail/b-review-1.log; sha256:47e3c2fcc27cb01eeaf7a16254a6f8e885ca761206777a4e07562c0f2cef84c6`; `LOCAL_ONLY: trail/b-review-2.log; sha256:59f8894a36cdbf9e0a800f966c1d253555f69b6a4c660c72e2403eaadcd5be7f`; `LOCAL_ONLY: trail/b-draft.log; sha256:ad43657738b9bfa1144700e8c3a37b946d01e1baebef17932e9d15f504003343`; `LOCAL_ONLY: trail/b-final.log; sha256:fcbe8ea269c97b1ba36c4c1672fd2fbeb2eaa69154aa8b5876af04c201b55bef`; `LOCAL_ONLY: trail/b-fix.log; sha256:b13bbe3a404e4e57ed9a291d78b4694e4891a3b3e13f9bf01f2a3b291051ba01`; `LOCAL_ONLY: trail/b-recheck.log; sha256:771ad42f7a0316b01c2ebbee238a15760bb7c93498e1c3d3db83e47b88931b96`.
67
+
68
+ ## Final artifact commit and owner decision
69
+
70
+ | Item | Evidence |
71
+ |---|---|
72
+ | Final artifact | `docs/adr/ROUTE-001-error-lesson-delivery.md` at PR #431 head H2 `6a997cc9dcb478ab6d4f8470a96e7371e0ea5be4`; SHA-256 `6822a091dff2086c4aeabf65685e26e3b5c804495462b128f3b5bddb4113bde2`; Git blob `d58c894965a1275682f36a326a8cd9ae68777c43`. |
73
+ | Generated companion | `docs/governed-index.md` at H2; SHA-256 `0067016f70b814f9f420c4d7bdd6d73aa1abb076f9726d21c4c33698be265a57`; Git blob `1c3dcd463b2dc4d0ca64e1d21e9697e8107ec74f`. |
74
+ | PR and merge | [PR #431](https://github.com/dyphn1/Harness-everything/pull/431) head H2 merged at `0f08daa42801f1ed83e55b82e3fc34db772eaebe`. `git diff --exit-code` for the ADR and index from H2 to merge exited 0; merge commit differs from artifact head. |
75
+ | Owner ruling reference | The quoted #402 comment 6790477633 in packet B-draft states agreement to the five A7 choices and the “hook hint”/no-counting direction. The issue URL was not fetched by this run; the quoted packet text is the retained basis. |
76
+ | U5 comment | [PR #431 comment 6793866005](https://github.com/dyphn1/Harness-everything/pull/431#issuecomment-6793866005) says “U5 PASS (design/document review only)” for the exact base/head, with scope limited to the proposed ADR and regenerated index, no runtime/hook/policy-code change, and no blocking finding remaining in the simplified cycle scope. The supplied comment body is truncated during its first review item; no further claim is based on unseen text. |
77
+ | Attribution limit | The PR comment author is `dyphn1`, also the coordinator account. Packet instructions say owner merge instructions were given in the coordinator session and are recorded only as quoted in PR comments/coordinator notes. The account does not distinguish owner from coordinator; no separately attributable owner approval/delegated authority is established here. A merge alone is not treated as approval. |
78
+
79
+ ## Checks and their scope
80
+
81
+ | Check | Result and scope |
82
+ |---|---|
83
+ | `node scripts/errors-sync.js --check` during scope and both outline reviews | In the scope log it was followed by `git status --porcelain`; the outer shell exited 0, but the check printed `Cannot find module 'js-yaml'` and its subcommand exit is not isolated in the retained log. In each outline-review log the direct command exited 1 with the same missing-module error. Ledger-index freshness was UNCHECKED at those points; no retry in those clones. |
84
+ | `node scripts/errors-sync.js --check` during draft | Exit 0: `.agents/harness-everything/errors/index.jsonl is current.` Episode counts in the ADR were then checked against the record/index. |
85
+ | ADR lint and `npm run test:consistency`, `npm run test:references`, `npm run test:portability` | Each exit 0 on the draft bytes (ADR digest `acac7c0d…`); lifecycle diagnostics empty, consistency/reference/portability gates passed. These are package/repository gates, not live-host injection evidence. |
86
+ | `npm run verify:all -- --fast` | Exit 0 at H `27e0a6ffa69439f90c6421b7d9493b9e8ac17cfc`, Node `v24.14.1` on macOS: 5 PASS, 0 FAIL, 11 UNCHECKED. Local deterministic-mechanism evidence before the correction, not a post-correction or host-independent result. |
87
+ | Targeted re-check at H2 | ADR lint exit 0; index generator exit 0 and stdout matched `docs/governed-index.md`; working tree clean. No `test:consistency`, references, portability, or full `verify:all` rerun after the correction is recorded. |
88
+ | PR #431 hosted checks at H2 | Supplied PR snapshot has 17 checks: 16 SUCCESS, `doc-governance` FAILURE. The snapshot has no failure diagnosis; do not call all hosted checks green. |
89
+ | Scope limit | No live-host lesson delivery/receipt run occurred; OpenCode rows are source evidence only. No engine behavior or improvement was measured. |
90
+
91
+ The check/run snapshots are `LOCAL_ONLY: trail/b-verify-fast.log; sha256:223dbe5c111f24718b77898d60063a212910e3fcf9b1e5e57155aab5eb0cc099` and `LOCAL_ONLY: trail/gh-pr-431.json; sha256:cfc2e01bbf7be7fb0729ab948cec5def2e1c1ada85c23eb7339c42272a542f0c`.
92
+
93
+ ## Final review version, owner disposition, and result
94
+
95
+ - **Final review version:** independent final review was at H (`27e0a6ffa…`), draft ADR SHA-256 `acac7c0d…`; it was ACCEPT WITH CHANGES. The correction bytes are H2 (`6a997cc9…`), checked only by the targeted F1 re-check (`report-b-recheck.md`), which says F1 CLOSED. No full re-review of H2 is claimed.
96
+ - **Owner disposition:** the supplied PR comment says U5 PASS on the exact H2 revision for design/document review. The comment account is shared with the coordinator; separate owner approval remains unknown. The ADR stays `status: proposed`.
97
+ - **Expected:** deliver a design-only proposal with a selectable report-task signal, explicit delivery/output evidence, and no new counter or lock.
98
+ - **Actual:** the ADR was delivered and merged; the selected `report-status:E-0002` signal and Rule-of-3 host boundary are documented. Nothing was implemented or run as lesson delivery. The stale-source trigger remains undefined and deferred. No effect on error recurrence is claimed.
99
+ - **Raw report exceptions:** `report-b-review-1.md` says `STATUS: BLOCKED` even though the substantive review is complete and its verdict is ACCEPT WITH CHANGES; the blocker wording reflects the packet-vs-label terminal-line conflict, not an unfinished review. The hidden label follows `STATUS` there, as it does in the final-review and targeted-recheck reports. These reports were not rewritten. Completion, review verdict, and raw terminal-format compliance remain separate facts.
100
+
101
+ ## Cost, deferred items, and unknowns
102
+
103
+ - **Packets counted:** 8 task dispatch packets by this rule: scope, outline, two outline-review packets, draft, final-review packet, one fix packet, one targeted re-check packet. `triage-b.md`, advisor answers, coordinator integration, and the fast-check log are listed separately, not counted as dispatch packets.
104
+ - **Correction rounds:** 1 blocker correction round; correction plus targeted re-check counts as one round.
105
+ - **Time, tokens, and monetary/tool cost:** unknown; no retained active-time/token/cost measurement supports a number. Copied file mtimes and PR timestamps are not treated as work duration.
106
+ - **Deferred:** undefined “source stale” condition; unresolved whether A2 requires separate action on the existing Rule-of-3 breaker; #394 tracker state; proving scope reduction effective from these packet counts. The PR snapshot's `doc-governance` failure is preserved as a check result.
107
+ - **Unknown:** distinct owner identity/approval, individual worker/reviewer identities, build-run effort, current external issue state, and any live lesson-delivery/engine safety result. Supplied GitHub issue text was not independently fetched; the PR comment bodies in the local snapshot are truncated to 700 characters.
108
+
109
+ ## Separate outcomes
110
+
111
+ - **document delivered:** yes — artifact commit `6a997cc9dcb478ab6d4f8470a96e7371e0ea5be4`, merged by `0f08daa42801f1ed83e55b82e3fc34db772eaebe`; Git blob `d58c894965a1275682f36a326a8cd9ae68777c43`; SHA-256 `6822a091dff2086c4aeabf65685e26e3b5c804495462b128f3b5bddb4113bde2`.
112
+ - **cycle qualifies: UNCHECKED — adjudication pending**
113
+ - **reconciliation engine safe / expansion GO: UNCHECKED** — the definition records pilot/default OFF and the PR snapshot has `pilot-offline-evidence` SUCCESS; this trail contains no reconciliation execution/credit observation for these cycles. “OFF as recorded” is not a safety finding or engine GO.
114
+
115
+ ## Adjudication (added 2026-11-11, after the independent review)
116
+
117
+ | Evidence | Cycle B record |
118
+ |---|---|
119
+ | Independent-review binding | T3 reviewed the original record at commit `f5b0bf9cf820fdfe14590a998ce0c3033b08b208`, record SHA-256 `f2975bdb0db65d5571b26a370b8960471acced71353038d11f23674a0180b9b3`; this addendum was not covered by that review. |
120
+ | Independent recommendation | **UNCHECKED — owner adjudication is pending.** B-F1: owner approval for the delivered artifact was not separately attributable. B-F2: the hosted Document Governance FAILURE lacked a diagnosis, leaving its qualification relevance unresolved. `LOCAL_ONLY: report-t3-b.md; sha256:18051f4985a417ac70f2940b9f5203c30a6293b1e527c0aada15ae5974f4fe1f` |
121
+ | Subsequent guard evidence | Document Governance run `42998503308`, base `7832d3398772e8ffc5698583e64aaabd3cd3572e`, candidate `6a997cc9dcb478ab6d4f8470a96e7371e0ea5be4`: hosted **FAILURE**, exit `2`, verdict `REVIEW_REQUIRED`, governed membership `9→10` (`governed` and `derived` pass). This is the expected review state for a new governed ADR under [#401 comment 6724640217](https://github.com/dyphn1/Harness-everything/issues/401#issuecomment-6724640217); the job remains **FAILURE**, not PASS. |
122
+ | U5 review binding | [PR #431 comment 6793866005](https://github.com/dyphn1/Harness-everything/pull/431#issuecomment-6793866005) binds U5 PASS to base `7832d3398772e8ffc5698583e64aaabd3cd3572e`, head `6a997cc9dcb478ab6d4f8470a96e7371e0ea5be4`, and scope `docs/adr/ROUTE-001-error-lesson-delivery.md` plus regenerated `docs/governed-index.md` only, with no runtime, hook, or policy-code change. It explicitly says: “It does not constitute ADR acceptance (status: proposed remains), implementation approval, a qualifying #341 E1 GO decision, successful Document Governance CI, or authorization to merge without the owner's decision.” |
123
+ | Advisor disposition | B-F1 is in-scope and closable only by version-bound owner confirmation; B-F2 is in-scope and resolved by the retained logs. `LOCAL_ONLY: advisor-answer-37.md; sha256:ec63ab7a3a1ccc927e3a3a38b372e0829d3dd87f49426b05cb0d29135920e062` |
124
+ | Owner confirmation | [Issue #341 comment 6797024694](https://github.com/dyphn1/Harness-everything/issues/341#issuecomment-6797024694), 2026-11-11. Cycle B approval/U5-authority answer: 「是,兩者皆是」. Final decision: 「兩個都 QUALIFYING」. Received from the owner in this session and posted by the coordinator through the shared `dyphn1` account; coordinator-attested evidence of the owner's statement, not independently authenticated GitHub authorship. The original T3 attribution/truncation limit is preserved: the shared account does not authenticate authorship, and the T3 snapshots were truncated at 700 characters; the complete U5 comment is cited above as subsequent evidence. |
125
+
126
+ - **document delivered:** yes — ADR artifact commit `6a997cc9dcb478ab6d4f8470a96e7371e0ea5be4`, merged by `0f08daa42801f1ed83e55b82e3fc34db772eaebe`; Git blob `d58c894965a1275682f36a326a8cd9ae68777c43`; SHA-256 `6822a091dff2086c4aeabf65685e26e3b5c804495462b128f3b5bddb4113bde2`.
127
+ - cycle qualifies: QUALIFYING — owner adjudication 2026-11-11 (issue #341 comment 6797024694); independent recommendation was UNCHECKED pending the owner confirmation recorded above
128
+ - reconciliation engine safe / expansion GO: UNCHECKED — pilot OFF; not decided
129
+
130
+ Basis: independent review of the original record + subsequent guard evidence and owner confirmation + coordinator delta check + owner adjudication; no independent review of this updated record.
@@ -12,7 +12,7 @@ const IMPORTER = path.join(ROOT, 'scripts', 'system-one-observations-import-code
12
12
  const EXPORTER = path.join(ROOT, 'scripts', 'system-one-observations-export.js');
13
13
  const REVIEW = path.join(ROOT, 'scripts', 'system-one-observations-review.js');
14
14
  const obs = require('../hooks/scripts/lib/observations');
15
- const LABEL = '<!-- harness-label {"v":1,"validity":"actionable","contextDependent":false,"tier":"tier2","intents":["fix"],"workflow":null,"skills":[]} -->';
15
+ const LABEL = '<!-- harness-label {"v":1,"validity":"actionable","tier":"tier2","intents":["fix"],"workflow":null,"skills":[]} -->';
16
16
  const TIER1_LABEL = '<!-- harness-label {"v":1,"validity":"actionable","contextDependent":false,"tier":"tier1","intents":["fix"],"workflow":null,"skills":[]} -->';
17
17
 
18
18
  const root = fs.mkdtempSync(path.join(os.tmpdir(), 'harness-session-label-import-'));
@@ -110,6 +110,7 @@ try {
110
110
  const liveRecord = index.records.find(entry => entry.writer && entry.writer.turnId === 'included');
111
111
  assert(liveRecord, 'live records retain Codex turn IDs for cross-source dedupe');
112
112
  assert.strictEqual(liveRecord.behavior.filesWritten, 1, 'the live fixture contains an observed file write');
113
+ assert(!Object.hasOwn(liveRecord.selfReport, 'contextDependent'), 'legacy fields do not enter new self-reports');
113
114
  assert.deepStrictEqual(obs.contradictions(liveRecord.selfReport, liveRecord.behavior), ['tier1-with-writes']);
114
115
  assert.strictEqual(index.records.filter(entry => entry.writer && entry.writer.sessionId === 'fixture-session' && entry.writer.turnId === 'included').length, 1,
115
116
  'live capture and session backfill leave one record for a turn');
@@ -120,6 +121,7 @@ try {
120
121
  assert.strictEqual(fallbackText.prompt, 'fallback prompt from the rollout message');
121
122
  const backfilledTier1 = index.records.find(entry => entry.captureMethod === 'session-backfill' && entry.selfReport.tier === 'tier1');
122
123
  assert(backfilledTier1, 'the tier1 label from the rollout is imported');
124
+ assert(!Object.hasOwn(backfilledTier1.selfReport, 'contextDependent'), 'the legacy field is ignored during session import');
123
125
  assert.strictEqual(backfilledTier1.behavior, null, 'session backfill records behavior as unobserved rather than zero');
124
126
  assert(!index.records.some(entry => entry.writer && entry.writer.turnId === 'ambiguous-summary'),
125
127
  'a differing completion string must not inherit the assistant message label');
@@ -139,6 +141,7 @@ try {
139
141
  assert.strictEqual(exported.status, 0, 'export after backfill failed:\n' + exported.stdout + '\n' + exported.stderr);
140
142
  const labels = fs.readFileSync(path.join(exportDir, 'labels-observed.jsonl'), 'utf8').trim().split('\n').map(JSON.parse);
141
143
  const exportReport = JSON.parse(fs.readFileSync(path.join(exportDir, 'export-report.json'), 'utf8'));
144
+ assert(labels.every(label => !Object.hasOwn(label, 'contextDependent')), 'legacy values are absent from exported labels');
142
145
  assert.strictEqual(labels.filter(label => label.behaviorEvidence === 'unobserved').length, 5);
143
146
  assert.deepStrictEqual(exportReport.behaviorEvidence, { observed: 1, unobserved: 5 });
144
147
  assert.strictEqual(exportReport.contradictions['tier1-with-writes'], 1, 'only the observed live write contributes a contradiction');
@@ -12,30 +12,34 @@ const { spawnSync, execFileSync } = require('child_process');
12
12
  const ROOT = path.resolve(__dirname, '..');
13
13
  const lib = require(path.join(ROOT, 'hooks/scripts/lib/observations.js'));
14
14
  const HOOK = path.join(ROOT, 'hooks/scripts/observation-hook.js');
15
+ const ROUTER = path.join(ROOT, 'harness-everything/scripts/kernel-router.js');
15
16
  const EXPORTER = path.join(ROOT, 'scripts/system-one-observations-export.js');
16
17
  const REVIEW = path.join(ROOT, 'scripts/system-one-observations-review.js');
18
+ const { getWorkspaceKey } = require(path.join(ROOT, 'scripts/lib/workspace.js'));
17
19
  let failures = 0;
18
20
  function test(name, fn) {
19
21
  try { fn(); console.log(` PASS ${name}`); } catch (error) { failures++; console.error(` FAIL ${name}\n ${error.stack.split('\n').slice(0, 3).join('\n ')}`); }
20
22
  }
21
23
 
22
- const LABEL = '<!-- harness-label {"v":1,"validity":"actionable","contextDependent":false,"tier":"tier2","intents":["fix","test"],"workflow":"iterative-single","skills":["tdd"]} -->';
24
+ const LABEL = '<!-- harness-label {"v":1,"validity":"actionable","tier":"tier2","intents":["fix","test"],"workflow":"iterative-single","skills":["tdd"]} -->';
25
+ const LEGACY_LABEL = '<!-- harness-label {"v":1,"validity":"actionable","contextDependent":false,"tier":"tier2","intents":["fix","test"],"workflow":"iterative-single","skills":["tdd"]} -->';
23
26
 
24
27
  test('label line parses and validates', () => {
25
28
  const parsed = lib.parseLabelLine(`Done.\n\n${LABEL}\n`);
26
- assert.deepStrictEqual(parsed.label, { v: 1, validity: 'actionable', contextDependent: false, tier: 'tier2',
29
+ assert.deepStrictEqual(parsed.label, { v: 1, validity: 'actionable', tier: 'tier2',
27
30
  intents: ['fix', 'test'], workflow: 'iterative-single', skills: ['tdd'] });
31
+ assert.deepStrictEqual(lib.parseLabelLine(LEGACY_LABEL).label, parsed.label, 'legacy field is accepted but ignored');
28
32
  assert.strictEqual(lib.parseLabelLine('no label here').label, null);
29
33
  assert.strictEqual(lib.parseLabelLine('no label here').reason, 'label-missing');
30
34
  assert.strictEqual(lib.parseLabelLine('<!-- harness-label {bad json} -->').reason, 'label-unparseable');
31
- const unknown = lib.parseLabelLine('<!-- harness-label {"v":1,"validity":"actionable","contextDependent":false,"tier":"tier9","intents":[],"workflow":null,"skills":[]} -->');
35
+ const unknown = lib.parseLabelLine('<!-- harness-label {"v":1,"validity":"actionable","tier":"tier9","intents":[],"workflow":null,"skills":[]} -->');
32
36
  assert.strictEqual(unknown.label, null);
33
37
  assert.strictEqual(unknown.reason, 'label-invalid');
34
- const tooMany = lib.parseLabelLine('<!-- harness-label {"v":1,"validity":"actionable","contextDependent":false,"tier":null,"intents":["fix","test","docs","plan"],"workflow":null,"skills":[]} -->');
38
+ const tooMany = lib.parseLabelLine('<!-- harness-label {"v":1,"validity":"actionable","tier":null,"intents":["fix","test","docs","plan"],"workflow":null,"skills":[]} -->');
35
39
  assert.strictEqual(tooMany.reason, 'label-invalid', 'at most three intents');
36
40
  const two = lib.parseLabelLine(`${LABEL.replace('tier2', 'tier1')}\nmore\n${LABEL}`);
37
41
  assert.strictEqual(two.label.tier, 'tier2', 'the last label line wins');
38
- const invalid = lib.parseLabelLine('<!-- harness-label {"v":1,"validity":"invalid","contextDependent":true,"tier":null,"intents":[],"workflow":null,"skills":[]} -->');
42
+ const invalid = lib.parseLabelLine('<!-- harness-label {"v":1,"validity":"invalid","tier":null,"intents":[],"workflow":null,"skills":[]} -->');
39
43
  assert.strictEqual(invalid.label.validity, 'invalid');
40
44
  });
41
45
 
@@ -112,8 +116,11 @@ function sandbox() {
112
116
  const repo = path.join(dir, 'repo');
113
117
  fs.mkdirSync(repo);
114
118
  execFileSync('git', ['init', '-q', repo]);
115
- const env = { ...process.env, HARNESS_OBSERVATIONS_DIR: store, HARNESS_STATE_ROOT: path.join(dir, 'state') };
119
+ const env = { ...process.env, HARNESS_OBSERVATIONS_DIR: store, HARNESS_STATE_ROOT: path.join(dir, 'state'),
120
+ HARNESS_STATE_HOME: path.join(dir, 'harness-state') };
116
121
  delete env.HARNESS_OBSERVATIONS;
122
+ delete env.HARNESS_SYSTEM_ONE_MODE;
123
+ delete env.HARNESS_ROUTER_CONTRACT_PATH;
117
124
  // Fixtures choose their own host; never inherit the invoking agent's.
118
125
  for (const key of ['CLAUDE_PLUGIN_ROOT', 'CLAUDECODE', 'CLAUDE_CODE_ENTRYPOINT', 'CLAUDE', 'CODEX_HOME', 'CODEX_THREAD_ID']) delete env[key];
119
126
  return { dir, store, repo, env };
@@ -126,6 +133,32 @@ function hook(env, payload) {
126
133
  return r;
127
134
  }
128
135
 
136
+ function routeWorkflow(s, sessionId, systemOne) {
137
+ const routed = spawnSync(process.execPath, [ROUTER], {
138
+ input: JSON.stringify({ session_id: sessionId, cwd: s.repo, prompt: 'update the observation fixture' }),
139
+ env: s.env, cwd: ROOT, encoding: 'utf8', timeout: 15000,
140
+ });
141
+ assert.strictEqual(routed.status, 0, `router exit ${routed.status}: ${routed.stderr}`);
142
+ const file = path.join(s.env.HARNESS_STATE_HOME, 'workspaces', getWorkspaceKey(s.repo), 'state',
143
+ 'sessions', sessionId, 'workflow-run.json');
144
+ assert(fs.existsSync(file), 'the router persists workflow-run.json');
145
+ const run = JSON.parse(fs.readFileSync(file, 'utf8'));
146
+ assert(run.workflowPlan && typeof run.workflowPlan === 'object', 'the router writes a workflowPlan object');
147
+ if (systemOne !== undefined) {
148
+ run.workflowPlan.systemOne = systemOne;
149
+ fs.writeFileSync(file, JSON.stringify(run));
150
+ }
151
+ return file;
152
+ }
153
+
154
+ function observeWithRouter(s, sessionId, systemOne, label = LABEL) {
155
+ routeWorkflow(s, sessionId, systemOne);
156
+ const base = { session_id: sessionId, cwd: s.repo };
157
+ hook(s.env, { ...base, hook_event_name: 'UserPromptSubmit', prompt: 'capture observation metadata' });
158
+ hook(s.env, { ...base, hook_event_name: 'Stop', last_assistant_message: `done\n${label}` });
159
+ return records(s.store).find(record => record.writer.sessionId === sessionId);
160
+ }
161
+
129
162
  function records(store) {
130
163
  const file = path.join(store, 'observations-index.json');
131
164
  if (!fs.existsSync(file)) return [];
@@ -169,7 +202,7 @@ test('second turn keeps the previous final message; missing label is recorded, n
169
202
  hook(s.env, { ...base, hook_event_name: 'UserPromptSubmit', prompt: 'run the tests' });
170
203
  hook(s.env, { ...base, hook_event_name: 'Stop', last_assistant_message: 'All 12 tests pass. Want me to commit?' });
171
204
  hook(s.env, { ...base, hook_event_name: 'UserPromptSubmit', prompt: 'yes' });
172
- hook(s.env, { ...base, hook_event_name: 'Stop', last_assistant_message: `Committed.\n${LABEL.replace('"actionable","contextDependent":false', '"invalid","contextDependent":true')}` });
205
+ hook(s.env, { ...base, hook_event_name: 'Stop', last_assistant_message: `Committed.\n${LABEL.replace('"actionable"', '"invalid"')}` });
173
206
  const recs = records(s.store);
174
207
  assert.strictEqual(recs.length, 2);
175
208
  assert.strictEqual(recs[0].selfReport, null);
@@ -177,7 +210,7 @@ test('second turn keeps the previous final message; missing label is recorded, n
177
210
  const text = JSON.parse(fs.readFileSync(path.join(s.store, 'text', `${recs[1].contentSha256}.json`), 'utf8'));
178
211
  assert.strictEqual(text.prompt, 'yes');
179
212
  assert(text.previous.includes('Want me to commit?'));
180
- assert.strictEqual(recs[1].selfReport.contextDependent, true);
213
+ assert.strictEqual(recs[1].selfReport.validity, 'invalid');
181
214
  });
182
215
 
183
216
  test('Codex turn: final message from the rollout transcript, apply_patch counted', () => {
@@ -227,7 +260,7 @@ function writeFixtureStore(s) {
227
260
  { sid: 'e1', prompt: 'git status', label: LABEL.replace('"tier2"', '"tier1"'), tools: [] },
228
261
  { sid: 'e2', prompt: 'fix the flaky parser test', label: LABEL, tools: [['Edit', 'a.js'], ['Edit', 'b.js']] },
229
262
  { sid: 'e3', prompt: 'add a csv export command', label: LABEL.replace('"tier2"', '"tier3"').replace('["fix","test"]', '["feature"]'), tools: [['Edit', 'c.js']] },
230
- { sid: 'e4', prompt: 'go', label: LABEL.replace('"actionable","contextDependent":false', '"invalid","contextDependent":true'), tools: [] },
263
+ { sid: 'e4', prompt: 'go', label: LABEL.replace('"actionable"', '"invalid"'), tools: [] },
231
264
  ];
232
265
  for (const t of turns) {
233
266
  hook(s.env, { ...base, session_id: t.sid, hook_event_name: 'UserPromptSubmit', prompt: t.prompt });
@@ -261,6 +294,73 @@ test('exporter derives labels, splits by time and reports agreement', () => {
261
294
  assert(!fs.readFileSync(path.join(out, 'export-report.json'), 'utf8').includes('parser'), 'the report holds no text');
262
295
  });
263
296
 
297
+ test('router System One state is copied, bounded and fail-open', () => {
298
+ const absent = sandbox();
299
+ const absentRecord = observeWithRouter(absent, 'system-one-absent', undefined);
300
+ assert.strictEqual(absentRecord.router.systemOne, null, 'an ordinary router artifact has no System One field');
301
+
302
+ const bounded = sandbox();
303
+ const scoredIntents = Object.fromEntries(Array.from({ length: 14 }, (_, index) => [`intent-${index}`, index === 0 ? -1 : index === 1 ? 0.5 : 2]));
304
+ const oversized = {
305
+ version: 'v'.repeat(70), sha256: '0123456789abcdef', mode: 'live',
306
+ validity: { invalid: 1.5, ignored: 0.75 }, intents: scoredIntents,
307
+ tier: { tier1: -1, tier2: 0.4, tier3: 2, ignored: 0.75 },
308
+ decision: { validity: 'actionable', intents: ['d'.repeat(70), ...Array.from({ length: 13 }, (_, index) => `decision-${index}`)], tier: 'tier2', ignored: 'drop' },
309
+ ignored: 'drop',
310
+ };
311
+ const boundedRecord = observeWithRouter(bounded, 'system-one-oversized', oversized);
312
+ assert.deepStrictEqual(boundedRecord.router.systemOne, {
313
+ version: 'v'.repeat(64), sha256: '0123456789abcdef', mode: 'live',
314
+ validity: { invalid: 1 },
315
+ intents: Object.fromEntries(Array.from({ length: 12 }, (_, index) => [`intent-${index}`, index === 0 ? 0 : index === 1 ? 0.5 : 1])),
316
+ tier: { tier1: 0, tier2: 0.4, tier3: 1 },
317
+ decision: { validity: 'actionable', intents: ['d'.repeat(64), ...Array.from({ length: 11 }, (_, index) => `decision-${index}`)], tier: 'tier2' },
318
+ });
319
+
320
+ const malformed = sandbox();
321
+ const malformedRecord = observeWithRouter(malformed, 'system-one-malformed', {
322
+ version: 'bad', sha256: 'bad-hash', mode: 'shadow', validity: { invalid: '0.4' },
323
+ intents: null, tier: null, decision: { validity: 'maybe', intents: [], tier: 'tier9' },
324
+ });
325
+ assert.strictEqual(malformedRecord.router.systemOne, null, 'malformed router output is ignored without blocking the turn');
326
+ });
327
+
328
+ test('export includes only System One decision data and reports tier agreement per version', () => {
329
+ const s = sandbox();
330
+ const rows = [
331
+ { sid: 'system-one-a1', version: 'checkpoint-a', decisionTier: 'tier1', selfTier: 'tier1' },
332
+ { sid: 'system-one-a2', version: 'checkpoint-a', decisionTier: 'tier3', selfTier: 'tier2' },
333
+ { sid: 'system-one-b1', version: 'checkpoint-b', decisionTier: 'tier2', selfTier: 'tier2' },
334
+ { sid: 'system-one-none', version: null, decisionTier: null, selfTier: 'tier2' },
335
+ ];
336
+ const ids = new Map();
337
+ for (const item of rows) {
338
+ const systemOne = item.version === null ? undefined : {
339
+ version: item.version, sha256: '0123456789abcdef', mode: 'live',
340
+ validity: { invalid: 0.918273645 }, intents: null, tier: null,
341
+ decision: { validity: 'actionable', intents: ['feature'], tier: item.decisionTier },
342
+ };
343
+ const label = LABEL.replace('"tier2"', `"${item.selfTier}"`);
344
+ ids.set(item.sid, observeWithRouter(s, item.sid, systemOne, label).id);
345
+ }
346
+ const out = path.join(s.dir, 'system-one-export');
347
+ const exported = spawnSync(process.execPath, [EXPORTER, '--store', s.store, '--out', out], { encoding: 'utf8', env: s.env });
348
+ assert.strictEqual(exported.status, 0, exported.stderr);
349
+ const labels = fs.readFileSync(path.join(out, 'labels-observed.jsonl'), 'utf8').trim().split('\n').map(JSON.parse);
350
+ const byId = Object.fromEntries(labels.map(label => [label.id, label]));
351
+ assert.deepStrictEqual(byId[ids.get('system-one-a1')].systemOne, {
352
+ version: 'checkpoint-a', sha256: '0123456789abcdef', mode: 'live',
353
+ decision: { validity: 'actionable', intents: ['feature'], tier: 'tier1' },
354
+ });
355
+ assert.strictEqual(byId[ids.get('system-one-none')].systemOne, null);
356
+ assert(!fs.readFileSync(path.join(out, 'labels-observed.jsonl'), 'utf8').includes('0.918273645'), 'probability scores stay private');
357
+ const report = JSON.parse(fs.readFileSync(path.join(out, 'export-report.json'), 'utf8'));
358
+ assert.deepStrictEqual(report.systemOne.versions, {
359
+ 'checkpoint-a': { rows: 2, tierAgreement: { matches: 1, comparisons: 2, rate: 0.5 } },
360
+ 'checkpoint-b': { rows: 1, tierAgreement: { matches: 1, comparisons: 1, rate: 1 } },
361
+ });
362
+ });
363
+
264
364
  test('exporter can select post-cutoff rows with self-reported labels for training', () => {
265
365
  const s = sandbox();
266
366
  writeFixtureStore(s);
@@ -446,14 +546,18 @@ test('failed tool attempts are not counted as writes or loads', () => {
446
546
  assert.deepStrictEqual(lib.contradictions(r.selfReport, r.behavior), []);
447
547
  });
448
548
 
449
- test('owner review overrides context dependence, explicit false included', () => {
549
+ test('legacy context fields are ignored by export and review', () => {
450
550
  const s = sandbox();
451
551
  const base = { cwd: s.repo };
452
552
  hook(s.env, { ...base, session_id: 'cd-1', hook_event_name: 'UserPromptSubmit', prompt: 'continue' });
453
- hook(s.env, { ...base, session_id: 'cd-1', hook_event_name: 'Stop', last_assistant_message: `ok\n${LABEL.replace('"contextDependent":false', '"contextDependent":true')}` });
553
+ hook(s.env, { ...base, session_id: 'cd-1', hook_event_name: 'Stop', last_assistant_message: `ok\n${LEGACY_LABEL}` });
454
554
  hook(s.env, { ...base, session_id: 'cd-2', hook_event_name: 'UserPromptSubmit', prompt: 'rename foo to bar in util.js' });
455
555
  hook(s.env, { ...base, session_id: 'cd-2', hook_event_name: 'Stop', last_assistant_message: 'no label' });
456
556
  const [a, b] = records(s.store);
557
+ const indexPath = path.join(s.store, 'observations-index.json');
558
+ const index = JSON.parse(fs.readFileSync(indexPath, 'utf8'));
559
+ index.records.find(record => record.id === a.id).selfReport.contextDependent = true;
560
+ fs.writeFileSync(indexPath, JSON.stringify(index));
457
561
  const review = path.join(s.dir, 'decisions.json');
458
562
  fs.writeFileSync(review, JSON.stringify({ schemaVersion: 1, review: 'harness-observation-review', decisions: [
459
563
  { id: a.id, contextDependent: false }, { id: b.id, validity: 'actionable', contextDependent: false, tier: 'tier2' }] }));
@@ -461,15 +565,12 @@ test('owner review overrides context dependence, explicit false included', () =>
461
565
  const e = spawnSync('node', [EXPORTER, '--store', s.store, '--out', out, '--owner-review', review], { encoding: 'utf8', env: s.env });
462
566
  assert.strictEqual(e.status, 0, e.stderr);
463
567
  const labels = fs.readFileSync(path.join(out, 'labels-observed.jsonl'), 'utf8').trim().split('\n').map(JSON.parse);
464
- assert.strictEqual(labels.find(l => l.id === a.id).contextDependent, false);
465
- assert.deepStrictEqual((({ validity, contextDependent, tier }) => ({ validity, contextDependent, tier }))(labels.find(l => l.id === b.id)),
466
- { validity: 'actionable', contextDependent: false, tier: 'tier2' });
467
- fs.writeFileSync(review, JSON.stringify({ schemaVersion: 1, review: 'harness-observation-review', decisions: [{ id: a.id, contextDependent: 'no' }] }));
468
- const bad = spawnSync('node', [EXPORTER, '--store', s.store, '--out', out, '--owner-review', review], { encoding: 'utf8', env: s.env });
469
- assert.notStrictEqual(bad.status, 0, 'invalid owner decisions are rejected');
568
+ assert(!Object.hasOwn(labels.find(l => l.id === a.id), 'contextDependent'));
569
+ assert.deepStrictEqual((({ validity, tier }) => ({ validity, tier }))(labels.find(l => l.id === b.id)),
570
+ { validity: 'actionable', tier: 'tier2' });
470
571
  const html = path.join(s.dir, 'review.html');
471
572
  assert.strictEqual(spawnSync('node', [REVIEW, '--store', s.store, '--out', html], { encoding: 'utf8', env: s.env }).status, 0);
472
- assert(fs.readFileSync(html, 'utf8').includes('contextDependent'), 'the review page records context dependence');
573
+ assert(!fs.readFileSync(html, 'utf8').includes('contextDependent'), 'the review page no longer collects the removed field');
473
574
  });
474
575
 
475
576
  function agePending(store, sessionId, days) {
@@ -539,6 +640,8 @@ test('the label contract is the router output\'s last section and covers every t
539
640
  const last = sections[sections.length - 1];
540
641
  assert(/^=> TURN LABEL LINE/.test(last) && last.includes('harness-label'), 'the label contract is printed last');
541
642
  assert(/EVERY TURN/.test(last) && /null only when validity is invalid/.test(last));
643
+ assert(/cannot be understood from its own text and needs conversation context/.test(last));
644
+ assert(/agent-written dispatches and worker instructions are ordinary prompts/.test(last));
542
645
  const status = sections.find(x => x.startsWith('=> USER-VISIBLE HARNESS STATUS CONTRACT'));
543
646
  assert(status && !status.includes('harness-label'), 'not scoped under the non-trivial Harness Status contract');
544
647
  assert(/^14\. \*\*The turn label line is mandatory on every turn/m.test(fs.readFileSync(path.join(ROOT, 'AGENTS.md'), 'utf8')));
@@ -554,7 +657,7 @@ test('router/self agreement counts only turns where the router chose a tier', ()
554
657
  return { id: `r${k}`, source: 'observation', status: 'active', observedAt: new Date(now - (3 - k) * 1000).toISOString(),
555
658
  validUntil: new Date(now + 86400000).toISOString(), contentSha256: sha, host: 'claude', turn: 1, writer: { sessionId: `s${k}` },
556
659
  router: { tier: router }, behavior: lib.emptyBehavior(),
557
- selfReport: { v: 1, validity: 'actionable', contextDependent: false, tier: self, intents: [], workflow: null, skills: [] } };
660
+ selfReport: { v: 1, validity: 'actionable', tier: self, intents: [], workflow: null, skills: [] } };
558
661
  });
559
662
  fs.writeFileSync(path.join(s.store, 'observations-index.json'), JSON.stringify({ schemaVersion: 1, records: recs }));
560
663
  const out = path.join(s.dir, 'export');
@@ -565,16 +668,16 @@ test('router/self agreement counts only turns where the router chose a tier', ()
565
668
  });
566
669
 
567
670
  test('label slips seen live: unknown intents dropped, unterminated final line accepted', () => {
568
- const unknown = lib.parseLabelLine('ok\n<!-- harness-label {"v":1,"validity":"actionable","contextDependent":false,"tier":"tier1","intents":["lookup","git"],"workflow":null,"skills":[]} -->');
671
+ const unknown = lib.parseLabelLine('ok\n<!-- harness-label {"v":1,"validity":"actionable","tier":"tier1","intents":["lookup","git"],"workflow":null,"skills":[]} -->');
569
672
  assert.strictEqual(unknown.reason, null);
570
673
  assert.deepStrictEqual(unknown.label.intents, ['git']);
571
674
  assert.deepStrictEqual(unknown.label.unknownIntents, ['lookup']);
572
- const open = lib.parseLabelLine('M README.md\n\n<!-- harness-label {"v":1,"validity":"actionable","contextDependent":false,"tier":"tier1","intents":["git"],"workflow":null,"skills":[]}');
675
+ const open = lib.parseLabelLine('M README.md\n\n<!-- harness-label {"v":1,"validity":"actionable","tier":"tier1","intents":["git"],"workflow":null,"skills":[]}');
573
676
  assert.strictEqual(open.reason, null, 'a final label line missing its closing --> is accepted');
574
677
  assert.strictEqual(open.label.tier, 'tier1');
575
- const middle = lib.parseLabelLine('<!-- harness-label {"v":1,"validity":"actionable","contextDependent":false,"tier":"tier1","intents":[],"workflow":null,"skills":[]}\nmore text');
678
+ const middle = lib.parseLabelLine('<!-- harness-label {"v":1,"validity":"actionable","tier":"tier1","intents":[],"workflow":null,"skills":[]}\nmore text');
576
679
  assert.strictEqual(middle.label, null, 'an unterminated line is accepted only at the end');
577
- assert.strictEqual(lib.parseLabelLine('<!-- harness-label {"v":1,"validity":"actionable","contextDependent":false,"tier":"tier9","intents":[],"workflow":null,"skills":[]} -->').reason, 'label-invalid');
680
+ assert.strictEqual(lib.parseLabelLine('<!-- harness-label {"v":1,"validity":"actionable","tier":"tier9","intents":[],"workflow":null,"skills":[]} -->').reason, 'label-invalid');
578
681
  });
579
682
 
580
683
  test('Codex router hook returns its contract as JSON additionalContext', () => {
@@ -604,6 +707,7 @@ test('hooks are registered for both hosts and the contract asks for the label li
604
707
  }
605
708
  const router = spawnSync('node', [path.join(ROOT, 'harness-everything/scripts/kernel-router.js'), 'refactor the logger module across the repo'], { encoding: 'utf8' });
606
709
  assert(router.stdout.includes('harness-label'), 'the router contract asks for the label line');
710
+ assert(!router.stdout.includes('contextDependent'), 'the router template omits the removed field');
607
711
  assert(fs.readFileSync(path.join(ROOT, 'AGENTS.md'), 'utf8').includes('harness-label'));
608
712
  assert(fs.readFileSync(path.join(ROOT, 'PRIVACY.md'), 'utf8').includes('HARNESS_OBSERVATIONS=off'));
609
713
  const telemetry = fs.readFileSync(path.join(ROOT, 'hooks/scripts/lib/telemetry.js'), 'utf8');