Build and publish the image on merge to main #100
No reviewers
Labels
No labels
burndown-2026-08
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
coherence-core
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
qa-fixture
role/advocate
role/director
role/exec
role/frontend
role/gamedev
role/human
role/platform
role/qa
role/science
role/sysadmin
state
ambient
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-flight-deck/agent-proxy!100
Loading…
Reference in a new issue
No description provided.
Delete branch "build-publish-image"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #97.
agent-proxy had no publish lane of its own. The image was built from
coilyco-bridge/deploy, which cloned this repository at a resolved sha — so the source repository could not produce its own artifact.Copies the fleet
build-publishpattern (node-stats-mcp,bluesky-mcp,reddit-mcp): a gate job followed by a publish job on thedeployrunner callingscripts/publish-image.sh.Two deliberate differences from a literal copy
The gate uses this repo's own scripts and
scripts/telegram_alert.pyrather than the inlinepython3 -c 'exec("...")'blob the sibling repos carry. agent-proxy already has that helper wired intoci.yml, and the escaped one-liner is unreadable and unmaintainable.The gate repeats the
ci.ymlchecks rather than depending on them. Separate Forgejo workflows do not wait for one another, so a publish job that depended onci.ymlwould race it and could push an image whose tests never passed. The sibling repos avoid this becausebuild-publish.ymlis their CI; agent-proxy already has a separateci.yml, so a merge to main now runs the suite twice. That is deliberate — correctness over a minute of runner time. Say the word if you would rather foldci.ymlinto this workflow instead.Tag and immutability
forgejo.coilysiren.me/coilyco-flight-deck/agent-proxy:<sha>, full 40 characters. The script rejects anything that is not lowercase hexadecimal of exactly that length, so a short sha or a branch name can never become a tag. Nolatest. This matches whatdeploy'srollout_resolve_shaalready resolves and pulls, so nothing downstream needs to change.The build runs from the checkout rather than re-cloning the source repo at a sha the way the deploy-side script does. The checkout already is the immutable commit being published, so the clone is redundant here.
Credential handling
REGISTRY_TOKENis scoped to the publish step only. The script fails closed when it is absent, logs in through a privateDOCKER_CONFIGin amktemp -d, and removes that directory viatrapon exit, so no credential survives the job.Check before merging: this repo needs a
REGISTRY_TOKENsecret and a runner labelleddeploy. Both exist for the sibling repos; I could not verify from here whether they are attached to this repository.One thing the hooks caught
My first commit attempt was rejected —
actionlintdoes not know thedeployrunner label, which is only declared per-repo..github/actionlint.yamlnow lists it alongsidedocker. Worth noting the pre-commit gate did its job: the commit never landed, and I verified HEAD rather than assuming it had.Boundary preserved
This repository builds and publishes. It does not deploy. Rollout stays driven from
coilyco-bridge/deploy/services/agent-proxyper the source-to-deploy layer invariant, and that repo keeps its own publish lane as the rollback path. Documented indocs/image-publishing.md.Verification
pre-commit run --all-files— every hook passes,actionlintandforgejo-runner-validateincludedbash -n scripts/publish-image.sh— clean; executable bit setpytest274 passeddeployrunner, a Docker daemon, and the registry credential. First real proof is the next merge to main.