cc-transcript 14.45.2__tar.gz → 14.45.3__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.2 → cc_transcript-14.45.3}/PKG-INFO +1 -1
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/pyproject.toml +1 -1
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/snapshot.rs +513 -2
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/snapshot_prepared_service.rs +37 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/Cargo.lock +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/Cargo.toml +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/LICENSE +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/README.md +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/__init__.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/__init__.pyi +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/_native.pyi +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/activity.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/activity_probe.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/builders.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/codex.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/command.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/context.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/corrections.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/cost.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/decision_store.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/decisions.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/discovery.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/disktruth.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/evidence.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/extract/__init__.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/extract/correct.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/facts.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/filterspec.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/heartbeats.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/ids.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/judge/__init__.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/judge/llm.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/judge/similar.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/judge/verdicts.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/ledger.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/literals.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/mining/__init__.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/mining/candidates.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/mining/confidence.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/mining/engine.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/mining/formats.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/mining/sampling.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/mining/signals.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/mining/sourcekind.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/mining/spec.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/mining/store.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/models.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/nlp.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/notifications.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/parser.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/py.typed +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/query.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/render.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/sentiment/__init__.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/sentiment/buckets.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/sentiment/data/afinn-en-165.tsv +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/sentiment/data/domain_overrides.tsv +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/sentiment/data/en-ewt.udpipe +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/sentiment/engine.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/sentiment/lexicon.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/sentiment/scorespec.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/snapshot_schema/config.schema.json +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/snapshot_schema/context.schema.json +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/snapshot_schema/request.schema.json +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/snapshot_schema/response.schema.json +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/snapshot_schema/tool_registry.schema.json +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/snapshots.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/synthetic.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/tools.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/cc_transcript/watch.py +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/cli/Cargo.toml +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/cli/src/commands/blame.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/cli/src/commands/corpus.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/cli/src/commands/corrections.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/cli/src/commands/digest.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/cli/src/commands/facts.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/cli/src/commands/grep.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/cli/src/commands/list.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/cli/src/commands/mod.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/cli/src/commands/scratchpad.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/cli/src/commands/show.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/cli/src/commands/slice.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/cli/src/commands/stats.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/cli/src/commands/watch.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/cli/src/lib.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/cli/src/output.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/cli/src/target.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/cli/src/timearg.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/Cargo.toml +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/benches/parse.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/benches/render.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/benches/toolcall.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/build.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/activity.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/actor.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/blame.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/buckets.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/codex/discovery.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/codex/lower.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/codex/mod.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/codex/parse.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/codex/probe.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/codex/protocol.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/codex/types.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/command.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/context.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/corrections.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/cost.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/discovery.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/facts.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/feedback.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/filter.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/gateway.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/ids.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/judge.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/lib.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/literals/command.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/literals/corrections.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/literals/feedback.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/literals/mining.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/literals/mod.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/literals/protocol.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/notifications.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/parse.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/protocol.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/pystr.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/query.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/render.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/rng.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/scan.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/scan_checkpoint.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/scan_grep.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/scan_grep_stream.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/scan_grep_stream_tests.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/scan_index.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/scan_projection.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/scan_regressions.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/scan_stream.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/schema.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/snapshot_activity.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/snapshot_codec.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/snapshot_codex_append.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/snapshot_labels.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/snapshot_ledger.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/snapshot_ledger_tests.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/snapshot_memory.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/snapshot_owned.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/snapshot_prepared.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/snapshot_prepared_disk.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/snapshot_projection.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/snapshot_regressions.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/snapshot_root_warm.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/snapshot_text.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/sqlite.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/toolcall.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/types.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/value.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/watch.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/tests/sonic_arena_model.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/tests/std_allocation_model.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/py/Cargo.toml +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/py/build.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/py/data/command_prefix_pins.tsv +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/py/src/actor_bridge.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/py/src/bin/stub_gen.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/py/src/codex.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/py/src/command.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/py/src/context.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/py/src/corrections.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/py/src/discovery.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/py/src/feedback.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/py/src/judge.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/py/src/lexicon.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/py/src/lib.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/py/src/mining.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/py/src/nlp.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/py/src/python.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/py/src/render.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/py/src/score.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/py/src/snapshot_decode.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/py/src/snapshots.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/py/src/sqlite.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/py/src/toolcall.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/py/src/views/attachment.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/py/src/views/blocks.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/py/src/views/command.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/py/src/views/convert.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/py/src/views/dunder.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/py/src/views/events.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/py/src/views/meta.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/py/src/views/mod.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/py/src/views/print.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/py/src/views/store.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/py/src/views/system.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/py/src/views/toolcall.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/py/src/views/toolresult.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/py/src/views/transcript.rs +0 -0
- {cc_transcript-14.45.2 → cc_transcript-14.45.3}/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.3" # 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"
|
|
@@ -9,8 +9,8 @@ use std::os::unix::ffi::OsStringExt;
|
|
|
9
9
|
use std::os::unix::fs::MetadataExt;
|
|
10
10
|
use std::path::{Path, PathBuf};
|
|
11
11
|
use std::sync::atomic::{AtomicBool, AtomicU64, AtomicUsize, Ordering};
|
|
12
|
-
use std::sync::{Arc, Mutex, MutexGuard, Weak};
|
|
13
|
-
use std::time::{SystemTime, UNIX_EPOCH};
|
|
12
|
+
use std::sync::{Arc, Condvar, Mutex, MutexGuard, Weak};
|
|
13
|
+
use std::time::{Duration, SystemTime, UNIX_EPOCH};
|
|
14
14
|
|
|
15
15
|
#[cfg(test)]
|
|
16
16
|
use sonic_rs::JsonType;
|
|
@@ -1845,6 +1845,7 @@ pub(crate) struct StoreState {
|
|
|
1845
1845
|
counters: [u64; 20],
|
|
1846
1846
|
transient_bytes: usize,
|
|
1847
1847
|
prepared_disk_index_bytes: usize,
|
|
1848
|
+
fact_read_in_flight: bool,
|
|
1848
1849
|
owned: crate::snapshot_owned::OwnedProjections,
|
|
1849
1850
|
ledger: RetainedLedger,
|
|
1850
1851
|
#[cfg(test)]
|
|
@@ -1855,6 +1856,7 @@ pub(crate) struct StoreState {
|
|
|
1855
1856
|
|
|
1856
1857
|
const TOUCH_TTL_MS: u64 = 30 * 60_000;
|
|
1857
1858
|
const EXPIRED_QUERY_TOMBSTONES: usize = 1024;
|
|
1859
|
+
const FACT_READ_WAIT_SLICE: Duration = Duration::from_millis(25);
|
|
1858
1860
|
|
|
1859
1861
|
fn codex_raw_len(snapshot: &Arc<TranscriptSnapshot>) -> usize {
|
|
1860
1862
|
snapshot.codex_raw.as_ref().map_or(0, |raw| raw.len())
|
|
@@ -1906,6 +1908,7 @@ impl StoreState {
|
|
|
1906
1908
|
counters: [0; 20],
|
|
1907
1909
|
transient_bytes: 0,
|
|
1908
1910
|
prepared_disk_index_bytes: 0,
|
|
1911
|
+
fact_read_in_flight: false,
|
|
1909
1912
|
owned: crate::snapshot_owned::OwnedProjections::default(),
|
|
1910
1913
|
ledger: RetainedLedger::new(work),
|
|
1911
1914
|
#[cfg(test)]
|
|
@@ -2783,6 +2786,7 @@ pub struct NativeStore {
|
|
|
2783
2786
|
seed: [u8; 32],
|
|
2784
2787
|
sequence: AtomicUsize,
|
|
2785
2788
|
state: Mutex<StoreState>,
|
|
2789
|
+
fact_read_released: Condvar,
|
|
2786
2790
|
classifiers: Mutex<HashMap<String, Arc<ClassifierCallback>>>,
|
|
2787
2791
|
policies: Mutex<HashMap<String, Arc<PolicyCallback>>>,
|
|
2788
2792
|
classified: Mutex<HashMap<String, Arc<TranscriptSnapshot>>>,
|
|
@@ -2813,6 +2817,8 @@ pub struct NativeStore {
|
|
|
2813
2817
|
#[cfg(test)]
|
|
2814
2818
|
pub(crate) fact_lookups: AtomicUsize,
|
|
2815
2819
|
#[cfg(test)]
|
|
2820
|
+
pub(crate) fact_read_waits: AtomicUsize,
|
|
2821
|
+
#[cfg(test)]
|
|
2816
2822
|
pub(crate) built_facts_hook:
|
|
2817
2823
|
Mutex<Option<Arc<dyn Fn(&Arc<crate::snapshot_prepared::PreparedFacts>) + Send + Sync>>>,
|
|
2818
2824
|
#[cfg(test)]
|
|
@@ -2868,6 +2874,17 @@ impl Drop for ProjectionReservation<'_> {
|
|
|
2868
2874
|
}
|
|
2869
2875
|
}
|
|
2870
2876
|
|
|
2877
|
+
pub(crate) struct FactReadClaim<'a> {
|
|
2878
|
+
store: &'a NativeStore,
|
|
2879
|
+
}
|
|
2880
|
+
|
|
2881
|
+
impl Drop for FactReadClaim<'_> {
|
|
2882
|
+
fn drop(&mut self) {
|
|
2883
|
+
self.store.lock_state().fact_read_in_flight = false;
|
|
2884
|
+
self.store.fact_read_released.notify_all();
|
|
2885
|
+
}
|
|
2886
|
+
}
|
|
2887
|
+
|
|
2871
2888
|
struct RetainedFacts<'a> {
|
|
2872
2889
|
store: &'a NativeStore,
|
|
2873
2890
|
facts: Option<Arc<crate::snapshot_prepared::PreparedFacts>>,
|
|
@@ -3251,6 +3268,7 @@ impl NativeStore {
|
|
|
3251
3268
|
seed,
|
|
3252
3269
|
sequence: AtomicUsize::new(1),
|
|
3253
3270
|
state: Mutex::new(state),
|
|
3271
|
+
fact_read_released: Condvar::new(),
|
|
3254
3272
|
classifiers: Mutex::new(HashMap::new()),
|
|
3255
3273
|
policies: Mutex::new(HashMap::new()),
|
|
3256
3274
|
classified: Mutex::new(HashMap::new()),
|
|
@@ -3281,6 +3299,8 @@ impl NativeStore {
|
|
|
3281
3299
|
#[cfg(test)]
|
|
3282
3300
|
fact_lookups: AtomicUsize::new(0),
|
|
3283
3301
|
#[cfg(test)]
|
|
3302
|
+
fact_read_waits: AtomicUsize::new(0),
|
|
3303
|
+
#[cfg(test)]
|
|
3284
3304
|
built_facts_hook: Mutex::new(None),
|
|
3285
3305
|
#[cfg(test)]
|
|
3286
3306
|
returned_facts_hook: Mutex::new(None),
|
|
@@ -3435,6 +3455,30 @@ impl NativeStore {
|
|
|
3435
3455
|
Ok(expires)
|
|
3436
3456
|
}
|
|
3437
3457
|
|
|
3458
|
+
pub(crate) fn claim_fact_read(
|
|
3459
|
+
&self,
|
|
3460
|
+
cancel: &Cancellation,
|
|
3461
|
+
deadline_unix_ms: u64,
|
|
3462
|
+
) -> Result<FactReadClaim<'_>, SnapshotError> {
|
|
3463
|
+
let mut state = self.lock_state();
|
|
3464
|
+
#[cfg(test)]
|
|
3465
|
+
{
|
|
3466
|
+
if state.fact_read_in_flight {
|
|
3467
|
+
self.fact_read_waits.fetch_add(1, Ordering::Relaxed);
|
|
3468
|
+
}
|
|
3469
|
+
}
|
|
3470
|
+
while state.fact_read_in_flight {
|
|
3471
|
+
state = self
|
|
3472
|
+
.fact_read_released
|
|
3473
|
+
.wait_timeout(state, FACT_READ_WAIT_SLICE)
|
|
3474
|
+
.expect("snapshot state")
|
|
3475
|
+
.0;
|
|
3476
|
+
cancel.check(deadline_unix_ms)?;
|
|
3477
|
+
}
|
|
3478
|
+
state.fact_read_in_flight = true;
|
|
3479
|
+
Ok(FactReadClaim { store: self })
|
|
3480
|
+
}
|
|
3481
|
+
|
|
3438
3482
|
pub(crate) fn reserve_projection(
|
|
3439
3483
|
&self,
|
|
3440
3484
|
context: &Value,
|
|
@@ -14928,6 +14972,473 @@ mod tests {
|
|
|
14928
14972
|
assert!(store.lock_state().prepared_facts.contains_key(&identity));
|
|
14929
14973
|
}
|
|
14930
14974
|
|
|
14975
|
+
struct FactReadGate {
|
|
14976
|
+
entered: std::sync::mpsc::Receiver<()>,
|
|
14977
|
+
released: Arc<(Mutex<bool>, Condvar)>,
|
|
14978
|
+
}
|
|
14979
|
+
|
|
14980
|
+
impl FactReadGate {
|
|
14981
|
+
fn wait_until_read(&self) {
|
|
14982
|
+
self.entered
|
|
14983
|
+
.recv_timeout(Duration::from_secs(10))
|
|
14984
|
+
.expect("prepared facts read hook was not reached within ten seconds");
|
|
14985
|
+
}
|
|
14986
|
+
|
|
14987
|
+
fn release(&self) {
|
|
14988
|
+
let (released, notification) = &*self.released;
|
|
14989
|
+
*released.lock().unwrap() = true;
|
|
14990
|
+
notification.notify_all();
|
|
14991
|
+
}
|
|
14992
|
+
}
|
|
14993
|
+
|
|
14994
|
+
fn install_fact_read_gate(
|
|
14995
|
+
store: &NativeStore,
|
|
14996
|
+
mut before_release: impl FnMut() + Send + 'static,
|
|
14997
|
+
) -> FactReadGate {
|
|
14998
|
+
let (sender, entered) = std::sync::mpsc::channel();
|
|
14999
|
+
let released = Arc::new((Mutex::new(false), Condvar::new()));
|
|
15000
|
+
let gated = Arc::clone(&released);
|
|
15001
|
+
let mut entries = 0usize;
|
|
15002
|
+
store.prepared_disk.set_read_hook(Some(Box::new(move || {
|
|
15003
|
+
entries += 1;
|
|
15004
|
+
if entries > 1 {
|
|
15005
|
+
return;
|
|
15006
|
+
}
|
|
15007
|
+
sender.send(()).expect("fact read gate owner disappeared");
|
|
15008
|
+
let (released, notification) = &*gated;
|
|
15009
|
+
let (released, _) = notification
|
|
15010
|
+
.wait_timeout_while(
|
|
15011
|
+
released.lock().unwrap(),
|
|
15012
|
+
Duration::from_secs(10),
|
|
15013
|
+
|released| !*released,
|
|
15014
|
+
)
|
|
15015
|
+
.unwrap();
|
|
15016
|
+
assert!(
|
|
15017
|
+
*released,
|
|
15018
|
+
"fact read gate was not released within ten seconds"
|
|
15019
|
+
);
|
|
15020
|
+
drop(released);
|
|
15021
|
+
before_release();
|
|
15022
|
+
})));
|
|
15023
|
+
FactReadGate { entered, released }
|
|
15024
|
+
}
|
|
15025
|
+
|
|
15026
|
+
fn wait_for_fact_read_waiter(store: &NativeStore) {
|
|
15027
|
+
let started = std::time::Instant::now();
|
|
15028
|
+
while store.fact_read_waits.load(Ordering::Relaxed) == 0 {
|
|
15029
|
+
assert!(
|
|
15030
|
+
started.elapsed() < Duration::from_secs(10),
|
|
15031
|
+
"the second reader never waited on the fact read permit"
|
|
15032
|
+
);
|
|
15033
|
+
std::thread::sleep(Duration::from_millis(5));
|
|
15034
|
+
}
|
|
15035
|
+
}
|
|
15036
|
+
|
|
15037
|
+
fn warm_request(source: &Source, ids: &[&str], deadline_unix_ms: u64) -> Value {
|
|
15038
|
+
let template = acquire(&source.path);
|
|
15039
|
+
let mut request = json!({"schema":SCHEMA,"id":"warm","operation":"warm_registered","classifier":{"id":"native","version":"1"},"thread_ids":ids,"roots":[source.directory.to_string_lossy().as_ref()],"direct_paths":[],"start_index":0,"membership_revision":null,"deadline_unix_ms":deadline_unix_ms,"limits":template["limits"]});
|
|
15040
|
+
request["limits"].insert("max_source_read_bytes", json!(1024 * 1024));
|
|
15041
|
+
request
|
|
15042
|
+
}
|
|
15043
|
+
|
|
15044
|
+
fn spawn_warm(
|
|
15045
|
+
store: &Arc<NativeStore>,
|
|
15046
|
+
request: Value,
|
|
15047
|
+
owner: &Value,
|
|
15048
|
+
cancel: Cancellation,
|
|
15049
|
+
) -> std::sync::mpsc::Receiver<Value> {
|
|
15050
|
+
let (sender, reply) = std::sync::mpsc::channel();
|
|
15051
|
+
let store = Arc::clone(store);
|
|
15052
|
+
let owner = owner.clone();
|
|
15053
|
+
std::thread::spawn(move || {
|
|
15054
|
+
sender
|
|
15055
|
+
.send(store.request(&request, &owner, &cancel))
|
|
15056
|
+
.expect("warm reply receiver disappeared");
|
|
15057
|
+
});
|
|
15058
|
+
reply
|
|
15059
|
+
}
|
|
15060
|
+
|
|
15061
|
+
fn warm_reply(reply: &std::sync::mpsc::Receiver<Value>) -> Value {
|
|
15062
|
+
reply
|
|
15063
|
+
.recv_timeout(Duration::from_secs(10))
|
|
15064
|
+
.expect("warm request did not finish within ten seconds")
|
|
15065
|
+
}
|
|
15066
|
+
|
|
15067
|
+
struct EvictedMembers {
|
|
15068
|
+
source: Source,
|
|
15069
|
+
members: Vec<PathBuf>,
|
|
15070
|
+
store: Arc<NativeStore>,
|
|
15071
|
+
owner: Value,
|
|
15072
|
+
stored: u64,
|
|
15073
|
+
built: Vec<Option<usize>>,
|
|
15074
|
+
}
|
|
15075
|
+
|
|
15076
|
+
fn evicted_members(ids: &[&str]) -> EvictedMembers {
|
|
15077
|
+
let source = Source::new(&format!("{}\n", user("root")));
|
|
15078
|
+
let members = registered_members(&source, ids);
|
|
15079
|
+
let store = Arc::new(fact_budget_store(16 * 1024 * 1024));
|
|
15080
|
+
let owner = background_owner();
|
|
15081
|
+
warm_registered_pass(&store, &source, ids, &owner);
|
|
15082
|
+
let stored = store
|
|
15083
|
+
.prepared_disk
|
|
15084
|
+
.entry_file_len(&fact_entry_key(&members[0], &owner));
|
|
15085
|
+
let built = resident_member_facts(&store, &members);
|
|
15086
|
+
assert!(built.iter().all(Option::is_some), "{built:?}");
|
|
15087
|
+
forget_member_facts(&store, &members);
|
|
15088
|
+
assert_eq!(store.fact_lookups.load(Ordering::Relaxed), 0);
|
|
15089
|
+
EvictedMembers {
|
|
15090
|
+
source,
|
|
15091
|
+
members,
|
|
15092
|
+
store,
|
|
15093
|
+
owner,
|
|
15094
|
+
stored,
|
|
15095
|
+
built,
|
|
15096
|
+
}
|
|
15097
|
+
}
|
|
15098
|
+
|
|
15099
|
+
#[test]
|
|
15100
|
+
fn concurrent_identical_fact_misses_share_one_disk_read_and_one_publication() {
|
|
15101
|
+
let EvictedMembers {
|
|
15102
|
+
source,
|
|
15103
|
+
members,
|
|
15104
|
+
store,
|
|
15105
|
+
owner,
|
|
15106
|
+
stored,
|
|
15107
|
+
..
|
|
15108
|
+
} = evicted_members(&["thread-a"]);
|
|
15109
|
+
let gate = install_fact_read_gate(&store, || {});
|
|
15110
|
+
let deadline = now_ms() + 30_000;
|
|
15111
|
+
let first = spawn_warm(
|
|
15112
|
+
&store,
|
|
15113
|
+
warm_request(&source, &["thread-a"], deadline),
|
|
15114
|
+
&owner,
|
|
15115
|
+
Cancellation::default(),
|
|
15116
|
+
);
|
|
15117
|
+
gate.wait_until_read();
|
|
15118
|
+
let second = spawn_warm(
|
|
15119
|
+
&store,
|
|
15120
|
+
warm_request(&source, &["thread-a"], deadline),
|
|
15121
|
+
&owner,
|
|
15122
|
+
Cancellation::default(),
|
|
15123
|
+
);
|
|
15124
|
+
wait_for_fact_read_waiter(&store);
|
|
15125
|
+
gate.release();
|
|
15126
|
+
let (first, second) = (warm_reply(&first), warm_reply(&second));
|
|
15127
|
+
store.prepared_disk.set_read_hook(None);
|
|
15128
|
+
assert_eq!(first["status"].as_str(), Some("ok"), "{first:?}");
|
|
15129
|
+
assert_eq!(second["status"].as_str(), Some("ok"), "{second:?}");
|
|
15130
|
+
assert_eq!(first["data"]["complete"].as_bool(), Some(true));
|
|
15131
|
+
assert_eq!(second["data"]["complete"].as_bool(), Some(true));
|
|
15132
|
+
assert_eq!(cache_reads(&first), (Some(1), Some(stored), Some(0)));
|
|
15133
|
+
assert_eq!(cache_reads(&second), (Some(0), Some(0), Some(0)));
|
|
15134
|
+
assert_eq!(store.fact_lookups.load(Ordering::Relaxed), 1);
|
|
15135
|
+
assert_eq!(store.fact_read_waits.load(Ordering::Relaxed), 1);
|
|
15136
|
+
assert!(resident_member_facts(&store, &members)
|
|
15137
|
+
.iter()
|
|
15138
|
+
.all(Option::is_some));
|
|
15139
|
+
assert!(!store.lock_state().fact_read_in_flight);
|
|
15140
|
+
store.assert_conserved();
|
|
15141
|
+
}
|
|
15142
|
+
|
|
15143
|
+
#[test]
|
|
15144
|
+
fn waiting_fact_reader_honors_cancellation_while_the_holder_is_blocked() {
|
|
15145
|
+
let EvictedMembers {
|
|
15146
|
+
source,
|
|
15147
|
+
members,
|
|
15148
|
+
store,
|
|
15149
|
+
owner,
|
|
15150
|
+
stored,
|
|
15151
|
+
..
|
|
15152
|
+
} = evicted_members(&["thread-a"]);
|
|
15153
|
+
let gate = install_fact_read_gate(&store, || {});
|
|
15154
|
+
let deadline = now_ms() + 30_000;
|
|
15155
|
+
let first = spawn_warm(
|
|
15156
|
+
&store,
|
|
15157
|
+
warm_request(&source, &["thread-a"], deadline),
|
|
15158
|
+
&owner,
|
|
15159
|
+
Cancellation::default(),
|
|
15160
|
+
);
|
|
15161
|
+
gate.wait_until_read();
|
|
15162
|
+
let cancellation = Cancellation::default();
|
|
15163
|
+
let second = spawn_warm(
|
|
15164
|
+
&store,
|
|
15165
|
+
warm_request(&source, &["thread-a"], deadline),
|
|
15166
|
+
&owner,
|
|
15167
|
+
cancellation.clone(),
|
|
15168
|
+
);
|
|
15169
|
+
wait_for_fact_read_waiter(&store);
|
|
15170
|
+
cancellation.cancel();
|
|
15171
|
+
let cancelled = warm_reply(&second);
|
|
15172
|
+
assert_eq!(
|
|
15173
|
+
cancelled["status"].as_str(),
|
|
15174
|
+
Some("cancelled"),
|
|
15175
|
+
"{cancelled:?}"
|
|
15176
|
+
);
|
|
15177
|
+
assert!(store.lock_state().fact_read_in_flight);
|
|
15178
|
+
gate.release();
|
|
15179
|
+
let first = warm_reply(&first);
|
|
15180
|
+
store.prepared_disk.set_read_hook(None);
|
|
15181
|
+
assert_eq!(first["status"].as_str(), Some("ok"), "{first:?}");
|
|
15182
|
+
assert_eq!(cache_reads(&first), (Some(1), Some(stored), Some(0)));
|
|
15183
|
+
assert_eq!(cache_reads(&cancelled), (Some(0), Some(0), Some(0)));
|
|
15184
|
+
assert_eq!(store.fact_lookups.load(Ordering::Relaxed), 1);
|
|
15185
|
+
assert!(resident_member_facts(&store, &members)
|
|
15186
|
+
.iter()
|
|
15187
|
+
.all(Option::is_some));
|
|
15188
|
+
assert!(!store.lock_state().fact_read_in_flight);
|
|
15189
|
+
store.assert_conserved();
|
|
15190
|
+
}
|
|
15191
|
+
|
|
15192
|
+
#[test]
|
|
15193
|
+
fn waiting_fact_reader_honors_its_deadline_while_the_holder_is_blocked() {
|
|
15194
|
+
let EvictedMembers {
|
|
15195
|
+
source,
|
|
15196
|
+
members,
|
|
15197
|
+
store,
|
|
15198
|
+
owner,
|
|
15199
|
+
stored,
|
|
15200
|
+
..
|
|
15201
|
+
} = evicted_members(&["thread-a"]);
|
|
15202
|
+
let gate = install_fact_read_gate(&store, || {});
|
|
15203
|
+
let first = spawn_warm(
|
|
15204
|
+
&store,
|
|
15205
|
+
warm_request(&source, &["thread-a"], now_ms() + 30_000),
|
|
15206
|
+
&owner,
|
|
15207
|
+
Cancellation::default(),
|
|
15208
|
+
);
|
|
15209
|
+
gate.wait_until_read();
|
|
15210
|
+
let second = spawn_warm(
|
|
15211
|
+
&store,
|
|
15212
|
+
warm_request(&source, &["thread-a"], now_ms() + 1_500),
|
|
15213
|
+
&owner,
|
|
15214
|
+
Cancellation::default(),
|
|
15215
|
+
);
|
|
15216
|
+
wait_for_fact_read_waiter(&store);
|
|
15217
|
+
let expired = warm_reply(&second);
|
|
15218
|
+
assert_eq!(expired["status"].as_str(), Some("deadline"), "{expired:?}");
|
|
15219
|
+
assert!(store.lock_state().fact_read_in_flight);
|
|
15220
|
+
gate.release();
|
|
15221
|
+
let first = warm_reply(&first);
|
|
15222
|
+
store.prepared_disk.set_read_hook(None);
|
|
15223
|
+
assert_eq!(first["status"].as_str(), Some("ok"), "{first:?}");
|
|
15224
|
+
assert_eq!(cache_reads(&first), (Some(1), Some(stored), Some(0)));
|
|
15225
|
+
assert_eq!(cache_reads(&expired), (Some(0), Some(0), Some(0)));
|
|
15226
|
+
assert_eq!(store.fact_lookups.load(Ordering::Relaxed), 1);
|
|
15227
|
+
assert!(resident_member_facts(&store, &members)
|
|
15228
|
+
.iter()
|
|
15229
|
+
.all(Option::is_some));
|
|
15230
|
+
assert!(!store.lock_state().fact_read_in_flight);
|
|
15231
|
+
store.assert_conserved();
|
|
15232
|
+
}
|
|
15233
|
+
|
|
15234
|
+
#[test]
|
|
15235
|
+
fn failed_fact_read_releases_the_permit_for_the_next_caller() {
|
|
15236
|
+
let EvictedMembers {
|
|
15237
|
+
source,
|
|
15238
|
+
members,
|
|
15239
|
+
store,
|
|
15240
|
+
owner,
|
|
15241
|
+
stored,
|
|
15242
|
+
built,
|
|
15243
|
+
} = evicted_members(&["thread-a"]);
|
|
15244
|
+
let key = fact_entry_key(&members[0], &owner);
|
|
15245
|
+
let entry = store.prepared_disk.entry_file(&key);
|
|
15246
|
+
let gate = install_fact_read_gate(&store, move || {
|
|
15247
|
+
std::fs::OpenOptions::new()
|
|
15248
|
+
.append(true)
|
|
15249
|
+
.open(&entry)
|
|
15250
|
+
.unwrap()
|
|
15251
|
+
.write_all(b"grown")
|
|
15252
|
+
.unwrap();
|
|
15253
|
+
});
|
|
15254
|
+
let deadline = now_ms() + 30_000;
|
|
15255
|
+
let first = spawn_warm(
|
|
15256
|
+
&store,
|
|
15257
|
+
warm_request(&source, &["thread-a"], deadline),
|
|
15258
|
+
&owner,
|
|
15259
|
+
Cancellation::default(),
|
|
15260
|
+
);
|
|
15261
|
+
gate.wait_until_read();
|
|
15262
|
+
let second = spawn_warm(
|
|
15263
|
+
&store,
|
|
15264
|
+
warm_request(&source, &["thread-a"], deadline),
|
|
15265
|
+
&owner,
|
|
15266
|
+
Cancellation::default(),
|
|
15267
|
+
);
|
|
15268
|
+
wait_for_fact_read_waiter(&store);
|
|
15269
|
+
gate.release();
|
|
15270
|
+
let (evicted, rebuilt) = (warm_reply(&first), warm_reply(&second));
|
|
15271
|
+
store.prepared_disk.set_read_hook(None);
|
|
15272
|
+
assert_eq!(refusal(&evicted), ENTRY_EVICTED, "{evicted:?}");
|
|
15273
|
+
assert_eq!(cache_reads(&evicted), (Some(1), Some(stored + 1), Some(0)));
|
|
15274
|
+
assert_eq!(rebuilt["status"].as_str(), Some("ok"), "{rebuilt:?}");
|
|
15275
|
+
assert_eq!(rebuilt["data"]["complete"].as_bool(), Some(true));
|
|
15276
|
+
assert_eq!(rebuilt["data"]["fact_cache_writes"].as_u64(), Some(2));
|
|
15277
|
+
assert_eq!(cache_reads(&rebuilt).0, Some(0));
|
|
15278
|
+
assert_eq!(store.fact_lookups.load(Ordering::Relaxed), 1);
|
|
15279
|
+
assert!(store.prepared_disk.has_entry(&key).unwrap());
|
|
15280
|
+
assert_eq!(resident_member_facts(&store, &members), built);
|
|
15281
|
+
assert!(!store.lock_state().fact_read_in_flight);
|
|
15282
|
+
store.assert_conserved();
|
|
15283
|
+
}
|
|
15284
|
+
|
|
15285
|
+
#[test]
|
|
15286
|
+
fn different_fact_keys_do_not_share_facts_under_the_permit() {
|
|
15287
|
+
let EvictedMembers {
|
|
15288
|
+
source,
|
|
15289
|
+
members,
|
|
15290
|
+
store,
|
|
15291
|
+
owner,
|
|
15292
|
+
stored,
|
|
15293
|
+
..
|
|
15294
|
+
} = evicted_members(&["thread-a", "thread-b"]);
|
|
15295
|
+
let gate = install_fact_read_gate(&store, || {});
|
|
15296
|
+
let deadline = now_ms() + 30_000;
|
|
15297
|
+
let first = spawn_warm(
|
|
15298
|
+
&store,
|
|
15299
|
+
warm_request(&source, &["thread-a"], deadline),
|
|
15300
|
+
&owner,
|
|
15301
|
+
Cancellation::default(),
|
|
15302
|
+
);
|
|
15303
|
+
gate.wait_until_read();
|
|
15304
|
+
let second = spawn_warm(
|
|
15305
|
+
&store,
|
|
15306
|
+
warm_request(&source, &["thread-b"], deadline),
|
|
15307
|
+
&owner,
|
|
15308
|
+
Cancellation::default(),
|
|
15309
|
+
);
|
|
15310
|
+
wait_for_fact_read_waiter(&store);
|
|
15311
|
+
gate.release();
|
|
15312
|
+
let (first, second) = (warm_reply(&first), warm_reply(&second));
|
|
15313
|
+
store.prepared_disk.set_read_hook(None);
|
|
15314
|
+
assert_eq!(first["status"].as_str(), Some("ok"), "{first:?}");
|
|
15315
|
+
assert_eq!(second["status"].as_str(), Some("ok"), "{second:?}");
|
|
15316
|
+
assert_eq!(cache_reads(&first), (Some(1), Some(stored), Some(0)));
|
|
15317
|
+
assert_eq!(cache_reads(&second).0, Some(1));
|
|
15318
|
+
assert_eq!(store.fact_lookups.load(Ordering::Relaxed), 2);
|
|
15319
|
+
assert!(resident_member_facts(&store, &members)
|
|
15320
|
+
.iter()
|
|
15321
|
+
.all(Option::is_some));
|
|
15322
|
+
assert!(!store.lock_state().fact_read_in_flight);
|
|
15323
|
+
store.assert_conserved();
|
|
15324
|
+
}
|
|
15325
|
+
|
|
15326
|
+
fn pinned_root(store: &NativeStore, source: &Source, owner: &Value) -> Arc<TranscriptSnapshot> {
|
|
15327
|
+
let completed = finish(
|
|
15328
|
+
store,
|
|
15329
|
+
store.request(&acquire(&source.path), owner, &Cancellation::default()),
|
|
15330
|
+
owner,
|
|
15331
|
+
);
|
|
15332
|
+
store.pin(handle(&completed), owner).unwrap()
|
|
15333
|
+
}
|
|
15334
|
+
|
|
15335
|
+
fn root_facts_read(
|
|
15336
|
+
store: &NativeStore,
|
|
15337
|
+
root: &Arc<TranscriptSnapshot>,
|
|
15338
|
+
owner: &Value,
|
|
15339
|
+
bounds: &WorkLimits,
|
|
15340
|
+
) -> (Arc<crate::snapshot_prepared::PreparedFacts>, u64) {
|
|
15341
|
+
let mut usage = [0u64; 20];
|
|
15342
|
+
let (retained, reservation) = store
|
|
15343
|
+
.prepared_root_facts(
|
|
15344
|
+
root,
|
|
15345
|
+
&json!({"id":"native","version":"1"}),
|
|
15346
|
+
owner,
|
|
15347
|
+
bounds,
|
|
15348
|
+
PreparedCacheReads::Unmetered,
|
|
15349
|
+
&Cancellation::default(),
|
|
15350
|
+
&mut usage,
|
|
15351
|
+
)
|
|
15352
|
+
.unwrap();
|
|
15353
|
+
let facts = Arc::clone(retained.facts());
|
|
15354
|
+
drop(retained);
|
|
15355
|
+
drop(reservation);
|
|
15356
|
+
(facts, usage[18])
|
|
15357
|
+
}
|
|
15358
|
+
|
|
15359
|
+
#[test]
|
|
15360
|
+
fn concurrent_identical_root_fact_cold_reads_share_one_disk_read() {
|
|
15361
|
+
let source = Source::new(&format!("{}\n{}\n", user("root"), user("child")));
|
|
15362
|
+
let store = fact_budget_store(16 * 1024 * 1024);
|
|
15363
|
+
let owner = context("a");
|
|
15364
|
+
let bounds = limits(&acquire(&source.path)).unwrap();
|
|
15365
|
+
let root = pinned_root(&store, &source, &owner);
|
|
15366
|
+
assert_eq!(root_facts_read(&store, &root, &owner, &bounds).1, 0);
|
|
15367
|
+
store
|
|
15368
|
+
.lock_state()
|
|
15369
|
+
.remove_prepared_facts(&root.stamp.identity)
|
|
15370
|
+
.unwrap();
|
|
15371
|
+
assert!(store
|
|
15372
|
+
.prepared_disk
|
|
15373
|
+
.has_entry(&fact_entry_key(&source.path, &owner))
|
|
15374
|
+
.unwrap());
|
|
15375
|
+
assert_eq!(store.fact_lookups.load(Ordering::Relaxed), 0);
|
|
15376
|
+
let gate = install_fact_read_gate(&store, || {});
|
|
15377
|
+
let (first, second) = std::thread::scope(|scope| {
|
|
15378
|
+
let first = scope.spawn(|| root_facts_read(&store, &root, &owner, &bounds));
|
|
15379
|
+
gate.wait_until_read();
|
|
15380
|
+
let second = scope.spawn(|| root_facts_read(&store, &root, &owner, &bounds));
|
|
15381
|
+
wait_for_fact_read_waiter(&store);
|
|
15382
|
+
gate.release();
|
|
15383
|
+
(first.join().unwrap(), second.join().unwrap())
|
|
15384
|
+
});
|
|
15385
|
+
store.prepared_disk.set_read_hook(None);
|
|
15386
|
+
assert_eq!((first.1, second.1), (1, 0));
|
|
15387
|
+
assert!(Arc::ptr_eq(&first.0, &second.0));
|
|
15388
|
+
assert_eq!(store.fact_lookups.load(Ordering::Relaxed), 1);
|
|
15389
|
+
assert_eq!(store.fact_read_waits.load(Ordering::Relaxed), 1);
|
|
15390
|
+
assert!(Arc::ptr_eq(
|
|
15391
|
+
&store.lock_state().prepared_facts[&root.stamp.identity].facts,
|
|
15392
|
+
&first.0
|
|
15393
|
+
));
|
|
15394
|
+
drop((first, second));
|
|
15395
|
+
store.assert_conserved();
|
|
15396
|
+
}
|
|
15397
|
+
|
|
15398
|
+
#[test]
|
|
15399
|
+
fn waiting_reader_with_a_different_binding_never_reuses_the_published_facts() {
|
|
15400
|
+
let source = Source::new(&format!("{}\n{}\n", user("root"), user("child")));
|
|
15401
|
+
let store = fact_budget_store(16 * 1024 * 1024);
|
|
15402
|
+
let owner = context("a");
|
|
15403
|
+
let other = json!({"claimant":"a","admission":"hook","authority":owner["authority"],"registry_generation":"other-registry"});
|
|
15404
|
+
let bounds = limits(&acquire(&source.path)).unwrap();
|
|
15405
|
+
let root = pinned_root(&store, &source, &owner);
|
|
15406
|
+
for binding in [&owner, &other] {
|
|
15407
|
+
assert_eq!(root_facts_read(&store, &root, binding, &bounds).1, 0);
|
|
15408
|
+
store
|
|
15409
|
+
.lock_state()
|
|
15410
|
+
.remove_prepared_facts(&root.stamp.identity)
|
|
15411
|
+
.unwrap();
|
|
15412
|
+
assert!(store
|
|
15413
|
+
.prepared_disk
|
|
15414
|
+
.has_entry(&fact_entry_key(&source.path, binding))
|
|
15415
|
+
.unwrap());
|
|
15416
|
+
}
|
|
15417
|
+
assert_eq!(store.fact_lookups.load(Ordering::Relaxed), 0);
|
|
15418
|
+
let gate = install_fact_read_gate(&store, || {});
|
|
15419
|
+
let (first, second) = std::thread::scope(|scope| {
|
|
15420
|
+
let first = scope.spawn(|| root_facts_read(&store, &root, &owner, &bounds));
|
|
15421
|
+
gate.wait_until_read();
|
|
15422
|
+
let second = scope.spawn(|| root_facts_read(&store, &root, &other, &bounds));
|
|
15423
|
+
wait_for_fact_read_waiter(&store);
|
|
15424
|
+
gate.release();
|
|
15425
|
+
(first.join().unwrap(), second.join().unwrap())
|
|
15426
|
+
});
|
|
15427
|
+
store.prepared_disk.set_read_hook(None);
|
|
15428
|
+
assert_eq!((first.1, second.1), (1, 1));
|
|
15429
|
+
assert!(!Arc::ptr_eq(&first.0, &second.0));
|
|
15430
|
+
assert_eq!(store.fact_lookups.load(Ordering::Relaxed), 2);
|
|
15431
|
+
assert_eq!(store.fact_read_waits.load(Ordering::Relaxed), 1);
|
|
15432
|
+
{
|
|
15433
|
+
let state = store.lock_state();
|
|
15434
|
+
let cached = &state.prepared_facts[&root.stamp.identity];
|
|
15435
|
+
assert_eq!(cached.registry_generation, "other-registry");
|
|
15436
|
+
assert!(Arc::ptr_eq(&cached.facts, &second.0));
|
|
15437
|
+
}
|
|
15438
|
+
drop((first, second));
|
|
15439
|
+
store.assert_conserved();
|
|
15440
|
+
}
|
|
15441
|
+
|
|
14931
15442
|
#[test]
|
|
14932
15443
|
fn metered_warming_never_completes_over_a_missing_or_replaced_entry() {
|
|
14933
15444
|
use std::os::unix::fs::{DirBuilderExt, OpenOptionsExt};
|
{cc_transcript-14.45.2 → cc_transcript-14.45.3}/rust/crates/core/src/snapshot_prepared_service.rs
RENAMED
|
@@ -301,6 +301,23 @@ impl NativeStore {
|
|
|
301
301
|
&context["authority"],
|
|
302
302
|
classifier,
|
|
303
303
|
)?;
|
|
304
|
+
let claim = self.claim_fact_read(cancel, remaining.deadline_unix_ms)?;
|
|
305
|
+
if let Some(retained) = self.touch_retained_facts(
|
|
306
|
+
root.stamp,
|
|
307
|
+
registry_generation,
|
|
308
|
+
context["admission"].as_str().unwrap_or(""),
|
|
309
|
+
&context["authority"],
|
|
310
|
+
classifier,
|
|
311
|
+
) {
|
|
312
|
+
self.after_facts_returned();
|
|
313
|
+
return Ok((
|
|
314
|
+
retained,
|
|
315
|
+
ProjectionReservation {
|
|
316
|
+
store: self,
|
|
317
|
+
bytes: 0,
|
|
318
|
+
},
|
|
319
|
+
));
|
|
320
|
+
}
|
|
304
321
|
let bound = crate::snapshot_projection::facts_bound(root);
|
|
305
322
|
let decoded = self.prepared_disk.decoded_bytes(&key);
|
|
306
323
|
if self
|
|
@@ -346,6 +363,7 @@ impl NativeStore {
|
|
|
346
363
|
crate::snapshot_prepared_disk::DiskLookup::Miss => {}
|
|
347
364
|
}
|
|
348
365
|
}
|
|
366
|
+
drop(claim);
|
|
349
367
|
let mut fact_limits = *remaining;
|
|
350
368
|
fact_limits.max_read_bytes = self.config.source;
|
|
351
369
|
fact_limits.max_events = root.event_count;
|
|
@@ -447,6 +465,24 @@ impl NativeStore {
|
|
|
447
465
|
&context["authority"],
|
|
448
466
|
&classifier,
|
|
449
467
|
)?;
|
|
468
|
+
let claim = self.claim_fact_read(cancel, remaining.deadline_unix_ms)?;
|
|
469
|
+
if let Some(retained) = self.touch_retained_facts(
|
|
470
|
+
stamp,
|
|
471
|
+
registry_generation,
|
|
472
|
+
admission,
|
|
473
|
+
&context["authority"],
|
|
474
|
+
&classifier,
|
|
475
|
+
) {
|
|
476
|
+
usage[7] += 1;
|
|
477
|
+
return Ok((
|
|
478
|
+
stamp,
|
|
479
|
+
PreparedSourceOutcome::Ready {
|
|
480
|
+
stamp,
|
|
481
|
+
held: HeldFacts::Retained(retained),
|
|
482
|
+
cached: true,
|
|
483
|
+
},
|
|
484
|
+
));
|
|
485
|
+
}
|
|
450
486
|
if let Some(decoded) = self.prepared_disk.decoded_bytes(&key) {
|
|
451
487
|
if self
|
|
452
488
|
.prepared_disk
|
|
@@ -527,6 +563,7 @@ impl NativeStore {
|
|
|
527
563
|
crate::snapshot_prepared_disk::DiskLookup::Miss => {}
|
|
528
564
|
}
|
|
529
565
|
}
|
|
566
|
+
drop(claim);
|
|
530
567
|
let acquire = json!({"schema":SCHEMA,"id":"prepare-graph-source","operation":"acquire","path":canonical.to_string_lossy().as_ref(),"classifier":{"id":"native","version":"1"},"deadline_unix_ms":remaining.deadline_unix_ms,"limits":remaining.to_json()});
|
|
531
568
|
let before_bytes = usage[1];
|
|
532
569
|
let before_events = usage[3];
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|