Repository navigation
hooks: rename the local card check to fix the shownText clash on main - #73
Merged
Merged
Conversation
PR #66 added a local async function shownText that checks that the file still has the text the card showed. PR #68 imports shownText from the protocol module for the cut of a run_code result. Together the two give a duplicate name, so hooks/register.tsx does not parse on main. Rename the local function to cardText and keep the import. Raise the version to 0.12.16, because 0.12.15 has the hooks module that does not load. Closes #72
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.
Intent
hooks/register.tsxparses again onmain. The card check from #66 gets the namecardText. TheshownTextimport from #68 stays the same.%%{init: {'theme': 'neutral'}}%% flowchart TD A[Claude Code loads the hooks module] --> B{Does the module parse?} B -->|no, on main| C[Every hook fails to load] B -->|yes, with this change| D{Which action runs?} D -->|Approve or Discard on a card| E{Does the file still have the shown text?} E -->|yes| F[Act on the shown text] E -->|no| G[Refuse and ask for a new review] D -->|run_code returns| H[Cut the result on the shown text]Cause
async function shownText($, path, shown)at line 768. It checks that the file still has the text that the card showed.shownText(json)fromhooks/protocol.tsat line 95. It turns a result into the text that the model sees.Why CI passed on each PR
testrun on its headc6b5ad2was on Oct 22. That run tested amainwithout run_code: cut on the shown text and keep it for recall (#64) #68, and it passed.708ee71passed against amainwithout hints: Approve uses the text shown on the card #66.663b3e5at 09:19 Rome. Thattestrun checked outMerge 663b3e5 into ac84ea9, amainwith hints: Approve uses the text shown on the card #66. Itshooksjob failed with the same parse error (run 40291491079). The merge of run_code: cut on the shown text and keep it for recall (#64) #68 came at 09:20 Rome, with this run red.Evidence
Base:
mainatc664e0c. Branch:harness/ccm-72-shown-text-name-clash. Node 24.22.1, Claude Code 2.1.296, the version that CI pins.claude plugin test .onmain: 176 tests fail, and the run reports one extra failure for the file.The CI log of the
mainrun 40291688357 has the same counts:68 pass,176 fail,Ran 244 tests across 3 files.claude plugin test .on this branch:The named tests of #66 and #68 fail on
mainand pass on this branch:node tests/runner.integration.mjswithEXPECT_NETWORK_BLOCK=1: it passes onmainand on this branch. It runsruntime/runner.mjsand does not load the hooks module. The CI jobsubuntu-latest node 22.13,ubuntu-latest node 24andmacos-latest node 24also passed onmain.The checks on this branch:
The full type check and
/verifyneed a Claude Code session that is logged in. They did not run here. CI does not run the full type check.Closes #72