Repository navigation
feat(engine): add isolated kernel history foundation - #2639
Merged
Merged
Conversation
Introduce opaque comparable IDs with registered kinds, secure uniform generation, strict parsing, and a strongly typed history wrapper. Add public API snapshots and dependency guards without activating the kernel or changing existing session IDs. Co-authored-by: Mecatl <[email protected]>
Keep history.HistoryID and its constructor/parser entry points as aliases and wrappers over the codec-independent history/id package. Guard the new package and disambiguate its API snapshot from engine/id. Co-authored-by: Mecatl <[email protected]>
Group implementation reports by authority, representation, ownership, and extension boundaries. Explain the canonical history format and handwritten Atmos codec choice without session staging or raw benchmark dumps. Co-authored-by: Mecatl <[email protected]>
Add strict fixed-profile CID text parsing and formatting at the isolated history format boundary. Keep content validation, codecs, and storage consumers outside this slice. Co-authored-by: Mecatl <[email protected]>
Add mutable Commit and Record values with concrete deep-clone and fieldwise equality methods. Keep validation, codecs, and consumers deferred; document the ownership contract and generated-type tradeoff. Place package documentation in doc.go. Co-authored-by: Mecatl <[email protected]>
Add strict v1 DAG-CBOR encoding and decoding, explicit resource limits, validation, and exact-byte commit identities. Organize format implementations by type and document kernel-local coding standards and the interim handwritten codec boundary. Use Atmos v0.8.0 with the necessary Go 1.27.3 floor propagation and prerequisite corrections. Co-authored-by: Mecatl <[email protected]>
Add one-based commit ordinals to validation, equality, canonical DAG-CBOR encoding and content identity. Keep parent-relative sequence validation at the future acceptance boundary and cover integer-width and malformed-envelope cases. Keep kernel API snapshots current without compatibility bookkeeping during the experiment. Co-authored-by: Mecatl <[email protected]>
Distinguish canonical mutation ownership from shared storage acceptance. Route loop and non-loop proposals through kernel coordination, keep checkpoints and relays derived, and capture acceptance scenarios without prescribing runtime topology. Co-authored-by: Mecatl <[email protected]>
Add DTO-facing identification, one-call conditional append, retry resolution, and bounded fixed-endpoint reads. Keep canonical validation and protocol policy in History, with coherent observations and opaque byte persistence behind Backend. Provide a concurrent memory backend and portable conformance tests covering sequence enforcement, read boundaries, ownership, resource limits, and uncertain acceptance. Co-authored-by: Mecatl <[email protected]>
jbeda
force-pushed
the
impl/session-history-kernel
branch
from
November 1, 2026 16:46
a1178b7 to
e9f521e
Compare
jbeda
marked this pull request as ready for review
November 1, 2026 16:47
Allow standalone root API checks to load the isolated history codec dependency without workspace checksums. Co-authored-by: Mecatl <[email protected]>
Use the engine module directory when loading its public API so standalone root checks resolve engine dependencies from engine/go.sum. Remove root Atmos checksums that tidy correctly discards. Co-authored-by: Mecatl <[email protected]>
This was referenced Nov 3, 2026
Merged
2 tasks
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
Introduce the isolated kernel's history foundation, without changing production execution entry points:
history.Historyfor conditional append, explicit uncertain-append resolution, and bounded reads through a pinned commit reference.The codec uses Atmos v0.8.0, which raises the engine and local consumers' minimum Go version to 1.27.3. Associated manifest, dependency-floor test, and prerequisite documentation changes are intentional.
Contract highlights
Scope and next milestone
This PR deliberately stops at a coherent history foundation. It does not add a session aggregate, coordinator, execution loop, writer ownership/fencing, production storage adapter, or server/client integration.
The next agreed integration milestone is an isolated history-backed run using a real LLM and a mock tool, with a thin client if needed. It will bring session semantics, coordination, and a minimal loop together; demonstrate intent/result commit gates; reconstruct equivalent accepted state after discarding live kernel objects; and prove honest interrupted/uncertain outcomes without reexecuting tools. Deterministic offline tests remain separate from live-provider smoke checks. That future work is not implemented here.
Verification
Existing slice-level evidence recorded locally before the final commit:
GOWORK=off).Fresh PR-preparation results against rebased head
e9f521eca(Go 1.27.3):task linttask --concurrency 3 test:race— initial run failed in rootinternal/apicheck; all engine tests passed. The API checker dynamically loaded engine packages from the root module, whose tidy graph does not retain Atmos checksums. The checksum-only workaround in917c154eefailed CI's tidy gate and is superseded by6e612fe85: load packages from the engine module directory and remove the unnecessary root checksums. Aftertask tidy, the completeinternal/apichecksuite passes withGOWORK=off GOPROXY=off,-mod=readonly, and-race.task test:module-metadataalso passes. Full-suite verification is left to CI at the operator's request.task docstask api:check— workspace-mode pass; does not cover the standalone-root failure above.go run ./cmd/mecademo— verified tool call, permission ask/approval, and final result (existing production-runtime offline smoke test, not the future kernel milestone).Pre-rebase lint/race runs were stopped before changing the tree. Follow-up fixes change only API-check tooling and root checksum metadata; no dependency versions or production code changed.
Draft pending CI and human review. Rebased without conflicts onto
origin/mainatc3adf8f7a;git range-diffconfirmed all nine original branch commits are patch-identical. The checksum fix is a separate follow-up commit.API compatibility
history.HistoryIDalias/constructors but changes the defining/reflection package identity within the new experimental surface.