Skip to content

Remove hash-based compilation skip in run_push#12828

Merged
pelikhan merged 4 commits intomainfrom
copilot/ensure-always-recompile-workflows
Jan 30, 2026
Merged

Remove hash-based compilation skip in run_push#12828
pelikhan merged 4 commits intomainfrom
copilot/ensure-always-recompile-workflows

Conversation

Copy link
Contributor

Copilot AI commented Jan 30, 2026

The gh aw run --push command was skipping workflow recompilation when the frontmatter hash matched between the markdown source and lock file. This optimization prevented workflows from being freshly compiled when triggered from the dashboard.

Changes

  • pkg/cli/run_push.go: Remove conditional compilation logic

    • Always recompile workflows in collectWorkflowFiles()
    • Retain hash computation and logging for observability
    • Update documentation to reflect behavior
  • pkg/cli/run_push_test.go: Add explicit test for always-recompile behavior

    • Verify lock file is regenerated even when hash matches
    • Use filesystem mtime to confirm recompilation occurred

Behavior

Before: Skip compilation if frontmatter-hash in lock file matches computed hash

After: Always recompile, log hash match/mismatch status

Hash checking remains for warning users when running without --push and for debugging purposes.

Original prompt

The compiler should always recompile the workflows, regardless of the frontmatter hash value. It should not attempt to optimize away compilation using the hash. Always recompile when running from the dashboard. It should compute the hash and log whether it has changed, for observability only. It must not skip compilation based on the hash value.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits January 30, 2026 22:32
- Always recompile workflows regardless of frontmatter hash
- Keep hash checking for observability/logging only
- Log whether hash has changed for debugging purposes
- Update function documentation to clarify purpose

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Test confirms workflows are recompiled even when hash matches
- Verifies lock file modification time changes after collection
- Documents the expected "always recompile" behavior

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Increase test sleep time to 100ms for reliable filesystem timestamps
- Update collectWorkflowFiles documentation to clarify always-recompile behavior
- Fix misleading comment about checking recompilation need

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Ensure compiler always recompiles workflows without hash optimization Remove hash-based compilation skip in run_push Jan 30, 2026
Copilot AI requested a review from pelikhan January 30, 2026 22:42
@pelikhan pelikhan marked this pull request as ready for review January 30, 2026 22:54
@pelikhan pelikhan merged commit 0c1a7ff into main Jan 30, 2026
155 checks passed
@pelikhan pelikhan deleted the copilot/ensure-always-recompile-workflows branch January 30, 2026 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants