refactor(ato): separate computation core from protocol v1 - #1262
Merged
Koh0920 merged 16 commits intoAug 13, 2026
Merged
Conversation
Koh0920
marked this pull request as ready for review
August 13, 2026 08:09
Koh0920
merged commit Aug 13, 2026
714ad4f
into
base/nightly-before-computation-compatibility
15 of 16 checks passed
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
ContentRef,ComputationRef,SemanticsId,ProtocolId,PortId,RoleId,PortDef, andComputationObject { semantics, boundary, residual }.ComputationRefas a syntactically valid persistent reference. It may be unresolved or dangling. OnlyResolvedComputationproves canonical decoding and exact digest agreement; Semantics-specific validity remains a future layer.capsule-core-codecas the single authority for canonical encoding, strict decoding, hashing, resolution, the 1 MiB accepted-object limit, and golden vectors.capsule-adapter-state-io-v1. Exact descriptor and Record bytes remain opaque compatibility material addressed through CAS.origin_computation: ComputationRef; checkpoints, frontiers, replay evidence, and materialization state live only in the nested runtime profile and cannot replace the origin.capsule.compose@1Semantics instead of anAtomic | CompositeCore variant, with a draft small-step RFC.Review follow-up
ComputationRefitself is verified. Parsing establishes syntax and the Computation Object v1 reference domain only.AttachmentEndpointtypes too early. Runtime routing still uses the existing legacy selector.legacy-peerPorts are not generically composable until a v1 role-compatibility rule is defined.ComputationReftype toCAPSULE_COMPUTATION_OBJECT_V1. A future incompatible encoding must use a distinct reference domain and type and cannot reinterpret an existing reference.upgrade_legacy_originmutation. Compatibility migration now accepts an opaque value that only the v1 adapter can mint alongside a resolved normalized computation.Identity and compatibility invariants
residualis Semantics-owned opaque content; Core does not interpret config, State, Connectors, Records, children, or composition graphs.fsync, atomic no-clobber persistence,O_NOFOLLOW, and streaming validation of existing CAS objects.ConnectorId == PortIdis absent from generic APIs. The compatibility projection remains confined to the v1 adapter.Scope
Protocol v2, generic interaction history,
seal(C), and evaluation ofcapsule.compose@1remain deferred. The recommended next PR is the canonicalcapsule.compose@1residual, validator, and minimal Hello World E2E; a generic Evaluator API should then be derived from that concrete use case.Validation
cargo fmt --all -- --checkcargo check --workspacecargo test -p capsule --lib protocol_bundle— 24 passedcargo test -p cli --test capsule_session_detached_e2e— 11 passedcargo test -p cli --test capsule_session_ready_state_e2e— 5 passedcargo clippy -p capsule-core -p capsule-core-codec -p capsule-adapter-state-io-v1 -p capsule-session-runtime -p capsule -p cli --all-targets -- -D warnings