fix(ci): route the pip-stderr log lines through the context redactor - #7574
fix(ci): route the pip-stderr log lines through the context redactor#7574CrysisDeu wants to merge 1 commit into
Conversation
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Design Review (Fable 5) — ✅ PASSDesign-level review of Design-Verdict: PASS Correct unblocker: converts the two sites per the ratchet's own remedy, keeps redact-before-bound, and shrinks the debt instead of re-counting it. [DESIGN-REVIEWED] a65d803 |
Opus 4.8 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
First Principles Review (Fable 5) — ✅ PASSPremise-level review of I've verified everything I need. The change is exactly what the description claims: two call sites, one import swap, one comment. The conversion target First-Principles-Verdict: PASS A red-main unblocker that takes the ratchet's own documented remedy — convert the site — instead of re-legitimizing the debt by re-counting. What this change shipsIntent: get
Every item is derived: the fix follows the mechanism the ratchet's census docstring prescribes, the helper pre-exists (3 prior consumers: [FIRST-PRINCIPLES-REVIEWED] a65d803 |
The ensurepip and faiss-cpu install-failure warnings read the baseline redactor via redact_and_truncate. The gate-side log-site census counts zero baseline sites for dashboard/handlers/memory.py, so main fails test_no_new_gate_side_log_line_reads_the_baseline_redactor — a cross- merge between the redaction of pip stderr and the census ratchet. Both lines now reach their text through redact_log_via_context, so a loaded companion's extra credential regexes apply instead of the OSS baseline; the length bound is a slice applied after redaction saw the full decoded stderr, preserving the redact-before-bound invariant.
69c823f to
a65d803
Compare
|
Superseded by #7572, which landed the same conversion first. Closing. |
Summary
mainis red on Backend Tests shards + Coverage Gate:test_security_posture.py::TestGateSideLogRedactorSpelling::test_no_new_gate_side_log_line_reads_the_baseline_redactorfails withdashboard/handlers/memory.py: 2 sites, census says 0.Cross-merge: the pip-stderr redaction (#7283) added two
redact_and_truncatelog sites tomemory.py, and the census ratchet (#7278) landed with a pre-#7283 count. Nothing re-measures the census at merge, so main merged red — same class as #7492's files.py re-measure.This takes the ratchet's preferred remedy (convert, not re-count): both install-failure warnings now reach their text through
redact_log_via_context, so a loaded companion's extra credential regexes apply instead of the OSS baseline. The_PIP_STDERR_LOG_CHARSbound is a slice applied after redaction saw the full decoded stderr, preserving the redact-before-bound invariant. The census entry formemory.pystays at 0, which the scanner now agrees with. The diff is the two call sites plus the import and the constant's comment —memory.pystays in the black baseline untouched.Pattern harvest
Rule candidate: when two PRs land concurrently and one adds a ratchet whose baseline was measured before the other's sites existed, main merges red with neither PR at fault; a merge-time re-measure of ratchet baselines (or a required merge-queue) is the structural fix. Until then, unblockers should prefer the ratchet's own named remedy (convert the site) over re-counting the baseline, so the debt shrinks instead of being re-legitimized.
Testing
test/test_security_posture.py— 47 passed (the failing census test now green)test/test_handlers_memory_coverage.py— passed (228 total in the combined run)blackbaseline gate /flake8/isort/mypyclean on the touched fileno linked issue: main-breakage unblocker, same shape as #7492.