Commit Graph

13 Commits

Author SHA1 Message Date
can1357 01c34db450 feat(hashline): added full-file hash snapshots with 4-hex tags
- Replaced snapshot internals with full-file records and removed contiguous/sparse snapshot APIs.
- Added file-hash normalization, computed `computeFileHash`, and updated grammar/messages to 4-hex tags.
- Simplified recovery by checking whole-file hashes first, then applying merge-replay fallback after mismatches.
- Updated coding-agent tools to use `record`/`recordFileSnapshot` and skip hash headers for unsnapshotted large files.
- Expanded patcher and snapshot tests to verify 4-hex anchors, hash deduplication, and cache-capped behavior.
2026-05-29 18:12:08 +02:00
can1357 d737714e8a feat(scripts/session-stats): added dual-format hashline parsing support
- Enhanced parser to accept both new ¶PATH and legacy §PATH section headers in edit input.
- Added dedicated new-format regex handlers for insert, replace, and delete ops while retaining legacy anchor parsing semantics.
- Bumped EDIT_PARSER_VERSION to 5 so downstream syncs refresh rows for the parser change.
2026-05-26 20:44:10 +02:00
can1357 ebd2f77770 feat: implemented canonical § hashlines with ≔/""/" ops in hashline parser
- Changed hashline format to canonical `§` section headers and `"`/`"`/`≔` operations across grammar, parser, and docs.
- Reworked range and op parsing so single anchors are valid, legacy `-`/`-=` ops error, and empty `≔` payloads now delete ranges.
- Removed legacy `HL_EDIT_SEP`, `$HSEP$`, and `hsep` plumbing, adopting raw payload lines.
- Updated execution, input, renderer, and streaming flows to use `HL_FILE_PREFIX` and `HL_OP_CHARS` helpers.
- Updated session-stats parsing to `§`/`≔`/`"`/`"` format, patch envelopes, and bumped parser versions.
- Removed the hashline-separator benchmark script and its PI_HL_SEP job orchestration.
2026-05-22 17:46:53 +09:00
can1357 1a77322a4d fix(hashline): adjusted hashline anchor rejection messaging and guidance
- Updated the hashline mismatch error to describe anchor mismatches against the current file.
- Rewrote hashline tool instructions to clarify insert payload rules, anchor usage, and avoidance of fabricated hashes.
- Expanded stale-edit detection and tests to recognize the revised anchor-mismatch rejection wording.
2026-05-14 07:06:42 +02:00
can1357 9828764cb4 feat(scripts-session-stats): added session-stats search relevance plotting
- Changed multi-file search paging to skip whole files and page results in file windows.
- Added per-file match caps, round-robin file selection, and new file-limit truncation reporting.
- Replaced match/result limit metadata with fileLimitReached and perFileLimitReached.
- Lowered read.defaultLimit default to 300 with 1 lead and 3 trailing context lines.
- Replaced the search skip test with file-pagination coverage and added per-file cap tests.
- Added session-stats analytics tooling to classify searches, detect repeats, and render relevance plots.
2026-05-13 11:38:09 +02:00
can1357 a541a63547 feat: added read-selector analyzers and coverage plotting tools
- Updated read range expansion to use 1 leading and 3 trailing context lines.
- Changed read.defaultLimit from 500 to 300 in settings defaults.
- Updated read docs and tests to reflect the asymmetric context line behavior.
- Added read-selector analyzers and replay simulators to evaluate coverage and savings.
- Added plotting tools that output new session-stats PNG dashboards from local usage data.
2026-05-13 11:33:42 +02:00
can1357 8b92ec937e feat: gpt-5 harmony errata fixes
- Replaced `===== ... =====` eval cell headers with `*** Begin ` / `*** End ` markers; legacy format remains renderable in HTML exports.
- Replaced hashline patch grammar with `*** Begin Patch` / `*** End Patch` envelope; old inputs without the envelope are still accepted.
- Extracted `sniffEvalLanguage` into a shared `sniff.ts` module reused by the parser and tool.
- Added `docs/ERRATA-GPT5-HARMONY.md` and `scripts/session-stats/harmony_backtest.py` documenting and backtesting the GPT-5 Harmony-header leak defect.
2026-05-10 19:52:44 +02:00
can1357 78b795ad80 feat(session-stats): added Python session-stats analyze/sync commands
- Added a Python `analyze.py` CLI with `tools`, `edits`, and `followups` session-stats subcommands.
- Added `sync.py` ingestion with `~/.omp/stats.db`, migration SQL, and incremental JSONL resume logic.
- Replaced `stats:run` in `package.json` with `stats:sync` and new `stats:edits`, `stats:tools`, and `stats:followups` scripts.
- Removed the Rust session-stats crate files (`Cargo.toml`, `main.rs`, `common.rs`, `cmd_*.rs`) and their old command logic.
- Removed `.gitignore` ignores for `scripts/session-stats/Cargo.lock` and `scripts/session-stats/edit-analysis.csv`.
- Updated eval tool guidance to show Python `asyncio.run(...)` usage.
2026-05-09 04:41:41 +02:00
can1357 0319aae382 feat(session-stats): added session-stats followups CLI for hashline edits
- Added a `followups` CLI command in `scripts/session-stats` for hashline edit follow-up analysis.
- Added `--max-fix`, `--max-gap`, `--min-dup`, `--pattern`, and `--show` options in `cmd_followups.rs`.
- Added follow-up heuristics for small fixes, tool self-corrections, overlapping re-edits, and payload/anchor duplications.
2026-05-09 02:34:31 +02:00
can1357 2693ac926d deps(deps): bumped cross-platform dependencies across Rust and Node lockfiles
- Updated Rust dependency manifests in `pi-natives` and `session-stats` to newer versions of rayon, tiktoken-rs, tree-sitter grammars, and supporting crates.
- Synchronized `Cargo.lock` with the manifest updates, including package bumps for fancy-regex, serde_spanned, toml components, and winnow.
- Refreshed `package.json` and `bun.lock` catalog and lock entries for newer Bun, AWS SDK, AI, and tooling package versions.
2026-05-06 17:00:02 +02:00
can1357 27430f1768 feat(session-stats): added session-stats rolling buckets and csv export
- Added timestamp and model fields to message and tool-call structs with serde defaults.
- Added timestamp parsing and bucket-format helpers, including clamped percentile calculation.
- Added rolling-window call grouping and CSV export via new `--by`, `--top`, `--tool`, and `--calls-csv` options.
- Added `TOOL_CALLS_CSV` env fallback and help text updates describing new bucketed percentile output.
2026-05-04 02:29:49 +02:00
can1357 0c8d52950f refactor(scripts/session-stats): adjusted session-stats defaults and dynamic output formatting
- Lowered the default session scan limit for edits and tools from 100000 to 1000 and updated usage text to match.
- Reworked grand-total and per-tool table rendering in session-stats to compute aligned column widths and include an aggregated "(N others)" row.
- Tuned the session-stats release profile by replacing full stripping with line-tables-only debug symbols and disabled split debuginfo stripping.
2026-04-30 02:34:26 +02:00
can1357 c39f7e0e20 feat(scripts/session-stats): added session-stats edit/tools subcommands 2026-04-30 02:13:15 +02:00