fix: give the image build context the docs folder #85
No reviewers
Labels
No labels
move-to-repo
coilyco-bridge-deploy
move-to-repo
coilyco-flight-deck-agent-compose
move-to-repo
coilyco-gaming-eco-app
move-to-repo
coilysiren-inbox
move-to-repo
unknown
🔒⚠️📦⚠️🔒 SANDBOXED 🔒⚠️📦⚠️🔒
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
c#
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
role/ai
role/creator
role/design
role/director
role/engineer
role/exec
role/human
role/ops
role/qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-gaming/sirens-echo!85
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/policy-check-image-context"
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?
Fixes the red
mainleft by the merge of #82.What failed
Not a linter. Run 83 on the merge commit split two ways:
test(build, policy-check, vet, test, pre-commit) - successpublish-echo-image- failureThe Dockerfile runs
sirens-echo-policy-checkduring the build stage, and.dockerignoreexcludeddocs. #82 added a check ofdocs/access-policy.reference.yamlto that binary, so the image build died on:No image was published for
b906d83. The deploy repo pins image SHAs, so nothing running changed, but that commit has no artifact. Thetestjob passed because it runs in a full checkout.The fix
The build context now carries
docs, and the build stage copies it, so policy-check validates the reference copy where it always meant to. The runtime image is unchanged: only the build stage takesdocs, and the final stage still copies the binary plus the agent and skill roots.Regression guard
TestPolicyCheckRunsInsideTheImageContextbuilds the binary and runs it in a fixture holding only the Dockerfile's copy set. Removingdocsfrom that fixture makes it fail with the same error the failed CI run produced, verified both directions.The fixture mirrors the Dockerfile's
COPYlist in one slice, so that list and the slice have to move together. That is the tradeoff for not parsing the Dockerfile.What is not here, and why
An
image-buildjob that builds on pull requests was in this branch and has been removed. It failed on its first run, and this Forgejo predates the Actions log endpoints (/actions/jobs/{id}/logsand/actions/runs/{id}/logsboth 404), so the cause is not readable through the API. Diagnosing it blind would keepmainred longer than the fix it was riding on.The runner reasoning behind it still holds and is worth a separate change:
forgejo-runner.yml, backingruns-on: dockerand already servingtest, has a privileged dind sidecar andDOCKER_HOST, so a build needs a daemon rather than the publisher runner'sREGISTRY_TOKEN.forgejo-runner-build.ymloffersdocker-buildbut is scopedorg/coilyco-flight-deck, and this repo is incoilyco-gaming, so it is unreachable here.The likely cause of the failure is that the job declared a
container:, so it never saw the runner'sDOCKER_HOST. That is a guess, and it belongs in a change that can fail on its own.Verification
pre-commit run --all-filesexit 0,go vet,go test -count=1 -race ./..., andsirens-echo-policy-checkall pass.No Docker daemon was available while writing this, so the Dockerfile change is verified by the fixture rather than by a real build. The first real build is the
publish-echo-imagejob on the merge of this PR, which is also the check that this un-redsmain.fix: keep policy-check inside the image build contextto fix: build the image with docs, and build it on pull requestsfix: build the image with docs, and build it on pull requeststo fix: give the image build context the docs folder