Skip to content

ci(fpga): print nextpnr's log when a seed search finds no clean seed - #857

Merged
gHashTag merged 1 commit into
mainfrom
ci/seed-search-show-log
Oct 4, 2026
Merged

gHashTag merged 1 commit into
mainfrom
ci/seed-search-show-log

Conversation

@gHashTag

@gHashTag gHashTag commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Closes #856.

Change

In each of 38 workflows, the seed search's failure branch goes from

[ "$CLEAN" = "0" ] && { echo "::error::no clean seed"; exit 1; }

to

[ "$CLEAN" = "0" ] && { echo "::error::no clean seed"; tail -n 15 /tmp/np_*.log; exit 1; }

This is the idiom ax7203-format-cost.yml already uses. 38 insertions, 38 deletions, nothing else.

How it was applied

A script rewrote the files behind a per-file gate. A file was refused unless:

  • exactly one matching line, outside a comment;
  • the parsed YAML is unchanged except for that one run: string;
  • that string differs from the original by exactly the inserted text, once;
  • the new string passes bash -n (with ${{ … }} replaced by a placeholder).

The result was 38 rewritten and 2 refused: format-cost already prints the logs, and build-timing has the phrase only in a comment. A second pass rewrites 0.

Negative controls. Five corrupted rewrites, all refused by the gate: the text inserted twice, an unbalanced quote, the seed loop altered, another step altered, and the exit 1 dropped.

The logs are on the host. All 38 > /tmp/np_*.log redirects are in the runner's shell, not inside a quoted docker … bash -c "…". So a host-side tail can read them (checked by parsing every run: string).

Checks

  • actionlint on the 38 files: no findings.
  • tools/check_run_syntax.py: 120 of 120 workflows read, 0 steps that do not parse.

Not measured

🤖 Generated with Claude Code

38 of the 39 AX7203 workflows that search nextpnr seeds send each
attempt to /tmp/np_*.log and, when every seed fails, print only
"::error::no clean seed" and exit. The upload step is skipped on
failure, so the run keeps no record of why routing failed.
ax7203-format-cost.yml already tails the logs before exiting; this
applies the same idiom to the other 38.

The rewrite was gated per file: exactly one matching line outside a
comment, the parsed YAML unchanged except for that one run string,
which differs by exactly the inserted text and still passes bash -n.
Five corrupted rewrites were refused by the gate. actionlint reports
nothing on the 38 files, and tools/check_run_syntax.py reads 120 of
120 workflows with no unparseable step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown

X Brain Health Check

Score: 100.0/100
Status: 🟢 HEALTHY
Threshold: 80/100

X Brain is above merge threshold

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown

🧪 Brain Stress Test Results

Score: not measured (no stress test prints a Score: line)
Status: 🟢 PASS
Threshold: 270/300

X Stress test passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci(fpga): seed searches hide nextpnr's log when every seed fails

1 participant