Repository navigation
SEL-285: Production image build copies a gitignored file that is not in the tree - #143
Merged
Merged
Conversation
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. |
Linear: SEL-286 Refs #106 Engine: grok (fleet coding engine, Grok Bot dispatch)
Signed-off-by: Christopher <131207452+PetrefiedThunder@users.noreply.github.com>
Signed-off-by: Christopher <131207452+PetrefiedThunder@users.noreply.github.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c41d177. Configure here.
Signed-off-by: Christopher <131207452+PetrefiedThunder@users.noreply.github.com>
Signed-off-by: Christopher <131207452+PetrefiedThunder@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Linear: SEL-285
Fixes #107
Coding engine: cursor, dispatched by Grok Bot for C.Lee.
What changed
The production image no longer copies
.build_commit_shaby name. That path is gitignored, nothing in this repo created it, and a cleandocker builddied before the build started.gateway/Dockerfilenow runsgateway/scripts/write_build_commit_sha.py, which writes/app/.build_commit_shafrom a stamp already in the build context, or from--build-arg RELEASE_COMMIT_SHA. The build fails if the stamp is missing, not a 7,64 character hex SHA, or the staged file and the build arg disagree. The arg is not namedCOMMIT_SHAorBUILD_COMMIT_SHA, so a stale Railway service variable is not baked in as the stamp. A release archive that already contains.build_commit_shastill works, becauseCOPY . .brings that file in and the script treats it as authoritative.How verified (exact commands and results)
Confirmed
gateway/.build_commit_shais absent andgateway/DockerfilehadCOPY .build_commit_sha /app/.build_commit_shaat HEAD611fdf3.Run from
gateway/. Result:50 passed in 0.95s.Result:
All checks passed!Muse was invoked on a scratch copy and stopped with
model did not reach a terminal state within 8 step(s). No review findings were applied.Not done / follow-ups
dockeris not on PATH here, so the image was not built. A cleandocker buildstill fails unless the context contains.build_commit_shaor the command passes--build-arg RELEASE_COMMIT_SHA=$(git rev-parse HEAD). That failure happens inside the image build, with the script's error, instead of a missing-file copy.railway upandprepare_railway_release.py(not in this repo) were not run. A leftover local.build_commit_shais authoritative and will reject a different build arg until it is removed or matches.Note
Medium Risk
Changes release image provenance and build-time validation (supply-chain sensitive), plus reconciliation behavior for legacy success receipts that could affect billing/receipt adoption during sweeps.
Overview
Production gateway images no longer use a named
COPYof gitignored.build_commit_sha, which broke cleandocker build. Abuild-metadatastage copies the repo context (with secrets stripped via.dockerignore), runswrite_build_commit_sha.py, and the final image takes/app/.build_commit_shaonly from that validated output. Provenance comes from a context-root stamp (e.g. release archive) orRELEASE_COMMIT_SHA; mismatches, invalid SHAs, or a lonegateway/.build_commit_shafail the build. The arg name avoids stale RailwayCOMMIT_SHA/BUILD_COMMIT_SHAenv vars..dockerignorenow excludesgateway/.build_commit_sha,.secrets, and tightens credential-related paths so the metadata stage can copy context safely.MCP dispatch reconciliation treats
successlike other legacy finalization outcomes when signed receipts lack permit-v2 snapshots (emptyconstraints_evaluatedwith onlyjev_risk_guard), so stale sweeps can adopt pre-permit success receipts; conflicting signed permit snapshots still raise linkage errors.CI smoke tests cover the metadata stage, stamp byte assertions, and negative provenance cases.
Reviewed by Cursor Bugbot for commit 02a0d5a. Bugbot is set up for automated code reviews on this repo. Configure here.