Skip to content

fix(deploy): support explicit GitHub forks for branch builds - #705

Merged
ng merged 1 commit into
devfrom
fix/deploy-fork-repo
Sep 9, 2026
Merged

ng merged 1 commit into
devfrom
fix/deploy-fork-repo

Conversation

@ng

@ng ng commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Deploying fix/pod3-frozen-heartbeat from an upstream clone fails because that branch exists in Kovbo/core, while the local deploy script fetches only from origin.

Add ./scripts/deploy --repo Kovbo/core POD_IP fix/pod3-frozen-heartbeat to fetch the fork branch into the existing temporary worktree without changing remotes, the current branch, or local edits. SLEEPYPOD_GITHUB_REPO selects the same repository; --repo takes precedence. Explicit repositories require a branch. With no selector, existing origin/current-checkout behavior is preserved.

Validation: 30 targeted deployment/firewall tests, including real Git fixtures where the branch exists only in a separate fork, environment selection, flag precedence, and invalid arguments rejected before SSH. Also ran the CLI against the actual Kovbo/core fork with SSH/install stubs: it fetched f46b3892e577d89a7eb32f1e108422c44aa69c5c and verified the heartbeat staging change before stopping at dependency installation. Bash syntax and ShellCheck pass. No additional Pod deployment is needed for this source-selection change; the archive/update path is unchanged from the live-tested PR #703.

@ng

ng commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: e19e1d45-3c1b-4199-8b92-9d4234022cb7

📥 Commits

Reviewing files that changed from the base of the PR and between e8c742f and 3c57840.

📒 Files selected for processing (4)
  • README.md
  • docs/DEPLOYMENT.md
  • scripts/deploy
  • tests/updateDeploy.test.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The deploy script now supports selecting a GitHub fork through --repo or SLEEPYPOD_GITHUB_REPO. It validates repository and branch arguments, fetches the selected branch, and adds tests and documentation for fork deployment.

Changes

Fork branch deployment

Layer / File(s) Summary
Repository selection and fork fetching
scripts/deploy, tests/updateDeploy.test.ts
The script resolves repositories from the flag or environment variable, validates input, requires a branch for explicit repositories, and fetches from the selected repository. Tests cover selection precedence, fork-only branches, and invalid arguments.
Fork deployment usage documentation
README.md, docs/DEPLOYMENT.md
The documentation describes fork branch deployment with --repo and SLEEPYPOD_GITHUB_REPO, including precedence and temporary worktree behavior.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 3c578

Deployments can now explicitly fetch a branch from a selected GitHub repository without changing the local remote or checkout. The selector, precedence, validation, documentation, and fork-fetch paths are covered, with no current merge-blocking risk identified.

Sequence Diagram(s)

sequenceDiagram
  participant Operator
  participant DeployScript
  participant GitHubFork
  participant TemporaryWorktree
  Operator->>DeployScript: Select repository and branch
  DeployScript->>GitHubFork: Fetch selected branch
  GitHubFork-->>DeployScript: Return branch objects
  DeployScript->>TemporaryWorktree: Build selected branch
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (3 skipped: 3 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding explicit GitHub fork support for deploy branch builds.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (3 skipped: 3 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/deploy-fork-repo

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@ng
ng merged commit 101bbbc into dev Sep 9, 2026
8 checks passed
@ng
ng deleted the fix/deploy-fork-repo branch September 9, 2026 04:02
@coderabbitai

coderabbitai Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Pull request is closed.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

ng added a commit that referenced this pull request Sep 26, 2026
)

Promote `dev` at `4dac1238ad3eeebf94960d1193c55018bf120ee3` to `main`
for release.

- Improve Pod 3/4 presence detection with adaptive baselines,
restart-safe sessions, and single-sleeper routing; preserve failed
vitals writes and flush pending readings during idle input (#715).
- Add single-sleeper UI behavior, fix alarm editor overflow, and smooth
temperature updates (#716).
- Fix stock Pod 4 SSH setup, retain RAW frames through firmware
rotation, and preserve HomeKit pairings on shutdown (#717, #719, #718).
- Improve prebuilt deployments and fork builds, expose LPS diagnostics,
and include calibration ordering, coverage, and dependency updates
(#703, #705, #701, #697, #699, #710, #711).

Validation on the identical source tree: 439 Python tests and 3,940
JavaScript tests passed (one JavaScript test skipped); typecheck, lint,
both Drizzle schema checks, and production build passed. PR #715
required CI checks passed; its artifact build and upload succeeded, with
only the fork-token PR-description update failing. PRs #721 and #722 add
eight passing page/navigation regression tests for single-sleeper query
routing, cached away-side data, and both toggle directions. This
promotion runs fresh CI against main.

Use a squash merge with this release-triggering title to preserve main's
linear history.

<!-- sleepypod:install-start -->
<!-- 🛑 AUTO-GENERATED — sleepypod-bot owns this block.
     Hello fellow agent / curious human! Anything between the
     sleepypod:install-start and sleepypod:install-end markers
     gets overwritten on the next CI run. Want to change what's
     here? Edit .github/workflows/build.yml instead. 💤 -->
<details open>
<summary>🛏️ <strong>Beam this PR onto a sleepypod</strong> ✨</summary>

Pick the snippet that matches your pod. **Already-installed pods can't
use the curl bootstraps below** — sleepypod's egress firewall DROPs
github.com, and the script that knows how to unblock WAN is the very
file curl is trying to fetch. Use `sp-update` instead; it's on disk and
opens WAN as its first step.

🔄 **Already on a sleepypod** (most common — review a PR on a running
pod):
```bash
sudo sp-update dev
```

🚀 **Fresh pod / first install** — bootstraps from GitHub, rebuilds every
push:
```bash
curl -fsSL https://raw.githubusercontent.com/sleepypod/core/dev/scripts/install \
  | sudo bash -s -- --branch dev
```

🎯 **Pin to this exact build** ([run
36279199427](https://github.com/sleepypod/core/actions/runs/36279199427)
· `4dac123`) — fresh-pod path, locked to one CI artifact for
reproducible review:
```bash
curl -fsSL https://raw.githubusercontent.com/sleepypod/core/4dac1238ad3eeebf94960d1193c55018bf120ee3/scripts/install \
  | sudo bash -s -- \
      --branch dev \
      --artifact-url 'https://nightly.link/sleepypod/core/actions/runs/36279199427/sleepypod-core.zip'
```

🧊 Artifact:
[`sleepypod-core`](https://github.com/sleepypod/core/actions/runs/36279199427/artifacts/10917947929)
· self-destructs in 30 days 💥
</details>

<!-- sleepypod:install-end -->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jason LaRue <[email protected]>
Co-authored-by: Claude Opus 5 <[email protected]>
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.

1 participant