harness-everything 0.36.2 → 0.36.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +17 -0
- package/ci/fixtures/doc-obligations/read-boundary/boundary-controls.json +211 -0
- package/ci/fixtures/doc-obligations/read-boundary/boundary-policy.json +325 -0
- package/ci/fixtures/doc-obligations/read-boundary/cases.json +14058 -0
- package/ci/fixtures/doc-obligations/read-boundary/expected.json +1 -0
- package/ci/fixtures/doc-obligations/read-boundary/identity-cases.json +119 -0
- package/ci/fixtures/doc-obligations/read-boundary/identity-expected.json +1 -0
- package/ci/fixtures/doc-obligations/read-boundary/scope-cases.json +208 -0
- package/ci/fixtures/doc-obligations/read-boundary/scope-expected.json +1 -0
- package/ci/fixtures/doc-obligations/reconciliation-prep/cases.json +2751 -0
- package/ci/fixtures/doc-obligations/reconciliation-prep/flood-entrypoint.js +5 -0
- package/ci/fixtures/doc-obligations/reconciliation-prep/hang-entrypoint.js +5 -0
- package/ci/fixtures/doc-obligations/reconciliation-prep/pending-red.json +648 -0
- package/ci/fixtures/doc-obligations/reconciliation-prep/provider-contract.json +100 -0
- package/ci/fixtures/doc-obligations/reconciliation-prep/trust-contract.json +188 -0
- package/ci/lib/doc-evidence-boundary-check.js +1240 -0
- package/ci/lib/doc-evidence-fixtures.js +459 -0
- package/ci/lib/doc-evidence-trace.js +171 -0
- package/ci/lib/doc-reconciliation-prep-fixtures.js +502 -0
- package/ci/lib/snapshot-stdin.js +27 -0
- package/ci/mechanism-2aw-project-docs-config.test.js +450 -10
- package/ci/mechanism-325-3b-preparation.test.js +382 -0
- package/ci/mechanism-341-boundary-enforcement.test.js +660 -0
- package/ci/mechanism-341-capture-module.test.js +357 -0
- package/ci/mechanism-341-mutation-runner.test.js +413 -0
- package/ci/mechanism-341-read-boundary.test.js +388 -0
- package/ci/mechanism-341-snapshot-stdin.test.js +40 -0
- package/ci/mutation-check.js +805 -45
- package/ci/mutation-loader.js +544 -57
- package/ci/prep/doc-reconciliation-red.js +407 -0
- package/ci/stress-341-boundary-control.js +85 -0
- package/docs/doc-evidence-baseline-binding.md +105 -19
- package/docs/doc-evidence-boundary.md +135 -0
- package/docs/doc-workflow-reconciliation.md +224 -0
- package/docs/document-lifecycle.md +67 -8
- package/harness-everything/SKILL.md +1 -1
- package/harness-everything/scripts/doc-evidence-capture.js +331 -0
- package/harness-everything/scripts/doc-evidence.js +72 -223
- package/harness-everything/scripts/project-docs-resolver.js +30 -13
- package/multi-agent-workspace/SKILL.md +1 -1
- package/multi-agent-workspace/scripts/project-docs-resolver.js +30 -13
- package/opencode-plugin/plugin.json +1 -1
- package/package.json +5 -3
- package/plugins/harness-everything/.codex-plugin/plugin.json +1 -1
- package/plugins/harness-everything/plugin.json +1 -1
- package/plugins/harness-everything/skills/harness-everything/SKILL.md +1 -1
- package/plugins/harness-everything/skills/harness-everything/scripts/doc-evidence-capture.js +331 -0
- package/plugins/harness-everything/skills/harness-everything/scripts/doc-evidence.js +72 -223
- package/plugins/harness-everything/skills/harness-everything/scripts/project-docs-resolver.js +30 -13
- package/plugins/harness-everything/skills/multi-agent-workspace/SKILL.md +1 -1
- package/plugins/harness-everything/skills/multi-agent-workspace/scripts/project-docs-resolver.js +30 -13
- package/plugins/harness-everything/skills/to-spec/SKILL.md +1 -1
- package/plugins/harness-everything/skills/to-spec/scripts/check-project-docs.js +136 -4
- package/plugins/harness-everything/skills/to-spec/scripts/project-docs-resolver.js +30 -13
- package/sbom.cdx.json +43 -7
- package/to-spec/SKILL.md +1 -1
- package/to-spec/scripts/check-project-docs.js +136 -4
- package/to-spec/scripts/project-docs-resolver.js +30 -13
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# Document-evidence boundary enforcement (#341 Phase 0C)
|
|
2
|
+
|
|
3
|
+
## C1 method decision
|
|
4
|
+
|
|
5
|
+
The C1 isolation trial does **not** establish enforcement equivalence for the document-evidence
|
|
6
|
+
read boundary. The approved dependency-free checker rejects nine of eleven weakened-boundary
|
|
7
|
+
controls in both distributions. N05 and N06 survive with complete C1 coverage and no diagnostics:
|
|
8
|
+
each adds an unapproved read inside an existing compatibility method, and C1 checks that method's
|
|
9
|
+
API/call surface without constraining its body. The plan therefore requires the bounded AST/source
|
|
10
|
+
supplement in C2 before any E0 acceptance. These survivors are recorded as survivors; they are not
|
|
11
|
+
out of scope, and corpus behavior does not count as their enforcement.
|
|
12
|
+
|
|
13
|
+
## Checked source graph and policy
|
|
14
|
+
|
|
15
|
+
`ci/lib/doc-evidence-boundary-check.js` exports only `checkBoundary({ distribution, sources,
|
|
16
|
+
policy, method })`. For this trial `method` is `isolation`, and `sources` is the exact evaluator and
|
|
17
|
+
capture source text supplied by the caller. The checker does not read source files itself. The
|
|
18
|
+
mechanism suite loads and checks each pair independently:
|
|
19
|
+
|
|
20
|
+
- canonical: `harness-everything/scripts/doc-evidence.js` and
|
|
21
|
+
`harness-everything/scripts/doc-evidence-capture.js`;
|
|
22
|
+
- packaged: `plugins/harness-everything/skills/harness-everything/scripts/doc-evidence.js` and
|
|
23
|
+
`plugins/harness-everything/skills/harness-everything/scripts/doc-evidence-capture.js`.
|
|
24
|
+
|
|
25
|
+
In the restricted VM, the evaluator's relative capture import resolves to the exact supplied
|
|
26
|
+
capture text. The capture module may import only the declared `crypto` builtin. The policy at
|
|
27
|
+
`ci/fixtures/doc-obligations/read-boundary/boundary-policy.json` is fixed input; the checker
|
|
28
|
+
validates its required module/context surfaces, return schemas, ownership rules, call-site list,
|
|
29
|
+
compatibility anchors, and nine coverage IDs. Missing or malformed policy schemas fail closed.
|
|
30
|
+
The C1 policy fields remain unchanged. C2 adds a separate, pinned AST supplement to the same
|
|
31
|
+
policy file; its final file hash is recorded in the C2 report.
|
|
32
|
+
|
|
33
|
+
The checker provides deterministic mechanism evidence for these C1 surfaces:
|
|
34
|
+
|
|
35
|
+
- exact evaluator/capture exports and import edges;
|
|
36
|
+
- evaluator context handoff and consumer keys;
|
|
37
|
+
- invocation and obligation capability names;
|
|
38
|
+
- reachable tagged return shapes and primitive schemas;
|
|
39
|
+
- recursively detached, plain owned views, opaque tokens, and repeated detached arrays;
|
|
40
|
+
- exact direct capture call-site counts, including rejection of computed and optional-chain calls;
|
|
41
|
+
- reviewed compatibility-site anchors.
|
|
42
|
+
|
|
43
|
+
It compiles and exercises the supplied modules with synthetic objects; it does not wrap or freeze
|
|
44
|
+
production caller objects or add production reads. The returned-view exercise checks reachable
|
|
45
|
+
values and ownership. It is not source-flow analysis. Direct capability aliases, cross-function
|
|
46
|
+
transfers, and statements or dormant branches added inside an already permitted compatibility
|
|
47
|
+
method remain possible C1 bypasses. Compatibility anchors prove that reviewed text is present at
|
|
48
|
+
declared sites; they do not constrain the complete body or control-flow footprint of those sites.
|
|
49
|
+
|
|
50
|
+
## Trial evidence
|
|
51
|
+
|
|
52
|
+
`ci/mechanism-341-boundary-enforcement.test.js` applies each transform in
|
|
53
|
+
`ci/fixtures/doc-obligations/read-boundary/boundary-controls.json` exactly once to the selected
|
|
54
|
+
in-memory pair, parses both changed texts, and calls the checker with the unchanged frozen policy.
|
|
55
|
+
It checks the fixture-pinned intended rule for each rejection, records complete-coverage survivors,
|
|
56
|
+
and includes a diagnostic-sink mutation that must make the N01/N02/N03 rejection assertions fail.
|
|
57
|
+
Unchanged canonical and packaged pairs are positive checks.
|
|
58
|
+
|
|
59
|
+
On Node.js 24.14.1 the focused suite passed, and `npm run test:mechanism` discovered 106 suites and
|
|
60
|
+
passed all 106, including the C1 suite. For each distribution the unchanged pair passed with all
|
|
61
|
+
nine coverage IDs complete and no diagnostics. The 11 controls produced nine `REJECTED`, two
|
|
62
|
+
`SURVIVED`, and zero `UNCHECKED` outcomes:
|
|
63
|
+
|
|
64
|
+
| Controls | Result in both distributions |
|
|
65
|
+
|---|---|
|
|
66
|
+
| N01d, N02d, N01, N02 | Rejected by the exact evaluator context surface |
|
|
67
|
+
| N03, N04 | Rejected by returned-view ownership checks |
|
|
68
|
+
| N07 | Rejected by capture call-site drift under COMP-C5 |
|
|
69
|
+
| N08 | Rejected by the exact obligation capability surface |
|
|
70
|
+
| N09 | Rejected by the exact module export surface |
|
|
71
|
+
| N05, N06 | Survived with complete coverage and no diagnostics |
|
|
72
|
+
|
|
73
|
+
N05 adds a candidate-bound read within the existing COMP-C2-BOUND method. N06 adds a dormant
|
|
74
|
+
unvisited read within the compatibility boundary. Both demonstrate the same unbounded-method-body
|
|
75
|
+
gap, including when ordinary corpus cases do not take the changed branch. The C1 fixture pins them
|
|
76
|
+
as survivors; C2 below supplies their structural rejection. The C1 trial does not qualify E0 or
|
|
77
|
+
establish live-host enforcement.
|
|
78
|
+
|
|
79
|
+
## C2 structural supplement
|
|
80
|
+
|
|
81
|
+
The checker retains `method: "isolation"` as the C1 leg and adds `method: "ast"` as a separate
|
|
82
|
+
structural leg. The AST leg parses the exact evaluator/capture texts passed by its caller and never
|
|
83
|
+
substitutes source read from disk. Its reviewed policy pins both complete module AST fingerprints
|
|
84
|
+
and named targets for `checkDocObligations`, `evaluateObligation`, its exact consumer-context
|
|
85
|
+
destructure, `captureEntry`, `createInvocationCapture`, `compatibilityCandidateBound`,
|
|
86
|
+
`isPlainObject`, and `module.exports`. Each named target assigns alpha-normalized names to uniquely
|
|
87
|
+
declared identifiers that occur in that target, numbering them in target-local AST order. A
|
|
88
|
+
declaration added elsewhere therefore cannot renumber unrelated target fingerprints. A changed
|
|
89
|
+
named target emits its structural rule; module-wide drift also emits `AST_SOURCE_STRUCTURE`.
|
|
90
|
+
Thus a new read, dormant branch, helper edge, handoff field, or export cannot be admitted merely
|
|
91
|
+
because it uses an existing method name or is not reached by the corpus.
|
|
92
|
+
|
|
93
|
+
Fingerprints omit comments, source locations, and literal raw spelling; they preserve AST node
|
|
94
|
+
shape, operators, guards, property names, and statement/call order. The target normalizer retains
|
|
95
|
+
safe renames of uniquely declared enclosing locals referenced by nested targets, while a local
|
|
96
|
+
addition to one target cannot shift another target's names. The full-module fingerprint applies the
|
|
97
|
+
same alpha normalization across the whole program. Names with ambiguous declarations are kept
|
|
98
|
+
verbatim, making some otherwise safe renames require an explicit policy review. The whole-module
|
|
99
|
+
fingerprint is deliberately conservative: any other semantic source change needs a reviewed
|
|
100
|
+
fingerprint update and the corresponding trace replay.
|
|
101
|
+
Unknown walker nodes, parse failures, missing targets, policy errors, unavailable parser packages,
|
|
102
|
+
and parser-version drift fail the AST coverage gate.
|
|
103
|
+
|
|
104
|
+
Acorn 8.19.0 and acorn-walk 8.3.5 are exact development dependencies used only by CI. The checker
|
|
105
|
+
also verifies the installed versions against the frozen policy. The parser is not part of the
|
|
106
|
+
installed skill runtime. Both canonical and packaged source pairs are checked independently.
|
|
107
|
+
|
|
108
|
+
The C2 in-memory trial applied all 11 frozen N01–N09 transforms (including N01d/N02d) to each
|
|
109
|
+
distribution. All 22 attempts had complete AST coverage and were rejected with their fixture-pinned
|
|
110
|
+
intended rule, including N05/N06 as `COMP-C2-BOUND`. Unchanged pairs passed. A unique local rename
|
|
111
|
+
combined with CRLF/trailing-comment formatting passed in each distribution. A syntax-invalid
|
|
112
|
+
control produced an incomplete AST result with `AST_PARSE_COMPLETE`, not a boundary PASS. The
|
|
113
|
+
existing C1 enforcement suite still passes with its original isolation outcomes, and the repository
|
|
114
|
+
mechanism discovery run passed all 106 suites on Node.js 24.14.1. These are deterministic mechanism
|
|
115
|
+
results; they do not establish live-host enforcement or qualify E0. C3 mutation/compatibility
|
|
116
|
+
qualification and the final C4 merged-SHA gates remain required. See
|
|
117
|
+
[the baseline-binding contract](doc-evidence-baseline-binding.md) for the read roles and
|
|
118
|
+
compatibility behavior the supplement must preserve.
|
|
119
|
+
|
|
120
|
+
### C3 target-local repair
|
|
121
|
+
|
|
122
|
+
The C3 attribution probe added an unused local to capture's `isPlainObject`. After the target-local
|
|
123
|
+
normalizer change, the AST reports `AST_PROGRAM_DRIFT` plus exactly one target drift:
|
|
124
|
+
`isPlainObject` under `AST_SOURCE_STRUCTURE`; no unrelated target fingerprint moves. The established
|
|
125
|
+
local-rename positive still passes.
|
|
126
|
+
|
|
127
|
+
The policy also pins `evaluateObligation`'s context-consumer destructure as the
|
|
128
|
+
`@evaluateObligation-context-destructure` target under `EVALUATOR_CONTEXT_EXACT`. N02c was applied
|
|
129
|
+
and checked separately in both distributions: it emits that exact target/rule pair with complete
|
|
130
|
+
AST coverage. The enclosing `evaluateObligation` function fingerprint also detects the body edit
|
|
131
|
+
under `CAPTURE_CALL_SITES`; the precise destructure target independently supplies the intended
|
|
132
|
+
context-surface rejection. The 11 existing AST controls were re-run in both distributions and all
|
|
133
|
+
22 were rejected under their intended rule. N02c is also on the AST route in the control fixture, and
|
|
134
|
+
the enforcement suite asserts its context-destructure target on both distributions. These results
|
|
135
|
+
address C3's two executed findings.
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
# Document workflow reconciliation — Phase 3b preparation
|
|
2
|
+
|
|
3
|
+
**Status: design and fixture contracts only. Runtime reconciliation is not shipped or activated.**
|
|
4
|
+
This document refines the planned [document lifecycle contract](document-lifecycle.md#phase-3b--narrow-integration-contract-planned-not-shipped).
|
|
5
|
+
The [owner's E0/E1 decision](https://github.com/dyphn1/Harness-everything/issues/325#issuecomment-6283237637)
|
|
6
|
+
permits design and RED preparation before #341 E0. Even a default-OFF runtime implementation
|
|
7
|
+
MUST NOT merge or activate before E0 is reviewed and accepted.
|
|
8
|
+
|
|
9
|
+
## Entry gates and ownership
|
|
10
|
+
|
|
11
|
+
| Gate | Permitted scope |
|
|
12
|
+
| --- | --- |
|
|
13
|
+
| Preparation, before E0 | This design, provider/trust data contracts, RED fixtures and legacy compatibility controls |
|
|
14
|
+
| Accepted #341 E0 | Limited, opt-in, reversible consumer on the existing non-Fable typed workflow path, including the minimum trusted producer |
|
|
15
|
+
| #341 E1 GO | Expansion beyond that limited consumer, after sufficient genuine development/review exposure; initial target 2–3 cycles is not a time-only gate |
|
|
16
|
+
| #325 H1–H4 and paired-task architectural evidence | Inputs to separately owner-approved #320 promotion; neither E0 nor E1 alone approves a registry/CDG |
|
|
17
|
+
|
|
18
|
+
Shared read/binding/decision defects return to #341 with fixture-first correction and affected
|
|
19
|
+
re-observation. Documentation policy and host/VCS provenance belong to #325. The existing
|
|
20
|
+
checker API and result schema remain unchanged. This consumer adds no router, provider requirement,
|
|
21
|
+
automatic step insertion, tool/Stop lock, generator execution during discovery, or auto-commit.
|
|
22
|
+
|
|
23
|
+
## Existing seams and planned credit order
|
|
24
|
+
|
|
25
|
+
These source anchors describe the preparation baseline, `dba470813cb383945d405686cc6a65bd969b57ec`.
|
|
26
|
+
They are source-traced behavior, not live-host evidence.
|
|
27
|
+
|
|
28
|
+
| Boundary | Current implementation | Post-E0 integration requirement |
|
|
29
|
+
| --- | --- | --- |
|
|
30
|
+
| Authored step | `hooks/scripts/lib/workflow-obligations.js:updateStep()` (lines 617–645) validates active step/bindings and text, then persists pass | An authored `doc-change` step MAY advance under this existing contract; that grants no verified document-MUST credit |
|
|
31
|
+
| Aggregate derivation | `syncTypedAggregateObligations()` (586–614) derives execute/verify from step statuses | Authored execute may reflect completed authored steps; verification PASS requires current document reconciliation |
|
|
32
|
+
| Verification write | `hooks/scripts/workflow-disposition.js:279–296` delegates to `updateStep()` | After existing authorization/binding checks, reconcile before writing verification-step or aggregate verify PASS |
|
|
33
|
+
| Direct aggregate write | `updateObligation()` (520–537) accepts nonempty evidence text and persists disposition | Guard direct `obligation execute\|verify --disposition pass` on doc-governed typed scope; text cannot bypass derived/reconciled evidence |
|
|
34
|
+
| Unresolved calculation | `unresolvedObligations()` (648–682) checks generic obligations and active bindings | Include missing/unknown/unavailable/failed document evidence and current identity freshness |
|
|
35
|
+
| Final completion | `hooks/scripts/workflow-stop-gate.js:36–64` calls unresolved calculation before writing `state = 'satisfied'` | Recollect identities and reconcile immediately before completion credit, including already-persisted PASS |
|
|
36
|
+
|
|
37
|
+
An ordered `doc-change → review → verification` remains reachable. Authored work does not need
|
|
38
|
+
to invent evidence that a later reviewer or authorized verification will produce. At verification,
|
|
39
|
+
missing evidence leaves verification unresolved; later valid evidence permits a retry. A direct
|
|
40
|
+
aggregate PASS attempt with unsatisfied document MUSTs MUST be rejected or ignored, including
|
|
41
|
+
`execute` as well as `verify`; this does not prohibit internally derived authored execute status.
|
|
42
|
+
|
|
43
|
+
Scope comes from trusted task/config/diff facts. Existing typed plans that acquire doc-governed
|
|
44
|
+
scope MUST be checked against that current scope; their old aggregate PASS is not completion
|
|
45
|
+
proof. Omitting a document result or authored step cannot erase a diff-derived expected MUST.
|
|
46
|
+
Non-document typed plans retain existing bindings, authorization and disposition behavior.
|
|
47
|
+
|
|
48
|
+
Supported reconciliation requires `stepBindingsEnabled === true` and a non-Fable strategy.
|
|
49
|
+
Fable stage paths (`fable-staged`, `fable-parallel`, `fable-multi-agent-workspace`) and untyped
|
|
50
|
+
workflows are explicitly unavailable for pilot credit. Loaded stage bindings are not document
|
|
51
|
+
verification. Existing unsupported-path lifecycle behavior remains; unavailable pilot status
|
|
52
|
+
does not add a host lock. Both Stop reminder surfaces continue to return success to the host.
|
|
53
|
+
|
|
54
|
+
## Expected obligations and evidence
|
|
55
|
+
|
|
56
|
+
The future adapter obtains trusted inputs, calls existing `deriveDocFacts()` and
|
|
57
|
+
`deriveDocObligations()`, then `checkDocObligations()`, and reconciles against the **expected**
|
|
58
|
+
obligation set. It MUST NOT treat a returned subset, empty results, or loaded skill as completion.
|
|
59
|
+
Every expected applicable MUST needs a matching scope/identity-bound `observed` + `pass` result
|
|
60
|
+
supported by independently accepted producer records. Missing, duplicate/conflicting, stale or
|
|
61
|
+
untrusted results leave the MUST unsatisfied. Unknown applicability remains unresolved; N/A
|
|
62
|
+
requires its derivation reason. SHOULD reminders do not become new gates.
|
|
63
|
+
|
|
64
|
+
The checker's observation values remain `observed`, `not-observed`, `unavailable`, `unresolved`;
|
|
65
|
+
its outcome values remain `pass`, `fail`, `none`. Adapter reason states such as `unknown` are
|
|
66
|
+
separate from those enums. A structured pilot report is separate from the checker result.
|
|
67
|
+
No timestamps, free text or result field can establish independent provenance on its own.
|
|
68
|
+
|
|
69
|
+
## Minimum trusted producer
|
|
70
|
+
|
|
71
|
+
The [trust data contract](../ci/fixtures/doc-obligations/reconciliation-prep/trust-contract.json)
|
|
72
|
+
defines the exact identity tuple and fixture/report fields. Its positive examples are simulated
|
|
73
|
+
test data, not runtime attestations. Production MUST derive or verify origins from host/VCS state;
|
|
74
|
+
a caller cannot gain trust by copying these JSON fields or supplying different actor names.
|
|
75
|
+
|
|
76
|
+
| Input | Required binding | Unknown/unavailable condition |
|
|
77
|
+
| --- | --- | --- |
|
|
78
|
+
| Baseline | Recorded baseline tree, whole identity and per-path SHA256 from the same repository-stored bytes | Missing history, unmatched snapshot origin, contradictory tree/path values |
|
|
79
|
+
| Candidate | Actual candidate under review, complete inventory including new/untracked/deleted/rename paths and stored-byte semantics | Partial inventory, unsupported export, or only a PRD-set digest offered as whole candidate identity |
|
|
80
|
+
| Config | Resolver-selected validated value, source/active-host selection and exact bytes parsed, bound to configDigest | Invalid/ambiguous selection, presence-only digest, substituted or changed bytes |
|
|
81
|
+
| Task | Workspace/session/workflow identity and revision, task ID, effective scope digest and PRD root | Replayed task, narrowed/substituted scope or unsupported custom PRD root |
|
|
82
|
+
| Execution/verification | Exact command, integer exit code, event/report reference, producer/principal identity, scope and complete identity tuple | Text-only claim, uncorrelated event, missing verifier, contradiction or replay |
|
|
83
|
+
| Review | Host-validated independent human/cold-verifier principal, current reviewed scope/artifacts, approve verdict, summary and reference | Missing/mismatched reviewer, self-review by author/executor or stale approval |
|
|
84
|
+
|
|
85
|
+
Preserve the checker's current `docs/prd/` envelope boundary; an unsupported custom root is
|
|
86
|
+
unavailable, not silently generalized. The PRD-set digest and whole-candidate identity are distinct.
|
|
87
|
+
Existing `state-persist.js:25–47` and `lib/observations.js:258,436` are potential event seams,
|
|
88
|
+
not evidence that today's timestamps/counters already carry the required provenance tuple.
|
|
89
|
+
Unavailable host capabilities remain visible and cannot earn PASS. A host export must establish
|
|
90
|
+
repository-stored bytes across line endings; raw checkout-byte equality alone does not prove it.
|
|
91
|
+
|
|
92
|
+
At verification and completion, recollect the tuple and validate relevant execution/review
|
|
93
|
+
bindings. Later candidate/config/task/plan changes invalidate old credit despite persisted PASS.
|
|
94
|
+
Collection never implicitly runs a verifier, generator or network fetch; new executions require
|
|
95
|
+
the existing authorized verification path. Snapshot consistency is not VCS or reviewer attestation.
|
|
96
|
+
|
|
97
|
+
## Advisory provider contract
|
|
98
|
+
|
|
99
|
+
The [provider data contract](../ci/fixtures/doc-obligations/reconciliation-prep/provider-contract.json)
|
|
100
|
+
specifies the planned interface:
|
|
101
|
+
|
|
102
|
+
```text
|
|
103
|
+
suggestDocProviders({ activeStep, neededCapabilities, availableProviderMetadata, hostCapabilities })
|
|
104
|
+
→ { suggestions: [{ capability, providerId, availability, reason }], unavailable: [...] }
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Only metadata relevant to the active step may be exposed. Candidate metadata supplies declared
|
|
108
|
+
capabilities, host requirements and existing binding/tool locators; it does not execute commands
|
|
109
|
+
or load SKILL.md content. Candidates are optional. Swapping or omitting a provider cannot alter
|
|
110
|
+
expected obligations, authorize a tool, or convert missing evidence to PASS. Existing binding
|
|
111
|
+
resolution handles a chosen provider; independent valid evidence can satisfy a MUST without it.
|
|
112
|
+
An unsupported host reports unavailable capability/reason. H1/H2 runtime proof remains pending.
|
|
113
|
+
|
|
114
|
+
## One switch and rollback
|
|
115
|
+
|
|
116
|
+
Planned switch: `HARNESS_DOC_RECONCILIATION_PILOT=1`. Missing, `0`, or any other value is OFF.
|
|
117
|
+
No production switch reader or runtime import is part of preparation. Test children explicitly
|
|
118
|
+
set or remove the variable; requesting ON during prep still runs existing legacy production code.
|
|
119
|
+
|
|
120
|
+
After E0, OFF preserves legacy disposition and grants zero pilot verification credit. Legacy
|
|
121
|
+
`pass` or `satisfied` is not relabeled as document verification. Rollback removes the opt-in,
|
|
122
|
+
records that pilot credit is disabled, and preserves session/evidence history. ON→OFF→ON MUST
|
|
123
|
+
recollect/reconcile rather than trust any persisted pilot or legacy PASS. Withholding pilot
|
|
124
|
+
credit never rejects Stop or changes host authorization. Runtime activation still requires E0;
|
|
125
|
+
the switch cannot serve as a substitute for that acceptance gate.
|
|
126
|
+
|
|
127
|
+
## Preparation harness handoff
|
|
128
|
+
|
|
129
|
+
[provider-contract.json](../ci/fixtures/doc-obligations/reconciliation-prep/provider-contract.json)
|
|
130
|
+
and [trust-contract.json](../ci/fixtures/doc-obligations/reconciliation-prep/trust-contract.json)
|
|
131
|
+
are versioned plain-data specifications consumed by the preparation harness, not a production
|
|
132
|
+
schema registry. Required shape and enums are validated before replay. Negative recipes remain
|
|
133
|
+
inside their declared fixture payloads; assertions use stable IDs and explicit paths into captured
|
|
134
|
+
replay reports.
|
|
135
|
+
|
|
136
|
+
The executable source of the current case inventory is
|
|
137
|
+
[cases.json](../ci/fixtures/doc-obligations/reconciliation-prep/cases.json). It contains 16
|
|
138
|
+
replay cases:
|
|
139
|
+
|
|
140
|
+
| Family | Executable case IDs | Coverage |
|
|
141
|
+
| --- | --- | --- |
|
|
142
|
+
| P01 | `P01` | Binding and free text without document evidence |
|
|
143
|
+
| P02 | `P02a`, `P02b`, `P02c`, `P02d`, `P02e`, `P02f`, `P02g` | Missing result, failed execution, unknown observation, unavailable verifier control, self-review, forged identity, partial MUST coverage |
|
|
144
|
+
| P03 | `P03` | Ordered work with evidence arriving before a later verification retry |
|
|
145
|
+
| P04 | `P04` | Direct aggregate execute/verify PASS bypass |
|
|
146
|
+
| P05 | `P05` | Candidate/config freshness, including ON→OFF→ON |
|
|
147
|
+
| P06 | `P06` | Non-document typed-plan compatibility control |
|
|
148
|
+
| P07 | `P07-fable-staged`, `P07-fable-parallel`, `P07-fable-multi-agent-workspace`, `P07u` | Three Fable strategies and the untyped compatibility control |
|
|
149
|
+
|
|
150
|
+
P08 is the suite-level source/package parity check across every replay and the shared runtime bytes;
|
|
151
|
+
it is not a separate `cases.json` record. The 16 cases currently produce 13 `EXPECTED_RED` cases
|
|
152
|
+
and three `CONTROL_PASS` cases (`P02d`, `P06`, and `P07u`); all replay legs must agree. These
|
|
153
|
+
statuses qualify the preparation harness only and do not grant document credit.
|
|
154
|
+
|
|
155
|
+
The [pending-red.json registry](../ci/fixtures/doc-obligations/reconciliation-prep/pending-red.json)
|
|
156
|
+
records 62 exact source/packaged gaps. Its root records `schemaVersion`, `phase`, `baselineSha`,
|
|
157
|
+
`runtimeFingerprint`, and `entries`. The runner validates schema version, a 40-hex capture
|
|
158
|
+
`baselineSha`, a 64-hex `runtimeFingerprint`, and the entry array. Each entry has exactly
|
|
159
|
+
`caseId`, `assertionId`, `distribution`, `baselineSha`, `actual`, `desired`, `blocker`, and
|
|
160
|
+
`reasonCode`; `assertionId` names an ON assertion as
|
|
161
|
+
`<caseId>.on.<expectation-id>`, `distribution` is `source` or `packaged`, and each entry's
|
|
162
|
+
`baselineSha` must equal the registry capture. Missing JSON values use the explicit
|
|
163
|
+
`{ "kind": "absent" }` marker.
|
|
164
|
+
|
|
165
|
+
`baselineSha` records the capture commit for provenance; it is not compared with the current
|
|
166
|
+
checkout and does not qualify a gap by itself. Qualification uses `runtimeFingerprint`: the
|
|
167
|
+
runner hashes the ordered paths and exact bytes in its `FINGERPRINT_FILES` list, framing each
|
|
168
|
+
path and file content with NUL bytes. The current list is
|
|
169
|
+
`hooks/scripts/lib/workflow-obligations.js`, `hooks/scripts/workflow-disposition.js`, and
|
|
170
|
+
`hooks/scripts/workflow-stop-gate.js`; `doc-evidence.js` is excluded because the P01–P08 replays
|
|
171
|
+
do not load it. A changed fingerprint fails qualification. To refresh deliberately, the runner
|
|
172
|
+
prints an explicit command such as
|
|
173
|
+
`node ci/prep/doc-reconciliation-red.js --recapture-candidate ci/fixtures/doc-obligations/reconciliation-prep/pending-red.candidate.json --baseline-sha <40-hex-commit>`.
|
|
174
|
+
It writes a separate candidate; review its actual/desired values and reason codes before replacing
|
|
175
|
+
the committed registry, then remove the candidate. Nothing is auto-accepted.
|
|
176
|
+
|
|
177
|
+
The [preparation runner](../ci/prep/doc-reconciliation-red.js) has two replay modes:
|
|
178
|
+
`--strict` exits 1 when a desired-contract gap remains; `--expect-red` exits 0 only when every
|
|
179
|
+
current mismatch matches an exact case/assertion/distribution/actual/desired registry entry and
|
|
180
|
+
all controls and parity checks pass. A stale fingerprint, unexpected PASS, unqualified mismatch,
|
|
181
|
+
wrong assertion, crash, missing fixture, import error, or other infrastructure failure fails
|
|
182
|
+
qualification. Infrastructure/registry errors exit 2. Expected RED is never a mutation kill or
|
|
183
|
+
document verification credit.
|
|
184
|
+
|
|
185
|
+
Each action may declare `expectExit` per mode (`off` and `on`; an exit code or array of exit codes,
|
|
186
|
+
default `0`) for an intentional rejection. Before registry matching or parity, a replay action with a
|
|
187
|
+
spawn error, a signal, no exit status, an exit outside its policy, or missing required output (the
|
|
188
|
+
routing checkpoint on `route`, a JSON envelope with a string `state` on controller operations) makes
|
|
189
|
+
the case `INFRASTRUCTURE`. That exits 2 and never qualifies as a gap, even when the other legs or
|
|
190
|
+
later assertions still match.
|
|
191
|
+
|
|
192
|
+
Every replay child has a 10 s deadline, a 4 MiB output bound and a SIGKILL on expiry. A child that
|
|
193
|
+
times out (`ETIMEDOUT`), exceeds the output bound (`ENOBUFS`) or is force-terminated is an
|
|
194
|
+
`INFRASTRUCTURE` fault. A test copy of the corpus may only shorten the deadline and substitute a
|
|
195
|
+
fixture script; the committed corpus carries neither.
|
|
196
|
+
|
|
197
|
+
The runner fails fast at three levels, so one shared fault costs one deadline, not one per replay. A
|
|
198
|
+
replay stops at its first infrastructure fault and runs no later action. The case's remaining
|
|
199
|
+
replays (both legs, both modes) are not run. The first `INFRASTRUCTURE` case ends the run. Each case
|
|
200
|
+
not reached is reported `NOT_RUN` with its reason, so the report never looks complete. An
|
|
201
|
+
`INFRASTRUCTURE` case names its `offending` leg, mode, action and fault, and `replaysRun` counts the
|
|
202
|
+
replays actually started. `--recapture-candidate` refuses at the first infrastructure case.
|
|
203
|
+
|
|
204
|
+
The discovered [preparation suite](../ci/mechanism-325-3b-preparation.test.js) validates the
|
|
205
|
+
inventory, green OFF controls, exact pending-gap qualification and parity. Its report root contains
|
|
206
|
+
`schemaVersion`, `mode`, `baselineSha`, `runtimeFingerprintMatches`, `pilotCredit`, and `cases`.
|
|
207
|
+
Each case reports `caseId`, `status`, `qualifiedGaps`, `parity`, and `assertions`; each assertion
|
|
208
|
+
identifies its `leg` (`source` or `packaged`), `mode` (`off` or `on`), full assertion `id`,
|
|
209
|
+
classification `status`, and `actual`, with `desired`/`registered` values when applicable. Case
|
|
210
|
+
statuses are `EXPECTED_RED`, `CONTROL_PASS`, `INFRASTRUCTURE`, `NOT_RUN`, or `FAIL`; assertion statuses distinguish
|
|
211
|
+
passing controls, unexpected passes, qualified gaps, unqualified gaps, and registry mismatches.
|
|
212
|
+
`pilotCredit` is always false. `reportOrigin` belongs to the replay's `pilotReportOrigin`
|
|
213
|
+
(`runtime` only for an actual runtime report, otherwise `harness` for a synthesized marker);
|
|
214
|
+
it is not a field on the preparation report's assertion rows. A harness-synthesized unavailable
|
|
215
|
+
marker is never presented as a production report.
|
|
216
|
+
## Implementation and acceptance after E0
|
|
217
|
+
|
|
218
|
+
After accepted E0, implement the minimum trusted producer and optional provider adapter, add
|
|
219
|
+
the switch reader and narrow W/D/completion integration, package generated copies, and remove
|
|
220
|
+
pending exemptions as strict tests become GREEN. Require every expected applicable MUST and
|
|
221
|
+
freshness check, source/package compatibility, negative cases and relevant green CI including
|
|
222
|
+
Windows. A green preparation harness establishes only its declared mechanism/data checks.
|
|
223
|
+
It does not claim runtime reconciliation, E0/E1 acceptance, independent host provenance or
|
|
224
|
+
architectural benefit. E1 observations and H1–H4/paired evaluation remain separate gates.
|
|
@@ -4,16 +4,75 @@ Contract for the documentation family: project docs configuration (D5), document
|
|
|
4
4
|
|
|
5
5
|
Documentation is a **consumer** of the #320 workflow/obligation abstractions. Nothing here is a second router, a standing maintenance loop or a cognitive lock: every check is a pure function that reports diagnostics.
|
|
6
6
|
|
|
7
|
-
## Scope of this slice
|
|
7
|
+
## Scope of this slice (status as of 2026-10-20)
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
This table distinguishes merged mechanism code from end-to-end workflow integration. The last reviewed `main` commit is `29b1d65b398e2622af97bf067078373b7fa76b26` (v0.36.2). That release commit carries `[skip ci]` and only bumps package/distribution versions on top of `e5d22584e243d5b5e587ee0279625e97a9033160`, whose full-gate `CI` run [39374474269](https://github.com/dyphn1/Harness-everything/actions/runs/39374474269) completed with every job succeeded. The historical Windows System One resident teardown (`S1-RS15`) was observed in attempt 1 of [run 39175240370](https://github.com/dyphn1/Harness-everything/actions/runs/39175240370) on `main@75e04359ae5bf11a41739f8eb04d25a76ee8f3a7`; that run completed successfully on attempt 2 and says nothing about `29b1d65`. Treat the resident teardown as a known platform limitation only when a current run on the exact SHA reproduces it, and require an all-green full-gate run for that SHA before calling any baseline green.
|
|
10
|
+
|
|
11
|
+
| Phase / prerequisite | Verified implementation and remaining work |
|
|
12
|
+
| --- | --- |
|
|
13
|
+
| 0 — contract + RED fixtures | Agreed decisions in this document, #325 and #327; fixtures under `ci/fixtures/doc-lifecycle/`; preserve earlier design history |
|
|
14
|
+
| 1a — `project-docs.json` loader | **Merged** in #327; host-only malformed manifest protection remains a separate correction in #331 / draft PR #333 |
|
|
15
|
+
| 2 — roles, IDs, aliases, legacy, supersession, index, D6.9 PRD revisions | **Merged** in #327; do not rebuild this lifecycle logic for Phase 3 |
|
|
16
|
+
| Step-type prerequisite (#326) | **Complete:** PR #328 merged; Harness-owned `doc-change` is explicitly declared, has no implicit TDD binding, and is not auto-inserted by router/System One |
|
|
17
|
+
| 3a — document facts, obligations and evidence producer | **Merged** in #334: `harness-everything/scripts/doc-obligations.js` and `doc-evidence.js`. H3/H4 have *partial deterministic mechanism* coverage, not integrated workflow evidence. Known limitations: caller-attested envelope; `configDigest` presence-only; `candidateDigest` restricted to `docs/prd/`; missing independent task-scope binding. Deleted and old rename paths are bound to trusted per-path baseline evidence ([doc-evidence-baseline-binding.md](doc-evidence-baseline-binding.md), #335 fixed by #342), with workflow-disposition reconciliation left out of scope |
|
|
18
|
+
| 3b — pilot-local provider suggestions and workflow evidence reconciliation | **Preparation complete; runtime implementation not started and #341-gated.** Provider metadata, adapter/interface design and RED fixtures may proceed in parallel with #341 Phase 0A–0C; **runtime** Evidence Reconciliation must not merge or activate before **#341 E0** is accepted (see the entry-gates bullet in the 3b contract below). Implement only a thin consumer adapter; do not wait for a generic #320 registry/CDG. Includes the minimum trusted producer for baseline/candidate/config/task-scope/reviewer identity, fail-closed negative cases, doc-governed gating on `step`/`obligation` writes at the verification/completion boundary, and freshness re-check at completion. The #335 baseline-bound deletion/rename evidence has shipped (#342); claiming complete integration still requires the reconciliation gate above. Preserve existing required-binding compatibility |
|
|
19
|
+
| 3c — H1–H4 and paired-task evaluation | **Not started.** Mechanism tests alone are insufficient for architecture promotion; compare frozen baseline and treatment on real bounded tasks, success/failure first, then conditional cost and latency |
|
|
20
|
+
| 1b — shared documentation craft and family metadata | **Splittable.** Shared references and thin skill consumers can proceed independently. A small optional logical-family metadata seam may be piloted; physical skill directory moves remain blocked on #320 identity/path separation |
|
|
21
|
+
| 4 — derived-view generators and `describes:` drift | **Not started.** Preserve generator authorization, deterministic regenerate-equals and scoped reminder semantics |
|
|
22
|
+
|
|
23
|
+
### Phase 3b — narrow integration contract (planned, not shipped)
|
|
24
|
+
|
|
25
|
+
The preparation design, test-only provider/trust contracts, and qualified RED replay are complete:
|
|
26
|
+
[Document workflow reconciliation](doc-workflow-reconciliation.md),
|
|
27
|
+
[case corpus](../ci/fixtures/doc-obligations/reconciliation-prep/cases.json),
|
|
28
|
+
[pending-RED registry](../ci/fixtures/doc-obligations/reconciliation-prep/pending-red.json), and
|
|
29
|
+
[preparation suite](../ci/mechanism-325-3b-preparation.test.js). Runtime reconciliation remains
|
|
30
|
+
unshipped and unactivated until #341 E0 is reviewed and accepted.
|
|
31
|
+
|
|
32
|
+
- **Inputs:** explicit active `doc-change` step, D6.5 diff facts, Phase 3a obligations/evidence, available provider *metadata*, and host capabilities.
|
|
33
|
+
- **Entry and activation gates (#341):** parallel preparatory work — provider metadata, adapter/interface design and RED fixtures — may proceed while #341 Phase 0A–0C runs, but the **runtime** Evidence Reconciliation must not merge or activate until **#341 E0** is reviewed and accepted (initial evidence read/binding/outcome conformance, mutation and read-order compatibility, source/package parity, zero false MUST PASS on applicable adversarial cases, and applicable green CI including Windows). After E0, only the **bounded, opt-in, reversible** documentation consumer is eligible for runtime integration at the existing verification/disposition path (no second router, forced provider, new lock, or weakened authorization, with a documented rollback), and it supplies the observed exposure for **#341 E1** (initial target 2–3 genuine development/review cycles with sufficient case mix, not elapsed time). **#341 E1 GO / REVISE / NO-GO gates expansion beyond the limited pilot, not the pilot's own observation** (missing or unrepresentative exposure is `UNCHECKED`, never an automatic GO). The H1–H4 paired-task architectural gate below stays required for any #320 promotion in addition to E1. Shared evidence-read/binding/decision defects route to #341 (fixture-first correction, regression replay, re-observation); documentation policy and the trusted host/VCS producer remain #325 deliverables here.
|
|
34
|
+
- **Advisory provider suggestions:** `suggestDocProviders({activeStep, neededCapabilities, availableProviderMetadata, hostCapabilities})` yields candidate providers and unavailable reasons without altering the MUST/SHOULD obligation set, granting tool access, or eagerly reading unrelated `SKILL.md`. Existing binding resolution handles an explicitly chosen provider. No new automatic step selection.
|
|
35
|
+
- **Evidence reconciliation boundary and credit order:** the pilot wires Phase 3a results into the non-Fable typed-step path only. `hooks/scripts/workflow-disposition.js` delegates `step` to `updateStep()` and `binding` to `updateBinding()` in `hooks/scripts/lib/workflow-obligations.js`. Today `updateStep()` persists `step.status = 'pass'` when every required binding is `loaded` and `--evidence` is non-empty; `syncTypedAggregateObligations()` then derives aggregate `execute`/`verify` PASS from the persisted step statuses. An authored `doc-change` step is authored work, not verification: it may advance under its existing binding contract **without claiming** any doc MUST as verified. The doc-MUST reconciliation gate belongs at the authorized `verification` step and the final-completion boundary, matching D6.6 ("All events are checked at the existing workflow's `verification` step"). Phase 3b must evaluate `checkDocObligations()` for the active scope before aggregate `verify` PASS is persisted and before the workflow reports completion; an aggregate `execute` may still reflect authored step passes, but neither aggregate may stand as completion while an applicable doc MUST is unsatisfied, and `unresolvedObligations()` must surface the unsatisfied results (`pending`/`unknown`/`unavailable`/`failed`). Ordered `doc-change → review → verification` topologies stay reachable: evidence supplied by the later `review`/`verification` steps counts at its own stage, so no stage is forced to pass early and a normative doc change cannot deadlock. Non-document steps, persisted plans, existing bindings and authorization stay unchanged.
|
|
36
|
+
- **Typed aggregate writes and freshness (doc-governed scope):** aggregate PASS is not derived exclusively from persisted step passes today. `updateObligation()` accepts a direct `obligation --obligation-id execute|verify --disposition pass --evidence <text>` write for **all** non-Fable typed plans, including workflows with no applicable document MUSTs. Phase 3b's guard is scoped to typed plans/steps with an applicable, doc-governed scope: there, a direct typed `execute`/`verify` PASS must be rejected or ignored unless it was derived/reconciled from satisfied doc evidence, and the `obligation` command joins `step` in the negative tests. Non-document typed workflows and persisted plans retain today's behavior unless a separately authorized compatibility decision changes them; an already-persisted plan that gains a doc-governed scope is validated against that scope and cannot complete on a stale direct aggregate PASS. Verified doc evidence must also stay bound to the persisted candidate, task and config identity: `unresolvedObligations()` and the final completion path re-check freshness, so evidence that was valid before a later candidate edit cannot remain a completion proof solely because `status: pass` was persisted.
|
|
37
|
+
- **Minimum trusted producer (3b deliverable):** Phase 3b ships the pilot-local adapter that derives the VCS baseline and candidate identity, active task scope, parsed config bytes (`configDigest` bound rather than presence-checked), PRD root, execution/verification provenance and independent reviewer identity from host state (see *Phase 3b minimum trust boundary* below). `checkDocObligations()` only proves agreement with caller-supplied values; without this producer, a 3b PASS would promote caller-attested claims. Any input the producer cannot establish stays `unknown`/`unavailable` and MUST NOT pass. Phase 3c broadens adversarial H3 validation and adds paired architectural evaluation; it does not supply the minimum producer.
|
|
38
|
+
- **Pilot topology and unsupported paths:** the pilot is limited to non-Fable typed-step workflows (`stepBindingsEnabled === true`, set when typed steps exist and the strategy is not `fable-*`). Fable stage-contract paths (`fable-staged`, `fable-parallel`, `fable-multi-agent-workspace`) and workflows without the typed-step contract are explicitly **not integrated / unavailable** for doc-MUST reconciliation: a `stage-binding` disposition is never doc verification, and no fallback may mark a doc MUST satisfied. Unsupported paths report that state rather than silently passing.
|
|
39
|
+
- **Negative acceptance case:** for a doc-governed typed plan whose applicable MUST is failing or unknown, no boundary may report PASS: `step --disposition pass` on the verification step, `obligation --obligation-id execute|verify --disposition pass --evidence 'done'`, and final completion must all fail closed, report the unsatisfied obligation ids, and leave aggregate `verify` pending. A loaded skill plus free-text evidence is not verification. A RED fixture covers ordered `doc-change → review → verification` with reviewer/command evidence missing first and valid later: the authored `doc-change` step advances, aggregate/final PASS stays blocked until the later evidence satisfies the MUST, and neither a premature PASS nor a deadlock occurs.
|
|
40
|
+
- **Compatibility:** preserve existing non-document step bindings, authorization/Rule-of-3 semantics, old persisted plans and no new Stop/tool lock. Source and installed plugin copies must behave consistently.
|
|
41
|
+
- **Pre-integration work:** the baseline-bound tombstone/rename-pair evidence required by #335 shipped in #342; the remaining pre-integration work is the reconciliation contract above. #331 / draft PR #333 is a parallel host-config safety correction; neither requires the broad #320 migration.
|
|
42
|
+
|
|
43
|
+
### Phase 3c — architecture promotion gate for #320 (planned, not shipped)
|
|
44
|
+
|
|
45
|
+
| Hypothesis | Objective acceptance evidence |
|
|
46
|
+
| --- | --- |
|
|
47
|
+
| **H1 Provider independence** | Swap/omit suggestions without changing workflow obligations; valid alternate execution evidence can satisfy an applicable MUST; no evidence cannot |
|
|
48
|
+
| **H2 Active-step progressive disclosure** | Captured step output / provider metadata access shows only active-step relevance and no eager unrelated `SKILL.md` content or future-step loading |
|
|
49
|
+
| **H3 Evidence reconciliation** | Adversarial replay of fabricated completion, missing verifier, stale digest/base, scope substitution, forged identity, unsupported PRD roots, contradictory/failed results and unsupported waiver yields **zero false PASS** for MUSTs, with the fixture matrix below as the observable trust boundary |
|
|
50
|
+
| **H4 Task-shaped composition** | Docs-only, docs+code, REQ-citing assertions, typo-only changes, code-only uncertainty, missing independent approval and waivers produce the expected obligation union and explicit unknown/unavailable outcomes |
|
|
51
|
+
|
|
52
|
+
### Phase 3b minimum trust boundary and Phase 3c H3 validation (planned, not shipped)
|
|
53
|
+
|
|
54
|
+
Phase 3b delivers the minimum producer and identity/scope binding needed for a trustworthy PASS; Phase 3c extends the same seam with adversarial H3 validation and paired architectural evaluation.
|
|
55
|
+
|
|
56
|
+
- **Trusted producer, not the checker:** a pilot-local adapter is a **3b deliverable**; it derives the VCS baseline and candidate identity, active task scope, project-docs config identity (parsed config bytes, not presence) and execution/review provenance from host state. `checkDocObligations()` proves only that records agree with those caller-supplied values; matching a caller-provided digest is not independent validation of the input.
|
|
57
|
+
- **Identity and scope requirements:** `baseline.digest` and `baseline.artifacts[path]` come from the same recorded baseline tree; candidate artifact digests come from the candidate tree actually under review; `configDigest` is bound to the parsed config bytes rather than checked for presence; the obligation's PRD root and active task scope must match the adapter's scope, and an unsupported custom PRD root is `unavailable`.
|
|
58
|
+
- **Provenance and reviewer identity:** execution and verification records need the command, non-empty provenance and integer exit code; review approval needs an independent reviewer identity distinct from the executor/author. A free-text claim, self-review, missing verifier or replayed record never satisfies a MUST.
|
|
59
|
+
- **Dispositions:** absent, untrusted, stale, replayed, contradictory, malformed or unsupported inputs resolve to `unknown`/`unavailable`/failed, never PASS. The 3b fail-closed negative cases cover missing producer identity, scope substitution, unbound config bytes and stale candidate evidence; 3c adds the full adversarial fixture matrix below.
|
|
60
|
+
|
|
61
|
+
| H3 fixture | Expected disposition |
|
|
10
62
|
| --- | --- |
|
|
11
|
-
|
|
|
12
|
-
|
|
|
13
|
-
|
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
|
|
|
63
|
+
| Fabricated completion claim / no record | `unknown`; MUST unsatisfied |
|
|
64
|
+
| Forged baseline or candidate digest | rejected as stale/unknown; MUST unsatisfied |
|
|
65
|
+
| Scope substitution across tasks or PRD roots | `unknown`; MUST unsatisfied |
|
|
66
|
+
| Unsupported custom PRD root | `unavailable`; MUST unsatisfied |
|
|
67
|
+
| Replayed earlier-candidate record | stale; MUST unsatisfied |
|
|
68
|
+
| Missing, non-independent or mismatched reviewer identity | MUST unsatisfied |
|
|
69
|
+
| Unsupported waiver (no reason, no cited observed record, or self-bound scope) | `unsupported-waiver`; MUST unsatisfied |
|
|
70
|
+
| Contradictory or failed command results | failed; not PASS |
|
|
71
|
+
| Positive control: current, independently produced matching evidence | pass |
|
|
72
|
+
|
|
73
|
+
Two *separate* gates apply. The **functional gate** requires contract tests, negative cases, source/package parity, host/platform compatibility and an all-green applicable CI baseline. The **architectural gate** additionally requires H1–H4 and independently reviewed paired real-task outcomes. Freeze task fixtures, acceptance rubrics, model/effort, host permissions, comparison order and thresholds **after baseline measurement but before treatment outcomes**. Compare task correctness and failures first; report successful-task token/time/tool cost and failed-run overhead separately, with uncertainty. A small inconclusive sample is not approval. Broader #320 CDG/registry compilation and physical skill moves need **explicit owner sign-off on each specific validated interface**; retain the legacy path until then.
|
|
74
|
+
|
|
75
|
+
**Cross-contract acceptance assertion:** the #341 E0/E1 gates in the Phase 3b entry-gates bullet above, [#341](https://github.com/dyphn1/Harness-everything/issues/341) and #325's phase table must stay mutually consistent: a change to one gate's semantics updates the other two records, replays affected #341 fixtures first, and only then re-collects affected 3b observations. E0 enables only the bounded, reversible, doc-only runtime consumer; E1 gates expansion beyond the limited pilot; neither approves generic #320 CDG/registry promotion, which additionally requires the H1–H4 paired real-task evidence and explicit owner sign-off above.
|
|
17
76
|
|
|
18
77
|
## Configuration (D5)
|
|
19
78
|
|