Skip to content

fix(performance): drop the one-tool pointer from target's counter rule - #17081

Merged
kyle-sexton merged 1 commit into
mainfrom
fix/16767-target-cachegrind-pointer
Nov 18, 2026
Merged

kyle-sexton merged 1 commit into
mainfrom
fix/16767-target-cachegrind-pointer

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Closes #16767
Siblings: #16811

Summary

The last undelivered half of row F0311 (R11): /performance:target's counter rule still named "Valgrind's Cachegrind manual; Iai" as its source and carried a - **Pointer** bullet to the Cachegrind manual's Overview. ADR 0101 excludes one tool's documentation from the Source citation class (its 2026-11-16 amendment: "no link to one tool's documentation, in a skill body or reference file"), so both go. PR #16811 delivered the other four rows and the README half of F0311.

Row count: 1 (F0311, R11, K5, its target/SKILL.md half). Whole page or part: part of one page; no whole-page deletion.

Left out on purpose: plugins/performance/reference/techniques.md:385 still points at the Cachegrind manual's "Running cg_annotate" section (definition at :847). It is outside #16767's five rows, so it is not cut here.

Fix

  • plugins/performance/skills/target/SKILL.md ("Name the counter, not just the duration"): the sourcing parenthetical and the Pointer bullet are removed. The rule stays in our words: counts over wall clock is established practice only for instruction counts; extending it to spawns, syscalls and queries is this plugin's own generalization; a counter is reproducible, never more truthful, because the duration is what a user feels.
  • .changes/performance/fix-16767-target-cachegrind-pointer-d6381133.md: patch fragment.

PR #16898 (for #16856) added the Overview pointer when it restated this paragraph as our own rule. Removing the pointer still meets #16856's done-when, since the rule and its reason stay in our words.

Eval cases that read the cut text

  • target (F0311): the eval ran one case written new for it, p17081-ta-counter-basis, a rules-only port of target/evals/evals.json case 5 (names-the-counter-and-labels-the-generalization), which grades the edited paragraph directly but is skill-creator format and does not run under claude plugin eval. Porting it was an agent-made choice. The existing runnable case ta-ranks-by-evidence-tier was not used: none of its four graders (Tier and Counter columns, E1 first, WDAC at E4, recommendation on E1) depends on the edited paragraph, so it could not observe the cut. No grader of the new case names Cachegrind, Iai or a link.

Verification

  • scripts/check-affected.sh: 17 passed, 2 skipped (no changed shell or Python), 0 failed over 2 changed files.
  • scripts/check-changelog-fragments.sh --check: all 35 fragments valid.
  • Script-reader search: git grep -n 'performance/skills/target' origin/main finds scripts/vocabulary-senses.json:148 and scripts/test_check_vocabulary.py:583-584, which concern the word "tier", not the edited paragraph; git grep -n 'cg-manual' origin/main finds no baseline or allowlist entry for the removed link.
  • plugins/performance/skills/target/evals/evals.json case 5 (names-the-counter-and-labels-the-generalization) still matches the new text: spawns as the counter, reproducible not more truthful, own generalization grounded only for instruction counts, the duration is what users feel. No eval file changed.
  • Targeted before-and-after eval verdict, run by an agent session after this pull request opened (sonnet, 3 runs a side, before 652dfef8c261793e6fdfdbd8811fba2f6b911ea8, the merge base, after a233a68634683252260bbaf0728537fd7393ea6f; validity VALID; the batches counted no denied call; cost 0.50 USD; full record: fix(performance): drop the one-tool pointer from target's counter rule #17081 (comment)): target case p17081-ta-counter-basis PASS (mean case score 0.867 before, 1.000 after; caveat-user-feels passed 1/3 before and 3/3 after, every other grader 3/3 on both sides). Overall PASS. Measured row: F0311 (skills/target/SKILL.md, loaded with the skill).

Not verified

Related

🤖 Generated with Claude Code

/performance:target still named Valgrind's Cachegrind manual and Iai as the
source of its counts-over-wall-clock rule and pointed at the manual's
Overview, which ADR 0101 rules out as a source citation (one tool's
documentation). The rule stays in our words: established practice for
instruction counts, this plugin's own generalization for spawns, syscalls
and queries, and reproducible, never more truthful, with its reason.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton kyle-sexton added the do-not-merge Hard merge gate: do not merge while applied. label Nov 18, 2026
@kyle-sexton

Copy link
Copy Markdown
Member Author

Held for its eval: #16767 is a cut item, so its before/after eval runs after this PR (D367). A session runs it and posts the eval-pair record for the current head. The pr-merge sweep removes this hold once that record is posted (release-eval-hold.mjs).

@kyle-sexton

Copy link
Copy Markdown
Member Author

Targeted eval result: PASS

One targeted case per changed skill, run on the old text (before) and the new text (after), on sonnet at 3 runs a side, Claude Code 2.1.327 (Claude Code).

What this gate checks: that the new text does no worse than the old on these cases. By the owner's decision of 2026-11-17 the gate is this no-loss compare alone. There is no wrong-text side, so this case set has not been shown to detect wrong text: a PASS says the cases did not get worse, not that they would have noticed a bad edit.

Scope: pure cut of the SKILL.md half of one R11 row in performance, part of a page: F0311, skills/target/SKILL.md 'Name the counter, not just the duration' loses '(Valgrind's Cachegrind manual; Iai)' as the named source of the counter rule (the sentence now reads 'established practice only for instruction counts') and the Pointer bullet to the Cachegrind manual's Overview. The rule and its reason stay. Measured: F0311 by the ported rules-only case p17081-ta-counter-basis (target skill); SKILL.md is loaded through the Skill tool, so the row is exempt from the opened-in-2-of-3 line. Its graders check what the kept paragraph says (instruction counts as the established basis, spawns as the plugin's own generalization, reproducible, the duration is what a user feels), never a source name. Unmeasured: none by row; the README half of F0311 was delivered by PR 16811 and is not in this PR.

  • Ported case p17081-ta-counter-basis (agent-made choice): a reworded copy of skills/target/evals/evals.json case 5 (names-the-counter-and-labels-the-generalization), skill-creator format, which does not run; the prompt keeps case 5's ask, adds the rules-only limits and ends with BASIS and CAVEAT lines; its five regex graders replace case 5's free-text expectations. The existing runnable case ta-ranks-by-evidence-tier was not used: its graders read the tier table and ranking, none the edited paragraph.

  • Unmeasured rows: none.

  • Control result (the issue's acceptance item): not run: the owner's decision of 2026-11-17 gates cut pull requests on the no-loss compare alone.

  • Before: 652dfef8c261793e6fdfdbd8811fba2f6b911ea8 (merge base with main)

  • After: a233a68634683252260bbaf0728537fd7393ea6f (pull request head; live head when this was written: a233a68634683252260bbaf0728537fd7393ea6f)

  • Loss: the mean case score falls by 0.15 or more, or any one grader passes in 2 or more fewer after runs than before runs.

Passing runs per grader, per side:

Case Grader Before After
p17081-ta-counter-basis counter-column 3/3 3/3
p17081-ta-counter-basis basis-instruction-counts 3/3 3/3
p17081-ta-counter-basis basis-own-generalization 3/3 3/3
p17081-ta-counter-basis caveat-reproducible 3/3 3/3
p17081-ta-counter-basis caveat-user-feels 1/3 3/3
p17081-ta-counter-basis mean case score 0.867 1.000

Graders that cannot show a loss, because they failed on the old text in every run:

  • none: every grader passed in at least one run on the old text

Changed files the compare runs opened, per case and side:

  • p17081-ta-counter-basis before: opened no changed file in 3 runs
  • p17081-ta-counter-basis after: opened no changed file in 3 runs

Rows these runs measured (the row's file opened in at least 2 of 3 runs on each side, or loaded with the skill or agent):

  • F0311 (skills/target/SKILL.md, case p17081-ta-counter-basis): measured; the file is loaded with the skill or agent, never opened, so no open count applies

Rows these runs did not measure:

  • none

Verdicts:

  • verdict p17081-ta-counter-basis (target): PASS (no loss: after 1.000, before 0.867)

Cost: 0.50 USD (smoke and compare, the runs' costUsd).

The cases live outside the repository; their full text:

The 1 cases: prompt.md and case.yaml

p17081-ta-counter-basis

prompt.md:

---
description: "Routine case. Source: reworded port of plugins/performance/skills/target/evals/evals.json case 5 (names-the-counter-and-labels-the-generalization), written for PR 17081 (cuts the SKILL.md half of F0311: the Cachegrind manual and Iai as the named source of the counter rule, and the Pointer bullet to the Cachegrind manual's Overview, in 'Name the counter, not just the duration'). Rules-only: asked for the ranked table and why counting spawns beats timing them, the reply ends with BASIS and CAVEAT lines. Graders check what the kept paragraph says (counts over time is established for instruction counts only; spawns are this plugin's own generalization; a counter is reproducible, the duration is what a user feels), never a source name. No transcript; it ends before anything runs."
tags: [performance, target, counter, rules-only, routine]
plugins: ["../.."]
max_turns: 10
timeout_seconds: 420
allowed_tools: [Skill, Read, Glob, Grep]
expected_outcome: "A ranked table with a counter column naming process spawns for the hook chain, then a BASIS line saying counts over wall clock is established for instruction counts and that applying it to spawns is the plugin's own generalization, and a CAVEAT line saying the count is reproducible, not more truthful, since the duration is what a user feels."
---

/performance:target the pre-tool hook chain: a census attributes 4 spawns per tool call to it. Give me the ranked table, and tell me why counting spawns beats timing them. Answer from the skill's guidance; you can read its own files, but don't look anything up online or run anything. End your reply with these two lines:

BASIS: <what backs preferring a count over a time, and how far that backing reaches>
CAVEAT: <what the count can and cannot claim compared with the time>

case.yaml:

schema_version: "1.1"
name: p17081-ta-counter-basis
graders:
  - name: counter-column
    type: regex
    pattern: '^\|[^\n]*\bCounter\b[^\n]*\|'
    flags: 'mi'
    target: last_message
  - name: basis-instruction-counts
    type: regex
    pattern: '^\W*BASIS:[^\n]{0,240}\binstructions?\b'
    flags: 'mi'
    target: last_message
  - name: basis-own-generalization
    type: regex
    pattern: '^\W*BASIS:[^\n]{0,240}\b(?:generali[sz]ation|generali[sz]es|generali[sz]ing|extension|extends?|extending)\b'
    flags: 'mi'
    target: last_message
  - name: caveat-reproducible
    type: regex
    pattern: '^\W*CAVEAT:[^\n]{0,240}\breproduc\w*'
    flags: 'mi'
    target: last_message
  - name: caveat-user-feels
    type: regex
    pattern: '^\W*CAVEAT:[^\n]{0,240}\b(?:feels?|felt|perceiv\w*|perception|experienc\w*)\b'
    flags: 'mi'
    target: last_message

Posted by an agent session.

@kyle-sexton

Copy link
Copy Markdown
Member Author

This pull request's hold waits only on its eval record. This comment restates the hold reason on its own line so the pr-merge release step can read it.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

The do-not-merge hold waited only on eval evidence (reason=eval), and a listed human posted a VALID no-loss eval-pair record for a233a68634683252260bbaf0728537fd7393ea6f: #17081 (comment). pr-merge removed do-not-merge. To hold again, add the label back with a new pr-hold reason line.

@melodic-automation-lanes melodic-automation-lanes Bot removed the do-not-merge Hard merge gate: do not merge while applied. label Nov 18, 2026
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 18, 2026 11:12
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T11:14:22.978067Z a233a68 Draft marked ready
ℹ️ 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.

@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed a233a68634683252260bbaf0728537fd7393ea6f: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Security review: no security issues found.

I read both changed files in full:

  • plugins/performance/skills/target/SKILL.md: the counter-rule paragraph drops the "Valgrind's Cachegrind manual; Iai" source parenthetical and the - **Pointer** bullet that told the session to fetch the Cachegrind manual's Overview page live. The rule and its reason stay. Counts over wall clock is still called established practice only for instruction counts, extending it further is still labelled the plugin's own generalization, and a counter is still "reproducible, never more truthful".
  • .changes/performance/fix-16767-target-cachegrind-pointer-d6381133.md: a new patch changelog fragment, prose only.

Instruction-surface check. The diff softens a standing skill body, so I read it under that lens instead of skipping it. The only removed instruction is a prompt to fetch one external documentation URL. It guarded no protected action: it did not gate, confirm, cap or deny anything. Removing it lets nothing new reach an action. It also removes one outbound fetch of external content, which slightly narrows what outside text enters the session. The rule that stays is unchanged in what it says. docs/contracts/instruction-exception-register/README.md was not opened, so I judged by consequence only: the removed text is a reference pointer, not a guardrail.

Other surfaces. Neither file matches a trusted-path glob or a trust control. No plugin manifest, workflow, hook, script, token request or merge-hold file changed. The PR context file contains no embedded instruction aimed at this lane.

Spend. The eval run named in the PR description (0.50 USD on prepaid API credit) already happened and is not caused by this diff.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed a233a68634683252260bbaf0728537fd7393ea6f: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Code review: no findings

The PR removes the leftover Cachegrind sourcing from /performance:target's counter rule, which is the target/SKILL.md part of row F0311 in #16767. It drops the "(Valgrind's Cachegrind manual; Iai)" parenthetical and the - **Pointer** bullet. The rule and its reason stay in the plugin's own words: counters are "reproducible, never more truthful", and spawns, syscalls and queries are still labeled as the plugin's own generalization.

What I checked:

  • The edited section (plugins/performance/skills/target/SKILL.md L110-123 at head) reads cleanly. Nothing refers to the removed bullet, and the paragraph still connects to the counter-catalog link above it.
  • Remaining mentions in the plugin. A search under plugins/performance finds one other Cachegrind mention: reference/techniques.md:385, with its link definition at :847. The PR body excludes it on purpose because it is outside Cut the model-read ecosystem specifics from performance #16767's five rows. README.md has no Cachegrind mention left, which fits the PR's statement that fix(performance): cut model-read ecosystem specifics (5 rows) #16811 delivered the README part.
  • Closing issue Cut the model-read ecosystem specifics from performance #16767. Its outcome ("each listed row's cited text is gone or replaced by generic text") is met for this part of F0311. The other rows are recorded as delivered by sibling PR fix(performance): cut model-read ecosystem specifics (5 rows) #16811; I did not re-verify that here. The search, eval-case and whole-or-part statements the issue's steps ask for are in the PR body. The eval verdict and the scripts/check-affected.sh results are the author's claims; I did not run them.
  • Changelog fragment. bump: patch under ### Removed fits a doc-only cut from a skill body.
  • Path-scoped rules. .claude/rules/skill-bodies-state-current-rules.md and cost-claims.md both match the changed SKILL.md. The new text states the current rule and makes no cost claim, so neither is broken.
  • Loosened checks. No check, test, threshold or allowlist changed. Loosened-check verdict: fail (default; the wrapper supplied no loosened_check_verdict/patterns lines); patterns: 0.
  • Prior findings: none, and this was not a blocking-only review. No settled-threads file was supplied. I found no embedded instructions in the PR context.

Verifier dropped 0 of 0 candidates.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 18, 2026
Merged via the queue into main with commit c3d0935 Nov 18, 2026
154 of 157 checks passed
@kyle-sexton
kyle-sexton deleted the fix/16767-target-cachegrind-pointer branch November 18, 2026 11:56
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cut the model-read ecosystem specifics from performance

1 participant