Skip to content

fix(plugin-profiles): give the moved-repository question its own answers and fix reset wording - #17542

Open
kyle-sexton wants to merge 8 commits into
mainfrom
fix/plugin-profiles-reset-wording
Open

kyle-sexton wants to merge 8 commits into
mainfrom
fix/plugin-profiles-reset-wording

Conversation

@kyle-sexton

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

Copy link
Copy Markdown
Member

Closes #17540

Summary

Follow-up to #17390 (plugin-profiles reset): the wording and labelling items left from the owner's live try. Each item is one commit, test first.

Fix

  1. Moved repository's file is its own kind of question. ASKS.moved sits beside the other kinds: answers Keep (first, changes nothing) and Put back, flags --keep-moved / --put-back-moved. Another kind's flag for that file is refused with "is answered with --put-back-moved or --keep-moved, not ", and --remove-unrecorded / --keep-unrecorded no longer answer it. Reset shipped in plugin-profiles 0.9.0 (chore(release): release 5 plugins #17543) while this pull request was open; the old flags are still not kept for this kind, as plugin-profiles reset: give the moved-repository question its own answers, and fix leftover wording #17540 asks, and the fragment says so. The first question says "A file in a repository that moved is not covered: each gets its own question.", and when several kinds are present it names them once ("a, b and c are not covered"). The recommendation's reason names where the profile was applied before the move. The picker needed no code change: it already takes labels and flags from ask.yes / ask.no.
  2. The skill shows the preview lines as printed. The reset action shows every line of lines, in order and exactly as printed, in a code block before any question: never a summary, paraphrase or subset. The reset-previews-then-asks case gains a preview-lines-shown grader (with-only), and its samples fail a summary, a paraphrase, no lines, and a question asked before the lines.
  3. "Unchanged since" names the files: the count, the first three, then "and K more".
  4. Apply in a moved repository says so. When records from before the move are kept, apply's folder preview adds one line: "Reset keeps the record of (profile P) from before this repository moved; after this apply, reset puts this file back one layer per run, newest first." It uses reset's own detection: machineFiles' record readers became settingsFilesIn, which reset and the new movedRecordsOf both call.
  5. "already handled", not "restored earlier". A cut-off file finished while keeping a hand edit is noted as unchanged, yet it is not at its original. The line now says "files that reset already handled", and so does the picker's "Nothing to reset" line.
  6. Entries an unfinished switch owed. When a cut-off row's entries include ones an unfinished switch still owes, the line, question and result say "the values profile P wrote or its unfinished switch had yet to change". Without such entries the wording is unchanged.

Not delivered

What the owner will see differently

  • A moved repository's question offers Keep / Put back (Keep pre-selected) instead of Keep / Remove.
  • The first reset question names files in a moved repository among those it leaves to their own question.
  • The skill shows the tool's preview lines verbatim before asking.
  • The preview names the files it leaves unchanged and calls them files reset "already handled".
  • apply in a moved repository with an older record warns that reset will take one run per layer.

Verification

  • node --test --test-concurrency=4 "plugins/plugin-profiles/**/*.test.mjs": 291 pass, 0 fail (re-run after merging main at af9d2e8a74e)
  • claude plugin test plugins/plugin-profiles: 53 pass, 0 fail (before the merge of main)
  • claude plugin validate plugins/plugin-profiles: passes. The 6 TS warnings in hooks/plugin-profile.test.ts are on lines this branch does not touch.
  • plugins/evals/skills/validate/scripts/validate-cases.py plugins/plugin-profiles/evals: no FAIL, and the new grader sorts all 6 samples correctly. The live eval was not run.
  • Red first: each item's new or changed test failed on the base for the stated reason.
  • Row-kind × answer table: only the three moved kinds' flags changed (to ASK_FLAGS.moved). No cell changed.
  • Left out: the live claude plugin eval run, per the brief; the owner tries the changed questions live before merge.

Related

🤖 Generated with Claude Code

kyle-sexton and others added 7 commits November 19, 2026 16:55
…kind of question

The moved-repository question reused the folder-without-a-record kind: the
picker offered Remove for putting a file back, a caller passed
--remove-unrecorded, and the one question said only that folders without a
record are not covered. It is now its own kind in ASKS: Keep (first) and Put
back, answered with --keep-moved and --put-back-moved, refused with any other
kind's flag, named once in the one question's "not covered" sentence, and
recommended with a reason that names where the profile was applied before
the move. The old flags no longer answer it: reset has not shipped in a
release yet.

Refs #17540

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…asking

In the owner's second live try the skill replaced the preview lines with a
one-line summary saying reset "removes it directly" and then asked. The reset
action now shows every line of `lines`, in order and exactly as printed, in a
code block before any question, never a summary, paraphrase or subset. The
reset-previews-then-asks case gains a preview-lines-shown grader (with-only)
that needs the scaffold's preview lines before a question in the last
message; its samples fail a summary, a paraphrase, no lines, and a question
asked before the lines. The offline validator passes; the live eval was not
run.

Refs #17540

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…anged

"N files that reset restored earlier are unchanged since; reset leaves them."
named no file. The line now ends with the files: the first three and "and K
more" past three, as the other reset lines list entries; `--json` still lists
every one in unchangedSinceReset.

Refs #17540

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…keeps older records

Applying a profile to a repository that moved, while a record from before the
move is kept, said nothing; the person first learned that reset takes one run
per layer from the reset preview. Apply's folder preview now adds one line
naming each such record's file and profile and saying that reset puts the
file back one layer per run, newest first.

The records come from reset's own detection: machineFiles' record readers are
now settingsFilesIn, which both reset and the new movedRecordsOf call over
machineSettingsFiles, so there is no second rule for what counts as moved.

Refs #17540

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d", not "restored"

A cut-off file finished with a yes while keeping a hand edit is noted as
unchanged since reset, yet it is not back at its original, so "files that
reset restored earlier" was false for it. The one line that counts them now
says "files that reset already handled", true for both; the picker's "Nothing
to reset" line, which echoes it, says the same.

Refs #17540

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ill owes

A cut-off row counts an entry an unfinished switch still owes among those
"still at the values profile P wrote", though it holds an earlier profile's
value. When the row's entries include such an entry, wroteValues, which builds
the preview line, the question and the result, says "the values profile P
wrote or its unfinished switch had yet to change"; with none, the wording is
as before.

Refs #17540

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n its own line

The unreleased reset fragment ran two bullets together ("...marks that answer
`(Recommended)`.- Reset notes the bytes..."), so the release would print them
as one. The second bullet now starts its own line.

Refs #17540

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 19, 2026 22:04
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 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-19T22:13:09.475020Z 3cd0678 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.

@kyle-sexton kyle-sexton added the do-not-merge Hard merge gate: do not merge while applied. label Nov 19, 2026
@kyle-sexton

Copy link
Copy Markdown
Member Author

Owned by the control-hub session for plugin profiles (control-hub#11). Held with do-not-merge until the owner has tried the changed questions live; no other session should push to, resolve threads on, or queue this pull request.

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review needs no new review of 45410101a75380d540075df404f8f1d0a0f6e0aa: no file of this pull request changed since the review of 3cd0678.

Security review: no security issues found

This PR changes the wording and labels of the plugin-profiles reset command. I read all 14 changed files in the diff. None of them match a trusted path, and none of them touch a trust control, a workflow, a token, a merge hold or a plugin manifest.

What I checked:

  • New answer flags --put-back-moved / --keep-moved (ASKS.moved, profiles.mjs). These flags join the flags that ANSWER_FLAGS already builds from ASKS. The check at profiles.mjs#L1563 compares each flag with its ask's own yes/no flag. So a moved file answered with any other kind's flag is refused before anything is written, and a file the preview did not ask about is still refused. No file can now be written without a yes for it.
  • settingsFilesIn / movedRecordsOf. This refactor moves the existing try/catch record readers into one helper and adds one read-only caller. Apply's folder preview calls it only to add one informational line. It writes nothing, reads only the repository's local .git record home that reset already reads, and adds no new input.
  • wroteValues, recommendFrom, the unchanged-files line, the picker string, and the changes to docs, the eval and the changelog. These only change displayed text. The changed instruction in the profile skill's SKILL.md is stricter: it now requires every preview line to be shown verbatim before any question. It deletes and softens no instruction, so there is nothing to check against the instruction-exception register.
  • The PR context file contains no embedded instructions aimed at the review lane.

Spend: the new eval grader can only add to prepaid eval runs. It starts no billed resource.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

claude-review needs no new review of 45410101a75380d540075df404f8f1d0a0f6e0aa: no file of this pull request changed since the review of 3cd0678.

Code review: no blocking findings

I read every hunk of all 14 changed files in the diff. I also read the unchanged code that the changed lines call: prepare/previewLines, kindOf/ANSWER_FLAGS and the per-kind flag refusal in profiles.mjs, fewOf, the reset row lines, and repositoryHome/machineSettingsFiles/movedFile in lib/machine-records.mjs. I ran nothing. The test counts in the PR body are the author's claim and I have not checked them.

Closing issue #17540, checked against each "Done when" item:

  1. The moved repository's question is its own kind. ASKS.moved (Keep, then Put back, --keep-moved/--put-back-moved) is used for the moved row. kindOf matches on ask.yes.flag, so the existing refusal at profiles.mjs#L1563 now turns away --remove-unrecorded, --keep-unrecorded and --finish-cut-off for that file. The covers/some/waits wording and the recommendation reason that names where the profile was applied are all in place. The new test covers the refusals, the unasked file, the nobody-to-confirm message and the recommendation. The picker reads labels and flags from ask.yes/ask.no, and register.tsx hard-codes no unrecorded flags. Met.
  2. The skill shows the preview lines as printed. The SKILL.md wording is in place. The new preview-lines-shown grader regex matches the row line the tool prints (from profiles.mjs line 1396 and the head line built just after it). The pass and fail samples agree with the pattern, including the case where the question comes before the lines. Met.
  3. The "unchanged since" line names the files. It uses fewOf(unchanged), which gives the first three and then "and K more". Tested with four files. Met.
  4. Apply's preview warns in a moved repository. movedRecordsOf reuses reset's machineSettingsFiles detection through the new settingsFilesIn helper. It is limited to the folder target and to records whose movedTo real path is this file, so it stays silent in a subfolder or a linked worktree. Tested for both text and JSON output, and for no line in a repository that did not move. Met.
  5. "already handled" is true for a cut-off file finished with a hand edit. Tested. Met.
  6. The cut-off wording is true when entries hold a value an unfinished switch still owed. wroteValues adds the "or its unfinished switch had yet to change" clause only when an entry is in rec.pending. The preview line, the question and the result line are asserted; the common case keeps its old wording. Met.
  7. The fragment's second bullet is on its own line. Fixed. No test covers it, but it is a line break in a changelog fragment, so there is no real test surface for it. Noted here and not counted as a finding.

Loosened checks. Several test expectations changed: the moved-repository flags went to --put-back-moved/--keep-moved, the recommendation reasons gained the "at , before the repository moved" phrase, and the picker's "already handled" string changed. Each change is a behaviour that issue #17540 names. UNCHANGED_LINE moved from a count-only regex to an exact line match, which is stricter. Nothing was loosened.
Loosened-check verdict: fail (no wrapper settings line; default used); patterns: 0. The prompt carried no loosened_check_decision_record: line, so the citation requirement was not checked.

Embedded text. Neither the PR context file nor the prior-findings file holds any instruction aimed at the lane.

Spend. The PR changes no plugin manifests and adds no paid usage. The patch bump: matches a change to unreleased reset behaviour plus wording fixes.

Verifier dropped 0 of 0 candidates.

…eset-wording

# Conflicts:
#	.changes/plugin-profiles/feat-plugin-profiles-reset-14c36134.md
@kyle-sexton kyle-sexton removed the do-not-merge Hard merge gate: do not merge while applied. label Nov 19, 2026
@kyle-sexton
kyle-sexton disabled auto-merge November 19, 2026 23:43
@kyle-sexton kyle-sexton added the do-not-merge Hard merge gate: do not merge while applied. label Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge Hard merge gate: do not merge while applied.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

plugin-profiles reset: give the moved-repository question its own answers, and fix leftover wording

1 participant