You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@magpie.apache.org by "potiuk (via GitHub)" <gi...@apache.org> on 2026/09/21 00:49:05 UTC
[PR] fix(tools): request updatedAt so the stats events cache can go stale [magpie]
potiuk opened a new pull request, #1305:
URL: https://github.com/apache/magpie/pull/1305
## Summary
`fetch_events.py` will not trust a cached events file that is older than the issue's last update:
```python
upd = UPDATED_AT.get(n)
if upd is None or os.path.getmtime(out_path) >= upd:
return (n, True, "cached")
```
`UPDATED_AT` is built from `updatedAt` in `issues.json` — but `fetch_issues.py` never requested that field. So the lookup always yielded `None`, the `upd is None` branch 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 triage` removed hours earlier, and the dashboard still counted it in `open_untriaged`. Deleting that one cached events file and re-rendering moved it — `open_untriaged` 8 → 7, `open_pr_merged` 10 → 11. Every adopter who has run the dashboard more than once is affected for any tracker relabelled since its first fetch.
## Type of change
- [x] Bug fix (non-breaking change which fixes an issue)
## Test plan
- [x] `tests/test_fetch_fields.py` added — pins the coupling between the two scripts
- [x] Verified the new test **fails** without the field and passes with it
- [x] Full tool suite: 139 passed
- [x] `prek run --files <changed>` — exit 0, zero failures
The 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)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@magpie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(tools): request updatedAt so the stats events cache can go stale [magpie]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk merged PR #1305:
URL: https://github.com/apache/magpie/pull/1305
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@magpie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org