cc-transcript 14.45.3__tar.gz → 14.45.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/PKG-INFO +1 -1
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/pyproject.toml +1 -1
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/snapshot.rs +299 -88
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/snapshot_ledger_tests.rs +76 -38
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/snapshot_prepared_disk.rs +8 -1
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/snapshot_prepared_service.rs +43 -26
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/snapshot_regressions.rs +7 -5
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/snapshot_root_warm.rs +12 -7
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/Cargo.lock +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/Cargo.toml +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/LICENSE +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/README.md +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/__init__.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/__init__.pyi +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/_native.pyi +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/activity.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/activity_probe.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/builders.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/codex.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/command.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/context.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/corrections.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/cost.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/decision_store.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/decisions.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/discovery.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/disktruth.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/evidence.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/extract/__init__.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/extract/correct.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/facts.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/filterspec.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/heartbeats.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/ids.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/judge/__init__.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/judge/llm.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/judge/similar.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/judge/verdicts.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/ledger.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/literals.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/mining/__init__.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/mining/candidates.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/mining/confidence.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/mining/engine.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/mining/formats.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/mining/sampling.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/mining/signals.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/mining/sourcekind.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/mining/spec.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/mining/store.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/models.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/nlp.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/notifications.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/parser.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/py.typed +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/query.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/render.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/sentiment/__init__.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/sentiment/buckets.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/sentiment/data/afinn-en-165.tsv +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/sentiment/data/domain_overrides.tsv +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/sentiment/data/en-ewt.udpipe +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/sentiment/engine.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/sentiment/lexicon.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/sentiment/scorespec.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/snapshot_schema/config.schema.json +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/snapshot_schema/context.schema.json +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/snapshot_schema/request.schema.json +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/snapshot_schema/response.schema.json +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/snapshot_schema/tool_registry.schema.json +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/snapshots.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/synthetic.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/tools.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/cc_transcript/watch.py +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/cli/Cargo.toml +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/cli/src/commands/blame.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/cli/src/commands/corpus.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/cli/src/commands/corrections.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/cli/src/commands/digest.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/cli/src/commands/facts.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/cli/src/commands/grep.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/cli/src/commands/list.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/cli/src/commands/mod.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/cli/src/commands/scratchpad.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/cli/src/commands/show.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/cli/src/commands/slice.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/cli/src/commands/stats.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/cli/src/commands/watch.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/cli/src/lib.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/cli/src/output.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/cli/src/target.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/cli/src/timearg.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/Cargo.toml +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/benches/parse.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/benches/render.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/benches/toolcall.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/build.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/activity.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/actor.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/blame.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/buckets.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/codex/discovery.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/codex/lower.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/codex/mod.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/codex/parse.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/codex/probe.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/codex/protocol.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/codex/types.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/command.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/context.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/corrections.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/cost.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/discovery.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/facts.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/feedback.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/filter.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/gateway.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/ids.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/judge.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/lib.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/literals/command.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/literals/corrections.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/literals/feedback.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/literals/mining.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/literals/mod.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/literals/protocol.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/notifications.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/parse.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/protocol.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/pystr.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/query.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/render.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/rng.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/scan.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/scan_checkpoint.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/scan_grep.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/scan_grep_stream.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/scan_grep_stream_tests.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/scan_index.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/scan_projection.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/scan_regressions.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/scan_stream.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/schema.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/snapshot_activity.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/snapshot_codec.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/snapshot_codex_append.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/snapshot_labels.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/snapshot_ledger.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/snapshot_memory.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/snapshot_owned.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/snapshot_prepared.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/snapshot_projection.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/snapshot_text.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/sqlite.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/toolcall.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/types.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/value.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/src/watch.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/tests/sonic_arena_model.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/core/tests/std_allocation_model.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/py/Cargo.toml +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/py/build.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/py/data/command_prefix_pins.tsv +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/py/src/actor_bridge.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/py/src/bin/stub_gen.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/py/src/codex.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/py/src/command.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/py/src/context.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/py/src/corrections.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/py/src/discovery.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/py/src/feedback.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/py/src/judge.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/py/src/lexicon.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/py/src/lib.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/py/src/mining.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/py/src/nlp.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/py/src/python.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/py/src/render.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/py/src/score.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/py/src/snapshot_decode.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/py/src/snapshots.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/py/src/sqlite.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/py/src/toolcall.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/py/src/views/attachment.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/py/src/views/blocks.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/py/src/views/command.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/py/src/views/convert.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/py/src/views/dunder.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/py/src/views/events.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/py/src/views/meta.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/py/src/views/mod.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/py/src/views/print.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/py/src/views/store.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/py/src/views/system.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/py/src/views/toolcall.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/py/src/views/toolresult.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/py/src/views/transcript.rs +0 -0
- {cc_transcript-14.45.3 → cc_transcript-14.45.4}/rust/crates/py/src/watch.rs +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "cc-transcript"
|
|
3
|
-
version = "14.45.
|
|
3
|
+
version = "14.45.4" # informational — releases stamp the version from the git tag
|
|
4
4
|
description = "Grep every Claude Code session you've ever run."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = "PolyForm-Noncommercial-1.0.0"
|
|
@@ -29,6 +29,7 @@ use crate::snapshot_ledger::{arc_mirror, arc_slice_mirror, Reserved, MUTEX_STORA
|
|
|
29
29
|
use crate::snapshot_memory::{
|
|
30
30
|
arena_bytes, arena_charge, dom_parse_bound, entry_charge, MemoryCharge, SourceArena,
|
|
31
31
|
};
|
|
32
|
+
use crate::snapshot_prepared_disk::PreparedDiskKey;
|
|
32
33
|
use crate::snapshot_projection::JSON_LITERAL_OBJECT_CAPACITY;
|
|
33
34
|
use crate::types::{Entry, SYNTHETIC_MODEL};
|
|
34
35
|
|
|
@@ -1757,7 +1758,7 @@ impl Charge<String> for (String, u64) {
|
|
|
1757
1758
|
}
|
|
1758
1759
|
}
|
|
1759
1760
|
|
|
1760
|
-
impl Charge<
|
|
1761
|
+
impl Charge<PreparedDiskKey> for CachedPreparedFacts {
|
|
1761
1762
|
fn charge(&self) -> usize {
|
|
1762
1763
|
self.registry_generation.capacity()
|
|
1763
1764
|
+ self.admission.capacity()
|
|
@@ -1824,7 +1825,7 @@ pub(crate) struct StoreState {
|
|
|
1824
1825
|
prepared_builds: Ledgered<String, PreparedBuild>,
|
|
1825
1826
|
prepared_queries: Ledgered<String, PreparedQueryCursor>,
|
|
1826
1827
|
expired_prepared_queries: Ledgered<String, (String, u64)>,
|
|
1827
|
-
prepared_facts: Ledgered<
|
|
1828
|
+
prepared_facts: Ledgered<PreparedDiskKey, CachedPreparedFacts>,
|
|
1828
1829
|
warm_memberships: Ledgered<String, WarmMembership>,
|
|
1829
1830
|
deliveries: Ledgered<Arc<str>, Delivery>,
|
|
1830
1831
|
deliveries_expiry: DeadlineIndex<Arc<str>>,
|
|
@@ -1841,7 +1842,7 @@ pub(crate) struct StoreState {
|
|
|
1841
1842
|
carried_expiry: ExpiryIndex<(SourceIdentity, String)>,
|
|
1842
1843
|
recent_codex_expiry: ExpiryIndex<SourceIdentity>,
|
|
1843
1844
|
prepared_loads_expiry: ExpiryIndex<SourceIdentity>,
|
|
1844
|
-
prepared_facts_lru: BTreeSet<(u64,
|
|
1845
|
+
prepared_facts_lru: BTreeSet<(u64, PreparedDiskKey)>,
|
|
1845
1846
|
counters: [u64; 20],
|
|
1846
1847
|
transient_bytes: usize,
|
|
1847
1848
|
prepared_disk_index_bytes: usize,
|
|
@@ -2473,45 +2474,98 @@ impl StoreState {
|
|
|
2473
2474
|
}
|
|
2474
2475
|
}
|
|
2475
2476
|
|
|
2476
|
-
fn prepared_facts_growth(&self,
|
|
2477
|
-
self.prepared_facts.growth_for(
|
|
2478
|
-
+ usize::from(!self.prepared_facts.contains_key(
|
|
2479
|
-
* size_of::<(u64,
|
|
2477
|
+
fn prepared_facts_growth(&self, key: &PreparedDiskKey) -> usize {
|
|
2478
|
+
self.prepared_facts.growth_for(key)
|
|
2479
|
+
+ usize::from(!self.prepared_facts.contains_key(key))
|
|
2480
|
+
* size_of::<(u64, PreparedDiskKey)>()
|
|
2480
2481
|
}
|
|
2481
2482
|
|
|
2482
|
-
fn insert_prepared_facts(&mut self,
|
|
2483
|
-
self.prepared_facts.reserve_for(&
|
|
2483
|
+
fn insert_prepared_facts(&mut self, key: PreparedDiskKey, cached: CachedPreparedFacts) {
|
|
2484
|
+
self.prepared_facts.reserve_for(&key);
|
|
2484
2485
|
self.ledger.shared.reserve([facts_anchor(&cached.facts)]);
|
|
2485
2486
|
self.ledger.shared.acquire(facts_anchor(&cached.facts));
|
|
2486
2487
|
let last_used = cached.last_used;
|
|
2487
|
-
if let Some(displaced) = self.prepared_facts.insert(
|
|
2488
|
+
if let Some(displaced) = self.prepared_facts.insert(key, cached) {
|
|
2488
2489
|
self.ledger.shared.release(facts_key(&displaced.facts));
|
|
2489
|
-
self.prepared_facts_lru
|
|
2490
|
-
.remove(&(displaced.last_used, identity));
|
|
2490
|
+
self.prepared_facts_lru.remove(&(displaced.last_used, key));
|
|
2491
2491
|
}
|
|
2492
|
-
self.prepared_facts_lru.insert((last_used,
|
|
2492
|
+
self.prepared_facts_lru.insert((last_used, key));
|
|
2493
2493
|
}
|
|
2494
2494
|
|
|
2495
|
-
fn remove_prepared_facts(&mut self,
|
|
2496
|
-
let cached = self.prepared_facts.remove(
|
|
2495
|
+
fn remove_prepared_facts(&mut self, key: &PreparedDiskKey) -> Option<CachedPreparedFacts> {
|
|
2496
|
+
let cached = self.prepared_facts.remove(key)?;
|
|
2497
2497
|
self.ledger.shared.release(facts_key(&cached.facts));
|
|
2498
|
-
self.prepared_facts_lru
|
|
2499
|
-
.remove(&(cached.last_used, *identity));
|
|
2498
|
+
self.prepared_facts_lru.remove(&(cached.last_used, *key));
|
|
2500
2499
|
Some(cached)
|
|
2501
2500
|
}
|
|
2502
2501
|
|
|
2503
|
-
fn
|
|
2502
|
+
fn identity_facts(
|
|
2503
|
+
&self,
|
|
2504
|
+
identity: SourceIdentity,
|
|
2505
|
+
) -> impl Iterator<Item = (&PreparedDiskKey, &CachedPreparedFacts)> {
|
|
2506
|
+
let work = self.ledger.shared.work();
|
|
2507
|
+
self.prepared_facts
|
|
2508
|
+
.iter()
|
|
2509
|
+
.inspect(move |_| work.tick(1))
|
|
2510
|
+
.filter(move |(key, _)| key.identity() == identity)
|
|
2511
|
+
}
|
|
2512
|
+
|
|
2513
|
+
fn retire_identity_facts(
|
|
2514
|
+
&mut self,
|
|
2515
|
+
identity: SourceIdentity,
|
|
2516
|
+
keep: impl Fn(&CachedPreparedFacts) -> bool,
|
|
2517
|
+
) -> usize {
|
|
2518
|
+
let Self {
|
|
2519
|
+
prepared_facts,
|
|
2520
|
+
prepared_facts_lru,
|
|
2521
|
+
ledger,
|
|
2522
|
+
..
|
|
2523
|
+
} = self;
|
|
2524
|
+
let mut retired = 0usize;
|
|
2525
|
+
prepared_facts.retain(|key, cached| {
|
|
2526
|
+
if key.identity() != identity || keep(cached) {
|
|
2527
|
+
return true;
|
|
2528
|
+
}
|
|
2529
|
+
ledger.shared.release(facts_key(&cached.facts));
|
|
2530
|
+
prepared_facts_lru.remove(&(cached.last_used, *key));
|
|
2531
|
+
retired += 1;
|
|
2532
|
+
false
|
|
2533
|
+
});
|
|
2534
|
+
retired
|
|
2535
|
+
}
|
|
2536
|
+
|
|
2537
|
+
fn remove_identity_facts(&mut self, identity: SourceIdentity) -> usize {
|
|
2538
|
+
self.retire_identity_facts(identity, |_| false)
|
|
2539
|
+
}
|
|
2540
|
+
|
|
2541
|
+
#[cfg(test)]
|
|
2542
|
+
fn has_prepared_facts(&self, identity: &SourceIdentity) -> bool {
|
|
2543
|
+
self.identity_facts(*identity).next().is_some()
|
|
2544
|
+
}
|
|
2545
|
+
|
|
2546
|
+
#[cfg(test)]
|
|
2547
|
+
fn cached_prepared_facts(&self, identity: &SourceIdentity) -> &CachedPreparedFacts {
|
|
2548
|
+
let mut bindings = self.identity_facts(*identity).map(|(_, cached)| cached);
|
|
2549
|
+
let cached = bindings.next().expect("cached facts");
|
|
2550
|
+
assert!(
|
|
2551
|
+
bindings.next().is_none(),
|
|
2552
|
+
"several bindings are cached for one identity"
|
|
2553
|
+
);
|
|
2554
|
+
cached
|
|
2555
|
+
}
|
|
2556
|
+
|
|
2557
|
+
fn evictable_prepared_facts(&self) -> Option<PreparedDiskKey> {
|
|
2504
2558
|
let work = self.ledger.shared.work();
|
|
2505
2559
|
self.prepared_facts_lru
|
|
2506
2560
|
.iter()
|
|
2507
|
-
.map(|(_,
|
|
2561
|
+
.map(|(_, key)| *key)
|
|
2508
2562
|
.inspect(|_| work.tick(1))
|
|
2509
|
-
.find(|
|
|
2563
|
+
.find(|key| self.prepared_facts[key].evictable())
|
|
2510
2564
|
}
|
|
2511
2565
|
|
|
2512
2566
|
fn prepared_facts_fit_sparing(
|
|
2513
2567
|
&self,
|
|
2514
|
-
|
|
2568
|
+
key: PreparedDiskKey,
|
|
2515
2569
|
accounted: usize,
|
|
2516
2570
|
budget: usize,
|
|
2517
2571
|
spared: impl Fn(&CachedPreparedFacts) -> bool,
|
|
@@ -2523,14 +2577,14 @@ impl StoreState {
|
|
|
2523
2577
|
let mut used = self.ledger.shared.facts()
|
|
2524
2578
|
- self
|
|
2525
2579
|
.prepared_facts
|
|
2526
|
-
.get(&
|
|
2580
|
+
.get(&key)
|
|
2527
2581
|
.filter(|cached| cached.evictable())
|
|
2528
2582
|
.map_or(0, |cached| cached.facts.accounted_bytes());
|
|
2529
2583
|
for (_, victim) in &self.prepared_facts_lru {
|
|
2530
2584
|
if accounted <= budget.saturating_sub(used) {
|
|
2531
2585
|
return true;
|
|
2532
2586
|
}
|
|
2533
|
-
if *victim ==
|
|
2587
|
+
if *victim == key {
|
|
2534
2588
|
continue;
|
|
2535
2589
|
}
|
|
2536
2590
|
work.tick(1);
|
|
@@ -2548,21 +2602,21 @@ impl StoreState {
|
|
|
2548
2602
|
|
|
2549
2603
|
fn touch_prepared_facts(
|
|
2550
2604
|
&mut self,
|
|
2605
|
+
key: &PreparedDiskKey,
|
|
2551
2606
|
stamp: SourceStamp,
|
|
2552
2607
|
registry_generation: &str,
|
|
2553
2608
|
admission: &str,
|
|
2554
2609
|
authority: &Value,
|
|
2555
2610
|
classifier: &Value,
|
|
2556
2611
|
) -> Option<Arc<crate::snapshot_prepared::PreparedFacts>> {
|
|
2557
|
-
let mut cached = self.prepared_facts.get_mut(
|
|
2612
|
+
let mut cached = self.prepared_facts.get_mut(key)?;
|
|
2558
2613
|
if !cached.serves(stamp, registry_generation, admission, authority, classifier) {
|
|
2559
2614
|
return None;
|
|
2560
2615
|
}
|
|
2561
2616
|
let previous = cached.last_used;
|
|
2562
2617
|
cached.last_used = now_ms();
|
|
2563
|
-
self.prepared_facts_lru.remove(&(previous,
|
|
2564
|
-
self.prepared_facts_lru
|
|
2565
|
-
.insert((cached.last_used, stamp.identity));
|
|
2618
|
+
self.prepared_facts_lru.remove(&(previous, *key));
|
|
2619
|
+
self.prepared_facts_lru.insert((cached.last_used, *key));
|
|
2566
2620
|
Some(Arc::clone(&cached.facts))
|
|
2567
2621
|
}
|
|
2568
2622
|
|
|
@@ -3555,6 +3609,7 @@ impl NativeStore {
|
|
|
3555
3609
|
|
|
3556
3610
|
fn touch_retained_facts(
|
|
3557
3611
|
&self,
|
|
3612
|
+
key: &PreparedDiskKey,
|
|
3558
3613
|
stamp: SourceStamp,
|
|
3559
3614
|
registry_generation: &str,
|
|
3560
3615
|
admission: &str,
|
|
@@ -3563,6 +3618,7 @@ impl NativeStore {
|
|
|
3563
3618
|
) -> Option<RetainedFacts<'_>> {
|
|
3564
3619
|
let mut state = self.lock_state();
|
|
3565
3620
|
let facts = state.touch_prepared_facts(
|
|
3621
|
+
key,
|
|
3566
3622
|
stamp,
|
|
3567
3623
|
registry_generation,
|
|
3568
3624
|
admission,
|
|
@@ -5261,7 +5317,7 @@ impl NativeStore {
|
|
|
5261
5317
|
}
|
|
5262
5318
|
|
|
5263
5319
|
#[cfg(test)]
|
|
5264
|
-
fn audit_cached_facts_bytes(_: &
|
|
5320
|
+
fn audit_cached_facts_bytes(_: &PreparedDiskKey, cached: &CachedPreparedFacts) -> usize {
|
|
5265
5321
|
let CachedPreparedFacts {
|
|
5266
5322
|
stamp: _,
|
|
5267
5323
|
registry_generation,
|
|
@@ -5517,7 +5573,7 @@ impl NativeStore {
|
|
|
5517
5573
|
+ state.recent_codex_expiry.heap_bytes()
|
|
5518
5574
|
+ state.prepared_loads_expiry.heap_bytes()
|
|
5519
5575
|
+ state.deliveries_expiry.index_bytes()
|
|
5520
|
-
+ state.prepared_facts_lru.len() * size_of::<(u64,
|
|
5576
|
+
+ state.prepared_facts_lru.len() * size_of::<(u64, PreparedDiskKey)>()
|
|
5521
5577
|
+ state.prepared_disk_index_bytes
|
|
5522
5578
|
}
|
|
5523
5579
|
|
|
@@ -5597,11 +5653,9 @@ impl NativeStore {
|
|
|
5597
5653
|
state.prepared_facts.len(),
|
|
5598
5654
|
"prepared facts lru index diverges from the cache"
|
|
5599
5655
|
);
|
|
5600
|
-
for (
|
|
5656
|
+
for (key, cached) in state.prepared_facts.iter() {
|
|
5601
5657
|
assert!(
|
|
5602
|
-
state
|
|
5603
|
-
.prepared_facts_lru
|
|
5604
|
-
.contains(&(cached.last_used, *identity)),
|
|
5658
|
+
state.prepared_facts_lru.contains(&(cached.last_used, *key)),
|
|
5605
5659
|
"prepared facts lru index misses a cached entry"
|
|
5606
5660
|
);
|
|
5607
5661
|
}
|
|
@@ -14168,7 +14222,7 @@ mod tests {
|
|
|
14168
14222
|
);
|
|
14169
14223
|
assert_eq!(first["data"]["value"].as_bool(), Some(false), "{first:?}");
|
|
14170
14224
|
let identity = SourceStamp::of(&std::fs::metadata(&sidechain).unwrap()).identity;
|
|
14171
|
-
store.lock_state().
|
|
14225
|
+
assert_eq!(store.lock_state().remove_identity_facts(identity), 1);
|
|
14172
14226
|
let writes = store.prepared_disk.stats().writes;
|
|
14173
14227
|
let before = store.state.lock().unwrap().counters;
|
|
14174
14228
|
let from_disk = finish_prepared(
|
|
@@ -14183,12 +14237,7 @@ mod tests {
|
|
|
14183
14237
|
);
|
|
14184
14238
|
assert_eq!(store.state.lock().unwrap().counters[1], before[1]);
|
|
14185
14239
|
assert_eq!(store.prepared_disk.stats().writes, writes);
|
|
14186
|
-
assert!(store
|
|
14187
|
-
.state
|
|
14188
|
-
.lock()
|
|
14189
|
-
.unwrap()
|
|
14190
|
-
.prepared_facts
|
|
14191
|
-
.contains_key(&identity));
|
|
14240
|
+
assert!(store.state.lock().unwrap().has_prepared_facts(&identity));
|
|
14192
14241
|
}
|
|
14193
14242
|
|
|
14194
14243
|
fn fact_entry_key(
|
|
@@ -14206,10 +14255,12 @@ mod tests {
|
|
|
14206
14255
|
}
|
|
14207
14256
|
|
|
14208
14257
|
fn evict_memory_facts(store: &NativeStore, path: &Path) {
|
|
14209
|
-
|
|
14210
|
-
|
|
14211
|
-
|
|
14212
|
-
|
|
14258
|
+
assert_eq!(
|
|
14259
|
+
store
|
|
14260
|
+
.lock_state()
|
|
14261
|
+
.remove_identity_facts(SourceStamp::of(&std::fs::metadata(path).unwrap()).identity),
|
|
14262
|
+
1
|
|
14263
|
+
);
|
|
14213
14264
|
}
|
|
14214
14265
|
|
|
14215
14266
|
fn cache_reads(reply: &Value) -> (Option<u64>, Option<u64>, Option<u64>) {
|
|
@@ -14309,10 +14360,9 @@ mod tests {
|
|
|
14309
14360
|
Some("prepared facts revision was evicted")
|
|
14310
14361
|
);
|
|
14311
14362
|
assert_eq!(cache_reads(&corrupt), (Some(1), Some(stored), Some(0)));
|
|
14312
|
-
assert!(!store
|
|
14313
|
-
.
|
|
14314
|
-
|
|
14315
|
-
.contains_key(&SourceStamp::of(&std::fs::metadata(&sidechain).unwrap()).identity));
|
|
14363
|
+
assert!(!store.lock_state().has_prepared_facts(
|
|
14364
|
+
&SourceStamp::of(&std::fs::metadata(&sidechain).unwrap()).identity
|
|
14365
|
+
));
|
|
14316
14366
|
let stats = store.request(
|
|
14317
14367
|
&json!({"schema":SCHEMA,"id":"stats","operation":"stats"}),
|
|
14318
14368
|
&owner,
|
|
@@ -14555,7 +14605,7 @@ mod tests {
|
|
|
14555
14605
|
members
|
|
14556
14606
|
.iter()
|
|
14557
14607
|
.filter(|member| {
|
|
14558
|
-
state.
|
|
14608
|
+
state.has_prepared_facts(
|
|
14559
14609
|
&SourceStamp::of(&std::fs::metadata(member).unwrap()).identity,
|
|
14560
14610
|
)
|
|
14561
14611
|
})
|
|
@@ -14652,9 +14702,9 @@ mod tests {
|
|
|
14652
14702
|
.iter()
|
|
14653
14703
|
.map(|member| {
|
|
14654
14704
|
state
|
|
14655
|
-
.
|
|
14656
|
-
.
|
|
14657
|
-
.map(|cached| cached.facts.accounted_bytes())
|
|
14705
|
+
.identity_facts(member_identity(member))
|
|
14706
|
+
.next()
|
|
14707
|
+
.map(|(_, cached)| cached.facts.accounted_bytes())
|
|
14658
14708
|
})
|
|
14659
14709
|
.collect()
|
|
14660
14710
|
}
|
|
@@ -14662,17 +14712,22 @@ mod tests {
|
|
|
14662
14712
|
fn forget_member_facts(store: &NativeStore, members: &[PathBuf]) {
|
|
14663
14713
|
let mut state = store.lock_state();
|
|
14664
14714
|
for member in members {
|
|
14665
|
-
state.
|
|
14715
|
+
state.remove_identity_facts(member_identity(member));
|
|
14666
14716
|
}
|
|
14667
14717
|
}
|
|
14668
14718
|
|
|
14669
14719
|
fn age_member_facts(store: &NativeStore, member: &Path) {
|
|
14670
14720
|
let mut state = store.lock_state();
|
|
14671
|
-
let
|
|
14672
|
-
|
|
14673
|
-
|
|
14674
|
-
|
|
14675
|
-
|
|
14721
|
+
let (key, previous) = {
|
|
14722
|
+
let (key, cached) = state
|
|
14723
|
+
.identity_facts(member_identity(member))
|
|
14724
|
+
.next()
|
|
14725
|
+
.unwrap();
|
|
14726
|
+
(*key, cached.last_used)
|
|
14727
|
+
};
|
|
14728
|
+
state.prepared_facts_lru.remove(&(previous, key));
|
|
14729
|
+
state.prepared_facts_lru.insert((0, key));
|
|
14730
|
+
state.prepared_facts.get_mut(&key).unwrap().last_used = 0;
|
|
14676
14731
|
}
|
|
14677
14732
|
|
|
14678
14733
|
fn warm_registered_pass(
|
|
@@ -14963,13 +15018,13 @@ mod tests {
|
|
|
14963
15018
|
assert_eq!(refusal(&admitted), ENTRY_EVICTED, "{admitted:?}");
|
|
14964
15019
|
assert_eq!(cache_reads(&admitted), (Some(1), Some(stored + 1), Some(0)));
|
|
14965
15020
|
assert_eq!(grown.load(Ordering::Relaxed), 1);
|
|
14966
|
-
assert!(!store.lock_state().
|
|
15021
|
+
assert!(!store.lock_state().has_prepared_facts(&identity));
|
|
14967
15022
|
assert!(!store.prepared_disk.has_entry(&key).unwrap());
|
|
14968
15023
|
let rebuilt = warm(1024 * 1024);
|
|
14969
15024
|
assert_eq!(rebuilt["status"].as_str(), Some("ok"), "{rebuilt:?}");
|
|
14970
15025
|
assert_eq!(rebuilt["data"]["complete"].as_bool(), Some(true));
|
|
14971
15026
|
assert_eq!(rebuilt["data"]["fact_cache_writes"].as_u64(), Some(2));
|
|
14972
|
-
assert!(store.lock_state().
|
|
15027
|
+
assert!(store.lock_state().has_prepared_facts(&identity));
|
|
14973
15028
|
}
|
|
14974
15029
|
|
|
14975
15030
|
struct FactReadGate {
|
|
@@ -15364,10 +15419,12 @@ mod tests {
|
|
|
15364
15419
|
let bounds = limits(&acquire(&source.path)).unwrap();
|
|
15365
15420
|
let root = pinned_root(&store, &source, &owner);
|
|
15366
15421
|
assert_eq!(root_facts_read(&store, &root, &owner, &bounds).1, 0);
|
|
15367
|
-
|
|
15368
|
-
|
|
15369
|
-
|
|
15370
|
-
|
|
15422
|
+
assert_eq!(
|
|
15423
|
+
store
|
|
15424
|
+
.lock_state()
|
|
15425
|
+
.remove_identity_facts(root.stamp.identity),
|
|
15426
|
+
1
|
|
15427
|
+
);
|
|
15371
15428
|
assert!(store
|
|
15372
15429
|
.prepared_disk
|
|
15373
15430
|
.has_entry(&fact_entry_key(&source.path, &owner))
|
|
@@ -15388,7 +15445,10 @@ mod tests {
|
|
|
15388
15445
|
assert_eq!(store.fact_lookups.load(Ordering::Relaxed), 1);
|
|
15389
15446
|
assert_eq!(store.fact_read_waits.load(Ordering::Relaxed), 1);
|
|
15390
15447
|
assert!(Arc::ptr_eq(
|
|
15391
|
-
&store
|
|
15448
|
+
&store
|
|
15449
|
+
.lock_state()
|
|
15450
|
+
.cached_prepared_facts(&root.stamp.identity)
|
|
15451
|
+
.facts,
|
|
15392
15452
|
&first.0
|
|
15393
15453
|
));
|
|
15394
15454
|
drop((first, second));
|
|
@@ -15405,10 +15465,12 @@ mod tests {
|
|
|
15405
15465
|
let root = pinned_root(&store, &source, &owner);
|
|
15406
15466
|
for binding in [&owner, &other] {
|
|
15407
15467
|
assert_eq!(root_facts_read(&store, &root, binding, &bounds).1, 0);
|
|
15408
|
-
|
|
15409
|
-
|
|
15410
|
-
|
|
15411
|
-
|
|
15468
|
+
assert_eq!(
|
|
15469
|
+
store
|
|
15470
|
+
.lock_state()
|
|
15471
|
+
.remove_identity_facts(root.stamp.identity),
|
|
15472
|
+
1
|
|
15473
|
+
);
|
|
15412
15474
|
assert!(store
|
|
15413
15475
|
.prepared_disk
|
|
15414
15476
|
.has_entry(&fact_entry_key(&source.path, binding))
|
|
@@ -15429,16 +15491,170 @@ mod tests {
|
|
|
15429
15491
|
assert!(!Arc::ptr_eq(&first.0, &second.0));
|
|
15430
15492
|
assert_eq!(store.fact_lookups.load(Ordering::Relaxed), 2);
|
|
15431
15493
|
assert_eq!(store.fact_read_waits.load(Ordering::Relaxed), 1);
|
|
15432
|
-
|
|
15433
|
-
|
|
15434
|
-
|
|
15435
|
-
|
|
15436
|
-
|
|
15437
|
-
|
|
15494
|
+
assert!(Arc::ptr_eq(
|
|
15495
|
+
&resident_binding(&store, &root, &owner),
|
|
15496
|
+
&first.0
|
|
15497
|
+
));
|
|
15498
|
+
assert!(Arc::ptr_eq(
|
|
15499
|
+
&resident_binding(&store, &root, &other),
|
|
15500
|
+
&second.0
|
|
15501
|
+
));
|
|
15502
|
+
assert_eq!(resident_bindings(&store, &root), 2);
|
|
15438
15503
|
drop((first, second));
|
|
15439
15504
|
store.assert_conserved();
|
|
15440
15505
|
}
|
|
15441
15506
|
|
|
15507
|
+
fn binding(store: &NativeStore, tool: &str) -> Value {
|
|
15508
|
+
let owner = context("a");
|
|
15509
|
+
let registry_generation = store
|
|
15510
|
+
.register_tool_registry(
|
|
15511
|
+
&json!([{"name":tool,"behaves_like":"Read","span_edit":null}]),
|
|
15512
|
+
&owner,
|
|
15513
|
+
)
|
|
15514
|
+
.unwrap();
|
|
15515
|
+
json!({"claimant":"a","admission":"hook","authority":owner["authority"],"registry_generation":registry_generation})
|
|
15516
|
+
}
|
|
15517
|
+
|
|
15518
|
+
fn resident_bindings(store: &NativeStore, root: &Arc<TranscriptSnapshot>) -> usize {
|
|
15519
|
+
store
|
|
15520
|
+
.lock_state()
|
|
15521
|
+
.identity_facts(root.stamp.identity)
|
|
15522
|
+
.count()
|
|
15523
|
+
}
|
|
15524
|
+
|
|
15525
|
+
fn resident_binding(
|
|
15526
|
+
store: &NativeStore,
|
|
15527
|
+
root: &Arc<TranscriptSnapshot>,
|
|
15528
|
+
owner: &Value,
|
|
15529
|
+
) -> Arc<crate::snapshot_prepared::PreparedFacts> {
|
|
15530
|
+
let key = fact_entry_key(&root.canonical_path, owner);
|
|
15531
|
+
let state = store.lock_state();
|
|
15532
|
+
let cached = state.prepared_facts.get(&key).expect("resident binding");
|
|
15533
|
+
assert_eq!(cached.stamp, root.stamp);
|
|
15534
|
+
Arc::clone(&cached.facts)
|
|
15535
|
+
}
|
|
15536
|
+
|
|
15537
|
+
#[test]
|
|
15538
|
+
fn alternating_bindings_on_one_source_read_disk_once_each() {
|
|
15539
|
+
let source = Source::new(&format!("{}\n{}\n", user("root"), user("child")));
|
|
15540
|
+
let store = fact_budget_store(16 * 1024 * 1024);
|
|
15541
|
+
let bounds = limits(&acquire(&source.path)).unwrap();
|
|
15542
|
+
let (a, b) = (binding(&store, "fetch_a"), binding(&store, "fetch_b"));
|
|
15543
|
+
let root = pinned_root(&store, &source, &a);
|
|
15544
|
+
for owner in [&a, &b] {
|
|
15545
|
+
assert_eq!(root_facts_read(&store, &root, owner, &bounds).1, 0);
|
|
15546
|
+
}
|
|
15547
|
+
assert_eq!(
|
|
15548
|
+
store
|
|
15549
|
+
.lock_state()
|
|
15550
|
+
.remove_identity_facts(root.stamp.identity),
|
|
15551
|
+
2
|
|
15552
|
+
);
|
|
15553
|
+
assert_eq!(store.fact_lookups.load(Ordering::Relaxed), 0);
|
|
15554
|
+
let reads: Vec<u64> = [&a, &b, &a, &b, &a, &b]
|
|
15555
|
+
.into_iter()
|
|
15556
|
+
.map(|owner| root_facts_read(&store, &root, owner, &bounds).1)
|
|
15557
|
+
.collect();
|
|
15558
|
+
assert_eq!(reads, [1, 1, 0, 0, 0, 0]);
|
|
15559
|
+
assert_eq!(store.fact_lookups.load(Ordering::Relaxed), 2);
|
|
15560
|
+
assert_eq!(resident_bindings(&store, &root), 2);
|
|
15561
|
+
let (first_a, first_b) = (
|
|
15562
|
+
resident_binding(&store, &root, &a),
|
|
15563
|
+
resident_binding(&store, &root, &b),
|
|
15564
|
+
);
|
|
15565
|
+
assert!(!Arc::ptr_eq(&first_a, &first_b));
|
|
15566
|
+
assert!(Arc::ptr_eq(
|
|
15567
|
+
&root_facts_read(&store, &root, &a, &bounds).0,
|
|
15568
|
+
&first_a
|
|
15569
|
+
));
|
|
15570
|
+
assert!(Arc::ptr_eq(
|
|
15571
|
+
&root_facts_read(&store, &root, &b, &bounds).0,
|
|
15572
|
+
&first_b
|
|
15573
|
+
));
|
|
15574
|
+
assert_eq!(store.fact_lookups.load(Ordering::Relaxed), 2);
|
|
15575
|
+
drop((first_a, first_b));
|
|
15576
|
+
store.assert_conserved();
|
|
15577
|
+
}
|
|
15578
|
+
|
|
15579
|
+
#[test]
|
|
15580
|
+
fn every_binding_of_one_source_stays_resident_while_its_bytes_fit() {
|
|
15581
|
+
let source = Source::new(&format!("{}\n", user("root")));
|
|
15582
|
+
let store = fact_budget_store(16 * 1024 * 1024);
|
|
15583
|
+
let bounds = limits(&acquire(&source.path)).unwrap();
|
|
15584
|
+
let bindings: Vec<Value> = (0..17)
|
|
15585
|
+
.map(|index| binding(&store, &format!("fetch_{index}")))
|
|
15586
|
+
.collect();
|
|
15587
|
+
let root = pinned_root(&store, &source, &bindings[0]);
|
|
15588
|
+
let published: Vec<_> = bindings
|
|
15589
|
+
.iter()
|
|
15590
|
+
.map(|owner| root_facts_read(&store, &root, owner, &bounds).0)
|
|
15591
|
+
.collect();
|
|
15592
|
+
assert_eq!(resident_bindings(&store, &root), bindings.len());
|
|
15593
|
+
assert_eq!(store.fact_builds.load(Ordering::Relaxed), bindings.len());
|
|
15594
|
+
for (owner, facts) in bindings.iter().zip(&published) {
|
|
15595
|
+
let again = root_facts_read(&store, &root, owner, &bounds);
|
|
15596
|
+
assert_eq!(again.1, 0);
|
|
15597
|
+
assert!(Arc::ptr_eq(&again.0, facts));
|
|
15598
|
+
assert!(Arc::ptr_eq(&resident_binding(&store, &root, owner), facts));
|
|
15599
|
+
}
|
|
15600
|
+
assert_eq!(store.fact_lookups.load(Ordering::Relaxed), 0);
|
|
15601
|
+
assert!(published
|
|
15602
|
+
.iter()
|
|
15603
|
+
.enumerate()
|
|
15604
|
+
.all(|(index, facts)| published[..index]
|
|
15605
|
+
.iter()
|
|
15606
|
+
.all(|earlier| !Arc::ptr_eq(earlier, facts))));
|
|
15607
|
+
drop(published);
|
|
15608
|
+
store.assert_conserved();
|
|
15609
|
+
}
|
|
15610
|
+
|
|
15611
|
+
#[test]
|
|
15612
|
+
fn stale_source_revision_rejects_every_cached_binding() {
|
|
15613
|
+
let source = Source::new(&format!("{}\n", user("root")));
|
|
15614
|
+
let store = fact_budget_store(16 * 1024 * 1024);
|
|
15615
|
+
let bounds = limits(&acquire(&source.path)).unwrap();
|
|
15616
|
+
let (a, b) = (binding(&store, "fetch_a"), binding(&store, "fetch_b"));
|
|
15617
|
+
let root = pinned_root(&store, &source, &a);
|
|
15618
|
+
let stale: Vec<_> = [&a, &b]
|
|
15619
|
+
.into_iter()
|
|
15620
|
+
.map(|owner| root_facts_read(&store, &root, owner, &bounds).0)
|
|
15621
|
+
.collect();
|
|
15622
|
+
assert_eq!(resident_bindings(&store, &root), 2);
|
|
15623
|
+
let stale_key = fact_entry_key(&source.path, &a);
|
|
15624
|
+
source.append(&format!("{}\n", user("child")));
|
|
15625
|
+
let revised = pinned_root(&store, &source, &a);
|
|
15626
|
+
assert_eq!(revised.stamp.identity, root.stamp.identity);
|
|
15627
|
+
assert_ne!(revised.stamp, root.stamp);
|
|
15628
|
+
let builds = store.fact_builds.load(Ordering::Relaxed);
|
|
15629
|
+
let fresh_a = root_facts_read(&store, &revised, &a, &bounds);
|
|
15630
|
+
assert_eq!(fresh_a.1, 0);
|
|
15631
|
+
assert_eq!(store.fact_builds.load(Ordering::Relaxed), builds + 1);
|
|
15632
|
+
assert_eq!(resident_bindings(&store, &revised), 1);
|
|
15633
|
+
assert!(Arc::ptr_eq(
|
|
15634
|
+
&resident_binding(&store, &revised, &a),
|
|
15635
|
+
&fresh_a.0
|
|
15636
|
+
));
|
|
15637
|
+
assert!(stale.iter().all(|facts| !Arc::ptr_eq(facts, &fresh_a.0)));
|
|
15638
|
+
let fresh_b = root_facts_read(&store, &revised, &b, &bounds);
|
|
15639
|
+
assert_eq!(store.fact_builds.load(Ordering::Relaxed), builds + 2);
|
|
15640
|
+
assert_eq!(resident_bindings(&store, &revised), 2);
|
|
15641
|
+
assert!(stale.iter().all(|facts| !Arc::ptr_eq(facts, &fresh_b.0)));
|
|
15642
|
+
assert!(store
|
|
15643
|
+
.lock_state()
|
|
15644
|
+
.touch_prepared_facts(
|
|
15645
|
+
&stale_key,
|
|
15646
|
+
root.stamp,
|
|
15647
|
+
a["registry_generation"].as_str().unwrap(),
|
|
15648
|
+
"hook",
|
|
15649
|
+
&a["authority"],
|
|
15650
|
+
&json!({"id":"native","version":"1"}),
|
|
15651
|
+
)
|
|
15652
|
+
.is_none());
|
|
15653
|
+
assert_eq!(store.fact_lookups.load(Ordering::Relaxed), 0);
|
|
15654
|
+
drop((stale, fresh_a, fresh_b));
|
|
15655
|
+
store.assert_conserved();
|
|
15656
|
+
}
|
|
15657
|
+
|
|
15442
15658
|
#[test]
|
|
15443
15659
|
fn metered_warming_never_completes_over_a_missing_or_replaced_entry() {
|
|
15444
15660
|
use std::os::unix::fs::{DirBuilderExt, OpenOptionsExt};
|
|
@@ -15515,7 +15731,7 @@ mod tests {
|
|
|
15515
15731
|
Some(round as u64 + 2)
|
|
15516
15732
|
);
|
|
15517
15733
|
assert_eq!(store.prepared_disk.entry_file_len(&key), stored);
|
|
15518
|
-
assert!(store.lock_state().
|
|
15734
|
+
assert!(store.lock_state().has_prepared_facts(&identity));
|
|
15519
15735
|
}
|
|
15520
15736
|
|
|
15521
15737
|
evict_memory_facts(&store, &member);
|
|
@@ -15583,14 +15799,12 @@ mod tests {
|
|
|
15583
15799
|
.state
|
|
15584
15800
|
.lock()
|
|
15585
15801
|
.unwrap()
|
|
15586
|
-
.
|
|
15587
|
-
.contains_key(&identity(&large)));
|
|
15802
|
+
.has_prepared_facts(&identity(&large)));
|
|
15588
15803
|
assert!(store
|
|
15589
15804
|
.state
|
|
15590
15805
|
.lock()
|
|
15591
15806
|
.unwrap()
|
|
15592
|
-
.
|
|
15593
|
-
.contains_key(&identity(&small)));
|
|
15807
|
+
.has_prepared_facts(&identity(&small)));
|
|
15594
15808
|
let writes = store.prepared_disk.stats().writes;
|
|
15595
15809
|
let before = store.state.lock().unwrap().counters;
|
|
15596
15810
|
ask(&large_query);
|
|
@@ -15600,8 +15814,7 @@ mod tests {
|
|
|
15600
15814
|
.state
|
|
15601
15815
|
.lock()
|
|
15602
15816
|
.unwrap()
|
|
15603
|
-
.
|
|
15604
|
-
.contains_key(&identity(&small)));
|
|
15817
|
+
.has_prepared_facts(&identity(&small)));
|
|
15605
15818
|
}
|
|
15606
15819
|
|
|
15607
15820
|
#[test]
|
|
@@ -15699,9 +15912,9 @@ mod tests {
|
|
|
15699
15912
|
.iter()
|
|
15700
15913
|
.map(|child| {
|
|
15701
15914
|
state
|
|
15702
|
-
.
|
|
15703
|
-
|
|
15704
|
-
|
|
15915
|
+
.cached_prepared_facts(
|
|
15916
|
+
&SourceStamp::of(&std::fs::metadata(child).unwrap()).identity,
|
|
15917
|
+
)
|
|
15705
15918
|
.facts
|
|
15706
15919
|
.accounted_bytes()
|
|
15707
15920
|
})
|
|
@@ -17808,9 +18021,7 @@ mod tests {
|
|
|
17808
18021
|
.map(|(key, _)| key.capacity())
|
|
17809
18022
|
.unwrap();
|
|
17810
18023
|
let graph = state.prepared_graphs[graph_id].lock().unwrap();
|
|
17811
|
-
assert!(state
|
|
17812
|
-
.prepared_facts
|
|
17813
|
-
.contains_key(&graph.root.stamp.identity));
|
|
18024
|
+
assert!(state.has_prepared_facts(&graph.root.stamp.identity));
|
|
17814
18025
|
let mut tasks = Vec::<GraphTask>::new();
|
|
17815
18026
|
tasks.reserve(1);
|
|
17816
18027
|
let mut dirs = Vec::<(PathBuf, Option<SourceStamp>)>::new();
|