Skip to content

feat: refresh state.<env>.sha after callbacks that auto-commit [skip ci] #20

Description

@joshua-temple

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions