Problem
state.<env>.sha is set once from needs.setup.outputs.head_sha and written verbatim at finalize, never refreshing mid-cascade. Callbacks that push [skip ci] commits (proto/buf sync, manifest updates, dependency-update flows) advance the branch HEAD, leaving state.sha pointing at a stale commit by the time the cascade finishes.
This breaks SHA-pinned promotion downstream: subsequent env promotion uses the stale SHA, not the actual deployed HEAD.
Proposed
Either:
- Auto-detect post-callback HEAD by re-resolving the branch ref after each callback finishes, OR
- Recognize a
post_sha (or similar) workflow output from callbacks and write it back to state.<env>.sha when present
Impact
Required for any callback that auto-commits during execution. Without it, cross-env promotion can deploy stale commits and the manifest's tracked state diverges from the branch reality.
Problem
state.<env>.shais set once fromneeds.setup.outputs.head_shaand written verbatim at finalize, never refreshing mid-cascade. Callbacks that push[skip ci]commits (proto/buf sync, manifest updates, dependency-update flows) advance the branch HEAD, leavingstate.shapointing at a stale commit by the time the cascade finishes.This breaks SHA-pinned promotion downstream: subsequent env promotion uses the stale SHA, not the actual deployed HEAD.
Proposed
Either:
post_sha(or similar) workflow output from callbacks and write it back tostate.<env>.shawhen presentImpact
Required for any callback that auto-commits during execution. Without it, cross-env promotion can deploy stale commits and the manifest's tracked state diverges from the branch reality.