Repository navigation
fix(auto-reply): add localized abort triggers - #181990
alosslessdev wants to merge 1 commit into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Resubmitted from #61075 (test-only #61067 folded in) because the old PR could not be reopened. Changes on this head:
Evidence: I also exercised the production boundary directly with |
Expand the shared abort trigger set with Spanish, French, Hindi, and
Arabic stop phrases plus English "cancel" so users can halt an agent in
their native language. Keep French on computing terms ("abandonner",
"interrompre") and cover every new phrase with positive and negative
detection cases.
ef6ef9b to
1ad34d1
Compare
|
Codex review: blocked before merge. What this changesThis PR adds 23 standalone abort phrases and recognition cases for English, Spanish, French, Hindi, and Arabic. Example: An authorized user sends "बंद करो" during an active Gateway run.
Review scores
ProductKind: Feature · Worth it: Needs a maintainer decision · Fix scope: Complete Merge readiness⛔ Blocked before merge - 2 items remain Keep open for an owner decision on global abort vocabulary; the focused patch has no concrete correctness finding, but prior discussion favors configurable phrases. Priority: P2 Decision needed
Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe shared recognizer classifies normalized inbound text for channel routing, Gateway chat, and TUI cancellation. flowchart LR
A[Channel message] --> D[Shared abort recognizer]
B[Gateway chat] --> D
C[TUI submission] --> D
D --> E[Authorized stop operation]
D --> F[Normal message processing]
E --> G[Session controller]
Technical reviewBest possible solution: Have the feature owner choose whether these phrases belong in global defaults or the configurable-vocabulary direction. Do we have a high-confidence way to reproduce the issue? Current-main source excludes the added phrases, and the contributor's published-release comparison shows बंद करो entering the normal message path; no target code was executed during this read-only review. Is this the best way to solve the issue? Expanding the existing set is the smallest implementation for approved global defaults, but configurable vocabulary better follows the recorded direction and avoids imposing deployment-specific words globally. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a69cf566f908. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +58. Total +58 across 2 files. Added test files: 0. View PR surface stats
LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReviewed October 23, 2026, 8:23 PM ET / October 24, 2026, 00:23 UTC (Revision 3). |
|
Acknowledged, and thanks for the precise review. On the direction question: current We are not asking for the global-default decision to be overridden. If #164870 lands the extension contract, this language set becomes redundant and we are fine with this PR being closed. Until then we would like to leave it open as a fallback for the localized defaults; it is rebased, green on the changed-path checks, and has positive/negative coverage for every entry. If maintainers prefer to close it now and track only #164870, that is fine too — please say so and we will close it ourselves. No further action from our side on the product decision. On proof: the remaining gap is a live channel/Gateway trace. We have not supplied one because it requires bot/channel credentials and a real model run. The supplied evidence covers the owning recognizer boundary ( |
|
Real behavior proof added to the PR body. Summary of the live trace on this head ( Pre-fix comparison on published The v2026.10.6-state upgrade leg is not claimed: this checkout's agent-database activation aborted on plugin-load errors from an @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Upgraded-state proof added. Created a fresh state with published This covers the last proof gap from the previous review: upgraded state, real @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Summary
Resubmission of #61075 (and test-only #61067), rebased on current
mainwith the review findings fixed.ABORT_TRIGGERSset insrc/auto-reply/reply/abort-trigger-text.ts, and matching positive/negative cases insrc/auto-reply/reply/abort.detection.cases.ts./stophandling is untouched.Review findings addressed
"avorter"is not used; French now uses the computing terms"abandonner"and"interrompre"in both source and tests.ABORT_TRIGGERSare covered by the positives list, including capitalization and punctuation normalization throughisAbortRequestText."para ti","no lo hagas ahora","basta de esto","alto el fuego","cancel that meeting").git diff --checkpasses.main(the trigger set moved toabort-trigger-text.tssince the original PR).What Problem This Solves
Abort detection only recognized stop/interrupt words in English plus a few languages, so a Spanish, French, Hindi, or Arabic speaker could not reliably halt an active run by typing a stop command. This PR adds the missing standalone phrases to the shared trigger set so those users can abort in their native language.
Evidence
Focused test on this head:
Direct production-boundary run with
tsx(isAbortTrigger+isAbortRequestText):git diff --checkpasses.Live Gateway trace (fresh isolated state)
Current head running from source with an isolated config/state, the real Gateway
chat.sendingress, and a real model request (opencode-go/deepseek-v4.1-flash). Token and API key omitted.The same run in the Gateway log:
Pre-fix comparison on the published
[email protected]release with a fresh state dir: the same phrase was accepted as normal text instead of aborting ({"runId":"up-old-phrase","status":"started"}).The upgrade leg was also exercised: a fresh state was created by published
[email protected], that Gateway was stopped, and the current head was started on the same state. With existing settings intact:Change Type
Scope
User-visible / Behavior Changes
A message that is exactly one of the added phrases now stops the active run, the same as the existing English/Spanish/Japanese/etc. triggers. Phrases that merely contain one of the words are not affected because matching stays exact.
Security Impact
Yes/No) NoYes/No) NoYes/No) NoYes/No) NoYes/No) NoHuman Verification
"बंद करो"as a secondchat.send; the Gateway returned{"ok":true,"aborted":true,"runIds":["trace2-start-1"]}and loggedagent run aborted/AbortError. A containing sentence ("para ti, what time is it in UTC?") was then accepted as a normal run and answered.[email protected]release accepted the same phrase as normal text (status:"started") on a fresh state dir.pnpm test src/auto-reply/reply/abort.test.ts -t "isAbortTrigger matches standalone abort trigger phrases" --maxWorkers=1->Test Files 1 passed (1),Tests 1 passed | 32 skipped.chat.sendingress.Review Conversations
Compatibility / Migration
Yes/No) YesYes/No) NoYes/No) NoRisks and Mitigations
"para","alto","corta", and"cancel"are consumed as abort requests when sent alone."pare"and the other single-word triggers.