Repository navigation
Conversation
9a47b56 to
66690ca
Compare
66690ca to
62b4476
Compare
|
Rebased onto current
Recording ( Full gate on Windows 11: fmt clean, clippy zero warnings, 3599 passed / 0 failed. The 3 remaining failures ( |
62b4476 to
8ec0ecb
Compare
|
Friendly ping: this one is still waiting on workflow approval. The fork-PR CI run for 8ec0ecb is sitting at Re-checked today against develop c356374:
Happy to rebase onto current develop if a fresh head is easier to review. |
8ec0ecb to
5a306cd
Compare
`commands` has been stamped with the cwd since project-scoped stats landed, but `parse_failures` was not. A failure could therefore only be related to other telemetry by bare timestamp, which is ambiguous on a machine running concurrent sessions in different projects — so "which project do rtk's filters keep breaking in?" was not answerable from the data. - Add `parse_failures.project_path TEXT DEFAULT ''`, stamped by `record_parse_failure` via the same `current_project_path_string()` helper `record` uses. Call sites are unchanged. - Add `get_parse_failure_summary_filtered()` and wire `--project` through `rtk gain --failures`, using the same exact-or-subdirectory GLOB scoping as the `commands` queries. The unscoped failure log now labels each recent row with its project directory, since that view spans several projects. - Index `(project_path, timestamp)` to match `idx_project_path_timestamp`. The column is added in `run_schema_migrations()`, and SCHEMA_VERSION goes from 2 to 3. v1.0.0 already stamps databases with user_version 2, so without the bump `Tracker::new()`'s version gate would skip the new statement on every machine that has run 1.0. A test opens a v2-stamped DB through the gated path to pin that. Existing rows take the column DEFAULT rather than NULL, so readers never have to tell "old row" from "unknown project". No new field is reported upstream: telemetry sends `parse_failures_24h` and `projects_count`, both counts, and no raw path leaves the machine. Verified on a copy of a production history.db reshaped to v1.0's schema (user_version 2, no parse_failures.project_path): all 17653 existing rows migrate to '', user_version becomes 3, the index is created and 1.0's own tables are untouched. Stamping and `--failures --project` scoping are covered by the unit tests.
5a306cd to
b1a2d72
Compare
|
@KuSh, a gentle nudge on this one when you have a moment. It's small and self-contained (3 files, one commit), and it still merges cleanly onto today's Re-checked today with this branch merged onto e05c7bd, on Windows x86_64-pc-windows-gnu: One thing to watch whenever this is rebased: v1.0 took The fork-PR CI run for b1a2d72 has been waiting on workflow approval since 10-14. Could someone approve it and take a look? If you'd rather it be sliced differently, or folded into something you already have open around tracking, I'm happy to do that. |
Problem
commandshas been stamped with the cwd since project-scoped stats landed, butparse_failureswas not. A failure could therefore only be related to other telemetry by bare timestamp, which is ambiguous on a machine running concurrent sessions in different projects — so "which project do rtk's filters keep breaking in?" was not answerable from the data.Changes
parse_failures.project_path TEXT DEFAULT '', stamped byrecord_parse_failurevia the samecurrent_project_path_string()helperrecorduses. Call sites are unchanged.get_parse_failure_summary_filtered()and wire--projectthroughrtk gain --failures, using the same exact-or-subdirectory GLOB scoping as thecommandsqueries. The unscoped failure log now labels each recent row with its project directory, since that view spans several projects.(project_path, timestamp)to matchidx_project_path_timestamp.Migration handling
The column is added in
run_schema_migrations(), andSCHEMA_VERSIONgoes from 2 to 3. v1.0.0 already stamps databases withuser_version2, so without the bumpTracker::new()'s version gate would skip the new statement on every machine that has run 1.0.test_gated_open_migrates_v2_db_to_parse_failures_project_pathopens a v2-stamped DB through the gated path to pin that (it fails with the version left at 2).Existing rows take the column DEFAULT rather than NULL, so readers never have to tell "old row" from "unknown project".
Privacy
No new field is reported upstream: telemetry sends
parse_failures_24handprojects_count, both counts, and no raw path leaves the machine.Verification
Rebased onto develop 8157d4d (v1.0.0).
cargo test --all --no-fail-faston Windows: every target passes except two known Windows-environment failures in files this PR doesn't touch (find_cmd::run_from_args_propagates_find_exit_statusandstream::test_read_lines_lossy_preserves_lines_after_invalid_utf8. Clippy is clean.On a copy of a production
history.dbreshaped to v1.0's schema (user_version2, noparse_failures.project_path): all 17653 existing rows migrate to'',user_versionbecomes 3, the index is created and 1.0's own tables are untouched.