fix(ci): staleness-check picks PR's entry, not a random one - #16
Merged
Conversation
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>
Contributor
|
✅ All review checks passed. When you're ready, apply the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Root cause of the recurring
⚠️ stalecomments on PR #12.The staleness-check used
find entries -maxdepth 1 -type d -name '[0-9][0-9][0-9]-*' | head -1to locate "the" entry folder.findreturns directories in unsorted filesystem order, so in CI it pickedentries/001-dude-wheres-my-team— a pre-pipeline entry whose.speech-hashwas seeded by earlier experiments and never matched itsbody.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:
fetch-depthto0so the git diff against main can resolveTest plan
Checking entry: entries/004-dont-conversate-navigateand reports up-to-date.