You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "Astro-Han (via GitHub)" <gi...@apache.org> on 2026/08/27 11:57:48 UTC
[PR] fix(runtime): restore automatic Session titles and give the Host the naming effect [maka]
Astro-Han opened a new pull request, #4020:
URL: https://github.com/apache/maka/pull/4020
## Summary
New conversations stopped naming themselves. The auto-title gate required
`!header.connectionLocked`, and PR #3721 made that condition unreachable on the
Message path: an admitted root Message is materialized into the transcript
before the Run starts, and that append freezes the model route. By the time the
Runtime asked "is this Session still unlocked?", the answer was always no, so
every Session kept the name `New Chat`. Dropping that term from the gate
restores naming; the "still unnamed" rule was always the real guard.
The gate was only unreachable because the effect had two owners. `SessionManager`
decided *when* to name, while the Host owned the model call, the residency and
the drain — so a timing change inside Host admission could silently disable a
Host effect with nothing in the Runtime able to see it. Naming now lives beside
recap in the Host Session-effect coordinator, triggered from the one root path
that carries a user Message, so a compaction or a continuation still opens a Run
without naming anything. `SessionManagerDeps` loses `generateSessionTitle`,
`onSessionTitleChanged` and `setGeneratedTitleIfAbsent`; the Runtime no longer
holds any part of a Host-owned effect.
Two cleanups this made visible, rather than a follow-up branch that never opens:
- **Desktop composer sends.** `sessions:send` still ran its own admission
ladder — call `turn.start`, read `session_busy` off the failure, resubmit as
steering, with a Skill carve-out and `/skill:` content sniffing to keep that
ladder honest. PR #3803 made `turn.message.submit` the admission authority, and
the composer is not a surface that reserves a Turn. It now submits once under a
stable Message identity and maps the Host's disposition; the whole ladder goes.
- **`connectionLocked` writers.** Four writers, three authorities. AgentRun's
write at Run start was redundant on both root paths — the Message is already
materialized — and the only thing it really carried was subagent Sessions,
which never see a user Message. That fact belongs at creation: a subagent
Session's route is chosen by the spawn that created it and is never
re-targeted, so it is now born frozen.
## Verification
- New `packages/runtime-host/src/__tests__/execution-host-session-title.test.ts`
drives a real forked Host and covers both root paths end to end: a first
`turn.message.submit` and a first `turn.start` each name their default-named
Session, and each leaves the Session's route frozen. It fails on `main` with
`'New Chat' !== 'draft the release notes'` on the submit case.
- `@maka/runtime` 205/205, `@maka/storage` 81/81,
`@maka/runtime-host` and `@maka/desktop` main suites pass; desktop typecheck,
`biome format` and `biome lint` clean.
- Not run: the full Electron end-to-end suite.
## Review focus
Behavior given up on purpose: a busy Desktop send no longer degrades a Skill
invocation to steering locally — the Host's `session_busy` propagates instead.
Retry semantics tighten as a side effect, since every send now carries a
caller-owned `messageId`, so an interrupted dispatch is safe to repeat and only
a second lost answer resolves as `outcome_unknown`.
## AI use
Select exactly one:
- [ ] No generative tool made a substantive contribution
- [x] Generative tooling made a substantive contribution
Tool(s) and scope: Claude Code — diagnosis, implementation and tests, reviewed
by the author. All four commits carry `Generated-by: Claude Code`.
## Checklist
- [x] Tests cover the change and fail without it
- [x] Lint, format, typecheck and the affected suites pass locally
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] fix(runtime): restore automatic Session titles and give the Host the naming effect [maka]
Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han merged PR #4020:
URL: https://github.com/apache/maka/pull/4020
--
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] fix(runtime): restore automatic Session titles and give the Host the naming effect [maka]
Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han commented on PR #4020:
URL: https://github.com/apache/maka/pull/4020#issuecomment-5439262461
## Adversarial review pass
Three subagents reviewed this branch independently (naming effect, Desktop send path, `connectionLocked`), each required to try to refute its own findings. Seven survived; all are fixed in `6eb8335b0`, `f1922387f` and `2f80611c7`.
**Desktop send path**
- `outcome_unknown` is now the main failure shape of a send — the Host declining to prove what happened, not refusing the Message — but WorkHub read every `ok:false` as a refusal and released the reserved root, so a Message that may already be running stopped being reconcilable. Its test used a `reason` the contract does not have, which is why the mapping looked covered.
- The `blocked` disposition returned a shape the bridge contract does not declare (no `reason`), so the renderer reported `send failed: undefined`.
- The busy-Skill test asserted a contract the Host does not offer. Only explicit `skillIds` and an orchestration override are exact-Turn intent; a `/skill:` token in the text is expanded on the queued path too. That is this PR's one user-visible behavior change, and it was hidden behind an unconditional stub — now covered as two separate cases.
**Naming effect**
- `setGeneratedTitleIfAbsent` was a read-then-write, so a manual rename landing between check and write was overwritten, leaving `titleIsManual: true` on a generated name. Restoring naming widened that window from a Session's first Turn to every Turn it spends unnamed. It is now a conditional write at the revision the check read.
- A queued Message could open its Turn while the first title call was still out, spending a second auxiliary model call that could only lose the write.
- A mutation proved a coverage gap: discarding the model's title entirely kept every naming test green, because no test distinguished it from the fallback.
**`connectionLocked`**
- The premise of `7b2557372`'s message is wrong, and `2f80611c7` says so: a subagent Session *does* see a user Message — its spawn opens the first Turn through `sendMessage`. Freezing at creation is still right, but it closes milliseconds, not the gap claimed. The real gap is on disk: a subagent abandoned before its first Message can no longer be locked by anything, since migration 22 only reached Sessions that have a user Message. Migration 33 locks them by lineage.
- The new authority had no production coverage — its only assertions ran through a test double changed in the same commit.
Two reported findings did not survive verification and were left alone: a claimed `stop` no-op under Host-minted Turn ids (a red test for it passed unchanged — `reconcileUncertainAdmissions` already resolves the candidate before a correction stops it), and a claimed `messageId` collision risk (both call sites mint a fresh identity per send).
Suites: `@maka/runtime` 2916, `@maka/runtime-host` 1274, `@maka/storage` 973, `@maka/desktop` main 1577 — all passing. The one `computer-use-host` failure reproduces on a clean tree and is unrelated.
--
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] fix(runtime): restore automatic Session titles and give the Host the naming effect [maka]
Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han commented on PR #4020:
URL: https://github.com/apache/maka/pull/4020#issuecomment-5439774376
## Adversarial review, round 2
Three more subagents reviewed the branch: one on the round-1 fixes themselves, one on `main...HEAD` as a single change, one end-to-end from the renderer to the Host. Verdict on the whole: **converged** — the third reviewer found no lost behavior and no split authority, and proved the naming trigger by mutation (removing the call in `root-turn-coordinator` turns both end-to-end tests red on `'New Chat'`).
Three findings survived verification; all are fixed in `16236c9a9` and `8605fa7b5`.
**P1 — the side-chat panel could deadlock (newly reachable on this branch).** It treats `outcome_unknown` as a pending admission and waits for a `message_admission` event to name the Turn, but the Host projects that event only for steering Messages, which carry a `steeringEventId`. Previously the only route to `outcome_unknown` there was the busy fallback, which always steered; a first send on an idle fork went through `turn.start` and answered with a Turn id. Submitting instead means a lost answer on an idle fork leaves the panel processing forever, with send and stop both refusing and the composer already cleared. It now reconciles the way WorkHub does — a root Message is materialized before its Run starts, so the transcript names the Turn it opened under the identity the panel sent.
**P2 — naming no longer drains the Host on a failed write.** Round 1 had me raise a failed title persist to `requestDrain()`, which is process-level retirement of every Turn on that Host. Recap drains because it owes a caller an answer it cannot give; naming owes nobody. A busy SQLite or a disk hiccup is not worth retiring a Host that is running work.
**P2 — the conditional title write had no test at all.** A mutation back to an unconditional write left every suite green. `setGeneratedTitleIfAbsent` appeared in no test in the repository; the coordinator's racing-rename test stubs the store out. The Session store now proves all three answers, and a version conflict is re-read rather than reported as "already named".
Deliberately not in this PR: on a busy Session, a Skill that partly or wholly fails to resolve is silent, because the `steering`/`followup` results of `turn.message.submit` carry no `skillInvocation` field. Plumbing it spans the protocol, the message coordinator, the root Turn coordinator and the Desktop — a separate intent, and I'd rather it be reviewed as one.
--
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