Skip to content

Hooks: Muse's owed reads of #643 and #652, a nested backtick's comment is tested and the spelt reading asks about a session - #671

Open
don-petry wants to merge 2 commits into
mainfrom
hooks/muse-reads-643-652
Open

don-petry wants to merge 2 commits into
mainfrom
hooks/muse-reads-643-652

Conversation

@don-petry

@don-petry don-petry commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

The follow-on under the merged-early rule: Muse could not read #643 or #652 before they merged (quota). These are its reads, done after the merge, and what they found.

The protected edits to tools/hooks/ are pre-approved by the Maintainer 2026-11-08, ruled by the Factory Builder. Hooks are mistake guards (decision 0038's triage rule), and this PR is held to that standard.

What changes

From Finding Now
Muse on #643 The line in shell._inside that ends a nested backtick at a comment's backtick had no test that killed it echo "$(echo "echo #"" "${?+'…'}")" holds it, with a mutant
Muse on #643 Two more lines with no killing test: braces reset entering a nested substitution, and restored leaving it No test can reach them from _held. A ${...} in a held substitution is refused at its start or skipped whole, so _inside never begins inside a nested substitution with braces open. Left as they are
Muse on #652 The protected hook's second, spelt reading never reached sessions(), so a Claude Code session after a nested substitution went unasked Asked about, with a test and a mutant
Muse and the Claude review of this PR With $(which claude) anywhere in the command, sessions() read the rewritten text flat, whatever reading it was given The spelt reading reads it spelt, with a test and a mutant
Muse on #652 A spelt reading that fails drops it whole; past 8 KB it is skipped Both evasion only, the same as main before #652: #665's items (a) and (b)

Decision 0032 gains one row, naming three mutants.

Checks

  • tests/test_hooks.py::test_a_substitutions_own_quotes_are_read_as_the_shell_reads_them and ::test_a_double_quoted_substitution_in_a_double_quoted_one_hides_no_command_after_it gain the cases.
  • At bd4834d: make verify passes, check_decisions is clean, and the mutants of tools/hooks/shell.py, identity.py and protected.py are all killed (38 at 237592d, 18 again at bd4834d).

Reviews

Reader Findings Disposition
Argon (gemini-4-argon-high) None —
Muse (muse-wonder-full-1.0) 1, the $(which claude) gap, marked blocking; not a regression Fixed in bd4834d
Claude review and security pass Nothing major. The same $(which claude) gap, the same on main Fixed in bd4834d. Two cosmetic points: a session the second reading finds with a backtick asks command_unreadable, as main does at the top level, and one prompt can list that code twice. Left as they are

All read 237592d. bd4834d is the fix.

🤖 Generated with Claude Code

View guided diff Turn on auto-fix

don-petry and others added 2 commits November 8, 2026 21:57
…tick is tested and the spelt reading asks about a session

Muse read #643 and #652 after they merged (the merged-early rule). On #643: the line that ends a nested
backtick at a comment's backtick had no test that killed it; the spelling `echo "$(echo "`echo #"`" ...)"`
now holds it, with a mutant. Its two other findings, braces reset and restored across a nested
substitution, cannot be reached from _held: a ${...} in a held substitution is refused at its start or
skipped whole, so _inside never begins inside a nested one with braces open. On #652: the protected hook's
spelt reading never reached sessions(), so a Claude Code session after a nested substitution was not
asked about; it is now, with a test and a mutant. Its two evasion-only findings are #665.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ons read the rewritten text spelt (Muse, the review)

sessions() read a text WHICH rewrote flat, whatever reading it was given, so with $(which claude) anywhere in the
command the spelt reading's session after a nested substitution went unasked. It reads it spelt for the spelt
reading, with a test and a mutant. This closes #665's item (c).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@don-petry
don-petry requested a review from a team as a code owner November 9, 2026 05:37
@coderabbitai

coderabbitai Bot commented Nov 9, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-09T05:37:52.171674Z
We couldn’t complete this review. Comment @codex review to try again.
bd4834d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@sonarqubecloud

sonarqubecloud Bot commented Nov 9, 2026

Copy link
Copy Markdown

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant