Repository navigation
Conversation
…ision Log 40) production-deploy.sh and production-run.sh fold the owner's out-of-repo wrappers (prep-deploy, deploy-master, poll-build) in beside the staging runners, with their mechanism aimed at production: config.json must name exactly desk-hub / its host / ssfskim (staging names and preview aliases refused as not production) before anything runs; the deploy runs only for the checkout's HEAD named by --confirm, at origin/master unless --allow-head; tokens read by path inside the pipe; output filtered; every wrangler target desk-hub; production's X-Desk-Build polled 2 minutes for hub@<sha8>. The runner's checkout, build, wait, access-sync and admin steps (M2's command) announce any production change first. Offline suite with stubs on PATH; README 'Production runs'. Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
…y key Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
…ked and rechecked, a 2-minute deadline, build fails with a reason production-deploy.sh holds a lock on the checkout's git directory for the whole run, which production-run.sh checkout takes too, and after the web build (which may queue under DESK_HEAVY_WRAPPER) requires the confirmed HEAD and a clean tree again before any token is handed over. The deploy's wait and 'wait <sha8>' run to an elapsed-time deadline of 2 minutes, each read's --max-time and each pause cut to what is left (twelve 30 s reads had made it 470 s). 'build' fails with what it read when production gives no hub build. Tests: a checkout switched during the build, a held lock, slow reads against a fake clock, a curl that cannot connect. Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f182dab178
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| git -C $W fetch -q origin master && git -C $W worktree add -q -f --detach $P origin/master || { print -r -- "could not add a worktree of origin/master at $P: stop"; exit 2; } | ||
| fi |
There was a problem hiding this comment.
Lock newly created checkouts before installing dependencies
When the destination does not exist, this branch creates the worktree without acquiring its desk-production.lock, then proceeds to the potentially queued dependency install. Once the worktree exists, another checkout or production-deploy.sh invocation can acquire that lock and operate on it while the first install is still running. This permits concurrent dependency installation and production build/deploy operations despite the existing-checkout branch explicitly preventing that overlap; the deploy's HEAD and tracked-cleanliness recheck does not detect changes to node_modules. Acquire and hold the destination's lock for the new-worktree installation path as well.
Useful? React with 👍 / 👎.
…Decision Log 40's fold complete Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
P5 O13 M1: production's deploy steps, committed to the repository (P5 Decision Log 40).
Hub v2's first production deploy, and the org's root and the phone's approval after it, now run from two committed scripts beside O11's staging runners. Until now they ran from wrappers outside the repository. The scripts use the staging scripts' mechanism with the roles swapped. Nothing in this PR runs against production. Only the owner runs these scripts.
apps/desk-hub/deploy/production-deploy.sh --checkout <path> --confirm <sha8> [--allow-head] [--dry-run]:config.jsonmust name exactlydesk-hub/desk-hub.opencognita-platform.workers.dev/ssfskim. Any staging name or preview alias is refused.--confirmmust equal the checkout's HEAD short hash. The checkout must be clean and atorigin/masterafter a fetch, unless--allow-headis given; such a build is labelledhead.<sha8>.DESK_PRODUCTION_SECRETSinside the pipe and go to the deploy on stdin. Output goes through the staging filter, and logs are written underDESK_PRODUCTION_DIR(0700).wrangler targetline must namedesk-hub, thenX-Desk-Buildis polled to a 2-minute elapsed deadline forhub@<sha8>.apps/desk-hub/deploy/production-run.shsteps:checkout [<path>]: a durable path, never/tmp, with the same lock.build: fails with a reason when no build header is read.wait <sha8>.access-sync: needs O14's first production machine's credentials.admin <args…>: M2'sdeployment adminwith the owner's Access token. Any step that changes production prints so on its first line, andgenesisis never logged.The branch also carries the O13 spec's living sections.
Validation Evidence
npx vitest run --project desk-hub apps/desk-hub/test/deploy/production-scripts.test.ts→ 40/40, offline, with stubs for pnpm, wrangler, cloudflared, curl and sleep on PATH. Covered:--confirmrefusal, and a master that moved past the checkout;checkoutrefused while the lock is held;token/secret/bearer/eyJlines, and flushing line by line;zsh; it skips without it, as the staging suites do.tsconfig.test.jsontypecheck: clean.buildsucceeded silently on a failed read.scripts/ci-gate.sh <wt> --gates static,unit --class1a poolon f182dab (the PR head): GREEN, run 40619525075. production-scripts.test.ts ran in the unit job: 40 tests passed, none skipped.Residue
none
Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)