Skip to content

feat(variant): disk-verify the source manifest, fail-loud (REQ-265c)#719

Merged
avrabe merged 1 commit into
mainfrom
feat/req-265c-verify-manifest
Jul 17, 2026
Merged

feat(variant): disk-verify the source manifest, fail-loud (REQ-265c)#719
avrabe merged 1 commit into
mainfrom
feat/req-265c-verify-manifest

Conversation

@avrabe

@avrabe avrabe commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

REQ-265 slice c — disk-verify the variant source manifest (v0.29.0)

rivet variant manifest (the audit-facing per-feature source manifest) emitted
each binding's source: globs unverified — a manifest pointing at
nonexistent directories exited 0, so an auditor relying on it couldn't tell the
sources were absent. DD-077 slice (c).

Change

The command now verifies every glob's literal base directory (the leading
path components before the first * / ? / [ / {) against disk under the
project root:

  • always WARNS loudly on stderr for a missing base (text + json modes), and
    adds a source_warnings array to the JSON output;
  • under a new --strict flag, escalates a missing base to a nonzero
    exit
    — mirroring validate --strict-variants (REQ-261).

A wildcard-leading pattern is anchored at the root and skipped; a literal path
with no metacharacters is checked whole. Verification is host-side
(rivet-cli)
— the composition core and wasm seam are untouched.

Tests

  • manifest_warns_on_missing_source_base — warns on stderr + JSON, exits 0.
  • manifest_strict_fails_on_missing_source_base--strict → nonzero exit.
  • manifest_no_warning_when_source_base_exists — a present base is silent.

Verification

variant_manifest suite 6 pass (3 new + 3 regression) · cli_commands 157
pass
(clap-change guard) · clippy --all-targets (1.97.0) clean · rivet validate + docs check PASS.

Slice (d) export --variant + serve manifest-surfacing remain; REQ-265 stays
proposed
until they land.

Refs: REQ-265, DD-077

🤖 Generated with Claude Code

…bases (REQ-265c)

`rivet variant manifest` emitted each binding's `source:` globs unverified —
a manifest pointing at nonexistent directories exited 0, so an auditor
relying on it could not tell the sources were absent (DD-077 slice c).

Now the command verifies every glob's literal base directory (the leading
path components before the first `*`/`?`/`[`/`{`) against disk under the
project root, and:
- always WARNS loudly on stderr for a missing base (text and json), and
  adds a `source_warnings` array to the JSON output;
- under a new `--strict` flag, escalates a missing base to a nonzero exit —
  mirroring `validate --strict-variants`.

Verification is host-side (rivet-cli), not in the composition core, so the
wasm seam is untouched. A pattern that begins with a wildcard is anchored at
the root and skipped; a literal path with no metacharacters is checked whole.

Tests: warns-but-exits-0 on a missing base, `--strict` fails, and no warning
when the base exists. Confirmed with the variant_manifest suite (6 passing),
cli_commands (157 passing — clap-change guard), clippy --all-targets clean,
rivet validate + docs check PASS.

Slice (d) `export --variant` and serve manifest-surfacing remain; REQ-265
stays proposed until they land.

Refs: REQ-265, DD-077
@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@avrabe
avrabe merged commit 3735bc2 into main Jul 17, 2026
28 of 30 checks passed
@avrabe
avrabe deleted the feat/req-265c-verify-manifest branch July 17, 2026 02:44
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