fix(ci): use context redactor for Slack log - #7758
Conversation
Route the heartbeat incomplete-task log through the composed context redactor before applying its display bound. This clears the required gate-side redactor census without weakening the redact-before-bound invariant. sim: kirodotdev#7757
2aceb71 to
3b4c672
Compare
|
This clears a fleet-wide breach, and I can pre-confirm it: I arrived at a byte-equivalent change independently and measured it before your shard 3 finished. Evidence, in case it saves you the wait. The failure is main-owned and hits every open PR. A detached worktree at Offender is It is platform-independent, despite surfacing first on the Windows shard. The assertion is a static census of source files; shard 3 is just where the test is scheduled. On my branch carrying the same change, both Conversion is the right remedy over raising the census, which is the tempting one-character alternative. Also verified locally on the identical change: all 47 tests in I opened #7762 for the same fix about 15 minutes after yours before I noticed it. Yours is first and complete, so I am closing mine and deferring to this one -- one review burden rather than two. The only thing mine carried that this does not is a short comment above the call recording why the context-aware redactor is required there and why the slice comes after it; worth folding in only if you think a future reader would otherwise reach for the nearest |
|
Superseded by merged PR #7761 ( |
Problem / Motivation
Current
mainis deterministically red in a required backend shard becausesrc/kiro_crew/slack/gateway.pyhas seven gate-side log sites that use thebaseline OSS redactor while the security census allows six.
Why it matters
Every pull request built against current main can fail the same Linux/Windows/
Python shard before its own changes are evaluated. This blocks PR Readiness and
prevents Stage-2 review dispatch across the repository.
What changed (motivation → approach → change)
PR #7424 correctly changed the heartbeat incomplete-task log to redact the full
text before bounding it, but selected
redact_and_truncate. Slack gateway cancompose a platform companion, so gate-side logs must use the context-aware
redactor rather than expanding the baseline census.
This change routes only that logger argument through
redact_log_via_context(task_text)[:80]. Redaction still runs over the full textbefore the display bound, while composed deployments receive the stronger
platform scan. The separate delivered-task preview remains on
redact_and_truncatebecause it is not a gate-side log argument.Tests
test_security_posture.py::TestGateSideLogRedactorSpelling::test_no_new_gate_side_log_line_reads_the_baseline_redactor: passedtest/test_core_path_redact_before_bound.py: passedgit diff --check: passedManual verification
N/A — the existing AST census and redact-before-bound tests exercise the exact
source contract.
Related Issues
Fixes #7757
Pattern harvest
Rule candidate: review-prompt
Pattern: A new logger/audit argument in a companion-capable process must use
redact_log_via_contextbefore any output bound, not the baseline redactor.Checklist
feat|fix|docs|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
N/A — the repository template does not currently provide CLA attestation wording.