Repository navigation
Description
Problem
The flake-inputs-update workflow's failure-issue excerpt truncates the tail of the log from the head, so on any realistically long failure the excerpt contains none of the actual error.
.github/workflows/flake-inputs-update.yml:169 (on main c4b29e12):
grep -v "copying path" "${ERROR_LOG}" | tail -n 80 | sed 's/~~~/---/g' | head -c 5000 > "$RUNNER_TEMP/excerpt.txt" || truetail -n 80 correctly selects the last 80 lines — where the error lives — but head -c 5000 then keeps only the first 5000 bytes of that selection. When the last 80 lines exceed 5000 bytes (normal for nix build output, ~100+ bytes/line), the excerpt ends mid-line partway through the tail and the final error line never reaches the tracking issue. The issue comment at :166-167 says the excerpt is meant to be the "last lines of the failing step's log … capped" — the cap is applied at the wrong end.
Verified this run (synthetic probe, exact pipeline from :169)
Synthetic log: 100 copying path noise lines, then 80 build lines of ~109 chars each, then a final error: builder for … failed with exit code 1 line (18,632 bytes total).
- Excerpt produced: exactly 5000 bytes, ending mid-line inside "building step output line 042".
grep -c "error: builder" excerpt.txt→ 0 — the actual error is absent from what would be posted to the failure issue.
Why it matters
This workflow's tracking issue is the primary diagnostic surface for failed automated openchamber/opencode input updates (the same mechanism #913 covers for the issue-lookup cap). A failure excerpt that reliably omits the error forces every diagnosis back to the raw run log and makes the maintained issue history misleading.
Precedent
The identical pattern in developing-today/openchamber's opencode-update workflow was filed as openchamber #450 and fixed by PR #451 (merged): cap the excerpt from the tail end instead of the head.
Acceptance criteria
- The excerpt pipeline keeps the last ≤5000 bytes of the filtered tail (e.g.
… | tail -c 5000), so the excerpt always ends with the log's final line when the log is longer than the cap. - Logs whose filtered tail is ≤5000 bytes produce a byte-identical excerpt to today (no behavior change for short failures).
- The excerpt still strips
copying pathlines and still neutralizes~~~fences (sed 's/~~~/---/g'or equivalent) before the byte cap, or the ordering is documented if changed. - Workflow YAML still parses and the failure-issue step is otherwise unchanged.
Suggested fix
One-word change at :169: head -c 5000 → tail -c 5000.
Filed by new-issue-creator (standalone run, 2026-10-25). Single-repo: grep -rn "head -c" .github/workflows/ across developing-today/opencode, developing-today/openchamber and dezren39/nix returns no other instance; openchamber's instance is already fixed (#450/#451).
Activity
developing-today commentedon Oct 25, 2026
CODE-154
dezren39 commentedon Oct 26, 2026
Intake review
Still live, fix already in flight: PR #918 (cap the excerpt from the tail) is OPEN with
Fixes #917; the one-word fix (head -c 5000→tail -c 5000at flake-inputs-update.yml:169) is verified by the synthetic ablation in the issue body. This issue closes when #918 merges — no duplicate work should start.Related: #913 (the other defect in the same workflow's failure-issue machinery, found in PR #907), openchamber #451 (the identical excerpt bug, already fixed there — the precedent).
Notes / risks: none beyond CI on #918; the excerpt is the primary diagnostic surface for this workflow, so until #918 lands, failure comments on the tracking issue will keep omitting the actual error.
Suggested approach: shepherd PR #918 to green and merge; nothing else needed here.
🤖 Agent note · filed