Move the running podcast sources to fifteen minutes - #35
Merged
Conversation
#34 set `cadenceMinutes: 15` on the adapter, which decides what a source is created with and nothing else. `insertSource` is idempotent on the slug and its conflict clause updates name, description and updated_at -- not config, and not cadence_minutes. That is deliberate: cadence is on the list of things an operator may edit from the sources page, so re-asserting the adapter's number on every boot would silently undo a human's decision the next time the web app restarted. The cost of that is this migration. Both podcast sources were created while the adapter still said 60, so they kept 60, and #34 reached exactly nothing that was already running. Nothing failed and no run errored -- the catalogue walk simply proceeded at a quarter of the intended rate, which is the kind of wrong that is only visible if you go and look. Found by checking rather than by anything reporting it. Scoped by slug rather than by adapter, so a source somebody added themselves keeps the cadence they chose, and conditional on the value still being 60, so re-running never overwrites a later decision. Both properties are asserted: the test seeds an operator-tuned source and a hand-made one alongside the two seeded ones and checks neither moves, then re-runs the statement against deliberately changed values. `backfillPages` needed no such treatment -- run config is `{ ...adapter.defaults, ...stored }`, so a key the stored config has never carried resolves to the adapter's default on every run. 504 tests pass, biome clean. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0166srGNRGyeDQbQnJpbNPNb
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.
#34 set
cadenceMinutes: 15on the adapter. That decides what a source is created with and nothing else — so it reached exactly nothing that was already running.insertSourceis idempotent on the slug, and its conflict clause updatesname,descriptionandupdated_at. Notconfig, and notcadence_minutes. That is deliberate: cadence is on the list of things an operator may edit from the sources page, so re-asserting the adapter's number on every boot would silently undo a human's decision the next time the web app restarted.The cost of that is this migration. Both podcast sources were created while the adapter still said 60, so they kept 60. Nothing failed and no run errored — the catalogue walk simply proceeded at a quarter of the intended rate, which is the kind of wrong that is only visible if you go and look. Found by checking, not by anything reporting it.
Two properties, both asserted
The test seeds an operator-tuned source (5 min) and a hand-made one alongside the two seeded ones, checks neither moves, then re-runs the statement against deliberately changed values to confirm it does not stomp them.
What needed no migration
backfillPages. Run config is{ ...adapter.defaults, ...stored }, so a key the stored config has never carried resolves to the adapter's default on every run. The backfill was always going to work; only the rate was wrong.🤖 Generated with Claude Code
https://claude.ai/code/session_0166srGNRGyeDQbQnJpbNPNb