[GH-ISSUE #2608] fix(browser): report complete storage key inventory changes #924

Closed
opened 2026-10-15 18:29:36 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @coygeek on GitHub (Oct 13, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/2608

Summary

Comparing complete storage key inventories suppresses key additions and removals when content fingerprints were not selected. With otherwise equal reported storage metadata, adding a local-storage key returns an unknown dimension and zero changes, even though both inventories establish the difference.

Steps to reproduce

  1. At the source baseline below, start with the page-inspection fixture in src/domain/webBundleAnalyzer.test.ts. Set completeness to complete_within_window, clear its attach-limited sections, and ensure no coverage list marks storage_keys incomplete.
  2. Set storage usage to 1, quota to 10, local-storage keys to ["alpha"], content fingerprints to [], and fingerprints_complete to false. This represents selected complete key capture with content fingerprints unselected.
  3. Clone the inspection and change only local-storage keys to ["alpha", "beta"].
  4. Parse {before: {inspection: before}, after: {inspection: after}} with compareWebCapturesInputSchema, call compareWebCaptures, and read dimensions.storage. Reverse the two inspections to test removal.

Expected behavior

Both complete key inventories should establish the addition or removal of beta. The storage dimension should report changed with the corresponding key change, while leaving content equivalence unproven when fingerprints were not selected.

Actual behavior

Both comparison directions returned status: "unknown", total_changes: 0, and changes: [], with a reason that storage fingerprints, inventories, usage, or quota were unavailable or truncated. Setting both fixtures' fingerprint completeness to true returned changed with one storage:local_storage:beta addition. Identical incomplete-fingerprint fixtures remained unknown, as expected.

Evidence

  • Expected source: src/domain/webCaptureDiff.ts:39-44 distinguishes complete key inventories from fingerprint comparison and says observed differences prove changed; src/domain/browserObservation.ts:102-103,124-129 accepts key selection without fingerprints; src/browser/CdpCaptureStorage.ts:39-94 preserves this producer state.
  • Failure source: src/domain/webCaptureDiff.ts:654-663 requires complete fingerprints for the dimension-wide completeness flag, and src/domain/webCaptureDiff.ts:74-76 consequently suppresses added and removed key identities despite complete key coverage.
  • Evidence provenance: observed
  • Local verification: reproduced
  • Reproduction completeness: complete

One focused domain observation test passed while asserting the faulty addition/removal results, the complete-fingerprint control, the identical-input control, and an unavailable-key control. Inputs passed the production normalized comparison schema. Live page capture, storage modification, and CLI/MCP transport were not run.

Restoration check

Return changed with the beta addition and removal for the complete-inventory fixtures without requiring fingerprint selection. Keep identical incomplete-fingerprint captures unknown, and do not infer a key's absence when either key inventory is incomplete. Preserve the existing incomplete-fingerprint control in tests/boundary/browser/webCaptureDiff.test.ts:821-832 and the successful complete-fingerprint comparison.

Runtime or environment

Source revision: 8b181716ac. Node.js v26.10.0, npm 11.19.1, and lockfile-installed dependencies.

Triage assessment

  • Impact level: P2
  • Assessment status: supported
  • Impact basis: A supported keys-only capture selection loses proven key additions and removals from the comparison. Equal usage and quota expose an unknown result; other independently modified metadata may still report changed.
  • Workaround status: unverified
  • Workaround basis: The complete-fingerprint fixture reports the key change, but selecting fingerprints requires additional content evidence, and a practical live recapture workaround was not verified.
Originally created by @coygeek on GitHub (Oct 13, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/2608 ## Summary Comparing complete storage key inventories suppresses key additions and removals when content fingerprints were not selected. With otherwise equal reported storage metadata, adding a local-storage key returns an unknown dimension and zero changes, even though both inventories establish the difference. ## Steps to reproduce 1. At the source baseline below, start with the page-inspection fixture in `src/domain/webBundleAnalyzer.test.ts`. Set completeness to `complete_within_window`, clear its attach-limited sections, and ensure no coverage list marks `storage_keys` incomplete. 2. Set storage usage to `1`, quota to `10`, local-storage keys to `["alpha"]`, content fingerprints to `[]`, and `fingerprints_complete` to `false`. This represents selected complete key capture with content fingerprints unselected. 3. Clone the inspection and change only local-storage keys to `["alpha", "beta"]`. 4. Parse `{before: {inspection: before}, after: {inspection: after}}` with `compareWebCapturesInputSchema`, call `compareWebCaptures`, and read `dimensions.storage`. Reverse the two inspections to test removal. ## Expected behavior Both complete key inventories should establish the addition or removal of `beta`. The storage dimension should report changed with the corresponding key change, while leaving content equivalence unproven when fingerprints were not selected. ## Actual behavior Both comparison directions returned `status: "unknown"`, `total_changes: 0`, and `changes: []`, with a reason that storage fingerprints, inventories, usage, or quota were unavailable or truncated. Setting both fixtures' fingerprint completeness to true returned changed with one `storage:local_storage:beta` addition. Identical incomplete-fingerprint fixtures remained unknown, as expected. ## Evidence - Expected source: `src/domain/webCaptureDiff.ts:39-44` distinguishes complete key inventories from fingerprint comparison and says observed differences prove changed; `src/domain/browserObservation.ts:102-103,124-129` accepts key selection without fingerprints; `src/browser/CdpCaptureStorage.ts:39-94` preserves this producer state. - Failure source: `src/domain/webCaptureDiff.ts:654-663` requires complete fingerprints for the dimension-wide completeness flag, and `src/domain/webCaptureDiff.ts:74-76` consequently suppresses added and removed key identities despite complete key coverage. - Evidence provenance: observed - Local verification: reproduced - Reproduction completeness: complete One focused domain observation test passed while asserting the faulty addition/removal results, the complete-fingerprint control, the identical-input control, and an unavailable-key control. Inputs passed the production normalized comparison schema. Live page capture, storage modification, and CLI/MCP transport were not run. ## Restoration check Return changed with the `beta` addition and removal for the complete-inventory fixtures without requiring fingerprint selection. Keep identical incomplete-fingerprint captures unknown, and do not infer a key's absence when either key inventory is incomplete. Preserve the existing incomplete-fingerprint control in `tests/boundary/browser/webCaptureDiff.test.ts:821-832` and the successful complete-fingerprint comparison. ## Runtime or environment Source revision: 8b181716aca2cb467be499cba226abfb5ae19141. Node.js v26.10.0, npm 11.19.1, and lockfile-installed dependencies. ## Triage assessment - Impact level: P2 - Assessment status: supported - Impact basis: A supported keys-only capture selection loses proven key additions and removals from the comparison. Equal usage and quota expose an unknown result; other independently modified metadata may still report changed. - Workaround status: unverified - Workaround basis: The complete-fingerprint fixture reports the key change, but selecting fingerprints requires additional content evidence, and a practical live recapture workaround was not verified.
bsakaguchi 2026-10-15 18:29:36 +00:00
  • closed this issue
  • added the
    bug
    label
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#924
No description provided.