Repository navigation
Conversation
…here core may import it (D-LAW-3) spec/statestore is sdk/statekit (opencharly/sdk#683) relocated: the ONE store for a deployment's realized state (D-DEP-5) and the host's get/put/state_commit serving for the `state` row, permitted only for the caller that owns the deployment's kind (D-PROTO-12). It moves because the HOST serves those RPCs and charly/ core may import spec/* only, never an sdk mechanism kit (charly's import-purity gate) — the same reason needsolver and storeroot live here. The state root comes from storeroot.Dir(storeroot.RootState), the resolver storekit re-exports. sdk/statekit is deleted in the sdk cutover that follows; nothing imports it. Relates to #370. Agent: comfyui-0471 · Claude Code session 724dd7fe-cee8-48d9-9af4-7f630d2bc046 Assisted-by: Claude Code Anthropic Claude Opus 5.5 (fully tested and validated)
Contributor
Author
|
HOLDING HOLDING — #495 (blocking side) holds the charly B3 host-store change (blocked side). That change is coordinated on opencharly/opencharly#1390 and rides Agent: |
This was referenced Dec 2, 2026
…d during the Actions outage, which created no run) Agent: comfyui-0471 · Claude Code session 724dd7fe-cee8-48d9-9af4-7f630d2bc046 Assisted-by: Claude Code Anthropic Claude Opus 5.5 (fully tested and validated)
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.
Summary
spec/statestoreissdk/statekit(opencharly/sdk#683) relocated to the contract module, unchanged except for its package name and its root resolver. It is the one store for a deployment's realized state (D-DEP-5), plus the host'sget/put/state_commitserving for thestaterow, permitted only for the caller that owns the deployment's kind (D-PROTO-12). It is part of B3 of the DESIGN §8.3 bind/realize program (#370).Why it moves. charly core is the host that serves those RPCs, and charly's import-purity gate forbids core to import any sdk mechanism kit: "charly/ core imports spec/* + proto only". The B3 host change imported
sdk/statekit, andclaude-default-volume-designmeasured that gate failing on the combined D-PUB tree (opencharly/opencharly#1390, #issuecomment-7353290996).spec/needsolverlives here for exactly this reason. Its doc says: "It lives inspecfor the same reasonstorerootdoes: it is one implementation of a cross-cutting concern that the HOST must perform … andcharly/core may importspec/*only". DESIGN's D-LAW-3 says core "reads, links, validates, routes, solves and stores".What changes:
storekit.Dir(storekit.RootState)becomesstoreroot.Dir(storeroot.RootState), the resolverstorekitre-exports (D-STORE-1), so the state root is the same tree.sdk/statekitis deleted in the sdk cutover that follows this tag (C6). Nothing imports it: plugins reach state over the RPC, never the package.Coordination: this unblocks the charly B3 change, which rides
claude-default-volume-design's D-PUB charly bump (CLEARED (A)on opencharly/opencharly#1390).HOLDINGfollows here, and the matchingWAITINGon #1390.Files
statestore/statestore.goStore(Open,OpenDefault,Dir,Get,Put,Revision,Commit),Digest,ErrNotFound/ErrStaleRevision/ErrInvalidKey; ported fromsdk/statekit/statekit.gostatestore/host.goScope(OwnsKind),Store.ServeGet/ServePut/ServeStateCommit; ported fromsdk/statekit/host.gostatestore/statestore_test.goOpenDefault/Dirunder the state rootstatestore/host_test.goHow tested
C8, mutations on this head (each restored; the final
git status --short | wc -lis 0):The umbrella design controls, run on this head by pointing my session umbrella worktree's
specindex entry at it (restored afterwards), against specorigin/main:Both controls are red on spec
mainitself (opencharly/opencharly#1410). This change adds no finding to either.Spike
RCA claim: charly core imported an sdk mechanism kit (
sdk/statekit) to serve the host store RPCs. The host's import surface isspec/*+ proto only, so the store core uses must live in the contract.Candidates spiked (on the real instrument: charly's own
TestImportPurity_HostImportsOnlySpecAndVettedThirdPartyandTestNoSinglePluginAPISurface, in a scratch copy of the charly module on spec 1600 + sdkb36531c). In that copy, the compiled-in plugin registrations are stubbed, and the D-PUB test files that don't compile on the new spec yet are removed; both gate files are kept.residualSDKImportSites). Rejected by the gate's own rule: a row is for "a relocated mechanism's residual call sites" with "an until-K exit", and "an entry without a named exit is a boundary-law violation rather than debt". A new import is not residual and has no exit.After, with B3 importing
spec/statestorefrom this head and the F11 allowlist carrying the three methods:Works. The
import_purity_test.go:235line in "before" is a scratch artifact (a test file I had pruned). It is gone in "after", where that file is restored.3. Copy the store into charly core. It would duplicate the store, so it's rejected under C4 without a spike.
Winner: (2). It is the
needsolver/storerootprecedent, and the only candidate that passes the gate without inventing debt.RCA verdict: confirmed. The gate passes with (2).
Rulebook compliance
Plan conformance
Winning candidate: (2) move the store into spec.
storerootputwith astatekey."spec/storeroot, so the plugin host and every plugin it serves resolve the same trees from the same code"get/put/state_commitserved for thestaterow, refused outside the caller's kindstaterow's "Permitted when" column: "the caller's plugin owns that deployment's kind"; a refusal is the table'sdeniedcontent/secret/configrows refused as unimplementedcharly-internals:git-workflow,strict-policy,design,go,pluginandcharly-check:check, and read spec'sAGENTS.md.DESIGN.*/design/file is touched.sdk/statekitis deleted in the sdk cutover after this tag, never kept beside it.origin/main; one content commit plus one empty re-trigger commit, no force-push, no hook bypass.Change classification
spec). No disposable target exists:git grep -nE '^[[:space:]]*disposable:' -- '*.yml' '*.yaml'→ rc=1.go build ./...,go vet ./...,gofmt,golangci-lint(v2.13.2) andgo test ./..., pluscharly task cue-genas a no-op. All are green on025145e2c73b286be84242dc832a2c7c4daf34bc. The PR headb56270b8a5206cd61e74035a7123da13c4a319ecis one empty re-trigger commit on top, so the tree is identical (git diff --stat 025145e2c73b286be84242dc832a2c7c4daf34bc b56270b8a5206cd61e74035a7123da13c4a319ecis empty). The PR was opened at 17:31Z, inside GitHub's Actions incident (from 16:26Z), and no run was created for it; the required gate fires only on a push.fully tested and validated. Every exported identifier is called by a test:Open(throughopen),OpenDefaultandDir(TestOpenDefaultLivesUnderTheStateRoot),Get/Put/Revision/Commit/Digest, the three error values,Scopeand the threeServe*methods. The lock and the permission rule are each shown load-bearing by a mutation, and the package runs under the race detector.claude-opus-5-5(Anthropic Claude Opus 5.5).Filed issues
content,secretandconfigrows of the hostget/put(claimed bycomfyui-0471).Agent:
comfyui-0471· Claude Code session724dd7fe-cee8-48d9-9af4-7f630d2bc046Assisted-by: Claude Code Anthropic Claude Opus 5.5 (fully tested and validated)