Repository navigation
test(cli): cover the tool-episode completion sources - #4372
Merged
Merged
Conversation
The action unit gained `tool-episode`/`tool-episodes` source aliases with no coverage owner, so the CLI interaction oracle reported two uncovered completion-source cells. Declare both in the oracle's completion-source dimension and back them with a per-shell test: prefix completion offers both spellings with the `where` insertion, post-`where` field completion matches the action unit's, and both aliases parse to the same AST as `actions`. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_014BQsaB1NBY8mTR6yZByfMA
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Sinity
added a commit
that referenced
this pull request
Aug 28, 2026
Summary Declare the `tool-episode`/`tool-episodes` completion sources in the CLI interaction oracle and back them with real per-shell completion coverage. Problem `tests/unit/cli/test_interaction_oracles.py` fails on master with `CLI interaction coverage gaps: completion-source:tool-episode, completion-source:tool-episodes`. `QueryUnitDescriptor.source_aliases` gained both aliases for the `action` unit (#4354) without a coverage owner, and no test referenced them (`grep -rn tool-episode tests/` was empty). Solution The two aliases are not a singular/plural duplicate to collapse: every terminal unit declares both spellings, and `query_unit_descriptor` resolves both to the `action` descriptor. So the fix is coverage, not deduplication. - `tests/infra/cli_interaction.py`: add both to `DECLARED_COMPLETION_SOURCES` (owner `test_completion_matrix.py`). - `tests/unit/cli/test_completion_matrix.py`: `test_tool_episode_source_completion_per_shell` asserts, for bash/zsh/fish, that completing `find tool-epi` yields exactly `{tool-episode where , tool-episodes where }`; that field completion after `<alias> where` is non-empty and equal to the `actions` unit's; and that `parse_expression_ast("<alias> where tool:Bash")` equals the `actions` AST. Verification - `devtools test tests/unit/cli/test_interaction_oracles.py` — 9 passed, 1 skipped (was 2 failed). - `devtools test tests/unit/cli/test_completion_matrix.py -k "tool_episode or terminal_completion_contract"` — 6 passed. - `devtools verify --quick` — all gates ok, no `out of sync`. - Anti-vacuity: dropping `"tool-episode"` from `source_aliases` turns the new test red on all three shells (verified, then reverted). Residual Scope is one red family; other master failures are untouched. The field-completion assertion compares against the `actions` unit, so a defect common to both would not be caught — the non-empty assertion on the action baseline bounds that. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_014BQsaB1NBY8mTR6yZByfMA Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Sinity
added a commit
that referenced
this pull request
Sep 1, 2026
Summary Declare the `tool-episode`/`tool-episodes` completion sources in the CLI interaction oracle and back them with real per-shell completion coverage. Problem `tests/unit/cli/test_interaction_oracles.py` fails on master with `CLI interaction coverage gaps: completion-source:tool-episode, completion-source:tool-episodes`. `QueryUnitDescriptor.source_aliases` gained both aliases for the `action` unit (#4354) without a coverage owner, and no test referenced them (`grep -rn tool-episode tests/` was empty). Solution The two aliases are not a singular/plural duplicate to collapse: every terminal unit declares both spellings, and `query_unit_descriptor` resolves both to the `action` descriptor. So the fix is coverage, not deduplication. - `tests/infra/cli_interaction.py`: add both to `DECLARED_COMPLETION_SOURCES` (owner `test_completion_matrix.py`). - `tests/unit/cli/test_completion_matrix.py`: `test_tool_episode_source_completion_per_shell` asserts, for bash/zsh/fish, that completing `find tool-epi` yields exactly `{tool-episode where , tool-episodes where }`; that field completion after `<alias> where` is non-empty and equal to the `actions` unit's; and that `parse_expression_ast("<alias> where tool:Bash")` equals the `actions` AST. Verification - `devtools test tests/unit/cli/test_interaction_oracles.py` — 9 passed, 1 skipped (was 2 failed). - `devtools test tests/unit/cli/test_completion_matrix.py -k "tool_episode or terminal_completion_contract"` — 6 passed. - `devtools verify --quick` — all gates ok, no `out of sync`. - Anti-vacuity: dropping `"tool-episode"` from `source_aliases` turns the new test red on all three shells (verified, then reverted). Residual Scope is one red family; other master failures are untouched. The field-completion assertion compares against the `actions` unit, so a defect common to both would not be caught — the non-empty assertion on the action baseline bounds that. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_014BQsaB1NBY8mTR6yZByfMA Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
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
Declare the
tool-episode/tool-episodescompletion sources in the CLI interaction oracle and back them with real per-shell completion coverage.Problem
tests/unit/cli/test_interaction_oracles.pyfails on master withCLI interaction coverage gaps: completion-source:tool-episode, completion-source:tool-episodes.QueryUnitDescriptor.source_aliasesgained both aliases for theactionunit (#4354) without a coverage owner, and no test referenced them (grep -rn tool-episode tests/was empty).Solution
The two aliases are not a singular/plural duplicate to collapse: every terminal unit declares both spellings, and
query_unit_descriptorresolves both to theactiondescriptor. So the fix is coverage, not deduplication.tests/infra/cli_interaction.py: add both toDECLARED_COMPLETION_SOURCES(ownertest_completion_matrix.py).tests/unit/cli/test_completion_matrix.py:test_tool_episode_source_completion_per_shellasserts, for bash/zsh/fish, that completingfind tool-epiyields exactly{tool-episode where , tool-episodes where }; that field completion after<alias> whereis non-empty and equal to theactionsunit's; and thatparse_expression_ast("<alias> where tool:Bash")equals theactionsAST.Verification
devtools test tests/unit/cli/test_interaction_oracles.py— 9 passed, 1 skipped (was 2 failed).devtools test tests/unit/cli/test_completion_matrix.py -k "tool_episode or terminal_completion_contract"— 6 passed.devtools verify --quick— all gates ok, noout of sync."tool-episode"fromsource_aliasesturns the new test red on all three shells (verified, then reverted).Residual
Scope is one red family; other master failures are untouched. The field-completion assertion compares against the
actionsunit, so a defect common to both would not be caught — the non-empty assertion on the action baseline bounds that.🤖 Generated with Claude Code
https://claude.ai/code/session_014BQsaB1NBY8mTR6yZByfMA