fix: terminal install works with curl alone by trusting the repository pin - #2081
Conversation
…ll.sh Co-authored-by: Cursor <cursoragent@cursor.com>
…nifest in install.sh Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…f-update Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe terminal installer now falls back to repository-pinned dispatcher metadata when no archive manifest is provided. It validates refs, manifests, and versions, adds shell and PowerShell coverage, updates CI execution, and documents the revised trust and installation flows. ChangesPinned terminal installation
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Installer as scripts/install.sh
participant Repository as raw.githubusercontent.com
participant Release as GitHub release assets
Installer->>Repository: Fetch project-runner-pin.json for PIN_REF
Repository-->>Installer: Return release tag and digest manifest
Installer->>Installer: Validate pin data and selected version
Installer->>Release: Download archive and checksum
Release-->>Installer: Return release files
Installer->>Installer: Verify checksum and attestation manifest
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (2)
scripts/test-install-pin-manifest.sh (1)
15-22: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winGuard against a vacuous run when extraction yields nothing.
If a helper is renamed or reformatted (e.g. closing brace indented),
extract_functionreturns empty output,evalsucceeds, and everyexpect_failthen passes for the wrong reason (command not found→ non-zero). A presence check keeps the "later refactor cannot silently drift" intent of the header comment.Proposed hardening
-eval "$(extract_function extract_pin_string_field)" -eval "$(extract_function unescape_pin_manifest)" -eval "$(extract_function validate_pin_manifest)" -eval "$(extract_function validate_uloop_ref)" +for fn in extract_pin_string_field unescape_pin_manifest validate_pin_manifest validate_uloop_ref; do + body=$(extract_function "$fn") + if [ -z "$body" ]; then + echo "FAIL: could not extract $fn from $INSTALL_SCRIPT" >&2 + exit 1 + fi + eval "$body" +doneAlso applies to: 42-45
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@scripts/test-install-pin-manifest.sh` around lines 15 - 22, Update extract_function to validate that the requested helper was actually found and extracted, including when formatting changes prevent the current awk match from locating it. Make the test fail explicitly on empty extraction before eval or expect_fail runs, preserving the intent that renamed or reformatted helpers cannot make the suite pass vacuously.Source: Linters/SAST tools
scripts/install.sh (1)
385-400: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value
extract_pin_string_fieldtakes the key as$1but reads the JSON from the globalpin_json.Mixed parameter/global contract is easy to break later (a caller that forgets to set
pin_jsonsilently gets an empty parse and the "missing field" error path). Passing both explicitly keeps it symmetric withunescape_pin_manifest/validate_pin_manifest.Note the test harness (
scripts/test-install-pin-manifest.sh) also setspin_jsonas a global, so any change must be mirrored there.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@scripts/install.sh` around lines 385 - 400, Update extract_pin_string_field to accept the JSON input explicitly alongside the field key, and parse that argument instead of the global pin_json. Update every caller to pass both values, including the test harness scripts/test-install-pin-manifest.sh, while preserving the existing missing-field and malformed-value behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@README.md`:
- Line 115: Change the manual attestation-install subsection heading from h4 to
h3 in README.md lines 115-115 and README_ja.md lines 132-132, preserving the
existing heading text while maintaining the correct hierarchy under the
surrounding h2 section.
In `@scripts/install.sh`:
- Around line 466-475: Update the VERSION selection logic around the
latest/latest-beta branch so an explicit ULOOP_VERSION=latest-beta request is
not silently treated as the pinned stable release. Either require ULOOP_REF or
ULOOP_ARCHIVE_MANIFEST for the beta channel, or emit a clear channel-override
message when assigning VERSION=$pin_tag; preserve the existing latest and exact
pin_tag behavior.
---
Nitpick comments:
In `@scripts/install.sh`:
- Around line 385-400: Update extract_pin_string_field to accept the JSON input
explicitly alongside the field key, and parse that argument instead of the
global pin_json. Update every caller to pass both values, including the test
harness scripts/test-install-pin-manifest.sh, while preserving the existing
missing-field and malformed-value behavior.
In `@scripts/test-install-pin-manifest.sh`:
- Around line 15-22: Update extract_function to validate that the requested
helper was actually found and extracted, including when formatting changes
prevent the current awk match from locating it. Make the test fail explicitly on
empty extraction before eval or expect_fail runs, preserving the intent that
renamed or reformatted helpers cannot make the suite pass vacuously.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 5a504f7b-8308-421f-85c9-ec8245a25650
⛔ Files ignored due to path filters (2)
scripts/install.ps1is excluded by none and included by nonescripts/test-install-pin-resolution.ps1is excluded by none and included by none
📒 Files selected for processing (10)
.github/workflows/build-and-test.ymlREADME.mdREADME_ja.mdSECURITY.mdcli/dispatcher/internal/dispatcher/update.gocli/dispatcher/shared-inputs-stamp.jsondocs/project-runner-pin.mdscripts/install.shscripts/test-install-pin-manifest.shscripts/test-install-release-filter.sh
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…ution Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
curl | sh/irm | iex) now falls back toPackages/src/project-runner-pin.jsonwhenULOOP_ARCHIVE_MANIFESTis unset, so first-time CLI install no longer requiresgh+jq.ULOOP_ARCHIVE_MANIFEST(Unity GUI / dispatcher self-update / manual attestation) still wins; pin fetch is skipped in that case.ULOOP_REF(defaultmain) selects the pin ref; pin parsing is fail-closed (escape residues, digest format, duplicates, CR).Closes #2080
Design
ULOOP_ARCHIVE_MANIFEST→ use it (no pin fetch).raw.githubusercontent.com/$REPOSITORY/$ULOOP_REF/Packages/src/project-runner-pin.json, takedispatcherArchiveManifest+dispatcherReleaseTag.ULOOP_VERSIONoflatest/latest-beta(or unset) is replaced by the pin tag; an explicit tag must match the pin or the install fails.ULOOP_ARCHIVE_MANIFEST.Test plan
sh scripts/test-install-pin-manifest.sh(exit 0)sh scripts/test-install-archive-manifest.sh(exit 0)sh scripts/test-install-version-format.sh(exit 0)sh scripts/test-install-release-filter.sh(exit 0, including new pin-fallback e2e cases)scripts/check-go-cli.sh(exit 0)ULOOP_REF=v3-beta ULOOP_INSTALL_DIR=$(mktemp -d) sh scripts/install.sh→Using dispatcher release dispatcher-v3.1.0-beta.16 pinned at v3-beta, install succeeded,--versionprinted3.1.0-beta.16scripts/test-install-pin-resolution.ps1+ parse check) — no localpwsh/powershellon this machinecheck-release-triggers, Linux shell tests, Git Bash release-filter, Windows PowerShell)