Repository navigation
feat(op): an interface-typed resource slot mints its designated claim - #634
Merged
Merged
Conversation
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.
Phase 3 of any-entry-claims.md. Closes #619. Feature: #616.
This is the phase that makes the feature reachable from a plan.
file.Anyhas existed since #617 andhas resolved correctly at activation since #618, but no
.starauthor could produce one: an authoredstring bound to an interface-typed resource slot was refused outright.
op.RegisterResourceMint(resourceInterface, mint)mirrorsRegisterPlanPathNormalizer's shape — aregistry keyed on the interface, populated from provider init beside the announcement.
fileregistersResource → *Any. A claim asserts a kind and an interface asserts none, so the interface now names theconcrete claim that deliberately asserts nothing on its behalf.
The substitution happens at the claiming seam ahead of the plan-space grammar, the source-constructor
lookup, and the conversion, so an authored string bound to an interface behaves exactly as one bound to
an explicitly kinded parameter — no downstream branch anywhere.
*Anyjoined the normalizer registrationin the same init, so the plan-space grammar governs it like any other file claim.
The designation lives on the interface, once — never per parameter. Two methods taking the same slot
type must claim the same way, or one authored path would mean different intent depending on which method
received it.
The refusal narrows rather than disappearing. An interface that designates nothing still refuses,
and the message now names the missing designation rather than the interface's silence — guessing a kind
would mint a claim the author never made.
The scenario was re-authored, and its direction flipped. The narrowed refusal turned out to be
unreachable from Starlark: every announced resource-interface parameter is
file.Resource, which isdesignated. So
test_judgment_entry_slot_refusal.starbecametest_judgment_interface_slot_mints.star,pinning what an author now experiences —
file.observe(resource="observed.txt")claims where it used torefuse, and the stored intent row's type fragment names
file.Any. The refusal keeps a Go pin, where anundesignated interface can be constructed directly.
Pins: the two planner directions (undesignated refuses, naming the missing designation; designated
mints) plus the star.
Gate:
make test103 ok / 0 fail;make vetclean under darwin, windows, and linux;gofmt -lclean.