fix(submit): keep snapshot-integrity clients complete on filtered scans
Summary
- A date-bounded submit (
--week,--since,--until,--year) filtered every client's messages to the window and sentfullHistory: false, so the receiver froze everySUPPORTED_VERSIONED_PARSERSclient and both atomic source families. In practice a weekly submit could never advance droid, copilot, amp, the micode pair, or the antigravity trio — their usage was silently discarded run after run (Ignored Droid changes because this parser generation or partial snapshot cannot safely advance the device high-water,Preserved MiMo Code and Xiaomi MiMo AI together,Preserved Antigravity sources together). - The scan already parses those sources' complete history; the date filter only dropped their messages afterwards. This change keeps shipping them complete while bounded-growth clients stay filtered.
ReportOptionsgains a submission-onlydate_filter_exempt_clientsset backed byFULL_HISTORY_SUBMIT_CLIENTS(amp, antigravity, antigravity-cli, antigravity-extension, copilot, droid, micode, micode-desktop — the server's snapshot-integrity set).GraphSinkbypasses the date filter for messages from those clients; local reports default the set to empty, soreport/wrapped/TUI output is unchanged.- On a bounded submit,
scanScope.fullHistoryClientsnow names exactly the exempted clients that were scanned, whilefullHistoryitself staysfalseto keep failing closed for receivers predating per-client coverage.retentionFloorspopulate for those clients as before. Amp keeps its cache-completeness gate: it is only declared when the local thread export is complete.
Verified end-to-end
tokscale submit --week on the same device, before this change: Ignored Copilot/Droid/Amp changes because this parser generation or partial snapshot cannot safely advance the device high-water, plus the MiMo and Antigravity family preserves. After: Rewrote Droid daily layout from the full parser snapshot without changing the lifetime high-water, Reconciled MiMo Code and Xiaomi MiMo AI together from the complete parser snapshot, Reconciled Antigravity desktop, CLI, and IDE extension usage together from one family snapshot, and the Copilot freeze is gone entirely. Amp remains frozen on this device only because the device has no Amp data to ship — it is not declared when unsafe.
Test plan
-
cargo test -p tokscale-core— 2691 tests pass, including newsubmission_sink_keeps_exempt_clients_outside_the_date_window(exempt client keeps out-of-window days; non-exempt client is filtered). -
cargo test -p tokscale-cli— 1665 tests pass, including newsubmit_scan_scope_names_snapshot_clients_complete_on_a_partial_scanandsubmit_scan_scope_partial_scan_still_gates_amp_on_cache_completeness;submit_payload_populates_retention_floors_for_full_history_clientsupdated for the new floors contract on bounded submits. - Real
tokscale submit --week— the server advanced Droid and reconciled the MiMo/Antigravity families instead of freezing them.
Note for reviewers
One visible side effect: because exempt clients widen the payload's reported date range, bounded-growth clients now get per-day "disappeared → preserved" notices on exempt-covered days that fall outside the filter window. Nothing is lost — the server keeps credited values — but the disappeared check could arguably be scoped to clients declared in fullHistoryClients in a follow-up.
Summary by cubic
Fixes date-bounded submits (--week, --since, --until, --year) silently discarding usage from snapshot-integrity clients. Previously those submits scoped every client to the window and sent fullHistory: false, so the receiver froze droid, copilot, amp, devin-cli, the micode pair, and the antigravity trio; now those clients ship their complete snapshots while bounded-growth clients stay filtered.
- Adds a submission-only
full_history_clientsset threaded from the CLI intogenerate_submission_graph_v2; the CLI passes the exact list it serializes asscanScope.fullHistoryClients, so the payload's declaration and shipped data cannot diverge. Local reports passNoneand output is unchanged. - On a bounded submit,
fullHistoryClientsnames exactly the exempted clients that were scanned (fullHistorystaysfalse), so their retention floors populate; Amp still requires a complete thread export, and a partially read client is withheld viawithhold_full_history_for_clientsso the receiver keeps stored rows. - An atomic-family member is exempted only when every member of the family was selected — solo micode or antigravity-surface submits stay filtered. A bounded submit that declares
devin-cliships its recount proof.
Known side effect: bounded-growth clients may show per-day "disappeared → preserved" notices on exempt-covered days outside the filter window — nothing is lost, but the check could later be scoped to clients declared in fullHistoryClients.