fix(workhub): admit quoted Session names and spoken Chinese stops - #4702
Merged
Conversation
`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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 againstStop itrather 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.answerandworkHub.createSessionare declared on the Desktop bridge, implemented in preload, and handled in the main process, and no renderer code calls either. Answering happens throughact({ disposition: 'answer_here' })and Session creation through thecreate_newdisposition, both served by the Action Gate.This removes the bridge members, their preload implementations, the
workhub:answerIPC handler and the Host client method behind it. Theworkhub.coordination.answeroperation 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/core801 pass / 0 failCompatibility
No wire change and no schema change. The removed bridge members had no callers, and the Host protocol surface is untouched.
AI use
Tool(s) and scope: Claude Code wrote the changes and tests in this PR under human direction and review.
Checklist
Does this PR entail a change in behavior?