Repository navigation
unverified: a package says why once, for what its own settings give up - #241
Merged
Merged
Conversation
added 2 commits
November 10, 2026 03:45
config.idp takes an `unverified` key beside the settings that cause losses:
handshake = "none"
unverified = { schema_agreement = "the gateway pins schemas by contract" ... }
or a plain reason, covering every package-scope cause. It's under the same
gate as the annotation (annotations.unverified.allowed).
It covers only a cause that comes from a package setting, and only for a
protocol that takes that setting: one with its own @handshake or @framing
isn't covered for what that gives up. A protocol is acknowledged for what
its own marker covers and what the package covers for it, so an unmarked
protocol whose losses are all covered compiles, and a keyed marker needn't
list what the package covers. Anything else is the missing-marker and
missing-guarantee errors as before.
Keys are held to the catalog: a guarantee that doesn't allow package scope
(bounded_size) is unverified::wrong-scope, naming the scopes it allows;
unknown, repeated and reasonless entries are the protocol marker's errors;
a keyed entry no protocol gives up through the package is
unverified::not-given-up, a warning.
The given-up set is frozen as before, and now also for a protocol the
package covers without a marker. Each covered protocol also carries an
`unverified_package` property: the package's reasons for the guarantees it
covers for it. Nothing changes for one it covers nothing for. Reasons in
diagnostics, inspect and dependency acceptance read it when the marker has
none. The diff reports the property as a patch; the set decides the rest.
comline-catalog moves to the specification rev with guarantee scopes.
…n it's marked A protocol only the package's `unverified` covers has no marker of its own, and showed as verified while its guarantee rows said otherwise. The flag now follows what's given up (the frozen set or any cause); its doc and the doc model's description say so.
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.
A package can say why it gives up what its own settings give up, once, instead of every protocol repeating it.
or
unverified = "reason". (config.idpdictionaries are whitespace-separated, no commas.) Part of #222; proposal ComlineProject/docs#162.Rules as implemented
unverifiedkey inconfig.idp, keyed or plain, underannotations.unverified.allowed; without it the build fails with the gate's message (settings::forbidden, naming the key).@handshakeor@framingisn't covered for what that gives up; the format is only ever the package's. A guarantee with several causes is covered only if all of them come from the package.bounded_sizeis never package-origin. What a protocol takes is read before the package's handshake is frozen in (unverified::inherits), since after that it reads as the protocol's own.Scope::Packageisunverified::wrong-scope, naming the scopes the catalog gives it. Unknown keys areunknown-guaranteewith did-you-mean, repeated keysduplicate-guarantee, an empty or non-string reasonmissing-reason(same checks as a protocol marker). A keyed entry no inheriting protocol gives up through a package setting is thenot-given-upwarning, reported on the package's first schema (config entries carry no spans).missing-marker/missing-guarantee, unchanged (a partly covered unmarked protocol's error names only what's uncovered).FrozenUnit::Unverified(set)is still what core works out, and is now also frozen for a protocol the package covers without a marker (consumers need to see it). Each protocol covered at package scope getsProperty { name: "unverified_package", value: Dict(guarantee id -> reason) }: the package's acknowledgement restricted to what it covers for that protocol (a plain package form freezes as the dict with the plain reason). Protocols not covered get nothing new, so their frozen bytes don't change. No schema IR variant, no serde change. The compiler strips anyunverified_packagea schema wrote itself, so only it says what the package covers. The package's ownunverifiedis frozen in the config units as a new trailingFrozenUnit::Unverified(ConfigValue)variant (config units are a separate enum; this is howHandshakeParamswas added).reason_for,reason_text,protocols()(so dependency acceptance messages) andinspectfall back to the package's reason for a guarantee the marker doesn't say. The marker's reason wins. Output for existing cases is byte-identical.unverified_packageis reported as aChangedAnnotation(a patch); what's given up still decides major and minor through the frozen set.unverifiedis accepted by the config interpreter (freezing.rs), the only place config keys are registered; the validator for the key isvalidator::check_package_unverified.New codes
unverified::wrong-scope(error)unknown-guarantee,duplicate-guarantee,missing-reason,not-given-upTests
In
core/tests/package/unverified.rs: packagehandshake = "none"with keyed and plain acknowledgements; own@handshakenot covered (and a forgedunverified_packageis ignored);bounded_sizenot covered, and awrong-scopeentry; unknown key, empty reason, duplicate; not-given-up warning; keyed marker listing onlybounded_size; gate off; diff (reword, move to a marker, gave up/restored). Inpackage/deps.rs: the acceptance message shows the package's reasons.Also bumps
comline-catalogto spec rev 508f813 (guarantee scopes) and updates the one inspect doc string inschemas/doc-model.jsonto match.