Skip to content

fix(workhub): admit quoted Session names and spoken Chinese stops - #4702

Merged
ARE404 merged 3 commits into
apache:mainfrom
ARE404:feat/workhub-retire-dead-paths
Sep 4, 2026
Merged

fix(workhub): admit quoted Session names and spoken Chinese stops#4702
ARE404 merged 3 commits into
apache:mainfrom
ARE404:feat/workhub-retire-dead-paths

Conversation

@ARE404

@ARE404 ARE404 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Three independent WorkHub fixes, each self-contained.

Two of them are user-facing bugs where a request was not just missed but acted on as something else.

1. A quoted Session name refused the request

Create a new Session called "Payments" resolved as non-executable, while the same sentence without quotes was admitted. Quoting the name is the natural way to write it, so naming a Session by quoting it did not work at all, in either language.

The intent reader masks quoted spans before the text is read for commands, so a quoted word can never be mistaken for one. The title is the one place quotes mark the object rather than hide a command, and the caller already resolves it from the unmasked source; the imperative check was re-deriving it from masked text, where every quoted title reads as unusable, and refusing on that. It now takes the caller's verdict. The mask still decides everything else — a question, a hedge, a negation and an unterminated quote are all refused as before, which the test pins alongside the four sentences that now work.

2. A spoken Chinese stop was not read as a stop

停掉支付任务 carried no stop cue at all. The Chinese pattern matched only the written verbs 停止 / 取消 / 终止 / 中止, so the most ordinary spoken form fell through to routing and was delivered to Payments as new work: asking to stop it started more of it.

停掉 and 停下 are the spoken forms of 停止. English already covers its own range with stop / cancel / terminate / halt, so this restores the same range rather than claiming a wider one. 关掉 stays out — it reads as "switch off", which is usually work to do inside a Session, and English admits no equivalent. Anaphora now behaves as it does in English: 停掉它 reads the cue and claims no target, so the surface asks which work instead of guessing. The test pins that against Stop it rather than restating the shape, so the two languages cannot drift apart. A cue alone still stops nothing — the reference must resolve to a real Session, which is what keeps 停掉这个定时器 ordinary work.

3. Bridge surface with no callers

workHub.answer and workHub.createSession are declared on the Desktop bridge, implemented in preload, and handled in the main process, and no renderer code calls either. Answering happens through act({ disposition: 'answer_here' }) and Session creation through the create_new disposition, both served by the Action Gate.

This removes the bridge members, their preload implementations, the workhub:answer IPC handler and the Host client method behind it. The workhub.coordination.answer operation stays: it is a Host protocol contract with a live server implementation, and retiring it is a wire change with its own epoch, not a consequence of the renderer being silent.

Verification

Each fix carries a regression that fails on the old behaviour: reverting the production change turns the corresponding test red, verified for both bugs.

Run locally, all green:

  • npm run build, npm run typecheck, npm run lint, npm run format:check, npm run check:asf-headers
  • @maka/core 801 pass / 0 fail
  • Desktop WorkHub controller 72 pass / 0 fail
  • Runtime Host WorkHub suites 65 pass / 0 fail

Compatibility

No wire change and no schema change. The removed bridge members had no callers, and the Host protocol surface is untouched.

AI use

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: Claude Code wrote the changes and tests in this PR under human direction and review.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — two refused requests are now admitted, and one unused bridge surface is removed
  • No

Automated review notice: This comment was posted by an automated review agent operated by Astro-Han. It is not an independent human review and does not replace one.

`workHub.answer` and `workHub.createSession` are declared on the Desktop
bridge, implemented in preload, and handled in the main process, and no
renderer code calls either. Answering happens through
`act({ disposition: 'answer_here' })`, which the Gate serves, and Session
creation through the `create_new` disposition the Gate is the only path to.

This removes the bridge members, their preload implementations, the
`workhub:answer` IPC handler, and the Host client method behind it. The
`workhub.coordination.answer` operation stays: it is a Host protocol
contract with a live server implementation, and retiring it is a wire
change with its own epoch, not a consequence of the renderer being silent.

Generated-by: Claude Opus
`Create a new Session called "Payments"` was refused as non-executable
while the same sentence without quotes was admitted. Quoting the name is
the natural way to write it, so naming a Session by quoting it did not
work at all, in either language.

The literal mask blanks quoted spans before the text is read for commands,
so a quoted word can never be mistaken for one. The title is the one place
the quotes mark the object rather than hiding a command, and the caller
already resolves it from the unmasked source. The imperative check was
re-deriving it from masked text instead, where every quoted title reads as
an unusable one, and refusing on that.

It now takes the caller's verdict. The mask still decides everything else:
a question, a hedge, a negation, or an unterminated quote is refused as
before, which the test pins alongside the four sentences that now work.

Generated-by: Claude Opus
`停掉支付任务` carried no stop cue at all. The Chinese pattern matched only
the written verbs 停止 / 取消 / 终止 / 中止, so the most ordinary spoken form
fell through to routing and was delivered to Payments as new work: asking
to stop it started more of it instead.

`停掉` and `停下` are the spoken forms of `停止`. English already covers its
own range with stop / cancel / terminate / halt, so this restores the same
range rather than claiming a wider one. `关掉` stays out — it reads as
"switch off", which is usually work to do inside a Session, and English
admits no equivalent.

Anaphora now behaves the way it does in English: `停掉它` reads the cue and
claims no target, so the surface asks which work instead of guessing, and
the test pins it against `Stop it` rather than restating the shape. A cue
alone still stops nothing — the reference must resolve to a real Session,
which is what keeps `停掉这个定时器` ordinary work.

Generated-by: Claude Opus
@github-actions github-actions Bot added the effort/M Under 500 readable lines label Sep 4, 2026

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM.

@ARE404
ARE404 merged commit 26f31de into apache:main Sep 4, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/M Under 500 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants