harness-everything 0.36.3 → 0.37.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 (51) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +18 -0
  4. package/ci/fixtures/doc-obligations/providers-s3/cases.json +535 -0
  5. package/ci/fixtures/doc-obligations/read-boundary/boundary-controls.json +211 -0
  6. package/ci/fixtures/doc-obligations/read-boundary/boundary-policy.json +325 -0
  7. package/ci/fixtures/doc-obligations/read-boundary/cases.json +14058 -0
  8. package/ci/fixtures/doc-obligations/read-boundary/expected.json +1 -0
  9. package/ci/fixtures/doc-obligations/read-boundary/identity-cases.json +119 -0
  10. package/ci/fixtures/doc-obligations/read-boundary/identity-expected.json +1 -0
  11. package/ci/fixtures/doc-obligations/read-boundary/scope-cases.json +208 -0
  12. package/ci/fixtures/doc-obligations/read-boundary/scope-expected.json +1 -0
  13. package/ci/fixtures/doc-obligations/reconciliation-prep/cases.json +2751 -0
  14. package/ci/fixtures/doc-obligations/reconciliation-prep/flood-entrypoint.js +5 -0
  15. package/ci/fixtures/doc-obligations/reconciliation-prep/hang-entrypoint.js +5 -0
  16. package/ci/fixtures/doc-obligations/reconciliation-prep/pending-red.json +648 -0
  17. package/ci/fixtures/doc-obligations/reconciliation-prep/provider-contract.json +100 -0
  18. package/ci/fixtures/doc-obligations/reconciliation-prep/trust-contract.json +188 -0
  19. package/ci/lib/doc-evidence-boundary-check.js +1240 -0
  20. package/ci/lib/doc-evidence-fixtures.js +459 -0
  21. package/ci/lib/doc-evidence-trace.js +171 -0
  22. package/ci/lib/doc-reconciliation-prep-fixtures.js +502 -0
  23. package/ci/lib/snapshot-stdin.js +27 -0
  24. package/ci/mechanism-325-3b-preparation.test.js +382 -0
  25. package/ci/mechanism-325-3b-s3-providers.test.js +378 -0
  26. package/ci/mechanism-341-boundary-enforcement.test.js +660 -0
  27. package/ci/mechanism-341-capture-module.test.js +357 -0
  28. package/ci/mechanism-341-mutation-runner.test.js +413 -0
  29. package/ci/mechanism-341-read-boundary.test.js +388 -0
  30. package/ci/mechanism-341-snapshot-stdin.test.js +40 -0
  31. package/ci/mutation-check.js +805 -45
  32. package/ci/mutation-loader.js +544 -57
  33. package/ci/prep/doc-reconciliation-red.js +407 -0
  34. package/ci/stress-341-boundary-control.js +85 -0
  35. package/docs/doc-evidence-baseline-binding.md +105 -19
  36. package/docs/doc-evidence-boundary.md +135 -0
  37. package/docs/doc-workflow-reconciliation.md +338 -0
  38. package/docs/document-lifecycle.md +8 -1
  39. package/harness-everything/SKILL.md +1 -1
  40. package/harness-everything/scripts/doc-evidence-capture.js +331 -0
  41. package/harness-everything/scripts/doc-evidence.js +72 -223
  42. package/harness-everything/scripts/doc-providers.js +113 -0
  43. package/opencode-plugin/plugin.json +1 -1
  44. package/package.json +5 -3
  45. package/plugins/harness-everything/.codex-plugin/plugin.json +1 -1
  46. package/plugins/harness-everything/plugin.json +1 -1
  47. package/plugins/harness-everything/skills/harness-everything/SKILL.md +1 -1
  48. package/plugins/harness-everything/skills/harness-everything/scripts/doc-evidence-capture.js +331 -0
  49. package/plugins/harness-everything/skills/harness-everything/scripts/doc-evidence.js +72 -223
  50. package/plugins/harness-everything/skills/harness-everything/scripts/doc-providers.js +113 -0
  51. package/sbom.cdx.json +43 -7
@@ -0,0 +1,211 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "phase": "C1",
4
+ "description": "Weakened-boundary transform inventory for N01-N09. Applied in memory to the exact selected source pair; the checker and policy are never edited by these transforms.",
5
+ "distributions": {
6
+ "canonical": {
7
+ "evaluator": "harness-everything/scripts/doc-evidence.js",
8
+ "capture": "harness-everything/scripts/doc-evidence-capture.js"
9
+ },
10
+ "packaged": {
11
+ "evaluator": "plugins/harness-everything/skills/harness-everything/scripts/doc-evidence.js",
12
+ "capture": "plugins/harness-everything/skills/harness-everything/scripts/doc-evidence-capture.js"
13
+ }
14
+ },
15
+ "expectedRuleIdsPending": false,
16
+ "controls": [
17
+ {
18
+ "id": "N01d",
19
+ "intendedRuleId": "EVALUATOR_CONTEXT_EXACT",
20
+ "expectedC1Status": "REJECTED",
21
+ "name": "context alias, dormant",
22
+ "description": "As N01, but the alias read sits behind a guard the corpus never takes (the wrapper always provides artifacts, so artifactMap is never undefined).",
23
+ "transforms": [
24
+ {
25
+ "file": "evaluator",
26
+ "from": " capture, baselineDigest, executionList, reviewList, diagnostics\n }));",
27
+ "to": " capture, baselineDigest, executionList, reviewList, diagnostics, artifactMap: artifacts\n }));"
28
+ },
29
+ {
30
+ "file": "evaluator",
31
+ "from": " const { capture, baselineDigest, executionList, reviewList, diagnostics } = context;",
32
+ "to": " const { capture, baselineDigest, executionList, reviewList, diagnostics } = context;\n if (context.artifactMap === undefined) { const a = context.artifactMap; void a?.['docs/adr/OLD.md']?.digest; }"
33
+ }
34
+ ]
35
+ },
36
+ {
37
+ "id": "N02d",
38
+ "intendedRuleId": "EVALUATOR_CONTEXT_EXACT",
39
+ "expectedC1Status": "REJECTED",
40
+ "name": "destructure, dormant",
41
+ "description": "As N02, behind the same never-taken guard.",
42
+ "transforms": [
43
+ {
44
+ "file": "evaluator",
45
+ "from": " capture, baselineDigest, executionList, reviewList, diagnostics\n }));",
46
+ "to": " capture, baselineDigest, executionList, reviewList, diagnostics, artifactMap: artifacts\n }));"
47
+ },
48
+ {
49
+ "file": "evaluator",
50
+ "from": " const { capture, baselineDigest, executionList, reviewList, diagnostics } = context;",
51
+ "to": " const { capture, baselineDigest, executionList, reviewList, diagnostics } = context;\n if (context.artifactMap === undefined) { const a = context.artifactMap; const { digest } = a?.['docs/adr/OLD.md'] ?? {}; void digest; }"
52
+ }
53
+ ]
54
+ },
55
+ {
56
+ "id": "N01",
57
+ "intendedRuleId": "EVALUATOR_CONTEXT_EXACT",
58
+ "expectedC1Status": "REJECTED",
59
+ "name": "context alias",
60
+ "description": "Wrapper adds a raw artifact handoff to the evaluator context; the evaluator reads one path through a local alias.",
61
+ "transforms": [
62
+ {
63
+ "file": "evaluator",
64
+ "from": " capture, baselineDigest, executionList, reviewList, diagnostics\n }));",
65
+ "to": " capture, baselineDigest, executionList, reviewList, diagnostics, artifactMap: artifacts\n }));"
66
+ },
67
+ {
68
+ "file": "evaluator",
69
+ "from": " const { capture, baselineDigest, executionList, reviewList, diagnostics } = context;",
70
+ "to": " const { capture, baselineDigest, executionList, reviewList, diagnostics } = context;\n const a = context.artifactMap; void a?.['docs/adr/OLD.md']?.digest;"
71
+ }
72
+ ]
73
+ },
74
+ {
75
+ "id": "N02",
76
+ "intendedRuleId": "EVALUATOR_CONTEXT_EXACT",
77
+ "expectedC1Status": "REJECTED",
78
+ "name": "destructure",
79
+ "description": "Same ingress as N01; the evaluator destructures a raw entry through the alias.",
80
+ "transforms": [
81
+ {
82
+ "file": "evaluator",
83
+ "from": " capture, baselineDigest, executionList, reviewList, diagnostics\n }));",
84
+ "to": " capture, baselineDigest, executionList, reviewList, diagnostics, artifactMap: artifacts\n }));"
85
+ },
86
+ {
87
+ "file": "evaluator",
88
+ "from": " const { capture, baselineDigest, executionList, reviewList, diagnostics } = context;",
89
+ "to": " const { capture, baselineDigest, executionList, reviewList, diagnostics } = context;\n const a = context.artifactMap; const { digest } = a?.['docs/adr/OLD.md'] ?? {}; void digest;"
90
+ }
91
+ ]
92
+ },
93
+ {
94
+ "id": "N03",
95
+ "intendedRuleId": "RETURNED_VIEW_OWNERSHIP",
96
+ "expectedC1Status": "REJECTED",
97
+ "name": "direct snapshot escape",
98
+ "description": "captureEntry returns the raw entry inside its frozen record.",
99
+ "transforms": [
100
+ {
101
+ "file": "capture",
102
+ "from": " hasOwnRenameTo: snapshot.hasOwnRenameTo,",
103
+ "to": " hasOwnRenameTo: snapshot.hasOwnRenameTo,\n rawEntry,"
104
+ }
105
+ ]
106
+ },
107
+ {
108
+ "id": "N04",
109
+ "intendedRuleId": "RETURNED_VIEW_OWNERSHIP",
110
+ "expectedC1Status": "REJECTED",
111
+ "name": "nested and helper escape",
112
+ "description": "The raw entry escapes through a nested object, a helper return and a returned closure.",
113
+ "transforms": [
114
+ {
115
+ "file": "capture",
116
+ "from": "function isPlainObject(value) {",
117
+ "to": "function passthrough(value) {\n return value;\n}\n\nfunction isPlainObject(value) {"
118
+ },
119
+ {
120
+ "file": "capture",
121
+ "from": " hasOwnRenameTo: snapshot.hasOwnRenameTo,",
122
+ "to": " hasOwnRenameTo: snapshot.hasOwnRenameTo,\n meta: { entry: rawEntry },\n helperAlias: passthrough(rawEntry),\n leak: () => rawEntry,"
123
+ }
124
+ ]
125
+ },
126
+ {
127
+ "id": "N05",
128
+ "intendedRuleId": "COMP-C2-BOUND",
129
+ "expectedC1Status": "SURVIVED",
130
+ "name": "new read in C2 exception",
131
+ "description": "compatibilityCandidateBound reads an extra artifactDigests field through a fresh alias.",
132
+ "transforms": [
133
+ {
134
+ "file": "capture",
135
+ "from": " if (!isPlainObject(record.artifactDigests)) return false;",
136
+ "to": " if (!isPlainObject(record.artifactDigests)) return false;\n const alias = record.artifactDigests; void alias[path];"
137
+ }
138
+ ]
139
+ },
140
+ {
141
+ "id": "N06",
142
+ "intendedRuleId": "COMP-C2-BOUND",
143
+ "expectedC1Status": "SURVIVED",
144
+ "name": "unvisited exception branch",
145
+ "description": "The extra read sits in a branch no corpus fixture takes (a path string longer than 999 characters). The guard reads only the string path, so the branch is inert in the corpus.",
146
+ "transforms": [
147
+ {
148
+ "file": "capture",
149
+ "from": " if (candidateDigestCache.has(path)) {\n const digest = candidateDigestCache.get(path);",
150
+ "to": " if (typeof path === 'string' && path.length > 999) void record.artifactDigests[path];\n if (candidateDigestCache.has(path)) {\n const digest = candidateDigestCache.get(path);"
151
+ }
152
+ ]
153
+ },
154
+ {
155
+ "id": "N07",
156
+ "intendedRuleId": "CAPTURE_CALL_SITES",
157
+ "expectedC1Status": "REJECTED",
158
+ "name": "broaden C5",
159
+ "description": "The PRD enumeration runs before the envelope short-circuit.",
160
+ "transforms": [
161
+ {
162
+ "file": "evaluator",
163
+ "from": " const envelopeAttested = Boolean(envelope)",
164
+ "to": " capture.compatibilityPrdSetDigest();\n const envelopeAttested = Boolean(envelope)"
165
+ }
166
+ ]
167
+ },
168
+ {
169
+ "id": "N08",
170
+ "intendedRuleId": "OBLIGATION_CAPABILITIES_EXACT",
171
+ "expectedC1Status": "REJECTED",
172
+ "name": "lexical closure bypass",
173
+ "description": "An obligation-scope object exposes a closure over the raw wrapper artifacts.",
174
+ "transforms": [
175
+ {
176
+ "file": "capture",
177
+ "from": " const obligationCapture = {",
178
+ "to": " const obligationCapture = {\n rawView: () => artifacts,"
179
+ }
180
+ ]
181
+ },
182
+ {
183
+ "id": "N09",
184
+ "intendedRuleId": "MODULE_EXPORTS_EXACT",
185
+ "expectedC1Status": "REJECTED",
186
+ "name": "API raw helper escape",
187
+ "description": "The module export carries a computed-name raw getter.",
188
+ "transforms": [
189
+ {
190
+ "file": "capture",
191
+ "from": "module.exports = { createInvocationCapture };",
192
+ "to": "module.exports = { createInvocationCapture, ['get' + 'Raw']: () => artifacts };"
193
+ }
194
+ ]
195
+ },
196
+ {
197
+ "id": "N02c",
198
+ "name": "consumer destructure widened",
199
+ "intendedRuleId": "EVALUATOR_CONTEXT_EXACT",
200
+ "expectedC1Status": "REJECTED",
201
+ "description": "C3 checker-target control (haiku). The evaluator consumer destructures one extra context key. AST route restored after luna c2-fix (pinned @evaluateObligation-context-destructure target); the AST assertion pins that target.",
202
+ "transforms": [
203
+ {
204
+ "file": "evaluator",
205
+ "from": " const { capture, baselineDigest, executionList, reviewList, diagnostics } = context;",
206
+ "to": " const { capture, baselineDigest, executionList, reviewList, diagnostics, artifactMap } = context;"
207
+ }
208
+ ]
209
+ }
210
+ ]
211
+ }
@@ -0,0 +1,325 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "status": "frozen-for-c1",
4
+ "method": "isolation",
5
+ "astSupplement": {
6
+ "schemaVersion": 1,
7
+ "status": "frozen-for-c2",
8
+ "parser": {
9
+ "acorn": "8.19.0",
10
+ "acornWalk": "8.3.5"
11
+ },
12
+ "canonicalization": "estree-alpha-target-v2",
13
+ "moduleFingerprints": {
14
+ "evaluator": "21e5922f94a0ffd6a2fa4c6c14becfd6680854df342d31c7e0dfd74d776feb6d",
15
+ "capture": "95d0ca61505914e6c7cfc4603556f028208bd44203167397896ce0bf4ec58ef7"
16
+ },
17
+ "targets": [
18
+ {
19
+ "module": "evaluator",
20
+ "name": "checkDocObligations",
21
+ "ruleIds": ["EVALUATOR_CONTEXT_EXACT", "CAPTURE_CALL_SITES"],
22
+ "fingerprint": "5d09eb744309bb7569dcbbf9659143c64ab5fbc07683a624c36168524f57761f"
23
+ },
24
+ {
25
+ "module": "evaluator",
26
+ "name": "evaluateObligation",
27
+ "ruleIds": ["CAPTURE_CALL_SITES"],
28
+ "fingerprint": "fdeabb3d9ddebec17cef5c0eb2fe6ff846af5c0b29eb2a701e3aea566276f82e"
29
+ },
30
+ {
31
+ "module": "evaluator",
32
+ "name": "@evaluateObligation-context-destructure",
33
+ "ruleIds": ["EVALUATOR_CONTEXT_EXACT"],
34
+ "fingerprint": "40e78c36b41d610a6052fe86f14ae0262c30aa0fd6639abc3e7f839919e6f6b2"
35
+ },
36
+ {
37
+ "module": "capture",
38
+ "name": "captureEntry",
39
+ "ruleIds": ["RETURNED_VIEW_OWNERSHIP"],
40
+ "fingerprint": "e082834d3af79cbcfd68e6a0fae0e5eb5c68315ceda3e38db01a8fd5cf683c91"
41
+ },
42
+ {
43
+ "module": "capture",
44
+ "name": "createInvocationCapture",
45
+ "ruleIds": ["OBLIGATION_CAPABILITIES_EXACT", "RETURNED_VIEW_OWNERSHIP"],
46
+ "fingerprint": "4acc0495d1ee9ba3bc1dac28de72ef331c17ebc46edfc3ed6f01eb823362e356"
47
+ },
48
+ {
49
+ "module": "capture",
50
+ "name": "compatibilityCandidateBound",
51
+ "ruleIds": ["COMP-C2-BOUND"],
52
+ "exceptionId": "COMP-C2-BOUND",
53
+ "fingerprint": "166751b7f944b43c360f576a2de701361a9c754ec619ff5aeed302e6e5ef299d"
54
+ },
55
+ {
56
+ "module": "capture",
57
+ "name": "isPlainObject",
58
+ "ruleIds": ["AST_SOURCE_STRUCTURE"],
59
+ "fingerprint": "0239123887993c6a17bdbf2cb5153937533a73d4fb346cddbfc7670268bfc409"
60
+ },
61
+ {
62
+ "module": "capture",
63
+ "name": "@exports",
64
+ "ruleIds": ["MODULE_EXPORTS_EXACT"],
65
+ "fingerprint": "71c6aaf1d5fa8167042353466f87fcbe8d5b1eda713977ae1a53a06cce70ff4a"
66
+ }
67
+ ]
68
+ },
69
+ "distributions": {
70
+ "canonical": {
71
+ "evaluator": "harness-everything/scripts/doc-evidence.js",
72
+ "capture": "harness-everything/scripts/doc-evidence-capture.js"
73
+ },
74
+ "packaged": {
75
+ "evaluator": "plugins/harness-everything/skills/harness-everything/scripts/doc-evidence.js",
76
+ "capture": "plugins/harness-everything/skills/harness-everything/scripts/doc-evidence-capture.js"
77
+ }
78
+ },
79
+ "modules": {
80
+ "evaluatorExports": ["checkDocObligations"],
81
+ "captureExports": ["createInvocationCapture"],
82
+ "evaluatorRequires": ["./doc-evidence-capture"],
83
+ "captureRequires": ["crypto"],
84
+ "captureBuiltins": ["crypto"]
85
+ },
86
+ "evaluatorContext": {
87
+ "handoffKeys": ["capture", "baselineDigest", "executionList", "reviewList", "diagnostics"],
88
+ "consumerKeys": ["capture", "baselineDigest", "executionList", "reviewList", "diagnostics"]
89
+ },
90
+ "capabilities": {
91
+ "invocation": [
92
+ "initializeArtifactFallback",
93
+ "captureBaselineIdentity",
94
+ "candidateInventoryKnown",
95
+ "beginObligation",
96
+ "compatibilityPrdSetDigest"
97
+ ],
98
+ "obligation": [
99
+ "prepareBaselineContainer",
100
+ "captureEntry",
101
+ "formatInvalidReason",
102
+ "formatInvalidRenameTo",
103
+ "captureSourceAbsence",
104
+ "isDestinationPoisoned",
105
+ "poisonDestination",
106
+ "captureDestination",
107
+ "captureBaselinePath",
108
+ "acceptBaselineEntry",
109
+ "captureOrdinaryCandidates",
110
+ "capturedCandidate",
111
+ "candidateAuditValue",
112
+ "compatibilityCandidateBound",
113
+ "compatibilityStaleArtifactMismatch",
114
+ "baselineEntries",
115
+ "baselineAuditPairs"
116
+ ]
117
+ },
118
+ "returnSchemas": {
119
+ "string": {"kind": "primitive", "type": "string"},
120
+ "boolean": {"kind": "primitive", "type": "boolean"},
121
+ "sha256": {"kind": "primitive", "type": "sha256"},
122
+ "captureEntry": {
123
+ "kind": "tagged",
124
+ "tag": "kind",
125
+ "variants": [
126
+ {"value": "captured", "fields": {"kind": "literal:captured", "token": "opaque-token", "path": "string-or-undefined", "reason": "string-or-undefined", "hasOwnRenameTo": "boolean", "renameTo": "string-or-undefined"}},
127
+ {"value": "not-object", "fields": {"kind": "literal:not-object", "token": "opaque-token"}},
128
+ {"value": "inspection-failed", "fields": {"kind": "literal:inspection-failed", "token": "opaque-token"}}
129
+ ]
130
+ },
131
+ "captureSourceAbsence": {
132
+ "kind": "tagged", "tag": "kind", "variants": [
133
+ {"value": "present", "fields": {"kind": "literal:present"}},
134
+ {"value": "absent", "fields": {"kind": "literal:absent"}}
135
+ ]
136
+ },
137
+ "captureDestination": {
138
+ "kind": "tagged", "tag": "kind", "variants": [
139
+ {"value": "accepted", "fields": {"kind": "literal:accepted", "digest": "string"}},
140
+ {"value": "unusable", "fields": {"kind": "literal:unusable"}},
141
+ {"value": "conflict", "fields": {"kind": "literal:conflict", "digest": "string"}},
142
+ {"value": "inspection-failed", "fields": {"kind": "literal:inspection-failed"}}
143
+ ]
144
+ },
145
+ "captureBaselinePath": {
146
+ "kind": "tagged", "tag": "kind", "variants": [
147
+ {"value": "absent", "fields": {"kind": "literal:absent"}},
148
+ {"value": "present", "fields": {"kind": "literal:present", "value": "string"}},
149
+ {"value": "present", "fields": {"kind": "literal:present", "value": "undefined"}},
150
+ {"value": "present", "fields": {"kind": "literal:present", "invalidValue": "literal:true"}},
151
+ {"value": "unknown", "fields": {"kind": "literal:unknown", "reason": "literal:inspection"}}
152
+ ]
153
+ },
154
+ "capturedCandidate": {
155
+ "kind": "tagged", "tag": "kind", "variants": [
156
+ {"value": "uncaptured", "fields": {"kind": "literal:uncaptured"}},
157
+ {"value": "captured", "fields": {"kind": "literal:captured", "digest": "string"}}
158
+ ]
159
+ },
160
+ "baselineEntries": {
161
+ "kind": "array", "item": {
162
+ "path": "string", "reason": "string", "candidatePathPresent": "boolean",
163
+ "trustedBaselineDigest": "string-or-undefined", "renameTo": "string?",
164
+ "renameDestinationDigest": "string-or-undefined?"
165
+ }
166
+ },
167
+ "baselineAuditPairs": {"kind": "pair-array"}
168
+ },
169
+ "excludedReturnBranches": [
170
+ {
171
+ "api": "capturedCandidate",
172
+ "tag": "unusable",
173
+ "reason": "The private candidateDigestCache receives only artifact() strings or rename digests guarded by nonEmptyString through the declared API. C1 tests reachable return schemas; a source change that opens this branch remains for C2 structural analysis."
174
+ }
175
+ ],
176
+ "ownership": {
177
+ "callerInputIdentityEscapes": "forbidden-recursively",
178
+ "accessorAndCallableViewFields": "forbidden",
179
+ "symbolKeys": "forbidden",
180
+ "opaqueToken": {"prototype": "null", "ownKeys": 0, "frozen": true},
181
+ "returnedRecords": "fresh-plain-data",
182
+ "returnedArrays": "fresh-detached-arrays",
183
+ "repeatAndMutationProbe": ["baselineEntries", "baselineAuditPairs"]
184
+ },
185
+ "knownC1Limitations": [
186
+ "Direct call-site inventory does not resolve capability aliases or argument/closure transfers; any such weakened-boundary control is a survivor requiring C2 analysis.",
187
+ "Compatibility anchors identify reviewed sites but do not constrain statements or dormant branches between those anchors; N05/N06 must be rejected structurally by C2."
188
+ ],
189
+ "callSites": [
190
+ {"receiver": "capture", "method": "initializeArtifactFallback", "expectedCount": 1},
191
+ {"receiver": "capture", "method": "captureBaselineIdentity", "expectedCount": 1},
192
+ {"receiver": "capture", "method": "candidateInventoryKnown", "expectedCount": 1},
193
+ {"receiver": "capture", "method": "beginObligation", "expectedCount": 1},
194
+ {"receiver": "capture", "method": "compatibilityPrdSetDigest", "expectedCount": 1, "exceptionId": "COMP-C5"},
195
+ {"receiver": "obligationCapture", "method": "prepareBaselineContainer", "expectedCount": 1, "exceptionId": "COMP-CONTAINER"},
196
+ {"receiver": "obligationCapture", "method": "captureEntry", "expectedCount": 1, "exceptionId": "COMP-METADATA"},
197
+ {"receiver": "obligationCapture", "method": "formatInvalidReason", "expectedCount": 1, "exceptionId": "COMP-METADATA"},
198
+ {"receiver": "obligationCapture", "method": "formatInvalidRenameTo", "expectedCount": 4, "exceptionId": "COMP-METADATA"},
199
+ {"receiver": "obligationCapture", "method": "captureSourceAbsence", "expectedCount": 1, "exceptionId": "COMP-METADATA"},
200
+ {"receiver": "obligationCapture", "method": "isDestinationPoisoned", "expectedCount": 1, "exceptionId": "COMP-METADATA"},
201
+ {"receiver": "obligationCapture", "method": "poisonDestination", "expectedCount": 2, "exceptionId": "COMP-METADATA"},
202
+ {"receiver": "obligationCapture", "method": "captureDestination", "expectedCount": 1, "exceptionId": "COMP-METADATA"},
203
+ {"receiver": "obligationCapture", "method": "captureBaselinePath", "expectedCount": 1, "exceptionId": "COMP-METADATA"},
204
+ {"receiver": "obligationCapture", "method": "acceptBaselineEntry", "expectedCount": 1, "exceptionId": "COMP-METADATA"},
205
+ {"receiver": "obligationCapture", "method": "captureOrdinaryCandidates", "expectedCount": 1, "exceptionId": "COMP-C1"},
206
+ {"receiver": "obligationCapture", "method": "capturedCandidate", "expectedCount": 1, "exceptionId": "COMP-C2-BOUND"},
207
+ {"receiver": "obligationCapture", "method": "candidateAuditValue", "expectedCount": 1, "exceptionId": "COMP-C1"},
208
+ {"receiver": "obligationCapture", "method": "compatibilityCandidateBound", "expectedCount": 1, "exceptionId": "COMP-C2-BOUND"},
209
+ {"receiver": "obligationCapture", "method": "compatibilityStaleArtifactMismatch", "expectedCount": 1, "exceptionId": "COMP-C4"},
210
+ {"receiver": "obligationCapture", "method": "baselineEntries", "expectedCount": 1, "exceptionId": "COMP-METADATA"},
211
+ {"receiver": "obligationCapture", "method": "baselineAuditPairs", "expectedCount": 1, "exceptionId": "COMP-METADATA"}
212
+ ],
213
+ "coverage": [
214
+ "source-pair",
215
+ "module-exports",
216
+ "evaluator-context-surface",
217
+ "invocation-capabilities",
218
+ "obligation-capabilities",
219
+ "capture-return-schemas",
220
+ "returned-view-ownership",
221
+ "capture-call-sites",
222
+ "compatibility-ledger"
223
+ ],
224
+ "compatibilityLedger": [
225
+ {
226
+ "id": "COMP-C1",
227
+ "sites": [
228
+ {"module": "capture", "anchor": "const candidateDigestForAuditOrStale = (path) => {", "expectedCount": 1},
229
+ {"module": "capture", "anchor": "return artifact(artifactMap[path]);", "expectedCount": 1},
230
+ {"module": "capture", "anchor": "compatibilityCandidateBound(record, path, baselineDigestValue) {", "expectedCount": 1},
231
+ {"module": "capture", "anchor": "return artifact(artifactMap[path]).length > 0", "expectedCount": 1}
232
+ ],
233
+ "allowed": ["guarded per-path audit fallback after poison/cache/accepted-baseline branches", "the exact uncaptured candidate-bound legacy expression"],
234
+ "forbidden": ["general evaluator artifact-map access", "eager or once-per-path normalization", "another caller of the fallback"]
235
+ },
236
+ {
237
+ "id": "COMP-C2-EVAL",
238
+ "sites": [
239
+ {"module": "evaluator", "anchor": "function isRecord(value) {", "expectedCount": 1},
240
+ {"module": "evaluator", "anchor": "function completeExecution(item) {", "expectedCount": 1},
241
+ {"module": "evaluator", "anchor": "function incompleteFields(item) {", "expectedCount": 1},
242
+ {"module": "evaluator", "anchor": "function evaluateObligation(obligation, context) {", "expectedCount": 1},
243
+ {"module": "evaluator", "anchor": "const baselineBound = (item, entry) => {", "expectedCount": 1},
244
+ {"module": "evaluator", "anchor": "const requirementScopeUnknown = capability === 'requirement-sync'", "expectedCount": 1},
245
+ {"module": "evaluator", "anchor": "const citationsCoverScope = item => {", "expectedCount": 1},
246
+ {"module": "evaluator", "anchor": "const envelopeAttested = Boolean(envelope)", "expectedCount": 1}
247
+ ],
248
+ "allowed": ["existing live record identity and field reads at the enumerated source regions", "existing per-REQ citation and waiver checks"],
249
+ "forbidden": ["blanket evaluator exemption", "record snapshot or identity deduplication", "new read of an allowed field", "merged endpoint records"]
250
+ },
251
+ {
252
+ "id": "COMP-C2-BOUND",
253
+ "sites": [
254
+ {"module": "capture", "anchor": "compatibilityCandidateBound(record, path, baselineDigestValue) {", "expectedCount": 1},
255
+ {"module": "capture", "anchor": "record.artifactDigests[path] === artifactMap[path].digest", "expectedCount": 1}
256
+ ],
257
+ "allowed": ["one record borrow in the existing interleaved candidate/map/record expression", "boolean return only"],
258
+ "forbidden": ["returning or storing the raw record", "iterating unrelated records", "extra reads inside the method"]
259
+ },
260
+ {
261
+ "id": "COMP-C3",
262
+ "sites": [
263
+ {"module": "evaluator", "anchor": "const executionList = Array.isArray(executionRecords) ? executionRecords.filter(isRecord) : [];", "expectedCount": 1},
264
+ {"module": "evaluator", "anchor": "const knownIds = new Set(obligationList.map(item => nonEmptyString(item.id) ? item.id : item.capability)", "expectedCount": 1},
265
+ {"module": "evaluator", "anchor": "for (const waiver of reviewList.filter(item => item.kind === 'waiver' && !knownIds.has(item.obligationId))) {", "expectedCount": 1}
266
+ ],
267
+ "allowed": ["record ingestion, known-id construction, and unmatched waiver scan before evaluation"],
268
+ "forbidden": ["moving ingestion after applicability", "skipping empty-obligation ingestion", "reducing existing reads"]
269
+ },
270
+ {
271
+ "id": "COMP-C4",
272
+ "sites": [
273
+ {"module": "evaluator", "anchor": "const mismatch = item.paths.find(path => obligationCapture.compatibilityStaleArtifactMismatch(item, path));", "expectedCount": 1},
274
+ {"module": "capture", "anchor": "compatibilityStaleArtifactMismatch(record, path) {", "expectedCount": 1},
275
+ {"module": "capture", "anchor": "candidateDigestForAuditOrStale(path).length > 0", "expectedCount": 1}
276
+ ],
277
+ "allowed": ["ordered path.find mismatch pass with its conditional second selector call"],
278
+ "forbidden": ["filtering out-of-scope paths", "new path lookup", "removing or reordering the conditional selector call"]
279
+ },
280
+ {
281
+ "id": "COMP-C5",
282
+ "sites": [
283
+ {"module": "capture", "anchor": "function prdSetDigest(artifactMap) {", "expectedCount": 1},
284
+ {"module": "capture", "anchor": "Object.keys(artifactMap)", "expectedCount": 1},
285
+ {"module": "capture", "anchor": "compatibilityPrdSetDigest() {", "expectedCount": 1},
286
+ {"module": "evaluator", "anchor": "envelope.candidateDigest === capture.compatibilityPrdSetDigest()", "expectedCount": 1}
287
+ ],
288
+ "allowed": ["sorted all-docs/prd digest enumeration at the existing envelope short-circuit"],
289
+ "forbidden": ["eager PRD scan", "excluding out-of-scope PRDs", "new caller or earlier timing"]
290
+ },
291
+ {
292
+ "id": "COMP-CONTAINER",
293
+ "sites": [
294
+ {"module": "capture", "anchor": "prepareBaselineContainer() {", "expectedCount": 1},
295
+ {"module": "capture", "anchor": "baselineArtifactsMap = isPlainObject(baseline) && isPlainObject(baseline.artifacts)", "expectedCount": 1}
296
+ ],
297
+ "allowed": ["per-evaluation guarded baseline.artifacts read with current valid-container two-get schedule"],
298
+ "forbidden": ["moving the read to invocation initialization", "changing valid/invalid branch getter schedule"]
299
+ },
300
+ {
301
+ "id": "COMP-METADATA",
302
+ "sites": [
303
+ {"module": "evaluator", "anchor": "function checkDocObligations({ obligations, artifacts, baseline, executionRecords, reviewRecords } = {}) {", "expectedCount": 1},
304
+ {"module": "evaluator", "anchor": "const applicability = obligation.applicability;", "expectedCount": 1},
305
+ {"module": "evaluator", "anchor": "const declaredBaselinePaths = declaresBaselinePaths ? scopeObject.baselinePaths : undefined;", "expectedCount": 1},
306
+ {"module": "capture", "anchor": "path: rawEntry.path,", "expectedCount": 1},
307
+ {"module": "capture", "anchor": "const value = baselineArtifactsMap[path];", "expectedCount": 1}
308
+ ],
309
+ "allowed": ["current root/scope/declaration gates and captured metadata reads", "saved malformed-value stringify at its existing formatter"],
310
+ "forbidden": ["rawEntry reads after capture", "extra ownership probes", "changed coercion timing", "universal deep clone"]
311
+ },
312
+ {
313
+ "id": "COMP-REQ",
314
+ "sites": [
315
+ {"module": "evaluator", "anchor": "const requirementScopeUnknown = capability === 'requirement-sync'", "expectedCount": 1},
316
+ {"module": "evaluator", "anchor": "const citedEntries = Array.isArray(obligation.citedReqs) ? obligation.citedReqs : [];", "expectedCount": 1},
317
+ {"module": "evaluator", "anchor": "const citedIds = reqIdsOf(obligation.citedReqs);", "expectedCount": 1},
318
+ {"module": "evaluator", "anchor": "const envelope = isPlainObject(obligation.inventory) ? obligation.inventory : null;", "expectedCount": 1},
319
+ {"module": "evaluator", "anchor": "const triggerPresent = Object.prototype.hasOwnProperty.call(obligation, 'requirementSyncTrigger');", "expectedCount": 1}
320
+ ],
321
+ "allowed": ["existing requirement scope, citedReqs, reqUpdates, envelope, trigger and record identity reads"],
322
+ "forbidden": ["Fact/registry refactor", "new eager metadata reads", "changing authority, unknown-scope, coverage, or diagnostic timing"]
323
+ }
324
+ ]
325
+ }