Repository navigation
perf(sessions): skip unchanged quarantined Pi headers - #4734
Closed
ScriptedAlchemy wants to merge 1 commit into
Closed
ScriptedAlchemy wants to merge 1 commit into
ScriptedAlchemy wants to merge 1 commit into
Conversation
Preserve the exact file-witness quarantine disposition in the shared source ledger. Once durable Pi memo admission confirms an invalid header, avoid reopening it on later discovery passes without treating skipped evidence as complete coverage. A changed file witness re-enables header validation. Add a real Pi discovery and capture regression for skip, partial coverage, and recovery on a repaired file. Refs #4481
|
Owner
Author
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.
Root cause
Refs #4481 (repeated Pi discovery on invalid session headers).
The existing durable
PathMemorecords invalid Pi headers and already prevents repeated admission, but discovery opens and parses each unchanged invalid file before that memo can be consulted. The shared per-source ledger could skip the read, but its old boolean "already seen" result did not distinguish a fully covered file from a quarantined one. Blindly skipping invalid inputs would turn partial coverage into false success.Change
quarantined_headersand preserving partial provider coverage.observe_file_blockingstill returnsNonefor already-seen files.Regression
The new Pi test uses a real initialized discovery hub, actual malformed JSONL file, durable in-memory host admission, repeated scanner/capture paths, and then a repaired valid Pi fixture. It checks first refusal, subsequent skip without header-parsing evidence, continued partial coverage, and normal recovery to the nine retained observations.
Validation and scope
The isolated three-file patch was reviewed against the current
mastercode, including the source-claim and memo CAS boundaries; the resulting commit is a non-force fast-forward on a new branch. Rust compilation, formatting and regression execution have not run because this environment has no supplied repository checkout, Bazel or Rust toolchain. Hosted CI must execute the owning sessions tests on this exact PR head before merging. No CPU or file-open benchmark has been run; this is source-confirmed redundant work, not measured overall idle-CPU improvement.This improves repeated malformed-header scanning only while the discovery hub retains its in-memory ledger. After daemon restart the durable memo continues to prevent repeated admission, but the first discovery still inspects an invalid header once before warming the ledger. #4481 remains open for its separate scheduler CPU, storage/corruption, resource-usage and end-to-end macOS acceptance. It is not a full resolution.
The separate PR-repair automation owns CI repair and merges; this issue sweep does not modify its branches.