Repository navigation
feat(sql-server): add the setup skill and Azure SQL Database docs - #11953
melodic-automation-lanes[bot] wants to merge 2 commits into
Conversation
Lane-Activity: work-resolve-issue/resolve-issue
|
claude-security-review reviewed Security review (incremental since 3ebf675): no security issues foundI read every hunk of both files in scope in
PR context: no embedded text tries to steer this lane. critical-findings: 0 |
| }; | ||
| COPIED.forEach(copy); | ||
| const npm = spawnSync('npm', ['ci', '--omit=dev', '--ignore-scripts', '--no-audit', '--no-fund'], { | ||
| cwd: serverDir, | ||
| stdio: ['ignore', 'inherit', 'inherit'], | ||
| shell: process.platform === 'win32', | ||
| }); | ||
| if (npm.status !== 0) { | ||
| process.stderr.write(`npm ci failed in ${serverDir} (${npm.error?.message ?? `exit ${npm.status}`})\n`); | ||
| return 1; | ||
| } | ||
| copy(MANIFEST); | ||
|
|
||
| const installed = installedVersion(serverDir); | ||
| const missing = missingDependencies(serverDir); | ||
| if (installed !== version || missing.length) { | ||
| process.stderr.write(`${serverDir} holds ${installed ?? 'no server'}; missing: ${missing.join(', ') || 'none'}\n`); | ||
| return 1; | ||
| } |
There was a problem hiding this comment.
Important: an upgrade that fails partway leaves a server copy that no registration can start (REVIEW.md: "An interruption between steps must not leave state no code path expects", standards/review/error-handling.md#atomicity).
After each plugin update, check reports FAIL server copy … run apply, so the normal upgrade path runs this code against a copy that working registrations already use. Here is what it does to that live directory, in order:
- Deletes
.claude-plugin/plugin.json. - Replaces
src/,schemas/andpackage*.json. - Runs
npm ci, which first deletesnode_modules.
If npm ci then fails (offline, a proxy, a registry error), the function returns 1 with no manifest and no dependencies left. src/main.mjs:9 reads ../.claude-plugin/plugin.json when the module loads. So every existing sql-<env> registration that worked a minute earlier now fails at startup with ENOENT, and it stays broken until a later apply succeeds. check reports this state as INFO server copy: none, not as broken.
How to show it fails: install version N with apply. Bump the plugin, block network access, run apply (it exits 1). Then start a session that uses the registration.
Fix: build the new copy in a sibling staging directory (for example <data-dir>/server.next) and run npm ci there. Swap it in with renameSync only after the manifest has been written and the dependency check passes, so a failure leaves the old copy untouched.
claude-lane: claude-review
| local`. Refuse `--scope project`: it writes the repository's `.mcp.json`, which the agent can | ||
| edit. Each `--env 'NAME=${NAME}'` stores a reference that Claude Code expands when it starts the | ||
| server, so the stored registration holds no credential. The commands are for a POSIX shell. |
There was a problem hiding this comment.
Suggestion: these lines state Claude Code behavior as fact, with no pointer record (.claude/rules/skill-bodies-state-current-rules.md: "A skill or agent body never restates a volatile upstream specific … product or tool behavior given as our reason").
Two product behaviors are given here as reasons:
--scope project"writes the repository's.mcp.json"- each
--env 'NAME=${NAME}'"stores a reference that Claude Code expands when it starts the server, so the stored registration holds no credential"
The second one matters most. The PR body says it is unverified: the MCP docs state the expansion for .mcp.json and "[imply] it for ~/.claude.json entries without stating it outright". If the expansion does not happen at user scope, every sql-login registration starts the server with the literal text ${NAME} as its credential. Note L5 already covers this: readSecret accepts that text. Login then fails, while the skill has already told the user the registration is correct.
Fix: state the decision in our own words, for example "register by reference, never by value; refuse project scope because the agent can edit the repository's MCP config". Add a links-only record: a pointer to the exact section of https://code.claude.com/docs/en/mcp, an as-of date, and a recheck trigger. Until the user-scope expansion is observed in a live session, have step 3's claude mcp get readback (or the step-4 grants call) be what confirms the credential arrived, rather than this sentence.
claude-lane: claude-review
|
claude-review reviewed Code review (incremental since 3ebf675)\n\nI read the whole change in both files in scope:
|
|
Unattended merge: native auto-merge leaves this pull request unarmed at head |
Lane-Activity: pr-unblock/fix-ci
|
The pr-unblock lane stopped
When a retry on this head can change the outcome, the lane runs one on its own, up to its per-head cap, and edits this comment if it stops again; a run that does not stop clears the status. When no retry can (a review thread the lane does not take or settle, or a failing check after the retries are spent), a person resolves the threads or gets the checks green, then dispatches the workflow below: that run finds the cause gone and clears the status. On a pull request the lanes App opened, the dispatchers start that run once per stop; on any other, a person does. A new commit to the branch starts clean. To run it again on this head now, dispatch the gh workflow run pr-unblock.yml -R melodic-software/claude-code-plugins -f pr-number=11953 -f activity=address-feedback |
Closes #9898
Summary
Opened by the work-resolve-issue lane. The run's own summary:
Not verified
bash plugins/skill-quality/scripts/check-skill.sh plugins/sql-server/skills: check-affected skipped changed-skills ('runs the checked tree's own skill-quality code'), so it did not run here. Left to the PR's CI. I checked SKILL.md by hand against the script's limits: description under 41ci-statusgreen on the PR head: a PR check, left to the PR's CI.claude mcp addcommands and the grants queries in SKILL.md were not run against a real Claude Code or database.claude mcp add --env 'NAME=${NAME}'value is expanded at launch rests on the MCP docs page, which implies it for ~/.claude.json entries without stating it outright; not observed in a live session.git-read statuslists untracked .bash_profile, .bashrc, .gitconfig, .idea, .mcp.json, .profile, .ripgreprc, .vscode, .zprofile and .zshrc at the checkout root. This run did not create them, and the Read tool reports them absent, so they look like sandbox mount placeholders. They are not part of thFix
claude mcp getrow per environment, and a database- and schema-scope grants check through a registered query tool; apply: install the server copy, then confirmed user-scope registrations, skipping ones already in placeVerification
The runner ran each check from the base copy against 3ebf675:
The run reports:
claude mcp add \[options\] <name> -- <command> \[args...\], --env needs another option before the name, local/project/user scopes (project writes .mcp.json), ${VAR} expansion in env values (stated for .mcp.json and implied for ~/.claude.json eLeft out: the items under Not verified.
Related
#9898