Skip to content

fix(install): require explicit force for JSON overwrites - #884

Merged
runkids merged 4 commits into
runkids:mainfrom
salmonumbrella:fix/install-json-overwrite-consent
Nov 13, 2026
Merged

runkids merged 4 commits into
runkids:mainfrom
salmonumbrella:fix/install-json-overwrite-consent

Conversation

@salmonumbrella

@salmonumbrella salmonumbrella commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Type

  • Bug fix
  • Small improvement (docs, typo, minor refactor)
  • Feature proposal (proposals/ only — see CONTRIBUTING.md)
  • Approved feature or large change (the linked issue has the approved label)

Linked Issue

#877

What changed

  • install --json preserves existing skills and agents in global and project mode. Overwriting requires explicit --force. JSON still selects all when no --skill or --agent filter is given, and audit blocking still applies.
  • JSON results include a skipped array for duplicate skips. Other conflicts retain their error or failed result.
  • --dry-run --json still previews existing destinations and cross-path duplicates without changing them. Previews can resolve an installed skill by its saved name.
  • Project config installs with --json preserve existing copies even when the lock points to another commit. Explicit --force follows that pin. Ordinary project installs and the dashboard's config-install action keep following changed pins.
  • Update CLI help, built-in skill references, Herdr integration notes, and website docs in English plus Japanese, Korean, Simplified Chinese and Traditional Chinese.

Why

A script asking for machine-readable output could overwrite locally edited skills or agents because --json implicitly set Force. Output format should not grant overwrite consent. This changes previously documented behavior: scripts that relied on JSON mode to replace existing copies must add --force.

fix-install-require-explicit-force-for-JSON-overwrites.mp4

Usage

# Install without granting overwrite consent
skillshare install anthropics/skills --json

# Explicitly replace existing copies
skillshare install anthropics/skills --json --force

# Preview an untracked skill source, including existing destinations
skillshare install anthropics/skills --dry-run --json

# Follow a changed project lock pin for an existing copy
skillshare install -p --json --force

--force also retains its existing audit-override behavior. Review findings before using it.

Verification

CI at c72f7862: all 7 executed jobs passed.

  • Nix check: passed.
  • Test workflow: unit tests, Linux and macOS integration tests, Windows tests, Docker offline tests and redteam passed. docker-sandbox-online and redteam-signal were skipped by the workflow.

GitHub Codex review at c72f7862 completed with no findings.

Local runtime checks passed:

  • Targeted integration checks: JSON overwrite consent (8 cases), source previews (16 cases), saved-name previews, audit blocking and JSON purity.
  • Project lock integration tests and targeted config-install and server tests.
  • Website production build across all 5 locales.
  • JSON purity runbook: 18/18 passed, zero skipped.

Not run locally: full test suites, make check, Windows or native Herdr runtime validation.

AI-assisted implementation and drafting. Author attestations remain pending.

Checklist

  • I've read CONTRIBUTING.md, including its AI-assisted contributions section — pending author confirmation
  • I've reviewed every line of the diff and can explain it — pending author confirmation
  • Tests included and passing (make check) — for code changes; make check was not run locally
  • No unrelated changes in the diff
  • Scope is focused — one concern per PR

Closes #877

Machine-readable output must not grant destructive consent. Preserve existing skills and agents unless force is explicit, and report existing skip decisions in the JSON result while retaining selection and audit behavior.

Cover edited copies in global and project modes, and update help, automation guidance, and translated command documentation.

Refs: runkids#877
Read-only discovery must work before replacement consent, including existing
single skills and cross-path installs. Keep overwrite checks on write paths.

Require existing update or force intent to advance installed project copies
to a changed lock pin. Preserve ordinary CLI and dashboard lock following,
while JSON alone leaves local edits and incoming pins unchanged.

Cover existing-destination previews, edited locked copies and dashboard lock
following. Clarify translated docs and make the consent runbook step runnable.

Refs: runkids#877
JSON previews must resolve recorded sources without requiring overwrite consent. Permit metadata lookup for dry runs and restore the original unforced preview regression in global and project modes.
The global local-skill integration case already covers JSON overwrite refusal and explicit forced replacement. Remove the duplicate runbook step and restore its 18-step numbering while retaining the existing purity setup and assertion corrections.
@salmonumbrella
salmonumbrella marked this pull request as ready for review November 13, 2026 11:42
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 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-13T11:57:51.200309Z c72f786 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.

@salmonumbrella
salmonumbrella marked this pull request as draft November 13, 2026 11:50
@salmonumbrella
salmonumbrella marked this pull request as ready for review November 13, 2026 11:50
@runkids
runkids merged commit 4596c1e into runkids:main Nov 13, 2026
9 checks passed
@runkids runkids mentioned this pull request Nov 13, 2026
4 of 9 tasks
runkids added a commit that referenced this pull request Nov 13, 2026
After #884, an install without --force keeps existing skills and agents
and names them in the --json skipped array, but the operation log
recorded only installed and failed names, so `ss log` could not show
what an install kept.

Record the kept names as skipped_skills for CLI installs and for the
dashboard's install-from-config action, and list them in `ss log`.
The config install starts with an empty list, so the dashboard log
shows no "null" when nothing was kept.
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.

install --json: separate JSON output from overwrite consent

2 participants