cc-transcript 14.45.34__tar.gz → 14.45.36__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.34 → cc_transcript-14.45.36}/PKG-INFO +1 -1
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/pyproject.toml +1 -1
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot.rs +44 -12
- cc_transcript-14.45.36/rust/crates/core/src/snapshot_graph_anchor_tests.rs +208 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_prepared_service.rs +5 -4
- cc_transcript-14.45.36/rust/crates/core/src/snapshot_publication_shared_admission_tests.rs +274 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/Cargo.lock +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/Cargo.toml +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/LICENSE +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/README.md +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/__init__.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/__init__.pyi +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/_native.pyi +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/activity.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/activity_probe.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/builders.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/codex.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/command.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/context.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/corrections.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/cost.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/decision_store.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/decisions.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/discovery.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/disktruth.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/evidence.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/extract/__init__.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/extract/correct.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/facts.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/filterspec.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/heartbeats.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/ids.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/judge/__init__.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/judge/llm.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/judge/similar.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/judge/verdicts.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/ledger.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/literals.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/mining/__init__.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/mining/candidates.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/mining/confidence.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/mining/engine.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/mining/formats.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/mining/sampling.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/mining/signals.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/mining/sourcekind.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/mining/spec.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/mining/store.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/models.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/nlp.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/notifications.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/parser.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/py.typed +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/query.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/render.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/sentiment/__init__.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/sentiment/buckets.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/sentiment/data/afinn-en-165.tsv +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/sentiment/data/domain_overrides.tsv +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/sentiment/data/en-ewt.udpipe +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/sentiment/engine.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/sentiment/lexicon.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/sentiment/scorespec.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/snapshot_schema/config.schema.json +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/snapshot_schema/context.schema.json +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/snapshot_schema/request.schema.json +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/snapshot_schema/response.schema.json +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/snapshot_schema/tool_registry.schema.json +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/snapshots.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/synthetic.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/tools.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/watch.py +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/cli/Cargo.toml +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/cli/src/commands/blame.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/cli/src/commands/corpus.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/cli/src/commands/corrections.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/cli/src/commands/digest.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/cli/src/commands/facts.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/cli/src/commands/grep.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/cli/src/commands/list.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/cli/src/commands/mod.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/cli/src/commands/scratchpad.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/cli/src/commands/show.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/cli/src/commands/slice.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/cli/src/commands/stats.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/cli/src/commands/watch.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/cli/src/lib.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/cli/src/output.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/cli/src/target.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/cli/src/timearg.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/Cargo.toml +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/benches/parse.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/benches/render.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/benches/toolcall.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/build.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/activity.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/actor.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/blame.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/buckets.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/codex/discovery.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/codex/lower.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/codex/mod.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/codex/parse.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/codex/probe.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/codex/protocol.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/codex/types.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/command.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/context.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/corrections.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/cost.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/discovery.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/facts.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/feedback.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/filter.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/gateway.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/ids.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/judge.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/lib.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/literals/command.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/literals/corrections.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/literals/feedback.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/literals/mining.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/literals/mod.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/literals/protocol.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/notifications.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/parse.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/protocol.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/pystr.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/query.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/render.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/request_body.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/rng.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/scan.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/scan_checkpoint.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/scan_grep.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/scan_grep_stream.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/scan_grep_stream_tests.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/scan_index.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/scan_projection.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/scan_regressions.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/scan_stream.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/schema.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_activity.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_admission_report_tests.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_cache.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_cache_tests.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_catalog.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_catalog_owner.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_catalog_tests.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_codec.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_codex_append.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_common_borrowed_parent_tests.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_compact_codex.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_compact_codex_tests.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_direct_tail.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_direct_tail_tests.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_graph_validation_tests.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_hydrate_budget_tests.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_hydration_observations.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_interaction_api.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_interaction_api_tests.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_interactions.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_interactions_tests.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_labels.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_ledger.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_ledger_tests.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_load_charge_audit_tests.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_load_charge_work_tests.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_membership_progress.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_membership_progress_controls.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_membership_progress_tests.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_memory.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_owned.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_prepared.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_prepared_disk.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_projection.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_query_hydration_tests.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_raw_materialization.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_raw_projection.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_raw_projection_tests.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_raw_scope.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_raw_scope_tests.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_raw_tail_tests.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_raw_window.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_regressions.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_root_warm.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_sidechain_absence.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_sidechain_absence_tests.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_skill_demand_controls.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_skill_demand_tests.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_skill_framing.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_skills.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_source_cache_index_tests.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_spine.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_spine_tests.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_symlink_proof.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_text.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/sqlite.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/toolcall.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/types.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/value.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/watch.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/tests/sonic_arena_model.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/tests/std_allocation_model.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/Cargo.toml +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/build.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/data/command_prefix_pins.tsv +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/actor_bridge.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/bin/stub_gen.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/codex.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/command.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/context.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/corrections.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/discovery.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/feedback.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/judge.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/lexicon.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/lib.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/mining.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/nlp.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/python.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/render.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/score.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/snapshot_decode.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/snapshots.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/sqlite.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/toolcall.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/views/attachment.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/views/blocks.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/views/command.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/views/convert.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/views/dunder.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/views/events.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/views/meta.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/views/mod.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/views/print.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/views/store.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/views/system.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/views/toolcall.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/views/toolresult.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/views/transcript.rs +0 -0
- {cc_transcript-14.45.34 → cc_transcript-14.45.36}/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.36" # 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"
|
|
@@ -2034,13 +2034,33 @@ impl Charge<String> for Arc<Mutex<PreparedGraph>> {
|
|
|
2034
2034
|
}
|
|
2035
2035
|
|
|
2036
2036
|
impl PreparedGraph {
|
|
2037
|
-
fn
|
|
2037
|
+
fn input_anchors(&self) -> [Anchor; 3] {
|
|
2038
|
+
#[cfg(test)]
|
|
2039
|
+
tests::record_prepared_graph_input_anchors(self.sources.len(), self.sidechain_dirs.len());
|
|
2040
|
+
[
|
|
2041
|
+
graph_header_anchor(&self.header),
|
|
2042
|
+
sources_anchor(&self.sources),
|
|
2043
|
+
sidechain_dirs_anchor(&self.sidechain_dirs),
|
|
2044
|
+
]
|
|
2045
|
+
}
|
|
2046
|
+
|
|
2047
|
+
fn anchors_with(&self, inputs: [Anchor; 3]) -> impl Iterator<Item = Anchor> + '_ {
|
|
2038
2048
|
std::iter::once(facts_anchor(&self.root_facts))
|
|
2039
2049
|
.chain(self.root_slices.values().map(facts_anchor))
|
|
2050
|
+
.chain(inputs)
|
|
2051
|
+
}
|
|
2052
|
+
|
|
2053
|
+
fn anchors(&self) -> impl Iterator<Item = Anchor> + '_ {
|
|
2054
|
+
self.anchors_with(self.input_anchors())
|
|
2055
|
+
}
|
|
2056
|
+
|
|
2057
|
+
fn anchor_ids(&self) -> impl Iterator<Item = usize> + '_ {
|
|
2058
|
+
std::iter::once(facts_key(&self.root_facts))
|
|
2059
|
+
.chain(self.root_slices.values().map(facts_key))
|
|
2040
2060
|
.chain([
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2061
|
+
Arc::as_ptr(&self.header) as usize,
|
|
2062
|
+
slice_key(&self.sources),
|
|
2063
|
+
slice_key(&self.sidechain_dirs),
|
|
2044
2064
|
])
|
|
2045
2065
|
}
|
|
2046
2066
|
}
|
|
@@ -3226,11 +3246,16 @@ impl StoreState {
|
|
|
3226
3246
|
}
|
|
3227
3247
|
}
|
|
3228
3248
|
|
|
3229
|
-
fn insert_prepared_graph(
|
|
3249
|
+
fn insert_prepared_graph(
|
|
3250
|
+
&mut self,
|
|
3251
|
+
graph_id: String,
|
|
3252
|
+
graph: Arc<Mutex<PreparedGraph>>,
|
|
3253
|
+
inputs: [Anchor; 3],
|
|
3254
|
+
) {
|
|
3230
3255
|
self.prepared_graphs.reserve_for(&graph_id);
|
|
3231
3256
|
let prepared = graph.lock().expect("prepared graph");
|
|
3232
|
-
self.ledger.shared.reserve(prepared.
|
|
3233
|
-
for anchor in prepared.
|
|
3257
|
+
self.ledger.shared.reserve(prepared.anchors_with(inputs));
|
|
3258
|
+
for anchor in prepared.anchors_with(inputs) {
|
|
3234
3259
|
self.ledger.shared.acquire(anchor);
|
|
3235
3260
|
}
|
|
3236
3261
|
drop(prepared);
|
|
@@ -3240,8 +3265,8 @@ impl StoreState {
|
|
|
3240
3265
|
}
|
|
3241
3266
|
|
|
3242
3267
|
fn release_prepared_graph(&mut self, graph: &Mutex<PreparedGraph>) {
|
|
3243
|
-
for
|
|
3244
|
-
self.ledger.shared.release(
|
|
3268
|
+
for identity in graph.lock().expect("prepared graph").anchor_ids() {
|
|
3269
|
+
self.ledger.shared.release(identity);
|
|
3245
3270
|
}
|
|
3246
3271
|
}
|
|
3247
3272
|
|
|
@@ -8664,9 +8689,14 @@ impl NativeStore {
|
|
|
8664
8689
|
let pledge = pledge.map(|(token, bytes)| (token, bytes + state.leases.growth(1)));
|
|
8665
8690
|
let additional = generation.as_ref().map_or(0, |(snapshot, record)| {
|
|
8666
8691
|
let key = snapshot_key(snapshot);
|
|
8667
|
-
state.admission(
|
|
8668
|
-
|
|
8669
|
-
|
|
8692
|
+
state.admission(
|
|
8693
|
+
&key,
|
|
8694
|
+
record,
|
|
8695
|
+
record.anchors().chain(state.escaping(&snapshot.chunks)),
|
|
8696
|
+
) + state.generations.growth_for(&key)
|
|
8697
|
+
+ state
|
|
8698
|
+
.escaped_chunks
|
|
8699
|
+
.growth(state.escaping(&snapshot.chunks).count())
|
|
8670
8700
|
}) + pledge.as_ref().map_or(0, |(_, bytes)| *bytes)
|
|
8671
8701
|
+ pending_charge;
|
|
8672
8702
|
match self.admit_memory(
|
|
@@ -12376,6 +12406,7 @@ mod tests {
|
|
|
12376
12406
|
include!("snapshot_membership_progress_controls.rs");
|
|
12377
12407
|
include!("snapshot_sidechain_absence_tests.rs");
|
|
12378
12408
|
include!("snapshot_common_borrowed_parent_tests.rs");
|
|
12409
|
+
include!("snapshot_graph_anchor_tests.rs");
|
|
12379
12410
|
|
|
12380
12411
|
fn context(claimant: &str) -> Value {
|
|
12381
12412
|
json!({"claimant":claimant,"admission":"hook","authority":{"kind":"user","effective_uid":unsafe { libc::geteuid() }.to_string()},"registry_generation":crate::toolcall::ToolRegistrySnapshot::from_specs(HashMap::new()).fingerprint()})
|
|
@@ -22483,4 +22514,5 @@ mod tests {
|
|
|
22483
22514
|
|
|
22484
22515
|
include!("snapshot_load_charge_work_tests.rs");
|
|
22485
22516
|
include!("snapshot_load_charge_audit_tests.rs");
|
|
22517
|
+
include!("snapshot_publication_shared_admission_tests.rs");
|
|
22486
22518
|
}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
#[derive(Clone, Copy, Debug, Default)]
|
|
2
|
+
struct PreparedGraphAnchorCost {
|
|
3
|
+
calls: usize,
|
|
4
|
+
fields: usize,
|
|
5
|
+
state_held: usize,
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
struct PreparedGraphAnchorTrace {
|
|
9
|
+
store: Arc<NativeStore>,
|
|
10
|
+
cost: PreparedGraphAnchorCost,
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
std::thread_local! {
|
|
14
|
+
static PREPARED_GRAPH_ANCHOR_TRACE: std::cell::RefCell<Option<PreparedGraphAnchorTrace>> = const { std::cell::RefCell::new(None) };
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
struct PreparedGraphAnchorRecording;
|
|
18
|
+
|
|
19
|
+
impl PreparedGraphAnchorRecording {
|
|
20
|
+
fn start(store: Arc<NativeStore>) -> Self {
|
|
21
|
+
PREPARED_GRAPH_ANCHOR_TRACE.with(|slot| {
|
|
22
|
+
assert!(slot.borrow().is_none());
|
|
23
|
+
*slot.borrow_mut() = Some(PreparedGraphAnchorTrace {
|
|
24
|
+
store,
|
|
25
|
+
cost: PreparedGraphAnchorCost::default(),
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
Self
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
fn finish(self) -> PreparedGraphAnchorCost {
|
|
32
|
+
PREPARED_GRAPH_ANCHOR_TRACE.with(|slot| slot.borrow_mut().take().unwrap().cost)
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
impl Drop for PreparedGraphAnchorRecording {
|
|
37
|
+
fn drop(&mut self) {
|
|
38
|
+
PREPARED_GRAPH_ANCHOR_TRACE.with(|slot| {
|
|
39
|
+
slot.borrow_mut().take();
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
pub(super) fn record_prepared_graph_input_anchors(sources: usize, directories: usize) {
|
|
45
|
+
PREPARED_GRAPH_ANCHOR_TRACE.with(|slot| {
|
|
46
|
+
if let Some(trace) = slot.borrow_mut().as_mut() {
|
|
47
|
+
trace.cost.calls += 1;
|
|
48
|
+
trace.cost.fields += sources + directories;
|
|
49
|
+
trace.cost.state_held += usize::from(trace.store.state.try_lock().is_err());
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
fn prepared_graph_anchor_cost_case(count: usize) -> (PreparedGraphAnchorCost, PreparedGraphAnchorCost) {
|
|
55
|
+
let source = Source::new(&format!("{}\n", user("anchor-root")));
|
|
56
|
+
let paths: Vec<_> = (0..count)
|
|
57
|
+
.map(|index| {
|
|
58
|
+
let path = source.directory.join(format!("member-{index:04}.jsonl"));
|
|
59
|
+
std::fs::write(&path, format!("{}\n", user(&format!("anchor-{index}")))).unwrap();
|
|
60
|
+
path.to_string_lossy().into_owned()
|
|
61
|
+
})
|
|
62
|
+
.collect();
|
|
63
|
+
let store = Arc::new(store());
|
|
64
|
+
let owner = context("anchor-cost");
|
|
65
|
+
let root = finish(
|
|
66
|
+
&store,
|
|
67
|
+
store.request(&acquire(&source.path), &owner, &Cancellation::default()),
|
|
68
|
+
&owner,
|
|
69
|
+
);
|
|
70
|
+
let mut request = prepare_request(&root);
|
|
71
|
+
request["direct_paths"] = json!(paths);
|
|
72
|
+
request["limits"]["max_sources"] = json!(count + 1);
|
|
73
|
+
let recording = PreparedGraphAnchorRecording::start(Arc::clone(&store));
|
|
74
|
+
let prepared = finish_prepared(
|
|
75
|
+
&store,
|
|
76
|
+
store.request(&request, &owner, &Cancellation::default()),
|
|
77
|
+
&owner,
|
|
78
|
+
);
|
|
79
|
+
let publication = recording.finish();
|
|
80
|
+
assert_eq!(prepared["status"].as_str(), Some("ok"), "{prepared:?}");
|
|
81
|
+
{
|
|
82
|
+
let state = store.lock_state();
|
|
83
|
+
let graph = state.prepared_graphs[prepared["data"]["handle"]["graph_id"].as_str().unwrap()]
|
|
84
|
+
.lock()
|
|
85
|
+
.unwrap();
|
|
86
|
+
assert_eq!(graph.sources.len(), count);
|
|
87
|
+
assert_eq!(graph.sidechain_dirs.len(), count + 1);
|
|
88
|
+
}
|
|
89
|
+
let recording = PreparedGraphAnchorRecording::start(Arc::clone(&store));
|
|
90
|
+
release_graph(&store, &prepared, &owner);
|
|
91
|
+
let release = recording.finish();
|
|
92
|
+
store.assert_conserved();
|
|
93
|
+
eprintln!(
|
|
94
|
+
"PREPARED_GRAPH_ANCHOR_COST sources={count} directories={} publication_calls={} publication_fields={} publication_state_held={} release_calls={} release_fields={} release_state_held={}",
|
|
95
|
+
count + 1,
|
|
96
|
+
publication.calls,
|
|
97
|
+
publication.fields,
|
|
98
|
+
publication.state_held,
|
|
99
|
+
release.calls,
|
|
100
|
+
release.fields,
|
|
101
|
+
release.state_held,
|
|
102
|
+
);
|
|
103
|
+
(publication, release)
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
fn assert_prepared_graph_anchor_cost(count: usize) {
|
|
107
|
+
let (publication, release) = prepared_graph_anchor_cost_case(count);
|
|
108
|
+
assert_eq!(
|
|
109
|
+
publication.calls + release.calls,
|
|
110
|
+
1,
|
|
111
|
+
"prepared graph repeats immutable roster byte accounting"
|
|
112
|
+
);
|
|
113
|
+
assert_eq!(publication.fields, count + count + 1);
|
|
114
|
+
assert_eq!(release.fields, 0);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
#[test]
|
|
118
|
+
fn prepared_graph_anchor_cost_zero() {
|
|
119
|
+
assert_prepared_graph_anchor_cost(0);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
#[test]
|
|
123
|
+
fn prepared_graph_anchor_cost_small() {
|
|
124
|
+
assert_prepared_graph_anchor_cost(32);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
#[test]
|
|
128
|
+
fn prepared_graph_anchor_cost_923() {
|
|
129
|
+
assert_prepared_graph_anchor_cost(923);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
#[test]
|
|
133
|
+
fn prepared_graph_anchor_walks_do_not_hold_shared_state() {
|
|
134
|
+
let (publication, release) = prepared_graph_anchor_cost_case(923);
|
|
135
|
+
assert_eq!(
|
|
136
|
+
publication.state_held + release.state_held,
|
|
137
|
+
0,
|
|
138
|
+
"prepared graph counts roster bytes under shared state"
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
#[test]
|
|
143
|
+
fn prepared_graph_anchor_owners_preserve_slice_aliases() {
|
|
144
|
+
let source = Source::new(&format!("{}\n", user("anchor-alias-root")));
|
|
145
|
+
let store = store();
|
|
146
|
+
let owner = context("anchor-alias");
|
|
147
|
+
let root = finish(
|
|
148
|
+
&store,
|
|
149
|
+
store.request(&acquire(&source.path), &owner, &Cancellation::default()),
|
|
150
|
+
&owner,
|
|
151
|
+
);
|
|
152
|
+
let prepared = finish_prepared(
|
|
153
|
+
&store,
|
|
154
|
+
store.request(&prepare_request(&root), &owner, &Cancellation::default()),
|
|
155
|
+
&owner,
|
|
156
|
+
);
|
|
157
|
+
assert_eq!(prepared["status"].as_str(), Some("ok"), "{prepared:?}");
|
|
158
|
+
let graph_id = prepared["data"]["handle"]["graph_id"].as_str().unwrap().to_owned();
|
|
159
|
+
let graph = store.lock_state().remove_prepared_graph(&graph_id).unwrap();
|
|
160
|
+
let Ok(graph) = Arc::try_unwrap(graph) else {
|
|
161
|
+
panic!("prepared graph has another owner");
|
|
162
|
+
};
|
|
163
|
+
let Ok(mut graph) = graph.into_inner() else {
|
|
164
|
+
panic!("prepared graph is poisoned");
|
|
165
|
+
};
|
|
166
|
+
for name in ["alias-one", "alias-two"] {
|
|
167
|
+
let key = name.to_owned();
|
|
168
|
+
graph.root_slices.reserve_for(&key);
|
|
169
|
+
graph.root_slices.insert(key, Arc::clone(&graph.root_facts));
|
|
170
|
+
}
|
|
171
|
+
let root_identity = facts_key(&graph.root_facts);
|
|
172
|
+
let root_bytes = graph.root_facts.accounted_bytes();
|
|
173
|
+
let root_weak = Arc::downgrade(&graph.root_facts);
|
|
174
|
+
assert_eq!(graph.anchors().filter(|anchor| anchor.id == root_identity).count(), 3);
|
|
175
|
+
let revision = graph.revision.clone();
|
|
176
|
+
let bytes = {
|
|
177
|
+
let state = store.lock_state();
|
|
178
|
+
charged_bytes(&graph_id, &graph)
|
|
179
|
+
+ state.ledger.shared.unowned_bytes(graph.anchors())
|
|
180
|
+
+ state.ledger.shared.growth(graph.anchors())
|
|
181
|
+
+ state.prepared_graphs.growth_for(&graph_id)
|
|
182
|
+
};
|
|
183
|
+
let mut reservation = store.reserve_projection(&owner, bytes).unwrap();
|
|
184
|
+
let (data, cursor, load) = store
|
|
185
|
+
.publish_prepared_graph(graph_id, graph, revision, &owner, &mut reservation)
|
|
186
|
+
.unwrap();
|
|
187
|
+
assert!(cursor.is_none() && load.is_none());
|
|
188
|
+
drop(reservation);
|
|
189
|
+
store.assert_conserved();
|
|
190
|
+
release_graph(&store, &json!({"data": data}), &owner);
|
|
191
|
+
{
|
|
192
|
+
let mut state = store.lock_state();
|
|
193
|
+
let before = state.ledger.shared.facts();
|
|
194
|
+
let keys: Vec<_> = state
|
|
195
|
+
.prepared_facts
|
|
196
|
+
.iter()
|
|
197
|
+
.filter(|(_, cached)| facts_key(&cached.facts) == root_identity)
|
|
198
|
+
.map(|(key, _)| *key)
|
|
199
|
+
.collect();
|
|
200
|
+
assert!(!keys.is_empty());
|
|
201
|
+
for key in keys {
|
|
202
|
+
drop(state.remove_prepared_facts(&key).unwrap());
|
|
203
|
+
}
|
|
204
|
+
assert_eq!(state.ledger.shared.facts(), before - root_bytes);
|
|
205
|
+
}
|
|
206
|
+
assert!(root_weak.upgrade().is_none());
|
|
207
|
+
store.assert_conserved();
|
|
208
|
+
}
|
{cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_prepared_service.rs
RENAMED
|
@@ -1722,6 +1722,7 @@ impl NativeStore {
|
|
|
1722
1722
|
context: &Value,
|
|
1723
1723
|
reservation: &mut ProjectionReservation<'_>,
|
|
1724
1724
|
) -> Result<(Value, Option<String>, Option<String>), SnapshotError> {
|
|
1725
|
+
let inputs = graph.input_anchors();
|
|
1725
1726
|
let mut state = self.lock_state();
|
|
1726
1727
|
Self::prune(&mut state);
|
|
1727
1728
|
if state.prepared_graphs.len() >= self.lease_cap(context)? {
|
|
@@ -1730,16 +1731,16 @@ impl NativeStore {
|
|
|
1730
1731
|
"prepared graph admission exhausted",
|
|
1731
1732
|
));
|
|
1732
1733
|
}
|
|
1733
|
-
let record =
|
|
1734
|
-
|
|
1734
|
+
let record = charged_bytes(&graph_id, &graph)
|
|
1735
|
+
+ state.ledger.shared.unowned_bytes(graph.anchors_with(inputs));
|
|
1735
1736
|
let covered = record.min(reservation.bytes);
|
|
1736
1737
|
let fresh = record - covered
|
|
1737
|
-
+ state.ledger.shared.growth(graph.
|
|
1738
|
+
+ state.ledger.shared.growth(graph.anchors_with(inputs))
|
|
1738
1739
|
+ state.prepared_graphs.growth_for(&graph_id);
|
|
1739
1740
|
self.admit_memory(&mut state, context, fresh)?;
|
|
1740
1741
|
state.transient_bytes -= covered;
|
|
1741
1742
|
reservation.bytes -= covered;
|
|
1742
|
-
state.insert_prepared_graph(graph_id.clone(), Arc::new(Mutex::new(graph)));
|
|
1743
|
+
state.insert_prepared_graph(graph_id.clone(), Arc::new(Mutex::new(graph)), inputs);
|
|
1743
1744
|
Ok((
|
|
1744
1745
|
json!({"kind":"prepared_graph","handle":{"graph_id":graph_id,"owner_epoch":self.owner_epoch,"revision":revision,"complete":true}}),
|
|
1745
1746
|
None,
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
fn finish_shared_publication_fixture(
|
|
2
|
+
store: &NativeStore,
|
|
3
|
+
mut response: Value,
|
|
4
|
+
owner: &Value,
|
|
5
|
+
) -> (Value, u64) {
|
|
6
|
+
let mut read = 0;
|
|
7
|
+
for _ in 0..256 {
|
|
8
|
+
read += response["usage"]["source_bytes_read"].as_u64().unwrap();
|
|
9
|
+
store.assert_conserved();
|
|
10
|
+
if response["status"].as_str() != Some("incomplete") {
|
|
11
|
+
return (response, read);
|
|
12
|
+
}
|
|
13
|
+
response = store.request(
|
|
14
|
+
&json!({"schema":SCHEMA,"id":"shared-publication-resume","operation":"resume","cursor":response["cursor"].as_str().unwrap()}),
|
|
15
|
+
owner,
|
|
16
|
+
&Cancellation::default(),
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
panic!("shared publication fixture did not finish")
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
#[test]
|
|
23
|
+
fn shared_publication_admission_counts_raw_allocations_once_and_reuses_source() {
|
|
24
|
+
let payload = "result payload ".repeat(8192);
|
|
25
|
+
let line = format!(
|
|
26
|
+
"{}\n",
|
|
27
|
+
json!({
|
|
28
|
+
"type":"user","uuid":"large-result","sessionId":"s","timestamp":"2026-01-02T03:04:05Z",
|
|
29
|
+
"message":{"role":"user","content":[{"type":"tool_result","tool_use_id":"call","content":payload}]}
|
|
30
|
+
})
|
|
31
|
+
);
|
|
32
|
+
let source = Source::new(&line);
|
|
33
|
+
let cap = 64 * 1024 * 1024;
|
|
34
|
+
let store = NativeStore::new(&json!({
|
|
35
|
+
"max_read_bytes_per_step":8192,"max_events_per_step":32,"max_entry_bytes":1024*1024,
|
|
36
|
+
"max_retained_bytes":cap,"reserved_hook_accounted_bytes":4096
|
|
37
|
+
}))
|
|
38
|
+
.unwrap();
|
|
39
|
+
let mut owner = context("shared-publication-admission");
|
|
40
|
+
owner["admission"] = json!("review");
|
|
41
|
+
let mut response = store.request(&acquire(&source.path), &owner, &Cancellation::default());
|
|
42
|
+
let mut first_read = 0;
|
|
43
|
+
let mut ready = false;
|
|
44
|
+
for _ in 0..128 {
|
|
45
|
+
first_read += response["usage"]["source_bytes_read"].as_u64().unwrap();
|
|
46
|
+
assert_eq!(
|
|
47
|
+
response["status"].as_str(),
|
|
48
|
+
Some("incomplete"),
|
|
49
|
+
"{response:?}"
|
|
50
|
+
);
|
|
51
|
+
let slot = store.lock_state().loads.values().next().cloned().unwrap();
|
|
52
|
+
let load = slot.work.lock().unwrap();
|
|
53
|
+
if load.decoded && load.indexed == load.count && load.count > 0 {
|
|
54
|
+
assert!(!load.sealed);
|
|
55
|
+
assert!(load.result.is_none());
|
|
56
|
+
ready = true;
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
drop(load);
|
|
60
|
+
response = store.request(
|
|
61
|
+
&json!({"schema":SCHEMA,"id":"shared-publication-prime","operation":"resume","cursor":response["cursor"].as_str().unwrap()}),
|
|
62
|
+
&owner,
|
|
63
|
+
&Cancellation::default(),
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
assert!(ready);
|
|
67
|
+
let headroom = MAX_REPLY_BYTES * 2 + 96 * 1024;
|
|
68
|
+
let crowded = store
|
|
69
|
+
.reserve_projection(
|
|
70
|
+
&owner,
|
|
71
|
+
cap - 4096 - store.retained_accounted_bytes() - headroom,
|
|
72
|
+
)
|
|
73
|
+
.unwrap();
|
|
74
|
+
response = store.request(
|
|
75
|
+
&json!({"schema":SCHEMA,"id":"shared-publication-seal","operation":"resume","cursor":response["cursor"].as_str().unwrap()}),
|
|
76
|
+
&owner,
|
|
77
|
+
&Cancellation::default(),
|
|
78
|
+
);
|
|
79
|
+
let (first, read) = finish_shared_publication_fixture(&store, response, &owner);
|
|
80
|
+
first_read += read;
|
|
81
|
+
assert_eq!(
|
|
82
|
+
first["status"].as_str(),
|
|
83
|
+
Some("ok"),
|
|
84
|
+
"shared raw publication admission refused: {first:?}"
|
|
85
|
+
);
|
|
86
|
+
assert_eq!(first_read, line.len() as u64 + 128);
|
|
87
|
+
let handle = &first["data"]["description"]["handle"];
|
|
88
|
+
let snapshot = store
|
|
89
|
+
.renew_scope_for_work(handle, &owner, now_ms() + 30_000)
|
|
90
|
+
.unwrap()
|
|
91
|
+
.snapshot;
|
|
92
|
+
let Entry::User(result_user) = &snapshot.chunks[0].entries[0] else {
|
|
93
|
+
panic!("result entry changed")
|
|
94
|
+
};
|
|
95
|
+
assert_eq!(result_user.tool_results().next().unwrap().content, payload);
|
|
96
|
+
assert_eq!(snapshot.activity.entry_count(), 1);
|
|
97
|
+
for _ in 0..2 {
|
|
98
|
+
let (repeated, read) = finish_shared_publication_fixture(
|
|
99
|
+
&store,
|
|
100
|
+
store.request(&acquire(&source.path), &owner, &Cancellation::default()),
|
|
101
|
+
&owner,
|
|
102
|
+
);
|
|
103
|
+
assert_eq!(repeated["status"].as_str(), Some("ok"), "{repeated:?}");
|
|
104
|
+
assert_eq!(read, 0);
|
|
105
|
+
assert_eq!(
|
|
106
|
+
repeated["data"]["description"]["handle"]["generation"],
|
|
107
|
+
first["data"]["description"]["handle"]["generation"]
|
|
108
|
+
);
|
|
109
|
+
assert_eq!(
|
|
110
|
+
repeated["data"]["description"]["mtime_ns"],
|
|
111
|
+
first["data"]["description"]["mtime_ns"]
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
let appended = format!("{}\n", user("appended-owner-words"));
|
|
115
|
+
source.append(&appended);
|
|
116
|
+
let (grown, append_read) = finish_shared_publication_fixture(
|
|
117
|
+
&store,
|
|
118
|
+
store.request(&acquire(&source.path), &owner, &Cancellation::default()),
|
|
119
|
+
&owner,
|
|
120
|
+
);
|
|
121
|
+
assert_eq!(grown["status"].as_str(), Some("ok"), "{grown:?}");
|
|
122
|
+
assert_eq!(
|
|
123
|
+
grown["data"]["description"]["event_count"].as_u64(),
|
|
124
|
+
Some(2)
|
|
125
|
+
);
|
|
126
|
+
assert_eq!(append_read, appended.len() as u64 + 192);
|
|
127
|
+
eprintln!("SHARED_PUBLICATION_ADMISSION source_bytes={} first_read_bytes={} unchanged_calls=2 unchanged_read_bytes=0 event_count=1 payload_bytes={} headroom_bytes={headroom} append_bytes={} append_read_bytes={append_read}", line.len(), first_read, payload.len(), appended.len());
|
|
128
|
+
drop(crowded);
|
|
129
|
+
store.assert_conserved();
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
#[test]
|
|
133
|
+
fn shared_publication_admission_reuses_219mb_source_with_other_generations() {
|
|
134
|
+
let source = Source::new("");
|
|
135
|
+
let target_bytes = 219_081_957;
|
|
136
|
+
let payload = "r".repeat(16 * 1024);
|
|
137
|
+
let mut file = std::fs::OpenOptions::new()
|
|
138
|
+
.write(true)
|
|
139
|
+
.open(&source.path)
|
|
140
|
+
.unwrap();
|
|
141
|
+
let mut written = 0;
|
|
142
|
+
let mut count = 0;
|
|
143
|
+
loop {
|
|
144
|
+
let row = format!(
|
|
145
|
+
"{}\n",
|
|
146
|
+
json!({
|
|
147
|
+
"type":"user","uuid":format!("result-{count}"),"sessionId":"s",
|
|
148
|
+
"timestamp":"2026-01-02T03:04:05Z","isSidechain":true,
|
|
149
|
+
"toolUseResult":{"output":payload},
|
|
150
|
+
"message":{"role":"user","content":[{"type":"tool_result","tool_use_id":format!("call-{count}"),"content":payload}]}
|
|
151
|
+
})
|
|
152
|
+
);
|
|
153
|
+
if written + row.len() >= target_bytes {
|
|
154
|
+
break;
|
|
155
|
+
}
|
|
156
|
+
file.write_all(row.as_bytes()).unwrap();
|
|
157
|
+
written += row.len();
|
|
158
|
+
count += 1;
|
|
159
|
+
}
|
|
160
|
+
file.write_all(" ".repeat(target_bytes - written - 1).as_bytes())
|
|
161
|
+
.unwrap();
|
|
162
|
+
file.write_all(b"\n").unwrap();
|
|
163
|
+
drop(file);
|
|
164
|
+
assert_eq!(
|
|
165
|
+
std::fs::metadata(&source.path).unwrap().len(),
|
|
166
|
+
target_bytes as u64
|
|
167
|
+
);
|
|
168
|
+
let cap = 1408 * 1024 * 1024;
|
|
169
|
+
let reserved = 512 * 1024 * 1024;
|
|
170
|
+
let store = NativeStore::new(&json!({
|
|
171
|
+
"max_read_bytes_per_step":8*1024*1024,"max_events_per_step":100_000,
|
|
172
|
+
"max_entry_bytes":8*1024*1024,"max_source_bytes":512*1024*1024,
|
|
173
|
+
"max_retained_bytes":cap,"reserved_hook_accounted_bytes":reserved
|
|
174
|
+
}))
|
|
175
|
+
.unwrap();
|
|
176
|
+
let mut owner = context("shared-publication-219mb");
|
|
177
|
+
owner["admission"] = json!("review");
|
|
178
|
+
let prefixes = [Source::new(&users(0..32)), Source::new(&users(32..64))];
|
|
179
|
+
let pins: Vec<_> = prefixes
|
|
180
|
+
.iter()
|
|
181
|
+
.map(|prefix| {
|
|
182
|
+
let (response, _) = finish_shared_publication_fixture(
|
|
183
|
+
&store,
|
|
184
|
+
store.request(&acquire(&prefix.path), &owner, &Cancellation::default()),
|
|
185
|
+
&owner,
|
|
186
|
+
);
|
|
187
|
+
assert_eq!(response["status"].as_str(), Some("ok"), "{response:?}");
|
|
188
|
+
store
|
|
189
|
+
.pin(&response["data"]["description"]["handle"], &owner)
|
|
190
|
+
.unwrap()
|
|
191
|
+
})
|
|
192
|
+
.collect();
|
|
193
|
+
let mut request = acquire(&source.path);
|
|
194
|
+
request["limits"]["max_read_bytes"] = json!(512 * 1024 * 1024);
|
|
195
|
+
request["limits"]["max_source_read_bytes"] = json!(512 * 1024 * 1024);
|
|
196
|
+
request["limits"]["max_events"] = json!(1_000_000);
|
|
197
|
+
request["deadline_unix_ms"] = json!(now_ms() + 120_000);
|
|
198
|
+
let canonical_source = std::fs::canonicalize(&source.path).unwrap();
|
|
199
|
+
let mut response = store.request(&request, &owner, &Cancellation::default());
|
|
200
|
+
let mut first_read = 0;
|
|
201
|
+
let mut ready = false;
|
|
202
|
+
for _ in 0..256 {
|
|
203
|
+
first_read += response["usage"]["source_bytes_read"].as_u64().unwrap();
|
|
204
|
+
assert_eq!(
|
|
205
|
+
response["status"].as_str(),
|
|
206
|
+
Some("incomplete"),
|
|
207
|
+
"{response:?}"
|
|
208
|
+
);
|
|
209
|
+
let slot = store
|
|
210
|
+
.lock_state()
|
|
211
|
+
.loads
|
|
212
|
+
.values()
|
|
213
|
+
.find(|slot| slot.path == canonical_source)
|
|
214
|
+
.cloned()
|
|
215
|
+
.unwrap();
|
|
216
|
+
let load = slot.work.lock().unwrap();
|
|
217
|
+
if load.decoded && load.indexed == load.count && load.count > 0 {
|
|
218
|
+
assert!(!load.sealed);
|
|
219
|
+
assert!(load.result.is_none());
|
|
220
|
+
ready = true;
|
|
221
|
+
break;
|
|
222
|
+
}
|
|
223
|
+
drop(load);
|
|
224
|
+
response = store.request(
|
|
225
|
+
&json!({"schema":SCHEMA,"id":"shared-publication-219mb-prime","operation":"resume","cursor":response["cursor"].as_str().unwrap()}),
|
|
226
|
+
&owner, &Cancellation::default(),
|
|
227
|
+
);
|
|
228
|
+
}
|
|
229
|
+
assert!(ready);
|
|
230
|
+
let headroom = 64 * 1024 * 1024;
|
|
231
|
+
let crowded = store
|
|
232
|
+
.reserve_projection(
|
|
233
|
+
&owner,
|
|
234
|
+
cap - reserved - store.retained_accounted_bytes() - headroom,
|
|
235
|
+
)
|
|
236
|
+
.unwrap();
|
|
237
|
+
response = store.request(
|
|
238
|
+
&json!({"schema":SCHEMA,"id":"shared-publication-219mb-seal","operation":"resume","cursor":response["cursor"].as_str().unwrap()}),
|
|
239
|
+
&owner, &Cancellation::default(),
|
|
240
|
+
);
|
|
241
|
+
let (first, read) = finish_shared_publication_fixture(&store, response, &owner);
|
|
242
|
+
first_read += read;
|
|
243
|
+
assert_eq!(
|
|
244
|
+
first["status"].as_str(),
|
|
245
|
+
Some("ok"),
|
|
246
|
+
"shared raw publication admission refused: {first:?}"
|
|
247
|
+
);
|
|
248
|
+
assert_eq!(first_read, target_bytes as u64 + 128);
|
|
249
|
+
let snapshot = store
|
|
250
|
+
.pin(&first["data"]["description"]["handle"], &owner)
|
|
251
|
+
.unwrap();
|
|
252
|
+
assert_eq!(snapshot.event_count, count);
|
|
253
|
+
let Entry::User(result_user) = snapshot.entry(count - 1) else {
|
|
254
|
+
panic!("result entry changed")
|
|
255
|
+
};
|
|
256
|
+
assert_eq!(result_user.tool_results().next().unwrap().content, payload);
|
|
257
|
+
for _ in 0..2 {
|
|
258
|
+
let (repeated, read) = finish_shared_publication_fixture(
|
|
259
|
+
&store,
|
|
260
|
+
store.request(&request, &owner, &Cancellation::default()),
|
|
261
|
+
&owner,
|
|
262
|
+
);
|
|
263
|
+
assert_eq!(repeated["status"].as_str(), Some("ok"), "{repeated:?}");
|
|
264
|
+
assert_eq!(read, 0);
|
|
265
|
+
assert_eq!(
|
|
266
|
+
repeated["data"]["description"]["handle"]["generation"],
|
|
267
|
+
first["data"]["description"]["handle"]["generation"]
|
|
268
|
+
);
|
|
269
|
+
}
|
|
270
|
+
eprintln!("SHARED_PUBLICATION_ADMISSION source_bytes={target_bytes} first_read_bytes={first_read} unchanged_calls=2 unchanged_read_bytes=0 event_count={count} payload_bytes={} headroom_bytes={headroom} prefix_generations={}", payload.len(), pins.len());
|
|
271
|
+
drop(crowded);
|
|
272
|
+
drop(pins);
|
|
273
|
+
store.assert_conserved();
|
|
274
|
+
}
|
|
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
|
|
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
|
|
File without changes
|