Repository navigation
fix(tools): request updatedAt so the stats events cache can go stale - #1305
Merged
Merged
Conversation
`fetch_events.py` refuses to trust a cached events file older than the issue's last update, reading `updatedAt` out of `issues.json`. But `fetch_issues.py` never requested that field, so the lookup always yielded `None`, the guard always took its "no timestamp, trust the cache" branch, and every issue relabelled after its first fetch kept stale event history indefinitely. Nothing errors when this happens. The dashboard just reports lifecycle bands reconstructed from outdated label history -- observed on a tracker that had moved out of `open_untriaged` hours earlier and still showed the old count. Adds the field, and a test that pins the coupling between the two scripts so the guard cannot be silently disabled again. Generated-by: Claude Opus 5
11 of 12 tasks
potiuk
added a commit
to potiuk/magpie
that referenced
this pull request
Sep 21, 2026
The marker sat at 0e7012b, where apache#1306 left it, while apache#1305 and apache#1307-apache#1310 landed on top. Reviewing that delta: - apache#1305 (stats events cache `updatedAt`) and apache#1307 (dev version bump) touch no behaviour any spec describes; no spec references `fetch_issues` or the events cache. - apache#1308, apache#1309 and apache#1310 are the vetted-ops sandbox work, and the `excludedCommands` section this branch already rewrites is where they belong. That rewrite covers all three. So the delta is documented and the marker can move. This is the by-hand route AGENTS.md allows for a small known gap, not a full `loop.sh update` pass — it reconciles these five commits rather than re-auditing every skill, tool and modes.md row. Generated-by: Claude Opus 5
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
fetch_events.pywill not trust a cached events file that is older than the issue's last update:UPDATED_ATis built fromupdatedAtinissues.json— butfetch_issues.pynever requested that field. So the lookup always yieldedNone, theupd is Nonebranch always fired, and every issue relabelled after its first fetch kept its stale event history indefinitely.Nothing errors when this happens. The renderer reconstructs lifecycle bands from
labels_open_at(), so the dashboard reports band counts built on outdated label history while looking entirely healthy.Observed on a live tracker: an issue had
needs triageremoved hours earlier, and the dashboard still counted it inopen_untriaged. Deleting that one cached events file and re-rendering moved it —open_untriaged8 → 7,open_pr_merged10 → 11. Every adopter who has run the dashboard more than once is affected for any tracker relabelled since its first fetch.Type of change
Test plan
tests/test_fetch_fields.pyadded — pins the coupling between the two scriptsprek run --files <changed>— exit 0, zero failuresThe test asserts the coupling rather than either script alone, because the failure mode is silent: if the field is dropped again, no exception is raised anywhere and only the numbers are wrong.
Generated-by: Claude Code (Opus 5)