Skip to content

fix(deploy): deploy scripts read the repository from origin, not a stale owner - #240

Merged
bk-agent-01 merged 1 commit into
expbkmainfrom
t3code/deploy-repo-slug
Sep 27, 2026
Merged

bk-agent-01 merged 1 commit into
expbkmainfrom
t3code/deploy-repo-slug

Conversation

@bk-agent-01

Copy link
Copy Markdown
Collaborator

Problem

All six deploy scripts pinned the GitHub API to beknown-work/bkt3code. The repository has since been transferred to iamtushar324, so that path answers with a 301 and nothing else:

$ curl -s -w '%{http_code}\n' https://api.github.com/repos/beknown-work/bkt3code/actions/workflows/deploy-bkt3.yml/runs?branch=bkmain
{"message":"Moved Permanently", ...}
301

auto-deploy.sh read that with a curl that did not follow redirects, so jq got the redirect body and failed on every timer tick:

t3-deploy-with-github-token[3778358]: jq: error (at <stdin>:5): Cannot iterate over null (null)
t3-bkmain-deploy.service: Main process exited, code=exited, status=5/NOTINSTALLED

This is not theoretical — it fired today. After #224 merged, Validate and deploy bkt3 went green for aa846e707 and the artifact was built, but bkt3 stayed on 9d309d657 through ~10 minutes of failing timer ticks until the artifact was installed by hand.

The redirect-following flag has since been added to the three auto-deploy.sh scripts, which unblocks today. But every script still depends on a redirect that GitHub keeps only until someone claims the old name — at which point the deploy silently points at a repository we do not own.

Fix

Each script derives the slug from its own checkout's origin remote, and fails with a clear message if that is not an owner/name pair:

REPOSITORY="$(git -C "$REPO_DIR" remote get-url origin | sed -E 's#^(git@github\.com:|https://github\.com/)##; s#\.git$##')"
if [[ ! "$REPOSITORY" =~ ^[^/]+/[^/]+$ ]]; then
  echo "ERROR: could not read the GitHub repository from origin in $REPO_DIR." >&2
  exit 1
fi

No owner is hardcoded anywhere in deploy/ now, so the next transfer needs no change here. Kept standalone per script rather than adding a shared sourced file, matching how these six scripts are already written.

Verification

  • bash -n clean on all six.

  • Derivation against all three live checkouts (t3code-bkmain, t3code-expbkt3, t3code) yields iamtushar324/bkt3code and passes the guard.

  • The derived URL returns runs for each environment's workflow:

    Workflow Branch Result
    deploy-bkt3.yml bkmain 65 runs, latest aa846e707 success
    deploy-expbkt3.yml expbkmain 286 runs, latest e1d692cb0 success
    deploy-t3.yml t3main 9 runs, latest 983e3edaf success

No application code changes, so no UI evidence applies.

Model: Claude Opus 5 via Claude Code in T3 Code.

🤖 Generated with Claude Code

…ale owner

All six deploy scripts pinned the GitHub API to beknown-work/bkt3code. The
repository has since been transferred to iamtushar324, so that path answers
with a 301 and nothing else. auto-deploy.sh read it with a curl that did not
follow redirects, so jq got the redirect body and failed with "Cannot iterate
over null" on every timer tick; bkt3 sat on old code after a green build until
the artifact was installed by hand. The redirect-following flag has since been
added, but every script still depends on a redirect GitHub only keeps until
someone claims the old name.

Each script now derives the slug from its checkout's origin remote and fails
with a clear message if that is not an owner/name pair, so the next transfer
needs no change here.

Model: Claude Opus 5 via Claude Code in T3 Code.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M labels Sep 27, 2026
@github-actions

Copy link
Copy Markdown

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire — 13.8 KiB — 15.1 KiB ✅
Codex Thread snapshot wire — 7.3 KiB — 7.8 KiB ✅
Codex Live turn WebSocket wire — 6.5 KiB — 7.8 KiB ✅
Codex Live turn WebSocket decoded — 57.1 KiB — 66.4 KiB ✅
Codex Live turn messages — 10 — 21 ✅
Claude Total thread wire — 13.8 KiB — 15.1 KiB ✅
Claude Thread snapshot wire — 7.3 KiB — 7.8 KiB ✅
Claude Live turn WebSocket wire — 6.5 KiB — 7.8 KiB ✅
Claude Live turn WebSocket decoded — 57.9 KiB — 66.4 KiB ✅
Claude Live turn messages — 9 — 21 ✅

Baseline: unavailable · PR result: 0db974f · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 114.9 KiB
  • Claude decoded thread snapshot: 115.6 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@bk-agent-01
bk-agent-01 merged commit 7a0ca0d into expbkmain Sep 27, 2026
18 checks passed
@bk-agent-01
bk-agent-01 deleted the t3code/deploy-repo-slug branch September 27, 2026 20:33
bk-agent-01 added a commit that referenced this pull request Oct 1, 2026
Promote expbkmain: reconnects no longer wait on editor and SSH discovery (#248), plus #240 and #244
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant