Repository navigation
Every CLI result writes itself; watch and tool honour Answer: CliResult - #2774
Conversation
Owner list for what #2762 left: every remaining Any site by file:line and the unannotated-parameter scan, in the PR body. No code yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WatchCliCommand.apply returned an async iterator and InvokeCliCommand.apply a dict, both outside the family's `Answer: CliResult` bound, and each covered the gap with its own `run` override writing output by hand beside CliCommand.written. Writing belongs to the result: - CliResult.write(output) is the one writer. CliCommand.run and the three installer-facing execute overrides call it; CliCommand.written is deleted. - WatchStream(CliResult) owns the JSON-lines stream. WatchCliCommand declares CliCommand[WatchStream]; its run override is deleted. - ToolReplyResult(CliResult) carries the tool protocol reply, unwrapped, as its wire form. InvokeCliCommand declares CliCommand[ToolReplyResult]; its run override is deleted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Touched tests (test_cli, test_watch_claims, test_tools, test_child_process, test_command_families, test_codec_capabilities, test_runtime, test_mcp_acceptance), -p no:xdist: head 7f0b38e 156 passed / 4 failed; origin/main 156 passed / 4 failed; identical failing set (test_command_families normal_history[DmHistoryPageResult-1], test_runtime new_session_metadata_has_a_display_title_before_first_switch, test_runtime subscription_replay_uses_requested_alias[True/False]). None new. |
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
What changed
Two commands broke the CLI family's
Answer: CliResultbound and hid it with their ownrunoverrides:WatchCliCommand.applyreturned an async iterator.InvokeCliCommand.applyreturned a dict.Both wrote output by hand beside
CliCommand.written. Writing now belongs to the result:CliResult.write(output)is the one writer.CliCommand.runand the three installer-facingexecuteoverrides (read-back, store-reconcile, replace-route) call it.CliCommand.writtenis deleted.WatchStream(CliResult)owns the JSON-lines stream.WatchCliCommanddeclaresCliCommand[WatchStream], and itsrunoverride is deleted.ToolReplyResult(CliResult)carries the tool protocol reply, unwrapped, as its wire form.InvokeCliCommanddeclaresCliCommand[ToolReplyResult], and itsrunoverride is deleted.The ratchet already exists
debt-src already runs
AnyNameandUnannotatedParameterintools/debt_ratchet.py. Both are AST-based and counted per file, andMeasure.blocksfails any growth in any touched file, so no new measure is needed.Proof that
AnyNametracks real edits, measured across #2762's merge (f6fad69^1 → f6fad69):AnyNameUnannotatedParameterThe whole −2 is
command.py:17(def apply(self, ctx: Any) -> Any), which is exactly what the diff removed. #2762's report of "42 → 38" counted import lines as uses.Not drained here, with owners
registry_document.py:508: mypy'sreplacecheck types each keyword against its field, so**reusedonly typechecks asAny. The section names come fromFieldCodec.field_plans. The owner of dynamic field replacement isFieldCodec, which Give DM peers one typed encoding, fix stale tests, repin native build #2763 holds.child_process.py:1968:SpawnedProcess.launch(**options: Any)forwards tolaunching. Deriving its signature with a ParamSpec fails under mypy (launchingin the class body has no__func__, andlaunchturns intoAny). The real owner is a declared launch-options record, which touches 31 call sites; that's a slice of its own.This PR leaves both measures unchanged:
AnyNamestays at 39 andUnannotatedParameterat 1642. It fixed two bound violations, notAnysites.Checks run locally
cli_commands.pyandtools.py, ruff counts equal.🤖 Generated with Claude Code