Repository navigation
file's four variants are sealed interfaces discriminated by kind(), and converter probes look through a sealed interface - #810
Merged
Conversation
added 2 commits
September 4, 2026 11:12
…cord the consumer-edit ruling Phase 7 (#645) sized against develop at 1fc3ea9: file.Resource is already sealed; the four variants embed one unexported base and add no fields; three constructors return struct pointers; one mint exists. Three consumer packages hold the pointer type (encryption, archive, starcode) plus one test. Ruled 2026-09-04: this worktree edits those sites, since the change is mechanical and the phase cannot compile without it. Five steps listed; status in-progress. Claude-Session: https://claude.ai/code/session_01SqQVFZz7AdiLZkGoAcUqRW
…nd plan-time converter probes look through a sealed interface Phase 7 of the sealed-resources plan (#645). AnyKind, Regular, Directory, SymbolicLink become sealed interfaces over unexported structs, each declaring kind() with its own result type so no concrete type can be two kinds at once. Constructors return the interfaces with an explicit nil on error; resource.go's init registers the four implementations and five mints; the plan-path normalizers register the interfaces. Consumers hold the interfaces (encryption, archive, starcode, plan's tests) and read Path() instead of the field, per the 2026-09-04 ruling; archive's redundant IsDir check after a kind-honest Exists folds into one refusal. op.convert's sourceSideAdvertises and targetSideAdvertises probe the registered implementation of a sealed interface, since the interface type carries none of the struct's converter methods; without it a graph binding a file.Directory output to a string slot was refused at validation. Generated files are byte-identical. Plan phase 7 complete; #807 and #808 logged for the typed-nil constructors of earlier phases and the collision error's struct names. Claude-Session: https://claude.ai/code/session_01SqQVFZz7AdiLZkGoAcUqRW
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.
Thread 2 (
Epic:ResourceModel), phase 7 of 625-sealed-provider-resources.md — the phase where the feature's goal is met: every announced resource type is now an interface.#645 — seal
file's four variantsAnyKind,Regular,Directory,SymbolicLinkare sealed interfaces over unexported structs, each declaringkind() <Self>(ruling 6) so the compiler keeps the kinds mutually exclusive. Constructors return the interfaces;initregisters four implementations and five mints. Consumers (encryption,archive,starcode,plan's tests) hold the interfaces and readPath(), under the 2026-09-04 ruling that this worktree edits them.op.convert's plan-time probes now resolve a registered sealed interface to its implementation before inspecting converter methods; without that, binding afile.Directoryoutput to astringslot was refused at validation.Sized first (commit 1); the sizing's misses are recorded in the plan's landed note.
regular.go,directory.go,symbolic_link.go,any_kind.go: the interface, the unexported struct,kind(), the constructors returning the interface; the registrationsconcretehelper in the testsencryption,archive,starcode,plantestsmake generate; the four fragments byte-identical to develop (ruling 4) — verified, no generator changemake checkgreen locallyCloses #645
https://claude.ai/code/session_01SqQVFZz7AdiLZkGoAcUqRW