You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ui-server: journal scrub never reconciles quarantine files that have no row #4411
agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.area: ui-serverHono app factory: turn coordinator, auth, session catalog, routes, cron.priority: p3Someday. Needs a driving use case before it starts.type: fixSomething is broken and must behave the way it is documented.
Part of #4278. Deferred from the tenth review of PR #4323 (#4290).
Context
createJournalScrub (packages/ui-server/src/brain/journal-scrub.ts:22-26) lists only the object-store root through journalDirectory(root), and takes its candidates from that listing (:79-83).
Nothing lists ${root}/quarantine. The quota charge for quarantined bytes comes only from turn_journal_scrub_quarantine rows (packages/ui-server/src/brain/journal-accounting.ts:91).
Restoring the database to a state older than a quarantine move, while keeping the object store, leaves the quarantined file with no row. Its bytes are uncharged, and full scrubs report complete with zero unaccounted bytes.
Have the bounded scrub also account for hash-named files in the quarantine directory that no row names, within the existing per-run work bound. Out of scope: removing a quarantine, and changing snapshot contents.
Acceptance criteria
A test quarantines an orphan, restores a database image taken before the move and keeps the store. A later scrub charges the file's bytes again and reports it.
Until that file is accounted, the scrub does not report complete with zero unaccounted bytes.
The quarantine listing is bounded per run and resumes on the next run.
A quarantine file whose content does not hash to its name is reported separately and not removed.
agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.area: ui-serverHono app factory: turn coordinator, auth, session catalog, routes, cron.priority: p3Someday. Needs a driving use case before it starts.type: fixSomething is broken and must behave the way it is documented.
Activity