feat(vindex): a plan names who judged it and what it judged (plan schema 4) - #386
Merged
Conversation
…ema 4) SystemPlan gains `planner` — the planner crate's package version and its semantics version — and every ArtifactPlan gains `source`: the argument as given and, for a repo, the immutable commit the facts were read at, or the revision name it fell back to when the hub named none. Both CLIs pass the resolved commit through. plan_system keeps its signature for local sources; plan_system_with_sources states them, refusing a mismatched pairing. SystemPlan::parse refuses a plan of another schema by name rather than reading it as an unattributed verdict. PLANNER_SEMANTICS_VERSION is bumped only when a rule change can flip a verdict — never for a CLI, wording or layout fix — so two verdicts are comparable exactly when it agrees, and anything caching verdicts keys on (source revision, semantics version). A witness test pins an admissible and a blocked fixture verdict beside the value, so a flip fails there until the version is bumped.
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.
What
Step 2 of the Explorer roadmap: planner identity. Plan schema 3 → 4.
SystemPlan.planner: PlannerIdentity { package, package_version, semantics_version }— who judged.ArtifactPlan.source: ArtifactSource { path, revision?, unpinned_revision? }— what was judged: the argument as given and, forhf://, the immutable commit the facts were read at, or the revision name it fell back to when the hub named none.PLANNER_SEMANTICS_VERSION(= 1): bumped only when a rule change can flip a verdict (the sliding-window normalisation would have been one); a CLI, wording or layout fix never bumps it. Two verdicts are comparable exactly when it agrees.SystemPlan::cache_key()isSome((commits…, semantics_version))only when every artifact carries a commit, andNonefor a local path or anunpinned_revision. An unpinned verdict (hf://org/model@mainwhen the hub named no commit) may be shown, visibly marked unpinned, and must never be stored as authority —mainon Monday andmainon Tuesday can name different facts.plan_systemkeeps its signature (local source = the inventory's recorded path);plan_system_with_sourcesstates sources and refuses a mismatched pairing.larql vindex3 planandvindex planboth pass the resolved commit through.SystemPlan::parsereads a plan back and refuses another schema by name ("plan schema 3; this build reads plan schema 4"), so a pre-identity plan can never be read as an unattributed verdict.plannerandsourceare deliberately not serde-defaulted.Why now
The server's plan-by-source endpoint (step 4) and the Explorer's cache both need to say which planner judged which commit; a verdict without that is incomplete, and the same planner has already changed a verdict once (6 Qwen3 sizes, 3 → 0 blocking).
Gates
plan/tests/identity.rs(nine): identity equals this build's; a local source is the inventory's path; a stated source carries its revision and changes no verdict; sources pair one-to-one or are refused; round-trip +parserefusals by name (schema 3, no schema, not JSON); cache key present for a pinned source, absent for an unpinned one, absent for a local one, absent when any one artifact of several is unpinned; semantics witness — an admissible and a blocked fixture verdict pinned besidePLANNER_SEMANTICS_VERSION.Local: fmt; clippy
-D warningsfor larql-vindex (--all-targets), vindex-cli, larql-cli (both feature shapes); larql-vindex check in three shapes, full suite + e0 + benches, coverage policy; larql-cli tests both shapes + registry checks; vindex-cli tests +--locked; doc gates.Witness —
larql vindex3 plan hf://Qwen/Qwen3-0.6Bandvindex plan --json hf://Qwen/Qwen3-0.6BBoth front doors, release builds, 11.47 MB staged for a 1.50 GB checkpoint that never touched disk. The identity fragment they wrote, byte-identical between the two CLIs:
Docs
docs/vindex3-format.md§4 now describes schema 4 and the semantics-version promise (it still saidPLAN_SCHEMA = 2).