Repository navigation
fix(scan-upload): stop reading an OTEL trace id as the R2 key pair's 32-hex half - #17434
Conversation
…32-hex half The R2 key pair rule (lib/publish-gate.mjs) matches any 32-hex word and 64-hex word on one line. Every OTLP/JSON span line carries a 32-hex traceId, so the telemetry scan withheld every lane leg's telemetry. With SCAN_TELEMETRY=true, set only on upload-lane-transcript's telemetry scan, a file that blocks on the R2 key pair is scanned again with each traceId or trace_id value replaced by x's of the same length. A bare 32-hex word beside a 64-hex word still withholds, every other rule still runs on the second read, and the transcript scan and every other scan-upload caller are unchanged. Co-authored-by: Claude Opus 5.5 <[email protected]>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
claude-security-review reviewed Security review: no security issues foundI read the whole diff for all 3 files: What changed. The Path checked: can a credential now get past the scan? Yes, but only in one narrow case, and the result is still sealed.
Other checks.
critical-findings: 0 |
|
claude-review reviewed CI code review: PR #17434\n\nThis PR adds a
|
|
The pr-verify verifier failed head What it wrote (25 lines)This pull request leaves the merge queue, and ci-status holds it out while it carries |
Post-merge mutation testingKilled 6, survived 1, timeout 0, no coverage 0, invalid 0, not run 0.
Surviving mutants
The run's summary has the full report. |
Refs: #17261
Summary
Every lane leg's telemetry was withheld as an "R2 key pair" hit, so no OTEL spans reached the puller. The R2 key pair rule (
lib/publish-gate.mjs:47-50) matches any 32-hex word beside a 64-hex word on one line, and every OTLP/JSON span line carries a 32-hextraceId. This PR delivers the scan fix; it does not by itself prove the end-to-end join.Owner decision: https://github.com/melodic-software/architecture/blob/42e7d6dd6999a6ea8b2aac069b0044ae79f2e74b/docs/owner-decisions.md#L226 is the owner's decision for this narrowing; #17261's body names the loosened check beside that link and the owner's verbatim words.
Fix
scan-upload.mjstakesSCAN_TELEMETRY=true. When it is set and a file's content blocks on the R2 key pair, the file is scanned again with eachtraceId/trace_id32-hex value replaced by the same number ofxcharacters, so line numbers hold. The second scan runs every rule, and its verdict and fingerprint are the ones reported.upload-lane-transcript's telemetry scan step sets the flag. The transcript scan, thescan-uploadcomposite action and its other callers, andlib/publish-gate.mjs(with its plugin copies) are unchanged.Verification
node --test .github/actions/scan-upload/scan-upload.test.mjs: 17/17 pass. The new cases: span and log lines withtraceId/trace_id(including uppercase and JSON-escaped) plus a 64-hex value pass; a bare pair and a non-trace 32-hex beside a span line withhold; a GitHub token after a span line withholds; the same span line without the flag withholds. The wiring test checks that only the telemetry step setsSCAN_TELEMETRY.node --test scripts/lane-transcripts/pull.test.mjs: 60/60 pass..github/actions/resolve-config/callers.test.mjs(needsajv, not installed in this worktree; CI runs it) and the end-to-end check, which is amaintenance-audit-lane-runsrun after merge that should show stored telemetry with joined spans.Remaining
maintenance-audit-lane-runsrun stores an assess-units leg's telemetry with joined spans above zero.Related
🤖 Generated with Claude Code