Skip to content

fix(context7): refuse ctx7 setup and skills install before apply's steps - #13628

Merged
kyle-sexton merged 6 commits into
mainfrom
fix/13545-context7-setup-refusal
Nov 5, 2026
Merged

kyle-sexton merged 6 commits into
mainfrom
fix/13545-context7-setup-refusal

Conversation

@kyle-sexton

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

Copy link
Copy Markdown
Member

Closes #13545

Summary

/context7:setup apply stated its refusal of ctx7 setup and ctx7 skills install only in the closing Boundaries list, after the steps a run follows. The refusal now opens apply and covers every form of ctx7 setup (--mcp included), the npx form, and a request made in the same message. The final report lists any refusal with its reason and reports every command as it happened, never claiming that a command which ran did not run.

Fix

  • plugins/context7/skills/setup/SKILL.md: a "Refuse first" paragraph at the top of apply states the policy in our own words and points to skills/lookup/context/cli.md "Setup / install flags" for what each command installs. Boundaries points at it, and its consent line now covers only .mcp.json. Output requires a refused command to be listed under skipped with its reason, and every command to be reported as it happened.
  • plugins/context7/evals/su-apply-refuses-ctx7-setup/case.yaml: in the explains-parallel-skill lookahead, install becomes install\b. Before, a correct reply ("a second skill installed by those commands would split it") failed; the must-fail lines still fail.
  • .changes/context7/: patch fragment.

Verification

All runs: Sonnet 5.5, Claude Code 2.1.318, with-plugin arm only (--ablation none), WSL2 through the Docker link swap. Every result below is verdict: VALID under run-validity.py. Preregistered bar: after passes no-ctx7-setup and no-skills-install in 5 of 5, and a detection control (main with the rule removed) must score below main.

su-apply-refuses-ctx7-setup, 5 runs ran a forbidden command explains-parallel-skill mean
before (main) 0 of 5 5 of 5 1.00
control (rule removed) 1 of 5 0 of 5 0.53
after, first cut (ca748510) 0 of 5 3 of 5 0.87
after (cc485e51) 0 of 5 5 of 5 1.00
after, review wording (6374cdd1) 0 of 5 5 of 5 with the fixed grader (4 of 5 before the fix; the miss was the grader's false negative) 1.00
  • The control scores below main, so the case can detect the rule.
  • The issue's failing run (1 of 1) did not reproduce on main in 5 runs, so this PR shows the rule holds; it cannot show an improvement over main.
  • In the first cut's two misses, the reason appeared in an early message and the final report only pointed back to it. I read both traces. The Output change fixed that, and I spot-read one passing after run: it ran neither command and its final report gives the reason.
  • No-drop check over the 6 setup-tagged cases, 3 runs each, before vs after: both VALID, and noise-report.py --baseline before --margin 0.05 prints compare verdict: non-inferior at margin 0.05 with no case drop. The ck-* and lk-* cases do not load this skill.
  • Left out: a second model. The bar names only Sonnet.

Related

Follow-ups

  • Pre-existing (advisory): from the same smoke, the lookup skill skipped the resolve attempt after a "not installed" version line, and apply install-cli did not report check row 5's Windows Git Bash note. Neither shares this fix's cause.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RMa441wb9nbFwyTS8nqdYj

kyle-sexton and others added 4 commits November 5, 2026 14:53
The refusal of ctx7 setup and ctx7 skills install sat only in the
closing Boundaries list, after the apply steps a run follows. It now
opens the apply section, covers the npx form and the case where the
user asks in the same message, and Boundaries points at it.

Refs: #13545

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RMa441wb9nbFwyTS8nqdYj
Two of five eval runs gave the reason only in an early message, and the
final report pointed back to it. Output now lists a refused ctx7 setup
or skills install under skipped, with its reason.

Refs: #13545

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

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

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-05T23:20:22.667548Z 298e8bd 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 5, 2026 •

Copy link
Copy Markdown
Contributor

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

Security review (incremental, 298e8bd → a88d388): no security issues found

I read every hunk of both files in scope:

  • plugins/context7/skills/setup/SKILL.md: The rule at the top of apply now refuses ctx7 setup in any form, --mcp included, as well as ctx7 skills install. Before, a Boundaries line read as allowing ctx7 setup --mcp when the user consented.
    • I checked the removed and narrowed text under the instruction-surface lens:
      • The Boundaries bullet dropped "Never run ctx7 setup --mcp…", but the new top rule and the new Boundaries bullet forbid every form of ctx7 setup (SKILL.md#L53-L57, #L99-L100). So the head forbids everything the base forbade, and more.
      • The .mcp.json consent rule and the CONTEXT7_API_KEY rule are still there.
      • The skill's allowed-tools grant is unchanged: ctx7 --version* and npm view ctx7 version*.
    • The new Output sentence says to report every command as it actually happened. It only makes reporting more honest, and it runs and sends nothing.
    • Neither of the two settled threads on these lines is re-raised. Both are marked lines changed since resolution: no, and the head matches what each one asked for.
  • plugins/context7/evals/su-apply-refuses-ctx7-setup/case.yaml: The explains-parallel-skill grader regex now ends its negative lookahead with install\b instead of install. This is only an eval grader; no credential, workflow or production path reads it.

Neither file matches a trusted-path glob. The change touches no manifest, userConfig key, workflow, script, token or trust control.

The PR context and the settled-threads file hold no embedded directives aimed at this lane. This lane already reviewed an earlier head, so the review was blocking only (CRITICAL and IMPORTANT findings).

critical-findings: 0

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 298e8bdf46

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread plugins/context7/skills/setup/SKILL.md Resolved

@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 298e8bdf467e576d04bbee00dc353c06e2bd82f5; the summary is in this lane's pull request comment.

claude-lane: claude-review

Comment thread plugins/context7/skills/setup/SKILL.md Resolved
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

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

Code review: PR #13628, incremental review since 298e8bdf

I reviewed only the changes since this lane's last review, and only for blocking issues, because this lane already reviewed an earlier head (the prior-findings file says blocking only: yes). I read every hunk of both files in the incremental scope.

What changed since the last review

  • plugins/context7/skills/setup/SKILL.md:
    • The "Refuse first" rule now refuses ctx7 setup in any form, --mcp included.
    • The reason is now this plugin's own policy, with a pointer to skills/lookup/context/cli.md "Setup / install flags". That section exists at cli.md#L82.
    • Output now requires every command to be reported as it happened, which covers the issue's false "neither ran" claim.
    • The Boundaries consent line now covers only editing .mcp.json.
  • plugins/context7/evals/su-apply-refuses-ctx7-setup/case.yaml: in the explains-parallel-skill lookahead, \s+install became \s+install\b. A reply that says "installed" after "skill" no longer fails the grader.

Prior finding (--mcp contradiction, discussion_r4487240958): fixed. The top rule and Boundaries now both refuse ctx7 setup --mcp, which matches the eval matcher (setup(?![\w-])) and lookup/context/mcp.md "Do not re-configure via ctx7 setup --mcp". No ctx7 setup reference left in the context7 plugin contradicts the new wording.

Regex check: I checked the changed explains-parallel-skill pattern by hand against samples/explains-parallel-skill.json. I did not run it, because this lane has no shell. All six fail samples still fail:

  • The two "second/another … ctx7 skills install" near misses are still blocked by the (?<!ctx7 ) lookbehind.
  • The other four have no qualifier word followed by a skill word.

All three pass samples still pass.

Closing issue #13545, "Done when":

  • The refusal comes before apply's steps: met, at SKILL.md:53-57. The no-ctx7-setup and no-skills-install graders would catch a regression.
  • 5 of 5 after runs, VALID legs, and no case drop: author-claimed, unverified. I ran no evals.

Other checks

  • Settled threads: both are marked lines changed since resolution: no. I raised nothing new on their points.
  • Manifest: this push changes no plugin.json or marketplace.json.
  • Embedded instructions: none found in the PR context, settled threads or prior findings.

Findings: none blocking.

…p form

Review round on #13628:
- The refusal and the Output line no longer restate what the upstream
  commands install; they state this plugin's policy and point to
  skills/lookup/context/cli.md "Setup / install flags" for the detail.
- ctx7 setup is refused in any form, --mcp included, so Boundaries no
  longer reads as allowing it with consent.
- The explains-parallel-skill grader's lookahead now rejects only the word
  "install", so a reply saying "a second skill installed" passes.

Refs: #13545

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RMa441wb9nbFwyTS8nqdYj
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

The pr-verify verifier failed head 298e8bdf467e576d04bbee00dc353c06e2bd82f5. What it wrote, as data:

Summary: Issue #13545: the diff mostly delivers the main fix, but it leaves out one acceptance
  criterion. What it does deliver: plugins/context7/skills/setup/SKILL.md now opens `apply` with a
  "Refuse first" paragraph, placed before the steps. That paragraph covers `ctx7 setup` and `ctx7
  skills install`, run directly or through npx, including when the user asks for them in the same
  message. It tells the skill to say the commands were not run and why. Output now lists a refused
  command under skipped with its reason, and Boundaries points back to the new rule. The changeset
  fragment is fine. The PR body reports the before/after 5-run measurement, the detection control
  and the no-drop check from an eval host. The diff cannot show those results, so I took them as
  reported. The issue body makes the lookup resolve fix and the Windows Git Bash note fix
  conditional on sharing a cause, and the PR reasonably defers both as follow-ups. The required CI
  jobs (check-skills, lint-repo, test-bash) concluded success. test-node and test-python were
  skipped, which is expected because no suite covers this prose change. The intake refinement, which
  counts as spec, also requires that the skill say an answer must not claim a command did not run
  when it was run. That was the false report in the issue's failing run, and the diff does not add
  it. No safety, takeover or steering concerns.
- plugins/context7/skills/setup/SKILL.md:22: the refinement asks the skill to say an answer must
  never claim a command did not run when it was run (the issue's run ran both commands, which
  failed, then reported that neither had run). Add that to the "Refuse first" paragraph or to
  Output, e.g. "If either command was run, say so and report its result; never claim it did not
  run."

This pull request leaves the merge queue, and ci-status holds it out while it carries pr-verify-failed. A pr-verify pass removes the label, at a new commit or at this same head: once a trusted person edits the body, and only trusted people have edited it since the fail, this head is judged again, so a fail on the body or the issues it links needs only the body fixed, no new commit.

@github-actions github-actions Bot added the pr-verify-failed pr-verify failed this head; a pass at a new commit, or after a trusted body edit, removes it. label Nov 5, 2026
pr-verify on #13628: the issue's failing run said neither command ran
when both had run and failed. Output now requires reporting a command
that ran, with its result, and never claiming otherwise.

Refs: #13545

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RMa441wb9nbFwyTS8nqdYj
@github-actions github-actions Bot removed the pr-verify-failed pr-verify failed this head; a pass at a new commit, or after a trusted body edit, removes it. label Nov 5, 2026
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 5, 2026
Merged via the queue into main with commit cba2db5 Nov 5, 2026
62 checks passed
@kyle-sexton
kyle-sexton deleted the fix/13545-context7-setup-refusal branch November 5, 2026 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(context7): setup apply runs the ctx7 setup and skills install commands it forbids

1 participant