Repository navigation
fix: verify native payload without runtime dependencies - #11453
Conversation
|
Intent: Make the native payload verifier run with only the Python standard library while preserving checks for every declared library in both wheel and sdist. |
Design Review (Fable 5) — ✅ PASSDesign-level review of Design-Verdict: PASS Verify a nightly [DESIGN-REVIEWED] 3e359ee |
First Principles Review (Fable 5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Confirm the nightly build-wheel lane goes green on this verifier before the next release — that lane, not local What this change shipsInventory (5 items) — 5 justifiedIntent: make the wheel/sdist payload check pass in a build-only environment that installs no runtime dependencies — a FIX, with provenance (linked failing nightly run; the new
The nearest existing AST-literal reader ( [FIRST-PRINCIPLES-REVIEWED] 3e359ee |
Opus 4.8 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
|
CI triage: Windows backend shard 6 fails in TestSessionLedgerOnPermanentDelete::test_a_ledger_a_writer_still_owns_is_left_to_retention with LedgerError: data.agent: is required and absent. The exact node also fails locally on Linux. This PR changes neither that test nor the ledger implementation; both are identical to its main base. The fixture appends session/opened with only resumed, but the entry registry requires agent and other header fields. Existing PR #11445 fixes this exact append call. Waiting for that fix rather than blindly rerunning or duplicating its changes here. Build Wheel and all current-head AI review checks pass. |
Read the two literal native-library declarations with the standard library AST instead of importing embeddings and its runtime dependencies. Run the verifier with python -I -S against complete and incomplete archives.
31eb25c to
3e359ee
Compare
Problem / Motivation
Nightly builds stop with
ModuleNotFoundError: No module named 'yaml'after creating the wheel and sdist. The payload check importskiro_crew.embeddings, which pulls in runtime dependencies that the build-only environment does not install.Failing build.
Why it matters
A complete package cannot pass the release check. Retrying the same source does not remove the import failure.
What changed (motivation → approach → change)
The package check runs without loading the app.
scripts/verify_vendored_payload.pyreads the two literal library declarations from the existing embeddings source withast.parseandast.literal_eval. The runtime remains the source of truth; no library list is copied.🟩 added · 🟨 changed · 🟥 removed · 🟦 unchanged
The check can inspect both archives with only Python's standard library. Tests cover both archive paths and declaration parsing. The memory module spec documents this build-only boundary.
Tests
97 related tests passed across five files. Ten new cases cover complete archives, missing libraries in either or both archives, absent archives, plain and annotated literals, and absent or computed declarations. Subprocess cases use
python -I -S, which excludes installed runtime packages.Black, isort, flake8, mypy, subprocess encoding, comment history, docs lint, and vendor manifest checks passed. Full cross-platform tests are left to CI.
Manual verification
Built real wheel and sdist using
build==1.3.0in a scratch virtual environment. Ran the actual verifier withpython -I -Sagainst both: payload complete. No runtime dependencies were installed in that build environment.Screenshots / video
N/A: build check only; no UI change.
Related Issues
no linked issue: fixes the Nightly build failure linked above.
Pattern harvest
Rule candidate: review-prompt
Pattern: Build-only checks must not import the application to read literal package metadata. The isolated subprocess tests enforce this boundary for the shared payload verifier used by PR and release builds.
Checklist
feat|fix|docs|refactor|perf|test|chore|ci|build|revert: ...)