Repository navigation
Leftovers: early line closes on cancel, terminal plain words, no xhigh defaults, deflake ws auth test, #320 dead code - #326
Merged
Merged
Conversation
…t and says status plainly A Manager turn that is cancelled or crashes after its first words now writes a closing row for the same message id (in progress, draft_closed, empty), so the early line no longer stays at the end of the chat after reload. An error reply replaces the draft as any reply does. The web feed drops a closed draft and the closer itself. The terminal merges the early line with the final reply by message id (the reply replaces it, a late draft adds nothing, a closer removes it) and says internal status words and English routing reasons in plain words, from frontend/core/src/plainWords.ts, now shared with the web feed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DEFAULT_LIFE_CONFIG's role efforts were only shown by /config (the run reads the knob), and showed xhigh that never ran; /config now shows the operator's switch or 'by need'. Real fallbacks to xhigh are now high, in line with core.effort_policy: resolve_role_reasoning_effort's default (supervisor, CLI and daemon reviewer paths) and the Planner's runner option. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…th test) On teardown the handler awaited asyncio.gather over helper tasks it had just cancelled. When the server cancelled the handler meanwhile, gather re-raised a helper's anonymous CancelledError, which the server's cancel scope does not recognise, so the connection ended as cancelled and the TestClient raised concurrent.futures.CancelledError (~5% of teardowns under load). Wait with asyncio.wait, which never raises a helper's error, and stop swallowing CancelledError. 1800 stressed teardowns: 0 failures (was ~90). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
api.generateMapCopy (no production caller; the streaming tests now drive the shared explanationResponse through generateReaderFoundation and askReaderFoundation, and its unused signal parameter goes too), map_narrative _prepare_cards/_normalize_reader_brief_shape/_reader_brief/schema with test_reader_brief_shapes.py, map_history.indexed_evidence, and the words prop of MacroTaskNode. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Five leftovers, checked against design/ux-principles.md (rule 1 plain words, rule 3 early words, rule 6 status tells the truth).
1. Early line no longer lingers. When a Manager turn is cancelled or crashes after its first words,
manager_messagewrites a closing row for the same message id (ui.argus,in_progress: true,draft_closed: true, empty text). Every reader that skips drafts (map trace/view) skips it too; old clients see an empty row they already hide. The web feed (dropSupersededDrafts) drops the closed draft and the closer; a later draft under the same id (a retried turn) still shows, and a closer never removes a final reply. An error reply replaces the draft as any reply does, so no closer is written then. Tests:tests/test_effort_policy.py(cancelled, crashed, failed-with-error-reply, replied),conversationEvents.test.ts.2. Terminal.
buildEventLinesmerges the early line with the final reply by message id (the reply replaces it, a draft read back after the reply adds nothing, a closer removes it). Status words (replan_requested, a message ending incontinue) and the host's English routing reason ("Nothing changed since the reviewer last held this work…") are said in plain words before any line is shortened. The wording lives in the newfrontend/core/src/plainWords.ts; the web'splainProgress.tsnow importsplainInternalReasonandSTATUS_TAILfrom there instead of keeping its own copy.3. xhigh defaults.
DEFAULT_LIFE_CONFIG's role efforts were only shown by/config(the run reads the knob) and showed an xhigh that never ran. They are now empty, and/configshows the switch you set or "by need". Two real fallbacks still chose xhigh and now choose high, matchingcore.effort_policy:resolve_role_reasoning_effort's default (used by the supervisor, the CLI and the daemon's reviewer path) and the Planner's runner option.config_snapshotsays "default: by need". Two tests that pinned xhigh are updated.4. Flaky
test_ws_requires_token_when_configured. The cause is real and was reproduced: 1800 stressed teardowns gave about 90concurrent.futures.CancelledError. The stream handler's cleanup awaitedasyncio.gatherover helper tasks it had just cancelled. When the server cancelled the handler at the same moment,gatherre-raised a helper's anonymous CancelledError, which the cancel scope did not recognise as its own. The handler now waits withasyncio.waitand no longer swallows cancellation. After the fix: 1800 stressed teardowns, 0 failures, and the test passed 30 runs out of 30 in a loop.5. Dead code (#320). Removed
api.generateMapCopytogether with the now-unusedsignalparameter ofexplanationResponse. The streaming tests now run throughgenerateReaderFoundation/askReaderFoundation. Also removedmap_narrative._prepare_cards,_normalize_reader_brief_shape,_reader_briefandschema, plustest_reader_brief_shapes.py; the parser tests intest_map_model.pykeep their own small schema. Removedmap_history.indexed_evidenceand thewordsprop ofMacroTaskNode. Every symbol was grepped in web, TUI, frontend/core and Python before deletion. Net change: +67 / −327 lines.Tests. Web: vitest 144 files, 1423 passed; tsc clean. TUI:
npm test302 passed, 0 failed; tsc clean. ruff clean. Release artifacts rebuilt;tests/release_toolspasses. Full Python suite: everything passes except two tests that also fail on origin/dev:test_liveness_operator::test_a_clicked_option_is_acknowledged_in_the_question_s_languageandtest_architecture_invariants::test_private_modules_are_not_imported_across_packages(map_relationsimportslife.delivery._referenced_path_candidates).🤖 Generated with Claude Code