Repository navigation
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
e6baf2a to
1ba5c2d
Compare
… name collectTransportFacts chose between loss and packet handling from the redacted event name. When an explicit sensitive value hid the name value (for example "sent" in transport:packet_sent) or the name property, the record's STREAM ranges or loss declaration were dropped without listing its ordinal in incomplete_fact_records, so empty facts read as nothing recorded. Compare the validated source name with the visible one and list the record as incomplete when a loss or packet event's name is hidden.
1ba5c2d to
8bbbaba
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.
|
This change landed on main in f690571 (listed under "Reviewed fixes"), so I'm closing this PR. Thanks for reviewing it! |
|
Thanks @Dragolone for catching that explicit redaction of a qlog event name could erase transport facts while leaving an apparently complete empty trace. Main now records those hidden facts as incomplete in |
Summary
When an explicit sensitive value hides a qlog event's name, the decoder drops that record's transport facts without listing it in
incomplete_fact_records. The trace then reportsstreams: []/loss_declarations: []with an empty incomplete list, which reads as "nothing recorded".collectTransportFactspicks loss or packet handling from the redactedvisible.name. A declaration such as"sent"hides the valuetransport:packet_sent(and"name"hides the property itself). The function then returns early before any incomplete-record bookkeeping. A hiddenframe_type,framesor STREAM field is already reported as incomplete; a hidden event name was not.No issue is linked: I searched issues and PRs for "qlog", "incomplete_fact_records", "qlog sensitive" and "qlog incomplete" and found no report. No open PR touches
QlogCapture.ts.Problem and expected behavior
Smallest trigger:
decodeQlogCapture(text, ["sent"])on onetransport:packet_sentSTREAM event plus onerecovery:packet_lostevent."sent"[][0]"lost"[][1]"name"[][0, 1]"stream"(control: hidesframe_type)[0]Violated contract (
docs/web-network-captures.md): facts "that cannot be safely shown are omitted with incomplete-record coordinates", and incomplete fact records are "ordinals with omitted/redacted interpretable frame metadata".Change and scope
collectTransportFactsnow receives the validated source event name. If the source event is a loss or packet event and the visible name differs (value redacted or property hidden), the record's ordinal is added toincomplete_fact_recordsand no facts are derived from it. Events whose source name is not interpretable (for exampleextension:custom) are not marked; the test covers this. Nothing is revealed: the hidden name is only compared, never projected.Not included: other qlog behavior.
Contribution scope: an ordinary evidence/redaction correctness fix within existing boundaries; a maintainer scope decision is not applicable.
Contract and boundary impact
collectTransportFactsinsrc/browser/history/QlogCapture.ts.incomplete_fact_recordsnow lists records whose interpretable event name was hidden.docs/public/product-catalog.json), package, or installation impact: none.Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
Evidence and regression coverage
src/browser/history/QlogCapture.test.ts— "lists records whose event name a declaration of $hidden hides as incomplete", parameterized oversent,lostandname. It includes a non-interpretable extension event that must stay unmarked.94072364call three cases fail; the incomplete list is[]in each.For evidence-bearing changes:
Validation performed
macOS (Apple silicon), Node 24.19.0.
npx vitest run src/browser/history/QlogCapture.test.tson the base — the three new cases fail.npx vitest run src/browser/history/with the fix — 5 files, 102 tests passed.npm run build:cached && npx vitest run tests/acceptance/tools/qlogCapture.test.ts— 4 passed, 1 skipped.npm run typecheck— passed.npx oxfmt --checkandnpx oxlinton both changed files — passed, no errors.npm run verify:module-boundaries— passed.Compatibility, safety, and release
Before merge
type(scope): outcome.