[GH-ISSUE #7364] [Bug] 347494f3a attaches the source snapshot identity to capture refusals; sazWebCapture withholding tests now fail #4375

Closed
opened 2026-10-31 00:49:20 +00:00 by bsakaguchi · 3 comments
Owner

Originally created by @chordpli on GitHub (Oct 27, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/7364

Area: Process capture or runtime observation · Interface: MCP · Earliest failure stage: Transport or result projection
REA version: source 15a8f6847 (also fails on a905a71e3)
Runtime and platform: Node 24.22.1; macOS 26.5.2 arm64 (local); ubuntu GitHub-hosted runners (CI)

Observed behavior

inspect_web_network_capture refusals now carry details.partial_observation: { kind: "file-snapshot-hash", path, sha256, bytes }: the capability_unavailable refusal when trailer credentials were not checked, and the input refusal for an expanded limit. Two tests assert the opposite and fail at 15a8f6847 and in CI:

  • tests/boundary/browser/sazWebCapture.test.ts:273 › checks trailer credentials before hidden metadata blocks analysis and withholds unchecked source
  • tests/boundary/browser/sazWebCapture.test.ts:887 › rejects expanded-limit before returning a selected subset

Reproduction

npm run test:focused -- tests/boundary/browser/sazWebCapture.test.ts at 347494f3a → 2 failed / 16 passed; at its parent 7a237aa72 → 18 passed. Bisect bracketed to this commit.

Expected behavior

Unknown which contract is intended:

  • src/browser/history/HistoricalCaptureDecoder.ts:453-456 (added in 347494f3a) retains sourceObservation on every capture failure that has no partial observation, and the commit's own test tests/process-global/historicalCaptureSnapshotRedaction.test.ts expects the snapshot identity on cleanup failures, redacted through excludeSnapshotIdentity.
  • The saz tests encode the earlier contract: a refusal that withholds unchecked source carries no observation at all.

Impact and scope

Refusal payloads now include the caller-selected path and the file digest (identity, not content). Sensitive literals are excluded by excludeSnapshotIdentity. Whether identity-on-refusal is desired is a contract decision.

Relevant output or evidence

AssertionError: expected { provider_id: 'saz', …(4) } to not have property "partial_observation" with received { bytes: 1018, kind: "file-snapshot-hash", path: "<tmp>/capture.saz", sha256: "80f51d…" }.

Analysis or suspected cause

If identity on refusals is intended, the two tests should assert the snapshot (and its exclusion under sensitive_values). If not, retention should be limited to read/cleanup phases rather than every failure. I am not changing either side without a maintainer decision; happy to send the PR for whichever is chosen.

Originally created by @chordpli on GitHub (Oct 27, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/7364 Area: Process capture or runtime observation · Interface: MCP · Earliest failure stage: Transport or result projection **REA version:** source `15a8f6847` (also fails on `a905a71e3`) **Runtime and platform:** Node 24.22.1; macOS 26.5.2 arm64 (local); ubuntu GitHub-hosted runners (CI) ### Observed behavior `inspect_web_network_capture` refusals now carry `details.partial_observation: { kind: "file-snapshot-hash", path, sha256, bytes }`: the `capability_unavailable` refusal when trailer credentials were not checked, and the input refusal for an expanded limit. Two tests assert the opposite and fail at 15a8f6847 and in CI: - `tests/boundary/browser/sazWebCapture.test.ts:273` › checks trailer credentials before hidden metadata blocks analysis and withholds unchecked source - `tests/boundary/browser/sazWebCapture.test.ts:887` › rejects expanded-limit before returning a selected subset ### Reproduction `npm run test:focused -- tests/boundary/browser/sazWebCapture.test.ts` at 347494f3a → 2 failed / 16 passed; at its parent 7a237aa72 → 18 passed. Bisect bracketed to this commit. ### Expected behavior Unknown which contract is intended: - `src/browser/history/HistoricalCaptureDecoder.ts:453-456` (added in 347494f3a) retains `sourceObservation` on every capture failure that has no partial observation, and the commit's own test `tests/process-global/historicalCaptureSnapshotRedaction.test.ts` expects the snapshot identity on cleanup failures, redacted through `excludeSnapshotIdentity`. - The saz tests encode the earlier contract: a refusal that withholds unchecked source carries no observation at all. ### Impact and scope Refusal payloads now include the caller-selected path and the file digest (identity, not content). Sensitive literals are excluded by `excludeSnapshotIdentity`. Whether identity-on-refusal is desired is a contract decision. ### Relevant output or evidence `AssertionError: expected { provider_id: 'saz', …(4) } to not have property "partial_observation"` with received `{ bytes: 1018, kind: "file-snapshot-hash", path: "<tmp>/capture.saz", sha256: "80f51d…" }`. ### Analysis or suspected cause If identity on refusals is intended, the two tests should assert the snapshot (and its exclusion under `sensitive_values`). If not, retention should be limited to read/cleanup phases rather than every failure. I am not changing either side without a maintainer decision; happy to send the PR for whichever is chosen.
Author
Owner

@chordpli commented on GitHub (Oct 27, 2026):

Happy to send the PR for whichever contract you choose: update the two saz assertions to expect the (sensitivity-excluded) snapshot identity, or limit retention to read/cleanup phases. Waiting for the decision before changing either side.

<!-- gh-comment-id:6431793291 --> @chordpli commented on GitHub (Oct 27, 2026): Happy to send the PR for whichever contract you choose: update the two saz assertions to expect the (sensitivity-excluded) snapshot identity, or limit retention to read/cleanup phases. Waiting for the decision before changing either side.
Author
Owner

@chordpli commented on GitHub (Oct 27, 2026):

Resolved on main by 492860ed0 (test(captures): assert retained snapshot evidence, 2026-10-27T03:10Z): the two saz assertions now expect the file-snapshot-hash partial observation (path, sha256, bytes) on both refusals, so identity-on-refusal is the intended contract. Nothing left to do here; this can be closed.

<!-- gh-comment-id:6433170116 --> @chordpli commented on GitHub (Oct 27, 2026): Resolved on `main` by 492860ed0 (`test(captures): assert retained snapshot evidence`, 2026-10-27T03:10Z): the two saz assertions now expect the `file-snapshot-hash` partial observation (path, sha256, bytes) on both refusals, so identity-on-refusal is the intended contract. Nothing left to do here; this can be closed.
Author
Owner

@chordpli commented on GitHub (Oct 27, 2026):

Closing: main 492860ed0 updated both saz assertions to the retained file-snapshot-hash observation, which settles the contract this issue asked about.

<!-- gh-comment-id:6433285236 --> @chordpli commented on GitHub (Oct 27, 2026): Closing: `main` 492860ed0 updated both saz assertions to the retained `file-snapshot-hash` observation, which settles the contract this issue asked about.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#4375
No description provided.