Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Feb 2, 2026

The workflow timestamp checker failed immediately when the .md file was newer than the lock file, ignoring the frontmatter hash. This caused false positives when only documentation or non-frontmatter content changed.

Changes

Updated check_workflow_timestamp_api.cjs logic:

  • When md timestamp > lock timestamp: Check frontmatter hash first
    • Hash match → up to date (only non-frontmatter changed)
    • Hash mismatch → outdated (recompilation needed)
    • Hash unavailable → fail conservatively
  • Other cases unchanged (same commit SHA, equal timestamps, lock newer)

Updated error messages:

- Lock file is outdated! Frontmatter hash mismatch detected.
+ Lock file is outdated! The workflow file '.github/workflows/X.md' frontmatter has changed.

Test updates:

  • Added tests for hash matching when md is newer
  • Updated assertions for new error message format
  • Added test for hash check failure handling
Original prompt

Review the JavaScript script that checks if agentic workflow files are outdated. Make sure the following holds:

  • first check time stamp on commits between lock file and .md file. If the lock file is same or older, it is up to date.

  • if the .md file is older, do a frontmatter hash check.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

- When .md file timestamp > lock timestamp: check frontmatter hash first
  - If hashes match: lock is up to date (frontmatter unchanged)
  - If hashes differ: lock is outdated (need recompilation)
  - If hash check fails: fail conservatively (assume outdated)
- Maintain existing behavior for other cases:
  - Same commit SHA: up to date
  - Equal timestamps: use hash check
  - Lock newer than md: up to date (with hash verification for info)
- Update all tests to match new behavior
- Update error messages to be clearer about frontmatter changes

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Review script for checking outdated agentic workflow files Fix workflow timestamp check to use frontmatter hash when .md is newer Feb 2, 2026
Copilot AI requested a review from pelikhan February 2, 2026 15:42
@pelikhan pelikhan marked this pull request as ready for review February 2, 2026 15:46
@pelikhan pelikhan merged commit be8f8e5 into main Feb 2, 2026
157 checks passed
@pelikhan pelikhan deleted the copilot/review-agentic-workflow-check branch February 2, 2026 15:50
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