Repository navigation
Zephyr modules deposit and export without Python or a west.yml edit (REQ-ZMODEXPORT-001) - #309
Merged
Merged
Conversation
…REQ-ZMODEXPORT-001) A zephyr-module payload is a gzip-tar of the module tree. The deposit refuses a tree with no zephyr/module.yml or one that does not parse, and refuses a module declaring package-managers: pip unless the layer records an allow-pip opt-in naming exactly the declared requirement files (signed, shown by varve inspect). module.yml is parsed in Rust (serde-saphyr, no unsafe). varve export-zephyr-modules --out D [--select NAME] writes each module to D/<name>/ and zephyr-extra-modules.cmake appending them to ZEPHYR_EXTRA_MODULES (works under -C and include()), stamps D, and refuses an incomplete build: depends closure before writing anything. ExportKind gains ZephyrModule. The producer plans/stages layout = "zephyr-module" with the same checks. Also fixes the producer's previous-spec reader rejecting allow-pip. Out of scope, moved to REQ-ZMODEXPORT-002: west-workspace collision check (--override) and the end-to-end offline Zephyr build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019TNtfRjLNhEz82G2ggeeNu
… never delete what varve did not write - serde-saphyr pinned =2.0.0 (and granit-parser 2.0.0 in the lockfile); the 2.1.0 releases were hours old. An empty module.yml is now refused explicitly because 2.0.0 and 2.1.0 disagreed about it. - Members are de-duplicated on a lowercased path, and nothing but the parsed zephyr/module.yml may fold onto zephyr/module.yml or module.yaml, so a case-insensitive file system cannot swap in an unchecked description. Files are written with create_new. - A module directory is replaced only when <out> carries a zephyr-module stamp listing files under it; otherwise it is refused before anything is written or removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019TNtfRjLNhEz82G2ggeeNu
…REQ-ZMODEXPORT-002 for the rest; pin young transitive crates Maintainer, 2026-11-03: the Zephyr module extract goes into v0.44.0. The west-workspace collision check and the offline gale board build are REQ-ZMODEXPORT-002 (v0.45.0). encoding_rs 0.8.44 -> 0.8.42 and unicode-width 0.2.3 -> 0.2.2. Both arrive only through serde-saphyr and were published days ago. cargo deny is clean. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019TNtfRjLNhEz82G2ggeeNu
…e marked; re-check pip at export - Any explicit YAML tag in module.yml is refused, found from the parser's own events. PyYAML honours `!!merge` on any key and serde-saphyr does not, so a tagged node hid pip, depends and name from varve while Zephyr still read them. - Each module directory varve creates holds a .varve-zephyr-module marker. A directory is replaced only with that marker AND a zephyr-module stamp (the stamp lists everything under --out, the user's files included). Directories of a previous export that this one drops are removed; unmarked ones never. - Everything (CMake quoting incl. '[', ']', '\', destinations, script, stamp) is validated before any tree is written; the script and stamp are never written through a symlink or over a file varve did not write. - pip is re-checked at export against the layer's signed allow-pip. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019TNtfRjLNhEz82G2ggeeNu
…ver one found by name prepare resolved a module's allow-pip by payload name across a list, so in a composition two payloads sharing a name (different versions both export) let a pip module borrow the other's opt-in. The opt-in now travels inside ExportModule. The same module name from two payloads is refused as DuplicateModule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019TNtfRjLNhEz82G2ggeeNu
…and the requirement verified - CHANGELOG: REQ-ZMODEXPORT-001 in scope (clauses 1, 2, 5 and the depends closure), its new command, and the review fixes under Security. - VER-REVIEW-ZMODEXPORT-001: two fresh-context reviews. The first found a high and a medium defect, both fixed test-first. The re-review found nothing at medium or above. Four low residuals are recorded. - rivet verify REQ-ZMODEXPORT-001. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019TNtfRjLNhEz82G2ggeeNu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
REQ-ZMODEXPORT-001 for v0.44.0. In scope: clauses 1, 2 and 5, plus the
build: dependsclosure. The workspace collision check and the offline gale build move to REQ-ZMODEXPORT-002 in v0.45.0.What it does:
zephyr-modulepayload must carryzephyr/module.yml, or the deposit refuses it.varve export-zephyr-modules --out Dwrites each module andD/zephyr-extra-modules.cmake. Use it aswest build ... -- -C D/zephyr-extra-modules.cmake, or in a plain cmake build. Your west.yml is never edited.build: dependsnames a module the export does not carry is refused, and nothing is written.package-managers: pipis refused unless the signed layer records an opt-in for that module. The opt-in is checked again at export.Review: two fresh-context clean-room reviews, recorded as VER-REVIEW-ZMODEXPORT-001.
!!mergetag let PyYAML see a pip requirement that varve's parser missed. Fixed: every YAML tag is now refused.Gates:
varve-core (zephyr-module): 92 tested, 86 caught, 6 unviable, 0 missed.ci.ymlmakes the mutation-scope test fail.tools/systest/zephyr-export.sh, run by thezephyr-exportjob. It checks that a one-byte change failsverify --export, and that pip is refused with no opt-in and with a wrong one but accepted with the exact one.Dependencies: serde-saphyr is pinned
=2.0.0(2.1.0 was published the same day), and its young transitive crates are pinned too.Local gates on this exact tree: fmt and clippy are clean,
cargo test --workspaceexits 0, the systest passes, andcargo denyreports ok. trace-gate, claim-check, review-check and tracepack-check pass.🤖 Generated with Claude Code
https://claude.ai/code/session_019TNtfRjLNhEz82G2ggeeNu