Repository navigation
Description
Problem
Daily Review archives are owned by Runtime Host through openInteractiveDailyReviewAuthorityForWrite. That writer updates workflow_daily_review_state, workflow_daily_review_archives, and workflow_daily_review_authority_state.revision together.
Desktop still ships a second writer, apps/desktop/src/main/daily-review-archive-store.ts. It opens the same SQLite tables directly and does not touch the authority revision. Production Desktop does not use it. Preload / renderer read archives through Host daily-review.query.
The only consumer is the e2e fixture:
apps/desktop/src/main/e2e-fixture.ts(module-daily-review)apps/desktop/src/main/e2e-fixture/scenarios-settings.ts(createDailyReviewArchiveStore→putArchive)
A test-only Desktop store that shares Host tables but not Host revision is a second write authority. It can seed rows the Host later reads without going through the owner that maintains revision.
Desired outcome
Desktop no longer owns a Daily Review store. The e2e fixture seeds archives through the existing storage / Host writer. Production Desktop remains a Host client.
Alternatives or workarounds
Keep the Desktop store so fixtures can write rows without starting a Host mutate. The storage authority already writes the same rows and is the natural test entrance.
Acceptance
-
apps/desktop/src/main/daily-review-archive-store.tsis removed - The
module-daily-reviewfixture seeds through the storage Daily Review writer or a Host mutate, not a Desktop store - Production preload / renderer still read archives only through Host
daily-review.query - Repo-wide search shows no Desktop writer of
workflow_daily_review_* - Desktop build, typecheck, focused tests, and Biome pass
Non-goals
- Changing Daily Review product behavior or Host protocol
- Moving Daily Review ownership out of storage / Runtime Host
- Redesigning the Daily Review UI
Related
- Host / storage authority:
packages/storage/src/daily-review-authority.ts - Production read path:
apps/desktop/src/preload/preload.ts(daily-review.query)
Verified on main at eea5cd870.
This issue was identified during a simplification audit and prepared with AI assistance (Pi / grok-4.6). A human contributor reviewed the analysis and owns the submission.
Activity
1625567290 commentedon Aug 16, 2026
I'm working on this. I'll remove
daily-review-archive-store.tsand seed themodule-daily-reviewfixture through the storage Daily Review writer so Desktop stays a Host client.Grok is assisting with the implementation; I will review the change and remain the human contributor of record.
简体中文对照
我来处理。删除
daily-review-archive-store.ts,让module-daily-reviewfixture 走 storage Daily Review writer,Desktop 只做 Host 客户端。Grok 协助实现;我会审阅改动,并作为 human contributor of record。
refactor(desktop): seed Daily Review fixtures through the storage wri…