Skip to content

feat(runtime): establish native event and transport foundations - #541

Open
lidge-jun wants to merge 36 commits into
devfrom
codex/native-activity-01
Open

feat(runtime): establish native event and transport foundations#541
lidge-jun wants to merge 36 commits into
devfrom
codex/native-activity-01

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add a versioned, trace-first native event/outcome contract with bounded, redacted Codex App and Pi projections. Preserve existing final-response selection when an explicit native outcome is absent.
  • Keep authoritative empty/absent finals separate from previews and interrupted-message salvage. Preserve messaging final delivery, ACK and queue-notice behavior, including native body-delivery confirmation.
  • Add validated, reversible Cursor/Grok/Claude transport settings and isolated native session namespaces. Existing installations stay in print compatibility mode. Unsupported native main/worker adapters fail before fallback, resume, bootstrap or process work.
  • Preserve captured session ownership across compaction, lifecycle persistence, steering and late acquisition failures. Add status implementation flags without replacing cached binary/authentication evidence.

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

  • Foundation verification at 7f52d3f10: 329 tests passed across 29 explicitly selected runtime/settings/session regression files; no full repository-wide local suite was run.
  • Repair verification at 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.
  • Server and frontend typechecks, atomic server build, dist asset verification, frontend production build, architecture count verification (464 entries), and diff checks passed.
  • Real compiled-server HTTP/SSE checks covered 13 settings/status/input cases and an unsupported-native request: one actionable error terminal, no print/tool/output fallback, request settlement, then idle state. Test server and resources were torn down.
  • Separate independent reviews covered runtime/session code, configuration/DTO code, and the final evidence set.
  • Follow-up verification at 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 at 837bc868b.
  • Exact-head Tests run and Postinstall Platform Checks both passed at 157e7a5605bcbfe2ffeafabd6488603ca381bea0. Node tests: 8,883 total, 8,837 passed, zero failed, 46 skipped. The clean dev baseline at 348e95f948c4dfa97d4d51ff26711da9dbc838f3 also 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.
  • Existing Vite theme-boot and chunk-size warnings remain. CodeRabbit reports review skipped for the base branch; this is not counted as an independent review.

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.

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: db0cf1d7-4b82-4804-a44c-6f4236d2425d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-05T13:29:44.763654Z b717b24 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/cli/tui/transcript.ts
Comment on lines +196 to +197
state.items = state.items.filter((item, index) =>
index <= boundary || item.type !== 'assistant' || !item.streaming);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant