Repository navigation
Fix flaky private-identifier assertion in Experiment tests - #2169
Merged
Merged
Conversation
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #2167.
The request privacy assertion matched
421inside legitimate Experiment and Trial paths. Check decoded JSON string values with the numeric identifier token rule fromKind::mentions, accepting hashes while still rejecting421,PR 421,#421, and/pull/421.The change stays in the tests and retains the quoted-title/full-reference-commit absence assertions and all five positive Session evidence leak-hit assertions.
Evidence
Execution evidence
The baseline was
4d24f79d170c8e72be238f405efc4d3215962375. This deterministic path collision reproduced the reported assertion failure:tests/experiments/process.rs:111:17;test result: FAILED. 0 passed; 1 failed. The printed request contained421only inrepositoryandoutput_dirpaths; inputs remainedmain,issue-7,/issues/7, and/pull/1.test result: ok. 1 passed; 0 failed.421changed to42ainTMPDIRpassed (exit 0, 1 passed). This distinguishes the path collision from a leaked private input.The retained regression runs through the same request assertion, with literal examples covering hashes, adjacent Unicode letters/digits/underscores/hyphens, nested objects/arrays, identifier tokens and JSON-escaped digits:
cargo test --locked --test experiments process::request_privacy_check_distinguishes_identifier_tokens_from_hashes -- --exact --nocaptureleft: true,right: false; 0 passed, 1 failed.The required focused command also passed normally (exit 0, 1 passed):
cargo test --locked --test experiments process::process_session_evidence_check_all_private_fix_identifiers_and_abbreviated_commits -- --exact --nocapturecargo fmt --all -- --checkpassed.scripts/affected-tests mainselected the full Rust suite (cargo test, because nextest is unavailable) and passed:PASS cargo test (1348.67s), including compilation. The full run also passed both tests above. CI passed for commit8039826b, including all four Rust partitions and the coverage gate, site tests and Console tests.Test seams
request.jsonstring values distinguish private identifier tokens from digits embedded in hashes.Review
Independent reviews against
refs/remotes/origin/main: Standards 0 findings; Spec 0 findings. Both reviewers read the complete changed file. Unread changed files: none. Generated-output exclusions: none.Unaddressed findings
Security review outcome
No unaddressed introduced findings.
Merge Danger
Door: two-way
The change can be reverted directly.
Blast Radius: tests
Only
tests/experiments/process.rschanges.Built with codex codex-cli 0.167.2 · gpt-6.1-sol · xhigh