Skip a superseded scheduled store instead of failing it #46
All Vouch review confidence checks passed
Residual risk 0.31 = Change Risk (0.52) × (1 − Review Confidence (0.40)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 88% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #46"
general
weight: 0.35
greptile-apps[bot]
What it does
When two fetchers save the same data in the same minute, the store of the older payload fails with
supersededand sends a Sentry Issue, although the newer payload's store writes the data. This happened on 2026-11-26 and 2026-11-28, when an S forecast gate and its collector fetched together. PR #44 moved the weather gate off the collector's minute. The same collision is still possible for:weather-fetch-ecmwf-prev-day1, at 09:40 and 13:40;jao_capacity_d1andjao-fetch, at 12:40;fingrid_morningand a driftedfingrid-fetchretry.This PR fixes the cause for all of them (user decision 2026-11-29, "Fix this"):
StagedImport --skip-superseded. It is a store option and no data option. With it, a payload that a newer one supersedes ends as{"status":"skipped","step":"store","reason":"superseded","payload":{…}}: exit 0, no write, no failure report or log error.jobs.run_step) and S forecast gate stores (s_forecast.staged_fetch), throughstaged.store_args(..., skip_superseded=...).ImportReplaydoes not. A replay of an older file still failssuperseded, so the operator sees that newer data exists.The newest-payload check is unchanged: it runs under the store lock, and an older payload still never writes over newer data.
No workflow patch is needed. Only the store activity's arguments change, not the command sequence, and the replay tests pass.
Data effects
None.
Verification
-
FetchWeatherStagedCommandTest(23 tests) has a new case: a superseded payload stored with--skip-supersededis skipped with exit 0, writes nothing and logs no error, and the newest payload still stores with the option.- Full suite: 3439 tests, 2 failing. Both are
SyncProductionDatabaseCommandTest, which needs the localdatabase.sqlitethat a worktree does not have.test_a_readiness_check_failing_across_the_cut_misses_the_gateleft out.- A new test: a scheduled job whose store answers
skippedsucceeds with no Issue.- The pinned store argument lists now distinguish scheduled stores (with the flag) from replay stores (without it).
vendor/bin/pint --testandgit diff --checkare clean.Docs
laravel/app/Services/ImportPayload/AGENTS.md: the trait options and the reason for the skip.orchestration/AGENTS.md: the gate paragraph and a new "superseded scheduled store" rule under Staged imports.Needs separate approval after the merge
A deploy of both roles. The PHP option and the Python argument ship in the same image.
🤖 Generated with Claude Code
<!-- greptile_comment -->
<!-- greptile_summary -->
<h2><ruby><rp>Confidence Score: 3/5 · Fix the weekly refit's wait for stored Fingrid data and the mixed-worker deployment path before merging.</rp></ruby><a href="https://app.greptile.com/api/retrigger?id=122975751&sig=1f316d4d411233ff5fab713c7580a4f65aa4f50c674bab06a86e3d26125ec43d"><picture><source media="(prefers-color-scheme: dark)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/RetriggerDark.svg?v=2"><source media="(prefers-color-scheme: light)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"><img alt="Retrigger" src="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2" align="right"></picture></a><a href="https://app.greptile.com/-/switch-tenant?tenant=breezily&next=%2Fsepsi77%2Fvoltikka%2Fpull%2F46&utm_source=greptile_review&utm_medium=github&utm_campaign=view_in_greptile"><picture><source media="(prefers-color-scheme: dark)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptileDark.svg?v=2"><source media="(prefers-color-scheme: light)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2"><img alt="View in Greptile" src="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2" align="right"></picture></a>Confidence Score: 3/5 <sup><img alt="Tier: plus" title="Review tier: plus" src="https://greptile-static-assets.s3.amazonaws.com/badges/effort-plus.svg?v=3" height="12"></sup></h2>
<!-- greptile-risk -->
Fix the weekly refit's wait for stored Fingrid data and the mixed-worker deployment path before merging.
<h2>Findings</h2>
1. <img alt="P1" src="https://greptile-static-assets.s3.amazonaws.com/badges/p1.svg?v=9" align="top"> Refit can train too early <a href="https://github.com/sepsi77/voltikka/pull/46#discussion_r4730128790">▶</a>
2. <img alt="P1" src="https://greptile-static-assets.s3.amazonaws.com/badges/p1.svg?v=9" align="top"> Old workers reject new stores <a href="https://github.com/sepsi77/voltikka/pull/46#discussion_r4730128792">▶</a>
<details><summary>Fix with agent prompt</summary>
`
</details>
<h3>Summary</h3>
Adds --skip-superseded
so scheduled stores can skip older payloads quietly whileImportReplay` keeps the existing refusal.<details open><summary><h3>Diagram</h3></summary>
</details>
<!-- greptile_confidence_score:3 -->
<sub>Reviews (1) · Last reviewed commit: "Skip a superseded scheduled store instea..." · Reviewed by Greptile</sub>
<!-- /greptile_comment -->