Skip to content

test(plugin-profiles): accept the per-hook question however the per-profile choice is worded - #16556

Merged
kyle-sexton merged 3 commits into
mainfrom
fix/16434-per-hook-regex
Nov 16, 2026
Merged

kyle-sexton merged 3 commits into
mainfrom
fix/16434-per-hook-regex

Conversation

@kyle-sexton

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

Copy link
Copy Markdown
Member

Refs: #16434

Summary

The per-hook-question-asked grader in plugin-profiles' setup-asks-per-hook-plugin-and-saves-user-profile eval failed a live headless session that did what #16434 asks. The session asked "Should notes-hooks@fixture-market (the jot skill and its hooks) be always on, or only on in the profiles that name it?" and put "per profile" in the option labels under the question. The pattern only accepted "per profile" inside the question sentence.

Fix

  • The pattern in case.yaml now accepts the per-profile choice worded as per profile, per-profile, "only on in the profiles …" or "only by some profiles …" in the question sentence. It also accepts an always-on-or question followed, within the five lines directly under it, by an option-list line (-, * or a number and a dot, then optional **) that starts with per profile or per-profile. "Per profile" in prose under the question does not count.
  • It still requires a reply that names notes-hooks and ends the always-on choice on a ?. A reply that names both choices without asking still fails.
  • Samples in samples/per-hook-question-asked.json:
    • New pass sample: the live reply, trimmed.
    • New pass sample: the per-profile choice worded as "only by some profiles".
    • New pass sample: "per profile" only in the options directly under the question; only the option-list branch accepts it.
    • New fail sample: both choices named, no question.
    • New fail sample: an "always on or off?" question with "per profile" only in the prose under it.
    • New fail sample: a per-profile option on the seventh line, six lines under the question.
    • The earlier fail samples are unchanged and still fail: the empty reply, the up-front "per profile, not always on" reply, the guessed answer, the different question, and the question about draw.
  • Changelog fragment: bump: none, since only an eval changes.

Verification

  • Test first: with the new pass samples added and the old pattern in place, validate-cases.py plugins/plugin-profiles/evals failed them, under both the Python and JavaScript engines. With the new pattern it exits 0: every sample gives its expected result under both engines. The only output is WARN lines about allowed_tools, which come from the case prompts and are not new.
  • The option-list branch is needed: with it broken in a scratch copy, validate-cases fails only the options-only pass sample.
  • The two new fail samples both pass the previous pattern (validate-cases exit 1 on them) and fail the current one.
  • The window is five lines: an option-list line five lines under the question matches, six lines under does not.
  • Re-grading the live turn-1 transcript with the new case.yaml: per-hook-question-asked (regex): PASS; pattern found. The same transcript gave FAIL; pattern not found under the original pattern.
  • check-changelog-fragments.sh --check-required origin/main and --check pass, and pre-push check-affected passes.

Related

🤖 Generated with Claude Code

https://claude.ai/code/session_015XWwmdCmAR8kz5HUzUvWB4

…rofile choice is worded

The per-hook-question-asked grader needed "per profile" inside the
question sentence. The live headless session asked "Should
notes-hooks@fixture-market (the jot skill and its hooks) be always on,
or only on in the profiles that name it?" and put "per profile" in the
option labels under it, so the grader failed a reply that did what the
case asks. The pattern now also takes "only on in the profiles" or
"only by some profiles" wording in the question, or a "per profile"
option within the lines directly under it. It still requires a question
and still requires notes-hooks. The live reply, trimmed, is a pass
sample, and every earlier fail sample still fails, plus one new one
that names both choices without asking.

Refs: #16434

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015XWwmdCmAR8kz5HUzUvWB4
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 16, 2026 15:51
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 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-16T15:53:07.003297Z 4cd998c 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

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

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

No security issues found in this push. This review covered only what changed since e0bfd7b3, and because this lane already reviewed an earlier head, it reported blocking findings only.

The push changes two files, and I read every hunk of both:

  • plugins/plugin-profiles/evals/setup-asks-per-hook-plugin-and-saves-user-profile/case.yaml changes one regex in the per-hook eval grader. The third branch used to accept the words "per profile" on any of the next six lines after the question. It now accepts them only on a list line (starting with -, * or a number) within the next five lines.
  • plugins/plugin-profiles/evals/setup-asks-per-hook-plugin-and-saves-user-profile/samples/per-hook-question-asked.json adds two samples the grader should reject.

Both files are eval test data. The regex only scores model output inside the eval harness. It controls no trust check, merge hold, token scope or lane input, and nothing in it ships to users. Neither file matches a trusted-path glob. The push changes no plugin manifest, workflow, standing instruction or anything that costs money. The rest of the pull request is unchanged since the earlier review, which found nothing.

critical-findings: 0

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on 4cd998c21cb13630436fc0eccd9815b54d240394; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

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

Code review: PR #16556 (incremental, blocking only)

This lane already reviewed an earlier head of this PR, so this review reports blocking findings only. I found none.

Scope: two files changed since e0bfd7b3. I read every hunk of both in the incremental diff:

  • plugins/plugin-profiles/evals/setup-asks-per-hook-plugin-and-saves-user-profile/case.yaml
  • plugins/plugin-profiles/evals/setup-asks-per-hook-plugin-and-saves-user-profile/samples/per-hook-question-asked.json

For context I also read the whole sample file at head.

What changed:

  • Narrower third branch. The third branch of the per-hook-question-asked pattern now matches only an option-list line (-, * or N., then optional **) that starts with per profile or per-profile, at most five lines under the question ({0,4}? lines in between). Before, it matched per profile anywhere in any of the six lines under the question.
  • Two new fail samples. One has per profile only in the prose under the question. The other has the option six lines under the question.

Checked by hand against the head pattern. I have no shell, so I did not run validate-cases.py. The PR's verification results are author-claimed and unverified.

  • Every pass sample still passes.
    • Samples 1–5 match branch 1 or 2.
    • The live reply also matches the new branch 3, through - **Per profile, left out….
    • Sample 6 (…loaded with the profiles you pick?\n- Always on\n- Per profile) matches only branch 3: one line in between, then - Per profile under the i flag.
  • The new fail sample …always on or off?\nIf you would rather load it per profile… fails. The per profile before ? that branches 1 and 2 need is missing, and branch 3 needs a list marker that If doesn't have. The old pattern accepted this reply, so the narrowing is what the sample covers.
  • The new fail sample with the option on line 7 fails. It would need five lines in between, and {0,4} allows four. Widening the bound to {0,5} would make it pass, so the sample pins the window's upper bound. Its why ("seventh line, six lines under the question") counts the lines correctly.
  • The earlier fail samples still fail. The branch only got narrower, so no fail sample can gain a match.

Prior findings and settled threads: the earlier inline finding (third-branch coverage) is resolved, and its settled thread is marked lines changed since resolution: no. This push doesn't reopen it: sample 6 still reaches only branch 3 under the narrower form. I found no embedded instructions in the PR context, settled-threads or prior-findings files.

No plugin manifest changed, so there are no manifest lines. There is no closing issue with acceptance criteria: the PR only says Refs: #16434.

Spend: none beyond the eval's existing runs. The change edits one grader pattern and adds two samples.

I dispatched no subagents. Verifier dropped 0 of 0 candidates.

kyle-sexton and others added 2 commits November 16, 2026 10:57
…n sample

The options-only sample also matched the first branch through its
"only by some profiles" wording, so no sample needed the third branch.
Its why now names that wording, and a new pass sample words the question
with no per-profile phrase, so only the third branch accepts it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015XWwmbLtFcfditeagftLrv
…st lines

The third branch accepted any always-on-or question when "per profile"
appeared anywhere in the next six lines, prose included. It now needs
an option-list line (-, * or a number and a dot, optional bold) starting
with per profile, within the five lines under the question. Two fail
samples cover an always-on-or-off question with per profile only in
prose, and a per-profile option six lines under the question.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015XWwmbLtFcfditeagftLrv
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 16, 2026
Merged via the queue into main with commit b518cad Nov 16, 2026
59 checks passed
@kyle-sexton
kyle-sexton deleted the fix/16434-per-hook-regex branch November 16, 2026 16:23
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 16, 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.

1 participant