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
activity: prune deletes a *.json that is not a pull record first #2754
Today.prune (crates/cli/src/commands/activity.rs) runs when each decdn get starts. It ranks every *.json in ~/.decdn/activity/pulls/ by started_of, the number its name begins with. started_of returns 0 for a name with no numeric prefix, so such a file ranks oldest. Once the directory holds 200 files (KEPT_RECORDS), prune deletes that file first. It never checks that the file is a record, so it deletes whatever *.json is there, for example a file a user copied in.
Since #2752 the dashboard lists each *.json that does not read as a record (UnreadableRecords) and says that deleting one is safe. Prune deletes those files with no notice. adr/appendix-binaries.md says only "Each run deletes the oldest records when it starts, and keeps 200".
Ask. Choose one, and make the ADR say it:
prune only files whose name matches <start-ms>-<pid>.json, and leave the rest (the dashboard keeps naming them);
or keep the current behaviour, and state in the ADR and on the dashboard banner that prune deletes any *.json that is not a record.
Done when
Prune behaviour toward a non-record *.json is decided, and the ADR states it.
Activity
fix(cli): prune only pull records and keep an entry run's counts (#2763)