Skip to content

fix(ci): staleness-check picks PR's entry, not a random one - #16

Merged
dean-harel merged 1 commit into
mainfrom
fix/staleness-entry-detection
Apr 25, 2026
Merged

fix(ci): staleness-check picks PR's entry, not a random one#16
dean-harel merged 1 commit into
mainfrom
fix/staleness-entry-detection

Conversation

@dean-harel

Copy link
Copy Markdown
Owner

Summary

Root cause of the recurring ⚠️ stale comments on PR #12.

The staleness-check used find entries -maxdepth 1 -type d -name '[0-9][0-9][0-9]-*' | head -1 to locate "the" entry folder. find returns directories in unsorted filesystem order, so in CI it picked entries/001-dude-wheres-my-team — a pre-pipeline entry whose .speech-hash was seeded by earlier experiments and never matched its body.md. The script then dutifully reported entry 001's mismatch as if the PR's entry were stale.

The publish job already has the right logic: prefer the entry changed in this PR via git diff, fall back to highest-numbered. Mirror it here. Also:

  • bump fetch-depth to 0 so the git diff against main can resolve
  • log which entry directory was selected, so future false positives are easier to diagnose

Test plan

The staleness-check used 'find entries -maxdepth 1 -type d -name NNN-* | head -1'
to locate the entry folder. find returns directories in unsorted
filesystem order, so in CI it picked entries/001-dude-wheres-my-team
(which predates the pipeline and has stale .speech-hash from earlier
experiments) and reported its mismatch as if 004 were stale. Locally the
same find returned a different first match.

Mirror the publish job's logic: prefer the entry actually changed in
this PR (git diff vs main), fall back to the highest-numbered entry,
and log which entry was selected. Also bump fetch-depth to 0 so the
git diff against main works.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

✅ All review checks passed. When you're ready, apply the ready label to publish.

@dean-harel
dean-harel merged commit 7d1c406 into main Apr 25, 2026
2 checks passed
@dean-harel
dean-harel deleted the fix/staleness-entry-detection branch April 25, 2026 15:09
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.

1 participant