fix(ci): stop suppressing stderr in fork first-principles review finalize helper - #6031
Conversation
|
Full-diff/commit-containment audit (current head If this is intended as a stack, retarget #6031 to #5603's branch so the review diff is only |
bolichen97
left a comment
There was a problem hiding this comment.
Description ↔ code mismatch: this is not a single-line change
Blocking finding from a Description-vs-code consistency audit. Criterion: the description says it only changes A, but the diff also changes B, and B affects risk and review scope — here B is a credential-redaction path.
The claim
Only one line changed: line 646 of
fork-first-principles-review.yml
Single-line change, no behavioral change
No secrets, no test changes needed
What the diff actually contains
.github/workflows/fork-first-principles-review.yml +1/-1
src/kiro_crew/cron_script.py +31/-13
test/test_cron_script.py +71/-0
test/test_spec_builder_routes_coverage.py +22/-1
Four files, +125/-15. The workflow line is real and matches the description (>/dev/null 2>&1 → >/dev/null). The other three files are undisclosed.
src/kiro_crew/cron_script.py is not incidental — it changes credential-redaction behaviour:
- adds
_STDERR_FULL_REDACT_MAX = 4 * 1024 * 1024; - rewrites
_stderr_tailto redact the whole buffer before tailing, instead of tailing then redacting; - introduces a new behaviour where stderr larger than 4 MiB is replaced with
[stderr omitted: too large to redact in full]; - in
run_script_sandboxed, replacesredact(stdout)[:200]with a newredact_and_truncate(stdout, 200).
test/test_cron_script.py (+71) and test/test_spec_builder_routes_coverage.py (+22) add cases for exactly those redaction boundaries — which also contradicts "no test changes needed".
Why this blocks
Redact-then-truncate versus truncate-then-redact is a real security difference: the old order can leave a secret spanning the cut boundary partially unredacted, and the new >4 MiB path withholds output entirely. That is a defensible change, but it is a security-boundary change presented as a no-op YAML edit. A reviewer who trusts the description reviews one line of workflow YAML and never looks at the redaction logic, the new public symbol, or the new withholding behaviour. The checklist claim "no test changes needed" is contradicted by 93 lines of new tests in the same diff.
Note this diff is also carried by #6065, whose body likewise describes only its frontend file. The same four files appear in both PRs, which suggests the branch picked up an unrelated commit rather than that the change was intended here.
Required change — pick one
- Drop the unrelated commit so this PR really is the one-line workflow edit it claims to be, and open the
cron_script.pyredaction change as its own PR where it can be reviewed as a security change. - Or rewrite the description to list all four files, describe the redact-before-tail reordering, the new
redact_and_truncateand_STDERR_FULL_REDACT_MAX, and the >4 MiB withholding behaviour; and correct the "single-line", "no behavioral change" and "no test changes needed" claims.
Automated Description↔code consistency audit. Only these five classes are treated as blocking: described behaviour absent from code; undisclosed change to user-visible behaviour/API/permissions/security boundary; test-pass claims contradicted by evidence; undisclosed scope beyond what the description says; conflict with spec/docs/an invariant. Wording and style are never flagged.
Audit note — this PR and #5603 are one branch stack, not duplicatesA duplicate-detection sweep flagged these two as near-identical because they share a large block of added lines. They are not duplicates: one branch contains the other's commits, so the shared lines are inherited, and the review diff overstates what this PR actually authored. #6031's branch literally contains #5603's sole commit as its parent: What is genuinely each PR's ownIf #5603 lands, #6031 still carries real, wanted work: the one-line Suggested actionLand #5603 first, then rebase #6031 onto From a repository-wide duplicate/overlap audit of every pull request open against |
Open PR relationship auditThis is a consolidated, point-in-time code-level audit note. It compares complete merge-base diffs and current/merged code; it does not treat a shared topic as duplication or partial coverage as completion. Relationship findings
No PR, Issue, label, branch, or review state was changed by the relationship-note portion of this audit. |
…lize helper The complete() helper's >/dev/null 2>&1 hides gh's actual HTTP error when a check-run finalize permanently fails. The ::warning:: line names the check-run but cannot carry the underlying error, leaving operators with no diagnostic. Remove the stderr suppression so the real error reaches the job log. Fixes kirodotdev#5822
Head branch was pushed to by a user without write access
a288e5e to
2789e85
Compare
|
Addressed both findings via rebase (pushed): the branch no longer contains #5603's commit — rebased onto current main so the diff is exactly the single-line \ork-first-principles-review.yml\ change the description claims (verified: 1 file, +1/-1). Description now also carries the missing Screenshots (N/A) and Pattern harvest sections. |
|
CI triage on head 2789e85: no code-side failure exists. Every monitored lane sits at action_required (fork workflow-approval gate; this branch touches .github/workflows/). Unblocks only via maintainer Approve-and-run plus review. Escalating as maintainer-side; nothing reproduces locally (branch MERGEABLE, single-commit). |
Problem / Motivation
The
complete()check-run finalize helper infork-first-principles-review.ymlredirects both stdout AND stderr to/dev/null:When a finalize permanently fails, the
::warning::line names the check-run and head SHA but cannot carry the underlying error. An operator debugging a stranded finalize sees that it failed but not why.Why it matters
CI failures in the fork review pipeline are already hard to diagnose. Hiding gh's stderr (the actual HTTP status/error text) removes the only diagnostic an operator has without digging into raw API calls.
What changed (motivation → approach → change)
Removed
2>&1from thecomplete()helper's PATCH call so stderr reaches the job log. stdout is still suppressed (the JSON response is noise). This matches the pattern already used infork-gpt-review.yml,fork-opus-review.yml,fork-design-review.yml, andfork-ux-review.yml.Tests
YAML syntax valid (no structural change to the workflow)
Only one line changed: line 646 of
fork-first-principles-review.ymlManual verification
>/dev/null || true(no2>&1)Related Issues
Fixes #5822
Screenshots / video
N/A — CI workflow change, no UI.
Pattern harvest
Rule candidate: review-prompt
Pattern: a
>/dev/null 2>&1on a finalize/reporting call hides the error text an operator needs to diagnose the failure; suppress stdout only and let stderr through.Checklist
Code follows existing conventions
Single-line change, no behavioral change for success path
No secrets, no test changes needed
Contribution License Agreement