Repository navigation
v1.92.41.0 fix(ubicloud): pack and usage on macOS, reap and up on an empty project (#3680, #3679, #3678) - #3746
Merged
Conversation
…3678) pack builds its archive in two tar passes plus gzip, which bsdtar and GNU tar both accept, with COPYFILE_DISABLE=1 so Apple's tar adds no ._* files. vm_rows skips the blank row Ubicloud returns for a project with no VMs. usage parenthesizes its ternary for the one-true-awk and exits 1 on an unreadable list or size; the quota preflight logs that and defers to the API. Co-authored-by: Jared <[email protected]> Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ist; spawn timeout) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…path Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
3 tasks done
Rule 19 grant (GStack Minder). #3585 split test/ubicloud-runner.test.ts; the four tests this branch added move unchanged into test/ubicloud-runner.test.ts and test/ubicloud-runner-verify-quota.test.ts, and the fake API's list/show change moves into test/helpers/ubi-runner-fake-vm.ts. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
garrytan
added a commit
that referenced
this pull request
Nov 1, 2026
Rule 19 grant (GStack Minder), after #3746 landed as v1.92.41.0. #3585 split test/ubicloud-runner.test.ts; this branch's test edits move unchanged into test/ubicloud-runner.test.ts, -run and -verify-quota. The #3746 changelog fragment is dropped: main already carries it in CHANGELOG.md. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
gstack-ubi on a real Mac (Dyson Sphere, macOS 27.0.1): pack, usage and reap fail on main and work on this branch.
Before/after as text: gstack-ubi on a real Mac (Dyson Sphere, macOS 27.0.1): pack, usage and reap fail on main and work on this branch
Why
"On macOS,
gstack-ubi packexits 1, sosync(and everyrun/verifythat syncs) fails" (#3680). The same Mac's awk rejected one line ofusage, which also turned the vCPU quota check off (#3679), and on any machine a Ubicloud project with no VMs madereapand everyupdie withinvalid VM name '-'(#3678). Now a Mac user can sync and run on Ubicloud, the quota check works there, and a fresh project can start its first VM.Blast radius
Only
scripts/ubicloud/ubi-runner.shchanges behavior:pack(used bysync,run,verifyand the remote pregate),vm_rows(feeds reap, gc, list, usage and teardown),usageand the quota preflight. What makes it safe: the whole runner suite passes under both GNU and BSD userlands (script ran: 75 tests with GNU tools, 52 with bsdtar 3.7.2 and original-awk on PATH), the remote pregate ran this branch's pack and VM lifecycle end to end on Ubicloud (226 tests, 0 failed, VM destroyed), and a no-VM smoke ran main and this branch side by side on a real Mac (repro).Approvals
Source: gstack-approvals record for gsta210/ubicloud-macos-empty-project (display only; not an approval citation).
Summary
Three bugs reported by Jared, each reproduced on main 5ba425a before the fix with a test that fails there:
-Tnames after a-C, so no single tar command line works on both tars. Pack now buildsfiles.tarfrom the file list, appends the.gitsnapshot withtar -rf, and gzips it, all chained with&&so a failure leaves no partial stream.COPYFILE_DISABLE=1stops Apple's tar from adding._*AppleDouble entries: checked on the Mac, a file with an extended attribute packs as._aplusawithout it (GNU tar extracts both) and asaalone with it.printf's argument list is parenthesized, which every awk accepts.usagealso stops reporting a partial count as the project's usage: it exits 1 when the VM list or a size read fails, and it skips a VM that 404s because it was destroyed between the two reads. The quota preflight retries an unreadable usage whileUBI_QUOTA_WAIThas time left, then logs that it could not read usage and leaves the decision to Ubicloud's own refusal.vm liston an empty project with a bare newline;vm_rowsnow skips a row with no name, so nothing downstream sees a VM called-.Security read (crew rule for outside code): Jared's issues carried proposed diffs; they were read as text and rewritten here, and none of his scripts ran. The change adds no network call, no new environment or secret read, no permission change, no workflow, setup or install edit and no dependency.
COPYFILE_DISABLEis an Apple tar switch that other tars ignore.Test Coverage
All new code paths have test coverage. Regression proof: each new case fails at 5ba425a (or at the previous commit for the review fixes) and passes at this head.
test/regression-issue3680-ubicloud-bsd-userland.test.ts(new): pack under real bsdtar (tracked, staged, deleted, untracked, symlinked, spaced and option-like names, a linked worktree, an empty file list) and usage plus the quota refusal under the one-true-awk. It runs where those tools exist (macOS by default; Linux withlibarchive-toolsandoriginal-awk) and skips with the package name elsewhere, so Linux CI does not run it yet; see Review notes.test/ubicloud-runner.test.ts: an empty project for reap, usage and list --mine;upon an empty project; every pack tar runs withCOPYFILE_DISABLE=1; usage on an unreadable list or size, a VM destroyed since the list, and the preflight's log and wait retry.Tests ran: ubicloud 75
Pre-Landing Review
Pass 1 (specialist batched, Red Team at light depth) found 2 informational findings; the vanished-VM race was fixed in the diff and fix-checked, the CI-coverage gap is a handoff. Step 11's native adversarial pass found 3 low, non-blocking findings: the quota wait now retries an unreadable usage (fixed, fix-checked with no findings), the 404-means-destroyed reading is noted below, and the uncompressed staging copy is the plan's approved decision 1.
REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=2 fixed=1 scope=frozen dispatches=1
(The Step 9 row above was logged before Step 11; Step 11 added one more fix, the quota wait retry, checked by a second fix-check with no findings.)
Gate edits: none detected (5 listed, 1 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)
Outside review: not run (code class, no numeric claims); the Eng and CEO plan reviews had a GPT-6.1 Sol outside voice.
Review notes
bsdtarnororiginal-awkis on the Linux runners, and themacos-named-regressionsjob lists files explicitly. Handoff: GSTA-203 (owner of.github/workflows) addstest/regression-issue3680-ubicloud-bsd-userland.test.tsto that list after merge.vm showcounts as destroyed (adversarial, low). Ubicloud answers 404 for a name the project no longer has; a routing 404 would also break every other runner command for that VM.$TMPDIR(adversarial, low): the approved plan's decision 1; it fails closed on a full disk.reapdestroys any owner's expired-TTL VM, which the owner-scoped-deletes rule forbids. Tracked as GST-573 and fixed in the PR stacked on this one.Plan Completion
Plan: autoplan run ap-20261031175212 (CEO + Eng, one round, approved by GStack Minder "do it"). Every plan item is done; the four High review findings folded into the build are done (COPYFILE_DISABLE, usage failure exit, whole runner suite under BSD tools, real-Mac smoke).
Issues
Fixes #3678
Fixes #3679
Fixes #3680
Verification Results
test/ubicloud-runner.test.ts, so this branch's four tests moved unchanged intotest/ubicloud-runner.test.tsandtest/ubicloud-runner-verify-quota.test.ts, and the fake API's list/show change moved intotest/helpers/ubi-runner-fake-vm.ts. The runner, docs, changelog and BSD test diffs are byte-identical to before the merge, so the review carries (rule 30(b)).UBICLOUD: left=0; Windows Free Tests run 41316917146 succeeded.UBICLOUD: left=0.git status; main usage awk error / branch table; branchuprefuses at 20 of 16 vCPUs with 0 create requests; main reapinvalid VM name '-'/ branchno expired VMs.TODOS
No TODO items completed in this PR.
Documentation
Scope: the diff 5ba425a..fe2eb4b (ubi-runner.sh pack/vm_rows/usage/quota preflight, two test files, one changelog fragment), checked against docs/TESTING_INTERNALS.md, docs/pregate.md and ubicloud/SKILL.md.tmpl. Result: added one sentence to the Ubicloud runner paragraph of docs/TESTING_INTERNALS.md saying the quota preflight now retries an unreadable usage within UBI_QUOTA_WAIT, then logs and defers to the API, and that usage exits 1 on an unreadable list or size and skips a VM that 404s. The macOS bsdtar pack fix and the empty-project vm_rows fix are internal behavior with no documented contract, so no doc change. docs/pregate.md only mentions quota in failure classification, which is unaffected. Debt: ubicloud/SKILL.md.tmpl and its generated SKILL.md could mention the quota retry behavior; skipped because it needs regeneration.
Test plan
bun test test/ubicloud-runner.test.ts test/regression-issue3680-ubicloud-bsd-userland.test.ts test/ubicloud-pregate-remote.test.ts test/spawnsync-timeout-tripwire.test.ts: 75 pass, 0 failtar-> bsdtar 3.7.2 andawk-> original-awk first on PATH: 52 pass, 0 failbun run typecheck: no errors