Skip to content

Reconcile branching Ensembles and native Codex inbox with current main - #1007

Merged
flip-engineer merged 215 commits into
mainfrom
dev/backlog-772-20261019
Oct 26, 2026
Merged

flip-engineer merged 215 commits into
mainfrom
dev/backlog-772-20261019

Conversation

@flip-baton-deepseek

Copy link
Copy Markdown
Contributor

Reconciles the PR #772 branching Ensemble and native Codex inbox work with current main. This branch replaces the older combined PR; the REPL source already landed through #852 and is not duplicated.

  • Branching Ensembles: workspace snapshots with a private index, fresh native conversations in worktrees, explicit evaluator argv, retained evidence, score or explicit selection, continuation in the selected conversation, recovery and explicit stops.
  • Native Codex inbox: host WebSocket proxy, Bend reducer claims, admission, continuation and terminal reports, HOME/CODEX_HOME endpoint migration, complete frame retention, cleanup and subscription release.
  • Concise contextual actions and automatic delivery/read tracking: send PLAYER TEXT, report TEXT, ask TEXT, guide PLAYER TEXT, finish SUMMARY and confirm PLAYER, with current-main internal delivery/read wording.
  • Retained-turn settlement: the Settle delivered inputs when a retained turn completes #862 delivered-input predicate consumes full-body prompt reads and forwarded guidance only within the exited attempt, current native identity and unstopped session.
  • Current main a5d7ada is merged.

Validation:

  • Full coordinator check-only rc0 (Bend "All terms check").
  • Focused Bend2 REPL acceptance: pure results 42, 43 and 44; type and foreign-source refusals retained.
  • codex-proxy.py: 12 passed.
  • Full coordinator and native fixtures (branching.py, branching-focused.bend, codex-inbox, recovery) remain pending through the maintained shared compile queue.

Root owns final review, merge and deployment.

Refs #772, #860, #862, #751, #761.

Implement inherited-environment subprocess pipes, WebSocket upgrade and text frames, complete protocol errors, cancellation, and natural child wait for #761. Add remote-validated protocol and Bend effect regressions.
Implement inherited-environment subprocess pipes, WebSocket upgrade and text frames, complete protocol errors, cancellation, and natural child wait for #761. Add remote-validated protocol and Bend effect regressions.
Implement inherited-environment subprocess pipes, WebSocket upgrade and text frames, complete protocol errors, cancellation, and natural child wait for #761. Add remote-validated protocol and Bend effect regressions.
Preserve SIGINT and SIGTERM forwarding for #761. Restore prior handlers after the last actual child wait and test concurrent reads, external cancellation, and multiple owned handles.
Preserve SIGINT and SIGTERM forwarding for #761. Restore prior handlers after the last actual child wait and test concurrent reads, external cancellation, and multiple owned handles.
Refuse cancellation with ECHILD after the actual child is reaped. Keep PID selection and kill under the registry lock so concurrent close cannot select process group zero. Add an actual retired-child regression for #761.
Refuse cancellation with ECHILD after the actual child is reaped. Keep PID selection and kill under the registry lock so concurrent close cannot select process group zero. Add an actual retired-child regression for #761.
flip-engineer and others added 24 commits October 16, 2026 23:33
…-pidfd-20261017

Retain the validated process lifetime during terminal observer retirement
…n-sharder-20261017

Use no-PCH sharding for Linux Clang 19 Main builds
…-20261017

Resolve current executable path after atomic replacement
…-narrow-20261017

Avoid repeated terminal serialization on output-only frames
Port the Branching Ensemble modules from pr/772 onto current main and add
the minimal action, route and command wiring. branching-focused.bend drives
the production modules over a temporary coordination database and real Git
worktrees: snapshot isolation, forked candidate isolation, lineage, best
evaluation selection and candidate flush.
Merge current main f38d370 into the PR #772 branch. Keep current main
for the REPL, compiler pins, storage, DSH, frame-span and observer paths.
Resolve the action surface, delivery, instance, turn and receive prompts
in favor of the branching and native-inbox work. Remove the obsolete
codex-inbox-wake helper from packaging. Deduplicate the logs output-parent
helpers introduced on both sides.
Merge the Branching Ensemble packet. Keep the reconciled source action
surface; add the production-bound branching fixture. The fixture uses the
recorded Instance.owner and Instance.shutdown argv routes.
Keep the existing native REPL C support, current build tooling, current
README and CONTRIBUTING, and the main test inventory. The reconciled
delta now contains the branching Ensemble, native Codex inbox, concise
action guidance and their focused tests.
Port the #862 settlement predicate for retained native turns. A successful
completion consumes full-body prompt reads and guidance forwarded before
the delivered cursor, within the exited attempt and current native identity.
Unread summarized reports, later input and stopped sessions remain owed.

The receive identity is the execution identity here: Stop.admit records
executions.id from the receive id and message_reads.attempt carries the
same id. The completed path therefore passes id to consume_completed.

Ported from PR #862 commits ea20b49, 7d3283a, dbc5e60, f9b497b,
83b5f31 and 898dcac.
Original authors: flip-engineer <will.a.hargis@gmail.com>,
baton-dsh-review <baton-review@localhost>.
Keep current-main postboot recovery, delivery/read tracking and lineage
guard. Preserve the branching/native-inbox source, the #862 delivered-input
settlement predicate, and concise action guidance. Prompts use current-main
identity/argv and internal tracking wording with the concise forms appended.
Tests assert the current-main prompt contract.
Keep current-main production schema, message-read index, clear-stop and
usage-window changes. Preserve the branching/native-inbox source, the #862
predicate and concise action guidance. Extend the concise help surface with
clear-stop and current internal delivery/read wording.
Bring the branching Ensemble/backlog-772 branch current. Preserve the
authored branching/native-inbox behavior, #862 settlement, concise actions
and current-main recovery/queue changes.
instance-subscription.c exercises the pre-#781 subscription API:
br_subscription_prepare, BatonProcessCall.notice_socket and a synchronous
unsubscribe request. Main superseded that design with the synchronous
committed-change subscription carried by 14409fe (from 1d26325), where
the notice call reads child->retained->socket directly and unsubscribe
frees the retained connection without a request. The old blocked-reader
and queued-stale-read scenarios would test use-after-free races under the
current design, so the fixture has no current API to cover.
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