Skip to content

fix: verify native payload without runtime dependencies - #11453

Merged
bolichen97 merged 1 commit into
mainfrom
fix/vendored-verifier-stdlib
Sep 18, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
fix/vendored-verifier-stdlib

Conversation

@bolichen97

Copy link
Copy Markdown
Contributor

Problem / Motivation

Nightly builds stop with ModuleNotFoundError: No module named 'yaml' after creating the wheel and sdist. The payload check imports kiro_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.py reads the two literal library declarations from the existing embeddings source with ast.parse and ast.literal_eval. The runtime remains the source of truth; no library list is copied.

Case Before After
Complete archives, no runtime dependencies 🟥 Import error 🟩 Pass
Library missing from wheel or sdist 🟥 Import error 🟨 Names missing file
Missing or computed declaration 🟦 Check cannot complete 🟦 Check cannot complete

🟩 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.0 in a scratch virtual environment. Ran the actual verifier with python -I -S against 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

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

@bolichen97
bolichen97 requested review from a team and smeyffret September 17, 2026 04:16
@bolichen97

Copy link
Copy Markdown
Contributor Author

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.
Not a goal: Change runtime embeddings, add build-time runtime dependencies, alter the native library manifest, or change release workflow behavior.

@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Sep 17, 2026
@github-actions

github-actions Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

Design-level review of 3e359ee110baab4f0eb667636855c733d599f84f — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Verify a nightly build-wheel.yml run goes green post-merge — the manual python -I -S repro is strong but isn't the failing lane itself.

[DESIGN-REVIEWED] 3e359ee

@github-actions

github-actions Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — ✅ PASS

Premise-level review of 3e359ee110baab4f0eb667636855c733d599f84f — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

First-Principles-Verdict: PASS

Confirm the nightly build-wheel lane goes green on this verifier before the next release — that lane, not local -I -S, is the reported failure.

What this change ships

Inventory (5 items) — 5 justified

Intent: 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 -I -S tests fail on base).

  1. The payload check now passes without runtime dependencies installed — justified
  2. A missing or computed declaration in embeddings.py now fails the check with a named error — justified
  3. New constraint: _LIBS_DIR_NAME and _REQUIRED_VENDORED_LIBS must stay literal top-level assignments — justified
  4. Ten new tests run the real verifier under python -I -S — justified
  5. The memory module spec documents the build-only boundary — justified

The nearest existing AST-literal reader (workflows/validate.py:752) lives inside kiro_crew, which the script must not import — not reusable, not a duplicate (grepped literal_eval, 2 non-test sites). The deleted comment ("Import from the source tree so this runs in a build-only environment") pinned a claim the linked failing build disproves, so its removal is evidenced.

[FIRST-PRINCIPLES-REVIEWED] 3e359ee

@github-actions

github-actions Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Opus 4.8 Review — ✅ no blocking findings

Reviewed 3e359ee110baab4f0eb667636855c733d599f84f — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 3e359ee

Verdict parsed from the review's SHA-scoped output markers for commit 3e359ee110baab4f0eb667636855c733d599f84f.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 3e359ee110baab4f0eb667636855c733d599f84f: <one-sentence reason>

@github-actions

github-actions Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of 3e359ee110baab4f0eb667636855c733d599f84f and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 3e359ee

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 3e359ee110baab4f0eb667636855c733d599f84f: <one-sentence reason>

@bolichen97

Copy link
Copy Markdown
Contributor Author

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.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 17, 2026
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.
@bolichen97
bolichen97 force-pushed the fix/vendored-verifier-stdlib branch from 31eb25c to 3e359ee Compare September 18, 2026 07:54
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Sep 18, 2026
@bolichen97
bolichen97 merged commit 023e1b7 into main Sep 18, 2026
71 of 76 checks passed
@bolichen97
bolichen97 deleted the fix/vendored-verifier-stdlib branch September 18, 2026 08:14
@github-actions github-actions Bot removed the readiness: checking Automated validation is still running label Sep 18, 2026
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.

1 participant