Skip to content

Commit d5b6f08

Browse files
amiorinclaude
andcommitted
Deploy TaskContext through the pocketdeploy-v2 environment
TaskContext moved to the pocketdeploy-v2 host on 24 October 2026. The deploy step no longer requires the once-v2 restricted `deploy` user; the PocketDeploy key is a ping that deploys every host it owns. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011MijjzEmiVzp8WxXquxQ8S
1 parent 4683eab commit d5b6f08

4 files changed

Lines changed: 20 additions & 18 deletions

File tree

‎.github/workflows/image.yml‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,14 +218,13 @@ jobs:
218218
219219
# Pinned by ONCE at provisioning time, not scanned here. Fail closed.
220220
if [ -z "$SSH_KNOWN_HOSTS" ]; then
221-
echo "SSH_KNOWN_HOSTS is unset; configure the once-pocketcontext-v2 deployment environment" >&2
221+
echo "SSH_KNOWN_HOSTS is unset - configure the deployment environment before releasing" >&2
222222
exit 1
223223
fi
224224
printf '%s\n' "$SSH_KNOWN_HOSTS" >> ~/.ssh/known_hosts
225225
226-
# The fixed shared dispatcher accepts no remote command or registry credentials.
226+
# A ping, not a command: the PocketDeploy key deploys every host it owns.
227227
# It resolves latest to a digest; the workflow does not attest the live source revision.
228-
test "$SERVER_USER" = deploy
229228
ssh -T -o BatchMode=yes -o StrictHostKeyChecking=yes "$SERVER_USER@$SERVER_IP" < /dev/null
230229
- name: Verify public health
231230
run: |

‎README.md‎

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -146,19 +146,20 @@ The Dockerfile pins PocketContext, base images, and Litestream. It serves port 8
146146

147147
An empty volume must restore an existing replica before the server starts. A missing or inaccessible replica stops startup. A fresh install requires a one-shot `docker run --rm` with the same environment, network and `/storage` volume and the image command `init`; it refuses any existing local state or replica. Start normally afterward to begin replication. Failed initialization leaves a durable marker and requires operator recovery into a fresh volume. The backup includes account hashes and any stored SMTP or OAuth provider credentials, so the bucket must remain private. No issue attachments are implemented, but recovery inventories every file field in the actual PocketBase schema, including user avatars. It streams each referenced S3 object and verifies complete readability and response length; there is no authoritative checksum for cryptographic comparison. Recovery stages and checks SQLite and files before atomically installing the database. Frozen starts require matching persisted S3 settings and an existing valid `auxiliary.db`.
148148

149-
Production runs through the maintained `once-pocketcontext-v2` scaffold with
150-
separate `taskcontext-files` and `taskcontext-replica` buckets. Keep credentials
151-
in that scaffold's ignored private configuration. Public image pulls are required
152-
by the commandless shared deployment dispatcher.
149+
Production runs through the private `pocketdeploy-v2` scaffold with separate
150+
`taskcontext-files` and `taskcontext-replica` buckets; it moved there from
151+
`once-pocketcontext-v2` on 24 October 2026 by recovery from the replica. Keep
152+
credentials in that scaffold's ignored private configuration. Public image pulls
153+
are required by the commandless deployment trigger.
153154

154155
## Continuous deployment
155156

156-
The main-only `once-v2` GitHub environment supplies the dedicated restricted SSH
157-
key and pinned host identity. `CONTEXT_DEPLOY_PAUSED=true` pauses deployment while
158-
validation and publication continue. App-local installers and wrappers are retired.
159-
The maintained shared dispatcher locks the target, resolves an immutable image,
160-
stops the sole writer with a 300-second timeout and preserves volumes. There is
161-
no automatic rollback; inspect pending state before any retry. See the
157+
The `pocketdeploy-v2` GitHub environment, named by the repository variable
158+
`COLORS_PROFILE`, supplies the PocketDeploy SSH key and pinned host identity.
159+
`CONTEXT_DEPLOY_PAUSED=true` pauses deployment while validation and publication
160+
continue. App-local installers and wrappers are retired. The host deploys with a
161+
stop-first policy: one writer, a 300-second graceful stop and preserved volumes.
162+
There is no automatic rollback. See the
162163
[common CI and deployment contract](docs/ci-and-deployment.md).
163164

164165
## Validate

‎docs/ci-and-deployment.md‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ reject old reruns; they do not lock Git refs, and main can advance after a check
1919
Concurrency serializes running releases but does not guarantee commit ordering
2020
or execution of every pending run. Do not cancel a deployment in progress.
2121

22-
The active deployment uses the main-only `once-v2` GitHub environment and its
23-
existing app-specific restricted SSH key. `CONTEXT_DEPLOY_PAUSED=true` disables
24-
deployment without disabling validation or image publication.
22+
TaskContext deploys through the GitHub environment named by `COLORS_PROFILE`,
23+
now `pocketdeploy-v2`, and its PocketDeploy SSH key. `CONTEXT_DEPLOY_PAUSED=true`
24+
disables deployment without disabling validation or image publication. The other
25+
applications still use their `once-v2` environments and the shared dispatcher
26+
described below.
2527

2628
Deployment sends no caller-selected remote command or registry credentials.
2729
Strict host-key checking and a dedicated forced-command key select the permitted

‎tests/deploy_workflow.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def run_step(self, name, known_hosts='synthetic-pinned-host-key', failing_tool='
6161
executable.chmod(0o700)
6262
env = dict(os.environ, HOME=str(root), PATH=str(root) + ':' + os.environ['PATH'],
6363
SYNTHETIC_CALLS=str(calls), FAILING_TOOL=failing_tool, SSH_PRIVATE_KEY='synthetic-private-key',
64-
SSH_KNOWN_HOSTS=known_hosts, SERVER_USER='deploy',
64+
SSH_KNOWN_HOSTS=known_hosts, SERVER_USER='ubuntu',
6565
SERVER_IP='192.0.2.1')
6666
result = subprocess.run(['bash', '-e', '-o', 'pipefail', '-c', script(name)],
6767
env=env, text=True, capture_output=True, timeout=10)
@@ -81,7 +81,7 @@ def test_ssh_uses_pinned_identity_without_remote_command(self):
8181
self.assertEqual(result.returncode, 0, result.stderr)
8282
self.assertEqual(hosts, 'synthetic-pinned-host-key\n')
8383
self.assertEqual([event for event in calls if event[0] == 'ssh'], [
84-
['ssh', '-T', '-o', 'BatchMode=yes', '-o', 'StrictHostKeyChecking=yes', 'deploy@192.0.2.1']])
84+
['ssh', '-T', '-o', 'BatchMode=yes', '-o', 'StrictHostKeyChecking=yes', 'ubuntu@192.0.2.1']])
8585
self.assertNotIn('synthetic-private-key', result.stdout + result.stderr)
8686
self.assertNotIn('ssh-keyscan', script('Deploy via SSH'))
8787

0 commit comments

Comments
 (0)