CD runs twice per push and the second run fails on "nothing to commit" — a red CI signal with nothing wrong #118
Closed
opened 2026-09-16 22:09:17 +00:00 by mathias
·
2 comments
No Branch/Tag Specified
main
fix/pipeline-writes-158
fix/edit-path-io-192
fix/create-regular-188
fix/guard-special-179
fix/linkcheck-keeps-write-178
fix/write-dir-redirect-173
fix/tunnel-detect-174
fix/pipeline-root-157
w3/154-mcp-auth-wiring
fix/tunnel-traversal
test/in-brain-targets-171
fix/brain-scan-root-157
fix/graph-wiki-root-157
fix/vectorstore-root-157
fix/notes-root-157
fix/search-root-157
fix/brainwide-root-157
fix/raw-symlinks-153
feat/symlink-tripwire-157
fix/rest-auth-149
fix/123-brain-edit-envelope-check
feat/106-page-aware-extraction
fix/105-source-drift-on-main
fix/104-surface-merge-conflicts-on-main
agent/b1-compile-on-ingest
agent/104-surface-merge-conflicts
agent/105-source-drift
agent/107-loud-unconfigured-alerting
feat/brain-read-edit
fix/capture-i1-refusal-names-target
renovate/configure
feat/consolidate-single-harness
icebox/cmd-routing
feat/brain-pending-promote
fix/close-session-classification-refresh
fix/capture-summarywriter
v0.24.0
v0.23.1
v0.23.0
v0.22.0
v0.21.1
v0.21.0
v0.20.1
v0.20.0
v0.19.1
v0.19.0
v0.18.4
v0.18.3
v0.18.2
v0.18.1
v0.18.0
v0.17.0
v0.16.1
v0.16.0
v0.15.0
v0.14.0
v0.13.2
v0.13.1
v0.13.0
v0.12.1
v0.12.0
v0.11.2
icebox/cmd-routing-2026-07-01
v0.11.1
v0.11.0
v0.10.0
v0.9.0
v0.8.0
v0.7.0
v0.6.0
v0.5.0
v0.4.1
v0.4.0
v0.3.0
v0.2.0
v0.1.0
Labels
Clear labels
agent/ready
blocked/client
blocked/supplier
blocked/upstream
risk/high
risk/low
risk/medium
size/l
size/m
size/s
size/xs
status:dispatch
status:dispatched
status:review
status:reviewing
type/chore
type/decision
type/docs
type/feat
type/fix
type/ops
type/research
type/test
Meets the agent-ready contract; authorizes unattended execution
Waiting on the client
Waiting on a supplier
Waiting on an upstream project or vendor
Irreversible, security-relevant, or control plane
Reversible, local, test-covered
Touches shared state, deploys or data
Too big - split it
Under two days
Under half a day
Under an hour
Maintenance, no behaviour change
Human decision required; never agent/ready
Documentation only
New capability
Corrects broken behaviour
Infrastructure, deploy, runtime
Investigate; output is a finding, not code
Test coverage only
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: mathias/hyperguild#118
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What happens
Every push to main produces two
workflow_run-triggered CD runs. The first does the work; the second finds the infra repo already bumped and dies:Observed on runs 417 (success) and 418 (failure), both for
eb2acfeeb8888ba3936250424e4309c6d49c57b1. Same duplicate pairing on 413/414 and 415/416. The deploy itself was fine:mathias/infracarrieschore(deploy): ingestion → eb2acfe…and the pod isRunningon the new image.Why it matters
A red run that means "already done" is indistinguishable at a glance from a red run that means "the deploy broke", and the estate now files a tracked issue off CI-red automatically (infra#366). So this manufactures a false issue on every push, and trains the reader to ignore the real ones.
Do
git diff --cached --quiet || git commit …, the same guardbrain-audit's own worklist step already uses, so a no-op bump exits 0.workflow_runruns per push means the CD workflow is listening to something that fires twice (twoworkflows:entries, or bothpushandworkflow_runreaching it). Fixing (1) alone hides the waste — a second full image build per push — without removing it.Found while verifying the deploy of v0.18.1.
Created via git-mcp on behalf of @mathias
CLAIMED — Claude Code session on koala, 2026-09-16 22:15Z, part of a 4-issue sprint (hyperguild#117, #118, brain-gardener#196, #197). Another agent is active on this estate: please do not pick this up in parallel.
Update to the report: the duplicate CD pair did not fail on the next push (runs 419/420/421 for
6e69698all green). So the failure is intermittent, not every-push — which fits step 1 being a genuine race on "did the other run already commit the bump", rather than a deterministic second-run no-op. Doesn't change the fix; does mean a green run is not evidence the race is gone, so the idempotency guard goes in regardless.Created via git-mcp on behalf of @mathias
DONE —
cc86a74, taggedv0.18.3.The duplicate had a specific cause, not a flaky trigger:
ci.ymlran onpushto main and onv*tags, andcd.ymlkeys off "CI succeeded". Sogit push origin mainfollowed bygit push origin refs/tags/vXproduced two CI runs for the same sha, and two full build+deploys behind them. The tag-triggered deploy rebuilt an identical image and then found the infra manifest already pointing at it —git commiton an empty index exits 1, and the job went red.That also explains the intermittency noted above: the failure needs a tag push, so a commit pushed without one deploys exactly once and stays green. Runs 419-421 were green because the tag went up before the CD run got that far, not because the race had gone.
Both parts fixed:
ci.ymlno longer triggers on tags. Nothing consumed those runs — no release workflow exists, andcd.ymlreadsgithub.sha, not the tag. This removes the wasted second image build as well as the red.git diff --cached --quiet || commit+push, so any no-op run (a manual re-run, anything else that arrives second) logs "Infra already at " and exits 0.Verification note, since a green run is weak evidence here: the next push with a tag is the real test.
v0.18.3was pushed after this commit landed and produced no second CD run — that is the first push in the series where the tag did not trigger a build at all.Created via git-mcp on behalf of @mathias