Skip to content

perf: reuse stored items on republish and drop stale benchmark campaigns - #7

Merged
maxgfr merged 2 commits into
mainfrom
chore-prune-stale-benchmarks
Sep 11, 2026
Merged

maxgfr merged 2 commits into
mainfrom
chore-prune-stale-benchmarks

Conversation

@maxgfr

@maxgfr maxgfr commented Sep 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • Benchmarks. The Luna, Haiku and Fable pilots against Caveman, Ponytail, RTK and Headroom measured Scopelet 0.1.x–0.3.x with the manual skill. The engine, the default presentation and the installation model have all changed since, so their reports, protocols, harness, exporters and result files are removed rather than kept as stale evidence. What remains is reproducible offline on the shipped binary: bench/content.py (facts kept, bytes round-tripped, cold and warm timings) and bench/performance.py (wall time and peak memory, one or more arms with byte-identical output enforced). Fresh reports are published under bench/results/, the content gate is pinned to them, and the README speed table, docs/verification.md and bench/README.md describe only what is measured now.
  • Store. Republishing bytes whose content address already existed re-read the whole item, re-hashed it and compared it with the input: a second pass over a 32 MiB stream for a check every read already makes. An existing regular file of the right length is now reused and touched; a file of the wrong length is treated as an interrupted publication and replaced. Same-length damage is still rejected on read.

Measurements (macOS arm64, 30 repetitions, outputs byte-identical on every case)

Case Before After
32 MiB stream, warm cache 287 ms / 113 MB 172 ms / 79 MB
3 MB log, warm cache 36 ms 25 ms
Repository query over 400 files, warm cache 29 ms 21 ms
Cold cache, every case unchanged unchanged

Verification

cargo fmt --check, cargo clippy --all-targets -- -D warnings, cargo test (new tests for reuse, repair and same-length rejection), cargo run -- bench, scripts/check_skill.py --pack, bench unit tests, npm test, scripts/check_readme.py, scripts/check_adapters.py. The CLI, the hook adapters for all three hosts and the installer were also exercised end to end in isolated configurations on realistic outputs (test logs, diffs, ANSI progress, malformed JSONL, binary input, threshold sizes, exit-status propagation) with no anomaly.

Publishing bytes whose content address already exists re-read the whole
item, hashed it again and compared it with the input. On a 32 MiB stream
that second pass cost 115 ms and 33 MB of memory for a check every read
already makes. An existing regular file of the right length is now reused
and touched; a file of the wrong length is an interrupted publication and
is replaced. Same-length damage is still rejected on read.

Measured with bench/performance.py, macOS arm64, 30 repetitions:
32 MiB warm 287 -> 172 ms, 3 MB log warm 36 -> 25 ms, repository query
warm 29 -> 21 ms, outputs byte-identical on every case.
…nary

The Luna, Haiku and Fable pilots against Caveman, Ponytail, RTK and
Headroom measured Scopelet 0.1.x-0.3.x with the manual skill. The engine,
the default presentation and the installation model have all changed since,
so their figures, protocols, harness, exporters and reports are removed
rather than kept as stale evidence.

What remains is reproducible offline on the binary that ships:
bench/content.py (facts kept, bytes round-tripped, cold and warm timings)
and bench/performance.py (wall time and peak memory, one or more arms with
byte-identical output enforced). Fresh 0.5.0 reports are published under
bench/results, the content gate is pinned to them, and the README speed
table and verification page describe only what is measured now.
@maxgfr maxgfr changed the title Drop stale benchmark campaigns and stop re-reading stored items on republish perf: reuse stored items on republish and drop stale benchmark campaigns Sep 11, 2026
@maxgfr
maxgfr merged commit 89ff144 into main Sep 11, 2026
6 checks passed
@maxgfr
maxgfr deleted the chore-prune-stale-benchmarks branch September 11, 2026 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant