Skip to content

fix(chip): classify missing RISC-V evidence as blocked#7873

Merged
lalalune merged 1 commit into
developfrom
codex/riscv-shaw-help-20260520
May 21, 2026
Merged

fix(chip): classify missing RISC-V evidence as blocked#7873
lalalune merged 1 commit into
developfrom
codex/riscv-shaw-help-20260520

Conversation

@NubsCarson
Copy link
Copy Markdown
Member

@NubsCarson NubsCarson commented May 20, 2026

Summary

  • Treat absent generated Chipyard/AP Linux artifacts as BLOCKED evidence work instead of source-contract FAIL in the generated Linux contract gate.
  • Let the minimum Linux target gate consume companion blocked Verilator smoke JSON when the transcript has not been captured yet.
  • Fix QEMU toolchain detection so auto-detected clang without a working ld.lld is reported as BLOCKED, not a build regression.
  • Add a hermetic qemu-status regression test that isolates the clang path with RISCV_CLANG_CANDIDATES, without falling through to host RISC-V GCC toolchains.
  • Refresh the prototype status dashboard to match current MVP gate output and remove silent placeholder wording from the AI EDA coverage-bin file.
  • Address Greptile follow-ups: collapse the duplicate GEN_FIR.is_file() check and print blocked follow-up artifacts/evidence alongside hard failures.

Validation

  • python3 verify/check_stub_audit.py
  • python3 scripts/check_prototype_status_dashboard.py
  • make qemu-status-test
  • make chipyard-generated-linux-contract-check
  • .venv/bin/ruff format --check packages/chip/scripts/test_qemu_smoke_status.py packages/chip/scripts/check_chipyard_generated_linux_contract.py packages/chip/scripts/check_minimum_linux_target.py
  • .venv/bin/ruff check packages/chip/scripts/test_qemu_smoke_status.py packages/chip/scripts/check_chipyard_generated_linux_contract.py packages/chip/scripts/check_minimum_linux_target.py
  • sh -n packages/chip/scripts/run_qemu.sh
  • python3 -m py_compile packages/chip/scripts/test_qemu_smoke_status.py packages/chip/scripts/check_chipyard_generated_linux_contract.py
  • git diff --check
  • python3 scripts/test_minimum_linux_npu_target.py
  • python3 scripts/test_cpu_ap_boot_readiness.py

CI / Remaining Noise

  • PR is mergeable and the production Docker image smoke now passes on this branch.
  • The current broad CI failures are not caused by this diff: repo-wide server/client/plugin/Electrobun failures, homepage Biome formatting drift, and docker-regression broad packages/chip ruff/format failures in existing chip scripts outside this PR's changed files.
  • A local broad readiness rollup on this host reports PASS=41 FAIL=1 BLOCKED=29; the lone FAIL is os-rv64-release-check failing before gate logic because the active interpreter lacks jsonschema. That is a separate reproducible-deps cleanup candidate, not a RISC-V evidence-classification claim from this PR.

Claim Boundary

This PR does not claim RISC-V Linux, AOSP, generated AP, board, or silicon boot. The remaining items are still blocked on real generated artifacts, toolchains, and boot transcripts; this only fixes classification so missing evidence is not reported as checked-in source failure.

Greptile Summary

This PR corrects the classification of missing Chipyard/AP Linux artifacts from FAIL (source contract violation) to BLOCKED (absent evidence) across three Python gate scripts, and fixes QEMU toolchain detection so a clang-without-lld situation is also reported as BLOCKED rather than a build regression.

  • check_chipyard_generated_linux_contract.py: All four artifact-presence checks now funnel into a shared blockers list; when failures and blockers coexist the FAIL branch additionally prints the blocked items so engineers see the full picture in one run.
  • check_minimum_linux_target.py: check_evidence gains a companion-JSON fallback so a sibling .json status report with status: "blocked" is consumed instead of reporting the log file as "missing" (an error).
  • run_qemu.sh / test_qemu_smoke_status.py: clang_can_link_riscv_elf is extracted into its own function, RISCV_CLANG_CANDIDATES allows test injection, and a new test isolates the detection path by restricting PATH to a minimal fake bindir.

Confidence Score: 5/5

Safe to merge — all changes narrow the classification of missing evidence from FAIL to BLOCKED, which is strictly less alarming and matches the stated claim boundary.

The logic changes are additive: a new blockers path is threaded through existing check functions without altering the success or real-failure paths. The companion-JSON check in check_minimum_linux_target is guarded by an explicit status comparison and falls through to the previous "missing" result for any other status value. The clang toolchain refactor is exercised by a new test that correctly isolates the detection path. No data is lost and no check is silently weakened.

No files require special attention; the style-only redundancies in check_chipyard_generated_linux_contract.py and run_qemu.sh do not affect runtime behaviour.

Important Files Changed

Filename Overview
packages/chip/scripts/check_chipyard_generated_linux_contract.py Refactored check_* functions to accept a blockers list; missing generated artifacts now route to BLOCKED instead of FAIL. Double is_file() pattern in check_import_state is a minor redundancy.
packages/chip/scripts/check_minimum_linux_target.py Adds companion .json status-report check so verilator-smoke and similar log evidence can be classified BLOCKED (not missing/error) when the report file says blocked.
packages/chip/scripts/run_qemu.sh Extracts clang_can_link_riscv_elf into its own function and adds RISCV_CLANG_CANDIDATES env-var override. Word-splitting of the variable is intentional but undocumented.
packages/chip/scripts/test_qemu_smoke_status.py Adds link_host_tools helper and test_autodetected_clang_without_lld_is_blocked; PATH is restricted to bindir, correctly isolating the clang detection path from system GCC tools.
packages/chip/docs/project/prototype-status-dashboard.md Dashboard refreshed to align with current gate output — several items corrected from PASS to BLOCK with updated reason codes and commands.
packages/chip/verify/ai_eda/coverage_bins/e1_interrupt_reset_edges.yaml Minor wording cleanup: removes placeholder language from the coverage-bin scope and CLINT bin description.

Reviews (3): Last reviewed commit: "fix(chip): classify missing riscv eviden..." | Re-trigger Greptile

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 20, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0e9d2b21-dd57-4a69-b25e-fb8122bbbb5c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/riscv-shaw-help-20260520

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added the Docs label May 20, 2026
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 20, 2026

Claude encountered an error —— View job


I'll analyze this and get back to you.

Comment thread packages/chip/scripts/test_qemu_smoke_status.py
Comment thread packages/chip/scripts/check_chipyard_generated_linux_contract.py
Comment thread packages/chip/scripts/check_chipyard_generated_linux_contract.py
@NubsCarson NubsCarson force-pushed the codex/riscv-shaw-help-20260520 branch from 0653ea9 to 4834703 Compare May 20, 2026 23:38
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 20, 2026

Claude encountered an error —— View job


I'll analyze this and get back to you.

@NubsCarson NubsCarson force-pushed the codex/riscv-shaw-help-20260520 branch from 4834703 to 6856e82 Compare May 21, 2026 00:12
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 21, 2026

Claude encountered an error —— View job


I'll analyze this and get back to you.

@NubsCarson
Copy link
Copy Markdown
Member Author

Update after latest amend (6856e829af):

  • Addressed Greptile P1 by keeping the clang/lld regression test on a hermetic PATH and narrowing auto-detection with RISCV_CLANG_CANDIDATES=clang, so hosts with RISC-V GCC installed cannot bypass the clang path.
  • Addressed the two P2 notes in check_chipyard_generated_linux_contract.py: collapsed the duplicate GEN_FIR.is_file() check and now prints blocked follow-up artifact/evidence diagnostics even when hard failures are present.
  • Re-ran targeted validation: ruff format/check on changed chip scripts, make qemu-status-test, make chipyard-generated-linux-contract-check, py_compile, and git diff --check.

Remaining red checks are broad repo/shared failures or existing chip-wide ruff drift outside this PR's changed files; PR body has the current breakdown.

@lalalune lalalune merged commit 4944fd2 into develop May 21, 2026
24 of 31 checks passed
@lalalune lalalune deleted the codex/riscv-shaw-help-20260520 branch May 21, 2026 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants