Fix workflow push races, stale-data commits, and duplicate refresh#2
Open
LukasWallrich wants to merge 2 commits into
Open
Fix workflow push races, stale-data commits, and duplicate refresh#2LukasWallrich wants to merge 2 commits into
LukasWallrich wants to merge 2 commits into
Conversation
- refresh-flora.yml, refresh-impact-factor.yml: add `git pull --rebase origin main` before push, mirroring refresh-data.yml, so concurrent pushes to main no longer cause rejected non-fast-forward pushes that discard a run's output. - refresh-impact-factor.yml: drop continue-on-error from the compute_omc step. render_impact_factor.R strictly reads its flora_with_omc.csv output; without the guard a failed enrichment let R commit a "fresh" analysis from stale/absent data. Failing fast is safer than committing misleading output. - refresh-impact-factor.yml: remove the redundant refresh_flora.py step and drop flora.csv / flora_meta.json from the commit; the daily refresh-flora.yml owns that snapshot. - refresh-impact-factor.yml: move cron from Mon 05:00 to Mon 11:00 UTC (after refresh-data's up-to-~6h window) with an explanatory comment. - Delete clean-json.yml: dead safety net. Its targets (meta.json, aggregate.json, originals.json) are all written by refresh_data.py with allow_nan=False via clean_for_json, so no NaN/Infinity tokens are ever emitted. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…uard - All three data workflows now share concurrency group flora-data-main (queued, not cancelled), giving true mutual exclusion for pushes to main; the rebase-before-push remains as a belt for non-workflow pushes. - The weekly Mean Citedness job fails fast if data/flora.csv is older than 48h, so a broken daily refresh can't feed stale input into a fresh-timestamped analysis. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
Author
|
Codex review (gpt, read-only): REQUEST_CHANGES — findings and how they were addressed in dcbd52d:
Codex also confirmed the commit-then-rebase placement is sound and the 11:00 UTC schedule clears refresh-data's timeout window. |
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.
Part of a repo audit (bugs + easy enhancements). Workflow-only changes:
refresh-flora.ymlandrefresh-impact-factor.yml(mirroringrefresh-data.yml). Previously a concurrent push to main caused a rejected non-fast-forward push that discarded the whole run's output.continue-on-error: truefrom thecompute_omc.pystep. Before, a failed enrichment let the R render commit a fresh-timestamped Mean Citedness analysis built from stale data, with a green check.refresh-flora.ymlownsdata/flora.csv; the weekly job now consumes the committed snapshot (also dropped those files from itsgit add).refresh-data.yml's worst-case finish (04:00 + 350-min timeout), removing the push race window.clean-json.yml: dead safety net — its three target files are written withallow_nan=False+clean_for_json, so NaN/Infinity can never be emitted (and it pushed without rebasing, adding another race).All remaining workflow YAML validated with PyYAML.
🤖 Generated with Claude Code