Repository navigation
feat(install): support HTTPS ZIP skill sources - #885
salmonumbrella wants to merge 11 commits into
Conversation
HTTPS ZIP URLs currently reach Git cloning and cannot be installed. Download and safely extract bounded archives through existing discovery, selection and audit, retaining the original URL and SHA256 for portable reinstalls. Compare bytes for check/update, preserve unchanged state and staged failures, and report no-op results through CLI and dashboard. Cover unsafe archives, metadata round trips and both CLI modes with local HTTPS fixtures. Refs runkids#883
Record archive roots explicitly so config restore and changed-byte updates keep the selected member. Apply local-edit protection to bulk ZIP updates and expose recorded-hash file changes without historical archive fetches. Bound conventional and ZIP64 central-directory counts before the standard reader allocates entries, including dishonest wrapped count metadata.
Reset incompatible remote provenance when the dashboard changes a ZIP source while preserving installed file hashes and time. Recognize ZIPs without a digest so checks, edit guards and file inspection still work. Refuse ZIP sources for agents and Git checkouts before changing state. Validate literal ZIP names before normalizing safe dot components, keeping traversal and collision refusals. Retain bounded directory preflight and remove its redundant post-reader count check.
Changing ZIP provenance to a local path disables the existing remote edit guard before a replacement is installed. Refuse this PATCH transition before mutation, for clean and edited copies, with save-and-reinstall guidance so ordinary updates retain the installed edit baseline.
Advise copying the skill and edits to a folder separate from the installed destination before reinstalling. Remove same-name/group and force advice that could lead users to pass the installed directory as the local source.
Exclude skipped archive results from installed summaries across discovery, batch selection and installed-name routes, reusing shared result rendering. Remove unused digest propagation, consolidate audited test fixtures and repair their ineffective assertions. Shorten source-editor recovery and source URL guidance while preserving the existing refusal contract.
|
@codex review |
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
macOS Go uses its platform trust store and ignores SSL_CERT_FILE, so the local HTTPS fixture fails before ZIP installation can be exercised. Build the existing real CLI test with a temporary fixture-only trust overlay. Keep ordinary certificate and hostname verification, prove a wrong hostname is rejected, and clarify the runbook's source build.
Merge upstream main into the ZIP source branch while retaining explicit JSON overwrite consent, preview and lock behavior, and agent summaries. Report unchanged ZIP installs in the shared skipped-name summary without counting them as installed, and verify consent and no-op JSON translation.
Name the temporary CLI skillshare.exe so Windows os/exec resolves the exact build output through its executable-extension lookup. Keep the same fixture and certificate/hostname verification on every platform.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1f454d9306
ℹ️ 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".
Normalize archive-derived default names for generated config reinstalls without changing member identity or generic Git/local naming. Refuse names made ambiguous by normalization so callers can select the intended member. Reject Git administrative entries during extraction before installed state can change, preventing ZIP skills from becoming tracked checkouts. Preserve ordinary .gitignore content and verify both global/project declaration restores.
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Compare archive path components without trailing ASCII dots or spaces so Win32 aliases cannot bypass the Git administrative-entry guard. Keep the original member paths and ordinary archive content unchanged.
|
Thanks for all the work you've put into these. A lot of large PRs have arrived at once, more than I can take in right now, so I need to go through them slowly. I can't promise a date, but I'll get to them. |
Type
proposals/only — see CONTRIBUTING.md)approvedlabel)This is a feature implementation. Issue #883 has no
approvedlabel; maintainer approval is still required under CONTRIBUTING.md.Linked Issue
#883 — install: support skills published as zip archives over HTTPS
Checklist
make check) — for code changesThe two author attestations above await human author confirmation.
What changed
Skills published only as HTTPS ZIPs can now be installed directly and kept current with
checkandupdate, without a separate download script.-s), naming (--name), groups (--into) and audit in global and project mode, including dashboard installs. Supports root, wrapped and multi-skill archives. Default names are normalized for configuration reinstalls without changing member paths; ambiguities caused by normalization require an explicit member selector.#skill=<escaped-relative-path>) and archive SHA256. Each selected skill retains its own source so configuration-based reinstalls and updates preserve its name, group and member.checkdownloads each shared URL once and compares bytes. Unchanged updates preserve files, metadata and timestamps. Changed archives use audited staging; download, extraction, missing-member and audit failures preserve the installed copy. Local edits stay protected unless explicitly forced;update --forcecan restore even an unchanged archive..gitentries at any depth, including trailing-dot/space aliases. Ordinary.gitignorefiles remain supported. Updates the schema, built-in reference and English/localized command docs.Usage
skillshare install 'https://host/pack.zip?download=1' -s brief --into legal -g skillshare check -g skillshare update legal/brief -gChecks
Verification for final HEAD
f12c481ee9c5065f363d8414308e03c618082c26; earlier checks are identified below:TestArchiveInstallUpdateandTestArchiveRejectsUnsafeZIP, including trailing-dot/space alias guards; its integration job selectedTestProject_NativeLinksSmoke, not the full ZIP CLI lifecycle testTestArchiveCLIEndToEnd.-racepassed in the isolated devcontainer, covering normalized names/collisions, unsafe Git-admin entries and trailing-dot/space aliases, and the real CLI lifecycle in global and project mode with all six generated-configuration reinstalls. The full ZIP CLI lifecycle test was not run on native Windows.make check: passed at1f454d93, exit 0, including 138/138 Herdr tests; not rerun at the repair head.00529ca.1f454d93(1/1, global and project assertions matched); not rerun at the repair head. The real CLI test builds current source with temporary fixture-only trust roots, retains ordinary TLS and hostname verification, and verifies wrong-host rejection. No production TLS setting was added. The full ZIP CLI lifecycle test was not run on native Windows; Windows CI selected the native-links smoke test for integration.00529ca, with UI sources unchanged at final HEAD. The full UI test suite was not run.f12c481(npm ci && npm run build, Node 22 Docker, exit 0).00529caconfirmed the local-change list and the HTTP 400 refusal of a ZIP-to-local source edit, with the editor draft retained; the relevant view sources are unchanged at final HEAD.1f454d93; its two P2 findings are fixed. The repaired-head request at79732642failed on quota at 23:23 UTC. No completed final-head Codex review is available. The scheduled 00:53 UTC retry time has passed, with no evidence of a completed retry.Limits
HTTPS
.zipskills only: no tar archives, agent installs, Git tracking/refs, archive lock pins or discovery of newer versioned filenames. A new filename requires installing its new URL. Local-change inspection lists modified, added and deleted files; historical ZIP content diffs are unavailable. Original query parameters remain in configuration and metadata, so private URLs require private configuration.Closes #883
feat-install-support-HTTPS-ZIP-skill-sources.mp4
Dashboard capture
Actual dark-mode dashboard at
f12c481, using a synthetic HTTPS ZIP: install, check unchanged bytes, detect changed bytes at the same URL, and update to fixture version 2.feat-install-support-HTTPS-ZIP-skill-sources-actual-dashboard.mp4
4596c1e4)f12c481)