feat(runtime): establish native event and transport foundations - #541
feat(runtime): establish native event and transport foundations#541lidge-jun wants to merge 36 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b717b249c2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| state.items = state.items.filter((item, index) => | ||
| index <= boundary || item.type !== 'assistant' || !item.streaming); |
There was a problem hiding this comment.
Remove settled preview rows before applying native finals
When a native preview is followed by a tool event, appendToolItem() calls settleAssistantForTool(), changing that preview row to streaming: false. This filter therefore preserves the provisional text when a native terminal later supplies an authoritative replacement or explicitly empty final, leaving stale preview content visible beside the final answer. Track native preview ownership separately or remove all preview-owned assistant rows after the latest user boundary, rather than using the mutable streaming flag.
AGENTS.md reference: AGENTS.md:L179-L179
Useful? React with 👍 / 👎.
Summary
Compatibility and boundaries
Codex App and Pi remain usable through their existing native runtimes. This PR does not activate Cursor/Grok ACP, Claude SDK, or the new Activity presentation default. Those are subsequent runnable layers. Native main and worker support are separate capabilities; unavailable capabilities are not advertised as implemented.
This is the first layer of the planned native-runtime/Activity stack, based on
dev. Subsequent layers cover Cursor ACP, Grok ACP, Claude SDK/worker ownership, journal/web presentation, and TUI/desktop. Native stack membership will be registered and verified when the next dependent PR exists. No merge or release is requested by this change.Verification
7f52d3f10: 329 tests passed across 29 explicitly selected runtime/settings/session regression files; no full repository-wide local suite was run.837bc868b: 169 tests passed across nine focused files. Real 80×24 and 40×24 terminal captures confirm the thinking-to-answer output transition, intact Korean text, single flush, and cleanup.157e7a5605bcbfe2ffeafabd6488603ca381bea0: 204 tests passed across 11 explicitly selected files, with server/frontend typechecks, builds, dist assets, architecture counts and diff checks passing. The production tree is unchanged from the recorded PTY capture at837bc868b.157e7a5605bcbfe2ffeafabd6488603ca381bea0. Node tests: 8,883 total, 8,837 passed, zero failed, 46 skipped. The cleandevbaseline at348e95f948c4dfa97d4d51ff26711da9dbc838f3also had zero failures (8,507 passed, 46 skipped); no new failing cases. Windows unit tests, CLI/API smoke checks, and Linux/macOS/Windows-native/WSL installation lanes passed.The first CI pass exposed stale Slack mock and source-spelling test contracts. Follow-up verification replaces the affected checks with behavior tests, isolates the TUI fixtures, and fixes a real line-mode thinking-to-answer transition: the first answer chunk now starts its stream sink without resetting the turn clock. Later test-only repairs replace a Mermaid source-window oracle with actual VirtualScroll snapshots and await real delivery promises instead of a fixed number of event-loop yields. Controlled mutations prove that the replay/trace, Mermaid promotion, and delivery-completion oracles catch regressions; every mutation was restored. Final focused, PTY, and exact-head CI evidence is recorded above.