Skip to content

Exercise commit-gated model and tool execution in an isolated kernel #2664

Open
0 of 6 issues completed
Open

Description

@jbeda

Outcome

The actual new kernel can complete a history-backed model request → tool call/result → next model request cycle in an isolated executable harness before production adoption.

Parent: #2659.

Scope

Compose the session aggregate, coordinator, and minimal execution loop with narrow responsibilities. Establish required acceptance gates, one unresolved append batch per history, detached invocation/output ownership, and existing read-parallel/mutate-serial ordering. Persist completed logical model interactions rather than streaming deltas. Exercise one real LLM and harmless mock tool through the same kernel path used by deterministic fixtures.

Acceptance

  • An offline scripted scenario completes multiple model/tool steps through the real kernel, not a parallel demonstration implementation.
  • Dependent model requests/tool dispatch cannot advance while prerequisite acceptance is rejected or uncertain; accepted state advances only from accepted facts.
  • A ready read-only tool result can commit while a sibling read-only tool is still running; mutation barriers remain effective.
  • Cancellation signaling and collection of already-admitted work remain responsive during storage waits; no ordering lock is held across I/O in a way that blocks those obligations.
  • Discarding live kernel objects and reconstructing the committed prefix preserves established state without repeating effects.
  • An explicitly enabled, bounded real-LLM/mock-tool smoke test exercises the same composition. Offline tests remain deterministic and require no credentials or paid calls.

Incremental delivery and contract maturity

Track implementation slices as native sub-issues, created before implementation, with implementation PRs linked to the owning slice. The initial decomposition is expected to evolve: split, refine, or add children as execution-consumer experience reveals work. Child counts describe currently identified work, not a percentage-complete estimate. The parent's acceptance criteria remain the stable outcome-level completion checks, verified through the integrated composition.

Each slice delivers observable behavior and qualifies the contracts it introduces. Review ownership, dependency direction, identity scope, mutable-data ownership, acceptance/failure semantics, and concurrency responsibilities before implementation; review each new or materially changed public contract as a coherent slice before adding consumers. Keep current guarantees beside the owning code and prove them through the real composition. Do not design all future interfaces in advance.

Closing a child qualifies its stated guarantees; it does not freeze experimental interfaces. Later changes require explicit contract review and tracking in the consuming slice or a focused new child. Reopen an earlier issue when its claimed guarantee proves false, not merely because a later consumer needs an additional capability. Necessary changes to existing passive contracts are allowed through the same discipline; #2663 closure is not an API freeze.

The native sub-issues are an initial roadmap, not an approved package layout, interface design, or strict serial schedule. Each receives its own scoped implementation plan when reached. Integrated closure of #2664 requires checking the parent acceptance, not merely closing every child.

Dependencies and boundaries

Depends on the history-backed session story. Its passive tool lifecycle is merged in #2755 (56c38b5e53455caff18be4807d2d0b7445bbc82d); this supplies retained intent/outcome facts, admission, closeout and inspection, not an executable loop. Provider-neutral logical-request construction/reconstruction is now merged in #2793 (91e3155236feb5dd684f0f6bf51e805cad1d30a4): pinned Snapshot/CommitView sources, capture-bound request commitment including same-batch preparation, and reconstruction from the original prefix/run with canonical request-CID verification. Reuse these contracts rather than rebuilding request projection in the loop. A construction result/accepted request is not proof of sending or invocation authority. Independent model-usage accounting is merged in #2841 (a65a05ca760afa682876ec404cc0fc3a8088abd8): history-scoped identities, fixed correlation and replaceable best-effort reports, including late reports and unknown-versus-zero counters. Reuse it; billing finality and automatic deduplication are not prerequisites. #2663 is complete for the passive isolated-session scope, including diagnostic record/commit timestamps and writer-instance metadata (#2876). Its closure is not execution/provider qualification, an experimental API freeze, or production readiness. The capture audit and gap register retain first-consumer proofs for original/effective tool arguments and released-output capture; actionable model-safe preparation/denial detail is conditional on a concrete self-correction need, not permission to expose private diagnostics. Deferred authority/provenance is owned by #2670, with caller-identity supply/preservation in #2669 and a client/API planning checkpoint or earlier consumer need. This execution story remains open; none of its acceptance criteria is satisfied merely by closing the passive-session story.

Coordinate with the interruption/recovery story for fault cases, without collapsing loop, coordinator, and session ownership into one aggregate. No production runtime switch, new storage service, full host governance integration, or generic extension/coordinator framework. Running a paid smoke test requires separate authorization; filing this story grants none.

Design context: kernel responsibilities.

Sub-issues

Sub-issues

0 of 6 Issues completed
Loading 6 sub-issues

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions