Repository navigation
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
[Medium impact] The reviewed change appears safe to merge and preserves qlog numeric redaction. SummaryThe diff moves qlog numeric redaction and conversion into the shared
Reviews (5) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile |
f65484b to
6de0821
Compare
6de0821 to
1cf3d0a
Compare
Own service-worker CDP registrations and retry failed teardown. Admit redaction and network metadata against remaining capture capacity, retain explicit omission reasons, and preserve source URL, redirect ancestry, caller-selected content, and historical capture values. Forward CLI cancellation through provider cleanup. Reviewed fixes: #2263, #2637, #2767, #2845, #2859, #2863, #2872, #2874, #2876, #2879, #2955, #2957, #2961, #3033. Validation: 25 current event/network source tests passed; earlier focused browser lanes passed 201 source tests and 176 boundary tests with two skips, plus 35 Python tests. Real browser/Windows lanes were not rerun. Playwright allocation before admission remains unbounded by these retention limits.
|
Edit: Main caught up with most of this PR. I retested what is left here. Heads up: main already has this change in f690571. The code is in 🤖 Generated with Claude Code (Sonnet 5.5, verified by Opus 5.5) 🦊 |
# Conflicts: # tests/boundary/browser/historicalWebCapture.test.ts
|
Merged latest |
|
TL;DR: After main caught up, one change is left here. It makes QlogCapture use the helper that main already has for number redaction. I ran it on main 95c8f57 and it behaves the same as main, on Node 22, 24 and 26. Edit on my earlier comment: the leftover change is now tested, details below. The PR changes one file, Thanks, lzhMeow, for the fix. Not run
Commandsgit archive main | tar -x -C /tmp/ev-2872/main
npm ci --ignore-scripts && npm run prepare && npm run build:cached && npm run test:prepare # exit 0
npm run test:focused -- src/browser/history/QlogCapture.test.ts src/browser/history/QlogRedactionProbe.test.ts # exit 0, 25 passed, Node 22, 24, 26
cp <PR head>/src/browser/history/QlogCapture.ts src/browser/history/QlogCapture.ts
npm run build:cached # exit 0
npm run test:focused -- src/browser/history/QlogCapture.test.ts src/browser/history/QlogRedactionProbe.test.ts # exit 0, 25 passed, Node 22, 24, 26; probe output identicalTest setup🤖 Generated with Claude Code (Sonnet 5.5, verified by Opus 5.5) 🦊 |
|
Closing as superseded on main. The HAR numeric-redaction fix and regression coverage landed in f6905719, and the remaining qlog shared-owner refactor landed in a496131e. The current one-file PR patch is already present on main; normalized-sensitive-value and source-literal regressions remain retained. This closeout used source/diff verification and did not rerun platform tests. Thank you for the contribution. |
Summary
Fix HAR numeric redaction when JSON normalization introduces a caller-excluded literal. With
_number: 1e3andsensitive_values: ["1000"], inspection previously returned_number: 1000. It now returns null, omits that numeric sidecar, and records anexplicit-sensitive-valueredaction. Unmarked values and exact producer lexemes remain retained.Problem and expected behavior
HAR checked declarations against the original number lexeme, but omitted the normalized spelling it actually published. Both
1e3→1000and0.0000001→1e-7could reintroduce excluded text. Exclusion must apply before reported values or numeric sidecars are retained, in container metadata and extracted records.Change and scope
CaptureRedaction.numberowns safe conversion and checks for both spellings. HAR and qlog use this shared owner; qlog already checked normalized values, so the refactor preserves its behavior and removes duplicated interpretation. HAR schema admission still validates the unredacted projection. No downstream filter or directly related cleanup remains.This is an ordinary fix within existing offline capture inspection; no advance maintainer scope decision applies. No separate issue is linked because the bug was found and reproduced during review. Related-PR searches found no equivalent fix; #2477 addresses binary byte counts.
Contract and boundary impact
Evidence and regression coverage
Source regressions cover container metadata and records, sidecar omission, exact redaction pointers and unmarked controls. Compiled CLI/stdio MCP regressions also verify matching Evidence identities and normalized results, plus unchanged input files.
On clean base
117bd23dd, both new end-to-end cases fail after successful CLI/MCP decoding: excluded values remain1000and1e-7. Source regressions reproduce the same failures. On the fixed tree, all 107 related tests across six files pass, with no skips.Validation performed
Windows x64, pinned Node 24.18.0, npm 11.16.0, locked dependencies installed with
npm ci --cache .cache/npm --foreground-scripts; installation scripts completed normally. Fixed and baseline runtimes were freshly compiled withnpm run build. End-to-end runs used the same Windows user permissions, toolchain, dependencies and native addon. Earlier sandbox access-denial attempts are not counted as passing verification.The native addon comes from upstream CI run 38395741217, commit
1729e87d9f2d1e9db797864cdfe763a327e13049. All four native source blobs and the build script match this checkout; both package versions are 6.4.0. Archive SHA-256 matches GitHub's digest. The current artifact verifier confirms addon SHA-256, package version, Windows x64/PE32+, Node-API 8 and ABI 1. Generated artifacts and the local toolchain are ignored and uncommitted.npm run test:focused -- src/browser/history/HarCapture.test.ts src/browser/history/QlogCapture.test.ts src/application/WebNetworkCaptureService.test.ts tests/boundary/browser/historicalWebCapture.test.ts tests/boundary/mcp/webNetworkCaptureMcp.test.ts tests/acceptance/tools/historicalCaptureResources.test.ts— 107 passed, including real HAR memory exhaustion and server usability afterward.npm run build,npm run verify:windows-native:artifact— passed; builds report two ineffective dynamic-import warnings.npm run typecheck,npm run knip,npm run verify:module-boundaries,npm run verify:architecture-guards,npm run verify:test-discovery— passed; all 1,071 test files discovered once.git diff --check— passed; lint retains two existing function-length warnings.npm run check— fails formatting in unchangedtests/fixtures/javaClassFile.ts.npm run check:fast— fails function-length lint in unchangedtests/boundary/providers/ghidra/ghidraLauncher.test.ts:431andsrc/ghidra/GhidraFunctionValues.test.ts:46.Both aggregate-check failures were independently reproduced with the same commands on clean base
117bd23ddunder the pinned toolchain. They remain unresolved and are not reported as passing checks.Compatibility, safety, and release
No schema changes, migration, dependency updates or release metadata changes. Real Windows CLI/MCP capture-worker behavior is verified with synthetic offline HAR files. Real browser, Hopper, Ghidra and mitmproxy producer execution, Linux/macOS runs and a full-suite pass are not claimed.
Before merge