Skip to content

Peer link: prove a process app hears the system agent's lane live (ADR 0004 §6) - #197

Merged
ymote merged 5 commits into
mainfrom
feat/peer-link-conversation
Oct 1, 2026
Merged

ymote merged 5 commits into
mainfrom
feat/peer-link-conversation

Conversation

@ymote

@ymote ymote commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

ADR 0004's "two lanes, left open" for process apps. The Makepad side is makepad#77: the peer client now reads conversation frames (both lanes, surfaced as PeerEvent::Conversation) and queues a second message on a handle (at most 8; queue_full beyond; closing cancels).

The shell already sent the frames and needs no behaviour change: the client queues, and it sends the next message only after the running turn's reply, by which time the broker has freed the handle's turn slot. This PR:

  • real_kernel_a_process_app_hears_the_system_agents_lane_live (crates/shell/src/host_tools/real_kernel_tests.rs): on a real octos kernel, a process app's peer link (PeerLinks, the real broker) opens its conversation without a client; the system agent's peer_send_input turn on the app's agent reaches the process's link live as conversation frames with lane system_agent and its speaker: turn/started with the request, the user message's display_text, the answer (assistant_delta) and the end (turn_terminal), before and without any octos.session.history. The frames it prints are the fixtures of Makepad's client tests.
  • The framing test also reads a conversation frame as Makepad's client writes it; wire.rs's doc names the client.
  • ADR 0004: the two client items are ticked with what did them. Still open: an in-process module calling OctosContext directly is still refused a second turn, and the repin is pending. Octoscript-Makepad #50, a repin of the same chain, is still open, so OctoSense stays on makepad a1c81312 until it lands.

Tests run locally, from phone/:

  • OCTOS_SHELL_TEST_KERNEL=<octos fe08d8e6, built with tools/kernel-artifact.py --host> cargo test --locked --features mobile-apps -p octosense-shell real_kernel -- --test-threads=1: 4 passed (the new test and the three existing ones), on the base before Repin the runtime to makepad a1c81312 (terminal links and search) #193;
  • cargo test --locked --features mobile-apps -p octosense-shell peer_link: 15 passed.

🤖 Generated with Claude Code

ymote and others added 5 commits September 30, 2026 11:55
…R 0004's two lanes

A real-kernel test for the process path (ADR 0004 §6): a process app opens
its conversation over the peer link (`octos.session.open` without a
client); the system agent sends the app's agent a message
(`peer_send_input`); the turn reaches the process's link live as
`conversation` frames with lane `system_agent` and its speaker:
`turn/started` with the request, the user message without the kernel's
marker, the answer (`assistant_delta`) and the end (`turn_terminal`), with
no history request. The recorded frames are the fixtures of Makepad's
client (makepad#77), which now reads them and queues a second message on
a handle.

The framing test also reads a conversation frame as Makepad writes it.
ADR 0004: the two lanes' client items are done in Makepad; process apps get
them once the runtime pin reaches it (the repin is pending).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…al-kernel test cleans up on failure

Resolves ADR 0004 against main (origin/main's follow-up text kept; the two
lanes' items ticked with makepad#77, in the runtime since the makepad
e29a0eaa pin, which contains it). The process-app real-kernel test releases
its link, broker, kernel, model and temporary files by a drop guard, pass or
fail, and its doc says how CI runs it (phone.yml sets
OCTOS_SHELL_TEST_KERNEL from the cached pinned octos build).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ymote

ymote commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

Local CI passed on 019aef0 (tools/ci-local.sh --only desktop,phone,apps, 14m45s, Darwin arm64).

GitHub would run for this PR: desktop.yml, phone.yml, apps.yml. Merged on this local pass (macOS runner queue); GitHub CI runs on the merge commit on main.

Job Step Result Time
ci-local / drift The local mapping fits the workflows PASS -
desktop.yml / desktop Prepare the pinned framework sources PASS 0s
desktop.yml / desktop Compile the desktop with the shared runtime PASS 1m24s
desktop.yml / desktop One copy of every shell source PASS -
desktop.yml / desktop Desktop tools and scripts PASS 8s
desktop.yml / desktop One Makepad, App Hub, octos and Rinx in the locked graph PASS 2s
desktop.yml / desktop The native apps' generated places match native-apps.json PASS 0s
phone.yml / home Prepare pinned sources and the reviewed runtime patch PASS 0s
phone.yml / home Compile Home and its bundled modules PASS 1m29s
phone.yml / home Verify the single runtime graph PASS 2s
phone.yml / home The native apps' generated places match native-apps.json PASS -
phone.yml / home The pinned octos revision PASS -
phone.yml / home Build octos (unless cached) PASS -
phone.yml / home Build Home, App Hub admission and runtime policy tests PASS 1m36s
phone.yml / home Test Home, App Hub admission and runtime policy PASS 5m01s
phone.yml / home Two-lane scenario (real kernel, scripted model) PASS 29s
apps.yml / services python3 tools/setup.py PASS 1s
apps.yml / services Kernel service PASS 2s
apps.yml / services App peers PASS 18s
apps.yml / services AI providers config PASS 1s
apps.yml / services System toolbox (workflow templates) PASS 1m05s
apps.yml / kernel-security python3 tools/setup.py PASS 0s
apps.yml / kernel-security The pinned octos revision PASS 0s
apps.yml / kernel-security Build octos (unless cached) PASS -
apps.yml / kernel-security Real-kernel tests PASS 26s
apps.yml / apps python3 tools/setup.py PASS 0s
apps.yml / apps Host services (Mail, AI providers, News) PASS 49s
apps.yml / apps Shell AI services (crates/ai-host) PASS 1m31s
apps.yml / apps AppCard runtime setup safeguards PASS 0s
apps.yml / apps AppCard clippy (own crates; shared runtime compiles) PASS 12s
apps.yml / apps AppCard transport and store PASS 4s
apps.yml / apps One Makepad, App Hub, octos and Rinx in the locked graph PASS 2s

Notes:

  • GitHub runs Python 3.12; this run used Python 3.9.6
  • apps.yml:services runs on ubuntu-latest in GitHub; here on macOS, so #[cfg(target_os = "linux")] code in it is not exercised
  • apps.yml:kernel-security runs on ubuntu-latest in GitHub; here on macOS, so #[cfg(target_os = "linux")] code in it is not exercised

@ymote
ymote merged commit 8072d93 into main Oct 1, 2026
0 of 5 checks passed
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