Repository navigation
fix(score): count a skill read that may not have run only when its output shows it - #1358
Merged
Merged
Conversation
…tput shows it A SKILL.md read named in a longer command line after `&&` or `||`, or in any command of a Codex code-mode script, may never have run: `false && cat .claude/skills/review/SKILL.md; true` and an `exec_command` under `if (false)` were both credited. Such a read now counts only when the call's output shows the skill's frontmatter `name:` line, as a whole line, in raw, `cat -n` or JSON-escaped form. Scoring replays each recorded call with its output, as the live hook receives it. A code-mode script's output covers all its commands, so it confirms their reads but is not read as any one command's diagnostics.
Code Erosion ReportInformational — never blocks the merge.
Scanned 431 files / 97063 SLOC · high-CC functions 760/8524 * On TypeScript, Rule hits (TS verbosity layer)Standalone
66 distinct lines flagged across |
|
No findings in the specified diff.
|
4 of 9 tasks
jeff-r2026
approved these changes
Oct 24, 2026
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
used.skillscredited aSKILL.mdread that never ran: one a longer command line names after&&(false && cat .claude/skills/review/SKILL.md; true), or anytools.exec_commandin a Codex code-mode script, including one underif (false). Such a read now counts only when the call's output shows the skill's frontmattername:line. Follow-up to #1298, where review raised both cases.name:line must be a whole line, raw, numbered bycat -n, or JSON-escaped the way code mode prints a command's result. An inlinedescription: "name: review"does not count.Type of Change
Test Plan
npx tsc --noEmitpassesnpm run lintpassesnpx vitest runpasses: 536 files passed, 1 skipped. 15412 tests passed, 21 skipped.npm run build,npx tsc --noEmit,npm run lint, and the touched tests atc6011a0anpm run test:e2e -- score-session score-external-driver workflow-records-reports-branch-1083mainfalse && cat FILE; truewith empty output;test -f /missing || cat FILE; truewhose output shows the skill; a Codexexec_commandskipped after&&; a code-mode call underif (false)mainand guard the rule&&that printed the skill; an inlinename:in a description; a compound read and acat -nread inside code mode, printed as JSON; a code-mode read followed by another command'scat: <same path>: No such file or directoryReal CLI, after
npm run buildatmain(fb17c488) and at this head (c6011a0a):teamai score --sessionon a Codex rollout copied from a real session, plus one call naming.codex/skills/wayfinder/SKILL.md, a team skill the session's checkout delivered, relative to itsworkdir.poteto-modeis a load the copied session made itself.used.skillsonmainused.skillsat this headexec_commandfalse && cat … ; true, empty outputif (false), outputdonesed …\nrg …, printed as JSONNot run here: a live Codex PostToolUse hook. Codex CLI 0.163.0 lists
tool_responsein its PostToolUse input, and the unit tests use that shape. Other agents and thegitlabandgithubproviders are left to CI.Related Issues
Follow-up to #1298: #1298 (comment)
Notes for Reviewers
used.skillson session and workflow labels. A read only a longer command line names now needs output: a partial read below the frontmatter (sed -n '20,40p'), output a tool truncated before thename:line, or a hook that sends no output no longer credits it. Single reads, the Skill tool and the Read tool are unchanged.namedReadsdrops its||exclusion, since the output check covers it.