Repository navigation
fix: retain unpublished drafts until explicit removal - #26
Conversation
|
Sentinel 已审核此变更,未发现已核验问题,但发现需要人工确认的风险。 另有 1 个需要人工确认的风险;黄色 advisory 不阻塞合并,建议开发 agent review advisory 评论并逐条确认。 开发 agent 查询详情: 调用 MCP 工具 由 Sentinel 审核 · 目标提交 01f44fcfc3c9 |
|
Sentinel 保留了 1 个尚未确认的审核候选。这些黄色条目不阻塞合并;红色 P0/P1 与其他独立硬门禁不受影响。 单一猜测、缺少变更行证据或纯 checklist 的候选会统一降为 P3。
需要完整证据时,可用行末 由 Sentinel 审核 · 目标提交 01f44fcfc3c9 |
forrestlinfeng
left a comment
There was a problem hiding this comment.
Code review — approve after cleanup
Matches the documented contract (drafts are kept until the person publishes or discards them, docs/architecture.md), and doesn't conflict with lib/retention.js.
Minor
- Leftover
nowarguments:withDraft/withoutDraftno longer takenow, but callers still passclock.now()—lib/app/commands/drafts.js,lib/app/commands/status.js,lib/app/distill-session.js, and the new tests.withoutDraft(list, null, now)indrafts.jsandstatus.jsnow just copies the list; replace with a plainread(). - No size limit at all now: the JSON file is fully rewritten on every update and
/evolver-draftsprints every draft. Growth is slow (one per verified session), so fine as a deliberate choice — consider a high limit that warns rather than deletes. - Nit:
test/app/draft-retention.test.js:15writeslist =>; the repo writes(list) =>.
Suggest merging this before #25, which can then be simplified.
|
Sentinel 已审核此变更,未发现已核验问题,但发现需要人工确认的风险。 另有 2 个需要人工确认的风险;黄色 advisory 不阻塞合并,建议开发 agent review advisory 评论并逐条确认。 开发 agent 查询详情: 调用 MCP 工具 由 Sentinel 审核 · 目标提交 09660bcb6824 |
|
Sentinel 保留了 2 个尚未确认的审核候选。这些黄色条目不阻塞合并;红色 P0/P1 与其他独立硬门禁不受影响。 单一猜测、缺少变更行证据或纯 checklist 的候选会统一降为 P3。
需要完整证据时,可用行末 由 Sentinel 审核 · 目标提交 09660bcb6824 |
Summary
The documented review flow keeps drafts until publication or discard, but adding a draft silently removes entries older than eight days and evicts entries beyond twenty. Listing and discarding also hide/drop old or unstamped legacy drafts.
Remove automatic draft expiry and capacity eviction. Candidate/session/report retention policies remain separate.
Evidence
Merge Danger
Door: two-way
Existing stored drafts need no migration. Already deleted drafts cannot be recovered by this change.
Blast Radius: persistence
The local draft list can grow until the user publishes or discards entries. This favors preservation of unreviewed user data over silent eviction; pagination/archival is outside this fix.