Commit 8e9068a
Remove the dead history_loader module (#686)
* Remove the dead history_loader module
`history_loader::load_all` was deleted when host history moved to ACP
`session/list`, but the module stayed behind: half of it was disk-scanner
dead code kept compiling only by `#[allow(dead_code)]`, and its header
still documented a per-CLI on-disk scan that no longer runs. The name
alone implied WTA cold-scans four CLI transcript stores at startup.
Dissolve it into the code that actually uses the survivors:
- `parse_iso_to_system_time` and `short_id` move to `session_history.rs`
next to their only callers (ACP `SessionInfo::updated_at` and the
no-title fallback label), with the Codex-specific doc rewritten.
- `codex_record_is_subagent_meta` / `codex_payload_is_subagent` move to
`session_watcher/classify_codex.rs` as `record_is_subagent_meta` /
`payload_is_subagent`, beside the classifier that consumes them.
- Delete the YAML block-scalar parser, the JSONL title extractors and
their helpers, all unused.
Also refresh comments that still pointed at `load_all` or the removed
`wsl_acp` module, and mark the two spec sections describing the deleted
disk scanner as superseded.
No behavior change; tests move with their code.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 741e2eec-21f3-4286-8e2e-500eb06d553d
* Parse timestamps with the time crate instead of by hand
`parse_iso_to_system_time` was ~125 lines of hand-rolled ISO 8601: manual
offset scanning, a leap-year table, day-of-month validation, and its own
days-since-epoch arithmetic. Replace it with `time::OffsetDateTime` +
`Rfc3339`.
`time` v0.3.47 is already linked into wta through ratatui-widgets and
tracing-appender and is already listed in cgmanifest.json and NOTICE.md, so
promoting it to a direct dependency adds no third-party code; only the
`parsing` feature is new. Re-running Generate-WtaThirdPartyNotices.ps1
produces no diff (276 crates before and after).
Behavior is preserved, including the two non-RFC-3339 quirks the old parser
had, now explicit and tested:
- offset-less `YYYY-MM-DDTHH:MM:SS` is still read as UTC, via a retry with
`Z` appended rather than silently dropping the value;
- pre-epoch timestamps still return `None`, so callers can keep treating
`SystemTime` as an offset from `UNIX_EPOCH`.
All existing parse tests pass unchanged; added cases for the offset-less
fallback and for malformed input.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 741e2eec-21f3-4286-8e2e-500eb06d553d
* Address review: spelling and helper visibility
- Rename `parse_iso_reads_offsetless_timestamps_as_utc` to
`..._without_offset_as_utc`. check-spelling flagged `offsetless`;
rewording keeps the allowlist untouched for a single test name.
- Narrow the Codex subagent helpers moved in this PR:
`record_is_subagent_meta` is `pub(super)` (its only caller is
`session_watcher::process_change`) and `payload_is_subagent` is now
private, since nothing outside `classify_codex` calls it. `classify`
keeps its existing visibility; it predates this PR.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 741e2eec-21f3-4286-8e2e-500eb06d553d
* Convert to SystemTime without a panicking Add
`SystemTime::from(OffsetDateTime)` reaches `impl Add<Duration> for
SystemTime`, which panics on overflow, so the function's documented
"never panics" contract held only because `time` caps years at 9999.
That cap is the `large-dates` feature, and feature unification puts it
outside this crate's control, so fail closed instead: take
`unix_timestamp()` through `u64::try_from` (which also subsumes the
pre-epoch rejection) and add it with `SystemTime::checked_add`.
Adds `parse_iso_preserves_fractional_seconds`, since the `Duration` is
now assembled by hand and sub-second precision has to be carried across
explicitly.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 741e2eec-21f3-4286-8e2e-500eb06d553d
* Fix comments that misdescribed the agent-pane origin join
`classify_and_map` does not stamp `AgentPane` origin onto historical
rows — it consults the agent-pane index to subtract those sessions from
history outright. Repointing the old `history_loader::load_all` comments
at it carried over a claim that was true of the deleted disk scanner but
is not true of the ACP mapper.
- app.rs and the `SessionOrigin` doc now say the flag is stamped on the
live row and kept after it ends, and that rows rebuilt from ACP
`session/list` never carry it because they are filtered out.
- session_registry.rs: `session_history` maps `session/list` rows; the
listing itself happens in its caller. Dropped the "ACP history scan"
wording that implied it owns I/O.
- hybrid-agent-session-tracking.md: the superseded note now names the
removed symbols the section still references, so readers do not go
looking for deleted code.
Comment-only; no behavior change.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 741e2eec-21f3-4286-8e2e-500eb06d553d
* Attribute the overflow panic to the right impl
`SystemTime::from(OffsetDateTime)` has no `Add` of its own; it is
implemented as `SystemTime::UNIX_EPOCH + duration`, and that `Add` impl
is what panics on overflow. Reword so the comment names the impl the
`checked_add` is actually avoiding.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 741e2eec-21f3-4286-8e2e-500eb06d553d
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 741e2eec-21f3-4286-8e2e-500eb06d553d1 parent 728bc46 commit 8e9068a
15 files changed
Lines changed: 208 additions & 728 deletions
File tree
- doc/specs
- tools/wta
- src
- master
- protocol/acp
- session_watcher
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
245 | 257 | | |
246 | 258 | | |
247 | 259 | | |
| |||
283 | 295 | | |
284 | 296 | | |
285 | 297 | | |
286 | | - | |
| 298 | + | |
287 | 299 | | |
288 | 300 | | |
289 | 301 | | |
| |||
403 | 415 | | |
404 | 416 | | |
405 | 417 | | |
406 | | - | |
| 418 | + | |
407 | 419 | | |
408 | 420 | | |
409 | 421 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
3 | 9 | | |
4 | 10 | | |
5 | 11 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
32 | | - | |
| 30 | + | |
| 31 | + | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
| |||
44 | 43 | | |
45 | 44 | | |
46 | 45 | | |
47 | | - | |
48 | | - | |
| 46 | + | |
| 47 | + | |
49 | 48 | | |
50 | 49 | | |
51 | 50 | | |
| |||
133 | 132 | | |
134 | 133 | | |
135 | 134 | | |
136 | | - | |
137 | | - | |
| 135 | + | |
| 136 | + | |
138 | 137 | | |
139 | 138 | | |
140 | 139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
160 | 162 | | |
161 | 163 | | |
162 | 164 | | |
| |||
1147 | 1149 | | |
1148 | 1150 | | |
1149 | 1151 | | |
1150 | | - | |
1151 | | - | |
| 1152 | + | |
| 1153 | + | |
1152 | 1154 | | |
1153 | 1155 | | |
1154 | 1156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
732 | 732 | | |
733 | 733 | | |
734 | 734 | | |
735 | | - | |
736 | | - | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
737 | 739 | | |
738 | 740 | | |
739 | 741 | | |
| |||
0 commit comments