Overview
src/utils/telemetry.rs appends events to ~/.starforge/data/telemetry.log. There is no rotation, size cap, or pruning. A heavy user running starforge hundreds of times daily will accumulate unbounded log files. There is also no way to audit what is stored without manually opening the file.
Resolution
Implement rolling telemetry with a configurable retention policy. Cap the log at 10,000 entries or 5MB, whichever comes first — on each write, check file size and prune oldest entries by rewriting. Use tracing-appender's RollingFileAppender (already a dependency) configured with Rotation::Daily and a max_log_files limit. Add starforge telemetry show that pretty-prints the last N events in a table using the existing print utilities. Add starforge telemetry clear to wipe the log. Serialize each event as a structured JSON line with schema version, timestamp, command, duration_ms, success — making it queryable via jq. Document the exact schema in the README so users know precisely what is stored. On first run after a starforge upgrade, re-display the telemetry notice if the schema version changed.
Overview
src/utils/telemetry.rsappends events to~/.starforge/data/telemetry.log. There is no rotation, size cap, or pruning. A heavy user runningstarforgehundreds of times daily will accumulate unbounded log files. There is also no way to audit what is stored without manually opening the file.Resolution
Implement rolling telemetry with a configurable retention policy. Cap the log at 10,000 entries or 5MB, whichever comes first — on each write, check file size and prune oldest entries by rewriting. Use
tracing-appender'sRollingFileAppender(already a dependency) configured withRotation::Dailyand amax_log_fileslimit. Addstarforge telemetry showthat pretty-prints the last N events in a table using the existingprintutilities. Addstarforge telemetry clearto wipe the log. Serialize each event as a structured JSON line with schema version, timestamp, command, duration_ms, success — making it queryable viajq. Document the exact schema in the README so users know precisely what is stored. On first run after a starforge upgrade, re-display the telemetry notice if the schema version changed.