[PR #7203] [MERGED] fix(browser): keep opaque cookie partitions unaligned #7713

Closed
opened 2026-11-03 13:39:50 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/7203
Author: @rudycelekli
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/27/2026
Merged by: @gensokyo-dev

Base: main ← Head: fix/opaque-cookie-partition


📝 Commits (10+)

  • c05b919 fix(browser): keep opaque cookie partitions unaligned
  • 3d74c48 fix(verifiers): consolidate Ghidra MCP result admission
  • 74d5cab fix(native): account export and version text in UTF-8 bytes
  • 9d2c087 fix(readers): preserve completed snapshots through cleanup retries
  • f6805e2 refactor(pe): centralize resource tree facts across readers
  • 093a981 Merge upstream main to refresh verified browser regression baseline
  • 23418e0 chore: preserve upstream files during baseline merge
  • 662ec2e fix(verifiers): preserve source Evidence through shared admission
  • 1ce9f31 refactor(pyinstaller): centralize PYZ member role ownership
  • 31e8492 refactor(artifacts): centralize completed snapshot observations

📊 Changes

959 files changed (+51803 additions, -8903 deletions)

View changed files

📝 .agents/skills/reverse-engineer-anything/SKILL.md (+6 -1)
📝 .agents/skills/reverse-engineer-anything/references/environments.md (+72 -26)
📝 .agents/skills/reverse-engineer-anything/references/javascript-applications.md (+9 -0)
📝 .github/workflows/ci.yml (+3 -0)
📝 bridge/ghidra/ReaGhidraBridge.java (+7 -17)
📝 docs/agent-environments.md (+9 -2)
📝 docs/browser-scenario-contract.md (+182 -3)
📝 docs/cli.md (+12 -4)
📝 docs/client-configuration.md (+15 -2)
📝 docs/desktop-applications.md (+1 -1)
📝 docs/firmware-analysis.md (+1 -1)
📝 docs/ghidra-dos.md (+1 -1)
📝 docs/ida-provider.md (+65 -0)
📝 docs/installation.md (+6 -4)
📝 docs/javascript-artifact-reconstruction.md (+18 -4)
📝 docs/javascript-route-inventory.md (+36 -4)
📝 docs/jeb-analysis.md (+1 -1)
📝 docs/kuna-provider.md (+11 -3)
📝 docs/managed-code-analysis.md (+14 -7)
📝 docs/mcp-contracts.md (+16 -1)

...and 80 more files

📄 Description

Summary

Fixes #6817's remaining opaque-cookie identity collision. A CDP cookie with partitionKeyOpaque: true now has an explicit opaque identity marker and cannot align with an unpartitioned cookie of the same name/domain/path. Its value hash survives; its fingerprint and comparisons remain incomplete/unknown. Ordinary cookies and serializable partition keys keep their existing hashes.

The shared CDP fingerprint owner performs this interpretation once for CLI/MCP. The implementation retains supplied partition metadata and relies on the existing fingerprint completeness owner. No additional protocol calls, cache, provider capability or response fields are added. Scope approval: not applicable; ordinary fix within existing read-only observation boundaries. No breaking contract or generated metadata change.

Evidence and validation

Refreshed from main 27ac1b67810400ecf5abc670ad02d920df0e0218, preserving both main's storage-pagination regressions and this PR's cookie regression.

  • Baseline plus the cookie regression: 1 failed / 10 passed; failure is opaque/unpartitioned identity equality. Fixed source: 63/63 across storage capture and capture-comparison suites.
  • npm run test:focused -- tests/boundary/browser/cdpBrowserProvider.storage_completeness.test.ts: 57 passed.
  • npm run build:cached: passed before and after. npm run check:fast: passed.
  • Actual Chrome for Testing 156.0.8078.4 on Linux: two CLI inspections and two stdio MCP inspections of a fixture-owned origin, first with an ordinary cookie and then with an additional same-name serializable CHIPS cookie. Independent canonical-JSON/SHA-256 checks against raw Network.getCookies verify identities, value hashes and coverage. CLI/MCP storage facts agree, both before and after; one MCP initialization and two tool calls, with no catalog listing.
  • Complete harness before → after: 8.347 → 9.793 s elapsed, 9.524 → 11.333 s CPU; sampled process-family RSS 1565.88 → 1562.49 MiB. One uncontrolled pair, two-CPU affinity, fresh profiles; no speedup or stable timing difference is established. /proc sums can double-count shared pages and miss short peaks. Reply sizes are unchanged (CLI 7487/8442 bytes; MCP 15791/17791 bytes). Model-token usage is unmeasured.
  • Real-browser limitation: a sandbox probe did not emit an opaque cookie. The opaque flag, retained value and unknown comparison are covered by the generated protocol regression, not claimed as a live opaque-cookie capture. No Windows/macOS real-browser verification for this change.

Hosted CI and review

CI 40435267705 completed with 27 successful jobs and 5 failed jobs (source tests, shard 1, Windows, portable aggregation, required aggregation). Static/docs/build, real-browser verification and native package baselines passed. The other seven test shards were cancelled by fail-fast and remain unverified; four jobs were skipped. The actual CI base was a905a71e31f71457cb21fd056b234f872126974e, newer than this branch's starting main.

On an unchanged checkout of that exact base, I independently reproduced the three distinct Linux failures: provider bundle-root binding (1 failed / 4 passed), artifact traversal uncertainty and Electron paired-renderer count (2 targeted failures / 13 filtered). The Windows Java empty-bitness detail failure was also reproduced on the same base on Linux (1 targeted failure / 8 filtered); this is not a Windows baseline execution. These paths are unchanged by this two-file cookie PR. The portable and required jobs aggregate those failures. No new cookie-related failure was observed in the executed lanes; cancelled shards remain a coverage gap.

Codex review could not run because the repository review quota is exhausted. Greptile reviewed exact head ef30aa4fd at 3/5; its sole P1 concerns saved-response step snapshot privacy already present in main, not these cookie changes. I inspected producer/consumer ownership and verified identical blobs at starting main, PR head and CI base. Scope explanation and remaining limitation; the thread is resolved as outside this change, not fixed. The cookie diff itself has no actionable findings. Human declarations below remain unchecked; their failure is not reported as code verification, and merge bypass is explicitly authorized by the requester.

Author readiness

Human owner: @rudycelekli

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/7203 **Author:** [@rudycelekli](https://github.com/rudycelekli) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@gensokyo-dev](https://github.com/gensokyo-dev) **Base:** `main` ← **Head:** `fix/opaque-cookie-partition` --- ### 📝 Commits (10+) - [`c05b919`](https://github.com/morluto/rea/commit/c05b919e485a89712ed572576caf1b6c48b10e80) fix(browser): keep opaque cookie partitions unaligned - [`3d74c48`](https://github.com/morluto/rea/commit/3d74c480e019621f804cd4d68101cffc5d367287) fix(verifiers): consolidate Ghidra MCP result admission - [`74d5cab`](https://github.com/morluto/rea/commit/74d5cab372150fe2d816980ef34ef315c5f9f1fa) fix(native): account export and version text in UTF-8 bytes - [`9d2c087`](https://github.com/morluto/rea/commit/9d2c087d8306803c232286e6e3f05fd6acc7a8ad) fix(readers): preserve completed snapshots through cleanup retries - [`f6805e2`](https://github.com/morluto/rea/commit/f6805e29c3c74223660686b5ca979c0508e1b195) refactor(pe): centralize resource tree facts across readers - [`093a981`](https://github.com/morluto/rea/commit/093a98155250715bd2095121122968661494cd98) Merge upstream main to refresh verified browser regression baseline - [`23418e0`](https://github.com/morluto/rea/commit/23418e06ad06fe0c6d81e6b56187d110f7719f77) chore: preserve upstream files during baseline merge - [`662ec2e`](https://github.com/morluto/rea/commit/662ec2e4501e975f2d1a28958a1ff560a9e24869) fix(verifiers): preserve source Evidence through shared admission - [`1ce9f31`](https://github.com/morluto/rea/commit/1ce9f317be4c5c9b8c8efb6e6260d4e4c933ab4d) refactor(pyinstaller): centralize PYZ member role ownership - [`31e8492`](https://github.com/morluto/rea/commit/31e8492fafc91438bc0c6e5a5cc40c989a6fc5b8) refactor(artifacts): centralize completed snapshot observations ### 📊 Changes **959 files changed** (+51803 additions, -8903 deletions) <details> <summary>View changed files</summary> 📝 `.agents/skills/reverse-engineer-anything/SKILL.md` (+6 -1) 📝 `.agents/skills/reverse-engineer-anything/references/environments.md` (+72 -26) 📝 `.agents/skills/reverse-engineer-anything/references/javascript-applications.md` (+9 -0) 📝 `.github/workflows/ci.yml` (+3 -0) 📝 `bridge/ghidra/ReaGhidraBridge.java` (+7 -17) 📝 `docs/agent-environments.md` (+9 -2) 📝 `docs/browser-scenario-contract.md` (+182 -3) 📝 `docs/cli.md` (+12 -4) 📝 `docs/client-configuration.md` (+15 -2) 📝 `docs/desktop-applications.md` (+1 -1) 📝 `docs/firmware-analysis.md` (+1 -1) 📝 `docs/ghidra-dos.md` (+1 -1) 📝 `docs/ida-provider.md` (+65 -0) 📝 `docs/installation.md` (+6 -4) 📝 `docs/javascript-artifact-reconstruction.md` (+18 -4) 📝 `docs/javascript-route-inventory.md` (+36 -4) 📝 `docs/jeb-analysis.md` (+1 -1) 📝 `docs/kuna-provider.md` (+11 -3) 📝 `docs/managed-code-analysis.md` (+14 -7) 📝 `docs/mcp-contracts.md` (+16 -1) _...and 80 more files_ </details> ### 📄 Description ## Summary Fixes #6817's remaining opaque-cookie identity collision. A CDP cookie with `partitionKeyOpaque: true` now has an explicit opaque identity marker and cannot align with an unpartitioned cookie of the same name/domain/path. Its value hash survives; its fingerprint and comparisons remain incomplete/unknown. Ordinary cookies and serializable partition keys keep their existing hashes. The shared CDP fingerprint owner performs this interpretation once for CLI/MCP. The implementation retains supplied partition metadata and relies on the existing fingerprint completeness owner. No additional protocol calls, cache, provider capability or response fields are added. Scope approval: not applicable; ordinary fix within existing read-only observation boundaries. No breaking contract or generated metadata change. ## Evidence and validation Refreshed from main `27ac1b67810400ecf5abc670ad02d920df0e0218`, preserving both main's storage-pagination regressions and this PR's cookie regression. - Baseline plus the cookie regression: 1 failed / 10 passed; failure is opaque/unpartitioned identity equality. Fixed source: 63/63 across storage capture and capture-comparison suites. - `npm run test:focused -- tests/boundary/browser/cdpBrowserProvider.storage_completeness.test.ts`: 57 passed. - `npm run build:cached`: passed before and after. `npm run check:fast`: passed. - Actual Chrome for Testing 156.0.8078.4 on Linux: two CLI inspections and two stdio MCP inspections of a fixture-owned origin, first with an ordinary cookie and then with an additional same-name serializable CHIPS cookie. Independent canonical-JSON/SHA-256 checks against raw `Network.getCookies` verify identities, value hashes and coverage. CLI/MCP storage facts agree, both before and after; one MCP initialization and two tool calls, with no catalog listing. - Complete harness before → after: 8.347 → 9.793 s elapsed, 9.524 → 11.333 s CPU; sampled process-family RSS 1565.88 → 1562.49 MiB. One uncontrolled pair, two-CPU affinity, fresh profiles; no speedup or stable timing difference is established. `/proc` sums can double-count shared pages and miss short peaks. Reply sizes are unchanged (CLI 7487/8442 bytes; MCP 15791/17791 bytes). Model-token usage is unmeasured. - Real-browser limitation: a sandbox probe did **not** emit an opaque cookie. The opaque flag, retained value and unknown comparison are covered by the generated protocol regression, not claimed as a live opaque-cookie capture. No Windows/macOS real-browser verification for this change. ## Hosted CI and review [CI 40435267705](https://github.com/morluto/rea/actions/runs/40435267705) completed with 27 successful jobs and 5 failed jobs (source tests, shard 1, Windows, portable aggregation, required aggregation). Static/docs/build, real-browser verification and native package baselines passed. The other seven test shards were cancelled by fail-fast and remain unverified; four jobs were skipped. The actual CI base was `a905a71e31f71457cb21fd056b234f872126974e`, newer than this branch's starting main. On an unchanged checkout of that exact base, I independently reproduced the three distinct Linux failures: provider bundle-root binding (1 failed / 4 passed), artifact traversal uncertainty and Electron paired-renderer count (2 targeted failures / 13 filtered). The Windows Java empty-bitness detail failure was also reproduced on the same base on Linux (1 targeted failure / 8 filtered); this is not a Windows baseline execution. These paths are unchanged by this two-file cookie PR. The portable and required jobs aggregate those failures. No new cookie-related failure was observed in the executed lanes; cancelled shards remain a coverage gap. Codex review could not run because the repository review quota is exhausted. Greptile reviewed exact head `ef30aa4fd` at 3/5; its sole P1 concerns saved-response step snapshot privacy already present in main, not these cookie changes. I inspected producer/consumer ownership and verified identical blobs at starting main, PR head and CI base. [Scope explanation and remaining limitation](https://github.com/morluto/rea/pull/7203#discussion_r4384445375); the thread is resolved as outside this change, **not fixed**. The cookie diff itself has no actionable findings. Human declarations below remain unchecked; their failure is not reported as code verification, and merge bypass is explicitly authorized by the requester. ## Author readiness Human owner: @rudycelekli - [ ] I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work. - [ ] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [ ] I declare this PR ready for initial maintainer review. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 13:39:50 +00:00
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#7713
No description provided.