You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "likun666661 (via GitHub)" <gi...@apache.org> on 2026/08/24 13:49:40 UTC
[PR] refactor(runtime): collapse runner shell into kernel [maka]
likun666661 opened a new pull request, #3718:
URL: https://github.com/apache/maka/pull/3718
## Summary
- Remove the `RuntimeRunner`, `AgentFlow`, and `InvocationContext` shell so `RuntimeKernel` directly owns backend dispatch, stop/drain, terminal coalescing, and missing-terminal convergence.
- Keep `SessionEvent` to `RuntimeEvent` conversion as a pure mapper and move initial user-event construction into `AgentRun`.
- Preserve durable continuation admission, replay validation, no-duplicate-user semantics, and the existing Runtime ledger invariants while reducing the maintained call graph.
Refs https://github.com/apache/maka/discussions/3618
## Verification
- `npm run build`
- `npm run typecheck`
- `npm run lint`
- `npm run format:check`
- Focused Runtime mapper, SessionManager, terminal-ledger, continuation, and SIGKILL crash coverage: 314 passed
- Follow-up SessionManager and continuation regression run: 239 passed
- Full `@maka/runtime` suite: 2,948 passed and 13 skipped; one unrelated existing macOS sandbox executable-root assertion failed in `builtin-tools.test.ts`
## Review focus
This intentionally removes public Runtime subpaths for the retired Invocation/Flow shell. Please focus on direct `RuntimeKernel` stream ownership and the continuation proof-consumption boundary.
## AI use
Select exactly one:
- [ ] No generative tool made a substantive contribution
- [x] Generative tooling made a substantive contribution
Tool(s) and scope: OpenAI Codex traced the Runtime ownership graph, implemented the collapse, migrated tests and documentation, and ran verification. The commit includes the required `Generated-by` trailer.
## Checklist
- [ ] Tests cover the change and fail without it
- [x] Lint, format, typecheck and the affected suites pass locally
The change is a behavior-preserving ownership refactor, so its regression tests protect the existing invariants rather than intentionally failing against the previous shell structure.
Does this PR entail a change in behavior?
- [x] Yes — described under Summary above
- [ ] No
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] refactor(runtime): collapse runner shell into kernel [maka]
Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han merged PR #3718:
URL: https://github.com/apache/maka/pull/3718
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] refactor(runtime): collapse runner shell into kernel [maka]
Posted by "likun666661 (via GitHub)" <gi...@apache.org>.
likun666661 commented on PR #3718:
URL: https://github.com/apache/maka/pull/3718#issuecomment-5396911859
Addressed the requested changes in 46bed4545:
- Rebased onto current main; the PR is now mergeable.
- Restored clone/freeze ownership boundaries when AgentRun accepts turn input and at the unified backend dispatch path, covering normal turns and continuations.
- Kept the stored user fact, provider payload, and head anchor as separate immutable snapshots.
- Added a regression test that mutates the caller-owned attachments/quotes/inline references after the durable user-event append, then attempts backend-side mutation and verifies the stored event, provider input, and head anchor remain stable.
Verification used Node 24.18.1 and npm 11.19.0: runtime suite 3046 tests / 3033 passed / 13 skipped / 0 failed; full repository build and typecheck passed; lint, format check, ASF header check, and git diff check passed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org