fix(verify): a package cannot state a fork its vocabulary lacks - #124
Open
cloudronin wants to merge 1 commit into
Open
fix(verify): a package cannot state a fork its vocabulary lacks#124cloudronin wants to merge 1 commit into
cloudronin wants to merge 1 commit into
Conversation
Reported live. `uofa verify packs/vv40/examples/morrison/cou1/...` printed
decision 1: provenance '<absent>' — the fork says which warrant is owed,
so this record cannot be checked at all.
beside two PASSING signatures. The package declares context v0.5;
`decisionProvenance` arrived in v0.9. The term is not in its vocabulary, so the
message described this checker's expectation rather than the package's
condition -- and read to anyone running it as though the package were broken.
The same shape `protocol_check` already fixed for the run-log pins, one file
over: refusing a package for lacking a field that did not exist when it was
written punishes age rather than negligence.
`sign_roles` gains `PROVENANCE_INTRODUCED = (0, 9)` and `predates_provenance`.
An inlined context declares no version and is NOT treated as old -- silence is
not a claim of age, and such a document is usually signed, so the term was
available when it was made.
**Reading and signing split, deliberately.** `verify` reads an existing
artifact and now advises. `sign_package_scoped` makes a NEW claim today and
still REFUSES -- narrowing the check, never weakening it -- but names age as the
cause and says the fix is re-importing under a current context, rather than
leaving the caller hunting for a field to fill.
`unclassified_records` is unchanged: it still reports the fact for every
package. Only the callers decide whether that fact is a refusal or a note.
Test seen red by disabling the branch. Its first draft built a fixture keyed
`decision` where the real block key is `hasDecisionRecord`, so the checker found
nothing and the test went green on the exact case it exists to catch; the
fixture now reads DECISION_BLOCK_KEY and the reason is recorded in it.
3432 passed, 14 skipped.
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.
The report
Two passing signatures, then a warning that reads like the package is broken.
It is not broken
The package declares context v0.5.
decisionProvenancearrived in v0.9. The term is not in its vocabulary — it cannot state a fork.The message described this checker's expectation, not the package's condition.
verify's own preceding line already said the package was old:It knew, and asked anyway.
This is the shape
protocol_checkalready fixed for the run-log pins, one file over.After
Reading and signing split, deliberately
verify— reads an existing artifactsign_package_scoped— makes a new claim todayThe signing refusal now says how to fix it:
unclassified_recordsis unchanged — it still reports the fact for every package. Only the callers decide whether that fact is a refusal or a note. The check narrows; it does not weaken.An inlined context declares no version and is not treated as old: silence is not a claim of age, and such a document is usually signed, so the term was available when it was made.
Verification
3432 passed, 14 skippedunclassified_records→ 1)One thing worth recording. The test's first draft built its fixture with the key
decision; the real block key ishasDecisionRecord.decision_recordsfound nothing, so the test went green on the exact case it exists to catch. The fixture now readsDECISION_BLOCK_KEYand the reason is written into it.