Skip to content

Ubicloud pack no longer fails while git rewrites a ref, and the HOLD SCOPE eval stops requiring the mode name - #4447

Merged
capy-ai[bot] merged 1 commit into
mainfrom
ubicloud-pack-skips-refs-being-rewritten
Nov 17, 2026
Merged

capy-ai[bot] merged 1 commit into
mainfrom
ubicloud-pack-skips-refs-being-rewritten

Conversation

@garrytan

@garrytan garrytan commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner

Packing a checkout for a Ubicloud run no longer fails when git running beside it is rewriting a ref, and the /plan-ceo-review HOLD SCOPE eval no longer fails a review whose follow-up question doesn't repeat the mode name.
Why: both made tests fail at random. The pack race failed Free Tests twice on 2026-11-17, and the HOLD check failed the weekly eval census on main.
Nothing to do.

What changed

Before, pack died with 'not our ref 0000…' when one ref was unreadable; now it skips that ref and ships the rest

Before, pack died with 'not our ref 0000…' when one ref was unreadable; now it skips that ref and ships the rest.

Agent notes

Daily flaky-fix pass 2026-11-17 (GSTA-579, GST-2983).

  • Free: test/ubicloud-runner.test.ts "pack snapshots a plain checkout without reading its live .git…", Free Tests 44063454800 shard 10 (gst-2737-plain-pr-bodies @ aa3d27f) and 44050883970 shard 7 (approval-page-keeps-reviewer-product-challenges-open @ 507827f), both passed on serial retry. REPEAT of the 2026-10 entry fixed in v1.92.33.0 fix(flaky): 2026-10-31 flaky pass — paid detector gaps, Windows cold first launches, fixture races, ubicloud pack index copy (GSTA-199) #3697 (a different cause: cp of the live index). Mechanism repro on this machine: 1 failure in 746 fetches under ref churn; deterministic repro with an empty loose ref.
  • Paid (periodic census 43815320847, main 8c3c39b): plan-ceo-mode-routing HOLD failed "decision is not current HOLD work". A local replay of that run's decision through the real judge after this fix still fails, because the judge rated the model's post-mode question (how to treat unverified premises) "uncertain" rather than a HOLD remedy. So this fix removes one false-fail path but would not have turned that run green; the rest is model variance in which question comes first after the mode.
  • No thresholds, trial counts or case kinds changed. No retries added.

Open in Capy

Before/after as text: Before, pack died with 'not our ref 0000…' when one ref was unreadable; now it skips that ref and ships the rest
--- Before · before.txt · captured output
+++ After · after.txt · captured output
 $ ubi-runner.sh pack checkout   # one empty loose ref file, as when git beside it is mid-write
+exit=0
+warning: ignoring broken ref refs/heads/broken
+$ git for-each-ref --format=%(refname)   # inside the snapshot
+refs/heads/detached-20e414e45232
+refs/heads/main
+refs/heads/side
-exit=1
-fatal: git upload-pack: not our ref 0000000000000000000000000000000000000000
-fatal: remote error: upload-pack: not our ref 0000000000000000000000000000000000000000
-ubi-runner: pack: could not snapshot the refs of <fixture>/s2
 

Free Tests failed with not our ref 0000000000000000000000000000000000000000 while ubi-runner.sh pack copied a checkout that another git command was changing. Pack used to fetch '+refs/*:refs/*', and git's upload-pack lists a ref it can't read (a loose ref file caught mid-write or mid-delete) with a null id, so the fetch asked for an object that doesn't exist. Pack now reads the refs once with git for-each-ref, which skips an unreadable ref with a warning, and fetches exactly those object ids. A new test holds that state still with an empty loose ref file.

The /plan-ceo-review HOLD SCOPE eval check required the decision question's "Project/branch/task" line to say "HOLD SCOPE". The skill never asks the model to repeat the mode there, and the decision is already tied to the HOLD answer by session and order. Now only a line that names another mode, or past or hypothetical work, fails, and a new test keeps those negative cases.

Why

"not our ref 0000…" failed Free Tests runs 44063454800 and 44050883970 on 2026-11-17, and the HOLD check failed eval census run 43815320847 on main. Both were false failures, so a red run now means a real problem in these two places.

Blast radius

cmd_pack is the only caller of the changed fetch, and every Ubicloud test and eval run goes through it. It stays safe because the script runs under set -euo pipefail (ubi-runner.sh:150), so a failing for-each-ref still stops the pack, and a script run on three test checkouts (normal, unreadable ref, no refs at all) shipped the right refs each time. The HOLD check change is in a test helper only.

Pre-Landing Review

No issues found that block the merge. Two reviewers read the whole diff: a combined testing, security and state-machine reviewer found nothing, and an adversarial reviewer left two low-severity notes, listed below and not fixed here.

Review notes

Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.

  • INFORMATIONAL scripts/ubicloud/ubi-runner.sh:1708 checked-out branch made unreadable mid-pack leaves the snapshot HEAD on an unborn branch instead of dying
  • INFORMATIONAL scripts/ubicloud/ubi-runner.sh:1708 empty ref list makes fetch --stdin fetch HEAD into a stray FETCH_HEAD
Exploratory QA

Functional smoke on ubi-runner.sh pack, 3 probes, all pass: a normal checkout ships main, side and an annotated tag at the right ids with HEAD on main; a detached checkout with an empty loose ref ships every readable ref and skips the broken one; a detached checkout with no refs still ships a branch at HEAD. Not covered: live concurrent ref churn (the empty ref file holds that state still) and macOS git and tar.

Design Review

No frontend files changed — design review skipped.

Eval Results

No prompt-related files changed — evals skipped. The HOLD SCOPE change is in an eval check, covered by its unit tests (80 pass).

Review bot comments

No review bot comments.

Scope Drift

Scope Check: CLEAN

Plan Completion

Plan completion audit: not run (no plan is bound to this branch and no docs/designs/ file matches). This is a flaky-test repair, which needs no plan.

Verification Results

No plan verification list applies (flaky-test repair). The exploratory probes above are the executed checks: 3 PASS, 0 FAIL, 0 BLOCKED, 0 NOT RUN.

TODOS

No TODO items completed in this PR.

Documentation

Status: current. The docs already match this change, so nothing was edited and there are no blockers.

Scope: the commit 307eed2, which changes 5 files compared with base b79843c. Those files are scripts/ubicloud/ubi-runner.sh (pack now reads refs with git for-each-ref and fetches those exact objects), test/helpers/ceo-hold-posture-review.ts and its test, test/ubicloud-runner.test.ts, and the changelog.d fragment. Every tracked or new Markdown, text and template doc was searched for the pack ref-selection step and the HOLD SCOPE context check.

Documentation health:

  • changelog.d/ubicloud-pack-skips-refs-being-rewritten.md: current. It matches the code diff.
  • CHANGELOG.md: current. The existing pack entry says refs are fetched through git's transport, which is still true.
  • docs/evals/detector-inventory.md: current. It does not list the HOLD SCOPE helper.
  • Other docs: no references to the changed behavior.

Coverage debt: none. The change is internal runner and test-helper behavior with no new public surface. There is no architecture diagram drift.

Tests
  • bun run test (Free Tests run 44102746515 at 307eed2): 1681 test files passed, every shard green
  • bun test test/ubicloud-runner.test.ts: 29 pass, 0 fail
  • bun test test/ceo-hold-posture-review.test.ts: 80 pass, 0 fail
  • bun test test/ceo-mode-routing-fixture.test.ts: 11 pass, 0 fail
Agent notes

Daily flaky-fix pass 2026-11-17 (GSTA-579, GST-2983).

  • Free: test/ubicloud-runner.test.ts "pack snapshots a plain checkout without reading its live .git…", Free Tests 44063454800 shard 10 and 44050883970 shard 7, both passed on serial retry. Mechanism repro: 1 failure in 746 fetches under ref churn; deterministic repro with an empty loose ref.
  • Paid (periodic census 43815320847, main 8c3c39b): plan-ceo-mode-routing HOLD failed "decision is not current HOLD work". A local replay of that run's decision through the real judge after this fix still fails, because the judge rated the model's post-mode question "uncertain"; this removes one false-fail path but would not have turned that run green.
  • No thresholds, trial counts or case kinds changed. No retries added.

REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=0 fixed=0 scope=frozen ledgers_read=3 dispatches=1
Gate edits: none detected (3 listed, 1 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)

Approvals

No approvals recorded for branch ubicloud-pack-skips-refs-being-rewritten.
Plan: exempt: flaky
Plan check: exempt flaky

{
  "schema_version": 1,
  "pr": 4447,
  "head": "307eed20dff710f7afc0cfd5617baa806e7e1e92",
  "version": "1.100.0.0",
  "base": "main",
  "gate": {
    "unit": {
      "pass": 1681,
      "fail": 0,
      "skip": 0
    }
  },
  "ci_carried": [
    {
      "lane": "unit",
      "run": 44102746515,
      "attempt": 1,
      "tree": "fbfc137adb0092af55e1997734f39346db59bdc2"
    }
  ],
  "session_kind": "unattended",
  "run": "ship-4447",
  "head_tree": "fbfc137adb0092af55e1997734f39346db59bdc2",
  "product_patch_id": "ec95fef13195420841087d8730eb14b6025840d6",
  "gstack_version": "1.100.0.0",
  "review_depth": {
    "depth": "light",
    "class": "code",
    "runtime_lines": 6,
    "rules": "66e5174161eecc2c",
    "base": "b79843c5d7021c870dc31d7bd9c3eadbfdf95bf2",
    "registry": "b79843c5d7021c870dc31d7bd9c3eadbfdf95bf2",
    "gate_scan": {
      "tagged": 0,
      "head": "307eed20dff710f7afc0cfd5617baa806e7e1e92"
    },
    "reasons": [
      "runtime=6"
    ],
    "risk": [],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @fbfc137adb00 (8 checks, current for 307eed20dff7)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/44102746515/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=fbfc137adb00 tests=37501 skipped=69 runs=44102746515/1 profiles=ci-reuse/free-tests heads=307eed20dff7 verified=2026-11-17T14:37:35.046Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "docs/, README.md, CONTRIBUTING.md, ARCHITECTURE.md, AGENTS.md, CLAUDE.md (151 docs) against origin/main...307eed20"
  },
  "review_loop": {
    "passes": 1,
    "blocking_found": 0,
    "deferred": 0,
    "noted": 0,
    "fixed": 0,
    "scope": "frozen",
    "rounds": 1,
    "ledgers_read": 3,
    "dispatches": {
      "specialist": 1
    }
  },
  "gate_dispositions": []
}

…ops requiring the mode name in its follow-up question

Pack read every ref through upload-pack, which advertises an unreadable loose ref with a null id; it now fetches the ids one for-each-ref read returns. The HOLD posture check binds the decision by session and order instead of by the words HOLD SCOPE in its grounding line.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@trunk-io

trunk-io Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

@capy-ai
capy-ai Bot merged commit b49ed6a into main Nov 17, 2026
54 checks passed
This was referenced Nov 18, 2026
capy-ai Bot added a commit that referenced this pull request Nov 18, 2026
- A test, or a scratch repository in the temp directory, can no longer write approval rows into your real Capy Drive (GST-3027). (#4466)
- An unattended /autoplan run on Claude Code no longer says the publication guard is off while it is on. (#4481)
- A phase report written only in reasoning now gets a denial that says so and names the fix. (#4481)
- `gstack-autoplan revise` no longer refuses a plan that the first `next` accepted. (#4470)
- `revise --plan` with a different file now says the run follows that file. (#4470)
- A second-model plan review in `/autoplan` is no longer reported as unavailable when it actually ran (GST-3051). (#4471)
- The /ship conductor trial plan now lets case reverts that conflict with later code be resolved by hand in docs, tests and the planted file, so large pull requests can be cases (GST-3003). (#4460)
- A locked plan for a trial of /ship without its separate conductor subagent (GST-3003). (#4456)
- A driven /ship now runs each phase as one command, counts its calls, and stops itself at 100 minutes. (#4451)
- /ship stops asking owners to clear two kinds of bookkeeping noise: base-side merge text and a reviewer's confirmation prose. (#4458)
- A base merge that only touched base-side text no longer stops `/ship` finish for an owner's grant. (#4458)
- A reviewer's confirmation prose no longer becomes a Critical finding that only an owner can clear. (#4458)
- A CI run that passed only after its failed jobs were re-run is now marked wherever gstack reuses it. (#4473)
- /ship reuses CI's passing test run when merging the base changed no file, and stops instead of quietly starting hour-long test runs or reviewing an empty diff (GST-3019). (#4461)
- /ship on Codex no longer stops at the test coverage audit. (#4489)
- A cold first-use check before an app build reaches its owner (GST-3025). (#4465)
- `skill_prefix=true` now survives updates when gbrain is installed. (#4454)
- The OpenClaw docs no longer send you to ClawHub, which held only April 2026 builds of office-hours, ceo-review and retro and no longer has gstack skills (the docs also said four skills while listing three). (#4454)
- `gstack-issue-links` no longer reads other repositories' issues as gstack's. (#4454)
- /ship's pre-gate finds the tests of a monorepo app that imports through its own `@/` alias. (#4464)
- /office-hours explains why it recommends a mode. (#4450)
- /office-hours keeps its 34 founder videos and essays out of the skill file. (#4463)
- Two `gstack-owner-answers add` runs for the same answer no longer collide. (#4490)
- A Captain can check an ask against the owner's earlier answers before sending it. (#4467)
- `gstack-post` stops reading /ship's own receipt identifiers as phone numbers, so posting a /ship PR body no longer needs a confirm. (#4488)
- GitHub release notes now list every change in plain words, with a link to its pull request. (#4390)
- gstack's router no longer gives bug reports a special rule, so the model fixes a bug the way it would without gstack. (#4442)
- /ship's review plan now sorts Swift and Xcode files by risk instead of sending every iOS PR to the full review panel (GST-3041). (#4469)
- /ship's review plan now sends Swift code that touches private user data to the full review panel (GST-3052). (#4472)
- A round grant at /ship's review round cap now buys the fix round it names, in the same run or the next (GST-2968). (#4479)
- The secrets check stops flagging three kinds of ordinary code as a secret, and catches two misses. (#4457)
- A security finding's location and reason no longer go into a PR body. (#4486)
- The token-capped /ship child on Claude Code now starts its prompt with the typed `/ship` command, so the skill actually loads. (#4487)
- A /ship receipt now counts the second-model review's blocking findings, and refuses to be written while one is still open. (#4485)
- A `/ship` with a token cap on Claude Code no longer stops at its first handoff. (#4452)
- /ship's push step now always ends with one line that says whether it pushed (GST-3053). (#4474)
- A PR's review-round count can no longer be overwritten by the body `/ship` posts. (#4440)
- One queued record with a malformed path no longer stops artifacts sync for every project. (#4455)
- A failed artifacts push stays reported until a push succeeds. (#4455)
- The /sync-gbrain memory row no longer says OK when pages failed to import. (#4455)
- ### Tests (#4495)
- A policy-floor test no longer fails once gstack's own version reaches the minor after the newest policy key; it now checks a floor above both, so the v1.101.0.0 release can pass CI. (#4495)
- CI now uploads free-suite test results to Trunk with analytics-uploader v2.1.8 and analytics-cli 0.17.0, up from v2.1.6 and 0.16.2. (#4453)
- Packing a checkout for a Ubicloud run no longer fails when git beside it is rewriting a ref. (#4447)
- The /plan-ceo-review HOLD SCOPE eval no longer fails a review because its follow-up question didn't repeat the mode name. (#4447)
- Unattended /autoplan now records the owner's relayed gate reply instead of refusing it. (#4484)
- Unattended /autoplan now runs the second-model review you turned on, and waits for it instead of ending the session. (#4459)
- Two /autoplan runs started in the same second no longer share a run id. (#4459)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
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