Repository navigation
fix(content): keep a missed brand facts page under the hourly cap and its status through a failed weekly read (CE-047 follow-ups) - #1466
Merged
Conversation
… its status through a failed weekly read (CE-047 follow-ups) - A page whose answer missed the schema goes to the model once an hour at most when its text changes, as any other page; it stays missed, its hash and time kept (ansvisor#1462 review). - The weekly read marks a failed brand's pages failed except a missed one, which only gets today's date: its retry after a day stands (ansvisor#1463 review). - A weekly run stops after 10 minutes; the brands left stand first in line for the next run (ansvisor#1463, optional). Co-Authored-By: Claude Opus 5.5 <[email protected]>
gkhngyk
approved these changes
Oct 24, 2026
gkhngyk
left a comment
Contributor
There was a problem hiding this comment.
Looks good. All three items are done.
- A missed page under the hourly cap (
server/src/lib/brand-facts.js:765): done.- A missed page whose text changes within the hour now waits and stays
missed. It keeps its old hash andextracted_at, so the day-old retry still applies. - A page whose text keeps changing reaches the model at most once an hour.
- A page that wasn't missed gets the same row as before.
- A test is added.
- A missed page whose text changes within the hour now waits and stays
- A failed brand keeps a missed page's status (
server/src/lib/brand-facts-sweep.js:125-139): done.- The two updates cover separate rows, because
statusisnot null. - A missed page only gets a new
checked_at, so its retry after a day still applies. - The test checks both updates.
- The two updates cover separate rows, because
- A deadline for a run (
brand-facts-sweep.js:83): done.- The deadline is checked before each brand against the real clock, not against the
nowpassed in. - The brands left keep their old
checked_at, so they stay first in line. - A test is added.
- The deadline is checked before each brand against the real clock, not against the
Checked: the PR merges cleanly on main and has no migration. CI is green.
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
Follow-ups from the reviews of #1462 and #1463 (both merged).
MODEL_EVERY_MSlike any other page, with&& !misseddropped as suggested. While it waits it staysmissed, with its hash andextracted_atkept.failedwith.neq('status', 'missed').checked_at, so its retry after a day stands.SWEEP_DEADLINE_MS).Related issue
Follow-ups to #1462 and #1463 (CE-047).
Type of change
feat— New featurefix— Bug fixchore— Maintenance / dependenciesdocs— Documentation onlyrefactor— Code change that neither fixes a bug nor adds a featuretest— Adding or updating testsHow to test
brand_fact_pagesrow withstatus: 'missed'andextracted_at10 minutes ago, whose page text changed, is not sent to the model byPOST /api/brand-facts/fetch. It staysmissed.sweepBrandFacts, its missed page staysmissedand its other pages becomefailed.brand-facts.test.js(a missed page whose text changes inside the hour) andbrand-facts-sweep.test.js(the two status updates, and the deadline).Checklist
feature/,fix/,chore/,docs/) — see CONTRIBUTING.mdyarn lintpasses (run fromweb/): no web changeyarn typecheckpasses (run fromweb/): no web changeyarn format:checkpasses (run fromweb/): no web changeServer:
npm run format,npm run lintandnpm testpass (2,490 tests). No migration.🤖 Generated with Claude Code