From 99eda612df336b1258f00149ea3cdc1e6a7b1787 Mon Sep 17 00:00:00 2001 From: ScriptedAlchemy Date: Thu, 27 Aug 2026 06:33:54 +0000 Subject: [PATCH] chore(vendor): split remaining generated and data churn out of PR #707 Byte-for-byte copies from PR #707 HEAD (12be86f52d), inert on master: - benchmark_data/ (new): benchmark harness, result JSONs, goldens - mockups/ (new): design mockup HTML prototypes - plugin/cursor-native-extension/ (new): self-contained extension incl. the generated rslib bundle embedded/extension.js - dashboard/codegen/schemas/dashboard-contracts.schema.json (new): generated contracts schema (pure JSON, nothing on master compiles it) 130 files, +100826 / -0. No Cargo.toml/Cargo.lock changes. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01A2BarcJk3iuv77aJQwHvnx --- benchmark_data/README.md | 10 + benchmark_data/claude-observation/README.md | 128 + .../claude-observation/evidence-index.json | 11 + .../result-2026-07-15-0c289212.json | 641 + .../result-2026-07-15-b05b4cd5.json | 610 + .../result-2026-07-16-00d3d73a.json | 1 + .../result-2026-07-16-8d53b4a9.json | 1 + .../result-2026-07-26-dc17dd73.json | 13743 +++++++ .../claude-observation/workload-v1.json | 657 + .../pr11-application-boundary/README.md | 28 + .../compile-baseline.json | 13 + .../validate_compile_baseline.py | 105 + benchmark_data/queries/default.toml | 41 + benchmark_data/query-code-index/README.md | 68 + .../query-code-index/expected-v1.json | 184 + .../query-code-index/workload-v1.json | 88 + benchmark_data/run_benchmarks.py | 543 + benchmark_data/runtime/GRAPH_MEASUREMENTS.md | 89 + benchmark_data/runtime/comparison.py | 316 + .../cli-exact-query-p95-20260730/README.md | 15 + .../cli-exact-query-p95-20260730/report.json | 114 + .../report.policy.json | 14 + .../report.samples.jsonl | 80 + .../code-index-restore-20260731/README.md | 151 + .../report.samples.jsonl | 11 + .../restore_driver.py | 294 + .../workload.status.json | 52 + .../README.md | 16 + .../report.json | 55 + .../report.policy.json | 14 + .../report.samples.jsonl | 3 + .../README.md | 18 + .../report.json | 114 + .../report.policy.json | 14 + .../report.samples.jsonl | 40 + .../README.md | 16 + .../report.json | 75 + .../report.policy.json | 14 + .../report.samples.jsonl | 4 + benchmark_data/runtime/fixtures.py | 454 + .../fake_hosts/after_shell_missing_daemon.py | 34 + .../fixtures/fake_hosts/dashboard_server.py | 118 + .../fixtures/fake_hosts/verbose_child.py | 35 + .../fixtures/fake_hosts/verbose_host.py | 80 + .../fixtures/measurements/shutdown.json | 18 + benchmark_data/runtime/fixtures/metadata.json | 78 + .../runtime/fixtures/project/README.md | 5 + .../runtime/fixtures/project/src/catalog.py | 23 + .../runtime/fixtures/project/src/graph.ts | 15 + .../runtime/fixtures/project/src/main.py | 15 + .../runtime/fixtures/project/src/report.ts | 14 + .../fixture-session.jsonl | 2 + .../sessions/2026/07/fixture-session.jsonl | 3 + .../runtime/fixtures/raw_samples/abba.jsonl | 4 + benchmark_data/runtime/graph_measurements.py | 1293 + benchmark_data/runtime/host_workloads.py | 638 + benchmark_data/runtime/incident_workloads.py | 329 + benchmark_data/runtime/lifecycle.py | 610 + benchmark_data/runtime/mcp_client.py | 564 + .../runtime/policies/acceptance-v1.json | 1 + .../runtime/policies/journey-margins-v1.json | 1 + benchmark_data/runtime/policy.py | 216 + benchmark_data/runtime/run.py | 1925 + benchmark_data/runtime/scenarios.py | 576 + benchmark_data/runtime/schema.py | 845 + benchmark_data/runtime/statistics.py | 283 + benchmark_data/runtime/storage_workloads.py | 686 + .../runtime/tests/test_adversarial.py | 652 + .../runtime/tests/test_capture_dispatch.py | 615 + .../runtime/tests/test_comparison.py | 286 + benchmark_data/runtime/tests/test_fixtures.py | 455 + .../runtime/tests/test_graph_measurements.py | 469 + .../runtime/tests/test_host_workloads.py | 401 + .../runtime/tests/test_incident_workloads.py | 185 + .../runtime/tests/test_lifecycle.py | 392 + .../runtime/tests/test_mcp_client.py | 435 + benchmark_data/runtime/tests/test_policy.py | 123 + .../runtime/tests/test_scenarios.py | 535 + benchmark_data/runtime/tests/test_schema.py | 557 + .../runtime/tests/test_statistics.py | 225 + .../runtime/tests/test_storage_workloads.py | 297 + .../query-fallback-report-v1.json | 1 + benchmark_data/session-temporal/README.md | 61 + .../session-temporal/evidence-index.json | 9 + .../fixtures/codex-sanitization-receipt.json | 31 + .../session-temporal/result-provisional.json | 232 + .../session-temporal/workload-v1.json | 132 + benchmark_data/transport-boundary/README.md | 34 + .../transport-boundary/compile-baseline.json | 26 + .../goldens/application-surface-parity.json | 468 + benchmark_data/tsbench/README.md | 72 + benchmark_data/tsbench/bench_tracedecay.patch | 228 + .../schemas/dashboard-contracts.schema.json | 29525 ++++++++++++++++ mockups/code-topography/NOTES.md | 113 + mockups/code-topography/README.md | 95 + mockups/code-topography/core-sample.html | 404 + mockups/code-topography/cortex.html | 465 + mockups/code-topography/lens.html | 402 + mockups/code-topography/prototype/README.md | 191 + mockups/code-topography/prototype/dataset.js | 249 + .../code-topography/prototype/qa-drive.mjs | 474 + mockups/code-topography/prototype/recorder.js | 185 + mockups/code-topography/prototype/render.js | 636 + .../prototype/session-commit-weave.html | 34 + mockups/code-topography/prototype/sim.js | 463 + .../code-topography/prototype/sim.test.mjs | 397 + .../code-topography/prototype/trace-live.html | 647 + mockups/code-topography/shoot.mjs | 75 + mockups/code-topography/topography.css | 337 + mockups/code-topography/topography.js | 185 + mockups/code-topography/trace.html | 499 + mockups/structure-viz/README.md | 50 + mockups/structure-viz/call-chain-transit.html | 437 + mockups/structure-viz/disagreement-field.html | 475 + .../structure-viz/notes/call-chain-transit.md | 75 + .../structure-viz/notes/disagreement-field.md | 80 + mockups/structure-viz/notes/symbol-anatomy.md | 80 + mockups/structure-viz/shoot.mjs | 64 + mockups/structure-viz/symbol-anatomy.html | 620 + plugin/cursor-native-extension/.gitignore | 2 + plugin/cursor-native-extension/LICENSE | 21 + plugin/cursor-native-extension/README.md | 20 + .../embedded/extension.js | 26918 ++++++++++++++ .../cursor-native-extension/package-lock.json | 1621 + plugin/cursor-native-extension/package.json | 46 + .../scripts/build-extension.mjs | 64 + .../cursor-native-extension/src/extension.ts | 286 + .../src/nativeDiagnostics.ts | 225 + .../test/nativeDiagnostics.test.ts | 165 + plugin/cursor-native-extension/tsconfig.json | 24 + 130 files changed, 100826 insertions(+) create mode 100644 benchmark_data/README.md create mode 100644 benchmark_data/claude-observation/README.md create mode 100644 benchmark_data/claude-observation/evidence-index.json create mode 100644 benchmark_data/claude-observation/result-2026-07-15-0c289212.json create mode 100644 benchmark_data/claude-observation/result-2026-07-15-b05b4cd5.json create mode 100644 benchmark_data/claude-observation/result-2026-07-16-00d3d73a.json create mode 100644 benchmark_data/claude-observation/result-2026-07-16-8d53b4a9.json create mode 100644 benchmark_data/claude-observation/result-2026-07-26-dc17dd73.json create mode 100644 benchmark_data/claude-observation/workload-v1.json create mode 100644 benchmark_data/pr11-application-boundary/README.md create mode 100644 benchmark_data/pr11-application-boundary/compile-baseline.json create mode 100755 benchmark_data/pr11-application-boundary/validate_compile_baseline.py create mode 100644 benchmark_data/queries/default.toml create mode 100644 benchmark_data/query-code-index/README.md create mode 100644 benchmark_data/query-code-index/expected-v1.json create mode 100644 benchmark_data/query-code-index/workload-v1.json create mode 100644 benchmark_data/run_benchmarks.py create mode 100644 benchmark_data/runtime/GRAPH_MEASUREMENTS.md create mode 100644 benchmark_data/runtime/comparison.py create mode 100644 benchmark_data/runtime/evidence/cli-exact-query-p95-20260730/README.md create mode 100644 benchmark_data/runtime/evidence/cli-exact-query-p95-20260730/report.json create mode 100644 benchmark_data/runtime/evidence/cli-exact-query-p95-20260730/report.policy.json create mode 100644 benchmark_data/runtime/evidence/cli-exact-query-p95-20260730/report.samples.jsonl create mode 100644 benchmark_data/runtime/evidence/code-index-restore-20260731/README.md create mode 100644 benchmark_data/runtime/evidence/code-index-restore-20260731/report.samples.jsonl create mode 100644 benchmark_data/runtime/evidence/code-index-restore-20260731/restore_driver.py create mode 100644 benchmark_data/runtime/evidence/code-index-restore-20260731/workload.status.json create mode 100644 benchmark_data/runtime/evidence/diagnostic-flood-authority-20260730/README.md create mode 100644 benchmark_data/runtime/evidence/diagnostic-flood-authority-20260730/report.json create mode 100644 benchmark_data/runtime/evidence/diagnostic-flood-authority-20260730/report.policy.json create mode 100644 benchmark_data/runtime/evidence/diagnostic-flood-authority-20260730/report.samples.jsonl create mode 100644 benchmark_data/runtime/evidence/missing-daemon-after-shell-p95-20260730/README.md create mode 100644 benchmark_data/runtime/evidence/missing-daemon-after-shell-p95-20260730/report.json create mode 100644 benchmark_data/runtime/evidence/missing-daemon-after-shell-p95-20260730/report.policy.json create mode 100644 benchmark_data/runtime/evidence/missing-daemon-after-shell-p95-20260730/report.samples.jsonl create mode 100644 benchmark_data/runtime/evidence/pinned-audit-revalidation-20260730/README.md create mode 100644 benchmark_data/runtime/evidence/pinned-audit-revalidation-20260730/report.json create mode 100644 benchmark_data/runtime/evidence/pinned-audit-revalidation-20260730/report.policy.json create mode 100644 benchmark_data/runtime/evidence/pinned-audit-revalidation-20260730/report.samples.jsonl create mode 100644 benchmark_data/runtime/fixtures.py create mode 100644 benchmark_data/runtime/fixtures/fake_hosts/after_shell_missing_daemon.py create mode 100644 benchmark_data/runtime/fixtures/fake_hosts/dashboard_server.py create mode 100644 benchmark_data/runtime/fixtures/fake_hosts/verbose_child.py create mode 100644 benchmark_data/runtime/fixtures/fake_hosts/verbose_host.py create mode 100644 benchmark_data/runtime/fixtures/measurements/shutdown.json create mode 100644 benchmark_data/runtime/fixtures/metadata.json create mode 100644 benchmark_data/runtime/fixtures/project/README.md create mode 100644 benchmark_data/runtime/fixtures/project/src/catalog.py create mode 100644 benchmark_data/runtime/fixtures/project/src/graph.ts create mode 100644 benchmark_data/runtime/fixtures/project/src/main.py create mode 100644 benchmark_data/runtime/fixtures/project/src/report.ts create mode 100644 benchmark_data/runtime/fixtures/providers/home/.claude/projects/-workspace-runtime-fixture/fixture-session.jsonl create mode 100644 benchmark_data/runtime/fixtures/providers/home/.codex/sessions/2026/07/fixture-session.jsonl create mode 100644 benchmark_data/runtime/fixtures/raw_samples/abba.jsonl create mode 100644 benchmark_data/runtime/graph_measurements.py create mode 100644 benchmark_data/runtime/host_workloads.py create mode 100644 benchmark_data/runtime/incident_workloads.py create mode 100644 benchmark_data/runtime/lifecycle.py create mode 100644 benchmark_data/runtime/mcp_client.py create mode 100644 benchmark_data/runtime/policies/acceptance-v1.json create mode 100644 benchmark_data/runtime/policies/journey-margins-v1.json create mode 100644 benchmark_data/runtime/policy.py create mode 100644 benchmark_data/runtime/run.py create mode 100644 benchmark_data/runtime/scenarios.py create mode 100644 benchmark_data/runtime/schema.py create mode 100644 benchmark_data/runtime/statistics.py create mode 100644 benchmark_data/runtime/storage_workloads.py create mode 100644 benchmark_data/runtime/tests/test_adversarial.py create mode 100644 benchmark_data/runtime/tests/test_capture_dispatch.py create mode 100644 benchmark_data/runtime/tests/test_comparison.py create mode 100644 benchmark_data/runtime/tests/test_fixtures.py create mode 100644 benchmark_data/runtime/tests/test_graph_measurements.py create mode 100644 benchmark_data/runtime/tests/test_host_workloads.py create mode 100644 benchmark_data/runtime/tests/test_incident_workloads.py create mode 100644 benchmark_data/runtime/tests/test_lifecycle.py create mode 100644 benchmark_data/runtime/tests/test_mcp_client.py create mode 100644 benchmark_data/runtime/tests/test_policy.py create mode 100644 benchmark_data/runtime/tests/test_scenarios.py create mode 100644 benchmark_data/runtime/tests/test_schema.py create mode 100644 benchmark_data/runtime/tests/test_statistics.py create mode 100644 benchmark_data/runtime/tests/test_storage_workloads.py create mode 100644 benchmark_data/search-quality/query-fallback-report-v1.json create mode 100644 benchmark_data/session-temporal/README.md create mode 100644 benchmark_data/session-temporal/evidence-index.json create mode 100644 benchmark_data/session-temporal/fixtures/codex-sanitization-receipt.json create mode 100644 benchmark_data/session-temporal/result-provisional.json create mode 100644 benchmark_data/session-temporal/workload-v1.json create mode 100644 benchmark_data/transport-boundary/README.md create mode 100644 benchmark_data/transport-boundary/compile-baseline.json create mode 100644 benchmark_data/transport-boundary/goldens/application-surface-parity.json create mode 100644 benchmark_data/tsbench/README.md create mode 100644 benchmark_data/tsbench/bench_tracedecay.patch create mode 100644 dashboard/codegen/schemas/dashboard-contracts.schema.json create mode 100644 mockups/code-topography/NOTES.md create mode 100644 mockups/code-topography/README.md create mode 100644 mockups/code-topography/core-sample.html create mode 100644 mockups/code-topography/cortex.html create mode 100644 mockups/code-topography/lens.html create mode 100644 mockups/code-topography/prototype/README.md create mode 100644 mockups/code-topography/prototype/dataset.js create mode 100644 mockups/code-topography/prototype/qa-drive.mjs create mode 100644 mockups/code-topography/prototype/recorder.js create mode 100644 mockups/code-topography/prototype/render.js create mode 100644 mockups/code-topography/prototype/session-commit-weave.html create mode 100644 mockups/code-topography/prototype/sim.js create mode 100644 mockups/code-topography/prototype/sim.test.mjs create mode 100644 mockups/code-topography/prototype/trace-live.html create mode 100644 mockups/code-topography/shoot.mjs create mode 100644 mockups/code-topography/topography.css create mode 100644 mockups/code-topography/topography.js create mode 100644 mockups/code-topography/trace.html create mode 100644 mockups/structure-viz/README.md create mode 100644 mockups/structure-viz/call-chain-transit.html create mode 100644 mockups/structure-viz/disagreement-field.html create mode 100644 mockups/structure-viz/notes/call-chain-transit.md create mode 100644 mockups/structure-viz/notes/disagreement-field.md create mode 100644 mockups/structure-viz/notes/symbol-anatomy.md create mode 100644 mockups/structure-viz/shoot.mjs create mode 100644 mockups/structure-viz/symbol-anatomy.html create mode 100644 plugin/cursor-native-extension/.gitignore create mode 100644 plugin/cursor-native-extension/LICENSE create mode 100644 plugin/cursor-native-extension/README.md create mode 100644 plugin/cursor-native-extension/embedded/extension.js create mode 100644 plugin/cursor-native-extension/package-lock.json create mode 100644 plugin/cursor-native-extension/package.json create mode 100644 plugin/cursor-native-extension/scripts/build-extension.mjs create mode 100644 plugin/cursor-native-extension/src/extension.ts create mode 100644 plugin/cursor-native-extension/src/nativeDiagnostics.ts create mode 100644 plugin/cursor-native-extension/test/nativeDiagnostics.test.ts create mode 100644 plugin/cursor-native-extension/tsconfig.json diff --git a/benchmark_data/README.md b/benchmark_data/README.md new file mode 100644 index 0000000000..0f22d29ea5 --- /dev/null +++ b/benchmark_data/README.md @@ -0,0 +1,10 @@ +# Benchmark data and provenance + +This directory contains benchmark workloads, fixtures, harness scripts, and +captured result evidence. Cargo benchmark source remains in `benches/` and in +crate-local `benches/` directories. + +Current scripts and manifests use `benchmark_data/` paths. Captured historical +result documents may retain a `benchmarks/` path when that value records the +repository layout at capture time; those values are evidence, not live path +references. diff --git a/benchmark_data/claude-observation/README.md b/benchmark_data/claude-observation/README.md new file mode 100644 index 0000000000..017c6526d6 --- /dev/null +++ b/benchmark_data/claude-observation/README.md @@ -0,0 +1,128 @@ +# Provider-observation pipeline benchmark + +> **Historical evidence only.** Preserve the authentic provider fixtures, +> measurements, and provenance in this directory. Current requirements come +> only from the `docs/plans/tracedecay-v2/` hierarchy; exact commands, counts, +> snapshots, receipts, attestations, PR packets, and gate fields below are not +> rebuild instructions. Validate current provider behavior directly. + +Archival result artifacts keep the workload id they were sealed under for +provenance. Workload schema 3 is the historical multi-provider Linux +benchmark; the checked-in results are descriptive measurements, not PR +acceptance authority. + +The versioned [workload](workload-v1.json) runs production scan/parse, +normalization, sanitizer, authoritative commit, projection/V1 fold, bounded +replay, and exact repeat-ingest no-op paths for claude, codex, cursor, hermes, +kiro, cline, roo-code, and kilo. Each provider baseline machine-asserts parse, +normalize, sanitize, commit, replay, duplicate-noop, projection, backlog, +fairness, and peak-resource checks. The measured loop executes one provider +turn per round in catalog order, records every turn, and validates an +eight-provider maximum turn distance. Each provider input is a bounded copy of +the checked-in native fixtures named in the workload; unique identities and +secret-shaped canaries are injected into those native shapes and the canaries +must be absent from durable observations. The historical result embeds a versioned +`provider-observation-performance-result-v1` containing per-provider raw +parse/commit/replay/pipeline/no-op samples, p50/p95/p99 distributions, +throughput, CPU, process write I/O, database growth, peak RSS, bounded replay backlog, and +observation-count deltas. The pipeline is the real production +parse/normalize/sanitize/commit/project/replay path. The separate parse +distribution measures native provider-format decoding over the exact bounded +input, commit measures the full production adapter through authoritative commit +and projection, and replay measures the bounded authoritative-store query. +Scopes are embedded beside each distribution so the commit sample is not +misrepresented as excluding the adapter's parse and normalization work. + +The provider catalog remains schema v1. Its measurement block is an additive +optional field for wire compatibility, while executable validation requires +that block for every supported provider and rejects pending paths. This avoids +an unnecessary incompatible schema-v2 claim. A normal test deserializes the +complete manifest with unknown fields denied, executes every production adapter +once, and proves each repeat is a durable no-op. + +The current measurement includes the nested +`provider_observation_performance` result and `hook_telemetry_readiness` +diagnostic. [evidence-index.json](evidence-index.json) identifies +[result-2026-07-26-dc17dd73.json](result-2026-07-26-dc17dd73.json) as the +legacy `current_acceptance`; that field is deprecated and grants no authority. +Earlier artifacts remain `historical_stale`. + +The measurement embeds hook telemetry readiness as +`hook-telemetry-baseline-readiness-v1`, not as a measured baseline. It reads the +redacted fixtures under `tests/fixtures/host_events` directly, records each +fixture path and SHA-256 identity, and computes compact canonical request-byte +samples. It consumes `crate::hooks::host_hook_telemetry_contract` and +`crate::hooks::measure_host_event_payload_bytes`; it defines no second runtime +telemetry schema. Current production telemetry exposes hook wall time, daemon +RTT, host-event/IPC byte counts, timeout state, and disposition per invocation +on instrumented hosts; Hermes coverage remains partial. Checked-in distributions +and aggregate timeout/disposition counts remain explicitly unavailable rather +than being represented as zero. + +The legacy schema records real SHA-256 identities for workload members and +native fixtures plus the host target, Rust/Cargo versions, kernel, and hardware. +Those source/content digests remain useful provenance. Do not recreate the +former clean-checkout archive, tracked-source snapshot, compiler-input +attestation, or evidence-only commit workflow. Run ordinary Cargo against the +working checkout and report the source revision and dirty state truthfully. + +Linux `/proc` is the explicit measurement platform contract. Preflight requires +all measured interfaces, a successful write of `5` to +`/proc/self/clear_refs`, and a nonzero `getconf CLK_TCK`, before warmup begins. +CPU, process-write, storage-growth, and peak-RSS provider fields therefore +contain measurements only for successful Linux evidence runs. Unsupported +platforms reject at preflight; the harness never substitutes numeric zero for +an unavailable counter. Zero is reserved for an available counter that +actually measured no work, including the strict repeat-ingest no-op assertion. +The module still compiles on non-Linux targets; an attempted measurement there +rejects the unsupported platform at preflight. CPU identity accepts common x86, +ARM, POWER, and other Linux +`/proc/cpuinfo` labels. + +Every replayed authoritative payload is checked for canary removal and a +payload-bound sanitization receipt, and every folded V1 message is checked for +exact identity, role, text, and canary absence. These assertions and V1 point reads run after +each measured phase, so correctness verification is not charged to latency, +CPU, I/O, or storage-growth measurements. The run also requires zero legacy +transcript writes: the observation projector is the only V1 message writer, +and compatibility transcript counters report those projector outputs. +The timed no-op retry replays after the durable end cursor and must return zero +new observations; a full replay verifies unchanged cardinality afterward. + +The current [measurement result](result-2026-07-26-dc17dd73.json) records +source revision `dc17dd731e97f9262e570afd9e7ec1602d8af99e` with 3 warmups and +30 independent measured repetitions of 64 records (30 × 64 = 1,920 records). +The raw artifact records the Linux kernel, CPU, memory, Rust/Cargo toolchains, +every repetition, and the nearest-rank/sample-standard-deviation method. + +- Pipeline batch latency: p50 2,341,276,568 ns; p95 2,527,159,267 ns; p99 + 2,708,492,865 ns. +- Pipeline throughput: 27.11224430907219 records/s. +- Timed pipeline CPU: 69,110 ms; peak RSS: 153,276 KiB. +- Timed process write I/O: 1,551,220,736 bytes; SQLite database/WAL/SHM growth: + 1,122,556,640 bytes across the 30 independent databases. +- Exact no-op retry plus bounded replay: p50 1,185,536 ns; p95 1,504,741 ns; + p99 1,558,623 ns; 40 ms CPU total; zero process write bytes, database growth, + observation-count delta, and coordinator work counters. +- Round-robin fairness: maximum provider turn distance 8. + +The earlier [measurement result](result-2026-07-16-00d3d73a.json) remains +`historical_stale` after the checked-in workload identity changed. + +The earlier [measurement result](result-2026-07-16-8d53b4a9.json) remains +`historical_stale` after the PR6 provider-ingestion correctness changes. + +The earlier [measurement result](result-2026-07-15-0c289212.json) remains +`historical_stale` because it predates workload schema 3. + +The [historical result](result-2026-07-15-b05b4cd5.json) was captured from clean +commit `b05b4cd570ab8e3385604c0fef31902fdc3f1e8b`. + +> **Historical/stale evidence:** this result predates schema 2 provenance and +> complete workload validation. Its JSON carries +> `"evidence_status": "historical_stale"` and is not current product evidence. +> Retain it only for provenance. + +```console +scripts/run-claude-observation-benchmark.sh +``` diff --git a/benchmark_data/claude-observation/evidence-index.json b/benchmark_data/claude-observation/evidence-index.json new file mode 100644 index 0000000000..50425d97a9 --- /dev/null +++ b/benchmark_data/claude-observation/evidence-index.json @@ -0,0 +1,11 @@ +{ + "schema_version": 1, + "current_acceptance": null, + "historical_stale": [ + "result-2026-07-15-0c289212.json", + "result-2026-07-15-b05b4cd5.json", + "result-2026-07-16-00d3d73a.json", + "result-2026-07-16-8d53b4a9.json", + "result-2026-07-26-dc17dd73.json" + ] +} \ No newline at end of file diff --git a/benchmark_data/claude-observation/result-2026-07-15-0c289212.json b/benchmark_data/claude-observation/result-2026-07-15-0c289212.json new file mode 100644 index 0000000000..31517f897e --- /dev/null +++ b/benchmark_data/claude-observation/result-2026-07-15-0c289212.json @@ -0,0 +1,641 @@ +{ + "schema_version": 2, + "workload_id": "pr5-observation-pipeline-v1", + "evidence_status": "historical_stale", + "workload_identity": { + "manifest_path": "benchmarks/pr5-observation/workload-v1.json", + "manifest_sha256": "d9ae0d85d9812bdb41e21d48df3dcf0f867358063c7a499d436f793e7571f581", + "harness_paths": [ + "src/sessions/claude_observation_benchmark.rs", + "src/sessions/claude_observation_benchmark/artifact.rs", + "src/sessions/claude_observation_benchmark/manifest.rs", + "src/sessions/claude_observation_benchmark/metrics.rs", + "src/sessions/claude_observation_benchmark/model.rs", + "src/sessions/claude_observation_benchmark/runner.rs", + "src/sessions/claude_observation_benchmark/tests.rs" + ], + "harness_sha256": "c468c65efa3ce7755cb46e4e8ea2c0e97a3486a5726ff45d6915de6d113f2546" + }, + "build_identity": { + "commit": "0c289212de5429e5d5abf309f6bb27e49f66a64e", + "tree": "141a3e36a2bbd0f8a1d74289f2243df1d884c89f", + "profile": "release", + "commit_keyed_target": true, + "executable_sha256": "a07c2ff6e8860b2148ddcdfdede418875a0cc6d3a02aa54acf4a331e61844c98", + "executable_size_bytes": 209609592 + }, + "git_before": { + "commit": "0c289212de5429e5d5abf309f6bb27e49f66a64e", + "tree": "141a3e36a2bbd0f8a1d74289f2243df1d884c89f", + "dirty": false + }, + "git_after": { + "commit": "0c289212de5429e5d5abf309f6bb27e49f66a64e", + "tree": "141a3e36a2bbd0f8a1d74289f2243df1d884c89f", + "dirty": false + }, + "command": "cargo test --quiet --locked --release --lib sessions::claude_observation_benchmark::production_observation_pipeline_baseline -- --ignored --exact --nocapture --test-threads=1", + "rustc": "rustc 1.95.0 (59807616e 2026-04-14)\nbinary: rustc\ncommit-hash: 59807616e1fa2540724bfbac14d7976d7e4a3860\ncommit-date: 2026-04-14\nhost: x86_64-unknown-linux-gnu\nrelease: 1.95.0\nLLVM version: 22.1.2", + "cargo": "cargo 1.95.0 (f2d3ce0bd 2026-03-21)", + "kernel": "Linux 6.8.0-134-generic x86_64 GNU/Linux", + "cpu_identity": "AMD EPYC 7742 64-Core Processor", + "logical_cpu_count": 64, + "memory_total_kib": 151845828, + "clock_ticks_per_second": 100, + "warmup_repetitions": 3, + "measured_repetitions": 30, + "records_per_repetition": 64, + "measured_records": 1920, + "pipeline_raw_samples": [ + { + "repetition": 0, + "latency_ns": 327853330, + "cpu_ticks": 22, + "process_write_bytes": 8355840, + "database_storage_growth_bytes": 3740736, + "peak_rss_kib": 24660, + "replayed_observations": 64 + }, + { + "repetition": 1, + "latency_ns": 322591035, + "cpu_ticks": 22, + "process_write_bytes": 8351744, + "database_storage_growth_bytes": 3740736, + "peak_rss_kib": 24668, + "replayed_observations": 64 + }, + { + "repetition": 2, + "latency_ns": 330672253, + "cpu_ticks": 21, + "process_write_bytes": 8355840, + "database_storage_growth_bytes": 3740736, + "peak_rss_kib": 24668, + "replayed_observations": 64 + }, + { + "repetition": 3, + "latency_ns": 330333649, + "cpu_ticks": 23, + "process_write_bytes": 8351744, + "database_storage_growth_bytes": 3740736, + "peak_rss_kib": 24672, + "replayed_observations": 64 + }, + { + "repetition": 4, + "latency_ns": 305474619, + "cpu_ticks": 22, + "process_write_bytes": 8347648, + "database_storage_growth_bytes": 3740736, + "peak_rss_kib": 24672, + "replayed_observations": 64 + }, + { + "repetition": 5, + "latency_ns": 322796838, + "cpu_ticks": 21, + "process_write_bytes": 8347648, + "database_storage_growth_bytes": 3740736, + "peak_rss_kib": 24676, + "replayed_observations": 64 + }, + { + "repetition": 6, + "latency_ns": 309030642, + "cpu_ticks": 21, + "process_write_bytes": 8355840, + "database_storage_growth_bytes": 3740736, + "peak_rss_kib": 24684, + "replayed_observations": 64 + }, + { + "repetition": 7, + "latency_ns": 316056567, + "cpu_ticks": 22, + "process_write_bytes": 8355840, + "database_storage_growth_bytes": 3744856, + "peak_rss_kib": 24688, + "replayed_observations": 64 + }, + { + "repetition": 8, + "latency_ns": 316854166, + "cpu_ticks": 21, + "process_write_bytes": 8351744, + "database_storage_growth_bytes": 3740736, + "peak_rss_kib": 24688, + "replayed_observations": 64 + }, + { + "repetition": 9, + "latency_ns": 305356697, + "cpu_ticks": 21, + "process_write_bytes": 8347648, + "database_storage_growth_bytes": 3740736, + "peak_rss_kib": 24688, + "replayed_observations": 64 + }, + { + "repetition": 10, + "latency_ns": 299659958, + "cpu_ticks": 22, + "process_write_bytes": 8351744, + "database_storage_growth_bytes": 3740736, + "peak_rss_kib": 24688, + "replayed_observations": 64 + }, + { + "repetition": 11, + "latency_ns": 301927175, + "cpu_ticks": 22, + "process_write_bytes": 8351744, + "database_storage_growth_bytes": 3740736, + "peak_rss_kib": 24688, + "replayed_observations": 64 + }, + { + "repetition": 12, + "latency_ns": 319192554, + "cpu_ticks": 21, + "process_write_bytes": 8347648, + "database_storage_growth_bytes": 3740736, + "peak_rss_kib": 24688, + "replayed_observations": 64 + }, + { + "repetition": 13, + "latency_ns": 322430414, + "cpu_ticks": 22, + "process_write_bytes": 8359936, + "database_storage_growth_bytes": 3740736, + "peak_rss_kib": 24692, + "replayed_observations": 64 + }, + { + "repetition": 14, + "latency_ns": 323112742, + "cpu_ticks": 21, + "process_write_bytes": 8355840, + "database_storage_growth_bytes": 3740736, + "peak_rss_kib": 24692, + "replayed_observations": 64 + }, + { + "repetition": 15, + "latency_ns": 324635470, + "cpu_ticks": 21, + "process_write_bytes": 8347648, + "database_storage_growth_bytes": 3740736, + "peak_rss_kib": 24696, + "replayed_observations": 64 + }, + { + "repetition": 16, + "latency_ns": 326140788, + "cpu_ticks": 23, + "process_write_bytes": 8347648, + "database_storage_growth_bytes": 3740736, + "peak_rss_kib": 24700, + "replayed_observations": 64 + }, + { + "repetition": 17, + "latency_ns": 329603861, + "cpu_ticks": 22, + "process_write_bytes": 8351744, + "database_storage_growth_bytes": 3740736, + "peak_rss_kib": 24700, + "replayed_observations": 64 + }, + { + "repetition": 18, + "latency_ns": 332129030, + "cpu_ticks": 22, + "process_write_bytes": 8351744, + "database_storage_growth_bytes": 3744856, + "peak_rss_kib": 24700, + "replayed_observations": 64 + }, + { + "repetition": 19, + "latency_ns": 328173544, + "cpu_ticks": 21, + "process_write_bytes": 8351744, + "database_storage_growth_bytes": 3740736, + "peak_rss_kib": 24704, + "replayed_observations": 64 + }, + { + "repetition": 20, + "latency_ns": 321653795, + "cpu_ticks": 21, + "process_write_bytes": 8347648, + "database_storage_growth_bytes": 3740736, + "peak_rss_kib": 24704, + "replayed_observations": 64 + }, + { + "repetition": 21, + "latency_ns": 336411433, + "cpu_ticks": 21, + "process_write_bytes": 8351744, + "database_storage_growth_bytes": 3740736, + "peak_rss_kib": 24704, + "replayed_observations": 64 + }, + { + "repetition": 22, + "latency_ns": 323698499, + "cpu_ticks": 22, + "process_write_bytes": 8355840, + "database_storage_growth_bytes": 3740736, + "peak_rss_kib": 24704, + "replayed_observations": 64 + }, + { + "repetition": 23, + "latency_ns": 323889432, + "cpu_ticks": 23, + "process_write_bytes": 8351744, + "database_storage_growth_bytes": 3740736, + "peak_rss_kib": 24704, + "replayed_observations": 64 + }, + { + "repetition": 24, + "latency_ns": 330364270, + "cpu_ticks": 21, + "process_write_bytes": 8351744, + "database_storage_growth_bytes": 3740736, + "peak_rss_kib": 24704, + "replayed_observations": 64 + }, + { + "repetition": 25, + "latency_ns": 341652217, + "cpu_ticks": 21, + "process_write_bytes": 8359936, + "database_storage_growth_bytes": 3740736, + "peak_rss_kib": 24704, + "replayed_observations": 64 + }, + { + "repetition": 26, + "latency_ns": 323175923, + "cpu_ticks": 21, + "process_write_bytes": 8347648, + "database_storage_growth_bytes": 3740736, + "peak_rss_kib": 24704, + "replayed_observations": 64 + }, + { + "repetition": 27, + "latency_ns": 326133519, + "cpu_ticks": 22, + "process_write_bytes": 8355840, + "database_storage_growth_bytes": 3740736, + "peak_rss_kib": 24704, + "replayed_observations": 64 + }, + { + "repetition": 28, + "latency_ns": 321922468, + "cpu_ticks": 22, + "process_write_bytes": 8347648, + "database_storage_growth_bytes": 3740736, + "peak_rss_kib": 24704, + "replayed_observations": 64 + }, + { + "repetition": 29, + "latency_ns": 324590650, + "cpu_ticks": 21, + "process_write_bytes": 8343552, + "database_storage_growth_bytes": 3740736, + "peak_rss_kib": 24704, + "replayed_observations": 64 + } + ], + "pipeline_batch_latency": { + "repetitions": 30, + "min_ns": 299659958, + "p50_ns": 323175923, + "p95_ns": 336411433, + "p99_ns": 341652217, + "max_ns": 341652217, + "mean_ns": 322250584.6, + "sample_stddev_ns": 9804393.919051789 + }, + "pipeline_records_per_second": 198.60320836792673, + "pipeline_cpu_ticks": 648, + "pipeline_cpu_ms": 6480.0, + "pipeline_process_write_bytes": 250552320, + "database_storage_growth_bytes": 112230320, + "peak_rss_kib": 24704, + "no_op_replay_raw_samples": [ + { + "repetition": 0, + "latency_ns": 217183, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 24660, + "replayed_observations": 0 + }, + { + "repetition": 1, + "latency_ns": 210192, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 24668, + "replayed_observations": 0 + }, + { + "repetition": 2, + "latency_ns": 215042, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 24668, + "replayed_observations": 0 + }, + { + "repetition": 3, + "latency_ns": 201252, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 24672, + "replayed_observations": 0 + }, + { + "repetition": 4, + "latency_ns": 193862, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 24672, + "replayed_observations": 0 + }, + { + "repetition": 5, + "latency_ns": 201503, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 24676, + "replayed_observations": 0 + }, + { + "repetition": 6, + "latency_ns": 177533, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 24684, + "replayed_observations": 0 + }, + { + "repetition": 7, + "latency_ns": 193692, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 24688, + "replayed_observations": 0 + }, + { + "repetition": 8, + "latency_ns": 180882, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 24688, + "replayed_observations": 0 + }, + { + "repetition": 9, + "latency_ns": 194262, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 24688, + "replayed_observations": 0 + }, + { + "repetition": 10, + "latency_ns": 186221, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 24688, + "replayed_observations": 0 + }, + { + "repetition": 11, + "latency_ns": 210243, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 24688, + "replayed_observations": 0 + }, + { + "repetition": 12, + "latency_ns": 183833, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 24688, + "replayed_observations": 0 + }, + { + "repetition": 13, + "latency_ns": 224762, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 24692, + "replayed_observations": 0 + }, + { + "repetition": 14, + "latency_ns": 199003, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 24692, + "replayed_observations": 0 + }, + { + "repetition": 15, + "latency_ns": 200513, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 24696, + "replayed_observations": 0 + }, + { + "repetition": 16, + "latency_ns": 184241, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 24700, + "replayed_observations": 0 + }, + { + "repetition": 17, + "latency_ns": 194962, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 24700, + "replayed_observations": 0 + }, + { + "repetition": 18, + "latency_ns": 205303, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 24700, + "replayed_observations": 0 + }, + { + "repetition": 19, + "latency_ns": 199662, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 24704, + "replayed_observations": 0 + }, + { + "repetition": 20, + "latency_ns": 192643, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 24704, + "replayed_observations": 0 + }, + { + "repetition": 21, + "latency_ns": 193682, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 24704, + "replayed_observations": 0 + }, + { + "repetition": 22, + "latency_ns": 197982, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 24704, + "replayed_observations": 0 + }, + { + "repetition": 23, + "latency_ns": 207423, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 24704, + "replayed_observations": 0 + }, + { + "repetition": 24, + "latency_ns": 217902, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 24704, + "replayed_observations": 0 + }, + { + "repetition": 25, + "latency_ns": 216762, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 24704, + "replayed_observations": 0 + }, + { + "repetition": 26, + "latency_ns": 185311, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 24704, + "replayed_observations": 0 + }, + { + "repetition": 27, + "latency_ns": 170883, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 24704, + "replayed_observations": 0 + }, + { + "repetition": 28, + "latency_ns": 172262, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 24704, + "replayed_observations": 0 + }, + { + "repetition": 29, + "latency_ns": 171492, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 24704, + "replayed_observations": 0 + } + ], + "no_op_replay_latency": { + "repetitions": 30, + "min_ns": 170883, + "p50_ns": 194962, + "p95_ns": 217902, + "p99_ns": 224762, + "max_ns": 224762, + "mean_ns": 196682.93333333332, + "sample_stddev_ns": 14565.72219390048 + }, + "no_op_replay_cpu_ticks": 1, + "no_op_replay_cpu_ms": 10.0, + "no_op_replay_process_write_bytes": 0, + "no_op_replay_database_storage_growth_bytes": 0, + "no_op_replay_observation_count_delta": 0, + "no_op_replay_totals": { + "source_bytes_scanned": 0, + "sessions_upserted": 0, + "messages_upserted": 0, + "observations_committed": 0, + "observation_duplicates": 0, + "cursor_advances": 0, + "cursor_duplicates": 0, + "records_rejected": 0, + "records_quarantined": 0, + "projections_completed": 0, + "projections_skipped": 0, + "projection_duplicates": 0, + "deferred_sources": 0 + }, + "stale_reason": "predates workload schema 3 provider-neutral PR6 baseline catalog", + "superseded_by_workload_schema_version": 3 +} diff --git a/benchmark_data/claude-observation/result-2026-07-15-b05b4cd5.json b/benchmark_data/claude-observation/result-2026-07-15-b05b4cd5.json new file mode 100644 index 0000000000..a1febbc917 --- /dev/null +++ b/benchmark_data/claude-observation/result-2026-07-15-b05b4cd5.json @@ -0,0 +1,610 @@ +{ + "schema_version": 1, + "evidence_status": "historical_stale", + "stale_reason": "predates result schema 2 provenance and complete workload-contract validation", + "superseded_by_result_schema_version": 2, + "workload_id": "pr5-observation-pipeline-v1", + "benchmark_commit": "b05b4cd570ab8e3385604c0fef31902fdc3f1e8b", + "benchmark_commit_dirty": false, + "command": "cargo test --quiet --release --lib sessions::claude_observation_benchmark::production_observation_pipeline_baseline -- --ignored --exact --nocapture --test-threads=1", + "rustc": "rustc 1.95.0 (59807616e 2026-04-14)\nbinary: rustc\ncommit-hash: 59807616e1fa2540724bfbac14d7976d7e4a3860\ncommit-date: 2026-04-14\nhost: x86_64-unknown-linux-gnu\nrelease: 1.95.0\nLLVM version: 22.1.2", + "cargo": "cargo 1.95.0 (f2d3ce0bd 2026-03-21)", + "kernel": "Linux 6.8.0-134-generic x86_64 GNU/Linux", + "cpu_model": "AMD EPYC 7742 64-Core Processor", + "logical_cpu_count": 64, + "memory_total_kib": 151845828, + "clock_ticks_per_second": 100, + "warmup_repetitions": 3, + "measured_repetitions": 30, + "records_per_repetition": 64, + "measured_records": 1920, + "pipeline_raw_samples": [ + { + "repetition": 0, + "latency_ns": 219041189, + "cpu_ticks": 14, + "process_write_bytes": 6086656, + "database_storage_growth_bytes": 3662384, + "peak_rss_kib": 22608, + "replayed_observations": 64 + }, + { + "repetition": 1, + "latency_ns": 224289055, + "cpu_ticks": 14, + "process_write_bytes": 6086656, + "database_storage_growth_bytes": 3662384, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 2, + "latency_ns": 225486160, + "cpu_ticks": 14, + "process_write_bytes": 6086656, + "database_storage_growth_bytes": 3662384, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 3, + "latency_ns": 244396900, + "cpu_ticks": 15, + "process_write_bytes": 6086656, + "database_storage_growth_bytes": 3662384, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 4, + "latency_ns": 739049127, + "cpu_ticks": 16, + "process_write_bytes": 6086656, + "database_storage_growth_bytes": 3662384, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 5, + "latency_ns": 3370435094, + "cpu_ticks": 16, + "process_write_bytes": 6086656, + "database_storage_growth_bytes": 3662384, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 6, + "latency_ns": 4614566543, + "cpu_ticks": 17, + "process_write_bytes": 6094848, + "database_storage_growth_bytes": 3662384, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 7, + "latency_ns": 2096851057, + "cpu_ticks": 15, + "process_write_bytes": 6086656, + "database_storage_growth_bytes": 3662384, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 8, + "latency_ns": 2987826623, + "cpu_ticks": 18, + "process_write_bytes": 6086656, + "database_storage_growth_bytes": 3662384, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 9, + "latency_ns": 2771079104, + "cpu_ticks": 17, + "process_write_bytes": 6094848, + "database_storage_growth_bytes": 3662384, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 10, + "latency_ns": 232640993, + "cpu_ticks": 16, + "process_write_bytes": 6094848, + "database_storage_growth_bytes": 3662384, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 11, + "latency_ns": 235013872, + "cpu_ticks": 15, + "process_write_bytes": 6086656, + "database_storage_growth_bytes": 3662384, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 12, + "latency_ns": 233610736, + "cpu_ticks": 16, + "process_write_bytes": 6086656, + "database_storage_growth_bytes": 3662384, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 13, + "latency_ns": 229740126, + "cpu_ticks": 15, + "process_write_bytes": 6086656, + "database_storage_growth_bytes": 3662384, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 14, + "latency_ns": 220311315, + "cpu_ticks": 15, + "process_write_bytes": 6086656, + "database_storage_growth_bytes": 3662384, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 15, + "latency_ns": 226531515, + "cpu_ticks": 15, + "process_write_bytes": 6086656, + "database_storage_growth_bytes": 3662384, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 16, + "latency_ns": 228577550, + "cpu_ticks": 15, + "process_write_bytes": 6098944, + "database_storage_growth_bytes": 3662384, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 17, + "latency_ns": 220189855, + "cpu_ticks": 14, + "process_write_bytes": 6086656, + "database_storage_growth_bytes": 3662384, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 18, + "latency_ns": 216654910, + "cpu_ticks": 14, + "process_write_bytes": 6086656, + "database_storage_growth_bytes": 3662384, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 19, + "latency_ns": 236413940, + "cpu_ticks": 15, + "process_write_bytes": 6086656, + "database_storage_growth_bytes": 3662384, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 20, + "latency_ns": 233536493, + "cpu_ticks": 16, + "process_write_bytes": 6094848, + "database_storage_growth_bytes": 3662384, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 21, + "latency_ns": 222939500, + "cpu_ticks": 15, + "process_write_bytes": 6086656, + "database_storage_growth_bytes": 3662384, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 22, + "latency_ns": 243860684, + "cpu_ticks": 17, + "process_write_bytes": 6094848, + "database_storage_growth_bytes": 3662384, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 23, + "latency_ns": 310223408, + "cpu_ticks": 15, + "process_write_bytes": 6086656, + "database_storage_growth_bytes": 3662384, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 24, + "latency_ns": 218581924, + "cpu_ticks": 14, + "process_write_bytes": 6086656, + "database_storage_growth_bytes": 3662384, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 25, + "latency_ns": 222249910, + "cpu_ticks": 16, + "process_write_bytes": 6086656, + "database_storage_growth_bytes": 3662384, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 26, + "latency_ns": 223959143, + "cpu_ticks": 14, + "process_write_bytes": 6086656, + "database_storage_growth_bytes": 3662384, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 27, + "latency_ns": 231468087, + "cpu_ticks": 15, + "process_write_bytes": 6086656, + "database_storage_growth_bytes": 3662384, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 28, + "latency_ns": 231116592, + "cpu_ticks": 14, + "process_write_bytes": 6086656, + "database_storage_growth_bytes": 3662384, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 29, + "latency_ns": 398754910, + "cpu_ticks": 15, + "process_write_bytes": 6086656, + "database_storage_growth_bytes": 3662384, + "peak_rss_kib": 22672, + "replayed_observations": 64 + } + ], + "pipeline_batch_latency": { + "repetitions": 30, + "min_ns": 216654910, + "p50_ns": 231468087, + "p95_ns": 3370435094, + "p99_ns": 4614566543, + "max_ns": 4614566543, + "mean_ns": 743646543.8333334, + "sample_stddev_ns": 1159889643.3399801 + }, + "pipeline_records_per_second": 86.06239150940468, + "pipeline_cpu_ticks": 457, + "pipeline_cpu_ms": 4570, + "pipeline_process_write_bytes": 182652928, + "database_storage_growth_bytes": 109871520, + "peak_rss_kib": 22672, + "no_op_replay_raw_samples": [ + { + "repetition": 0, + "latency_ns": 1903384, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 1, + "latency_ns": 1963665, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 2, + "latency_ns": 2135867, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 3, + "latency_ns": 1964025, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 4, + "latency_ns": 2000105, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 5, + "latency_ns": 1935865, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 6, + "latency_ns": 1987355, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 7, + "latency_ns": 2002674, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 8, + "latency_ns": 1991487, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 9, + "latency_ns": 2022285, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 10, + "latency_ns": 1936686, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 11, + "latency_ns": 1952126, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 12, + "latency_ns": 2128637, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 13, + "latency_ns": 1936415, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 14, + "latency_ns": 1942305, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 15, + "latency_ns": 1963875, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 16, + "latency_ns": 1947725, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 17, + "latency_ns": 1946474, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 18, + "latency_ns": 1936844, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 19, + "latency_ns": 1956144, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 20, + "latency_ns": 2031385, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 21, + "latency_ns": 2133626, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 22, + "latency_ns": 2577411, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 23, + "latency_ns": 1938495, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 24, + "latency_ns": 1918453, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 25, + "latency_ns": 1932544, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 26, + "latency_ns": 1924045, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 27, + "latency_ns": 1951425, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 28, + "latency_ns": 1946424, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 22672, + "replayed_observations": 64 + }, + { + "repetition": 29, + "latency_ns": 1935485, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 22672, + "replayed_observations": 64 + } + ], + "no_op_replay_latency": { + "repetitions": 30, + "min_ns": 1903384, + "p50_ns": 1951425, + "p95_ns": 2135867, + "p99_ns": 2577411, + "max_ns": 2577411, + "mean_ns": 1994774.5333333334, + "sample_stddev_ns": 125925.88573079427 + }, + "no_op_replay_cpu_ticks": 5, + "no_op_replay_cpu_ms": 50, + "no_op_replay_process_write_bytes": 0, + "no_op_replay_database_storage_growth_bytes": 0, + "no_op_replay_observation_count_delta": 0, + "no_op_replay_totals": { + "sessions_upserted": 0, + "messages_upserted": 0, + "observations_committed": 0, + "observation_duplicates": 0, + "cursor_advances": 0, + "cursor_duplicates": 0, + "records_rejected": 0, + "records_quarantined": 0, + "projections_completed": 0, + "projections_skipped": 0, + "projection_duplicates": 0, + "deferred_sources": 0 + } +} diff --git a/benchmark_data/claude-observation/result-2026-07-16-00d3d73a.json b/benchmark_data/claude-observation/result-2026-07-16-00d3d73a.json new file mode 100644 index 0000000000..299c0042e5 --- /dev/null +++ b/benchmark_data/claude-observation/result-2026-07-16-00d3d73a.json @@ -0,0 +1 @@ +{"schema_version":2,"workload_id":"pr5-observation-pipeline-v1","evidence_status":"historical_stale","workload_identity":{"manifest_path":"benchmarks/pr5-observation/workload-v1.json","manifest_sha256":"5a5087d7520b76cc96a3e0d058adab9a1b45fac717659ade6f8ae14ec0453736","harness_paths":["src/sessions/claude_observation_benchmark.rs","src/sessions/claude_observation_benchmark/artifact.rs","src/sessions/claude_observation_benchmark/baseline.rs","src/sessions/claude_observation_benchmark/manifest.rs","src/sessions/claude_observation_benchmark/metrics.rs","src/sessions/claude_observation_benchmark/model.rs","src/sessions/claude_observation_benchmark/runner.rs","src/sessions/claude_observation_benchmark/tests.rs"],"harness_sha256":"e1076601d5765f485c2e9fab23992e49b10729be5653e579a13cbfa636c7c717","native_fixture_paths":["tests/fixtures/provider_normalization/claude/assistant_tool_use.input.json","tests/fixtures/provider_normalization/codex/session_meta.input.json","tests/fixtures/provider_normalization/codex/agent_message.input.json","tests/fixtures/provider_normalization/cursor/tool_use.input.json","tests/fixtures/provider_normalization/hermes/assistant_tool_call.input.json","tests/fixtures/provider_normalization/kiro/workspace_session.input.json","tests/fixtures/transcript_golden/cline_like/input/api_conversation_history.json","tests/fixtures/transcript_golden/cline_like/input/task_metadata.json"],"native_fixtures_sha256":"a33854bc6c64bd964ee4665459296346fe522f0fe4f7bc9911bb3c5474de77d5"},"build_identity":{"commit":"00d3d73a06403480487207986506f9b3c4d1df43","tree":"5aeb6a052cfaf31ff2a59936ede6ed76aab065be","profile":"release","source_mode":"git_archive_read_only_v1","source_manifest_sha256":"c01b85f76ca764e94651bca1b9f36a7d80362521798ab4b5993818ec2fb94741","source_file_count":1578,"target_triple":"x86_64-unknown-linux-gnu","rustc_version":"rustc 1.95.0 (59807616e 2026-04-14)\nbinary: rustc\ncommit-hash: 59807616e1fa2540724bfbac14d7976d7e4a3860\ncommit-date: 2026-04-14\nhost: x86_64-unknown-linux-gnu\nrelease: 1.95.0\nLLVM version: 22.1.2","cargo_version":"cargo 1.95.0 (f2d3ce0bd 2026-03-21)","rustflags":"normalized-empty","rustc_wrapper":"environment:none;cargo_config:36aad4637b36949700f277b0b6d18d647d507944","rustc_workspace_wrapper":"environment:none;cargo_config:36aad4637b36949700f277b0b6d18d647d507944","cargo_config_identity":"36aad4637b36949700f277b0b6d18d647d507944","data_root_basis":"current_executable_parent","executable_sha256":"58f2728a654614b22acd30f043ea13e15384e467a0eabfe059a1707ac0867b1d","executable_size_bytes":216496488},"git_before":{"commit":"00d3d73a06403480487207986506f9b3c4d1df43","tree":"5aeb6a052cfaf31ff2a59936ede6ed76aab065be","dirty":false},"git_after":{"commit":"00d3d73a06403480487207986506f9b3c4d1df43","tree":"5aeb6a052cfaf31ff2a59936ede6ed76aab065be","dirty":false},"command":"cargo test --quiet --release --lib sessions::claude_observation_benchmark::production_observation_pipeline_baseline -- --ignored --exact --nocapture --test-threads=1","rustc":"rustc 1.95.0 (59807616e 2026-04-14)\nbinary: rustc\ncommit-hash: 59807616e1fa2540724bfbac14d7976d7e4a3860\ncommit-date: 2026-04-14\nhost: x86_64-unknown-linux-gnu\nrelease: 1.95.0\nLLVM version: 22.1.2","cargo":"cargo 1.95.0 (f2d3ce0bd 2026-03-21)","kernel":"Linux 6.8.0-134-generic x86_64 GNU/Linux","cpu_identity":"AMD EPYC 7742 64-Core Processor","logical_cpu_count":64,"memory_total_kib":151845828,"clock_ticks_per_second":100,"warmup_repetitions":3,"measured_repetitions":30,"records_per_repetition":64,"measured_records":1920,"pipeline_raw_samples":[{"repetition":0,"latency_ns":634975519,"cpu_ticks":42,"process_write_bytes":11186176,"database_storage_growth_bytes":4663640,"peak_rss_kib":57244,"replayed_observations":64},{"repetition":1,"latency_ns":622204388,"cpu_ticks":42,"process_write_bytes":11190272,"database_storage_growth_bytes":4663640,"peak_rss_kib":57244,"replayed_observations":64},{"repetition":2,"latency_ns":622911186,"cpu_ticks":42,"process_write_bytes":11177984,"database_storage_growth_bytes":4659520,"peak_rss_kib":57244,"replayed_observations":64},{"repetition":3,"latency_ns":623357379,"cpu_ticks":42,"process_write_bytes":11177984,"database_storage_growth_bytes":4659520,"peak_rss_kib":57244,"replayed_observations":64},{"repetition":4,"latency_ns":624971339,"cpu_ticks":43,"process_write_bytes":11182080,"database_storage_growth_bytes":4659520,"peak_rss_kib":57244,"replayed_observations":64},{"repetition":5,"latency_ns":631135678,"cpu_ticks":42,"process_write_bytes":11186176,"database_storage_growth_bytes":4663640,"peak_rss_kib":57244,"replayed_observations":64},{"repetition":6,"latency_ns":633120180,"cpu_ticks":41,"process_write_bytes":11186176,"database_storage_growth_bytes":4663640,"peak_rss_kib":57244,"replayed_observations":64},{"repetition":7,"latency_ns":602008763,"cpu_ticks":41,"process_write_bytes":11182080,"database_storage_growth_bytes":4659520,"peak_rss_kib":57244,"replayed_observations":64},{"repetition":8,"latency_ns":595534721,"cpu_ticks":42,"process_write_bytes":11182080,"database_storage_growth_bytes":4659520,"peak_rss_kib":57244,"replayed_observations":64},{"repetition":9,"latency_ns":588208239,"cpu_ticks":42,"process_write_bytes":11182080,"database_storage_growth_bytes":4659520,"peak_rss_kib":57244,"replayed_observations":64},{"repetition":10,"latency_ns":620910816,"cpu_ticks":42,"process_write_bytes":11186176,"database_storage_growth_bytes":4659520,"peak_rss_kib":57244,"replayed_observations":64},{"repetition":11,"latency_ns":625608037,"cpu_ticks":42,"process_write_bytes":11182080,"database_storage_growth_bytes":4659520,"peak_rss_kib":57244,"replayed_observations":64},{"repetition":12,"latency_ns":599879170,"cpu_ticks":42,"process_write_bytes":11186176,"database_storage_growth_bytes":4663640,"peak_rss_kib":57244,"replayed_observations":64},{"repetition":13,"latency_ns":618583500,"cpu_ticks":42,"process_write_bytes":11182080,"database_storage_growth_bytes":4659520,"peak_rss_kib":57244,"replayed_observations":64},{"repetition":14,"latency_ns":642453046,"cpu_ticks":42,"process_write_bytes":11182080,"database_storage_growth_bytes":4659520,"peak_rss_kib":57244,"replayed_observations":64},{"repetition":15,"latency_ns":617555608,"cpu_ticks":43,"process_write_bytes":11186176,"database_storage_growth_bytes":4663640,"peak_rss_kib":57244,"replayed_observations":64},{"repetition":16,"latency_ns":610977864,"cpu_ticks":42,"process_write_bytes":11186176,"database_storage_growth_bytes":4659520,"peak_rss_kib":57244,"replayed_observations":64},{"repetition":17,"latency_ns":646779174,"cpu_ticks":42,"process_write_bytes":11182080,"database_storage_growth_bytes":4659520,"peak_rss_kib":57244,"replayed_observations":64},{"repetition":18,"latency_ns":607176093,"cpu_ticks":42,"process_write_bytes":11182080,"database_storage_growth_bytes":4659520,"peak_rss_kib":57244,"replayed_observations":64},{"repetition":19,"latency_ns":614655477,"cpu_ticks":41,"process_write_bytes":11182080,"database_storage_growth_bytes":4659520,"peak_rss_kib":57244,"replayed_observations":64},{"repetition":20,"latency_ns":644226286,"cpu_ticks":44,"process_write_bytes":11182080,"database_storage_growth_bytes":4659520,"peak_rss_kib":57244,"replayed_observations":64},{"repetition":21,"latency_ns":620126779,"cpu_ticks":42,"process_write_bytes":11182080,"database_storage_growth_bytes":4659520,"peak_rss_kib":57244,"replayed_observations":64},{"repetition":22,"latency_ns":617688901,"cpu_ticks":42,"process_write_bytes":11186176,"database_storage_growth_bytes":4659520,"peak_rss_kib":57244,"replayed_observations":64},{"repetition":23,"latency_ns":633288925,"cpu_ticks":41,"process_write_bytes":11182080,"database_storage_growth_bytes":4659520,"peak_rss_kib":57244,"replayed_observations":64},{"repetition":24,"latency_ns":624101613,"cpu_ticks":42,"process_write_bytes":11182080,"database_storage_growth_bytes":4659520,"peak_rss_kib":57244,"replayed_observations":64},{"repetition":25,"latency_ns":637082058,"cpu_ticks":41,"process_write_bytes":11190272,"database_storage_growth_bytes":4663640,"peak_rss_kib":57244,"replayed_observations":64},{"repetition":26,"latency_ns":625915222,"cpu_ticks":42,"process_write_bytes":11186176,"database_storage_growth_bytes":4659520,"peak_rss_kib":57244,"replayed_observations":64},{"repetition":27,"latency_ns":630808628,"cpu_ticks":42,"process_write_bytes":11177984,"database_storage_growth_bytes":4659520,"peak_rss_kib":57244,"replayed_observations":64},{"repetition":28,"latency_ns":628959707,"cpu_ticks":40,"process_write_bytes":11182080,"database_storage_growth_bytes":4659520,"peak_rss_kib":57244,"replayed_observations":64},{"repetition":29,"latency_ns":634363216,"cpu_ticks":42,"process_write_bytes":11194368,"database_storage_growth_bytes":4663640,"peak_rss_kib":57244,"replayed_observations":64}],"pipeline_batch_latency":{"repetitions":30,"min_ns":588208239,"p50_ns":623357379,"p95_ns":644226286,"p99_ns":646779174,"max_ns":646779174,"mean_ns":622652250.4,"sample_stddev_ns":14078982.721782794},"pipeline_records_per_second":102.78610566152383,"pipeline_cpu_ticks":1257,"pipeline_cpu_ms":12570.0,"pipeline_process_write_bytes":335515648,"database_storage_growth_bytes":139818560,"peak_rss_kib":57244,"no_op_replay_raw_samples":[{"repetition":0,"latency_ns":198442,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":57244,"replayed_observations":0},{"repetition":1,"latency_ns":206912,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":57244,"replayed_observations":0},{"repetition":2,"latency_ns":192862,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":57244,"replayed_observations":0},{"repetition":3,"latency_ns":210622,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":57244,"replayed_observations":0},{"repetition":4,"latency_ns":196823,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":57244,"replayed_observations":0},{"repetition":5,"latency_ns":194992,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":57244,"replayed_observations":0},{"repetition":6,"latency_ns":198172,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":57244,"replayed_observations":0},{"repetition":7,"latency_ns":190662,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":57244,"replayed_observations":0},{"repetition":8,"latency_ns":196622,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":57244,"replayed_observations":0},{"repetition":9,"latency_ns":219283,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":57244,"replayed_observations":0},{"repetition":10,"latency_ns":206733,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":57244,"replayed_observations":0},{"repetition":11,"latency_ns":196972,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":57244,"replayed_observations":0},{"repetition":12,"latency_ns":214862,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":57244,"replayed_observations":0},{"repetition":13,"latency_ns":212592,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":57244,"replayed_observations":0},{"repetition":14,"latency_ns":204611,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":57244,"replayed_observations":0},{"repetition":15,"latency_ns":208172,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":57244,"replayed_observations":0},{"repetition":16,"latency_ns":199333,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":57244,"replayed_observations":0},{"repetition":17,"latency_ns":228572,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":57244,"replayed_observations":0},{"repetition":18,"latency_ns":191601,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":57244,"replayed_observations":0},{"repetition":19,"latency_ns":212542,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":57244,"replayed_observations":0},{"repetition":20,"latency_ns":223992,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":57244,"replayed_observations":0},{"repetition":21,"latency_ns":216013,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":57244,"replayed_observations":0},{"repetition":22,"latency_ns":214633,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":57244,"replayed_observations":0},{"repetition":23,"latency_ns":219042,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":57244,"replayed_observations":0},{"repetition":24,"latency_ns":193092,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":57244,"replayed_observations":0},{"repetition":25,"latency_ns":188452,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":57244,"replayed_observations":0},{"repetition":26,"latency_ns":186842,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":57244,"replayed_observations":0},{"repetition":27,"latency_ns":189192,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":57244,"replayed_observations":0},{"repetition":28,"latency_ns":212552,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":57244,"replayed_observations":0},{"repetition":29,"latency_ns":221772,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":57244,"replayed_observations":0}],"no_op_replay_latency":{"repetitions":30,"min_ns":186842,"p50_ns":204611,"p95_ns":223992,"p99_ns":228572,"max_ns":228572,"mean_ns":204898.8,"sample_stddev_ns":11862.681968082179},"no_op_replay_cpu_ticks":0,"no_op_replay_cpu_ms":0.0,"no_op_replay_process_write_bytes":0,"no_op_replay_database_storage_growth_bytes":0,"no_op_replay_observation_count_delta":0,"no_op_replay_totals":{"source_bytes_scanned":0,"sessions_upserted":0,"messages_upserted":0,"observations_committed":0,"observation_duplicates":0,"cursor_advances":0,"cursor_duplicates":0,"records_rejected":0,"records_quarantined":0,"projections_completed":0,"projections_skipped":0,"projection_duplicates":0,"deferred_sources":0},"provider_observation_performance":{"schema_version":1,"workload_id":"pr5-observation-pipeline-v1","fairness":{"policy":"round_robin_v1","rounds":30,"providers_per_round":8,"max_provider_turn_distance":8,"turns":[{"round":0,"position":0,"provider":"claude"},{"round":0,"position":1,"provider":"codex"},{"round":0,"position":2,"provider":"cursor"},{"round":0,"position":3,"provider":"hermes"},{"round":0,"position":4,"provider":"kiro"},{"round":0,"position":5,"provider":"cline"},{"round":0,"position":6,"provider":"roo-code"},{"round":0,"position":7,"provider":"kilo"},{"round":1,"position":0,"provider":"claude"},{"round":1,"position":1,"provider":"codex"},{"round":1,"position":2,"provider":"cursor"},{"round":1,"position":3,"provider":"hermes"},{"round":1,"position":4,"provider":"kiro"},{"round":1,"position":5,"provider":"cline"},{"round":1,"position":6,"provider":"roo-code"},{"round":1,"position":7,"provider":"kilo"},{"round":2,"position":0,"provider":"claude"},{"round":2,"position":1,"provider":"codex"},{"round":2,"position":2,"provider":"cursor"},{"round":2,"position":3,"provider":"hermes"},{"round":2,"position":4,"provider":"kiro"},{"round":2,"position":5,"provider":"cline"},{"round":2,"position":6,"provider":"roo-code"},{"round":2,"position":7,"provider":"kilo"},{"round":3,"position":0,"provider":"claude"},{"round":3,"position":1,"provider":"codex"},{"round":3,"position":2,"provider":"cursor"},{"round":3,"position":3,"provider":"hermes"},{"round":3,"position":4,"provider":"kiro"},{"round":3,"position":5,"provider":"cline"},{"round":3,"position":6,"provider":"roo-code"},{"round":3,"position":7,"provider":"kilo"},{"round":4,"position":0,"provider":"claude"},{"round":4,"position":1,"provider":"codex"},{"round":4,"position":2,"provider":"cursor"},{"round":4,"position":3,"provider":"hermes"},{"round":4,"position":4,"provider":"kiro"},{"round":4,"position":5,"provider":"cline"},{"round":4,"position":6,"provider":"roo-code"},{"round":4,"position":7,"provider":"kilo"},{"round":5,"position":0,"provider":"claude"},{"round":5,"position":1,"provider":"codex"},{"round":5,"position":2,"provider":"cursor"},{"round":5,"position":3,"provider":"hermes"},{"round":5,"position":4,"provider":"kiro"},{"round":5,"position":5,"provider":"cline"},{"round":5,"position":6,"provider":"roo-code"},{"round":5,"position":7,"provider":"kilo"},{"round":6,"position":0,"provider":"claude"},{"round":6,"position":1,"provider":"codex"},{"round":6,"position":2,"provider":"cursor"},{"round":6,"position":3,"provider":"hermes"},{"round":6,"position":4,"provider":"kiro"},{"round":6,"position":5,"provider":"cline"},{"round":6,"position":6,"provider":"roo-code"},{"round":6,"position":7,"provider":"kilo"},{"round":7,"position":0,"provider":"claude"},{"round":7,"position":1,"provider":"codex"},{"round":7,"position":2,"provider":"cursor"},{"round":7,"position":3,"provider":"hermes"},{"round":7,"position":4,"provider":"kiro"},{"round":7,"position":5,"provider":"cline"},{"round":7,"position":6,"provider":"roo-code"},{"round":7,"position":7,"provider":"kilo"},{"round":8,"position":0,"provider":"claude"},{"round":8,"position":1,"provider":"codex"},{"round":8,"position":2,"provider":"cursor"},{"round":8,"position":3,"provider":"hermes"},{"round":8,"position":4,"provider":"kiro"},{"round":8,"position":5,"provider":"cline"},{"round":8,"position":6,"provider":"roo-code"},{"round":8,"position":7,"provider":"kilo"},{"round":9,"position":0,"provider":"claude"},{"round":9,"position":1,"provider":"codex"},{"round":9,"position":2,"provider":"cursor"},{"round":9,"position":3,"provider":"hermes"},{"round":9,"position":4,"provider":"kiro"},{"round":9,"position":5,"provider":"cline"},{"round":9,"position":6,"provider":"roo-code"},{"round":9,"position":7,"provider":"kilo"},{"round":10,"position":0,"provider":"claude"},{"round":10,"position":1,"provider":"codex"},{"round":10,"position":2,"provider":"cursor"},{"round":10,"position":3,"provider":"hermes"},{"round":10,"position":4,"provider":"kiro"},{"round":10,"position":5,"provider":"cline"},{"round":10,"position":6,"provider":"roo-code"},{"round":10,"position":7,"provider":"kilo"},{"round":11,"position":0,"provider":"claude"},{"round":11,"position":1,"provider":"codex"},{"round":11,"position":2,"provider":"cursor"},{"round":11,"position":3,"provider":"hermes"},{"round":11,"position":4,"provider":"kiro"},{"round":11,"position":5,"provider":"cline"},{"round":11,"position":6,"provider":"roo-code"},{"round":11,"position":7,"provider":"kilo"},{"round":12,"position":0,"provider":"claude"},{"round":12,"position":1,"provider":"codex"},{"round":12,"position":2,"provider":"cursor"},{"round":12,"position":3,"provider":"hermes"},{"round":12,"position":4,"provider":"kiro"},{"round":12,"position":5,"provider":"cline"},{"round":12,"position":6,"provider":"roo-code"},{"round":12,"position":7,"provider":"kilo"},{"round":13,"position":0,"provider":"claude"},{"round":13,"position":1,"provider":"codex"},{"round":13,"position":2,"provider":"cursor"},{"round":13,"position":3,"provider":"hermes"},{"round":13,"position":4,"provider":"kiro"},{"round":13,"position":5,"provider":"cline"},{"round":13,"position":6,"provider":"roo-code"},{"round":13,"position":7,"provider":"kilo"},{"round":14,"position":0,"provider":"claude"},{"round":14,"position":1,"provider":"codex"},{"round":14,"position":2,"provider":"cursor"},{"round":14,"position":3,"provider":"hermes"},{"round":14,"position":4,"provider":"kiro"},{"round":14,"position":5,"provider":"cline"},{"round":14,"position":6,"provider":"roo-code"},{"round":14,"position":7,"provider":"kilo"},{"round":15,"position":0,"provider":"claude"},{"round":15,"position":1,"provider":"codex"},{"round":15,"position":2,"provider":"cursor"},{"round":15,"position":3,"provider":"hermes"},{"round":15,"position":4,"provider":"kiro"},{"round":15,"position":5,"provider":"cline"},{"round":15,"position":6,"provider":"roo-code"},{"round":15,"position":7,"provider":"kilo"},{"round":16,"position":0,"provider":"claude"},{"round":16,"position":1,"provider":"codex"},{"round":16,"position":2,"provider":"cursor"},{"round":16,"position":3,"provider":"hermes"},{"round":16,"position":4,"provider":"kiro"},{"round":16,"position":5,"provider":"cline"},{"round":16,"position":6,"provider":"roo-code"},{"round":16,"position":7,"provider":"kilo"},{"round":17,"position":0,"provider":"claude"},{"round":17,"position":1,"provider":"codex"},{"round":17,"position":2,"provider":"cursor"},{"round":17,"position":3,"provider":"hermes"},{"round":17,"position":4,"provider":"kiro"},{"round":17,"position":5,"provider":"cline"},{"round":17,"position":6,"provider":"roo-code"},{"round":17,"position":7,"provider":"kilo"},{"round":18,"position":0,"provider":"claude"},{"round":18,"position":1,"provider":"codex"},{"round":18,"position":2,"provider":"cursor"},{"round":18,"position":3,"provider":"hermes"},{"round":18,"position":4,"provider":"kiro"},{"round":18,"position":5,"provider":"cline"},{"round":18,"position":6,"provider":"roo-code"},{"round":18,"position":7,"provider":"kilo"},{"round":19,"position":0,"provider":"claude"},{"round":19,"position":1,"provider":"codex"},{"round":19,"position":2,"provider":"cursor"},{"round":19,"position":3,"provider":"hermes"},{"round":19,"position":4,"provider":"kiro"},{"round":19,"position":5,"provider":"cline"},{"round":19,"position":6,"provider":"roo-code"},{"round":19,"position":7,"provider":"kilo"},{"round":20,"position":0,"provider":"claude"},{"round":20,"position":1,"provider":"codex"},{"round":20,"position":2,"provider":"cursor"},{"round":20,"position":3,"provider":"hermes"},{"round":20,"position":4,"provider":"kiro"},{"round":20,"position":5,"provider":"cline"},{"round":20,"position":6,"provider":"roo-code"},{"round":20,"position":7,"provider":"kilo"},{"round":21,"position":0,"provider":"claude"},{"round":21,"position":1,"provider":"codex"},{"round":21,"position":2,"provider":"cursor"},{"round":21,"position":3,"provider":"hermes"},{"round":21,"position":4,"provider":"kiro"},{"round":21,"position":5,"provider":"cline"},{"round":21,"position":6,"provider":"roo-code"},{"round":21,"position":7,"provider":"kilo"},{"round":22,"position":0,"provider":"claude"},{"round":22,"position":1,"provider":"codex"},{"round":22,"position":2,"provider":"cursor"},{"round":22,"position":3,"provider":"hermes"},{"round":22,"position":4,"provider":"kiro"},{"round":22,"position":5,"provider":"cline"},{"round":22,"position":6,"provider":"roo-code"},{"round":22,"position":7,"provider":"kilo"},{"round":23,"position":0,"provider":"claude"},{"round":23,"position":1,"provider":"codex"},{"round":23,"position":2,"provider":"cursor"},{"round":23,"position":3,"provider":"hermes"},{"round":23,"position":4,"provider":"kiro"},{"round":23,"position":5,"provider":"cline"},{"round":23,"position":6,"provider":"roo-code"},{"round":23,"position":7,"provider":"kilo"},{"round":24,"position":0,"provider":"claude"},{"round":24,"position":1,"provider":"codex"},{"round":24,"position":2,"provider":"cursor"},{"round":24,"position":3,"provider":"hermes"},{"round":24,"position":4,"provider":"kiro"},{"round":24,"position":5,"provider":"cline"},{"round":24,"position":6,"provider":"roo-code"},{"round":24,"position":7,"provider":"kilo"},{"round":25,"position":0,"provider":"claude"},{"round":25,"position":1,"provider":"codex"},{"round":25,"position":2,"provider":"cursor"},{"round":25,"position":3,"provider":"hermes"},{"round":25,"position":4,"provider":"kiro"},{"round":25,"position":5,"provider":"cline"},{"round":25,"position":6,"provider":"roo-code"},{"round":25,"position":7,"provider":"kilo"},{"round":26,"position":0,"provider":"claude"},{"round":26,"position":1,"provider":"codex"},{"round":26,"position":2,"provider":"cursor"},{"round":26,"position":3,"provider":"hermes"},{"round":26,"position":4,"provider":"kiro"},{"round":26,"position":5,"provider":"cline"},{"round":26,"position":6,"provider":"roo-code"},{"round":26,"position":7,"provider":"kilo"},{"round":27,"position":0,"provider":"claude"},{"round":27,"position":1,"provider":"codex"},{"round":27,"position":2,"provider":"cursor"},{"round":27,"position":3,"provider":"hermes"},{"round":27,"position":4,"provider":"kiro"},{"round":27,"position":5,"provider":"cline"},{"round":27,"position":6,"provider":"roo-code"},{"round":27,"position":7,"provider":"kilo"},{"round":28,"position":0,"provider":"claude"},{"round":28,"position":1,"provider":"codex"},{"round":28,"position":2,"provider":"cursor"},{"round":28,"position":3,"provider":"hermes"},{"round":28,"position":4,"provider":"kiro"},{"round":28,"position":5,"provider":"cline"},{"round":28,"position":6,"provider":"roo-code"},{"round":28,"position":7,"provider":"kilo"},{"round":29,"position":0,"provider":"claude"},{"round":29,"position":1,"provider":"codex"},{"round":29,"position":2,"provider":"cursor"},{"round":29,"position":3,"provider":"hermes"},{"round":29,"position":4,"provider":"kiro"},{"round":29,"position":5,"provider":"cline"},{"round":29,"position":6,"provider":"roo-code"},{"round":29,"position":7,"provider":"kilo"}]},"providers":[{"provider":"claude","production_path":"claude_production_observation_pipeline_v1","pipeline_scope":"production_parse_normalize_sanitize_commit_project_and_replay","measured_repetitions":30,"observations_per_repetition":8,"replay_limit":9,"max_backlog_records":8,"parse":{"scope":"native_provider_format_decode","raw_samples":[{"repetition":0,"latency_ns":52532,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":58972,"record_count":8},{"repetition":1,"latency_ns":39731,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":2,"latency_ns":41540,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":3,"latency_ns":42090,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":4,"latency_ns":86331,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":5,"latency_ns":54311,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":6,"latency_ns":41321,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":7,"latency_ns":44790,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":8,"latency_ns":45071,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":9,"latency_ns":41131,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":10,"latency_ns":41310,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":11,"latency_ns":60051,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":12,"latency_ns":41999,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":13,"latency_ns":42081,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":14,"latency_ns":43461,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":15,"latency_ns":41031,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":16,"latency_ns":44661,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":17,"latency_ns":39699,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":18,"latency_ns":42501,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":19,"latency_ns":40531,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":20,"latency_ns":41351,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":21,"latency_ns":39591,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":22,"latency_ns":47401,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":23,"latency_ns":59551,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":24,"latency_ns":51331,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":25,"latency_ns":49721,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":26,"latency_ns":44121,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":27,"latency_ns":48142,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":28,"latency_ns":47150,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":29,"latency_ns":42940,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8}],"latency":{"repetitions":30,"min_ns":39591,"p50_ns":42940,"p95_ns":60051,"p99_ns":86331,"max_ns":86331,"mean_ns":46582.4,"sample_stddev_ns":9331.983263357592},"cpu_ticks":1,"cpu_ms":10.0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724},"commit":{"scope":"production_adapter_parse_normalize_sanitize_commit_and_project","raw_samples":[{"repetition":0,"latency_ns":77982440,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":59164,"record_count":8},{"repetition":1,"latency_ns":75373751,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"record_count":8},{"repetition":2,"latency_ns":74984326,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"record_count":8},{"repetition":3,"latency_ns":74677374,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"record_count":8},{"repetition":4,"latency_ns":74356460,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"record_count":8},{"repetition":5,"latency_ns":75537633,"cpu_ticks":4,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"record_count":8},{"repetition":6,"latency_ns":72646980,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"record_count":8},{"repetition":7,"latency_ns":71482238,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"record_count":8},{"repetition":8,"latency_ns":81967665,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"record_count":8},{"repetition":9,"latency_ns":74998117,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"record_count":8},{"repetition":10,"latency_ns":77879929,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"record_count":8},{"repetition":11,"latency_ns":77200463,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"record_count":8},{"repetition":12,"latency_ns":74028565,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"record_count":8},{"repetition":13,"latency_ns":78506766,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"record_count":8},{"repetition":14,"latency_ns":77110150,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"record_count":8},{"repetition":15,"latency_ns":74317760,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"record_count":8},{"repetition":16,"latency_ns":77821740,"cpu_ticks":4,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"record_count":8},{"repetition":17,"latency_ns":80648510,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"record_count":8},{"repetition":18,"latency_ns":72575730,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"record_count":8},{"repetition":19,"latency_ns":74770386,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"record_count":8},{"repetition":20,"latency_ns":73694531,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"record_count":8},{"repetition":21,"latency_ns":75892887,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"record_count":8},{"repetition":22,"latency_ns":73809034,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"record_count":8},{"repetition":23,"latency_ns":76068549,"cpu_ticks":4,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"record_count":8},{"repetition":24,"latency_ns":76758857,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"record_count":8},{"repetition":25,"latency_ns":76707837,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"record_count":8},{"repetition":26,"latency_ns":73072166,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"record_count":8},{"repetition":27,"latency_ns":76492174,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"record_count":8},{"repetition":28,"latency_ns":85755288,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"record_count":8},{"repetition":29,"latency_ns":79214015,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"record_count":8}],"latency":{"repetitions":30,"min_ns":71482238,"p50_ns":75537633,"p95_ns":81967665,"p99_ns":85755288,"max_ns":85755288,"mean_ns":76211077.36666666,"sample_stddev_ns":2993342.4330868167},"cpu_ticks":154,"cpu_ms":1540.0,"process_write_bytes":38952960,"database_storage_growth_bytes":36956400,"peak_rss_kib":61724},"replay":{"scope":"authoritative_store_bounded_replay","raw_samples":[{"repetition":0,"latency_ns":305223,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":59164,"record_count":8},{"repetition":1,"latency_ns":303243,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":2,"latency_ns":329704,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":3,"latency_ns":311014,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":4,"latency_ns":307393,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":5,"latency_ns":304823,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":6,"latency_ns":304713,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":7,"latency_ns":330494,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":8,"latency_ns":307244,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":9,"latency_ns":310534,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":10,"latency_ns":328513,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":11,"latency_ns":301653,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":12,"latency_ns":307312,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":13,"latency_ns":307153,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":14,"latency_ns":307243,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":15,"latency_ns":304724,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":16,"latency_ns":302123,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":17,"latency_ns":303053,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":18,"latency_ns":311164,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":19,"latency_ns":340724,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":20,"latency_ns":312744,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":21,"latency_ns":303474,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":22,"latency_ns":349254,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":23,"latency_ns":303313,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":24,"latency_ns":307504,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":25,"latency_ns":310462,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":26,"latency_ns":361924,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":27,"latency_ns":319673,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":28,"latency_ns":311833,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":29,"latency_ns":330514,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8}],"latency":{"repetitions":30,"min_ns":301653,"p50_ns":307393,"p95_ns":349254,"p99_ns":361924,"max_ns":361924,"mean_ns":314624.73333333334,"sample_stddev_ns":15177.510842516722},"cpu_ticks":1,"cpu_ms":10.0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724},"pipeline_raw_samples":[{"repetition":0,"latency_ns":78477706,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":59164,"replayed_observations":8},{"repetition":1,"latency_ns":75837297,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":2,"latency_ns":75472992,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":3,"latency_ns":75178180,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":4,"latency_ns":74861826,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":5,"latency_ns":76011009,"cpu_ticks":4,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":6,"latency_ns":73114075,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":7,"latency_ns":71977184,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":8,"latency_ns":82459431,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":9,"latency_ns":75498662,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":10,"latency_ns":78368675,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":11,"latency_ns":77664777,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":12,"latency_ns":74504473,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":13,"latency_ns":78989542,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":14,"latency_ns":77598876,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":15,"latency_ns":74790314,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":16,"latency_ns":78286774,"cpu_ticks":4,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":17,"latency_ns":81117445,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":18,"latency_ns":73073646,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":19,"latency_ns":75289370,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":20,"latency_ns":74188849,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":21,"latency_ns":76359102,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":22,"latency_ns":74343249,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":23,"latency_ns":76556935,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":24,"latency_ns":77258672,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":25,"latency_ns":77203893,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":26,"latency_ns":73609842,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":27,"latency_ns":76991440,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":28,"latency_ns":86245472,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":29,"latency_ns":79708570,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61724,"replayed_observations":8}],"pipeline_latency":{"repetitions":30,"min_ns":71977184,"p50_ns":76011009,"p95_ns":82459431,"p99_ns":86245472,"max_ns":86245472,"mean_ns":76701275.93333334,"sample_stddev_ns":2989213.442971613},"pipeline_records_per_second":104.30074210177915,"pipeline_cpu_ticks":156,"pipeline_cpu_ms":1560.0,"pipeline_process_write_bytes":38952960,"pipeline_database_storage_growth_bytes":36956400,"peak_rss_kib":61724,"no_op_raw_samples":[{"repetition":0,"latency_ns":202182,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":59164,"replayed_observations":0},{"repetition":1,"latency_ns":191032,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":2,"latency_ns":191632,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":3,"latency_ns":260394,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":4,"latency_ns":231974,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":5,"latency_ns":209402,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":6,"latency_ns":195343,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":7,"latency_ns":195072,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":8,"latency_ns":195311,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":9,"latency_ns":195612,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":10,"latency_ns":190793,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":11,"latency_ns":219172,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":12,"latency_ns":208993,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":13,"latency_ns":209803,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":14,"latency_ns":194213,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":15,"latency_ns":216993,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":16,"latency_ns":215753,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":17,"latency_ns":220423,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":18,"latency_ns":191661,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":19,"latency_ns":197903,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":20,"latency_ns":190803,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":21,"latency_ns":216042,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":22,"latency_ns":243783,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":23,"latency_ns":242092,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":24,"latency_ns":261374,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":25,"latency_ns":226882,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":26,"latency_ns":232513,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":27,"latency_ns":212882,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":28,"latency_ns":227542,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":29,"latency_ns":193362,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0}],"no_op_latency":{"repetitions":30,"min_ns":190793,"p50_ns":209402,"p95_ns":260394,"p99_ns":261374,"max_ns":261374,"mean_ns":212697.86666666667,"sample_stddev_ns":20678.12725251647},"no_op_cpu_ticks":0,"no_op_cpu_ms":0.0,"no_op_process_write_bytes":0,"no_op_database_storage_growth_bytes":0,"no_op_observation_count_delta":0},{"provider":"codex","production_path":"codex_production_observation_pipeline_v1","pipeline_scope":"production_parse_normalize_sanitize_commit_project_and_replay","measured_repetitions":30,"observations_per_repetition":8,"replay_limit":9,"max_backlog_records":8,"parse":{"scope":"native_provider_format_decode","raw_samples":[{"repetition":0,"latency_ns":19540,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":59164,"record_count":8},{"repetition":1,"latency_ns":19129,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":2,"latency_ns":17360,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":3,"latency_ns":18500,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":4,"latency_ns":26220,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":5,"latency_ns":19070,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":6,"latency_ns":20430,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":7,"latency_ns":29960,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":8,"latency_ns":19820,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":9,"latency_ns":20781,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":10,"latency_ns":18191,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":11,"latency_ns":18800,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":12,"latency_ns":19750,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":13,"latency_ns":19000,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":14,"latency_ns":19861,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":15,"latency_ns":27071,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":16,"latency_ns":17840,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":17,"latency_ns":19329,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":18,"latency_ns":17170,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":19,"latency_ns":20311,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":20,"latency_ns":18930,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":21,"latency_ns":19130,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":22,"latency_ns":20380,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":23,"latency_ns":22160,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":24,"latency_ns":25080,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":25,"latency_ns":27179,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":26,"latency_ns":37080,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":27,"latency_ns":20381,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":28,"latency_ns":18680,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":29,"latency_ns":19530,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8}],"latency":{"repetitions":30,"min_ns":17170,"p50_ns":19540,"p95_ns":29960,"p99_ns":37080,"max_ns":37080,"mean_ns":21222.1,"sample_stddev_ns":4362.346950976006},"cpu_ticks":0,"cpu_ms":0.0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724},"commit":{"scope":"production_adapter_parse_normalize_sanitize_commit_and_project","raw_samples":[{"repetition":0,"latency_ns":75416161,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":59804,"record_count":8},{"repetition":1,"latency_ns":75377982,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"record_count":8},{"repetition":2,"latency_ns":75157479,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"record_count":8},{"repetition":3,"latency_ns":72375378,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"record_count":8},{"repetition":4,"latency_ns":79476927,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"record_count":8},{"repetition":5,"latency_ns":74491022,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"record_count":8},{"repetition":6,"latency_ns":72231207,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"record_count":8},{"repetition":7,"latency_ns":71307026,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"record_count":8},{"repetition":8,"latency_ns":80552089,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"record_count":8},{"repetition":9,"latency_ns":83392731,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"record_count":8},{"repetition":10,"latency_ns":77123761,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"record_count":8},{"repetition":11,"latency_ns":76404893,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"record_count":8},{"repetition":12,"latency_ns":74646364,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"record_count":8},{"repetition":13,"latency_ns":71742941,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"record_count":8},{"repetition":14,"latency_ns":74627344,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"record_count":8},{"repetition":15,"latency_ns":74976107,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"record_count":8},{"repetition":16,"latency_ns":75858228,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"record_count":8},{"repetition":17,"latency_ns":76680446,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"record_count":8},{"repetition":18,"latency_ns":75701825,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"record_count":8},{"repetition":19,"latency_ns":73874975,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"record_count":8},{"repetition":20,"latency_ns":74515513,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"record_count":8},{"repetition":21,"latency_ns":77701767,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"record_count":8},{"repetition":22,"latency_ns":75934718,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"record_count":8},{"repetition":23,"latency_ns":75028438,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"record_count":8},{"repetition":24,"latency_ns":76841557,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"record_count":8},{"repetition":25,"latency_ns":79063584,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"record_count":8},{"repetition":26,"latency_ns":74422841,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"record_count":8},{"repetition":27,"latency_ns":75755226,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"record_count":8},{"repetition":28,"latency_ns":78087103,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"record_count":8},{"repetition":29,"latency_ns":73837184,"cpu_ticks":4,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"record_count":8}],"latency":{"repetitions":30,"min_ns":71307026,"p50_ns":75377982,"p95_ns":80552089,"p99_ns":83392731,"max_ns":83392731,"mean_ns":75753427.23333333,"sample_stddev_ns":2598700.7305228203},"cpu_ticks":162,"cpu_ms":1620.0,"process_write_bytes":36126720,"database_storage_growth_bytes":34113600,"peak_rss_kib":61724},"replay":{"scope":"authoritative_store_bounded_replay","raw_samples":[{"repetition":0,"latency_ns":248843,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":59804,"record_count":8},{"repetition":1,"latency_ns":242802,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":2,"latency_ns":275874,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":3,"latency_ns":258863,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":4,"latency_ns":249524,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":5,"latency_ns":245813,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":6,"latency_ns":245424,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":7,"latency_ns":246192,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":8,"latency_ns":246883,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":9,"latency_ns":249023,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":10,"latency_ns":267822,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":11,"latency_ns":268973,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":12,"latency_ns":245692,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":13,"latency_ns":244653,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":14,"latency_ns":275124,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":15,"latency_ns":247503,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":16,"latency_ns":250074,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":17,"latency_ns":242303,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":18,"latency_ns":246213,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":19,"latency_ns":270133,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":20,"latency_ns":266844,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":21,"latency_ns":249642,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":22,"latency_ns":271663,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":23,"latency_ns":269492,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":24,"latency_ns":250823,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":25,"latency_ns":251133,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":26,"latency_ns":245652,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":27,"latency_ns":245713,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":28,"latency_ns":265083,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":29,"latency_ns":245792,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8}],"latency":{"repetitions":30,"min_ns":242303,"p50_ns":249023,"p95_ns":275124,"p99_ns":275874,"max_ns":275874,"mean_ns":254318.93333333332,"sample_stddev_ns":11086.006304729659},"cpu_ticks":0,"cpu_ms":0.0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724},"pipeline_raw_samples":[{"repetition":0,"latency_ns":75864387,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":59804,"replayed_observations":8},{"repetition":1,"latency_ns":75779616,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":2,"latency_ns":75591283,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":3,"latency_ns":72812251,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":4,"latency_ns":79913902,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":5,"latency_ns":74910806,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":6,"latency_ns":72638480,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":7,"latency_ns":71711151,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":8,"latency_ns":80957113,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":9,"latency_ns":83814695,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":10,"latency_ns":77553255,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":11,"latency_ns":76832417,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":12,"latency_ns":75050238,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":13,"latency_ns":72173196,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":14,"latency_ns":75067908,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":15,"latency_ns":75393933,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":16,"latency_ns":76293372,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":17,"latency_ns":77078930,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":18,"latency_ns":76121140,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":19,"latency_ns":74313339,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":20,"latency_ns":74945456,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":21,"latency_ns":78132023,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":22,"latency_ns":76368053,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":23,"latency_ns":75468413,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":24,"latency_ns":77267833,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":25,"latency_ns":79483137,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":26,"latency_ns":74843206,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":27,"latency_ns":76169121,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":28,"latency_ns":78516467,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":29,"latency_ns":74247820,"cpu_ticks":4,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61724,"replayed_observations":8}],"pipeline_latency":{"repetitions":30,"min_ns":71711151,"p50_ns":75779616,"p95_ns":80957113,"p99_ns":83814695,"max_ns":83814695,"mean_ns":76177098.03333333,"sample_stddev_ns":2598931.0919540124},"pipeline_records_per_second":105.01844001066286,"pipeline_cpu_ticks":162,"pipeline_cpu_ms":1620.0,"pipeline_process_write_bytes":36126720,"pipeline_database_storage_growth_bytes":34113600,"peak_rss_kib":61724,"no_op_raw_samples":[{"repetition":0,"latency_ns":167953,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":59868,"replayed_observations":0},{"repetition":1,"latency_ns":142251,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":2,"latency_ns":116552,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":3,"latency_ns":123200,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":4,"latency_ns":131612,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":5,"latency_ns":127620,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":6,"latency_ns":144031,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":7,"latency_ns":141031,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":8,"latency_ns":119931,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":9,"latency_ns":139011,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":10,"latency_ns":119011,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":11,"latency_ns":116631,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":12,"latency_ns":116352,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":13,"latency_ns":123650,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":14,"latency_ns":117862,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":15,"latency_ns":154541,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":16,"latency_ns":116811,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":17,"latency_ns":115792,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":18,"latency_ns":119500,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":19,"latency_ns":122890,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":20,"latency_ns":116231,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":21,"latency_ns":116622,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":22,"latency_ns":118501,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":23,"latency_ns":149832,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":24,"latency_ns":125141,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":25,"latency_ns":129332,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":26,"latency_ns":122282,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":27,"latency_ns":119241,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":28,"latency_ns":119312,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":29,"latency_ns":137112,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0}],"no_op_latency":{"repetitions":30,"min_ns":115792,"p50_ns":122282,"p95_ns":154541,"p99_ns":167953,"max_ns":167953,"mean_ns":127661.26666666666,"sample_stddev_ns":13433.730087521031},"no_op_cpu_ticks":0,"no_op_cpu_ms":0.0,"no_op_process_write_bytes":0,"no_op_database_storage_growth_bytes":0,"no_op_observation_count_delta":0},{"provider":"cursor","production_path":"cursor_production_observation_pipeline_v1","pipeline_scope":"production_parse_normalize_sanitize_commit_project_and_replay","measured_repetitions":30,"observations_per_repetition":8,"replay_limit":9,"max_backlog_records":8,"parse":{"scope":"native_provider_format_decode","raw_samples":[{"repetition":0,"latency_ns":32400,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":59868,"record_count":8},{"repetition":1,"latency_ns":25941,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":2,"latency_ns":23001,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":3,"latency_ns":33520,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":4,"latency_ns":28270,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":5,"latency_ns":26090,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":6,"latency_ns":26639,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":7,"latency_ns":24490,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":8,"latency_ns":24790,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":9,"latency_ns":29862,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":10,"latency_ns":25660,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":11,"latency_ns":24950,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":12,"latency_ns":26649,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":13,"latency_ns":25861,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":14,"latency_ns":25900,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":15,"latency_ns":30841,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":16,"latency_ns":26550,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":17,"latency_ns":22340,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":18,"latency_ns":23571,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":19,"latency_ns":25970,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":20,"latency_ns":25551,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":21,"latency_ns":23899,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":22,"latency_ns":25951,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":23,"latency_ns":32330,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":24,"latency_ns":25170,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":25,"latency_ns":30730,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":26,"latency_ns":24650,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":27,"latency_ns":25630,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":28,"latency_ns":24710,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":29,"latency_ns":27441,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8}],"latency":{"repetitions":30,"min_ns":22340,"p50_ns":25900,"p95_ns":32400,"p99_ns":33520,"max_ns":33520,"mean_ns":26645.233333333334,"sample_stddev_ns":2855.113340142116},"cpu_ticks":0,"cpu_ms":0.0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724},"commit":{"scope":"production_adapter_parse_normalize_sanitize_commit_and_project","raw_samples":[{"repetition":0,"latency_ns":75915016,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":60252,"record_count":8},{"repetition":1,"latency_ns":76747986,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"record_count":8},{"repetition":2,"latency_ns":78077121,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"record_count":8},{"repetition":3,"latency_ns":74723883,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"record_count":8},{"repetition":4,"latency_ns":74046037,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"record_count":8},{"repetition":5,"latency_ns":76751008,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"record_count":8},{"repetition":6,"latency_ns":74013976,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"record_count":8},{"repetition":7,"latency_ns":74093637,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"record_count":8},{"repetition":8,"latency_ns":78122973,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"record_count":8},{"repetition":9,"latency_ns":78130702,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"record_count":8},{"repetition":10,"latency_ns":79606048,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"record_count":8},{"repetition":11,"latency_ns":81030385,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"record_count":8},{"repetition":12,"latency_ns":76121588,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"record_count":8},{"repetition":13,"latency_ns":73410480,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"record_count":8},{"repetition":14,"latency_ns":77633436,"cpu_ticks":4,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"record_count":8},{"repetition":15,"latency_ns":77829099,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"record_count":8},{"repetition":16,"latency_ns":77224653,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"record_count":8},{"repetition":17,"latency_ns":80602751,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"record_count":8},{"repetition":18,"latency_ns":75707296,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"record_count":8},{"repetition":19,"latency_ns":76459114,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"record_count":8},{"repetition":20,"latency_ns":80554940,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"record_count":8},{"repetition":21,"latency_ns":74890777,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"record_count":8},{"repetition":22,"latency_ns":76526285,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"record_count":8},{"repetition":23,"latency_ns":78343385,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"record_count":8},{"repetition":24,"latency_ns":77002560,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"record_count":8},{"repetition":25,"latency_ns":78462297,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"record_count":8},{"repetition":26,"latency_ns":76472245,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"record_count":8},{"repetition":27,"latency_ns":77468195,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"record_count":8},{"repetition":28,"latency_ns":78319794,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"record_count":8},{"repetition":29,"latency_ns":74724495,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"record_count":8}],"latency":{"repetitions":30,"min_ns":73410480,"p50_ns":76751008,"p95_ns":80602751,"p99_ns":81030385,"max_ns":81030385,"mean_ns":76967072.06666666,"sample_stddev_ns":2014477.5037640857},"cpu_ticks":161,"cpu_ms":1610.0,"process_write_bytes":39936000,"database_storage_growth_bytes":37945200,"peak_rss_kib":61724},"replay":{"scope":"authoritative_store_bounded_replay","raw_samples":[{"repetition":0,"latency_ns":363543,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":60252,"record_count":8},{"repetition":1,"latency_ns":334744,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":2,"latency_ns":338095,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":3,"latency_ns":366914,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":4,"latency_ns":332373,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":5,"latency_ns":334884,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":6,"latency_ns":364973,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":7,"latency_ns":333674,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":8,"latency_ns":332044,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":9,"latency_ns":355915,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":10,"latency_ns":357104,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":11,"latency_ns":358184,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":12,"latency_ns":337795,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":13,"latency_ns":333803,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":14,"latency_ns":336363,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":15,"latency_ns":332193,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":16,"latency_ns":333973,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":17,"latency_ns":366364,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":18,"latency_ns":329864,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":19,"latency_ns":339214,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":20,"latency_ns":360924,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":21,"latency_ns":356874,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":22,"latency_ns":359854,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":23,"latency_ns":339954,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":24,"latency_ns":330465,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":25,"latency_ns":333484,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":26,"latency_ns":329153,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":27,"latency_ns":335852,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":28,"latency_ns":352664,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":29,"latency_ns":335764,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8}],"latency":{"repetitions":30,"min_ns":329153,"p50_ns":336363,"p95_ns":366364,"p99_ns":366914,"max_ns":366914,"mean_ns":343900.13333333336,"sample_stddev_ns":13205.058941056704},"cpu_ticks":0,"cpu_ms":0.0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724},"pipeline_raw_samples":[{"repetition":0,"latency_ns":76458133,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":60252,"replayed_observations":8},{"repetition":1,"latency_ns":77243252,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":2,"latency_ns":78598787,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":3,"latency_ns":75255340,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":4,"latency_ns":74568282,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":5,"latency_ns":77251832,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":6,"latency_ns":74548212,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":7,"latency_ns":74590612,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":8,"latency_ns":78617458,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":9,"latency_ns":78657547,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":10,"latency_ns":80128664,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":11,"latency_ns":81548951,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":12,"latency_ns":76644146,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":13,"latency_ns":73906175,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":14,"latency_ns":78135742,"cpu_ticks":4,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":15,"latency_ns":78348154,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":16,"latency_ns":77722337,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":17,"latency_ns":81139477,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":18,"latency_ns":76197381,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":19,"latency_ns":76983200,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":20,"latency_ns":81079686,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":21,"latency_ns":75410312,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":22,"latency_ns":77050561,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":23,"latency_ns":78870432,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":24,"latency_ns":77494555,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":25,"latency_ns":78987753,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":26,"latency_ns":76971700,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":27,"latency_ns":77978131,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":28,"latency_ns":78838071,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":29,"latency_ns":75219781,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61724,"replayed_observations":8}],"pipeline_latency":{"repetitions":30,"min_ns":73906175,"p50_ns":77251832,"p95_ns":81139477,"p99_ns":81548951,"max_ns":81548951,"mean_ns":77481488.8,"sample_stddev_ns":2018161.877370413},"pipeline_records_per_second":103.25046825894239,"pipeline_cpu_ticks":161,"pipeline_cpu_ms":1610.0,"pipeline_process_write_bytes":39936000,"pipeline_database_storage_growth_bytes":37945200,"peak_rss_kib":61724,"no_op_raw_samples":[{"repetition":0,"latency_ns":836049,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":60252,"replayed_observations":0},{"repetition":1,"latency_ns":734387,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":2,"latency_ns":776229,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":3,"latency_ns":800990,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":4,"latency_ns":825398,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":5,"latency_ns":724657,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":6,"latency_ns":721618,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":7,"latency_ns":776197,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":8,"latency_ns":719177,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":9,"latency_ns":812169,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":10,"latency_ns":737037,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":11,"latency_ns":728928,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":12,"latency_ns":794729,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":13,"latency_ns":744559,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":14,"latency_ns":735139,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":15,"latency_ns":715858,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":16,"latency_ns":734628,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":17,"latency_ns":742389,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":18,"latency_ns":737658,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":19,"latency_ns":748088,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":20,"latency_ns":737748,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":21,"latency_ns":738118,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":22,"latency_ns":746739,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":23,"latency_ns":866839,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":24,"latency_ns":743559,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":25,"latency_ns":844899,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":26,"latency_ns":775140,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":27,"latency_ns":776059,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":28,"latency_ns":733698,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":29,"latency_ns":730718,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0}],"no_op_latency":{"repetitions":30,"min_ns":715858,"p50_ns":742389,"p95_ns":844899,"p99_ns":866839,"max_ns":866839,"mean_ns":761313.3666666667,"sample_stddev_ns":41171.91617368134},"no_op_cpu_ticks":4,"no_op_cpu_ms":40.0,"no_op_process_write_bytes":0,"no_op_database_storage_growth_bytes":0,"no_op_observation_count_delta":0},{"provider":"hermes","production_path":"hermes_production_observation_pipeline_v1","pipeline_scope":"production_parse_normalize_sanitize_commit_project_and_replay","measured_repetitions":30,"observations_per_repetition":8,"replay_limit":9,"max_backlog_records":8,"parse":{"scope":"native_provider_format_decode","raw_samples":[{"repetition":0,"latency_ns":128271,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":60252,"record_count":8},{"repetition":1,"latency_ns":121682,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":2,"latency_ns":121541,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":3,"latency_ns":121921,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":4,"latency_ns":118941,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":5,"latency_ns":122252,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":6,"latency_ns":122731,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":7,"latency_ns":152461,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":8,"latency_ns":150861,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":9,"latency_ns":126252,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":10,"latency_ns":121432,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":11,"latency_ns":121711,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":12,"latency_ns":143842,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":13,"latency_ns":118412,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":14,"latency_ns":123571,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":15,"latency_ns":119731,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":16,"latency_ns":143342,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":17,"latency_ns":120912,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":18,"latency_ns":120202,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":19,"latency_ns":142442,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":20,"latency_ns":119822,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":21,"latency_ns":122790,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":22,"latency_ns":124231,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":23,"latency_ns":130932,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":24,"latency_ns":120740,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":25,"latency_ns":127701,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":26,"latency_ns":124671,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":27,"latency_ns":125320,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":28,"latency_ns":142702,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":29,"latency_ns":170801,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8}],"latency":{"repetitions":30,"min_ns":118412,"p50_ns":122790,"p95_ns":152461,"p99_ns":170801,"max_ns":170801,"mean_ns":129074.0,"sample_stddev_ns":12670.203773230027},"cpu_ticks":2,"cpu_ms":20.0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724},"commit":{"scope":"production_adapter_parse_normalize_sanitize_commit_and_project","raw_samples":[{"repetition":0,"latency_ns":105074122,"cpu_ticks":7,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":60636,"record_count":8},{"repetition":1,"latency_ns":98489259,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"record_count":8},{"repetition":2,"latency_ns":100293120,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"record_count":8},{"repetition":3,"latency_ns":99091855,"cpu_ticks":9,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"record_count":8},{"repetition":4,"latency_ns":98344048,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"record_count":8},{"repetition":5,"latency_ns":98754592,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"record_count":8},{"repetition":6,"latency_ns":99110576,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"record_count":8},{"repetition":7,"latency_ns":97430227,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"record_count":8},{"repetition":8,"latency_ns":101186759,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"record_count":8},{"repetition":9,"latency_ns":102937059,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"record_count":8},{"repetition":10,"latency_ns":104551687,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"record_count":8},{"repetition":11,"latency_ns":101324230,"cpu_ticks":7,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"record_count":8},{"repetition":12,"latency_ns":100948397,"cpu_ticks":9,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"record_count":8},{"repetition":13,"latency_ns":101768057,"cpu_ticks":9,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"record_count":8},{"repetition":14,"latency_ns":99164707,"cpu_ticks":7,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"record_count":8},{"repetition":15,"latency_ns":99374990,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"record_count":8},{"repetition":16,"latency_ns":102764768,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"record_count":8},{"repetition":17,"latency_ns":102448944,"cpu_ticks":7,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"record_count":8},{"repetition":18,"latency_ns":99298068,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"record_count":8},{"repetition":19,"latency_ns":98959585,"cpu_ticks":7,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"record_count":8},{"repetition":20,"latency_ns":101467963,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"record_count":8},{"repetition":21,"latency_ns":102141160,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"record_count":8},{"repetition":22,"latency_ns":101844568,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"record_count":8},{"repetition":23,"latency_ns":103515126,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"record_count":8},{"repetition":24,"latency_ns":99565962,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"record_count":8},{"repetition":25,"latency_ns":102376194,"cpu_ticks":9,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"record_count":8},{"repetition":26,"latency_ns":107222848,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"record_count":8},{"repetition":27,"latency_ns":102076640,"cpu_ticks":7,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"record_count":8},{"repetition":28,"latency_ns":102752048,"cpu_ticks":7,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"record_count":8},{"repetition":29,"latency_ns":99633374,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"record_count":8}],"latency":{"repetitions":30,"min_ns":97430227,"p50_ns":101186759,"p95_ns":105074122,"p99_ns":107222848,"max_ns":107222848,"mean_ns":101130364.43333334,"sample_stddev_ns":2256448.9971206235},"cpu_ticks":237,"cpu_ms":2370.0,"process_write_bytes":33914880,"database_storage_growth_bytes":32012400,"peak_rss_kib":61724},"replay":{"scope":"authoritative_store_bounded_replay","raw_samples":[{"repetition":0,"latency_ns":333363,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":60636,"record_count":8},{"repetition":1,"latency_ns":330743,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":2,"latency_ns":350975,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":3,"latency_ns":326214,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":4,"latency_ns":355924,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":5,"latency_ns":331583,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":6,"latency_ns":375344,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":7,"latency_ns":352034,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":8,"latency_ns":330493,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":9,"latency_ns":323664,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":10,"latency_ns":350784,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":11,"latency_ns":349264,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":12,"latency_ns":331563,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":13,"latency_ns":333333,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":14,"latency_ns":323824,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":15,"latency_ns":330054,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":16,"latency_ns":331514,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":17,"latency_ns":327963,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":18,"latency_ns":324184,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":19,"latency_ns":326262,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":20,"latency_ns":333013,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":21,"latency_ns":324893,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":22,"latency_ns":368094,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":23,"latency_ns":330104,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":24,"latency_ns":330564,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":25,"latency_ns":347794,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":26,"latency_ns":350062,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":27,"latency_ns":327733,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":28,"latency_ns":328354,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":29,"latency_ns":342573,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8}],"latency":{"repetitions":30,"min_ns":323664,"p50_ns":331514,"p95_ns":368094,"p99_ns":375344,"max_ns":375344,"mean_ns":337408.86666666664,"sample_stddev_ns":13590.850027292916},"cpu_ticks":1,"cpu_ms":10.0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724},"pipeline_raw_samples":[{"repetition":0,"latency_ns":105603868,"cpu_ticks":7,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":60636,"replayed_observations":8},{"repetition":1,"latency_ns":98979754,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":2,"latency_ns":100805835,"cpu_ticks":9,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":3,"latency_ns":99584911,"cpu_ticks":9,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":4,"latency_ns":98870103,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":5,"latency_ns":99255287,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":6,"latency_ns":99687604,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":7,"latency_ns":97951054,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":8,"latency_ns":101681415,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":9,"latency_ns":103422053,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":10,"latency_ns":105066003,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":11,"latency_ns":101837627,"cpu_ticks":7,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":12,"latency_ns":101446892,"cpu_ticks":9,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":13,"latency_ns":102301572,"cpu_ticks":9,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":14,"latency_ns":99655753,"cpu_ticks":7,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":15,"latency_ns":99893804,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":16,"latency_ns":103288312,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":17,"latency_ns":102943150,"cpu_ticks":7,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":18,"latency_ns":99788744,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":19,"latency_ns":99456620,"cpu_ticks":7,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":20,"latency_ns":101986678,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":21,"latency_ns":102629016,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":22,"latency_ns":102405224,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":23,"latency_ns":104057622,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":24,"latency_ns":100084129,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":25,"latency_ns":102905050,"cpu_ticks":9,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":26,"latency_ns":107761143,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":27,"latency_ns":102582286,"cpu_ticks":7,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":28,"latency_ns":103269664,"cpu_ticks":7,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":29,"latency_ns":100145869,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61724,"replayed_observations":8}],"pipeline_latency":{"repetitions":30,"min_ns":97951054,"p50_ns":101681415,"p95_ns":105603868,"p99_ns":107761143,"max_ns":107761143,"mean_ns":101644901.4,"sample_stddev_ns":2261417.377761469},"pipeline_records_per_second":78.7053741979428,"pipeline_cpu_ticks":238,"pipeline_cpu_ms":2380.0,"pipeline_process_write_bytes":33914880,"pipeline_database_storage_growth_bytes":32012400,"peak_rss_kib":61724,"no_op_raw_samples":[{"repetition":0,"latency_ns":24117709,"cpu_ticks":3,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":60636,"replayed_observations":0},{"repetition":1,"latency_ns":23819737,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":2,"latency_ns":23823986,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":3,"latency_ns":24079069,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":4,"latency_ns":23976118,"cpu_ticks":3,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":5,"latency_ns":24017078,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":6,"latency_ns":23923837,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":7,"latency_ns":23842306,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":8,"latency_ns":24141109,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":9,"latency_ns":23963729,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":10,"latency_ns":24033909,"cpu_ticks":3,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":11,"latency_ns":23940368,"cpu_ticks":3,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":12,"latency_ns":24238930,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":13,"latency_ns":23956628,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":14,"latency_ns":24100119,"cpu_ticks":3,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":15,"latency_ns":23885007,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":16,"latency_ns":23905716,"cpu_ticks":3,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":17,"latency_ns":23924507,"cpu_ticks":3,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":18,"latency_ns":24306172,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":19,"latency_ns":23871367,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":20,"latency_ns":24008408,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":21,"latency_ns":24003058,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":22,"latency_ns":23985168,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":23,"latency_ns":24164489,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":24,"latency_ns":23889216,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":25,"latency_ns":24832657,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":26,"latency_ns":23732455,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":27,"latency_ns":24448524,"cpu_ticks":3,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":28,"latency_ns":24255371,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":29,"latency_ns":23880367,"cpu_ticks":3,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0}],"no_op_latency":{"repetitions":30,"min_ns":23732455,"p50_ns":23976118,"p95_ns":24448524,"p99_ns":24832657,"max_ns":24832657,"mean_ns":24035570.466666665,"sample_stddev_ns":219357.1189951301},"no_op_cpu_ticks":69,"no_op_cpu_ms":690.0,"no_op_process_write_bytes":0,"no_op_database_storage_growth_bytes":0,"no_op_observation_count_delta":0},{"provider":"kiro","production_path":"kiro_production_observation_pipeline_v1","pipeline_scope":"production_parse_normalize_sanitize_commit_project_and_replay","measured_repetitions":30,"observations_per_repetition":8,"replay_limit":9,"max_backlog_records":8,"parse":{"scope":"native_provider_format_decode","raw_samples":[{"repetition":0,"latency_ns":21321,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":60636,"record_count":8},{"repetition":1,"latency_ns":19001,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":2,"latency_ns":20330,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":3,"latency_ns":19720,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":4,"latency_ns":18450,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":5,"latency_ns":20599,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":6,"latency_ns":20450,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":7,"latency_ns":21550,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":8,"latency_ns":19450,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":9,"latency_ns":27101,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":10,"latency_ns":19751,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":11,"latency_ns":30651,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":12,"latency_ns":26110,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":13,"latency_ns":26211,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":14,"latency_ns":18311,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":15,"latency_ns":19251,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":16,"latency_ns":19729,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":17,"latency_ns":22451,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":18,"latency_ns":17969,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":19,"latency_ns":18810,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":20,"latency_ns":18990,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":21,"latency_ns":20300,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":22,"latency_ns":28440,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":23,"latency_ns":26961,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":24,"latency_ns":20490,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":25,"latency_ns":22180,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":26,"latency_ns":24400,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":27,"latency_ns":23421,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":28,"latency_ns":25650,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":29,"latency_ns":19900,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8}],"latency":{"repetitions":30,"min_ns":17969,"p50_ns":20450,"p95_ns":28440,"p99_ns":30651,"max_ns":30651,"mean_ns":21931.6,"sample_stddev_ns":3425.7065578781926},"cpu_ticks":1,"cpu_ms":10.0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724},"commit":{"scope":"production_adapter_parse_normalize_sanitize_commit_and_project","raw_samples":[{"repetition":0,"latency_ns":76999949,"cpu_ticks":6,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61532,"record_count":8},{"repetition":1,"latency_ns":76202570,"cpu_ticks":5,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"record_count":8},{"repetition":2,"latency_ns":76193861,"cpu_ticks":5,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"record_count":8},{"repetition":3,"latency_ns":77388774,"cpu_ticks":5,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"record_count":8},{"repetition":4,"latency_ns":73129016,"cpu_ticks":6,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"record_count":8},{"repetition":5,"latency_ns":73919446,"cpu_ticks":6,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"record_count":8},{"repetition":6,"latency_ns":73622141,"cpu_ticks":6,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"record_count":8},{"repetition":7,"latency_ns":73156366,"cpu_ticks":5,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"record_count":8},{"repetition":8,"latency_ns":79868152,"cpu_ticks":5,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"record_count":8},{"repetition":9,"latency_ns":78309213,"cpu_ticks":5,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"record_count":8},{"repetition":10,"latency_ns":80132905,"cpu_ticks":6,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"record_count":8},{"repetition":11,"latency_ns":77405985,"cpu_ticks":6,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"record_count":8},{"repetition":12,"latency_ns":79408227,"cpu_ticks":5,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"record_count":8},{"repetition":13,"latency_ns":75747316,"cpu_ticks":4,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"record_count":8},{"repetition":14,"latency_ns":77531467,"cpu_ticks":5,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"record_count":8},{"repetition":15,"latency_ns":75757636,"cpu_ticks":5,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"record_count":8},{"repetition":16,"latency_ns":78110691,"cpu_ticks":6,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"record_count":8},{"repetition":17,"latency_ns":99228858,"cpu_ticks":5,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"record_count":8},{"repetition":18,"latency_ns":76893987,"cpu_ticks":5,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"record_count":8},{"repetition":19,"latency_ns":72488519,"cpu_ticks":5,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"record_count":8},{"repetition":20,"latency_ns":78562688,"cpu_ticks":5,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"record_count":8},{"repetition":21,"latency_ns":77334504,"cpu_ticks":4,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"record_count":8},{"repetition":22,"latency_ns":81151506,"cpu_ticks":5,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"record_count":8},{"repetition":23,"latency_ns":79080152,"cpu_ticks":5,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"record_count":8},{"repetition":24,"latency_ns":77986572,"cpu_ticks":5,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"record_count":8},{"repetition":25,"latency_ns":76589316,"cpu_ticks":5,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"record_count":8},{"repetition":26,"latency_ns":75033888,"cpu_ticks":5,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"record_count":8},{"repetition":27,"latency_ns":80303897,"cpu_ticks":6,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"record_count":8},{"repetition":28,"latency_ns":76984720,"cpu_ticks":5,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"record_count":8},{"repetition":29,"latency_ns":76175631,"cpu_ticks":5,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"record_count":8}],"latency":{"repetitions":30,"min_ns":72488519,"p50_ns":76999949,"p95_ns":81151506,"p99_ns":99228858,"max_ns":99228858,"mean_ns":77689931.76666667,"sample_stddev_ns":4636322.037055679},"cpu_ticks":156,"cpu_ms":1560.0,"process_write_bytes":38584320,"database_storage_growth_bytes":36585600,"peak_rss_kib":61724},"replay":{"scope":"authoritative_store_bounded_replay","raw_samples":[{"repetition":0,"latency_ns":283573,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61532,"record_count":8},{"repetition":1,"latency_ns":253202,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":2,"latency_ns":256633,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":3,"latency_ns":253873,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":4,"latency_ns":274613,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":5,"latency_ns":255421,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":6,"latency_ns":257222,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":7,"latency_ns":252894,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":8,"latency_ns":258392,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":9,"latency_ns":253894,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":10,"latency_ns":286083,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":11,"latency_ns":254402,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":12,"latency_ns":281203,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":13,"latency_ns":252452,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":14,"latency_ns":258473,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":15,"latency_ns":257563,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":16,"latency_ns":276813,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":17,"latency_ns":256293,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":18,"latency_ns":258113,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":19,"latency_ns":262453,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":20,"latency_ns":256833,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":21,"latency_ns":252623,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":22,"latency_ns":261933,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":23,"latency_ns":255012,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":24,"latency_ns":256301,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":25,"latency_ns":261233,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":26,"latency_ns":256303,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":27,"latency_ns":278274,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":28,"latency_ns":254604,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":29,"latency_ns":278564,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8}],"latency":{"repetitions":30,"min_ns":252452,"p50_ns":256833,"p95_ns":283573,"p99_ns":286083,"max_ns":286083,"mean_ns":261841.5,"sample_stddev_ns":10576.019640253817},"cpu_ticks":0,"cpu_ms":0.0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724},"pipeline_raw_samples":[{"repetition":0,"latency_ns":77480495,"cpu_ticks":6,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61532,"replayed_observations":8},{"repetition":1,"latency_ns":76613744,"cpu_ticks":5,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":2,"latency_ns":76612934,"cpu_ticks":5,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":3,"latency_ns":77813009,"cpu_ticks":5,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":4,"latency_ns":73562381,"cpu_ticks":6,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":5,"latency_ns":74350740,"cpu_ticks":6,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":6,"latency_ns":74041846,"cpu_ticks":6,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":7,"latency_ns":73569631,"cpu_ticks":5,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":8,"latency_ns":80321096,"cpu_ticks":5,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":9,"latency_ns":78728108,"cpu_ticks":5,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":10,"latency_ns":80581090,"cpu_ticks":6,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":11,"latency_ns":77851028,"cpu_ticks":6,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":12,"latency_ns":79861552,"cpu_ticks":5,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":13,"latency_ns":76161820,"cpu_ticks":4,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":14,"latency_ns":77948350,"cpu_ticks":5,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":15,"latency_ns":76176040,"cpu_ticks":5,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":16,"latency_ns":78552968,"cpu_ticks":6,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":17,"latency_ns":99669354,"cpu_ticks":6,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":18,"latency_ns":77338124,"cpu_ticks":5,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":19,"latency_ns":72913864,"cpu_ticks":5,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":20,"latency_ns":78980421,"cpu_ticks":5,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":21,"latency_ns":77745978,"cpu_ticks":4,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":22,"latency_ns":81604521,"cpu_ticks":5,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":23,"latency_ns":79508148,"cpu_ticks":5,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":24,"latency_ns":78401707,"cpu_ticks":5,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":25,"latency_ns":77079971,"cpu_ticks":5,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":26,"latency_ns":75463003,"cpu_ticks":5,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":27,"latency_ns":80774022,"cpu_ticks":6,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":28,"latency_ns":77396525,"cpu_ticks":5,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":29,"latency_ns":76614686,"cpu_ticks":5,"process_write_bytes":1286144,"database_storage_growth_bytes":1219520,"peak_rss_kib":61724,"replayed_observations":8}],"pipeline_latency":{"repetitions":30,"min_ns":72913864,"p50_ns":77480495,"p95_ns":81604521,"p99_ns":99669354,"max_ns":99669354,"mean_ns":78123905.2,"sample_stddev_ns":4641117.930731177},"pipeline_records_per_second":102.40143499636524,"pipeline_cpu_ticks":157,"pipeline_cpu_ms":1570.0,"pipeline_process_write_bytes":38584320,"pipeline_database_storage_growth_bytes":36585600,"peak_rss_kib":61724,"no_op_raw_samples":[{"repetition":0,"latency_ns":2153805,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61532,"replayed_observations":0},{"repetition":1,"latency_ns":1998623,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":2,"latency_ns":2021042,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":3,"latency_ns":2040232,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":4,"latency_ns":2002283,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":5,"latency_ns":1995323,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":6,"latency_ns":2023903,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":7,"latency_ns":2009013,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":8,"latency_ns":2062123,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":9,"latency_ns":2010252,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":10,"latency_ns":2032493,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":11,"latency_ns":2095914,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":12,"latency_ns":2021632,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":13,"latency_ns":2014633,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":14,"latency_ns":2040214,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":15,"latency_ns":2000683,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":16,"latency_ns":2003392,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":17,"latency_ns":2030413,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":18,"latency_ns":2015863,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":19,"latency_ns":2040682,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":20,"latency_ns":2011673,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":21,"latency_ns":2013753,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":22,"latency_ns":2126684,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":23,"latency_ns":2045472,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":24,"latency_ns":1985342,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":25,"latency_ns":2131674,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":26,"latency_ns":2046784,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":27,"latency_ns":2115534,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":28,"latency_ns":2022042,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":29,"latency_ns":2008491,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0}],"no_op_latency":{"repetitions":30,"min_ns":1985342,"p50_ns":2021632,"p95_ns":2131674,"p99_ns":2153805,"max_ns":2153805,"mean_ns":2037332.2333333334,"sample_stddev_ns":43959.296394453384},"no_op_cpu_ticks":3,"no_op_cpu_ms":30.0,"no_op_process_write_bytes":0,"no_op_database_storage_growth_bytes":0,"no_op_observation_count_delta":0},{"provider":"cline","production_path":"cline_production_observation_pipeline_v1","pipeline_scope":"production_parse_normalize_sanitize_commit_project_and_replay","measured_repetitions":30,"observations_per_repetition":8,"replay_limit":9,"max_backlog_records":8,"parse":{"scope":"native_provider_format_decode","raw_samples":[{"repetition":0,"latency_ns":33860,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61532,"record_count":8},{"repetition":1,"latency_ns":22989,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":2,"latency_ns":22950,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":3,"latency_ns":29631,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":4,"latency_ns":23310,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":5,"latency_ns":24000,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":6,"latency_ns":27481,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":7,"latency_ns":27550,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":8,"latency_ns":26931,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":9,"latency_ns":24351,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":10,"latency_ns":25579,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":11,"latency_ns":25771,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":12,"latency_ns":26849,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":13,"latency_ns":28311,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":14,"latency_ns":34151,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":15,"latency_ns":25481,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":16,"latency_ns":23641,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":17,"latency_ns":50680,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":18,"latency_ns":25219,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":19,"latency_ns":23661,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":20,"latency_ns":25721,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":21,"latency_ns":24740,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":22,"latency_ns":32770,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":23,"latency_ns":33160,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":24,"latency_ns":25621,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":25,"latency_ns":29780,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":26,"latency_ns":30820,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":27,"latency_ns":30340,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":28,"latency_ns":25059,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":29,"latency_ns":26071,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8}],"latency":{"repetitions":30,"min_ns":22950,"p50_ns":25771,"p95_ns":34151,"p99_ns":50680,"max_ns":50680,"mean_ns":27882.6,"sample_stddev_ns":5434.014376892636},"cpu_ticks":0,"cpu_ms":0.0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724},"commit":{"scope":"production_adapter_parse_normalize_sanitize_commit_and_project","raw_samples":[{"repetition":0,"latency_ns":77832748,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":1,"latency_ns":76713006,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":2,"latency_ns":77530875,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":3,"latency_ns":77727187,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":4,"latency_ns":74960357,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":5,"latency_ns":73766183,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":6,"latency_ns":74198278,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":7,"latency_ns":74043407,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":8,"latency_ns":79195434,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":9,"latency_ns":78590868,"cpu_ticks":4,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":10,"latency_ns":78479216,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":11,"latency_ns":79619020,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":12,"latency_ns":78182053,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":13,"latency_ns":77202372,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":14,"latency_ns":75210319,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":15,"latency_ns":80404528,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":16,"latency_ns":81704602,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":17,"latency_ns":91816275,"cpu_ticks":4,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":18,"latency_ns":79742480,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":19,"latency_ns":77424874,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":20,"latency_ns":79653890,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":21,"latency_ns":76212851,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":22,"latency_ns":78041291,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":23,"latency_ns":80913063,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":24,"latency_ns":84921318,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":25,"latency_ns":79046444,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":26,"latency_ns":80427108,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":27,"latency_ns":81159906,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":28,"latency_ns":81945026,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":29,"latency_ns":76436623,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8}],"latency":{"repetitions":30,"min_ns":73766183,"p50_ns":78182053,"p95_ns":84921318,"p99_ns":91816275,"max_ns":91816275,"mean_ns":78770053.4,"sample_stddev_ns":3550641.3497488964},"cpu_ticks":158,"cpu_ms":1580.0,"process_write_bytes":42393600,"database_storage_growth_bytes":40417200,"peak_rss_kib":61724},"replay":{"scope":"authoritative_store_bounded_replay","raw_samples":[{"repetition":0,"latency_ns":269944,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":1,"latency_ns":264973,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":2,"latency_ns":288563,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":3,"latency_ns":265213,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":4,"latency_ns":266314,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":5,"latency_ns":295633,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":6,"latency_ns":267282,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":7,"latency_ns":269563,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":8,"latency_ns":331453,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":9,"latency_ns":288603,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":10,"latency_ns":288573,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":11,"latency_ns":271021,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":12,"latency_ns":266183,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":13,"latency_ns":266223,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":14,"latency_ns":264602,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":15,"latency_ns":270383,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":16,"latency_ns":278322,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":17,"latency_ns":273894,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":18,"latency_ns":273334,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":19,"latency_ns":265003,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":20,"latency_ns":273264,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":21,"latency_ns":267474,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":22,"latency_ns":293943,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":23,"latency_ns":271373,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":24,"latency_ns":269364,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":25,"latency_ns":304115,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":26,"latency_ns":271923,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":27,"latency_ns":291164,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":28,"latency_ns":269514,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":29,"latency_ns":266322,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8}],"latency":{"repetitions":30,"min_ns":264602,"p50_ns":270383,"p95_ns":304115,"p99_ns":331453,"max_ns":331453,"mean_ns":276784.5,"sample_stddev_ns":15039.114901391018},"cpu_ticks":1,"cpu_ms":10.0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724},"pipeline_raw_samples":[{"repetition":0,"latency_ns":78287434,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":1,"latency_ns":77138182,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":2,"latency_ns":77986710,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":3,"latency_ns":78176422,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":4,"latency_ns":75385061,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":5,"latency_ns":74228228,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":6,"latency_ns":74635313,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":7,"latency_ns":74497591,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":8,"latency_ns":79692849,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":9,"latency_ns":79041912,"cpu_ticks":4,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":10,"latency_ns":78941911,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":11,"latency_ns":80061054,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":12,"latency_ns":78610028,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":13,"latency_ns":77629816,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":14,"latency_ns":75632485,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":15,"latency_ns":80841502,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":16,"latency_ns":82160367,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":17,"latency_ns":92276521,"cpu_ticks":4,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":18,"latency_ns":80190566,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":19,"latency_ns":77847889,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":20,"latency_ns":80091104,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":21,"latency_ns":76644307,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":22,"latency_ns":78529008,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":23,"latency_ns":81368540,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":24,"latency_ns":85364913,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":25,"latency_ns":79559969,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":26,"latency_ns":80909074,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":27,"latency_ns":81631341,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":28,"latency_ns":82374580,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":29,"latency_ns":76859779,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8}],"pipeline_latency":{"repetitions":30,"min_ns":74228228,"p50_ns":78610028,"p95_ns":85364913,"p99_ns":92276521,"max_ns":92276521,"mean_ns":79219815.2,"sample_stddev_ns":3555927.6703031636},"pipeline_records_per_second":100.98483542031792,"pipeline_cpu_ticks":159,"pipeline_cpu_ms":1590.0,"pipeline_process_write_bytes":42393600,"pipeline_database_storage_growth_bytes":40417200,"peak_rss_kib":61724,"no_op_raw_samples":[{"repetition":0,"latency_ns":2136883,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":1,"latency_ns":2028462,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":2,"latency_ns":2030262,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":3,"latency_ns":2048202,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":4,"latency_ns":2009371,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":5,"latency_ns":2044003,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":6,"latency_ns":2067774,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":7,"latency_ns":2054983,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":8,"latency_ns":2022552,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":9,"latency_ns":2019833,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":10,"latency_ns":2013812,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":11,"latency_ns":2124813,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":12,"latency_ns":2013842,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":13,"latency_ns":2005741,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":14,"latency_ns":1995582,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":15,"latency_ns":2046844,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":16,"latency_ns":2026603,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":17,"latency_ns":2014583,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":18,"latency_ns":2149995,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":19,"latency_ns":2056383,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":20,"latency_ns":2016012,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":21,"latency_ns":2027222,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":22,"latency_ns":2185155,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":23,"latency_ns":2134284,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":24,"latency_ns":2102454,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":25,"latency_ns":2244285,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":26,"latency_ns":2091863,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":27,"latency_ns":2064212,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":28,"latency_ns":1999593,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":29,"latency_ns":2007612,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0}],"no_op_latency":{"repetitions":30,"min_ns":1995582,"p50_ns":2030262,"p95_ns":2185155,"p99_ns":2244285,"max_ns":2244285,"mean_ns":2059440.5,"sample_stddev_ns":61094.339138265335},"no_op_cpu_ticks":8,"no_op_cpu_ms":80.0,"no_op_process_write_bytes":0,"no_op_database_storage_growth_bytes":0,"no_op_observation_count_delta":0},{"provider":"roo-code","production_path":"roo-code_production_observation_pipeline_v1","pipeline_scope":"production_parse_normalize_sanitize_commit_project_and_replay","measured_repetitions":30,"observations_per_repetition":8,"replay_limit":9,"max_backlog_records":8,"parse":{"scope":"native_provider_format_decode","raw_samples":[{"repetition":0,"latency_ns":32151,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":1,"latency_ns":24800,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":2,"latency_ns":23761,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":3,"latency_ns":33441,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":4,"latency_ns":25189,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":5,"latency_ns":27580,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":6,"latency_ns":28261,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":7,"latency_ns":28061,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":8,"latency_ns":22899,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":9,"latency_ns":25831,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":10,"latency_ns":37421,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":11,"latency_ns":33892,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":12,"latency_ns":25661,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":13,"latency_ns":25900,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":14,"latency_ns":24931,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":15,"latency_ns":24822,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":16,"latency_ns":24040,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":17,"latency_ns":25650,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":18,"latency_ns":41091,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":19,"latency_ns":25190,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":20,"latency_ns":24750,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":21,"latency_ns":23760,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":22,"latency_ns":34131,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":23,"latency_ns":35411,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":24,"latency_ns":33170,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":25,"latency_ns":63329,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":26,"latency_ns":38110,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":27,"latency_ns":27410,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":28,"latency_ns":28641,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":29,"latency_ns":25559,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8}],"latency":{"repetitions":30,"min_ns":22899,"p50_ns":25900,"p95_ns":41091,"p99_ns":63329,"max_ns":63329,"mean_ns":29828.1,"sample_stddev_ns":8034.096041033598},"cpu_ticks":0,"cpu_ms":0.0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724},"commit":{"scope":"production_adapter_parse_normalize_sanitize_commit_and_project","raw_samples":[{"repetition":0,"latency_ns":76938759,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":1,"latency_ns":76480222,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":2,"latency_ns":74088597,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":3,"latency_ns":76673245,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":4,"latency_ns":74523763,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":5,"latency_ns":74252989,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":6,"latency_ns":74028926,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":7,"latency_ns":74183819,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":8,"latency_ns":77590456,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":9,"latency_ns":81671872,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":10,"latency_ns":77110981,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":11,"latency_ns":76005578,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":12,"latency_ns":78708020,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":13,"latency_ns":77587196,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":14,"latency_ns":78419614,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":15,"latency_ns":78527017,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":16,"latency_ns":80603000,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":17,"latency_ns":75942157,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":18,"latency_ns":84932619,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":19,"latency_ns":77634877,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":20,"latency_ns":79156614,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":21,"latency_ns":76497004,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":22,"latency_ns":76890218,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":23,"latency_ns":80198906,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":24,"latency_ns":77296794,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":25,"latency_ns":81250107,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":26,"latency_ns":81781575,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":27,"latency_ns":79696680,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":28,"latency_ns":78302374,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":29,"latency_ns":74576863,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8}],"latency":{"repetitions":30,"min_ns":74028926,"p50_ns":77296794,"p95_ns":81781575,"p99_ns":84932619,"max_ns":84932619,"mean_ns":77718361.4,"sample_stddev_ns":2645953.8182481644},"cpu_ticks":166,"cpu_ms":1660.0,"process_write_bytes":42393600,"database_storage_growth_bytes":40417200,"peak_rss_kib":61724},"replay":{"scope":"authoritative_store_bounded_replay","raw_samples":[{"repetition":0,"latency_ns":266894,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":1,"latency_ns":289374,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":2,"latency_ns":289913,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":3,"latency_ns":299653,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":4,"latency_ns":295114,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":5,"latency_ns":265923,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":6,"latency_ns":290693,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":7,"latency_ns":293423,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":8,"latency_ns":291383,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":9,"latency_ns":298363,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":10,"latency_ns":269043,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":11,"latency_ns":267944,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":12,"latency_ns":294144,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":13,"latency_ns":266503,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":14,"latency_ns":263684,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":15,"latency_ns":264944,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":16,"latency_ns":267774,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":17,"latency_ns":292554,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":18,"latency_ns":283473,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":19,"latency_ns":296294,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":20,"latency_ns":271933,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":21,"latency_ns":266522,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":22,"latency_ns":273143,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":23,"latency_ns":293074,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":24,"latency_ns":279664,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":25,"latency_ns":295153,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":26,"latency_ns":285103,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":27,"latency_ns":270912,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":28,"latency_ns":270123,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":29,"latency_ns":289923,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8}],"latency":{"repetitions":30,"min_ns":263684,"p50_ns":283473,"p95_ns":298363,"p99_ns":299653,"max_ns":299653,"mean_ns":281421.3333333333,"sample_stddev_ns":12588.501171590146},"cpu_ticks":3,"cpu_ms":30.0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724},"pipeline_raw_samples":[{"repetition":0,"latency_ns":77364323,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":1,"latency_ns":76930109,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":2,"latency_ns":74537711,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":3,"latency_ns":77162701,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":4,"latency_ns":74984117,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":5,"latency_ns":74681954,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":6,"latency_ns":74483731,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":7,"latency_ns":74640722,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":8,"latency_ns":78040241,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":9,"latency_ns":82129597,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":10,"latency_ns":77546805,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":11,"latency_ns":76430843,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":12,"latency_ns":79165354,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":13,"latency_ns":78038052,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":14,"latency_ns":78842571,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":15,"latency_ns":78950492,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":16,"latency_ns":81032696,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":17,"latency_ns":76397463,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":18,"latency_ns":85421134,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":19,"latency_ns":78108482,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":20,"latency_ns":79589969,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":21,"latency_ns":76923169,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":22,"latency_ns":77349183,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":23,"latency_ns":80683181,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":24,"latency_ns":77772309,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":25,"latency_ns":81735022,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":26,"latency_ns":82264879,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":27,"latency_ns":80148345,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":28,"latency_ns":78732009,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":29,"latency_ns":75024168,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8}],"pipeline_latency":{"repetitions":30,"min_ns":74483731,"p50_ns":77772309,"p95_ns":82264879,"p99_ns":85421134,"max_ns":85421134,"mean_ns":78170377.73333333,"sample_stddev_ns":2653398.321113628},"pipeline_records_per_second":102.34055702392556,"pipeline_cpu_ticks":169,"pipeline_cpu_ms":1690.0,"pipeline_process_write_bytes":42393600,"pipeline_database_storage_growth_bytes":40417200,"peak_rss_kib":61724,"no_op_raw_samples":[{"repetition":0,"latency_ns":2036273,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":1,"latency_ns":2028922,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":2,"latency_ns":1994363,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":3,"latency_ns":2102743,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":4,"latency_ns":2030493,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":5,"latency_ns":2017823,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":6,"latency_ns":2046943,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":7,"latency_ns":2018853,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":8,"latency_ns":2024303,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":9,"latency_ns":2012542,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":10,"latency_ns":2092834,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":11,"latency_ns":2014623,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":12,"latency_ns":2020373,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":13,"latency_ns":2008783,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":14,"latency_ns":2002113,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":15,"latency_ns":2045163,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":16,"latency_ns":2031972,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":17,"latency_ns":2027514,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":18,"latency_ns":2126085,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":19,"latency_ns":2016692,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":20,"latency_ns":2035693,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":21,"latency_ns":2048113,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":22,"latency_ns":2147423,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":23,"latency_ns":2158173,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":24,"latency_ns":2109964,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":25,"latency_ns":2213654,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":26,"latency_ns":2133384,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":27,"latency_ns":2134874,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":28,"latency_ns":2018143,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":29,"latency_ns":1984502,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0}],"no_op_latency":{"repetitions":30,"min_ns":1984502,"p50_ns":2030493,"p95_ns":2158173,"p99_ns":2213654,"max_ns":2213654,"mean_ns":2056111.1,"sample_stddev_ns":57774.059901242996},"no_op_cpu_ticks":3,"no_op_cpu_ms":30.0,"no_op_process_write_bytes":0,"no_op_database_storage_growth_bytes":0,"no_op_observation_count_delta":0},{"provider":"kilo","production_path":"kilo_production_observation_pipeline_v1","pipeline_scope":"production_parse_normalize_sanitize_commit_project_and_replay","measured_repetitions":30,"observations_per_repetition":8,"replay_limit":9,"max_backlog_records":8,"parse":{"scope":"native_provider_format_decode","raw_samples":[{"repetition":0,"latency_ns":24640,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":1,"latency_ns":24160,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":2,"latency_ns":24739,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":3,"latency_ns":35790,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":4,"latency_ns":49960,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":5,"latency_ns":26310,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":6,"latency_ns":26599,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":7,"latency_ns":26130,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":8,"latency_ns":26129,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":9,"latency_ns":25170,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":10,"latency_ns":24191,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":11,"latency_ns":24061,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":12,"latency_ns":29170,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":13,"latency_ns":27979,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":14,"latency_ns":24051,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":15,"latency_ns":23432,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":16,"latency_ns":23971,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":17,"latency_ns":25670,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":18,"latency_ns":46410,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":19,"latency_ns":25000,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":20,"latency_ns":23510,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":21,"latency_ns":35580,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":22,"latency_ns":33310,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":23,"latency_ns":35230,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":24,"latency_ns":32110,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":25,"latency_ns":30980,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":26,"latency_ns":30211,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":27,"latency_ns":32471,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":28,"latency_ns":24139,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":29,"latency_ns":25030,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8}],"latency":{"repetitions":30,"min_ns":23432,"p50_ns":26129,"p95_ns":46410,"p99_ns":49960,"max_ns":49960,"mean_ns":28871.1,"sample_stddev_ns":6556.294944818168},"cpu_ticks":0,"cpu_ms":0.0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724},"commit":{"scope":"production_adapter_parse_normalize_sanitize_commit_and_project","raw_samples":[{"repetition":0,"latency_ns":80228357,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":1,"latency_ns":77294524,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":2,"latency_ns":73927095,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":3,"latency_ns":76966488,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":4,"latency_ns":74823975,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":5,"latency_ns":74187348,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":6,"latency_ns":74115767,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":7,"latency_ns":81475749,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":8,"latency_ns":78481667,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":9,"latency_ns":78682628,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":10,"latency_ns":76945789,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":11,"latency_ns":75851186,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":12,"latency_ns":76522684,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":13,"latency_ns":75275790,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":14,"latency_ns":77215562,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":15,"latency_ns":79221805,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":16,"latency_ns":81452720,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":17,"latency_ns":79442937,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":18,"latency_ns":74626063,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":19,"latency_ns":77772888,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":20,"latency_ns":80023234,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":21,"latency_ns":75288140,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":22,"latency_ns":78390066,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":23,"latency_ns":83174150,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":24,"latency_ns":78332704,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":25,"latency_ns":76568084,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":26,"latency_ns":78677060,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":27,"latency_ns":80599670,"cpu_ticks":4,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":28,"latency_ns":83374972,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8},{"repetition":29,"latency_ns":74440732,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"record_count":8}],"latency":{"repetitions":30,"min_ns":73927095,"p50_ns":77294524,"p95_ns":83174150,"p99_ns":83374972,"max_ns":83374972,"mean_ns":77779327.8,"sample_stddev_ns":2667400.967199686},"cpu_ticks":164,"cpu_ms":1640.0,"process_write_bytes":42393600,"database_storage_growth_bytes":40417200,"peak_rss_kib":61724},"replay":{"scope":"authoritative_store_bounded_replay","raw_samples":[{"repetition":0,"latency_ns":266002,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":1,"latency_ns":269631,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":2,"latency_ns":294033,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":3,"latency_ns":267953,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":4,"latency_ns":269593,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":5,"latency_ns":266663,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":6,"latency_ns":296514,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":7,"latency_ns":268553,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":8,"latency_ns":266492,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":9,"latency_ns":267203,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":10,"latency_ns":289563,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":11,"latency_ns":263703,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":12,"latency_ns":295113,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":13,"latency_ns":272524,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":14,"latency_ns":294913,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":15,"latency_ns":265464,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":16,"latency_ns":265174,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":17,"latency_ns":274723,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":18,"latency_ns":290754,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":19,"latency_ns":264433,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":20,"latency_ns":271652,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":21,"latency_ns":277674,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":22,"latency_ns":270464,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":23,"latency_ns":293483,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":24,"latency_ns":292313,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":25,"latency_ns":270073,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":26,"latency_ns":278963,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":27,"latency_ns":377225,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":28,"latency_ns":285653,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8},{"repetition":29,"latency_ns":266063,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"record_count":8}],"latency":{"repetitions":30,"min_ns":263703,"p50_ns":270464,"p95_ns":296514,"p99_ns":377225,"max_ns":377225,"mean_ns":279752.13333333336,"sample_stddev_ns":21686.20160018066},"cpu_ticks":0,"cpu_ms":0.0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724},"pipeline_raw_samples":[{"repetition":0,"latency_ns":80654100,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":1,"latency_ns":77721118,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":2,"latency_ns":74380819,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":3,"latency_ns":77421584,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":4,"latency_ns":75285550,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":5,"latency_ns":74618433,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":6,"latency_ns":74576702,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":7,"latency_ns":81902835,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":8,"latency_ns":78909081,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":9,"latency_ns":79111493,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":10,"latency_ns":77396276,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":11,"latency_ns":76275830,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":12,"latency_ns":76990860,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":13,"latency_ns":75737215,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":14,"latency_ns":77671837,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":15,"latency_ns":79644529,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":16,"latency_ns":81876933,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":17,"latency_ns":79902872,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":18,"latency_ns":75085098,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":19,"latency_ns":78196045,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":20,"latency_ns":80459029,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":21,"latency_ns":75727845,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":22,"latency_ns":78843900,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":23,"latency_ns":83660165,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":24,"latency_ns":78822780,"cpu_ticks":5,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":25,"latency_ns":77022190,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":26,"latency_ns":79138035,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":27,"latency_ns":81231537,"cpu_ticks":4,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":28,"latency_ns":83818387,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8},{"repetition":29,"latency_ns":74866166,"cpu_ticks":6,"process_write_bytes":1413120,"database_storage_growth_bytes":1347240,"peak_rss_kib":61724,"replayed_observations":8}],"pipeline_latency":{"repetitions":30,"min_ns":74380819,"p50_ns":77721118,"p95_ns":83660165,"p99_ns":83818387,"max_ns":83818387,"mean_ns":78231641.46666667,"sample_stddev_ns":2673244.2399884253},"pipeline_records_per_second":102.2604134339771,"pipeline_cpu_ticks":164,"pipeline_cpu_ms":1640.0,"pipeline_process_write_bytes":42393600,"pipeline_database_storage_growth_bytes":40417200,"peak_rss_kib":61724,"no_op_raw_samples":[{"repetition":0,"latency_ns":2020693,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":1,"latency_ns":2087224,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":2,"latency_ns":1993051,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":3,"latency_ns":2108973,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":4,"latency_ns":2063174,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":5,"latency_ns":2019513,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":6,"latency_ns":2032203,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":7,"latency_ns":2028212,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":8,"latency_ns":1998163,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":9,"latency_ns":2048023,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":10,"latency_ns":2053542,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":11,"latency_ns":1996853,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":12,"latency_ns":2078683,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":13,"latency_ns":2042862,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":14,"latency_ns":1999653,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":15,"latency_ns":1992361,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":16,"latency_ns":2008822,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":17,"latency_ns":2037602,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":18,"latency_ns":2058912,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":19,"latency_ns":2004073,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":20,"latency_ns":2057663,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":21,"latency_ns":2016412,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":22,"latency_ns":2140965,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":23,"latency_ns":2151314,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":24,"latency_ns":2149384,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":25,"latency_ns":2296366,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":26,"latency_ns":2108654,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":27,"latency_ns":2115793,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":28,"latency_ns":1985091,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0},{"repetition":29,"latency_ns":2060413,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61724,"replayed_observations":0}],"no_op_latency":{"repetitions":30,"min_ns":1985091,"p50_ns":2042862,"p95_ns":2151314,"p99_ns":2296366,"max_ns":2296366,"mean_ns":2058488.2333333334,"sample_stddev_ns":66276.70575735584},"no_op_cpu_ticks":5,"no_op_cpu_ms":50.0,"no_op_process_write_bytes":0,"no_op_database_storage_growth_bytes":0,"no_op_observation_count_delta":0}]},"hook_telemetry_readiness":{"artifact_kind":"readiness_and_fixture_identity_not_runtime_contract","canonical_contract":{"aggregation_dimensions":{"disposition_class":["application","transport","timeout","cancellation","unknown"],"disposition_status":["supported","degraded","unavailable","unknown","backpressured","accepted_for_replay","committed","exact_duplicate"],"excluded_untrusted_dimensions":["hook_name","disposition.reason_code"],"host":["claude","codex","cursor","hermes","kiro","other"],"retryable":[true,false,null]},"latency_semantics":{"daemon_processing_duration":{"blocker":"hook_completed_does_not_emit_daemon_processing_duration","status":"unavailable"},"hook_wall_time":{"fields":["hook_wall_time_us","hook_wall_time_ms"],"role":"host_measured_hook_span"},"host_ipc_rtt":{"aliases":["daemon_rtt"],"event_field":"daemon_rtt_us","role":"true_host_ipc_rtt"}},"metrics":{"daemon_rtt":["daemon_rtt_us","daemon_call_count"],"disposition":["disposition.status","disposition.retryable","disposition.reason_code","disposition.class"],"hook_wall_time":["hook_wall_time_us","hook_wall_time_ms"],"payload_bytes":["payload_bytes","daemon_ipc_payload_bytes"],"timeout":["timeout.budget_ms","timeout.timed_out"]},"provider_coverage":[{"host":"claude","status":"instrumented"},{"host":"codex","status":"instrumented"},{"host":"cursor","status":"instrumented"},{"host":"hermes","status":"partial"},{"host":"kiro","status":"instrumented"}],"schema_version":1},"host_fixture_measurements":[{"host":"claude","fixture_path":"tests/fixtures/host_events/claude/baseline.json","fixture_sha256":"6bb06840fe1e2716f66c02a58220c2c1a122b387cdc97af987a0b4d4427124e7","canonical_request_payload_bytes":[142,142,142,142],"disposition_vocabulary":["supported","degraded","unavailable","unknown"]},{"host":"codex","fixture_path":"tests/fixtures/host_events/codex/baseline.json","fixture_sha256":"1095677d360835fcfbaa8da978aebe57fadaf49d257a85b0e0b8779f8a765ef7","canonical_request_payload_bytes":[104,104,104,104],"disposition_vocabulary":["supported","degraded","unavailable","unknown"]},{"host":"cursor","fixture_path":"tests/fixtures/host_events/cursor/baseline.json","fixture_sha256":"e80d6a498ccb300aaee76717f24bdd843722fda037156a980c44ebf43b67370f","canonical_request_payload_bytes":[104,104,104,104],"disposition_vocabulary":["supported","degraded","unavailable","unknown"]},{"host":"hermes","fixture_path":"tests/fixtures/host_events/hermes/baseline.json","fixture_sha256":"911c9ca516ccdb8320b137bececd38c0826eafdd3a369ac8939d5359241bb49c","canonical_request_payload_bytes":[236,236,236,236],"disposition_vocabulary":["supported","degraded","unavailable","unknown"]},{"host":"kiro","fixture_path":"tests/fixtures/host_events/kiro/baseline.json","fixture_sha256":"efaab57d6d9efc0bda7a7ed8a57d236599409d5abf9c2eed405cd7725b5882bc","canonical_request_payload_bytes":[118,118,118,118],"disposition_vocabulary":["supported","degraded","unavailable","unknown"]}],"cursor_catch_up_ingest_max_bytes":2097152,"readiness_distributions":{"schema_version":1,"source_event":"hook_completed","collection_status":"no_samples","input_rows_received":0,"input_rows_processed":0,"input_rows_dropped_at_cap":0,"events_considered":0,"events_skipped_non_completed":0,"hook_wall_time_distribution":[],"host_ipc_rtt_distribution":[],"payload_bytes_distribution":[],"timeout_outcomes_by_host":[],"disposition_counts_by_host":[],"unavailable_metrics":[{"metric":"daemon_processing_duration_distribution","status":"unavailable","blocker":"hook_completed_does_not_emit_daemon_processing_duration"}],"bounds":{"max_input_rows":10000,"host_buckets":6,"max_disposition_series":720,"latency_buckets":13,"bytes_buckets":8},"rows_folded_to_other_host":0,"disposition_values_folded_to_unknown":0},"unavailable_measurements":[{"metric":"daemon_processing_duration_distribution","status":"unavailable","required_collection_step":"hook_completed emits host-measured daemon_rtt_us (TRUE host IPC RTT) only; daemon-internal processing duration is not present on the event contract"}]},"stale_reason":"superseded after the checked-in workload identity changed","superseded_by_workload_schema_version":3} diff --git a/benchmark_data/claude-observation/result-2026-07-16-8d53b4a9.json b/benchmark_data/claude-observation/result-2026-07-16-8d53b4a9.json new file mode 100644 index 0000000000..a34e4d46a7 --- /dev/null +++ b/benchmark_data/claude-observation/result-2026-07-16-8d53b4a9.json @@ -0,0 +1 @@ +{"schema_version":2,"workload_id":"pr5-observation-pipeline-v1","evidence_status":"historical_stale","stale_reason":"superseded by PR6 provider-ingestion correctness changes","superseded_by_workload_schema_version":3,"workload_identity":{"manifest_path":"benchmarks/pr5-observation/workload-v1.json","manifest_sha256":"5a5087d7520b76cc96a3e0d058adab9a1b45fac717659ade6f8ae14ec0453736","harness_paths":["src/sessions/claude_observation_benchmark.rs","src/sessions/claude_observation_benchmark/artifact.rs","src/sessions/claude_observation_benchmark/baseline.rs","src/sessions/claude_observation_benchmark/manifest.rs","src/sessions/claude_observation_benchmark/metrics.rs","src/sessions/claude_observation_benchmark/model.rs","src/sessions/claude_observation_benchmark/runner.rs","src/sessions/claude_observation_benchmark/tests.rs"],"harness_sha256":"f9746f779d18d13d58ffa2758be1513ca55da6fc15e76985eca7323c95b1c43b","native_fixture_paths":["tests/fixtures/provider_normalization/claude/assistant_tool_use.input.json","tests/fixtures/provider_normalization/codex/session_meta.input.json","tests/fixtures/provider_normalization/codex/agent_message.input.json","tests/fixtures/provider_normalization/cursor/tool_use.input.json","tests/fixtures/provider_normalization/hermes/assistant_tool_call.input.json","tests/fixtures/provider_normalization/kiro/workspace_session.input.json","tests/fixtures/transcript_golden/cline_like/input/api_conversation_history.json","tests/fixtures/transcript_golden/cline_like/input/task_metadata.json"],"native_fixtures_sha256":"a33854bc6c64bd964ee4665459296346fe522f0fe4f7bc9911bb3c5474de77d5"},"build_identity":{"commit":"8d53b4a93d67b3e4264e18f353b941ea4d3ea548","tree":"da6d3c6692518a2895f9dac4c708ea8e49f46ffb","profile":"release","source_mode":"git_archive_read_only_v1","source_manifest_sha256":"1aff9e9d31c1fa5790947f93dc20e37a588f419074a78d1489ab34a7250a4e80","source_file_count":1576,"target_triple":"x86_64-unknown-linux-gnu","rustc_version":"rustc 1.95.0 (59807616e 2026-04-14)\nbinary: rustc\ncommit-hash: 59807616e1fa2540724bfbac14d7976d7e4a3860\ncommit-date: 2026-04-14\nhost: x86_64-unknown-linux-gnu\nrelease: 1.95.0\nLLVM version: 22.1.2","cargo_version":"cargo 1.95.0 (f2d3ce0bd 2026-03-21)","rustflags":"normalized-empty","rustc_wrapper":"environment:none;cargo_config:36aad4637b36949700f277b0b6d18d647d507944","rustc_workspace_wrapper":"environment:none;cargo_config:36aad4637b36949700f277b0b6d18d647d507944","cargo_config_identity":"36aad4637b36949700f277b0b6d18d647d507944","data_root_basis":"current_executable_parent","executable_sha256":"0ff211c0ee7e0fa4a91fb05d3d9570d9c99f6ded76127bd7be1778d83fcf223d","executable_size_bytes":220454232},"git_before":{"commit":"8d53b4a93d67b3e4264e18f353b941ea4d3ea548","tree":"da6d3c6692518a2895f9dac4c708ea8e49f46ffb","dirty":false},"git_after":{"commit":"8d53b4a93d67b3e4264e18f353b941ea4d3ea548","tree":"da6d3c6692518a2895f9dac4c708ea8e49f46ffb","dirty":false},"command":"cargo test --quiet --release --lib sessions::claude_observation_benchmark::production_observation_pipeline_baseline -- --ignored --exact --nocapture --test-threads=1","rustc":"rustc 1.95.0 (59807616e 2026-04-14)\nbinary: rustc\ncommit-hash: 59807616e1fa2540724bfbac14d7976d7e4a3860\ncommit-date: 2026-04-14\nhost: x86_64-unknown-linux-gnu\nrelease: 1.95.0\nLLVM version: 22.1.2","cargo":"cargo 1.95.0 (f2d3ce0bd 2026-03-21)","kernel":"Linux 6.8.0-134-generic x86_64 GNU/Linux","cpu_identity":"AMD EPYC 7742 64-Core Processor","logical_cpu_count":64,"memory_total_kib":151845828,"clock_ticks_per_second":100,"warmup_repetitions":3,"measured_repetitions":30,"records_per_repetition":64,"measured_records":1920,"pipeline_raw_samples":[{"repetition":0,"latency_ns":622249249,"cpu_ticks":43,"process_write_bytes":11182080,"database_storage_growth_bytes":4659520,"peak_rss_kib":58092,"replayed_observations":64},{"repetition":1,"latency_ns":629636383,"cpu_ticks":41,"process_write_bytes":11182080,"database_storage_growth_bytes":4659520,"peak_rss_kib":58092,"replayed_observations":64},{"repetition":2,"latency_ns":619246222,"cpu_ticks":41,"process_write_bytes":11190272,"database_storage_growth_bytes":4663640,"peak_rss_kib":58092,"replayed_observations":64},{"repetition":3,"latency_ns":614696154,"cpu_ticks":42,"process_write_bytes":11182080,"database_storage_growth_bytes":4659520,"peak_rss_kib":58092,"replayed_observations":64},{"repetition":4,"latency_ns":613137214,"cpu_ticks":40,"process_write_bytes":11182080,"database_storage_growth_bytes":4659520,"peak_rss_kib":58092,"replayed_observations":64},{"repetition":5,"latency_ns":605160041,"cpu_ticks":42,"process_write_bytes":11177984,"database_storage_growth_bytes":4659520,"peak_rss_kib":58092,"replayed_observations":64},{"repetition":6,"latency_ns":601365765,"cpu_ticks":43,"process_write_bytes":11194368,"database_storage_growth_bytes":4618368,"peak_rss_kib":58092,"replayed_observations":64},{"repetition":7,"latency_ns":618451690,"cpu_ticks":42,"process_write_bytes":11173888,"database_storage_growth_bytes":4659520,"peak_rss_kib":58092,"replayed_observations":64},{"repetition":8,"latency_ns":618523129,"cpu_ticks":43,"process_write_bytes":11182080,"database_storage_growth_bytes":4659520,"peak_rss_kib":58092,"replayed_observations":64},{"repetition":9,"latency_ns":629519798,"cpu_ticks":42,"process_write_bytes":11182080,"database_storage_growth_bytes":4659520,"peak_rss_kib":58092,"replayed_observations":64},{"repetition":10,"latency_ns":641790844,"cpu_ticks":43,"process_write_bytes":11194368,"database_storage_growth_bytes":4663640,"peak_rss_kib":58092,"replayed_observations":64},{"repetition":11,"latency_ns":631578365,"cpu_ticks":41,"process_write_bytes":11177984,"database_storage_growth_bytes":4659520,"peak_rss_kib":58092,"replayed_observations":64},{"repetition":12,"latency_ns":600778834,"cpu_ticks":42,"process_write_bytes":11186176,"database_storage_growth_bytes":4659520,"peak_rss_kib":58092,"replayed_observations":64},{"repetition":13,"latency_ns":602431405,"cpu_ticks":42,"process_write_bytes":11182080,"database_storage_growth_bytes":4659520,"peak_rss_kib":58092,"replayed_observations":64},{"repetition":14,"latency_ns":605130808,"cpu_ticks":42,"process_write_bytes":11182080,"database_storage_growth_bytes":4659520,"peak_rss_kib":58092,"replayed_observations":64},{"repetition":15,"latency_ns":610325844,"cpu_ticks":42,"process_write_bytes":11177984,"database_storage_growth_bytes":4659520,"peak_rss_kib":58092,"replayed_observations":64},{"repetition":16,"latency_ns":621241672,"cpu_ticks":42,"process_write_bytes":11186176,"database_storage_growth_bytes":4663640,"peak_rss_kib":58092,"replayed_observations":64},{"repetition":17,"latency_ns":608928844,"cpu_ticks":42,"process_write_bytes":11182080,"database_storage_growth_bytes":4659520,"peak_rss_kib":58092,"replayed_observations":64},{"repetition":18,"latency_ns":599103221,"cpu_ticks":42,"process_write_bytes":11177984,"database_storage_growth_bytes":4659520,"peak_rss_kib":58092,"replayed_observations":64},{"repetition":19,"latency_ns":595867570,"cpu_ticks":41,"process_write_bytes":11182080,"database_storage_growth_bytes":4659520,"peak_rss_kib":58092,"replayed_observations":64},{"repetition":20,"latency_ns":605353130,"cpu_ticks":42,"process_write_bytes":11182080,"database_storage_growth_bytes":4659520,"peak_rss_kib":58092,"replayed_observations":64},{"repetition":21,"latency_ns":608384839,"cpu_ticks":42,"process_write_bytes":11177984,"database_storage_growth_bytes":4659520,"peak_rss_kib":58092,"replayed_observations":64},{"repetition":22,"latency_ns":591561044,"cpu_ticks":41,"process_write_bytes":11177984,"database_storage_growth_bytes":4659520,"peak_rss_kib":58092,"replayed_observations":64},{"repetition":23,"latency_ns":599264492,"cpu_ticks":41,"process_write_bytes":11190272,"database_storage_growth_bytes":4663640,"peak_rss_kib":58092,"replayed_observations":64},{"repetition":24,"latency_ns":617369351,"cpu_ticks":42,"process_write_bytes":11190272,"database_storage_growth_bytes":4663640,"peak_rss_kib":58092,"replayed_observations":64},{"repetition":25,"latency_ns":610344510,"cpu_ticks":42,"process_write_bytes":11182080,"database_storage_growth_bytes":4659520,"peak_rss_kib":58092,"replayed_observations":64},{"repetition":26,"latency_ns":602626972,"cpu_ticks":42,"process_write_bytes":11182080,"database_storage_growth_bytes":4659520,"peak_rss_kib":58092,"replayed_observations":64},{"repetition":27,"latency_ns":617046066,"cpu_ticks":43,"process_write_bytes":11182080,"database_storage_growth_bytes":4659520,"peak_rss_kib":58092,"replayed_observations":64},{"repetition":28,"latency_ns":634643768,"cpu_ticks":42,"process_write_bytes":11186176,"database_storage_growth_bytes":4663640,"peak_rss_kib":58092,"replayed_observations":64},{"repetition":29,"latency_ns":630670457,"cpu_ticks":41,"process_write_bytes":11177984,"database_storage_growth_bytes":4659520,"peak_rss_kib":58092,"replayed_observations":64}],"pipeline_batch_latency":{"repetitions":30,"min_ns":591561044,"p50_ns":610344510,"p95_ns":634643768,"p99_ns":641790844,"max_ns":641790844,"mean_ns":613547589.3666667,"sample_stddev_ns":12675522.702128785},"pipeline_records_per_second":104.3113869391352,"pipeline_cpu_ticks":1256,"pipeline_cpu_ms":12560.0,"pipeline_process_write_bytes":335486976,"database_storage_growth_bytes":139769168,"peak_rss_kib":58092,"no_op_replay_raw_samples":[{"repetition":0,"latency_ns":211602,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":58092,"replayed_observations":0},{"repetition":1,"latency_ns":212394,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":58092,"replayed_observations":0},{"repetition":2,"latency_ns":211083,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":58092,"replayed_observations":0},{"repetition":3,"latency_ns":209463,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":58092,"replayed_observations":0},{"repetition":4,"latency_ns":201403,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":58092,"replayed_observations":0},{"repetition":5,"latency_ns":231813,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":58092,"replayed_observations":0},{"repetition":6,"latency_ns":193221,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":58092,"replayed_observations":0},{"repetition":7,"latency_ns":194213,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":58092,"replayed_observations":0},{"repetition":8,"latency_ns":217613,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":58092,"replayed_observations":0},{"repetition":9,"latency_ns":221502,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":58092,"replayed_observations":0},{"repetition":10,"latency_ns":229293,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":58092,"replayed_observations":0},{"repetition":11,"latency_ns":217862,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":58092,"replayed_observations":0},{"repetition":12,"latency_ns":210532,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":58092,"replayed_observations":0},{"repetition":13,"latency_ns":246762,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":58092,"replayed_observations":0},{"repetition":14,"latency_ns":201303,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":58092,"replayed_observations":0},{"repetition":15,"latency_ns":211052,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":58092,"replayed_observations":0},{"repetition":16,"latency_ns":209552,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":58092,"replayed_observations":0},{"repetition":17,"latency_ns":216532,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":58092,"replayed_observations":0},{"repetition":18,"latency_ns":211494,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":58092,"replayed_observations":0},{"repetition":19,"latency_ns":194992,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":58092,"replayed_observations":0},{"repetition":20,"latency_ns":211973,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":58092,"replayed_observations":0},{"repetition":21,"latency_ns":203043,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":58092,"replayed_observations":0},{"repetition":22,"latency_ns":202792,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":58092,"replayed_observations":0},{"repetition":23,"latency_ns":217083,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":58092,"replayed_observations":0},{"repetition":24,"latency_ns":218711,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":58092,"replayed_observations":0},{"repetition":25,"latency_ns":201153,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":58092,"replayed_observations":0},{"repetition":26,"latency_ns":215063,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":58092,"replayed_observations":0},{"repetition":27,"latency_ns":191173,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":58092,"replayed_observations":0},{"repetition":28,"latency_ns":205533,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":58092,"replayed_observations":0},{"repetition":29,"latency_ns":235212,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":58092,"replayed_observations":0}],"no_op_replay_latency":{"repetitions":30,"min_ns":191173,"p50_ns":211083,"p95_ns":235212,"p99_ns":246762,"max_ns":246762,"mean_ns":211847.23333333334,"sample_stddev_ns":12669.844218848353},"no_op_replay_cpu_ticks":1,"no_op_replay_cpu_ms":10.0,"no_op_replay_process_write_bytes":0,"no_op_replay_database_storage_growth_bytes":0,"no_op_replay_observation_count_delta":0,"no_op_replay_totals":{"source_bytes_scanned":0,"sessions_upserted":0,"messages_upserted":0,"observations_committed":0,"observation_duplicates":0,"cursor_advances":0,"cursor_duplicates":0,"records_rejected":0,"records_quarantined":0,"projections_completed":0,"projections_skipped":0,"projection_duplicates":0,"deferred_sources":0},"provider_observation_performance":{"schema_version":1,"workload_id":"pr5-observation-pipeline-v1","fairness":{"policy":"round_robin_v1","rounds":30,"providers_per_round":8,"max_provider_turn_distance":8,"turns":[{"round":0,"position":0,"provider":"claude"},{"round":0,"position":1,"provider":"codex"},{"round":0,"position":2,"provider":"cursor"},{"round":0,"position":3,"provider":"hermes"},{"round":0,"position":4,"provider":"kiro"},{"round":0,"position":5,"provider":"cline"},{"round":0,"position":6,"provider":"roo-code"},{"round":0,"position":7,"provider":"kilo"},{"round":1,"position":0,"provider":"claude"},{"round":1,"position":1,"provider":"codex"},{"round":1,"position":2,"provider":"cursor"},{"round":1,"position":3,"provider":"hermes"},{"round":1,"position":4,"provider":"kiro"},{"round":1,"position":5,"provider":"cline"},{"round":1,"position":6,"provider":"roo-code"},{"round":1,"position":7,"provider":"kilo"},{"round":2,"position":0,"provider":"claude"},{"round":2,"position":1,"provider":"codex"},{"round":2,"position":2,"provider":"cursor"},{"round":2,"position":3,"provider":"hermes"},{"round":2,"position":4,"provider":"kiro"},{"round":2,"position":5,"provider":"cline"},{"round":2,"position":6,"provider":"roo-code"},{"round":2,"position":7,"provider":"kilo"},{"round":3,"position":0,"provider":"claude"},{"round":3,"position":1,"provider":"codex"},{"round":3,"position":2,"provider":"cursor"},{"round":3,"position":3,"provider":"hermes"},{"round":3,"position":4,"provider":"kiro"},{"round":3,"position":5,"provider":"cline"},{"round":3,"position":6,"provider":"roo-code"},{"round":3,"position":7,"provider":"kilo"},{"round":4,"position":0,"provider":"claude"},{"round":4,"position":1,"provider":"codex"},{"round":4,"position":2,"provider":"cursor"},{"round":4,"position":3,"provider":"hermes"},{"round":4,"position":4,"provider":"kiro"},{"round":4,"position":5,"provider":"cline"},{"round":4,"position":6,"provider":"roo-code"},{"round":4,"position":7,"provider":"kilo"},{"round":5,"position":0,"provider":"claude"},{"round":5,"position":1,"provider":"codex"},{"round":5,"position":2,"provider":"cursor"},{"round":5,"position":3,"provider":"hermes"},{"round":5,"position":4,"provider":"kiro"},{"round":5,"position":5,"provider":"cline"},{"round":5,"position":6,"provider":"roo-code"},{"round":5,"position":7,"provider":"kilo"},{"round":6,"position":0,"provider":"claude"},{"round":6,"position":1,"provider":"codex"},{"round":6,"position":2,"provider":"cursor"},{"round":6,"position":3,"provider":"hermes"},{"round":6,"position":4,"provider":"kiro"},{"round":6,"position":5,"provider":"cline"},{"round":6,"position":6,"provider":"roo-code"},{"round":6,"position":7,"provider":"kilo"},{"round":7,"position":0,"provider":"claude"},{"round":7,"position":1,"provider":"codex"},{"round":7,"position":2,"provider":"cursor"},{"round":7,"position":3,"provider":"hermes"},{"round":7,"position":4,"provider":"kiro"},{"round":7,"position":5,"provider":"cline"},{"round":7,"position":6,"provider":"roo-code"},{"round":7,"position":7,"provider":"kilo"},{"round":8,"position":0,"provider":"claude"},{"round":8,"position":1,"provider":"codex"},{"round":8,"position":2,"provider":"cursor"},{"round":8,"position":3,"provider":"hermes"},{"round":8,"position":4,"provider":"kiro"},{"round":8,"position":5,"provider":"cline"},{"round":8,"position":6,"provider":"roo-code"},{"round":8,"position":7,"provider":"kilo"},{"round":9,"position":0,"provider":"claude"},{"round":9,"position":1,"provider":"codex"},{"round":9,"position":2,"provider":"cursor"},{"round":9,"position":3,"provider":"hermes"},{"round":9,"position":4,"provider":"kiro"},{"round":9,"position":5,"provider":"cline"},{"round":9,"position":6,"provider":"roo-code"},{"round":9,"position":7,"provider":"kilo"},{"round":10,"position":0,"provider":"claude"},{"round":10,"position":1,"provider":"codex"},{"round":10,"position":2,"provider":"cursor"},{"round":10,"position":3,"provider":"hermes"},{"round":10,"position":4,"provider":"kiro"},{"round":10,"position":5,"provider":"cline"},{"round":10,"position":6,"provider":"roo-code"},{"round":10,"position":7,"provider":"kilo"},{"round":11,"position":0,"provider":"claude"},{"round":11,"position":1,"provider":"codex"},{"round":11,"position":2,"provider":"cursor"},{"round":11,"position":3,"provider":"hermes"},{"round":11,"position":4,"provider":"kiro"},{"round":11,"position":5,"provider":"cline"},{"round":11,"position":6,"provider":"roo-code"},{"round":11,"position":7,"provider":"kilo"},{"round":12,"position":0,"provider":"claude"},{"round":12,"position":1,"provider":"codex"},{"round":12,"position":2,"provider":"cursor"},{"round":12,"position":3,"provider":"hermes"},{"round":12,"position":4,"provider":"kiro"},{"round":12,"position":5,"provider":"cline"},{"round":12,"position":6,"provider":"roo-code"},{"round":12,"position":7,"provider":"kilo"},{"round":13,"position":0,"provider":"claude"},{"round":13,"position":1,"provider":"codex"},{"round":13,"position":2,"provider":"cursor"},{"round":13,"position":3,"provider":"hermes"},{"round":13,"position":4,"provider":"kiro"},{"round":13,"position":5,"provider":"cline"},{"round":13,"position":6,"provider":"roo-code"},{"round":13,"position":7,"provider":"kilo"},{"round":14,"position":0,"provider":"claude"},{"round":14,"position":1,"provider":"codex"},{"round":14,"position":2,"provider":"cursor"},{"round":14,"position":3,"provider":"hermes"},{"round":14,"position":4,"provider":"kiro"},{"round":14,"position":5,"provider":"cline"},{"round":14,"position":6,"provider":"roo-code"},{"round":14,"position":7,"provider":"kilo"},{"round":15,"position":0,"provider":"claude"},{"round":15,"position":1,"provider":"codex"},{"round":15,"position":2,"provider":"cursor"},{"round":15,"position":3,"provider":"hermes"},{"round":15,"position":4,"provider":"kiro"},{"round":15,"position":5,"provider":"cline"},{"round":15,"position":6,"provider":"roo-code"},{"round":15,"position":7,"provider":"kilo"},{"round":16,"position":0,"provider":"claude"},{"round":16,"position":1,"provider":"codex"},{"round":16,"position":2,"provider":"cursor"},{"round":16,"position":3,"provider":"hermes"},{"round":16,"position":4,"provider":"kiro"},{"round":16,"position":5,"provider":"cline"},{"round":16,"position":6,"provider":"roo-code"},{"round":16,"position":7,"provider":"kilo"},{"round":17,"position":0,"provider":"claude"},{"round":17,"position":1,"provider":"codex"},{"round":17,"position":2,"provider":"cursor"},{"round":17,"position":3,"provider":"hermes"},{"round":17,"position":4,"provider":"kiro"},{"round":17,"position":5,"provider":"cline"},{"round":17,"position":6,"provider":"roo-code"},{"round":17,"position":7,"provider":"kilo"},{"round":18,"position":0,"provider":"claude"},{"round":18,"position":1,"provider":"codex"},{"round":18,"position":2,"provider":"cursor"},{"round":18,"position":3,"provider":"hermes"},{"round":18,"position":4,"provider":"kiro"},{"round":18,"position":5,"provider":"cline"},{"round":18,"position":6,"provider":"roo-code"},{"round":18,"position":7,"provider":"kilo"},{"round":19,"position":0,"provider":"claude"},{"round":19,"position":1,"provider":"codex"},{"round":19,"position":2,"provider":"cursor"},{"round":19,"position":3,"provider":"hermes"},{"round":19,"position":4,"provider":"kiro"},{"round":19,"position":5,"provider":"cline"},{"round":19,"position":6,"provider":"roo-code"},{"round":19,"position":7,"provider":"kilo"},{"round":20,"position":0,"provider":"claude"},{"round":20,"position":1,"provider":"codex"},{"round":20,"position":2,"provider":"cursor"},{"round":20,"position":3,"provider":"hermes"},{"round":20,"position":4,"provider":"kiro"},{"round":20,"position":5,"provider":"cline"},{"round":20,"position":6,"provider":"roo-code"},{"round":20,"position":7,"provider":"kilo"},{"round":21,"position":0,"provider":"claude"},{"round":21,"position":1,"provider":"codex"},{"round":21,"position":2,"provider":"cursor"},{"round":21,"position":3,"provider":"hermes"},{"round":21,"position":4,"provider":"kiro"},{"round":21,"position":5,"provider":"cline"},{"round":21,"position":6,"provider":"roo-code"},{"round":21,"position":7,"provider":"kilo"},{"round":22,"position":0,"provider":"claude"},{"round":22,"position":1,"provider":"codex"},{"round":22,"position":2,"provider":"cursor"},{"round":22,"position":3,"provider":"hermes"},{"round":22,"position":4,"provider":"kiro"},{"round":22,"position":5,"provider":"cline"},{"round":22,"position":6,"provider":"roo-code"},{"round":22,"position":7,"provider":"kilo"},{"round":23,"position":0,"provider":"claude"},{"round":23,"position":1,"provider":"codex"},{"round":23,"position":2,"provider":"cursor"},{"round":23,"position":3,"provider":"hermes"},{"round":23,"position":4,"provider":"kiro"},{"round":23,"position":5,"provider":"cline"},{"round":23,"position":6,"provider":"roo-code"},{"round":23,"position":7,"provider":"kilo"},{"round":24,"position":0,"provider":"claude"},{"round":24,"position":1,"provider":"codex"},{"round":24,"position":2,"provider":"cursor"},{"round":24,"position":3,"provider":"hermes"},{"round":24,"position":4,"provider":"kiro"},{"round":24,"position":5,"provider":"cline"},{"round":24,"position":6,"provider":"roo-code"},{"round":24,"position":7,"provider":"kilo"},{"round":25,"position":0,"provider":"claude"},{"round":25,"position":1,"provider":"codex"},{"round":25,"position":2,"provider":"cursor"},{"round":25,"position":3,"provider":"hermes"},{"round":25,"position":4,"provider":"kiro"},{"round":25,"position":5,"provider":"cline"},{"round":25,"position":6,"provider":"roo-code"},{"round":25,"position":7,"provider":"kilo"},{"round":26,"position":0,"provider":"claude"},{"round":26,"position":1,"provider":"codex"},{"round":26,"position":2,"provider":"cursor"},{"round":26,"position":3,"provider":"hermes"},{"round":26,"position":4,"provider":"kiro"},{"round":26,"position":5,"provider":"cline"},{"round":26,"position":6,"provider":"roo-code"},{"round":26,"position":7,"provider":"kilo"},{"round":27,"position":0,"provider":"claude"},{"round":27,"position":1,"provider":"codex"},{"round":27,"position":2,"provider":"cursor"},{"round":27,"position":3,"provider":"hermes"},{"round":27,"position":4,"provider":"kiro"},{"round":27,"position":5,"provider":"cline"},{"round":27,"position":6,"provider":"roo-code"},{"round":27,"position":7,"provider":"kilo"},{"round":28,"position":0,"provider":"claude"},{"round":28,"position":1,"provider":"codex"},{"round":28,"position":2,"provider":"cursor"},{"round":28,"position":3,"provider":"hermes"},{"round":28,"position":4,"provider":"kiro"},{"round":28,"position":5,"provider":"cline"},{"round":28,"position":6,"provider":"roo-code"},{"round":28,"position":7,"provider":"kilo"},{"round":29,"position":0,"provider":"claude"},{"round":29,"position":1,"provider":"codex"},{"round":29,"position":2,"provider":"cursor"},{"round":29,"position":3,"provider":"hermes"},{"round":29,"position":4,"provider":"kiro"},{"round":29,"position":5,"provider":"cline"},{"round":29,"position":6,"provider":"roo-code"},{"round":29,"position":7,"provider":"kilo"}]},"providers":[{"provider":"claude","production_path":"claude_production_observation_pipeline_v1","pipeline_scope":"production_parse_normalize_sanitize_commit_project_and_replay","measured_repetitions":30,"observations_per_repetition":8,"replay_limit":9,"max_backlog_records":8,"parse":{"scope":"native_provider_format_decode","raw_samples":[{"repetition":0,"latency_ns":65330,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":60076,"record_count":8},{"repetition":1,"latency_ns":40761,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":2,"latency_ns":39611,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":3,"latency_ns":38880,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":4,"latency_ns":39921,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":5,"latency_ns":48530,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":6,"latency_ns":44551,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":7,"latency_ns":38401,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":8,"latency_ns":39651,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":9,"latency_ns":47341,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":10,"latency_ns":40451,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":11,"latency_ns":42040,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":12,"latency_ns":37420,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":13,"latency_ns":55191,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":14,"latency_ns":49121,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":15,"latency_ns":48481,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":16,"latency_ns":36560,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":17,"latency_ns":43051,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":18,"latency_ns":40110,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":19,"latency_ns":36961,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":20,"latency_ns":39012,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":21,"latency_ns":38371,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":22,"latency_ns":39770,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":23,"latency_ns":38581,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":24,"latency_ns":52740,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":25,"latency_ns":46700,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":26,"latency_ns":39200,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":27,"latency_ns":49219,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":28,"latency_ns":75221,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":29,"latency_ns":37880,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8}],"latency":{"repetitions":30,"min_ns":36560,"p50_ns":40110,"p95_ns":65330,"p99_ns":75221,"max_ns":75221,"mean_ns":44301.9,"sample_stddev_ns":8728.245493995244},"cpu_ticks":0,"cpu_ms":0.0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732},"commit":{"scope":"production_adapter_parse_normalize_sanitize_commit_and_project","raw_samples":[{"repetition":0,"latency_ns":77057695,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":60268,"record_count":8},{"repetition":1,"latency_ns":74654534,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"record_count":8},{"repetition":2,"latency_ns":75587326,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"record_count":8},{"repetition":3,"latency_ns":77173987,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"record_count":8},{"repetition":4,"latency_ns":76422556,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"record_count":8},{"repetition":5,"latency_ns":78664345,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"record_count":8},{"repetition":6,"latency_ns":73815323,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"record_count":8},{"repetition":7,"latency_ns":79409585,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"record_count":8},{"repetition":8,"latency_ns":74626774,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"record_count":8},{"repetition":9,"latency_ns":77298897,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"record_count":8},{"repetition":10,"latency_ns":80021221,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"record_count":8},{"repetition":11,"latency_ns":76176713,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"record_count":8},{"repetition":12,"latency_ns":77460688,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"record_count":8},{"repetition":13,"latency_ns":76331256,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"record_count":8},{"repetition":14,"latency_ns":78708234,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"record_count":8},{"repetition":15,"latency_ns":80707380,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"record_count":8},{"repetition":16,"latency_ns":77017282,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"record_count":8},{"repetition":17,"latency_ns":75251240,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"record_count":8},{"repetition":18,"latency_ns":76662287,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"record_count":8},{"repetition":19,"latency_ns":77046954,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"record_count":8},{"repetition":20,"latency_ns":76092970,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"record_count":8},{"repetition":21,"latency_ns":77274126,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"record_count":8},{"repetition":22,"latency_ns":75196200,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"record_count":8},{"repetition":23,"latency_ns":76264313,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"record_count":8},{"repetition":24,"latency_ns":76878651,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"record_count":8},{"repetition":25,"latency_ns":79555735,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"record_count":8},{"repetition":26,"latency_ns":74662371,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"record_count":8},{"repetition":27,"latency_ns":81144994,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"record_count":8},{"repetition":28,"latency_ns":81402388,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"record_count":8},{"repetition":29,"latency_ns":77731240,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"record_count":8}],"latency":{"repetitions":30,"min_ns":73815323,"p50_ns":77017282,"p95_ns":81144994,"p99_ns":81402388,"max_ns":81402388,"mean_ns":77209908.83333333,"sample_stddev_ns":1992095.397514301},"cpu_ticks":163,"cpu_ms":1630.0,"process_write_bytes":38952960,"database_storage_growth_bytes":36956400,"peak_rss_kib":61732},"replay":{"scope":"authoritative_store_bounded_replay","raw_samples":[{"repetition":0,"latency_ns":300093,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":60268,"record_count":8},{"repetition":1,"latency_ns":298213,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":2,"latency_ns":328114,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":3,"latency_ns":325084,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":4,"latency_ns":324914,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":5,"latency_ns":320683,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":6,"latency_ns":302724,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":7,"latency_ns":301235,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":8,"latency_ns":298933,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":9,"latency_ns":306804,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":10,"latency_ns":324694,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":11,"latency_ns":328804,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":12,"latency_ns":301914,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":13,"latency_ns":304165,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":14,"latency_ns":308753,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":15,"latency_ns":310125,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":16,"latency_ns":300283,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":17,"latency_ns":300974,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":18,"latency_ns":320425,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":19,"latency_ns":299944,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":20,"latency_ns":338314,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":21,"latency_ns":299734,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":22,"latency_ns":321775,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":23,"latency_ns":321364,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":24,"latency_ns":324694,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":25,"latency_ns":323684,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":26,"latency_ns":317584,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":27,"latency_ns":310854,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":28,"latency_ns":371634,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":29,"latency_ns":324084,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8}],"latency":{"repetitions":30,"min_ns":298213,"p50_ns":310854,"p95_ns":338314,"p99_ns":371634,"max_ns":371634,"mean_ns":315353.3,"sample_stddev_ns":15780.374996964667},"cpu_ticks":0,"cpu_ms":0.0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732},"pipeline_raw_samples":[{"repetition":0,"latency_ns":77522341,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":60268,"replayed_observations":8},{"repetition":1,"latency_ns":75128979,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":2,"latency_ns":76080953,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":3,"latency_ns":77667823,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":4,"latency_ns":76911741,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":5,"latency_ns":79150231,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":6,"latency_ns":74307119,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":7,"latency_ns":79872769,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":8,"latency_ns":75087518,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":9,"latency_ns":77802253,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":10,"latency_ns":80514667,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":11,"latency_ns":76666799,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":12,"latency_ns":77950975,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":13,"latency_ns":76810010,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":14,"latency_ns":79208331,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":15,"latency_ns":81201226,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":16,"latency_ns":77478660,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":17,"latency_ns":75742727,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":18,"latency_ns":77153255,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":19,"latency_ns":77522429,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":20,"latency_ns":76604798,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":21,"latency_ns":77734642,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":22,"latency_ns":75681536,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":23,"latency_ns":76751000,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":24,"latency_ns":77376317,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":25,"latency_ns":80039000,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":26,"latency_ns":75155050,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":27,"latency_ns":81675859,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":28,"latency_ns":81983195,"cpu_ticks":5,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":29,"latency_ns":78216418,"cpu_ticks":6,"process_write_bytes":1298432,"database_storage_growth_bytes":1231880,"peak_rss_kib":61732,"replayed_observations":8}],"pipeline_latency":{"repetitions":30,"min_ns":74307119,"p50_ns":77478660,"p95_ns":81675859,"p99_ns":81983195,"max_ns":81983195,"mean_ns":77699954.03333333,"sample_stddev_ns":2002528.039761491},"pipeline_records_per_second":102.96016387047017,"pipeline_cpu_ticks":163,"pipeline_cpu_ms":1630.0,"pipeline_process_write_bytes":38952960,"pipeline_database_storage_growth_bytes":36956400,"peak_rss_kib":61732,"no_op_raw_samples":[{"repetition":0,"latency_ns":183463,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":60268,"replayed_observations":0},{"repetition":1,"latency_ns":209183,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":2,"latency_ns":187633,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":3,"latency_ns":196573,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":4,"latency_ns":192373,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":5,"latency_ns":191233,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":6,"latency_ns":249644,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":7,"latency_ns":196083,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":8,"latency_ns":212523,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":9,"latency_ns":259272,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":10,"latency_ns":193362,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":11,"latency_ns":193053,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":12,"latency_ns":192602,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":13,"latency_ns":214443,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":14,"latency_ns":255264,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":15,"latency_ns":199993,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":16,"latency_ns":222223,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":17,"latency_ns":238682,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":18,"latency_ns":190033,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":19,"latency_ns":190203,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":20,"latency_ns":196733,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":21,"latency_ns":191452,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":22,"latency_ns":188823,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":23,"latency_ns":189803,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":24,"latency_ns":191561,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":25,"latency_ns":185622,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":26,"latency_ns":187832,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":27,"latency_ns":248352,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":28,"latency_ns":233092,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":29,"latency_ns":184363,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0}],"no_op_latency":{"repetitions":30,"min_ns":183463,"p50_ns":193053,"p95_ns":255264,"p99_ns":259272,"max_ns":259272,"mean_ns":205515.7,"sample_stddev_ns":23419.78395634915},"no_op_cpu_ticks":0,"no_op_cpu_ms":0.0,"no_op_process_write_bytes":0,"no_op_database_storage_growth_bytes":0,"no_op_observation_count_delta":0},{"provider":"codex","production_path":"codex_production_observation_pipeline_v1","pipeline_scope":"production_parse_normalize_sanitize_commit_project_and_replay","measured_repetitions":30,"observations_per_repetition":8,"replay_limit":9,"max_backlog_records":8,"parse":{"scope":"native_provider_format_decode","raw_samples":[{"repetition":0,"latency_ns":16140,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":60268,"record_count":8},{"repetition":1,"latency_ns":17571,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":2,"latency_ns":18801,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":3,"latency_ns":18051,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":4,"latency_ns":26511,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":5,"latency_ns":16600,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":6,"latency_ns":25361,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":7,"latency_ns":18261,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":8,"latency_ns":16909,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":9,"latency_ns":24509,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":10,"latency_ns":18760,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":11,"latency_ns":16541,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":12,"latency_ns":24690,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":13,"latency_ns":19710,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":14,"latency_ns":25390,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":15,"latency_ns":16050,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":16,"latency_ns":18789,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":17,"latency_ns":21701,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":18,"latency_ns":16170,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":19,"latency_ns":16170,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":20,"latency_ns":26960,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":21,"latency_ns":17541,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":22,"latency_ns":18290,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":23,"latency_ns":16800,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":24,"latency_ns":16630,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":25,"latency_ns":16870,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":26,"latency_ns":15960,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":27,"latency_ns":34151,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":28,"latency_ns":24651,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":29,"latency_ns":17511,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8}],"latency":{"repetitions":30,"min_ns":15960,"p50_ns":18051,"p95_ns":26960,"p99_ns":34151,"max_ns":34151,"mean_ns":19934.966666666667,"sample_stddev_ns":4505.36919137319},"cpu_ticks":0,"cpu_ms":0.0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732},"commit":{"scope":"production_adapter_parse_normalize_sanitize_commit_and_project","raw_samples":[{"repetition":0,"latency_ns":76033663,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":60652,"record_count":8},{"repetition":1,"latency_ns":76020752,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"record_count":8},{"repetition":2,"latency_ns":74499642,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"record_count":8},{"repetition":3,"latency_ns":79170651,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"record_count":8},{"repetition":4,"latency_ns":74804796,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"record_count":8},{"repetition":5,"latency_ns":77544181,"cpu_ticks":4,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"record_count":8},{"repetition":6,"latency_ns":75679258,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"record_count":8},{"repetition":7,"latency_ns":79960140,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"record_count":8},{"repetition":8,"latency_ns":77153996,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"record_count":8},{"repetition":9,"latency_ns":77163124,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"record_count":8},{"repetition":10,"latency_ns":74477982,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"record_count":8},{"repetition":11,"latency_ns":76816661,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"record_count":8},{"repetition":12,"latency_ns":79066889,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"record_count":8},{"repetition":13,"latency_ns":77334117,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"record_count":8},{"repetition":14,"latency_ns":76218433,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"record_count":8},{"repetition":15,"latency_ns":76566317,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"record_count":8},{"repetition":16,"latency_ns":77137163,"cpu_ticks":4,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"record_count":8},{"repetition":17,"latency_ns":75667856,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"record_count":8},{"repetition":18,"latency_ns":78278388,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"record_count":8},{"repetition":19,"latency_ns":76398266,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"record_count":8},{"repetition":20,"latency_ns":76327783,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"record_count":8},{"repetition":21,"latency_ns":76635437,"cpu_ticks":4,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"record_count":8},{"repetition":22,"latency_ns":73067202,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"record_count":8},{"repetition":23,"latency_ns":75781606,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"record_count":8},{"repetition":24,"latency_ns":74387500,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"record_count":8},{"repetition":25,"latency_ns":76115051,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"record_count":8},{"repetition":26,"latency_ns":78062556,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"record_count":8},{"repetition":27,"latency_ns":78625033,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"record_count":8},{"repetition":28,"latency_ns":77010312,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"record_count":8},{"repetition":29,"latency_ns":75409931,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"record_count":8}],"latency":{"repetitions":30,"min_ns":73067202,"p50_ns":76398266,"p95_ns":79170651,"p99_ns":79960140,"max_ns":79960140,"mean_ns":76580489.53333333,"sample_stddev_ns":1554281.585886519},"cpu_ticks":157,"cpu_ms":1570.0,"process_write_bytes":36126720,"database_storage_growth_bytes":34113600,"peak_rss_kib":61732},"replay":{"scope":"authoritative_store_bounded_replay","raw_samples":[{"repetition":0,"latency_ns":240563,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":60652,"record_count":8},{"repetition":1,"latency_ns":245723,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":2,"latency_ns":266553,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":3,"latency_ns":268204,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":4,"latency_ns":247913,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":5,"latency_ns":245214,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":6,"latency_ns":270084,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":7,"latency_ns":265573,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":8,"latency_ns":242893,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":9,"latency_ns":277493,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":10,"latency_ns":243792,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":11,"latency_ns":262564,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":12,"latency_ns":246784,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":13,"latency_ns":243582,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":14,"latency_ns":247363,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":15,"latency_ns":241723,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":16,"latency_ns":247624,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":17,"latency_ns":243193,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":18,"latency_ns":242472,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":19,"latency_ns":244352,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":20,"latency_ns":242174,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":21,"latency_ns":290764,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":22,"latency_ns":254023,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":23,"latency_ns":271763,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":24,"latency_ns":246473,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":25,"latency_ns":238414,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":26,"latency_ns":248893,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":27,"latency_ns":283622,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":28,"latency_ns":249662,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":29,"latency_ns":268924,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8}],"latency":{"repetitions":30,"min_ns":238414,"p50_ns":247363,"p95_ns":283622,"p99_ns":290764,"max_ns":290764,"mean_ns":254279.13333333333,"sample_stddev_ns":14331.305986962738},"cpu_ticks":0,"cpu_ms":0.0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732},"pipeline_raw_samples":[{"repetition":0,"latency_ns":76434866,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":60652,"replayed_observations":8},{"repetition":1,"latency_ns":76433336,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":2,"latency_ns":74933197,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":3,"latency_ns":79602017,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":4,"latency_ns":75244252,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":5,"latency_ns":77955055,"cpu_ticks":4,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":6,"latency_ns":76144704,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":7,"latency_ns":80405696,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":8,"latency_ns":77564160,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":9,"latency_ns":77633111,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":10,"latency_ns":74891837,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":11,"latency_ns":77237847,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":12,"latency_ns":79478304,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":13,"latency_ns":77773882,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":14,"latency_ns":76681388,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":15,"latency_ns":76994992,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":16,"latency_ns":77573208,"cpu_ticks":4,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":17,"latency_ns":76080931,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":18,"latency_ns":78680844,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":19,"latency_ns":76801711,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":20,"latency_ns":76736670,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":21,"latency_ns":77113985,"cpu_ticks":4,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":22,"latency_ns":73483258,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":23,"latency_ns":76250372,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":24,"latency_ns":74810596,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":25,"latency_ns":76518615,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":26,"latency_ns":78502981,"cpu_ticks":5,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":27,"latency_ns":79104239,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":28,"latency_ns":77457109,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":29,"latency_ns":75871178,"cpu_ticks":6,"process_write_bytes":1204224,"database_storage_growth_bytes":1137120,"peak_rss_kib":61732,"replayed_observations":8}],"pipeline_latency":{"repetitions":30,"min_ns":73483258,"p50_ns":76801711,"p95_ns":79602017,"p99_ns":80405696,"max_ns":80405696,"mean_ns":77013144.7,"sample_stddev_ns":1557072.2057943179},"pipeline_records_per_second":103.87837077895612,"pipeline_cpu_ticks":158,"pipeline_cpu_ms":1580.0,"pipeline_process_write_bytes":36126720,"pipeline_database_storage_growth_bytes":34113600,"peak_rss_kib":61732,"no_op_raw_samples":[{"repetition":0,"latency_ns":140252,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":60652,"replayed_observations":0},{"repetition":1,"latency_ns":114161,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":2,"latency_ns":114952,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":3,"latency_ns":116881,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":4,"latency_ns":131482,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":5,"latency_ns":112521,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":6,"latency_ns":134862,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":7,"latency_ns":128441,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":8,"latency_ns":113721,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":9,"latency_ns":135981,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":10,"latency_ns":112112,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":11,"latency_ns":112372,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":12,"latency_ns":112690,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":13,"latency_ns":124281,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":14,"latency_ns":129212,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":15,"latency_ns":116022,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":16,"latency_ns":126462,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":17,"latency_ns":116112,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":18,"latency_ns":123091,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":19,"latency_ns":123652,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":20,"latency_ns":139302,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":21,"latency_ns":139092,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":22,"latency_ns":114940,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":23,"latency_ns":131601,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":24,"latency_ns":115122,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":25,"latency_ns":115152,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":26,"latency_ns":164511,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":27,"latency_ns":135322,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":28,"latency_ns":149973,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":29,"latency_ns":118852,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0}],"no_op_latency":{"repetitions":30,"min_ns":112112,"p50_ns":123091,"p95_ns":149973,"p99_ns":164511,"max_ns":164511,"mean_ns":125437.56666666667,"sample_stddev_ns":12865.380074483597},"no_op_cpu_ticks":1,"no_op_cpu_ms":10.0,"no_op_process_write_bytes":0,"no_op_database_storage_growth_bytes":0,"no_op_observation_count_delta":0},{"provider":"cursor","production_path":"cursor_production_observation_pipeline_v1","pipeline_scope":"production_parse_normalize_sanitize_commit_project_and_replay","measured_repetitions":30,"observations_per_repetition":8,"replay_limit":9,"max_backlog_records":8,"parse":{"scope":"native_provider_format_decode","raw_samples":[{"repetition":0,"latency_ns":31181,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":60652,"record_count":8},{"repetition":1,"latency_ns":24881,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":2,"latency_ns":25330,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":3,"latency_ns":22501,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":4,"latency_ns":32179,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":5,"latency_ns":22741,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":6,"latency_ns":26570,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":7,"latency_ns":25280,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":8,"latency_ns":22901,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":9,"latency_ns":31550,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":10,"latency_ns":25539,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":11,"latency_ns":23190,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":12,"latency_ns":24201,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":13,"latency_ns":28520,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":14,"latency_ns":25781,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":15,"latency_ns":27620,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":16,"latency_ns":25912,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":17,"latency_ns":25081,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":18,"latency_ns":24900,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":19,"latency_ns":24491,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":20,"latency_ns":24630,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":21,"latency_ns":24841,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":22,"latency_ns":22291,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":23,"latency_ns":22921,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":24,"latency_ns":23560,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":25,"latency_ns":27820,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":26,"latency_ns":34781,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":27,"latency_ns":43370,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":28,"latency_ns":30570,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":29,"latency_ns":24520,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8}],"latency":{"repetitions":30,"min_ns":22291,"p50_ns":25081,"p95_ns":34781,"p99_ns":43370,"max_ns":43370,"mean_ns":26655.1,"sample_stddev_ns":4473.258854879586},"cpu_ticks":1,"cpu_ms":10.0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732},"commit":{"scope":"production_adapter_parse_normalize_sanitize_commit_and_project","raw_samples":[{"repetition":0,"latency_ns":79458326,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61036,"record_count":8},{"repetition":1,"latency_ns":77374089,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"record_count":8},{"repetition":2,"latency_ns":75798429,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"record_count":8},{"repetition":3,"latency_ns":76849860,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"record_count":8},{"repetition":4,"latency_ns":81089965,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"record_count":8},{"repetition":5,"latency_ns":78944388,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"record_count":8},{"repetition":6,"latency_ns":77224086,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"record_count":8},{"repetition":7,"latency_ns":79878090,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"record_count":8},{"repetition":8,"latency_ns":78342919,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"record_count":8},{"repetition":9,"latency_ns":81278707,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"record_count":8},{"repetition":10,"latency_ns":89296698,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"record_count":8},{"repetition":11,"latency_ns":82154017,"cpu_ticks":4,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"record_count":8},{"repetition":12,"latency_ns":80121812,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"record_count":8},{"repetition":13,"latency_ns":86689975,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"record_count":8},{"repetition":14,"latency_ns":74912676,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"record_count":8},{"repetition":15,"latency_ns":81364889,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"record_count":8},{"repetition":16,"latency_ns":80018480,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"record_count":8},{"repetition":17,"latency_ns":80330685,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"record_count":8},{"repetition":18,"latency_ns":79994850,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"record_count":8},{"repetition":19,"latency_ns":77602270,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"record_count":8},{"repetition":20,"latency_ns":78763185,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"record_count":8},{"repetition":21,"latency_ns":78763265,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"record_count":8},{"repetition":22,"latency_ns":75898929,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"record_count":8},{"repetition":23,"latency_ns":77968604,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"record_count":8},{"repetition":24,"latency_ns":81198874,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"record_count":8},{"repetition":25,"latency_ns":76301883,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"record_count":8},{"repetition":26,"latency_ns":90518293,"cpu_ticks":7,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"record_count":8},{"repetition":27,"latency_ns":77185644,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"record_count":8},{"repetition":28,"latency_ns":78265238,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"record_count":8},{"repetition":29,"latency_ns":80209094,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"record_count":8}],"latency":{"repetitions":30,"min_ns":74912676,"p50_ns":78944388,"p95_ns":89296698,"p99_ns":90518293,"max_ns":90518293,"mean_ns":79793274.0,"sample_stddev_ns":3610592.6428761687},"cpu_ticks":166,"cpu_ms":1660.0,"process_write_bytes":39936000,"database_storage_growth_bytes":37945200,"peak_rss_kib":61732},"replay":{"scope":"authoritative_store_bounded_replay","raw_samples":[{"repetition":0,"latency_ns":340956,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61036,"record_count":8},{"repetition":1,"latency_ns":335764,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":2,"latency_ns":374925,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":3,"latency_ns":358154,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":4,"latency_ns":332583,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":5,"latency_ns":327505,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":6,"latency_ns":335094,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":7,"latency_ns":350816,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":8,"latency_ns":332754,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":9,"latency_ns":339455,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":10,"latency_ns":328705,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":11,"latency_ns":350463,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":12,"latency_ns":337594,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":13,"latency_ns":329724,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":14,"latency_ns":332985,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":15,"latency_ns":335684,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":16,"latency_ns":334154,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":17,"latency_ns":350465,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":18,"latency_ns":326505,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":19,"latency_ns":326743,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":20,"latency_ns":350964,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":21,"latency_ns":331984,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":22,"latency_ns":331235,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":23,"latency_ns":346873,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":24,"latency_ns":350944,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":25,"latency_ns":342464,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":26,"latency_ns":339864,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":27,"latency_ns":330594,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":28,"latency_ns":334285,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":29,"latency_ns":369624,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8}],"latency":{"repetitions":30,"min_ns":326505,"p50_ns":335684,"p95_ns":369624,"p99_ns":374925,"max_ns":374925,"mean_ns":340328.63333333336,"sample_stddev_ns":12206.370435381154},"cpu_ticks":2,"cpu_ms":20.0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732},"pipeline_raw_samples":[{"repetition":0,"latency_ns":80002301,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61036,"replayed_observations":8},{"repetition":1,"latency_ns":77895215,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":2,"latency_ns":76342736,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":3,"latency_ns":77374148,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":4,"latency_ns":81586671,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":5,"latency_ns":79438965,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":6,"latency_ns":77746352,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":7,"latency_ns":80395396,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":8,"latency_ns":78843696,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":9,"latency_ns":81802674,"cpu_ticks":7,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":10,"latency_ns":89802836,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":11,"latency_ns":82670044,"cpu_ticks":4,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":12,"latency_ns":80637289,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":13,"latency_ns":87195532,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":14,"latency_ns":75433402,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":15,"latency_ns":81880964,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":16,"latency_ns":80522097,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":17,"latency_ns":80888701,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":18,"latency_ns":80482466,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":19,"latency_ns":78095845,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":20,"latency_ns":79284932,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":21,"latency_ns":79269990,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":22,"latency_ns":76391745,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":23,"latency_ns":78495301,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":24,"latency_ns":81715972,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":25,"latency_ns":76820630,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":26,"latency_ns":91054409,"cpu_ticks":7,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":27,"latency_ns":77697291,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":28,"latency_ns":78797384,"cpu_ticks":6,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":29,"latency_ns":80781650,"cpu_ticks":5,"process_write_bytes":1331200,"database_storage_growth_bytes":1264840,"peak_rss_kib":61732,"replayed_observations":8}],"pipeline_latency":{"repetitions":30,"min_ns":75433402,"p50_ns":79438965,"p95_ns":89802836,"p99_ns":91054409,"max_ns":91054409,"mean_ns":80311554.46666667,"sample_stddev_ns":3610821.330803234},"pipeline_records_per_second":99.61206769220738,"pipeline_cpu_ticks":170,"pipeline_cpu_ms":1700.0,"pipeline_process_write_bytes":39936000,"pipeline_database_storage_growth_bytes":37945200,"peak_rss_kib":61732,"no_op_raw_samples":[{"repetition":0,"latency_ns":896111,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61036,"replayed_observations":0},{"repetition":1,"latency_ns":727980,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":2,"latency_ns":744619,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":3,"latency_ns":738210,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":4,"latency_ns":733220,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":5,"latency_ns":732529,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":6,"latency_ns":723479,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":7,"latency_ns":730930,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":8,"latency_ns":746929,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":9,"latency_ns":840870,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":10,"latency_ns":718289,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":11,"latency_ns":776700,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":12,"latency_ns":713259,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":13,"latency_ns":796100,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":14,"latency_ns":797060,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":15,"latency_ns":772620,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":16,"latency_ns":751850,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":17,"latency_ns":859371,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":18,"latency_ns":722009,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":19,"latency_ns":736998,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":20,"latency_ns":740801,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":21,"latency_ns":733108,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":22,"latency_ns":729920,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":23,"latency_ns":739530,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":24,"latency_ns":736530,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":25,"latency_ns":710299,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":26,"latency_ns":845851,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":27,"latency_ns":844921,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":28,"latency_ns":845851,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":29,"latency_ns":890850,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0}],"no_op_latency":{"repetitions":30,"min_ns":710299,"p50_ns":739530,"p95_ns":890850,"p99_ns":896111,"max_ns":896111,"mean_ns":769226.4666666667,"sample_stddev_ns":56181.35742073861},"no_op_cpu_ticks":4,"no_op_cpu_ms":40.0,"no_op_process_write_bytes":0,"no_op_database_storage_growth_bytes":0,"no_op_observation_count_delta":0},{"provider":"hermes","production_path":"hermes_production_observation_pipeline_v1","pipeline_scope":"production_parse_normalize_sanitize_commit_project_and_replay","measured_repetitions":30,"observations_per_repetition":8,"replay_limit":9,"max_backlog_records":8,"parse":{"scope":"native_provider_format_decode","raw_samples":[{"repetition":0,"latency_ns":134421,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61036,"record_count":8},{"repetition":1,"latency_ns":131482,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":2,"latency_ns":134391,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":3,"latency_ns":152712,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":4,"latency_ns":121692,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":5,"latency_ns":122121,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":6,"latency_ns":123782,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":7,"latency_ns":121951,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":8,"latency_ns":125051,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":9,"latency_ns":131422,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":10,"latency_ns":129812,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":11,"latency_ns":128062,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":12,"latency_ns":126842,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":13,"latency_ns":138351,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":14,"latency_ns":126802,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":15,"latency_ns":122952,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":16,"latency_ns":141472,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":17,"latency_ns":125182,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":18,"latency_ns":148701,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":19,"latency_ns":121281,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":20,"latency_ns":122031,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":21,"latency_ns":123892,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":22,"latency_ns":120902,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":23,"latency_ns":122640,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":24,"latency_ns":122502,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":25,"latency_ns":146901,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":26,"latency_ns":131872,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":27,"latency_ns":126952,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":28,"latency_ns":146411,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":29,"latency_ns":138591,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8}],"latency":{"repetitions":30,"min_ns":120902,"p50_ns":126842,"p95_ns":148701,"p99_ns":152712,"max_ns":152712,"mean_ns":130372.53333333334,"sample_stddev_ns":9235.004111917136},"cpu_ticks":0,"cpu_ms":0.0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732},"commit":{"scope":"production_adapter_parse_normalize_sanitize_commit_and_project","raw_samples":[{"repetition":0,"latency_ns":101798027,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61284,"record_count":8},{"repetition":1,"latency_ns":102298763,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"record_count":8},{"repetition":2,"latency_ns":101963358,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"record_count":8},{"repetition":3,"latency_ns":101275380,"cpu_ticks":9,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"record_count":8},{"repetition":4,"latency_ns":101764606,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"record_count":8},{"repetition":5,"latency_ns":103913723,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"record_count":8},{"repetition":6,"latency_ns":104365480,"cpu_ticks":7,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"record_count":8},{"repetition":7,"latency_ns":102361183,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"record_count":8},{"repetition":8,"latency_ns":101378912,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"record_count":8},{"repetition":9,"latency_ns":105179570,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"record_count":8},{"repetition":10,"latency_ns":102527726,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"record_count":8},{"repetition":11,"latency_ns":104475881,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"record_count":8},{"repetition":12,"latency_ns":103396916,"cpu_ticks":7,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"record_count":8},{"repetition":13,"latency_ns":102880600,"cpu_ticks":7,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"record_count":8},{"repetition":14,"latency_ns":100882846,"cpu_ticks":7,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"record_count":8},{"repetition":15,"latency_ns":100984865,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"record_count":8},{"repetition":16,"latency_ns":104086716,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"record_count":8},{"repetition":17,"latency_ns":100067082,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"record_count":8},{"repetition":18,"latency_ns":102958780,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"record_count":8},{"repetition":19,"latency_ns":106914760,"cpu_ticks":7,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"record_count":8},{"repetition":20,"latency_ns":101563413,"cpu_ticks":9,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"record_count":8},{"repetition":21,"latency_ns":99994513,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"record_count":8},{"repetition":22,"latency_ns":100858594,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"record_count":8},{"repetition":23,"latency_ns":99815730,"cpu_ticks":7,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"record_count":8},{"repetition":24,"latency_ns":103960002,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"record_count":8},{"repetition":25,"latency_ns":101028236,"cpu_ticks":7,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"record_count":8},{"repetition":26,"latency_ns":99775639,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"record_count":8},{"repetition":27,"latency_ns":103737169,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"record_count":8},{"repetition":28,"latency_ns":100904444,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"record_count":8},{"repetition":29,"latency_ns":101877415,"cpu_ticks":9,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"record_count":8}],"latency":{"repetitions":30,"min_ns":99775639,"p50_ns":101877415,"p95_ns":105179570,"p99_ns":106914760,"max_ns":106914760,"mean_ns":102299677.63333334,"sample_stddev_ns":1729391.7071237438},"cpu_ticks":236,"cpu_ms":2360.0,"process_write_bytes":33914880,"database_storage_growth_bytes":32012400,"peak_rss_kib":61732},"replay":{"scope":"authoritative_store_bounded_replay","raw_samples":[{"repetition":0,"latency_ns":346684,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61284,"record_count":8},{"repetition":1,"latency_ns":323265,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":2,"latency_ns":322964,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":3,"latency_ns":321184,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":4,"latency_ns":366195,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":5,"latency_ns":318194,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":6,"latency_ns":326334,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":7,"latency_ns":330753,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":8,"latency_ns":344045,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":9,"latency_ns":356344,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":10,"latency_ns":325854,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":11,"latency_ns":327345,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":12,"latency_ns":340764,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":13,"latency_ns":323554,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":14,"latency_ns":325744,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":15,"latency_ns":321704,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":16,"latency_ns":324884,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":17,"latency_ns":317985,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":18,"latency_ns":330214,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":19,"latency_ns":519636,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":20,"latency_ns":344073,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":21,"latency_ns":332035,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":22,"latency_ns":343835,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":23,"latency_ns":342574,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":24,"latency_ns":337345,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":25,"latency_ns":321864,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":26,"latency_ns":349054,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":27,"latency_ns":345146,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":28,"latency_ns":319035,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":29,"latency_ns":326654,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8}],"latency":{"repetitions":30,"min_ns":317985,"p50_ns":327345,"p95_ns":366195,"p99_ns":519636,"max_ns":519636,"mean_ns":339175.36666666664,"sample_stddev_ns":36235.23206577984},"cpu_ticks":0,"cpu_ms":0.0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732},"pipeline_raw_samples":[{"repetition":0,"latency_ns":102314164,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61284,"replayed_observations":8},{"repetition":1,"latency_ns":102801200,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":2,"latency_ns":102450556,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":3,"latency_ns":101763766,"cpu_ticks":9,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":4,"latency_ns":102308744,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":5,"latency_ns":104397109,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":6,"latency_ns":104861225,"cpu_ticks":7,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":7,"latency_ns":102887470,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":8,"latency_ns":101893968,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":9,"latency_ns":105733518,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":10,"latency_ns":103019482,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":11,"latency_ns":104991156,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":12,"latency_ns":103913633,"cpu_ticks":7,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":13,"latency_ns":103394845,"cpu_ticks":7,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":14,"latency_ns":101401772,"cpu_ticks":7,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":15,"latency_ns":101476902,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":16,"latency_ns":104598231,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":17,"latency_ns":100564031,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":18,"latency_ns":103498427,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":19,"latency_ns":107690110,"cpu_ticks":7,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":20,"latency_ns":102075460,"cpu_ticks":9,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":21,"latency_ns":100494838,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":22,"latency_ns":101367330,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":23,"latency_ns":100332856,"cpu_ticks":7,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":24,"latency_ns":104479868,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":25,"latency_ns":101523642,"cpu_ticks":7,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":26,"latency_ns":100328406,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":27,"latency_ns":104311357,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":28,"latency_ns":101389179,"cpu_ticks":8,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":29,"latency_ns":102398933,"cpu_ticks":9,"process_write_bytes":1130496,"database_storage_growth_bytes":1067080,"peak_rss_kib":61732,"replayed_observations":8}],"pipeline_latency":{"repetitions":30,"min_ns":100328406,"p50_ns":102398933,"p95_ns":105733518,"p99_ns":107690110,"max_ns":107690110,"mean_ns":102822072.6,"sample_stddev_ns":1758218.5904130857},"pipeline_records_per_second":77.80430599878805,"pipeline_cpu_ticks":236,"pipeline_cpu_ms":2360.0,"pipeline_process_write_bytes":33914880,"pipeline_database_storage_growth_bytes":32012400,"peak_rss_kib":61732,"no_op_raw_samples":[{"repetition":0,"latency_ns":23907433,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61284,"replayed_observations":0},{"repetition":1,"latency_ns":23958303,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":2,"latency_ns":24326188,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":3,"latency_ns":24007523,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":4,"latency_ns":23716160,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":5,"latency_ns":23805721,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":6,"latency_ns":23995944,"cpu_ticks":4,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":7,"latency_ns":24122515,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":8,"latency_ns":23794940,"cpu_ticks":3,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":9,"latency_ns":25665985,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":10,"latency_ns":24133305,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":11,"latency_ns":23811760,"cpu_ticks":3,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":12,"latency_ns":23777240,"cpu_ticks":3,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":13,"latency_ns":23776401,"cpu_ticks":3,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":14,"latency_ns":23883512,"cpu_ticks":3,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":15,"latency_ns":23722240,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":16,"latency_ns":23950552,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":17,"latency_ns":23945742,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":18,"latency_ns":24617371,"cpu_ticks":3,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":19,"latency_ns":33878158,"cpu_ticks":4,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":20,"latency_ns":23718940,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":21,"latency_ns":23891431,"cpu_ticks":3,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":22,"latency_ns":23849520,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":23,"latency_ns":23842780,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":24,"latency_ns":24066804,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":25,"latency_ns":24165746,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":26,"latency_ns":24244606,"cpu_ticks":3,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":27,"latency_ns":23973204,"cpu_ticks":3,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":28,"latency_ns":24399898,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":29,"latency_ns":23895853,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0}],"no_op_latency":{"repetitions":30,"min_ns":23716160,"p50_ns":23945742,"p95_ns":25665985,"p99_ns":33878158,"max_ns":33878158,"mean_ns":24361525.833333332,"sample_stddev_ns":1836001.133079229},"no_op_cpu_ticks":73,"no_op_cpu_ms":730.0,"no_op_process_write_bytes":0,"no_op_database_storage_growth_bytes":0,"no_op_observation_count_delta":0},{"provider":"kiro","production_path":"kiro_production_observation_pipeline_v1","pipeline_scope":"production_parse_normalize_sanitize_commit_project_and_replay","measured_repetitions":30,"observations_per_repetition":8,"replay_limit":9,"max_backlog_records":8,"parse":{"scope":"native_provider_format_decode","raw_samples":[{"repetition":0,"latency_ns":17960,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61284,"record_count":8},{"repetition":1,"latency_ns":20471,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":2,"latency_ns":20750,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":3,"latency_ns":19241,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":4,"latency_ns":19780,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":5,"latency_ns":31090,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":6,"latency_ns":19709,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":7,"latency_ns":30220,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":8,"latency_ns":18652,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":9,"latency_ns":20330,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":10,"latency_ns":17560,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":11,"latency_ns":22779,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":12,"latency_ns":23550,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":13,"latency_ns":23099,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":14,"latency_ns":22100,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":15,"latency_ns":18471,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":16,"latency_ns":24040,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":17,"latency_ns":21841,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":18,"latency_ns":22620,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":19,"latency_ns":36921,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":20,"latency_ns":17121,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":21,"latency_ns":18241,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":22,"latency_ns":19030,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":23,"latency_ns":34102,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":24,"latency_ns":20510,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":25,"latency_ns":19701,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":26,"latency_ns":25050,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":27,"latency_ns":26999,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":28,"latency_ns":19950,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":29,"latency_ns":27420,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8}],"latency":{"repetitions":30,"min_ns":17121,"p50_ns":20510,"p95_ns":34102,"p99_ns":36921,"max_ns":36921,"mean_ns":22643.6,"sample_stddev_ns":4989.54773432457},"cpu_ticks":1,"cpu_ms":10.0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732},"commit":{"scope":"production_adapter_parse_normalize_sanitize_commit_and_project","raw_samples":[{"repetition":0,"latency_ns":77614262,"cpu_ticks":6,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61540,"record_count":8},{"repetition":1,"latency_ns":77027194,"cpu_ticks":5,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"record_count":8},{"repetition":2,"latency_ns":78153369,"cpu_ticks":5,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"record_count":8},{"repetition":3,"latency_ns":76484797,"cpu_ticks":5,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"record_count":8},{"repetition":4,"latency_ns":79295913,"cpu_ticks":5,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"record_count":8},{"repetition":5,"latency_ns":80283095,"cpu_ticks":5,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"record_count":8},{"repetition":6,"latency_ns":79551395,"cpu_ticks":6,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"record_count":8},{"repetition":7,"latency_ns":78610373,"cpu_ticks":4,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"record_count":8},{"repetition":8,"latency_ns":78532422,"cpu_ticks":6,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"record_count":8},{"repetition":9,"latency_ns":76698670,"cpu_ticks":6,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"record_count":8},{"repetition":10,"latency_ns":78478093,"cpu_ticks":5,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"record_count":8},{"repetition":11,"latency_ns":80331035,"cpu_ticks":6,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"record_count":8},{"repetition":12,"latency_ns":77943245,"cpu_ticks":6,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"record_count":8},{"repetition":13,"latency_ns":77571900,"cpu_ticks":5,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"record_count":8},{"repetition":14,"latency_ns":77613960,"cpu_ticks":4,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"record_count":8},{"repetition":15,"latency_ns":78103877,"cpu_ticks":5,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"record_count":8},{"repetition":16,"latency_ns":79842517,"cpu_ticks":6,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"record_count":8},{"repetition":17,"latency_ns":75791628,"cpu_ticks":6,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"record_count":8},{"repetition":18,"latency_ns":73738561,"cpu_ticks":4,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"record_count":8},{"repetition":19,"latency_ns":88071252,"cpu_ticks":6,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"record_count":8},{"repetition":20,"latency_ns":78500472,"cpu_ticks":6,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"record_count":8},{"repetition":21,"latency_ns":77787962,"cpu_ticks":5,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"record_count":8},{"repetition":22,"latency_ns":76012309,"cpu_ticks":5,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"record_count":8},{"repetition":23,"latency_ns":75592103,"cpu_ticks":6,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"record_count":8},{"repetition":24,"latency_ns":80607359,"cpu_ticks":5,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"record_count":8},{"repetition":25,"latency_ns":87190502,"cpu_ticks":6,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"record_count":8},{"repetition":26,"latency_ns":74198836,"cpu_ticks":6,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"record_count":8},{"repetition":27,"latency_ns":81302266,"cpu_ticks":5,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"record_count":8},{"repetition":28,"latency_ns":74457260,"cpu_ticks":5,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"record_count":8},{"repetition":29,"latency_ns":75005147,"cpu_ticks":4,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"record_count":8}],"latency":{"repetitions":30,"min_ns":73738561,"p50_ns":77943245,"p95_ns":87190502,"p99_ns":88071252,"max_ns":88071252,"mean_ns":78346392.46666667,"sample_stddev_ns":3181386.526744922},"cpu_ticks":159,"cpu_ms":1590.0,"process_write_bytes":37724160,"database_storage_growth_bytes":35720400,"peak_rss_kib":61732},"replay":{"scope":"authoritative_store_bounded_replay","raw_samples":[{"repetition":0,"latency_ns":254452,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61540,"record_count":8},{"repetition":1,"latency_ns":251023,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":2,"latency_ns":256353,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":3,"latency_ns":242033,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":4,"latency_ns":241752,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":5,"latency_ns":248393,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":6,"latency_ns":241484,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":7,"latency_ns":248084,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":8,"latency_ns":267983,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":9,"latency_ns":246124,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":10,"latency_ns":257953,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":11,"latency_ns":245504,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":12,"latency_ns":245302,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":13,"latency_ns":264033,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":14,"latency_ns":243503,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":15,"latency_ns":242953,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":16,"latency_ns":244643,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":17,"latency_ns":265144,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":18,"latency_ns":244253,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":19,"latency_ns":264163,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":20,"latency_ns":246674,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":21,"latency_ns":266893,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":22,"latency_ns":247063,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":23,"latency_ns":255253,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":24,"latency_ns":243194,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":25,"latency_ns":251293,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":26,"latency_ns":249463,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":27,"latency_ns":245412,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":28,"latency_ns":241074,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":29,"latency_ns":243504,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8}],"latency":{"repetitions":30,"min_ns":241074,"p50_ns":246674,"p95_ns":266893,"p99_ns":267983,"max_ns":267983,"mean_ns":250165.16666666666,"sample_stddev_ns":8343.790489333074},"cpu_ticks":0,"cpu_ms":0.0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732},"pipeline_raw_samples":[{"repetition":0,"latency_ns":78048618,"cpu_ticks":6,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61540,"replayed_observations":8},{"repetition":1,"latency_ns":77459408,"cpu_ticks":5,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":2,"latency_ns":78587805,"cpu_ticks":5,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":3,"latency_ns":76889102,"cpu_ticks":5,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":4,"latency_ns":79700627,"cpu_ticks":5,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":5,"latency_ns":80725280,"cpu_ticks":5,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":6,"latency_ns":79973171,"cpu_ticks":6,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":7,"latency_ns":79026299,"cpu_ticks":4,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":8,"latency_ns":78969247,"cpu_ticks":6,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":9,"latency_ns":77111335,"cpu_ticks":6,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":10,"latency_ns":78909838,"cpu_ticks":5,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":11,"latency_ns":80757130,"cpu_ticks":6,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":12,"latency_ns":78377851,"cpu_ticks":6,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":13,"latency_ns":78042447,"cpu_ticks":5,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":14,"latency_ns":78023205,"cpu_ticks":4,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":15,"latency_ns":78524612,"cpu_ticks":5,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":16,"latency_ns":80266823,"cpu_ticks":6,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":17,"latency_ns":76220332,"cpu_ticks":6,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":18,"latency_ns":74149096,"cpu_ticks":4,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":19,"latency_ns":88533539,"cpu_ticks":6,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":20,"latency_ns":78910417,"cpu_ticks":6,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":21,"latency_ns":78235268,"cpu_ticks":5,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":22,"latency_ns":76433665,"cpu_ticks":5,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":23,"latency_ns":76030750,"cpu_ticks":6,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":24,"latency_ns":81013352,"cpu_ticks":5,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":25,"latency_ns":87630936,"cpu_ticks":6,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":26,"latency_ns":74657213,"cpu_ticks":6,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":27,"latency_ns":81722681,"cpu_ticks":5,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":28,"latency_ns":74856896,"cpu_ticks":5,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":29,"latency_ns":75424483,"cpu_ticks":4,"process_write_bytes":1257472,"database_storage_growth_bytes":1190680,"peak_rss_kib":61732,"replayed_observations":8}],"pipeline_latency":{"repetitions":30,"min_ns":74149096,"p50_ns":78377851,"p95_ns":87630936,"p99_ns":88533539,"max_ns":88533539,"mean_ns":78773714.2,"sample_stddev_ns":3186429.219612767},"pipeline_records_per_second":101.55671953830507,"pipeline_cpu_ticks":159,"pipeline_cpu_ms":1590.0,"pipeline_process_write_bytes":37724160,"pipeline_database_storage_growth_bytes":35720400,"peak_rss_kib":61732,"no_op_raw_samples":[{"repetition":0,"latency_ns":2003715,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61540,"replayed_observations":0},{"repetition":1,"latency_ns":2075186,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":2,"latency_ns":1990926,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":3,"latency_ns":1990456,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":4,"latency_ns":1971435,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":5,"latency_ns":2132637,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":6,"latency_ns":1982226,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":7,"latency_ns":2039346,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":8,"latency_ns":2057555,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":9,"latency_ns":2021465,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":10,"latency_ns":1991725,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":11,"latency_ns":2162527,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":12,"latency_ns":2117918,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":13,"latency_ns":2091056,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":14,"latency_ns":2023475,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":15,"latency_ns":2004866,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":16,"latency_ns":2029536,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":17,"latency_ns":1980735,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":18,"latency_ns":1989274,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":19,"latency_ns":2120836,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":20,"latency_ns":2019656,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":21,"latency_ns":1992434,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":22,"latency_ns":1991824,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":23,"latency_ns":1984576,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":24,"latency_ns":1972105,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":25,"latency_ns":2086466,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":26,"latency_ns":2105896,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":27,"latency_ns":2044157,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":28,"latency_ns":1932396,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":29,"latency_ns":2018486,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0}],"no_op_latency":{"repetitions":30,"min_ns":1932396,"p50_ns":2018486,"p95_ns":2132637,"p99_ns":2162527,"max_ns":2162527,"mean_ns":2030829.7,"sample_stddev_ns":56831.457290865306},"no_op_cpu_ticks":6,"no_op_cpu_ms":60.0,"no_op_process_write_bytes":0,"no_op_database_storage_growth_bytes":0,"no_op_observation_count_delta":0},{"provider":"cline","production_path":"cline_production_observation_pipeline_v1","pipeline_scope":"production_parse_normalize_sanitize_commit_project_and_replay","measured_repetitions":30,"observations_per_repetition":8,"replay_limit":9,"max_backlog_records":8,"parse":{"scope":"native_provider_format_decode","raw_samples":[{"repetition":0,"latency_ns":22971,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61540,"record_count":8},{"repetition":1,"latency_ns":31651,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":2,"latency_ns":24320,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":3,"latency_ns":25131,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":4,"latency_ns":33859,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":5,"latency_ns":33721,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":6,"latency_ns":25809,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":7,"latency_ns":31341,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":8,"latency_ns":28951,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":9,"latency_ns":26620,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":10,"latency_ns":23481,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":11,"latency_ns":24529,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":12,"latency_ns":28801,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":13,"latency_ns":28189,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":14,"latency_ns":27041,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":15,"latency_ns":23480,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":16,"latency_ns":29339,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":17,"latency_ns":26870,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":18,"latency_ns":26041,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":19,"latency_ns":26650,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":20,"latency_ns":26851,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":21,"latency_ns":35011,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":22,"latency_ns":25270,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":23,"latency_ns":27090,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":24,"latency_ns":22761,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":25,"latency_ns":25951,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":26,"latency_ns":31010,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":27,"latency_ns":29900,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":28,"latency_ns":23660,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":29,"latency_ns":24100,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8}],"latency":{"repetitions":30,"min_ns":22761,"p50_ns":26650,"p95_ns":33859,"p99_ns":35011,"max_ns":35011,"mean_ns":27346.633333333335,"sample_stddev_ns":3392.486622170999},"cpu_ticks":0,"cpu_ms":0.0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732},"commit":{"scope":"production_adapter_parse_normalize_sanitize_commit_and_project","raw_samples":[{"repetition":0,"latency_ns":80149734,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":1,"latency_ns":79593237,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":2,"latency_ns":78559433,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":3,"latency_ns":78536984,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":4,"latency_ns":83217582,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":5,"latency_ns":80971993,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":6,"latency_ns":81775354,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":7,"latency_ns":77999476,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":8,"latency_ns":80323046,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":9,"latency_ns":77072604,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":10,"latency_ns":81332528,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":11,"latency_ns":84962433,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":12,"latency_ns":79369523,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":13,"latency_ns":80308026,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":14,"latency_ns":76731539,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":15,"latency_ns":80153803,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":16,"latency_ns":81608601,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":17,"latency_ns":79823298,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":18,"latency_ns":78224758,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":19,"latency_ns":94396142,"cpu_ticks":7,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":20,"latency_ns":78951648,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":21,"latency_ns":78262348,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":22,"latency_ns":78478712,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":23,"latency_ns":78690993,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":24,"latency_ns":81500079,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":25,"latency_ns":79725047,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":26,"latency_ns":81140603,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":27,"latency_ns":77867563,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":28,"latency_ns":79940329,"cpu_ticks":4,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":29,"latency_ns":75282871,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8}],"latency":{"repetitions":30,"min_ns":75282871,"p50_ns":79725047,"p95_ns":84962433,"p99_ns":94396142,"max_ns":94396142,"mean_ns":80165009.56666666,"sample_stddev_ns":3321336.3701148},"cpu_ticks":166,"cpu_ms":1660.0,"process_write_bytes":42024960,"database_storage_growth_bytes":40046400,"peak_rss_kib":61732},"replay":{"scope":"authoritative_store_bounded_replay","raw_samples":[{"repetition":0,"latency_ns":273674,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":1,"latency_ns":272163,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":2,"latency_ns":290814,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":3,"latency_ns":284064,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":4,"latency_ns":262073,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":5,"latency_ns":278563,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":6,"latency_ns":285174,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":7,"latency_ns":287764,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":8,"latency_ns":275424,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":9,"latency_ns":265283,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":10,"latency_ns":276883,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":11,"latency_ns":263313,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":12,"latency_ns":261993,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":13,"latency_ns":287803,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":14,"latency_ns":284123,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":15,"latency_ns":261643,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":16,"latency_ns":275585,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":17,"latency_ns":261413,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":18,"latency_ns":283653,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":19,"latency_ns":267474,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":20,"latency_ns":265953,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":21,"latency_ns":263593,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":22,"latency_ns":281863,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":23,"latency_ns":266903,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":24,"latency_ns":281394,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":25,"latency_ns":283644,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":26,"latency_ns":347746,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":27,"latency_ns":268193,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":28,"latency_ns":283924,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":29,"latency_ns":260643,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8}],"latency":{"repetitions":30,"min_ns":260643,"p50_ns":275424,"p95_ns":290814,"p99_ns":347746,"max_ns":347746,"mean_ns":276757.8333333333,"sample_stddev_ns":16511.0415534018},"cpu_ticks":0,"cpu_ms":0.0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732},"pipeline_raw_samples":[{"repetition":0,"latency_ns":80628089,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":1,"latency_ns":80055722,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":2,"latency_ns":79011838,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":3,"latency_ns":78992788,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":4,"latency_ns":83638558,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":5,"latency_ns":81454369,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":6,"latency_ns":82261060,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":7,"latency_ns":78462962,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":8,"latency_ns":80778031,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":9,"latency_ns":77521400,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":10,"latency_ns":81789644,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":11,"latency_ns":85390960,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":12,"latency_ns":79810488,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":13,"latency_ns":80772120,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":14,"latency_ns":77179874,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":15,"latency_ns":80576579,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":16,"latency_ns":82078636,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":17,"latency_ns":80250353,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":18,"latency_ns":78673673,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":19,"latency_ns":94864039,"cpu_ticks":7,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":20,"latency_ns":79384942,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":21,"latency_ns":78688084,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":22,"latency_ns":78933396,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":23,"latency_ns":79118529,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":24,"latency_ns":81944665,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":25,"latency_ns":80171603,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":26,"latency_ns":81732142,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":27,"latency_ns":78321389,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":28,"latency_ns":80383135,"cpu_ticks":4,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":29,"latency_ns":75713775,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8}],"pipeline_latency":{"repetitions":30,"min_ns":75713775,"p50_ns":80171603,"p95_ns":85390960,"p99_ns":94864039,"max_ns":94864039,"mean_ns":80619428.1,"sample_stddev_ns":3326397.4335018992},"pipeline_records_per_second":99.23166398646283,"pipeline_cpu_ticks":166,"pipeline_cpu_ms":1660.0,"pipeline_process_write_bytes":42024960,"pipeline_database_storage_growth_bytes":40046400,"peak_rss_kib":61732,"no_op_raw_samples":[{"repetition":0,"latency_ns":2221818,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":1,"latency_ns":2031545,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":2,"latency_ns":1991574,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":3,"latency_ns":2027187,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":4,"latency_ns":1992145,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":5,"latency_ns":2118458,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":6,"latency_ns":2101296,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":7,"latency_ns":2075027,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":8,"latency_ns":2040265,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":9,"latency_ns":2103427,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":10,"latency_ns":2028105,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":11,"latency_ns":2048577,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":12,"latency_ns":2053025,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":13,"latency_ns":2061246,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":14,"latency_ns":2002486,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":15,"latency_ns":2024504,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":16,"latency_ns":2051565,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":17,"latency_ns":2020084,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":18,"latency_ns":1997565,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":19,"latency_ns":2173378,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":20,"latency_ns":2003574,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":21,"latency_ns":2021296,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":22,"latency_ns":1987484,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":23,"latency_ns":1997436,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":24,"latency_ns":2026406,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":25,"latency_ns":1994876,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":26,"latency_ns":2784865,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":27,"latency_ns":2090156,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":28,"latency_ns":1961485,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":29,"latency_ns":2072755,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0}],"no_op_latency":{"repetitions":30,"min_ns":1961485,"p50_ns":2028105,"p95_ns":2221818,"p99_ns":2784865,"max_ns":2784865,"mean_ns":2070120.3333333333,"sample_stddev_ns":146396.13371598482},"no_op_cpu_ticks":9,"no_op_cpu_ms":90.0,"no_op_process_write_bytes":0,"no_op_database_storage_growth_bytes":0,"no_op_observation_count_delta":0},{"provider":"roo-code","production_path":"roo-code_production_observation_pipeline_v1","pipeline_scope":"production_parse_normalize_sanitize_commit_project_and_replay","measured_repetitions":30,"observations_per_repetition":8,"replay_limit":9,"max_backlog_records":8,"parse":{"scope":"native_provider_format_decode","raw_samples":[{"repetition":0,"latency_ns":24760,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":1,"latency_ns":27241,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":2,"latency_ns":24150,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":3,"latency_ns":27070,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":4,"latency_ns":24740,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":5,"latency_ns":31511,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":6,"latency_ns":26290,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":7,"latency_ns":26051,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":8,"latency_ns":25341,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":9,"latency_ns":26231,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":10,"latency_ns":35900,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":11,"latency_ns":23389,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":12,"latency_ns":29571,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":13,"latency_ns":32140,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":14,"latency_ns":24420,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":15,"latency_ns":26179,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":16,"latency_ns":27281,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":17,"latency_ns":23960,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":18,"latency_ns":24881,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":19,"latency_ns":26590,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":20,"latency_ns":22820,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":21,"latency_ns":23031,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":22,"latency_ns":27801,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":23,"latency_ns":31010,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":24,"latency_ns":23452,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":25,"latency_ns":35481,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":26,"latency_ns":38681,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":27,"latency_ns":29932,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":28,"latency_ns":29570,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":29,"latency_ns":28090,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8}],"latency":{"repetitions":30,"min_ns":22820,"p50_ns":26290,"p95_ns":35900,"p99_ns":38681,"max_ns":38681,"mean_ns":27585.466666666667,"sample_stddev_ns":4012.9589455725277},"cpu_ticks":0,"cpu_ms":0.0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732},"commit":{"scope":"production_adapter_parse_normalize_sanitize_commit_and_project","raw_samples":[{"repetition":0,"latency_ns":78198498,"cpu_ticks":6,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"record_count":8},{"repetition":1,"latency_ns":78080677,"cpu_ticks":6,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"record_count":8},{"repetition":2,"latency_ns":78365721,"cpu_ticks":6,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"record_count":8},{"repetition":3,"latency_ns":80495207,"cpu_ticks":5,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"record_count":8},{"repetition":4,"latency_ns":79023999,"cpu_ticks":6,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"record_count":8},{"repetition":5,"latency_ns":80980694,"cpu_ticks":5,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"record_count":8},{"repetition":6,"latency_ns":82667086,"cpu_ticks":6,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"record_count":8},{"repetition":7,"latency_ns":76623529,"cpu_ticks":5,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"record_count":8},{"repetition":8,"latency_ns":78289120,"cpu_ticks":6,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"record_count":8},{"repetition":9,"latency_ns":79719258,"cpu_ticks":5,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"record_count":8},{"repetition":10,"latency_ns":78691943,"cpu_ticks":6,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"record_count":8},{"repetition":11,"latency_ns":79406804,"cpu_ticks":6,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"record_count":8},{"repetition":12,"latency_ns":79071359,"cpu_ticks":5,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"record_count":8},{"repetition":13,"latency_ns":78247068,"cpu_ticks":5,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"record_count":8},{"repetition":14,"latency_ns":77889425,"cpu_ticks":6,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"record_count":8},{"repetition":15,"latency_ns":82102037,"cpu_ticks":5,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"record_count":8},{"repetition":16,"latency_ns":79832759,"cpu_ticks":5,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"record_count":8},{"repetition":17,"latency_ns":79191489,"cpu_ticks":6,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"record_count":8},{"repetition":18,"latency_ns":78736256,"cpu_ticks":6,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"record_count":8},{"repetition":19,"latency_ns":82627004,"cpu_ticks":5,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"record_count":8},{"repetition":20,"latency_ns":79057859,"cpu_ticks":5,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"record_count":8},{"repetition":21,"latency_ns":75309402,"cpu_ticks":6,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"record_count":8},{"repetition":22,"latency_ns":79402023,"cpu_ticks":5,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"record_count":8},{"repetition":23,"latency_ns":80374865,"cpu_ticks":5,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"record_count":8},{"repetition":24,"latency_ns":82234559,"cpu_ticks":6,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"record_count":8},{"repetition":25,"latency_ns":79160910,"cpu_ticks":5,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"record_count":8},{"repetition":26,"latency_ns":86902328,"cpu_ticks":7,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"record_count":8},{"repetition":27,"latency_ns":75933648,"cpu_ticks":5,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"record_count":8},{"repetition":28,"latency_ns":78525421,"cpu_ticks":6,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"record_count":8},{"repetition":29,"latency_ns":76925022,"cpu_ticks":5,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"record_count":8}],"latency":{"repetitions":30,"min_ns":75309402,"p50_ns":79057859,"p95_ns":82667086,"p99_ns":86902328,"max_ns":86902328,"mean_ns":79402199.0,"sample_stddev_ns":2285648.3970922595},"cpu_ticks":166,"cpu_ms":1660.0,"process_write_bytes":42270720,"database_storage_growth_bytes":40293600,"peak_rss_kib":61732},"replay":{"scope":"authoritative_store_bounded_replay","raw_samples":[{"repetition":0,"latency_ns":311395,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":1,"latency_ns":278103,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":2,"latency_ns":262933,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":3,"latency_ns":287593,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":4,"latency_ns":263944,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":5,"latency_ns":283733,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":6,"latency_ns":270543,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":7,"latency_ns":264983,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":8,"latency_ns":265814,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":9,"latency_ns":264963,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":10,"latency_ns":285123,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":11,"latency_ns":285884,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":12,"latency_ns":266573,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":13,"latency_ns":263843,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":14,"latency_ns":263823,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":15,"latency_ns":266684,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":16,"latency_ns":288924,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":17,"latency_ns":261763,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":18,"latency_ns":270142,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":19,"latency_ns":268974,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":20,"latency_ns":285605,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":21,"latency_ns":308704,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":22,"latency_ns":282674,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":23,"latency_ns":269203,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":24,"latency_ns":267854,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":25,"latency_ns":412346,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":26,"latency_ns":272834,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":27,"latency_ns":266163,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":28,"latency_ns":262582,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":29,"latency_ns":286064,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8}],"latency":{"repetitions":30,"min_ns":261763,"p50_ns":269203,"p95_ns":311395,"p99_ns":412346,"max_ns":412346,"mean_ns":279658.86666666664,"sample_stddev_ns":28251.293395760367},"cpu_ticks":1,"cpu_ms":10.0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732},"pipeline_raw_samples":[{"repetition":0,"latency_ns":78668755,"cpu_ticks":6,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":1,"latency_ns":78530103,"cpu_ticks":6,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":2,"latency_ns":78791657,"cpu_ticks":6,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":3,"latency_ns":80949193,"cpu_ticks":5,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":4,"latency_ns":79449715,"cpu_ticks":6,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":5,"latency_ns":81479169,"cpu_ticks":5,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":6,"latency_ns":83110641,"cpu_ticks":6,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":7,"latency_ns":77053882,"cpu_ticks":5,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":8,"latency_ns":78735965,"cpu_ticks":6,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":9,"latency_ns":80155514,"cpu_ticks":5,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":10,"latency_ns":79139291,"cpu_ticks":6,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":11,"latency_ns":79859279,"cpu_ticks":6,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":12,"latency_ns":79535005,"cpu_ticks":5,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":13,"latency_ns":78693965,"cpu_ticks":5,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":14,"latency_ns":78316900,"cpu_ticks":6,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":15,"latency_ns":82544033,"cpu_ticks":5,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":16,"latency_ns":80307104,"cpu_ticks":5,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":17,"latency_ns":79615735,"cpu_ticks":6,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":18,"latency_ns":79167749,"cpu_ticks":6,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":19,"latency_ns":83100230,"cpu_ticks":5,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":20,"latency_ns":79517103,"cpu_ticks":6,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":21,"latency_ns":75798418,"cpu_ticks":6,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":22,"latency_ns":79850528,"cpu_ticks":5,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":23,"latency_ns":80821780,"cpu_ticks":5,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":24,"latency_ns":82677194,"cpu_ticks":6,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":25,"latency_ns":79775908,"cpu_ticks":5,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":26,"latency_ns":87424654,"cpu_ticks":7,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":27,"latency_ns":76376385,"cpu_ticks":5,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":28,"latency_ns":78966167,"cpu_ticks":6,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":29,"latency_ns":77386967,"cpu_ticks":5,"process_write_bytes":1409024,"database_storage_growth_bytes":1343120,"peak_rss_kib":61732,"replayed_observations":8}],"pipeline_latency":{"repetitions":30,"min_ns":75798418,"p50_ns":79517103,"p95_ns":83110641,"p99_ns":87424654,"max_ns":87424654,"mean_ns":79859966.3,"sample_stddev_ns":2294386.7372862203},"pipeline_records_per_second":100.1753490597203,"pipeline_cpu_ticks":167,"pipeline_cpu_ms":1670.0,"pipeline_process_write_bytes":42270720,"pipeline_database_storage_growth_bytes":40293600,"peak_rss_kib":61732,"no_op_raw_samples":[{"repetition":0,"latency_ns":1991766,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":1,"latency_ns":2037146,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":2,"latency_ns":2010456,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":3,"latency_ns":1993495,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":4,"latency_ns":1972355,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":5,"latency_ns":2101226,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":6,"latency_ns":2035857,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":7,"latency_ns":2014945,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":8,"latency_ns":2021975,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":9,"latency_ns":2010625,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":10,"latency_ns":2048596,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":11,"latency_ns":2002425,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":12,"latency_ns":2062547,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":13,"latency_ns":2096406,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":14,"latency_ns":2003345,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":15,"latency_ns":2009836,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":16,"latency_ns":2073956,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":17,"latency_ns":2046696,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":18,"latency_ns":2013265,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":19,"latency_ns":2106916,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":20,"latency_ns":2084227,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":21,"latency_ns":1990364,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":22,"latency_ns":2000905,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":23,"latency_ns":2121807,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":24,"latency_ns":2056206,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":25,"latency_ns":2189657,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":26,"latency_ns":2145628,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":27,"latency_ns":2026385,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":28,"latency_ns":2047125,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":29,"latency_ns":2042645,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0}],"no_op_latency":{"repetitions":30,"min_ns":1972355,"p50_ns":2035857,"p95_ns":2145628,"p99_ns":2189657,"max_ns":2189657,"mean_ns":2045292.7666666666,"sample_stddev_ns":50925.03400752734},"no_op_cpu_ticks":3,"no_op_cpu_ms":30.0,"no_op_process_write_bytes":0,"no_op_database_storage_growth_bytes":0,"no_op_observation_count_delta":0},{"provider":"kilo","production_path":"kilo_production_observation_pipeline_v1","pipeline_scope":"production_parse_normalize_sanitize_commit_project_and_replay","measured_repetitions":30,"observations_per_repetition":8,"replay_limit":9,"max_backlog_records":8,"parse":{"scope":"native_provider_format_decode","raw_samples":[{"repetition":0,"latency_ns":25261,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":1,"latency_ns":25760,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":2,"latency_ns":23960,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":3,"latency_ns":24800,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":4,"latency_ns":23360,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":5,"latency_ns":33100,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":6,"latency_ns":29741,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":7,"latency_ns":34452,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":8,"latency_ns":35781,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":9,"latency_ns":23951,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":10,"latency_ns":21930,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":11,"latency_ns":24580,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":12,"latency_ns":29381,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":13,"latency_ns":28361,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":14,"latency_ns":23300,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":15,"latency_ns":23880,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":16,"latency_ns":28100,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":17,"latency_ns":23700,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":18,"latency_ns":26970,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":19,"latency_ns":32280,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":20,"latency_ns":22659,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":21,"latency_ns":24190,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":22,"latency_ns":23680,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":23,"latency_ns":33319,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":24,"latency_ns":26041,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":25,"latency_ns":24909,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":26,"latency_ns":27581,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":27,"latency_ns":69212,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":28,"latency_ns":24699,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":29,"latency_ns":32150,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8}],"latency":{"repetitions":30,"min_ns":21930,"p50_ns":25261,"p95_ns":35781,"p99_ns":69212,"max_ns":69212,"mean_ns":28369.6,"sample_stddev_ns":8633.845060234631},"cpu_ticks":0,"cpu_ms":0.0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732},"commit":{"scope":"production_adapter_parse_normalize_sanitize_commit_and_project","raw_samples":[{"repetition":0,"latency_ns":77970236,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":1,"latency_ns":76995383,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":2,"latency_ns":78859008,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":3,"latency_ns":78902609,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":4,"latency_ns":79967241,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":5,"latency_ns":341275915,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":6,"latency_ns":82535623,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":7,"latency_ns":75894090,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":8,"latency_ns":79339391,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":9,"latency_ns":80147663,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":10,"latency_ns":78671114,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":11,"latency_ns":83111021,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":12,"latency_ns":80004671,"cpu_ticks":4,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":13,"latency_ns":82107168,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":14,"latency_ns":81550400,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":15,"latency_ns":79424653,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":16,"latency_ns":78791195,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":17,"latency_ns":80122562,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":18,"latency_ns":86376351,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":19,"latency_ns":79472213,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":20,"latency_ns":77784991,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":21,"latency_ns":75465473,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":22,"latency_ns":78331980,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":23,"latency_ns":77517488,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":24,"latency_ns":78696464,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":25,"latency_ns":79412692,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":26,"latency_ns":77207144,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":27,"latency_ns":84265255,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":28,"latency_ns":79800347,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8},{"repetition":29,"latency_ns":80160951,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"record_count":8}],"latency":{"repetitions":30,"min_ns":75465473,"p50_ns":79412692,"p95_ns":86376351,"p99_ns":341275915,"max_ns":341275915,"mean_ns":88338709.73333333,"sample_stddev_ns":47829449.15797909},"cpu_ticks":162,"cpu_ms":1620.0,"process_write_bytes":42024960,"database_storage_growth_bytes":40046400,"peak_rss_kib":61732},"replay":{"scope":"authoritative_store_bounded_replay","raw_samples":[{"repetition":0,"latency_ns":263493,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":1,"latency_ns":277224,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":2,"latency_ns":285244,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":3,"latency_ns":262293,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":4,"latency_ns":277653,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":5,"latency_ns":291323,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":6,"latency_ns":274854,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":7,"latency_ns":264893,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":8,"latency_ns":425365,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":9,"latency_ns":286374,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":10,"latency_ns":296115,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":11,"latency_ns":260683,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":12,"latency_ns":291613,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":13,"latency_ns":266243,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":14,"latency_ns":263323,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":15,"latency_ns":262993,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":16,"latency_ns":265173,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":17,"latency_ns":262963,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":18,"latency_ns":264243,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":19,"latency_ns":288293,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":20,"latency_ns":265363,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":21,"latency_ns":279744,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":22,"latency_ns":284344,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":23,"latency_ns":261273,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":24,"latency_ns":292723,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":25,"latency_ns":276953,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":26,"latency_ns":271754,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":27,"latency_ns":268703,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":28,"latency_ns":382175,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8},{"repetition":29,"latency_ns":292833,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"record_count":8}],"latency":{"repetitions":30,"min_ns":260683,"p50_ns":274854,"p95_ns":382175,"p99_ns":425365,"max_ns":425365,"mean_ns":283540.76666666666,"sample_stddev_ns":35091.84589899555},"cpu_ticks":0,"cpu_ms":0.0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732},"pipeline_raw_samples":[{"repetition":0,"latency_ns":78396722,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":1,"latency_ns":77452519,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":2,"latency_ns":79307594,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":3,"latency_ns":79328783,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":4,"latency_ns":80420747,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":5,"latency_ns":341762951,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":6,"latency_ns":82995609,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":7,"latency_ns":76335555,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":8,"latency_ns":80019120,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":9,"latency_ns":80597919,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":10,"latency_ns":79147400,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":11,"latency_ns":83548877,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":12,"latency_ns":80487836,"cpu_ticks":4,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":13,"latency_ns":82569533,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":14,"latency_ns":81996786,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":15,"latency_ns":79870009,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":16,"latency_ns":79240350,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":17,"latency_ns":80568747,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":18,"latency_ns":86811506,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":19,"latency_ns":79931259,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":20,"latency_ns":78213048,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":21,"latency_ns":75921869,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":22,"latency_ns":78786096,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":23,"latency_ns":77942795,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":24,"latency_ns":79171369,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":25,"latency_ns":79886369,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":26,"latency_ns":77694821,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":27,"latency_ns":84733949,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":28,"latency_ns":80392044,"cpu_ticks":5,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8},{"repetition":29,"latency_ns":80642958,"cpu_ticks":6,"process_write_bytes":1400832,"database_storage_growth_bytes":1334880,"peak_rss_kib":61732,"replayed_observations":8}],"pipeline_latency":{"repetitions":30,"min_ns":75921869,"p50_ns":79886369,"p95_ns":86811506,"p99_ns":341762951,"max_ns":341762951,"mean_ns":88805838.0,"sample_stddev_ns":47833214.01011288},"pipeline_records_per_second":90.08416766474294,"pipeline_cpu_ticks":164,"pipeline_cpu_ms":1640.0,"pipeline_process_write_bytes":42024960,"pipeline_database_storage_growth_bytes":40046400,"peak_rss_kib":61732,"no_op_raw_samples":[{"repetition":0,"latency_ns":2027127,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":1,"latency_ns":2049946,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":2,"latency_ns":2031285,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":3,"latency_ns":2045146,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":4,"latency_ns":1991036,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":5,"latency_ns":2134817,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":6,"latency_ns":2002996,"cpu_ticks":2,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":7,"latency_ns":2048466,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":8,"latency_ns":3175390,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":9,"latency_ns":1994275,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":10,"latency_ns":2066835,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":11,"latency_ns":2095346,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":12,"latency_ns":2125317,"cpu_ticks":1,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":13,"latency_ns":2126428,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":14,"latency_ns":1984636,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":15,"latency_ns":2022655,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":16,"latency_ns":2072437,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":17,"latency_ns":1986605,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":18,"latency_ns":2062337,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":19,"latency_ns":2034326,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":20,"latency_ns":2089717,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":21,"latency_ns":1997565,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":22,"latency_ns":2000216,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":23,"latency_ns":2010926,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":24,"latency_ns":2072726,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":25,"latency_ns":2495183,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":26,"latency_ns":2128986,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":27,"latency_ns":2115196,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":28,"latency_ns":2164978,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0},{"repetition":29,"latency_ns":2077507,"cpu_ticks":0,"process_write_bytes":0,"database_storage_growth_bytes":0,"peak_rss_kib":61732,"replayed_observations":0}],"no_op_latency":{"repetitions":30,"min_ns":1984636,"p50_ns":2049946,"p95_ns":2495183,"p99_ns":3175390,"max_ns":3175390,"mean_ns":2107680.2,"sample_stddev_ns":222747.22787367497},"no_op_cpu_ticks":5,"no_op_cpu_ms":50.0,"no_op_process_write_bytes":0,"no_op_database_storage_growth_bytes":0,"no_op_observation_count_delta":0}]},"hook_telemetry_readiness":{"artifact_kind":"readiness_and_fixture_identity_not_runtime_contract","canonical_contract":{"aggregation_dimensions":{"disposition_class":["application","transport","timeout","cancellation","unknown"],"disposition_status":["supported","degraded","unavailable","unknown","backpressured","accepted_for_replay","committed","exact_duplicate"],"excluded_untrusted_dimensions":["hook_name","disposition.reason_code"],"host":["claude","codex","cursor","hermes","kiro","other"],"retryable":[true,false,null]},"latency_semantics":{"daemon_processing_duration":{"blocker":"hook_completed_does_not_emit_daemon_processing_duration","status":"unavailable"},"hook_wall_time":{"fields":["hook_wall_time_us","hook_wall_time_ms"],"role":"host_measured_hook_span"},"host_ipc_rtt":{"aliases":["daemon_rtt"],"event_field":"daemon_rtt_us","role":"true_host_ipc_rtt"}},"metrics":{"daemon_rtt":["daemon_rtt_us","daemon_call_count"],"disposition":["disposition.status","disposition.retryable","disposition.reason_code","disposition.class"],"hook_wall_time":["hook_wall_time_us","hook_wall_time_ms"],"payload_bytes":["payload_bytes","daemon_ipc_payload_bytes"],"timeout":["timeout.budget_ms","timeout.timed_out"]},"provider_coverage":[{"host":"claude","status":"instrumented"},{"host":"codex","status":"instrumented"},{"host":"cursor","status":"instrumented"},{"host":"hermes","status":"partial"},{"host":"kiro","status":"instrumented"}],"schema_version":1},"host_fixture_measurements":[{"host":"claude","fixture_path":"tests/fixtures/host_events/claude/baseline.json","fixture_sha256":"6bb06840fe1e2716f66c02a58220c2c1a122b387cdc97af987a0b4d4427124e7","canonical_request_payload_bytes":[142,142,142,142],"disposition_vocabulary":["supported","degraded","unavailable","unknown"]},{"host":"codex","fixture_path":"tests/fixtures/host_events/codex/baseline.json","fixture_sha256":"1095677d360835fcfbaa8da978aebe57fadaf49d257a85b0e0b8779f8a765ef7","canonical_request_payload_bytes":[104,104,104,104],"disposition_vocabulary":["supported","degraded","unavailable","unknown"]},{"host":"cursor","fixture_path":"tests/fixtures/host_events/cursor/baseline.json","fixture_sha256":"e80d6a498ccb300aaee76717f24bdd843722fda037156a980c44ebf43b67370f","canonical_request_payload_bytes":[104,104,104,104],"disposition_vocabulary":["supported","degraded","unavailable","unknown"]},{"host":"hermes","fixture_path":"tests/fixtures/host_events/hermes/baseline.json","fixture_sha256":"911c9ca516ccdb8320b137bececd38c0826eafdd3a369ac8939d5359241bb49c","canonical_request_payload_bytes":[236,236,236,236],"disposition_vocabulary":["supported","degraded","unavailable","unknown"]},{"host":"kiro","fixture_path":"tests/fixtures/host_events/kiro/baseline.json","fixture_sha256":"efaab57d6d9efc0bda7a7ed8a57d236599409d5abf9c2eed405cd7725b5882bc","canonical_request_payload_bytes":[118,118,118,118],"disposition_vocabulary":["supported","degraded","unavailable","unknown"]}],"cursor_catch_up_ingest_max_bytes":2097152,"readiness_distributions":{"schema_version":1,"source_event":"hook_completed","collection_status":"no_samples","input_rows_received":0,"input_rows_processed":0,"input_rows_dropped_at_cap":0,"events_considered":0,"events_skipped_non_completed":0,"hook_wall_time_distribution":[],"host_ipc_rtt_distribution":[],"payload_bytes_distribution":[],"timeout_outcomes_by_host":[],"disposition_counts_by_host":[],"unavailable_metrics":[{"metric":"daemon_processing_duration_distribution","status":"unavailable","blocker":"hook_completed_does_not_emit_daemon_processing_duration"}],"bounds":{"max_input_rows":10000,"host_buckets":6,"max_disposition_series":720,"latency_buckets":13,"bytes_buckets":8},"rows_folded_to_other_host":0,"disposition_values_folded_to_unknown":0},"unavailable_measurements":[{"metric":"daemon_processing_duration_distribution","status":"unavailable","required_collection_step":"hook_completed emits host-measured daemon_rtt_us (TRUE host IPC RTT) only; daemon-internal processing duration is not present on the event contract"}]}} diff --git a/benchmark_data/claude-observation/result-2026-07-26-dc17dd73.json b/benchmark_data/claude-observation/result-2026-07-26-dc17dd73.json new file mode 100644 index 0000000000..0504c539a8 --- /dev/null +++ b/benchmark_data/claude-observation/result-2026-07-26-dc17dd73.json @@ -0,0 +1,13743 @@ +{ + "schema_version": 2, + "workload_id": "pr5-observation-pipeline-v1", + "evidence_status": "historical_stale", + "workload_identity": { + "manifest_path": "benchmarks/pr5-observation/workload-v1.json", + "manifest_sha256": "5a5087d7520b76cc96a3e0d058adab9a1b45fac717659ade6f8ae14ec0453736", + "harness_paths": [ + "src/sessions/claude_observation_benchmark.rs", + "src/sessions/claude_observation_benchmark/artifact.rs", + "src/sessions/claude_observation_benchmark/baseline.rs", + "src/sessions/claude_observation_benchmark/manifest.rs", + "src/sessions/claude_observation_benchmark/metrics.rs", + "src/sessions/claude_observation_benchmark/model.rs", + "src/sessions/claude_observation_benchmark/runner.rs", + "src/sessions/claude_observation_benchmark/tests.rs" + ], + "harness_sha256": "84e3ed7e4023dd55884bd364398d14aa7dad100bcc59bcca5d29b987df270fdb", + "native_fixture_paths": [ + "tests/fixtures/provider_normalization/claude/assistant_tool_use.input.json", + "tests/fixtures/provider_normalization/codex/session_meta.input.json", + "tests/fixtures/provider_normalization/codex/agent_message.input.json", + "tests/fixtures/provider_normalization/cursor/tool_use.input.json", + "tests/fixtures/provider_normalization/hermes/assistant_tool_call.input.json", + "tests/fixtures/provider_normalization/kiro/workspace_session.input.json", + "tests/fixtures/transcript_golden/cline_like/input/api_conversation_history.json", + "tests/fixtures/transcript_golden/cline_like/input/task_metadata.json" + ], + "native_fixtures_sha256": "a33854bc6c64bd964ee4665459296346fe522f0fe4f7bc9911bb3c5474de77d5" + }, + "build_identity": { + "commit": "dc17dd731e97f9262e570afd9e7ec1602d8af99e", + "tree": "82fcd6b95c7b11c147780ba343350fd99af79784", + "profile": "release", + "source_mode": "git_archive_read_only_v1", + "source_manifest_sha256": "ab5faf64e122badc11494d90d30556807e29d818bc5af9a58679938844c5c217", + "source_file_count": 2886, + "target_triple": "x86_64-unknown-linux-gnu", + "rustc_version": "rustc 1.97.1 (8bab26f4f 2026-07-14)\nbinary: rustc\ncommit-hash: 8bab26f4f68e0e26f0bb7960be334d5b520ea452\ncommit-date: 2026-07-14\nhost: x86_64-unknown-linux-gnu\nrelease: 1.97.1\nLLVM version: 22.1.6", + "cargo_version": "cargo 1.97.1 (c980f4866 2026-06-30)", + "rustflags": "normalized-empty", + "rustc_wrapper": "environment:none;cargo_config:b83e1616c64c314f9b998334950be4ea9f2d5a15", + "rustc_workspace_wrapper": "environment:none;cargo_config:b83e1616c64c314f9b998334950be4ea9f2d5a15", + "cargo_config_identity": "b83e1616c64c314f9b998334950be4ea9f2d5a15", + "data_root_basis": "current_executable_parent", + "executable_sha256": "56c9ab4e871bd4cfb8c509fb4001b6e413d60c062b7d3121e40a5adf986bb1c3", + "executable_size_bytes": 385872496 + }, + "git_before": { + "commit": "dc17dd731e97f9262e570afd9e7ec1602d8af99e", + "tree": "82fcd6b95c7b11c147780ba343350fd99af79784", + "dirty": false + }, + "git_after": { + "commit": "dc17dd731e97f9262e570afd9e7ec1602d8af99e", + "tree": "82fcd6b95c7b11c147780ba343350fd99af79784", + "dirty": false + }, + "command": "cargo test --quiet --release --lib sessions::claude_observation_benchmark::production_observation_pipeline_baseline -- --ignored --exact --nocapture --test-threads=1", + "rustc": "rustc 1.97.1 (8bab26f4f 2026-07-14)\nbinary: rustc\ncommit-hash: 8bab26f4f68e0e26f0bb7960be334d5b520ea452\ncommit-date: 2026-07-14\nhost: x86_64-unknown-linux-gnu\nrelease: 1.97.1\nLLVM version: 22.1.6", + "cargo": "cargo 1.97.1 (c980f4866 2026-06-30)", + "kernel": "Linux 6.8.0-136-generic x86_64 GNU/Linux", + "cpu_identity": "AMD EPYC 7742 64-Core Processor", + "logical_cpu_count": 96, + "memory_total_kib": 164210348, + "clock_ticks_per_second": 100, + "warmup_repetitions": 3, + "measured_repetitions": 30, + "records_per_repetition": 64, + "measured_records": 1920, + "pipeline_raw_samples": [ + { + "repetition": 0, + "latency_ns": 2370976493, + "cpu_ticks": 231, + "process_write_bytes": 51654656, + "database_storage_growth_bytes": 37405096, + "peak_rss_kib": 137580, + "replayed_observations": 64 + }, + { + "repetition": 1, + "latency_ns": 2336749715, + "cpu_ticks": 228, + "process_write_bytes": 51642368, + "database_storage_growth_bytes": 37409216, + "peak_rss_kib": 141460, + "replayed_observations": 64 + }, + { + "repetition": 2, + "latency_ns": 2291642083, + "cpu_ticks": 223, + "process_write_bytes": 51757056, + "database_storage_growth_bytes": 37483376, + "peak_rss_kib": 145352, + "replayed_observations": 64 + }, + { + "repetition": 3, + "latency_ns": 2346652219, + "cpu_ticks": 229, + "process_write_bytes": 51675136, + "database_storage_growth_bytes": 37438056, + "peak_rss_kib": 145364, + "replayed_observations": 64 + }, + { + "repetition": 4, + "latency_ns": 2343599191, + "cpu_ticks": 228, + "process_write_bytes": 51699712, + "database_storage_growth_bytes": 37462776, + "peak_rss_kib": 149228, + "replayed_observations": 64 + }, + { + "repetition": 5, + "latency_ns": 2309643459, + "cpu_ticks": 226, + "process_write_bytes": 51601408, + "database_storage_growth_bytes": 37421576, + "peak_rss_kib": 153096, + "replayed_observations": 64 + }, + { + "repetition": 6, + "latency_ns": 2377133700, + "cpu_ticks": 232, + "process_write_bytes": 51564544, + "database_storage_growth_bytes": 37376256, + "peak_rss_kib": 153096, + "replayed_observations": 64 + }, + { + "repetition": 7, + "latency_ns": 2337966883, + "cpu_ticks": 228, + "process_write_bytes": 51552256, + "database_storage_growth_bytes": 37359776, + "peak_rss_kib": 153100, + "replayed_observations": 64 + }, + { + "repetition": 8, + "latency_ns": 2339161167, + "cpu_ticks": 228, + "process_write_bytes": 51793920, + "database_storage_growth_bytes": 37471016, + "peak_rss_kib": 153108, + "replayed_observations": 64 + }, + { + "repetition": 9, + "latency_ns": 2355548765, + "cpu_ticks": 229, + "process_write_bytes": 51646464, + "database_storage_growth_bytes": 37372136, + "peak_rss_kib": 153108, + "replayed_observations": 64 + }, + { + "repetition": 10, + "latency_ns": 2708492865, + "cpu_ticks": 265, + "process_write_bytes": 51724288, + "database_storage_growth_bytes": 37442176, + "peak_rss_kib": 153192, + "replayed_observations": 64 + }, + { + "repetition": 11, + "latency_ns": 2430426216, + "cpu_ticks": 237, + "process_write_bytes": 51494912, + "database_storage_growth_bytes": 37347416, + "peak_rss_kib": 153192, + "replayed_observations": 64 + }, + { + "repetition": 12, + "latency_ns": 2293125583, + "cpu_ticks": 225, + "process_write_bytes": 51699712, + "database_storage_growth_bytes": 37421576, + "peak_rss_kib": 153196, + "replayed_observations": 64 + }, + { + "repetition": 13, + "latency_ns": 2308698491, + "cpu_ticks": 226, + "process_write_bytes": 51535872, + "database_storage_growth_bytes": 37351536, + "peak_rss_kib": 153196, + "replayed_observations": 64 + }, + { + "repetition": 14, + "latency_ns": 2328096091, + "cpu_ticks": 227, + "process_write_bytes": 51593216, + "database_storage_growth_bytes": 37421576, + "peak_rss_kib": 153200, + "replayed_observations": 64 + }, + { + "repetition": 15, + "latency_ns": 2310504793, + "cpu_ticks": 226, + "process_write_bytes": 51683328, + "database_storage_growth_bytes": 37454536, + "peak_rss_kib": 153264, + "replayed_observations": 64 + }, + { + "repetition": 16, + "latency_ns": 2359504182, + "cpu_ticks": 230, + "process_write_bytes": 51404800, + "database_storage_growth_bytes": 37297976, + "peak_rss_kib": 153264, + "replayed_observations": 64 + }, + { + "repetition": 17, + "latency_ns": 2364338026, + "cpu_ticks": 231, + "process_write_bytes": 51671040, + "database_storage_growth_bytes": 37376256, + "peak_rss_kib": 153264, + "replayed_observations": 64 + }, + { + "repetition": 18, + "latency_ns": 2373655106, + "cpu_ticks": 233, + "process_write_bytes": 51560448, + "database_storage_growth_bytes": 37351536, + "peak_rss_kib": 153264, + "replayed_observations": 64 + }, + { + "repetition": 19, + "latency_ns": 2341276568, + "cpu_ticks": 228, + "process_write_bytes": 51687424, + "database_storage_growth_bytes": 37417456, + "peak_rss_kib": 153264, + "replayed_observations": 64 + }, + { + "repetition": 20, + "latency_ns": 2331647130, + "cpu_ticks": 228, + "process_write_bytes": 51695616, + "database_storage_growth_bytes": 37442176, + "peak_rss_kib": 153264, + "replayed_observations": 64 + }, + { + "repetition": 21, + "latency_ns": 2363454405, + "cpu_ticks": 231, + "process_write_bytes": 51748864, + "database_storage_growth_bytes": 37442176, + "peak_rss_kib": 153264, + "replayed_observations": 64 + }, + { + "repetition": 22, + "latency_ns": 2304069357, + "cpu_ticks": 224, + "process_write_bytes": 51802112, + "database_storage_growth_bytes": 37499856, + "peak_rss_kib": 153264, + "replayed_observations": 64 + }, + { + "repetition": 23, + "latency_ns": 2290364283, + "cpu_ticks": 223, + "process_write_bytes": 51752960, + "database_storage_growth_bytes": 37462776, + "peak_rss_kib": 153264, + "replayed_observations": 64 + }, + { + "repetition": 24, + "latency_ns": 2354708856, + "cpu_ticks": 229, + "process_write_bytes": 51695616, + "database_storage_growth_bytes": 37442176, + "peak_rss_kib": 153264, + "replayed_observations": 64 + }, + { + "repetition": 25, + "latency_ns": 2408580361, + "cpu_ticks": 235, + "process_write_bytes": 51826688, + "database_storage_growth_bytes": 37409216, + "peak_rss_kib": 153264, + "replayed_observations": 64 + }, + { + "repetition": 26, + "latency_ns": 2527159267, + "cpu_ticks": 246, + "process_write_bytes": 52973568, + "database_storage_growth_bytes": 37417456, + "peak_rss_kib": 153272, + "replayed_observations": 64 + }, + { + "repetition": 27, + "latency_ns": 2328789356, + "cpu_ticks": 228, + "process_write_bytes": 51781632, + "database_storage_growth_bytes": 37503976, + "peak_rss_kib": 153276, + "replayed_observations": 64 + }, + { + "repetition": 28, + "latency_ns": 2347487547, + "cpu_ticks": 229, + "process_write_bytes": 51531776, + "database_storage_growth_bytes": 37388616, + "peak_rss_kib": 153276, + "replayed_observations": 64 + }, + { + "repetition": 29, + "latency_ns": 2333259956, + "cpu_ticks": 228, + "process_write_bytes": 51769344, + "database_storage_growth_bytes": 37466896, + "peak_rss_kib": 153276, + "replayed_observations": 64 + } + ], + "pipeline_batch_latency": { + "repetitions": 30, + "min_ns": 2290364283, + "p50_ns": 2341276568, + "p95_ns": 2527159267, + "p99_ns": 2708492865, + "max_ns": 2708492865, + "mean_ns": 2360557070.4666667, + "sample_stddev_ns": 80525133.99323851 + }, + "pipeline_records_per_second": 27.11224430907219, + "pipeline_cpu_ticks": 6911, + "pipeline_cpu_ms": 69110.0, + "pipeline_process_write_bytes": 1551220736, + "database_storage_growth_bytes": 1122556640, + "peak_rss_kib": 153276, + "no_op_replay_raw_samples": [ + { + "repetition": 0, + "latency_ns": 1504741, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 137580, + "replayed_observations": 0 + }, + { + "repetition": 1, + "latency_ns": 1185536, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 141460, + "replayed_observations": 0 + }, + { + "repetition": 2, + "latency_ns": 1095596, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 145352, + "replayed_observations": 0 + }, + { + "repetition": 3, + "latency_ns": 1140596, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 145364, + "replayed_observations": 0 + }, + { + "repetition": 4, + "latency_ns": 1129256, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 149228, + "replayed_observations": 0 + }, + { + "repetition": 5, + "latency_ns": 1166468, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 153096, + "replayed_observations": 0 + }, + { + "repetition": 6, + "latency_ns": 1558623, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 153096, + "replayed_observations": 0 + }, + { + "repetition": 7, + "latency_ns": 1253938, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 153100, + "replayed_observations": 0 + }, + { + "repetition": 8, + "latency_ns": 1201166, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 153108, + "replayed_observations": 0 + }, + { + "repetition": 9, + "latency_ns": 1229426, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 153108, + "replayed_observations": 0 + }, + { + "repetition": 10, + "latency_ns": 1161727, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 153192, + "replayed_observations": 0 + }, + { + "repetition": 11, + "latency_ns": 1469661, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 153192, + "replayed_observations": 0 + }, + { + "repetition": 12, + "latency_ns": 1270457, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 153196, + "replayed_observations": 0 + }, + { + "repetition": 13, + "latency_ns": 1160426, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 153196, + "replayed_observations": 0 + }, + { + "repetition": 14, + "latency_ns": 1122007, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 153200, + "replayed_observations": 0 + }, + { + "repetition": 15, + "latency_ns": 1110035, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 153264, + "replayed_observations": 0 + }, + { + "repetition": 16, + "latency_ns": 1429030, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 153264, + "replayed_observations": 0 + }, + { + "repetition": 17, + "latency_ns": 1200348, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 153264, + "replayed_observations": 0 + }, + { + "repetition": 18, + "latency_ns": 1199987, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 153264, + "replayed_observations": 0 + }, + { + "repetition": 19, + "latency_ns": 1380469, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 153264, + "replayed_observations": 0 + }, + { + "repetition": 20, + "latency_ns": 1110086, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 153264, + "replayed_observations": 0 + }, + { + "repetition": 21, + "latency_ns": 1357149, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 153264, + "replayed_observations": 0 + }, + { + "repetition": 22, + "latency_ns": 1113095, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 153264, + "replayed_observations": 0 + }, + { + "repetition": 23, + "latency_ns": 979643, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 153264, + "replayed_observations": 0 + }, + { + "repetition": 24, + "latency_ns": 1138336, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 153264, + "replayed_observations": 0 + }, + { + "repetition": 25, + "latency_ns": 1225846, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 153264, + "replayed_observations": 0 + }, + { + "repetition": 26, + "latency_ns": 1378400, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 153272, + "replayed_observations": 0 + }, + { + "repetition": 27, + "latency_ns": 1128816, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 153276, + "replayed_observations": 0 + }, + { + "repetition": 28, + "latency_ns": 1133797, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 153276, + "replayed_observations": 0 + }, + { + "repetition": 29, + "latency_ns": 1291209, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 153276, + "replayed_observations": 0 + } + ], + "no_op_replay_latency": { + "repetitions": 30, + "min_ns": 979643, + "p50_ns": 1185536, + "p95_ns": 1504741, + "p99_ns": 1558623, + "max_ns": 1558623, + "mean_ns": 1227529.0, + "sample_stddev_ns": 137233.11249111855 + }, + "no_op_replay_cpu_ticks": 4, + "no_op_replay_cpu_ms": 40.0, + "no_op_replay_process_write_bytes": 0, + "no_op_replay_database_storage_growth_bytes": 0, + "no_op_replay_observation_count_delta": 0, + "no_op_replay_totals": { + "source_bytes_scanned": 0, + "sessions_upserted": 0, + "messages_upserted": 0, + "observations_committed": 0, + "observation_duplicates": 0, + "cursor_advances": 0, + "cursor_duplicates": 0, + "records_rejected": 0, + "records_quarantined": 0, + "projections_completed": 0, + "projections_skipped": 0, + "projection_duplicates": 0, + "deferred_sources": 0 + }, + "provider_observation_performance": { + "schema_version": 1, + "workload_id": "pr5-observation-pipeline-v1", + "fairness": { + "policy": "round_robin_v1", + "rounds": 30, + "providers_per_round": 8, + "max_provider_turn_distance": 8, + "turns": [ + { + "round": 0, + "position": 0, + "provider": "claude" + }, + { + "round": 0, + "position": 1, + "provider": "codex" + }, + { + "round": 0, + "position": 2, + "provider": "cursor" + }, + { + "round": 0, + "position": 3, + "provider": "hermes" + }, + { + "round": 0, + "position": 4, + "provider": "kiro" + }, + { + "round": 0, + "position": 5, + "provider": "cline" + }, + { + "round": 0, + "position": 6, + "provider": "roo-code" + }, + { + "round": 0, + "position": 7, + "provider": "kilo" + }, + { + "round": 1, + "position": 0, + "provider": "claude" + }, + { + "round": 1, + "position": 1, + "provider": "codex" + }, + { + "round": 1, + "position": 2, + "provider": "cursor" + }, + { + "round": 1, + "position": 3, + "provider": "hermes" + }, + { + "round": 1, + "position": 4, + "provider": "kiro" + }, + { + "round": 1, + "position": 5, + "provider": "cline" + }, + { + "round": 1, + "position": 6, + "provider": "roo-code" + }, + { + "round": 1, + "position": 7, + "provider": "kilo" + }, + { + "round": 2, + "position": 0, + "provider": "claude" + }, + { + "round": 2, + "position": 1, + "provider": "codex" + }, + { + "round": 2, + "position": 2, + "provider": "cursor" + }, + { + "round": 2, + "position": 3, + "provider": "hermes" + }, + { + "round": 2, + "position": 4, + "provider": "kiro" + }, + { + "round": 2, + "position": 5, + "provider": "cline" + }, + { + "round": 2, + "position": 6, + "provider": "roo-code" + }, + { + "round": 2, + "position": 7, + "provider": "kilo" + }, + { + "round": 3, + "position": 0, + "provider": "claude" + }, + { + "round": 3, + "position": 1, + "provider": "codex" + }, + { + "round": 3, + "position": 2, + "provider": "cursor" + }, + { + "round": 3, + "position": 3, + "provider": "hermes" + }, + { + "round": 3, + "position": 4, + "provider": "kiro" + }, + { + "round": 3, + "position": 5, + "provider": "cline" + }, + { + "round": 3, + "position": 6, + "provider": "roo-code" + }, + { + "round": 3, + "position": 7, + "provider": "kilo" + }, + { + "round": 4, + "position": 0, + "provider": "claude" + }, + { + "round": 4, + "position": 1, + "provider": "codex" + }, + { + "round": 4, + "position": 2, + "provider": "cursor" + }, + { + "round": 4, + "position": 3, + "provider": "hermes" + }, + { + "round": 4, + "position": 4, + "provider": "kiro" + }, + { + "round": 4, + "position": 5, + "provider": "cline" + }, + { + "round": 4, + "position": 6, + "provider": "roo-code" + }, + { + "round": 4, + "position": 7, + "provider": "kilo" + }, + { + "round": 5, + "position": 0, + "provider": "claude" + }, + { + "round": 5, + "position": 1, + "provider": "codex" + }, + { + "round": 5, + "position": 2, + "provider": "cursor" + }, + { + "round": 5, + "position": 3, + "provider": "hermes" + }, + { + "round": 5, + "position": 4, + "provider": "kiro" + }, + { + "round": 5, + "position": 5, + "provider": "cline" + }, + { + "round": 5, + "position": 6, + "provider": "roo-code" + }, + { + "round": 5, + "position": 7, + "provider": "kilo" + }, + { + "round": 6, + "position": 0, + "provider": "claude" + }, + { + "round": 6, + "position": 1, + "provider": "codex" + }, + { + "round": 6, + "position": 2, + "provider": "cursor" + }, + { + "round": 6, + "position": 3, + "provider": "hermes" + }, + { + "round": 6, + "position": 4, + "provider": "kiro" + }, + { + "round": 6, + "position": 5, + "provider": "cline" + }, + { + "round": 6, + "position": 6, + "provider": "roo-code" + }, + { + "round": 6, + "position": 7, + "provider": "kilo" + }, + { + "round": 7, + "position": 0, + "provider": "claude" + }, + { + "round": 7, + "position": 1, + "provider": "codex" + }, + { + "round": 7, + "position": 2, + "provider": "cursor" + }, + { + "round": 7, + "position": 3, + "provider": "hermes" + }, + { + "round": 7, + "position": 4, + "provider": "kiro" + }, + { + "round": 7, + "position": 5, + "provider": "cline" + }, + { + "round": 7, + "position": 6, + "provider": "roo-code" + }, + { + "round": 7, + "position": 7, + "provider": "kilo" + }, + { + "round": 8, + "position": 0, + "provider": "claude" + }, + { + "round": 8, + "position": 1, + "provider": "codex" + }, + { + "round": 8, + "position": 2, + "provider": "cursor" + }, + { + "round": 8, + "position": 3, + "provider": "hermes" + }, + { + "round": 8, + "position": 4, + "provider": "kiro" + }, + { + "round": 8, + "position": 5, + "provider": "cline" + }, + { + "round": 8, + "position": 6, + "provider": "roo-code" + }, + { + "round": 8, + "position": 7, + "provider": "kilo" + }, + { + "round": 9, + "position": 0, + "provider": "claude" + }, + { + "round": 9, + "position": 1, + "provider": "codex" + }, + { + "round": 9, + "position": 2, + "provider": "cursor" + }, + { + "round": 9, + "position": 3, + "provider": "hermes" + }, + { + "round": 9, + "position": 4, + "provider": "kiro" + }, + { + "round": 9, + "position": 5, + "provider": "cline" + }, + { + "round": 9, + "position": 6, + "provider": "roo-code" + }, + { + "round": 9, + "position": 7, + "provider": "kilo" + }, + { + "round": 10, + "position": 0, + "provider": "claude" + }, + { + "round": 10, + "position": 1, + "provider": "codex" + }, + { + "round": 10, + "position": 2, + "provider": "cursor" + }, + { + "round": 10, + "position": 3, + "provider": "hermes" + }, + { + "round": 10, + "position": 4, + "provider": "kiro" + }, + { + "round": 10, + "position": 5, + "provider": "cline" + }, + { + "round": 10, + "position": 6, + "provider": "roo-code" + }, + { + "round": 10, + "position": 7, + "provider": "kilo" + }, + { + "round": 11, + "position": 0, + "provider": "claude" + }, + { + "round": 11, + "position": 1, + "provider": "codex" + }, + { + "round": 11, + "position": 2, + "provider": "cursor" + }, + { + "round": 11, + "position": 3, + "provider": "hermes" + }, + { + "round": 11, + "position": 4, + "provider": "kiro" + }, + { + "round": 11, + "position": 5, + "provider": "cline" + }, + { + "round": 11, + "position": 6, + "provider": "roo-code" + }, + { + "round": 11, + "position": 7, + "provider": "kilo" + }, + { + "round": 12, + "position": 0, + "provider": "claude" + }, + { + "round": 12, + "position": 1, + "provider": "codex" + }, + { + "round": 12, + "position": 2, + "provider": "cursor" + }, + { + "round": 12, + "position": 3, + "provider": "hermes" + }, + { + "round": 12, + "position": 4, + "provider": "kiro" + }, + { + "round": 12, + "position": 5, + "provider": "cline" + }, + { + "round": 12, + "position": 6, + "provider": "roo-code" + }, + { + "round": 12, + "position": 7, + "provider": "kilo" + }, + { + "round": 13, + "position": 0, + "provider": "claude" + }, + { + "round": 13, + "position": 1, + "provider": "codex" + }, + { + "round": 13, + "position": 2, + "provider": "cursor" + }, + { + "round": 13, + "position": 3, + "provider": "hermes" + }, + { + "round": 13, + "position": 4, + "provider": "kiro" + }, + { + "round": 13, + "position": 5, + "provider": "cline" + }, + { + "round": 13, + "position": 6, + "provider": "roo-code" + }, + { + "round": 13, + "position": 7, + "provider": "kilo" + }, + { + "round": 14, + "position": 0, + "provider": "claude" + }, + { + "round": 14, + "position": 1, + "provider": "codex" + }, + { + "round": 14, + "position": 2, + "provider": "cursor" + }, + { + "round": 14, + "position": 3, + "provider": "hermes" + }, + { + "round": 14, + "position": 4, + "provider": "kiro" + }, + { + "round": 14, + "position": 5, + "provider": "cline" + }, + { + "round": 14, + "position": 6, + "provider": "roo-code" + }, + { + "round": 14, + "position": 7, + "provider": "kilo" + }, + { + "round": 15, + "position": 0, + "provider": "claude" + }, + { + "round": 15, + "position": 1, + "provider": "codex" + }, + { + "round": 15, + "position": 2, + "provider": "cursor" + }, + { + "round": 15, + "position": 3, + "provider": "hermes" + }, + { + "round": 15, + "position": 4, + "provider": "kiro" + }, + { + "round": 15, + "position": 5, + "provider": "cline" + }, + { + "round": 15, + "position": 6, + "provider": "roo-code" + }, + { + "round": 15, + "position": 7, + "provider": "kilo" + }, + { + "round": 16, + "position": 0, + "provider": "claude" + }, + { + "round": 16, + "position": 1, + "provider": "codex" + }, + { + "round": 16, + "position": 2, + "provider": "cursor" + }, + { + "round": 16, + "position": 3, + "provider": "hermes" + }, + { + "round": 16, + "position": 4, + "provider": "kiro" + }, + { + "round": 16, + "position": 5, + "provider": "cline" + }, + { + "round": 16, + "position": 6, + "provider": "roo-code" + }, + { + "round": 16, + "position": 7, + "provider": "kilo" + }, + { + "round": 17, + "position": 0, + "provider": "claude" + }, + { + "round": 17, + "position": 1, + "provider": "codex" + }, + { + "round": 17, + "position": 2, + "provider": "cursor" + }, + { + "round": 17, + "position": 3, + "provider": "hermes" + }, + { + "round": 17, + "position": 4, + "provider": "kiro" + }, + { + "round": 17, + "position": 5, + "provider": "cline" + }, + { + "round": 17, + "position": 6, + "provider": "roo-code" + }, + { + "round": 17, + "position": 7, + "provider": "kilo" + }, + { + "round": 18, + "position": 0, + "provider": "claude" + }, + { + "round": 18, + "position": 1, + "provider": "codex" + }, + { + "round": 18, + "position": 2, + "provider": "cursor" + }, + { + "round": 18, + "position": 3, + "provider": "hermes" + }, + { + "round": 18, + "position": 4, + "provider": "kiro" + }, + { + "round": 18, + "position": 5, + "provider": "cline" + }, + { + "round": 18, + "position": 6, + "provider": "roo-code" + }, + { + "round": 18, + "position": 7, + "provider": "kilo" + }, + { + "round": 19, + "position": 0, + "provider": "claude" + }, + { + "round": 19, + "position": 1, + "provider": "codex" + }, + { + "round": 19, + "position": 2, + "provider": "cursor" + }, + { + "round": 19, + "position": 3, + "provider": "hermes" + }, + { + "round": 19, + "position": 4, + "provider": "kiro" + }, + { + "round": 19, + "position": 5, + "provider": "cline" + }, + { + "round": 19, + "position": 6, + "provider": "roo-code" + }, + { + "round": 19, + "position": 7, + "provider": "kilo" + }, + { + "round": 20, + "position": 0, + "provider": "claude" + }, + { + "round": 20, + "position": 1, + "provider": "codex" + }, + { + "round": 20, + "position": 2, + "provider": "cursor" + }, + { + "round": 20, + "position": 3, + "provider": "hermes" + }, + { + "round": 20, + "position": 4, + "provider": "kiro" + }, + { + "round": 20, + "position": 5, + "provider": "cline" + }, + { + "round": 20, + "position": 6, + "provider": "roo-code" + }, + { + "round": 20, + "position": 7, + "provider": "kilo" + }, + { + "round": 21, + "position": 0, + "provider": "claude" + }, + { + "round": 21, + "position": 1, + "provider": "codex" + }, + { + "round": 21, + "position": 2, + "provider": "cursor" + }, + { + "round": 21, + "position": 3, + "provider": "hermes" + }, + { + "round": 21, + "position": 4, + "provider": "kiro" + }, + { + "round": 21, + "position": 5, + "provider": "cline" + }, + { + "round": 21, + "position": 6, + "provider": "roo-code" + }, + { + "round": 21, + "position": 7, + "provider": "kilo" + }, + { + "round": 22, + "position": 0, + "provider": "claude" + }, + { + "round": 22, + "position": 1, + "provider": "codex" + }, + { + "round": 22, + "position": 2, + "provider": "cursor" + }, + { + "round": 22, + "position": 3, + "provider": "hermes" + }, + { + "round": 22, + "position": 4, + "provider": "kiro" + }, + { + "round": 22, + "position": 5, + "provider": "cline" + }, + { + "round": 22, + "position": 6, + "provider": "roo-code" + }, + { + "round": 22, + "position": 7, + "provider": "kilo" + }, + { + "round": 23, + "position": 0, + "provider": "claude" + }, + { + "round": 23, + "position": 1, + "provider": "codex" + }, + { + "round": 23, + "position": 2, + "provider": "cursor" + }, + { + "round": 23, + "position": 3, + "provider": "hermes" + }, + { + "round": 23, + "position": 4, + "provider": "kiro" + }, + { + "round": 23, + "position": 5, + "provider": "cline" + }, + { + "round": 23, + "position": 6, + "provider": "roo-code" + }, + { + "round": 23, + "position": 7, + "provider": "kilo" + }, + { + "round": 24, + "position": 0, + "provider": "claude" + }, + { + "round": 24, + "position": 1, + "provider": "codex" + }, + { + "round": 24, + "position": 2, + "provider": "cursor" + }, + { + "round": 24, + "position": 3, + "provider": "hermes" + }, + { + "round": 24, + "position": 4, + "provider": "kiro" + }, + { + "round": 24, + "position": 5, + "provider": "cline" + }, + { + "round": 24, + "position": 6, + "provider": "roo-code" + }, + { + "round": 24, + "position": 7, + "provider": "kilo" + }, + { + "round": 25, + "position": 0, + "provider": "claude" + }, + { + "round": 25, + "position": 1, + "provider": "codex" + }, + { + "round": 25, + "position": 2, + "provider": "cursor" + }, + { + "round": 25, + "position": 3, + "provider": "hermes" + }, + { + "round": 25, + "position": 4, + "provider": "kiro" + }, + { + "round": 25, + "position": 5, + "provider": "cline" + }, + { + "round": 25, + "position": 6, + "provider": "roo-code" + }, + { + "round": 25, + "position": 7, + "provider": "kilo" + }, + { + "round": 26, + "position": 0, + "provider": "claude" + }, + { + "round": 26, + "position": 1, + "provider": "codex" + }, + { + "round": 26, + "position": 2, + "provider": "cursor" + }, + { + "round": 26, + "position": 3, + "provider": "hermes" + }, + { + "round": 26, + "position": 4, + "provider": "kiro" + }, + { + "round": 26, + "position": 5, + "provider": "cline" + }, + { + "round": 26, + "position": 6, + "provider": "roo-code" + }, + { + "round": 26, + "position": 7, + "provider": "kilo" + }, + { + "round": 27, + "position": 0, + "provider": "claude" + }, + { + "round": 27, + "position": 1, + "provider": "codex" + }, + { + "round": 27, + "position": 2, + "provider": "cursor" + }, + { + "round": 27, + "position": 3, + "provider": "hermes" + }, + { + "round": 27, + "position": 4, + "provider": "kiro" + }, + { + "round": 27, + "position": 5, + "provider": "cline" + }, + { + "round": 27, + "position": 6, + "provider": "roo-code" + }, + { + "round": 27, + "position": 7, + "provider": "kilo" + }, + { + "round": 28, + "position": 0, + "provider": "claude" + }, + { + "round": 28, + "position": 1, + "provider": "codex" + }, + { + "round": 28, + "position": 2, + "provider": "cursor" + }, + { + "round": 28, + "position": 3, + "provider": "hermes" + }, + { + "round": 28, + "position": 4, + "provider": "kiro" + }, + { + "round": 28, + "position": 5, + "provider": "cline" + }, + { + "round": 28, + "position": 6, + "provider": "roo-code" + }, + { + "round": 28, + "position": 7, + "provider": "kilo" + }, + { + "round": 29, + "position": 0, + "provider": "claude" + }, + { + "round": 29, + "position": 1, + "provider": "codex" + }, + { + "round": 29, + "position": 2, + "provider": "cursor" + }, + { + "round": 29, + "position": 3, + "provider": "hermes" + }, + { + "round": 29, + "position": 4, + "provider": "kiro" + }, + { + "round": 29, + "position": 5, + "provider": "cline" + }, + { + "round": 29, + "position": 6, + "provider": "roo-code" + }, + { + "round": 29, + "position": 7, + "provider": "kilo" + } + ] + }, + "providers": [ + { + "provider": "claude", + "production_path": "claude_production_observation_pipeline_v1", + "pipeline_scope": "production_parse_normalize_sanitize_commit_project_and_replay", + "measured_repetitions": 30, + "observations_per_repetition": 8, + "replay_limit": 9, + "max_backlog_records": 8, + "parse": { + "scope": "native_provider_format_decode", + "raw_samples": [ + { + "repetition": 0, + "latency_ns": 58742, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 155740, + "record_count": 8 + }, + { + "repetition": 1, + "latency_ns": 61511, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 175008, + "record_count": 8 + }, + { + "repetition": 2, + "latency_ns": 58950, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 175080, + "record_count": 8 + }, + { + "repetition": 3, + "latency_ns": 93341, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 175976, + "record_count": 8 + }, + { + "repetition": 4, + "latency_ns": 47871, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177332, + "record_count": 8 + }, + { + "repetition": 5, + "latency_ns": 68571, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177340, + "record_count": 8 + }, + { + "repetition": 6, + "latency_ns": 91271, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177372, + "record_count": 8 + }, + { + "repetition": 7, + "latency_ns": 61321, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177400, + "record_count": 8 + }, + { + "repetition": 8, + "latency_ns": 62281, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177404, + "record_count": 8 + }, + { + "repetition": 9, + "latency_ns": 71652, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177444, + "record_count": 8 + }, + { + "repetition": 10, + "latency_ns": 59661, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177448, + "record_count": 8 + }, + { + "repetition": 11, + "latency_ns": 81670, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177448, + "record_count": 8 + }, + { + "repetition": 12, + "latency_ns": 74501, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177448, + "record_count": 8 + }, + { + "repetition": 13, + "latency_ns": 62861, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177456, + "record_count": 8 + }, + { + "repetition": 14, + "latency_ns": 102412, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177456, + "record_count": 8 + }, + { + "repetition": 15, + "latency_ns": 59911, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177460, + "record_count": 8 + }, + { + "repetition": 16, + "latency_ns": 62132, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177472, + "record_count": 8 + }, + { + "repetition": 17, + "latency_ns": 81531, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177476, + "record_count": 8 + }, + { + "repetition": 18, + "latency_ns": 61030, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177476, + "record_count": 8 + }, + { + "repetition": 19, + "latency_ns": 64441, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177476, + "record_count": 8 + }, + { + "repetition": 20, + "latency_ns": 69412, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177476, + "record_count": 8 + }, + { + "repetition": 21, + "latency_ns": 65410, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177476, + "record_count": 8 + }, + { + "repetition": 22, + "latency_ns": 66531, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177476, + "record_count": 8 + }, + { + "repetition": 23, + "latency_ns": 59721, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177500, + "record_count": 8 + }, + { + "repetition": 24, + "latency_ns": 60451, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177500, + "record_count": 8 + }, + { + "repetition": 25, + "latency_ns": 64381, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177500, + "record_count": 8 + }, + { + "repetition": 26, + "latency_ns": 61081, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177500, + "record_count": 8 + }, + { + "repetition": 27, + "latency_ns": 61092, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177500, + "record_count": 8 + }, + { + "repetition": 28, + "latency_ns": 66132, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177500, + "record_count": 8 + }, + { + "repetition": 29, + "latency_ns": 87591, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177500, + "record_count": 8 + } + ], + "latency": { + "repetitions": 30, + "min_ns": 47871, + "p50_ns": 62861, + "p95_ns": 93341, + "p99_ns": 102412, + "max_ns": 102412, + "mean_ns": 68248.76666666666, + "sample_stddev_ns": 12280.58133714202 + }, + "cpu_ticks": 0, + "cpu_ms": 0.0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177500 + }, + "commit": { + "scope": "production_adapter_parse_normalize_sanitize_commit_and_project", + "raw_samples": [ + { + "repetition": 0, + "latency_ns": 121915278, + "cpu_ticks": 12, + "process_write_bytes": 4599808, + "database_storage_growth_bytes": 2846920, + "peak_rss_kib": 155900, + "record_count": 8 + }, + { + "repetition": 1, + "latency_ns": 170115621, + "cpu_ticks": 17, + "process_write_bytes": 4591616, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 175104, + "record_count": 8 + }, + { + "repetition": 2, + "latency_ns": 116366498, + "cpu_ticks": 11, + "process_write_bytes": 4608000, + "database_storage_growth_bytes": 2846920, + "peak_rss_kib": 175972, + "record_count": 8 + }, + { + "repetition": 3, + "latency_ns": 122645994, + "cpu_ticks": 12, + "process_write_bytes": 4591616, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 176072, + "record_count": 8 + }, + { + "repetition": 4, + "latency_ns": 120546213, + "cpu_ticks": 11, + "process_write_bytes": 4591616, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 177428, + "record_count": 8 + }, + { + "repetition": 5, + "latency_ns": 117893745, + "cpu_ticks": 11, + "process_write_bytes": 4591616, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 177436, + "record_count": 8 + }, + { + "repetition": 6, + "latency_ns": 166634594, + "cpu_ticks": 16, + "process_write_bytes": 4591616, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 177468, + "record_count": 8 + }, + { + "repetition": 7, + "latency_ns": 118120985, + "cpu_ticks": 11, + "process_write_bytes": 4648960, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 177496, + "record_count": 8 + }, + { + "repetition": 8, + "latency_ns": 118126135, + "cpu_ticks": 11, + "process_write_bytes": 4591616, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 177516, + "record_count": 8 + }, + { + "repetition": 9, + "latency_ns": 118459368, + "cpu_ticks": 11, + "process_write_bytes": 4599808, + "database_storage_growth_bytes": 2846920, + "peak_rss_kib": 177540, + "record_count": 8 + }, + { + "repetition": 10, + "latency_ns": 119953257, + "cpu_ticks": 11, + "process_write_bytes": 4591616, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 177544, + "record_count": 8 + }, + { + "repetition": 11, + "latency_ns": 122832206, + "cpu_ticks": 11, + "process_write_bytes": 4591616, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 177544, + "record_count": 8 + }, + { + "repetition": 12, + "latency_ns": 117895836, + "cpu_ticks": 11, + "process_write_bytes": 4591616, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 177544, + "record_count": 8 + }, + { + "repetition": 13, + "latency_ns": 112413210, + "cpu_ticks": 11, + "process_write_bytes": 4591616, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 177552, + "record_count": 8 + }, + { + "repetition": 14, + "latency_ns": 118973008, + "cpu_ticks": 11, + "process_write_bytes": 4591616, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 177552, + "record_count": 8 + }, + { + "repetition": 15, + "latency_ns": 126274740, + "cpu_ticks": 11, + "process_write_bytes": 4591616, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 177556, + "record_count": 8 + }, + { + "repetition": 16, + "latency_ns": 117555799, + "cpu_ticks": 12, + "process_write_bytes": 4599808, + "database_storage_growth_bytes": 2846920, + "peak_rss_kib": 177568, + "record_count": 8 + }, + { + "repetition": 17, + "latency_ns": 132724316, + "cpu_ticks": 13, + "process_write_bytes": 4620288, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 177572, + "record_count": 8 + }, + { + "repetition": 18, + "latency_ns": 117404243, + "cpu_ticks": 11, + "process_write_bytes": 4591616, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 177572, + "record_count": 8 + }, + { + "repetition": 19, + "latency_ns": 135704585, + "cpu_ticks": 12, + "process_write_bytes": 4591616, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 177572, + "record_count": 8 + }, + { + "repetition": 20, + "latency_ns": 161626272, + "cpu_ticks": 16, + "process_write_bytes": 4591616, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 177572, + "record_count": 8 + }, + { + "repetition": 21, + "latency_ns": 122606161, + "cpu_ticks": 12, + "process_write_bytes": 4591616, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 177572, + "record_count": 8 + }, + { + "repetition": 22, + "latency_ns": 125213256, + "cpu_ticks": 12, + "process_write_bytes": 4599808, + "database_storage_growth_bytes": 2846920, + "peak_rss_kib": 177572, + "record_count": 8 + }, + { + "repetition": 23, + "latency_ns": 123568952, + "cpu_ticks": 12, + "process_write_bytes": 4685824, + "database_storage_growth_bytes": 2846920, + "peak_rss_kib": 177596, + "record_count": 8 + }, + { + "repetition": 24, + "latency_ns": 114464726, + "cpu_ticks": 11, + "process_write_bytes": 4591616, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 177596, + "record_count": 8 + }, + { + "repetition": 25, + "latency_ns": 117585368, + "cpu_ticks": 11, + "process_write_bytes": 4591616, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 177596, + "record_count": 8 + }, + { + "repetition": 26, + "latency_ns": 118335437, + "cpu_ticks": 11, + "process_write_bytes": 4591616, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 177596, + "record_count": 8 + }, + { + "repetition": 27, + "latency_ns": 115587279, + "cpu_ticks": 10, + "process_write_bytes": 4591616, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 177596, + "record_count": 8 + }, + { + "repetition": 28, + "latency_ns": 115176602, + "cpu_ticks": 11, + "process_write_bytes": 4608000, + "database_storage_growth_bytes": 2846920, + "peak_rss_kib": 177596, + "record_count": 8 + }, + { + "repetition": 29, + "latency_ns": 163328362, + "cpu_ticks": 15, + "process_write_bytes": 4599808, + "database_storage_growth_bytes": 2846920, + "peak_rss_kib": 177596, + "record_count": 8 + } + ], + "latency": { + "repetitions": 30, + "min_ns": 112413210, + "p50_ns": 118973008, + "p95_ns": 166634594, + "p99_ns": 170115621, + "max_ns": 170115621, + "mean_ns": 126334934.86666666, + "sample_stddev_ns": 16390610.84588072 + }, + "cpu_ticks": 358, + "cpu_ms": 3580.0, + "process_write_bytes": 138002432, + "database_storage_growth_bytes": 85226320, + "peak_rss_kib": 177596 + }, + "replay": { + "scope": "authoritative_store_bounded_replay", + "raw_samples": [ + { + "repetition": 0, + "latency_ns": 1107725, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 155900, + "record_count": 8 + }, + { + "repetition": 1, + "latency_ns": 1490711, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 175104, + "record_count": 8 + }, + { + "repetition": 2, + "latency_ns": 1098106, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 175972, + "record_count": 8 + }, + { + "repetition": 3, + "latency_ns": 967985, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 176072, + "record_count": 8 + }, + { + "repetition": 4, + "latency_ns": 1121326, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177428, + "record_count": 8 + }, + { + "repetition": 5, + "latency_ns": 996934, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177436, + "record_count": 8 + }, + { + "repetition": 6, + "latency_ns": 1576561, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177468, + "record_count": 8 + }, + { + "repetition": 7, + "latency_ns": 962283, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177496, + "record_count": 8 + }, + { + "repetition": 8, + "latency_ns": 921852, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177516, + "record_count": 8 + }, + { + "repetition": 9, + "latency_ns": 967503, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177540, + "record_count": 8 + }, + { + "repetition": 10, + "latency_ns": 996264, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177544, + "record_count": 8 + }, + { + "repetition": 11, + "latency_ns": 980443, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177544, + "record_count": 8 + }, + { + "repetition": 12, + "latency_ns": 952353, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177544, + "record_count": 8 + }, + { + "repetition": 13, + "latency_ns": 932233, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177552, + "record_count": 8 + }, + { + "repetition": 14, + "latency_ns": 949543, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177552, + "record_count": 8 + }, + { + "repetition": 15, + "latency_ns": 1061075, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177556, + "record_count": 8 + }, + { + "repetition": 16, + "latency_ns": 988873, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177568, + "record_count": 8 + }, + { + "repetition": 17, + "latency_ns": 1080065, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177572, + "record_count": 8 + }, + { + "repetition": 18, + "latency_ns": 946363, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177572, + "record_count": 8 + }, + { + "repetition": 19, + "latency_ns": 1098925, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177572, + "record_count": 8 + }, + { + "repetition": 20, + "latency_ns": 1506861, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177572, + "record_count": 8 + }, + { + "repetition": 21, + "latency_ns": 1121166, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177572, + "record_count": 8 + }, + { + "repetition": 22, + "latency_ns": 988633, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177572, + "record_count": 8 + }, + { + "repetition": 23, + "latency_ns": 1159136, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177596, + "record_count": 8 + }, + { + "repetition": 24, + "latency_ns": 917773, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177596, + "record_count": 8 + }, + { + "repetition": 25, + "latency_ns": 967994, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177596, + "record_count": 8 + }, + { + "repetition": 26, + "latency_ns": 1054105, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177596, + "record_count": 8 + }, + { + "repetition": 27, + "latency_ns": 1008904, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177596, + "record_count": 8 + }, + { + "repetition": 28, + "latency_ns": 938002, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177596, + "record_count": 8 + }, + { + "repetition": 29, + "latency_ns": 1267338, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177596, + "record_count": 8 + } + ], + "latency": { + "repetitions": 30, + "min_ns": 917773, + "p50_ns": 996264, + "p95_ns": 1506861, + "p99_ns": 1576561, + "max_ns": 1576561, + "mean_ns": 1070901.1666666667, + "sample_stddev_ns": 174579.39297580012 + }, + "cpu_ticks": 4, + "cpu_ms": 40.0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177596 + }, + "pipeline_raw_samples": [ + { + "repetition": 0, + "latency_ns": 123264187, + "cpu_ticks": 12, + "process_write_bytes": 4599808, + "database_storage_growth_bytes": 2846920, + "peak_rss_kib": 155900, + "replayed_observations": 8 + }, + { + "repetition": 1, + "latency_ns": 171962887, + "cpu_ticks": 17, + "process_write_bytes": 4591616, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 175104, + "replayed_observations": 8 + }, + { + "repetition": 2, + "latency_ns": 117684086, + "cpu_ticks": 11, + "process_write_bytes": 4608000, + "database_storage_growth_bytes": 2846920, + "peak_rss_kib": 175972, + "replayed_observations": 8 + }, + { + "repetition": 3, + "latency_ns": 123858002, + "cpu_ticks": 12, + "process_write_bytes": 4591616, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 176072, + "replayed_observations": 8 + }, + { + "repetition": 4, + "latency_ns": 121847482, + "cpu_ticks": 11, + "process_write_bytes": 4591616, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 177428, + "replayed_observations": 8 + }, + { + "repetition": 5, + "latency_ns": 119079682, + "cpu_ticks": 11, + "process_write_bytes": 4591616, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 177436, + "replayed_observations": 8 + }, + { + "repetition": 6, + "latency_ns": 168537380, + "cpu_ticks": 16, + "process_write_bytes": 4591616, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 177468, + "replayed_observations": 8 + }, + { + "repetition": 7, + "latency_ns": 119292963, + "cpu_ticks": 11, + "process_write_bytes": 4648960, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 177496, + "replayed_observations": 8 + }, + { + "repetition": 8, + "latency_ns": 119251180, + "cpu_ticks": 11, + "process_write_bytes": 4591616, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 177516, + "replayed_observations": 8 + }, + { + "repetition": 9, + "latency_ns": 119643504, + "cpu_ticks": 11, + "process_write_bytes": 4599808, + "database_storage_growth_bytes": 2846920, + "peak_rss_kib": 177540, + "replayed_observations": 8 + }, + { + "repetition": 10, + "latency_ns": 121156395, + "cpu_ticks": 12, + "process_write_bytes": 4591616, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 177544, + "replayed_observations": 8 + }, + { + "repetition": 11, + "latency_ns": 124013102, + "cpu_ticks": 12, + "process_write_bytes": 4591616, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 177544, + "replayed_observations": 8 + }, + { + "repetition": 12, + "latency_ns": 119031412, + "cpu_ticks": 11, + "process_write_bytes": 4591616, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 177544, + "replayed_observations": 8 + }, + { + "repetition": 13, + "latency_ns": 113550874, + "cpu_ticks": 11, + "process_write_bytes": 4591616, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 177552, + "replayed_observations": 8 + }, + { + "repetition": 14, + "latency_ns": 120133245, + "cpu_ticks": 11, + "process_write_bytes": 4591616, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 177552, + "replayed_observations": 8 + }, + { + "repetition": 15, + "latency_ns": 127560348, + "cpu_ticks": 12, + "process_write_bytes": 4591616, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 177556, + "replayed_observations": 8 + }, + { + "repetition": 16, + "latency_ns": 118731574, + "cpu_ticks": 12, + "process_write_bytes": 4599808, + "database_storage_growth_bytes": 2846920, + "peak_rss_kib": 177568, + "replayed_observations": 8 + }, + { + "repetition": 17, + "latency_ns": 134027495, + "cpu_ticks": 13, + "process_write_bytes": 4620288, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 177572, + "replayed_observations": 8 + }, + { + "repetition": 18, + "latency_ns": 118563949, + "cpu_ticks": 11, + "process_write_bytes": 4591616, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 177572, + "replayed_observations": 8 + }, + { + "repetition": 19, + "latency_ns": 137053485, + "cpu_ticks": 12, + "process_write_bytes": 4591616, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 177572, + "replayed_observations": 8 + }, + { + "repetition": 20, + "latency_ns": 163385795, + "cpu_ticks": 16, + "process_write_bytes": 4591616, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 177572, + "replayed_observations": 8 + }, + { + "repetition": 21, + "latency_ns": 123938660, + "cpu_ticks": 12, + "process_write_bytes": 4591616, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 177572, + "replayed_observations": 8 + }, + { + "repetition": 22, + "latency_ns": 126403203, + "cpu_ticks": 12, + "process_write_bytes": 4599808, + "database_storage_growth_bytes": 2846920, + "peak_rss_kib": 177572, + "replayed_observations": 8 + }, + { + "repetition": 23, + "latency_ns": 124957402, + "cpu_ticks": 12, + "process_write_bytes": 4685824, + "database_storage_growth_bytes": 2846920, + "peak_rss_kib": 177596, + "replayed_observations": 8 + }, + { + "repetition": 24, + "latency_ns": 115627982, + "cpu_ticks": 12, + "process_write_bytes": 4591616, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 177596, + "replayed_observations": 8 + }, + { + "repetition": 25, + "latency_ns": 118790275, + "cpu_ticks": 11, + "process_write_bytes": 4591616, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 177596, + "replayed_observations": 8 + }, + { + "repetition": 26, + "latency_ns": 119611476, + "cpu_ticks": 11, + "process_write_bytes": 4591616, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 177596, + "replayed_observations": 8 + }, + { + "repetition": 27, + "latency_ns": 116833954, + "cpu_ticks": 11, + "process_write_bytes": 4591616, + "database_storage_growth_bytes": 2838680, + "peak_rss_kib": 177596, + "replayed_observations": 8 + }, + { + "repetition": 28, + "latency_ns": 116330177, + "cpu_ticks": 12, + "process_write_bytes": 4608000, + "database_storage_growth_bytes": 2846920, + "peak_rss_kib": 177596, + "replayed_observations": 8 + }, + { + "repetition": 29, + "latency_ns": 164887244, + "cpu_ticks": 15, + "process_write_bytes": 4599808, + "database_storage_growth_bytes": 2846920, + "peak_rss_kib": 177596, + "replayed_observations": 8 + } + ], + "pipeline_latency": { + "repetitions": 30, + "min_ns": 113550874, + "p50_ns": 120133245, + "p95_ns": 168537380, + "p99_ns": 171962887, + "max_ns": 171962887, + "mean_ns": 127633646.66666667, + "sample_stddev_ns": 16583234.147378767 + }, + "pipeline_records_per_second": 62.679396921825266, + "pipeline_cpu_ticks": 364, + "pipeline_cpu_ms": 3640.0, + "pipeline_process_write_bytes": 138002432, + "pipeline_database_storage_growth_bytes": 85226320, + "peak_rss_kib": 177596, + "no_op_raw_samples": [ + { + "repetition": 0, + "latency_ns": 1653993, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 155900, + "replayed_observations": 0 + }, + { + "repetition": 1, + "latency_ns": 2461515, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 175104, + "replayed_observations": 0 + }, + { + "repetition": 2, + "latency_ns": 1581733, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 175972, + "replayed_observations": 0 + }, + { + "repetition": 3, + "latency_ns": 1517102, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 176072, + "replayed_observations": 0 + }, + { + "repetition": 4, + "latency_ns": 1575492, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177428, + "replayed_observations": 0 + }, + { + "repetition": 5, + "latency_ns": 1577113, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177436, + "replayed_observations": 0 + }, + { + "repetition": 6, + "latency_ns": 1997908, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177468, + "replayed_observations": 0 + }, + { + "repetition": 7, + "latency_ns": 1477731, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177496, + "replayed_observations": 0 + }, + { + "repetition": 8, + "latency_ns": 1394829, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177516, + "replayed_observations": 0 + }, + { + "repetition": 9, + "latency_ns": 1582661, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177540, + "replayed_observations": 0 + }, + { + "repetition": 10, + "latency_ns": 1544961, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177544, + "replayed_observations": 0 + }, + { + "repetition": 11, + "latency_ns": 1542691, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177544, + "replayed_observations": 0 + }, + { + "repetition": 12, + "latency_ns": 1544622, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177544, + "replayed_observations": 0 + }, + { + "repetition": 13, + "latency_ns": 1517651, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177552, + "replayed_observations": 0 + }, + { + "repetition": 14, + "latency_ns": 1591852, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177552, + "replayed_observations": 0 + }, + { + "repetition": 15, + "latency_ns": 1680213, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177556, + "replayed_observations": 0 + }, + { + "repetition": 16, + "latency_ns": 1531371, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177568, + "replayed_observations": 0 + }, + { + "repetition": 17, + "latency_ns": 1485841, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177572, + "replayed_observations": 0 + }, + { + "repetition": 18, + "latency_ns": 1650363, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177572, + "replayed_observations": 0 + }, + { + "repetition": 19, + "latency_ns": 1873415, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177572, + "replayed_observations": 0 + }, + { + "repetition": 20, + "latency_ns": 2011348, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177572, + "replayed_observations": 0 + }, + { + "repetition": 21, + "latency_ns": 1702993, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177572, + "replayed_observations": 0 + }, + { + "repetition": 22, + "latency_ns": 1728703, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177572, + "replayed_observations": 0 + }, + { + "repetition": 23, + "latency_ns": 1724623, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177596, + "replayed_observations": 0 + }, + { + "repetition": 24, + "latency_ns": 1576432, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177596, + "replayed_observations": 0 + }, + { + "repetition": 25, + "latency_ns": 1519691, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177596, + "replayed_observations": 0 + }, + { + "repetition": 26, + "latency_ns": 1577753, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177596, + "replayed_observations": 0 + }, + { + "repetition": 27, + "latency_ns": 1556222, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177596, + "replayed_observations": 0 + }, + { + "repetition": 28, + "latency_ns": 1436141, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177596, + "replayed_observations": 0 + }, + { + "repetition": 29, + "latency_ns": 2000086, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177596, + "replayed_observations": 0 + } + ], + "no_op_latency": { + "repetitions": 30, + "min_ns": 1394829, + "p50_ns": 1577113, + "p95_ns": 2011348, + "p99_ns": 2461515, + "max_ns": 2461515, + "mean_ns": 1653901.6333333333, + "sample_stddev_ns": 220337.51207142745 + }, + "no_op_cpu_ticks": 3, + "no_op_cpu_ms": 30.0, + "no_op_process_write_bytes": 0, + "no_op_database_storage_growth_bytes": 0, + "no_op_observation_count_delta": 0 + }, + { + "provider": "codex", + "production_path": "codex_production_observation_pipeline_v1", + "pipeline_scope": "production_parse_normalize_sanitize_commit_project_and_replay", + "measured_repetitions": 30, + "observations_per_repetition": 8, + "replay_limit": 9, + "max_backlog_records": 8, + "parse": { + "scope": "native_provider_format_decode", + "raw_samples": [ + { + "repetition": 0, + "latency_ns": 36622, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 160892, + "record_count": 8 + }, + { + "repetition": 1, + "latency_ns": 37361, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 175044, + "record_count": 8 + }, + { + "repetition": 2, + "latency_ns": 37951, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 175912, + "record_count": 8 + }, + { + "repetition": 3, + "latency_ns": 40942, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 176012, + "record_count": 8 + }, + { + "repetition": 4, + "latency_ns": 32472, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177368, + "record_count": 8 + }, + { + "repetition": 5, + "latency_ns": 35982, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177376, + "record_count": 8 + }, + { + "repetition": 6, + "latency_ns": 36459, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177408, + "record_count": 8 + }, + { + "repetition": 7, + "latency_ns": 35689, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177436, + "record_count": 8 + }, + { + "repetition": 8, + "latency_ns": 30942, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177456, + "record_count": 8 + }, + { + "repetition": 9, + "latency_ns": 35931, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177480, + "record_count": 8 + }, + { + "repetition": 10, + "latency_ns": 37390, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177484, + "record_count": 8 + }, + { + "repetition": 11, + "latency_ns": 37339, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177484, + "record_count": 8 + }, + { + "repetition": 12, + "latency_ns": 34900, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177484, + "record_count": 8 + }, + { + "repetition": 13, + "latency_ns": 38632, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177492, + "record_count": 8 + }, + { + "repetition": 14, + "latency_ns": 48251, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177492, + "record_count": 8 + }, + { + "repetition": 15, + "latency_ns": 38720, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177496, + "record_count": 8 + }, + { + "repetition": 16, + "latency_ns": 37761, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177508, + "record_count": 8 + }, + { + "repetition": 17, + "latency_ns": 34720, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 18, + "latency_ns": 39360, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 19, + "latency_ns": 36980, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 20, + "latency_ns": 35910, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 21, + "latency_ns": 34900, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 22, + "latency_ns": 60811, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 23, + "latency_ns": 31540, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 24, + "latency_ns": 36652, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 25, + "latency_ns": 53380, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 26, + "latency_ns": 37710, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 27, + "latency_ns": 42240, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 28, + "latency_ns": 34020, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 29, + "latency_ns": 36771, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + } + ], + "latency": { + "repetitions": 30, + "min_ns": 30942, + "p50_ns": 36771, + "p95_ns": 53380, + "p99_ns": 60811, + "max_ns": 60811, + "mean_ns": 38277.933333333334, + "sample_stddev_ns": 6116.797195137074 + }, + "cpu_ticks": 0, + "cpu_ms": 0.0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536 + }, + "commit": { + "scope": "production_adapter_parse_normalize_sanitize_commit_and_project", + "raw_samples": [ + { + "repetition": 0, + "latency_ns": 121920878, + "cpu_ticks": 12, + "process_write_bytes": 4374528, + "database_storage_growth_bytes": 2719200, + "peak_rss_kib": 162720, + "record_count": 8 + }, + { + "repetition": 1, + "latency_ns": 126200387, + "cpu_ticks": 11, + "process_write_bytes": 4374528, + "database_storage_growth_bytes": 2719200, + "peak_rss_kib": 175140, + "record_count": 8 + }, + { + "repetition": 2, + "latency_ns": 120805360, + "cpu_ticks": 11, + "process_write_bytes": 4382720, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 176008, + "record_count": 8 + }, + { + "repetition": 3, + "latency_ns": 122097916, + "cpu_ticks": 11, + "process_write_bytes": 4374528, + "database_storage_growth_bytes": 2719200, + "peak_rss_kib": 176108, + "record_count": 8 + }, + { + "repetition": 4, + "latency_ns": 126041511, + "cpu_ticks": 12, + "process_write_bytes": 4382720, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177464, + "record_count": 8 + }, + { + "repetition": 5, + "latency_ns": 116662528, + "cpu_ticks": 11, + "process_write_bytes": 4382720, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177472, + "record_count": 8 + }, + { + "repetition": 6, + "latency_ns": 121839419, + "cpu_ticks": 12, + "process_write_bytes": 4382720, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177504, + "record_count": 8 + }, + { + "repetition": 7, + "latency_ns": 130255315, + "cpu_ticks": 12, + "process_write_bytes": 4374528, + "database_storage_growth_bytes": 2719200, + "peak_rss_kib": 177532, + "record_count": 8 + }, + { + "repetition": 8, + "latency_ns": 128974096, + "cpu_ticks": 12, + "process_write_bytes": 4382720, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177552, + "record_count": 8 + }, + { + "repetition": 9, + "latency_ns": 121817295, + "cpu_ticks": 11, + "process_write_bytes": 4382720, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177576, + "record_count": 8 + }, + { + "repetition": 10, + "latency_ns": 123913462, + "cpu_ticks": 10, + "process_write_bytes": 4382720, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177580, + "record_count": 8 + }, + { + "repetition": 11, + "latency_ns": 128694347, + "cpu_ticks": 12, + "process_write_bytes": 4390912, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177580, + "record_count": 8 + }, + { + "repetition": 12, + "latency_ns": 121953642, + "cpu_ticks": 11, + "process_write_bytes": 4399104, + "database_storage_growth_bytes": 2719200, + "peak_rss_kib": 177580, + "record_count": 8 + }, + { + "repetition": 13, + "latency_ns": 119237534, + "cpu_ticks": 12, + "process_write_bytes": 4374528, + "database_storage_growth_bytes": 2719200, + "peak_rss_kib": 177588, + "record_count": 8 + }, + { + "repetition": 14, + "latency_ns": 123486832, + "cpu_ticks": 12, + "process_write_bytes": 4390912, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177588, + "record_count": 8 + }, + { + "repetition": 15, + "latency_ns": 117910283, + "cpu_ticks": 12, + "process_write_bytes": 4382720, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177592, + "record_count": 8 + }, + { + "repetition": 16, + "latency_ns": 121318509, + "cpu_ticks": 11, + "process_write_bytes": 4382720, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177604, + "record_count": 8 + }, + { + "repetition": 17, + "latency_ns": 124166098, + "cpu_ticks": 11, + "process_write_bytes": 4382720, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 18, + "latency_ns": 128047310, + "cpu_ticks": 12, + "process_write_bytes": 4374528, + "database_storage_growth_bytes": 2719200, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 19, + "latency_ns": 116547630, + "cpu_ticks": 11, + "process_write_bytes": 4374528, + "database_storage_growth_bytes": 2719200, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 20, + "latency_ns": 116578699, + "cpu_ticks": 11, + "process_write_bytes": 4374528, + "database_storage_growth_bytes": 2719200, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 21, + "latency_ns": 116551718, + "cpu_ticks": 11, + "process_write_bytes": 4374528, + "database_storage_growth_bytes": 2719200, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 22, + "latency_ns": 126908559, + "cpu_ticks": 12, + "process_write_bytes": 4382720, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 23, + "latency_ns": 119504986, + "cpu_ticks": 12, + "process_write_bytes": 4374528, + "database_storage_growth_bytes": 2719200, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 24, + "latency_ns": 117113793, + "cpu_ticks": 11, + "process_write_bytes": 4382720, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 25, + "latency_ns": 128454187, + "cpu_ticks": 12, + "process_write_bytes": 4374528, + "database_storage_growth_bytes": 2719200, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 26, + "latency_ns": 119478312, + "cpu_ticks": 11, + "process_write_bytes": 4374528, + "database_storage_growth_bytes": 2719200, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 27, + "latency_ns": 117325962, + "cpu_ticks": 11, + "process_write_bytes": 4390912, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 28, + "latency_ns": 120928901, + "cpu_ticks": 12, + "process_write_bytes": 4374528, + "database_storage_growth_bytes": 2719200, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 29, + "latency_ns": 158414565, + "cpu_ticks": 16, + "process_write_bytes": 4390912, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177632, + "record_count": 8 + } + ], + "latency": { + "repetitions": 30, + "min_ns": 116547630, + "p50_ns": 121839419, + "p95_ns": 130255315, + "p99_ns": 158414565, + "max_ns": 158414565, + "mean_ns": 123438334.46666667, + "sample_stddev_ns": 7824564.044424692 + }, + "cpu_ticks": 348, + "cpu_ms": 3480.0, + "process_write_bytes": 131424256, + "database_storage_growth_bytes": 81707840, + "peak_rss_kib": 177632 + }, + "replay": { + "scope": "authoritative_store_bounded_replay", + "raw_samples": [ + { + "repetition": 0, + "latency_ns": 899253, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 162720, + "record_count": 8 + }, + { + "repetition": 1, + "latency_ns": 898053, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 175140, + "record_count": 8 + }, + { + "repetition": 2, + "latency_ns": 860861, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 176008, + "record_count": 8 + }, + { + "repetition": 3, + "latency_ns": 1000165, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 176108, + "record_count": 8 + }, + { + "repetition": 4, + "latency_ns": 915532, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177464, + "record_count": 8 + }, + { + "repetition": 5, + "latency_ns": 884243, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177472, + "record_count": 8 + }, + { + "repetition": 6, + "latency_ns": 941434, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177504, + "record_count": 8 + }, + { + "repetition": 7, + "latency_ns": 886453, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177532, + "record_count": 8 + }, + { + "repetition": 8, + "latency_ns": 964953, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177552, + "record_count": 8 + }, + { + "repetition": 9, + "latency_ns": 913962, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177576, + "record_count": 8 + }, + { + "repetition": 10, + "latency_ns": 1197587, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177580, + "record_count": 8 + }, + { + "repetition": 11, + "latency_ns": 893443, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177580, + "record_count": 8 + }, + { + "repetition": 12, + "latency_ns": 1235787, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177580, + "record_count": 8 + }, + { + "repetition": 13, + "latency_ns": 886743, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177588, + "record_count": 8 + }, + { + "repetition": 14, + "latency_ns": 860141, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177588, + "record_count": 8 + }, + { + "repetition": 15, + "latency_ns": 880542, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177592, + "record_count": 8 + }, + { + "repetition": 16, + "latency_ns": 878942, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177604, + "record_count": 8 + }, + { + "repetition": 17, + "latency_ns": 895793, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 18, + "latency_ns": 866802, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 19, + "latency_ns": 746320, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 20, + "latency_ns": 870292, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 21, + "latency_ns": 905293, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 22, + "latency_ns": 949164, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 23, + "latency_ns": 1033515, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 24, + "latency_ns": 912492, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 25, + "latency_ns": 898553, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 26, + "latency_ns": 869323, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 27, + "latency_ns": 877612, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 28, + "latency_ns": 854701, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 29, + "latency_ns": 1096845, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + } + ], + "latency": { + "repetitions": 30, + "min_ns": 746320, + "p50_ns": 895793, + "p95_ns": 1197587, + "p99_ns": 1235787, + "max_ns": 1235787, + "mean_ns": 925826.6333333333, + "sample_stddev_ns": 100102.46303748607 + }, + "cpu_ticks": 3, + "cpu_ms": 30.0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632 + }, + "pipeline_raw_samples": [ + { + "repetition": 0, + "latency_ns": 122999393, + "cpu_ticks": 12, + "process_write_bytes": 4374528, + "database_storage_growth_bytes": 2719200, + "peak_rss_kib": 162720, + "replayed_observations": 8 + }, + { + "repetition": 1, + "latency_ns": 127321052, + "cpu_ticks": 12, + "process_write_bytes": 4374528, + "database_storage_growth_bytes": 2719200, + "peak_rss_kib": 175140, + "replayed_observations": 8 + }, + { + "repetition": 2, + "latency_ns": 121861585, + "cpu_ticks": 11, + "process_write_bytes": 4382720, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 176008, + "replayed_observations": 8 + }, + { + "repetition": 3, + "latency_ns": 123339323, + "cpu_ticks": 12, + "process_write_bytes": 4374528, + "database_storage_growth_bytes": 2719200, + "peak_rss_kib": 176108, + "replayed_observations": 8 + }, + { + "repetition": 4, + "latency_ns": 127170256, + "cpu_ticks": 12, + "process_write_bytes": 4382720, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177464, + "replayed_observations": 8 + }, + { + "repetition": 5, + "latency_ns": 117729014, + "cpu_ticks": 11, + "process_write_bytes": 4382720, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177472, + "replayed_observations": 8 + }, + { + "repetition": 6, + "latency_ns": 122968244, + "cpu_ticks": 12, + "process_write_bytes": 4382720, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177504, + "replayed_observations": 8 + }, + { + "repetition": 7, + "latency_ns": 131404960, + "cpu_ticks": 12, + "process_write_bytes": 4374528, + "database_storage_growth_bytes": 2719200, + "peak_rss_kib": 177532, + "replayed_observations": 8 + }, + { + "repetition": 8, + "latency_ns": 130165612, + "cpu_ticks": 12, + "process_write_bytes": 4382720, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177552, + "replayed_observations": 8 + }, + { + "repetition": 9, + "latency_ns": 122923931, + "cpu_ticks": 12, + "process_write_bytes": 4382720, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177576, + "replayed_observations": 8 + }, + { + "repetition": 10, + "latency_ns": 125352273, + "cpu_ticks": 11, + "process_write_bytes": 4382720, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177580, + "replayed_observations": 8 + }, + { + "repetition": 11, + "latency_ns": 129795073, + "cpu_ticks": 12, + "process_write_bytes": 4390912, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177580, + "replayed_observations": 8 + }, + { + "repetition": 12, + "latency_ns": 123413924, + "cpu_ticks": 11, + "process_write_bytes": 4399104, + "database_storage_growth_bytes": 2719200, + "peak_rss_kib": 177580, + "replayed_observations": 8 + }, + { + "repetition": 13, + "latency_ns": 120322198, + "cpu_ticks": 12, + "process_write_bytes": 4374528, + "database_storage_growth_bytes": 2719200, + "peak_rss_kib": 177588, + "replayed_observations": 8 + }, + { + "repetition": 14, + "latency_ns": 124586097, + "cpu_ticks": 12, + "process_write_bytes": 4390912, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177588, + "replayed_observations": 8 + }, + { + "repetition": 15, + "latency_ns": 119023459, + "cpu_ticks": 12, + "process_write_bytes": 4382720, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177592, + "replayed_observations": 8 + }, + { + "repetition": 16, + "latency_ns": 122410874, + "cpu_ticks": 11, + "process_write_bytes": 4382720, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177604, + "replayed_observations": 8 + }, + { + "repetition": 17, + "latency_ns": 125286853, + "cpu_ticks": 11, + "process_write_bytes": 4382720, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 18, + "latency_ns": 129128955, + "cpu_ticks": 12, + "process_write_bytes": 4374528, + "database_storage_growth_bytes": 2719200, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 19, + "latency_ns": 117507464, + "cpu_ticks": 11, + "process_write_bytes": 4374528, + "database_storage_growth_bytes": 2719200, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 20, + "latency_ns": 117628343, + "cpu_ticks": 11, + "process_write_bytes": 4374528, + "database_storage_growth_bytes": 2719200, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 21, + "latency_ns": 117629412, + "cpu_ticks": 11, + "process_write_bytes": 4374528, + "database_storage_growth_bytes": 2719200, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 22, + "latency_ns": 128075847, + "cpu_ticks": 12, + "process_write_bytes": 4382720, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 23, + "latency_ns": 120777084, + "cpu_ticks": 12, + "process_write_bytes": 4374528, + "database_storage_growth_bytes": 2719200, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 24, + "latency_ns": 118230377, + "cpu_ticks": 11, + "process_write_bytes": 4382720, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 25, + "latency_ns": 129570723, + "cpu_ticks": 12, + "process_write_bytes": 4374528, + "database_storage_growth_bytes": 2719200, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 26, + "latency_ns": 120568037, + "cpu_ticks": 11, + "process_write_bytes": 4374528, + "database_storage_growth_bytes": 2719200, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 27, + "latency_ns": 118440778, + "cpu_ticks": 11, + "process_write_bytes": 4390912, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 28, + "latency_ns": 121954854, + "cpu_ticks": 12, + "process_write_bytes": 4374528, + "database_storage_growth_bytes": 2719200, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 29, + "latency_ns": 159763443, + "cpu_ticks": 16, + "process_write_bytes": 4390912, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177632, + "replayed_observations": 8 + } + ], + "pipeline_latency": { + "repetitions": 30, + "min_ns": 117507464, + "p50_ns": 122968244, + "p95_ns": 131404960, + "p99_ns": 159763443, + "max_ns": 159763443, + "mean_ns": 124578314.6, + "sample_stddev_ns": 7871549.710495722 + }, + "pipeline_records_per_second": 64.2166337350658, + "pipeline_cpu_ticks": 352, + "pipeline_cpu_ms": 3520.0, + "pipeline_process_write_bytes": 131424256, + "pipeline_database_storage_growth_bytes": 81707840, + "peak_rss_kib": 177632, + "no_op_raw_samples": [ + { + "repetition": 0, + "latency_ns": 646309, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 162912, + "replayed_observations": 0 + }, + { + "repetition": 1, + "latency_ns": 637578, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 175140, + "replayed_observations": 0 + }, + { + "repetition": 2, + "latency_ns": 620688, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 176008, + "replayed_observations": 0 + }, + { + "repetition": 3, + "latency_ns": 723940, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 176108, + "replayed_observations": 0 + }, + { + "repetition": 4, + "latency_ns": 700220, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177464, + "replayed_observations": 0 + }, + { + "repetition": 5, + "latency_ns": 548768, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177472, + "replayed_observations": 0 + }, + { + "repetition": 6, + "latency_ns": 647899, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177504, + "replayed_observations": 0 + }, + { + "repetition": 7, + "latency_ns": 904413, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177532, + "replayed_observations": 0 + }, + { + "repetition": 8, + "latency_ns": 648929, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177552, + "replayed_observations": 0 + }, + { + "repetition": 9, + "latency_ns": 633938, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177576, + "replayed_observations": 0 + }, + { + "repetition": 10, + "latency_ns": 757281, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177580, + "replayed_observations": 0 + }, + { + "repetition": 11, + "latency_ns": 709020, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177580, + "replayed_observations": 0 + }, + { + "repetition": 12, + "latency_ns": 670460, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177580, + "replayed_observations": 0 + }, + { + "repetition": 13, + "latency_ns": 686201, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177588, + "replayed_observations": 0 + }, + { + "repetition": 14, + "latency_ns": 726279, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177588, + "replayed_observations": 0 + }, + { + "repetition": 15, + "latency_ns": 659299, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177592, + "replayed_observations": 0 + }, + { + "repetition": 16, + "latency_ns": 583708, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177604, + "replayed_observations": 0 + }, + { + "repetition": 17, + "latency_ns": 624749, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 18, + "latency_ns": 661030, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 19, + "latency_ns": 490727, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 20, + "latency_ns": 605549, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 21, + "latency_ns": 604139, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 22, + "latency_ns": 710410, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 23, + "latency_ns": 766571, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 24, + "latency_ns": 603688, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 25, + "latency_ns": 758702, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 26, + "latency_ns": 617398, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 27, + "latency_ns": 630429, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 28, + "latency_ns": 618128, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 29, + "latency_ns": 804671, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + } + ], + "no_op_latency": { + "repetitions": 30, + "min_ns": 490727, + "p50_ns": 647899, + "p95_ns": 804671, + "p99_ns": 904413, + "max_ns": 904413, + "mean_ns": 666704.0333333333, + "sample_stddev_ns": 81090.52261451643 + }, + "no_op_cpu_ticks": 2, + "no_op_cpu_ms": 20.0, + "no_op_process_write_bytes": 0, + "no_op_database_storage_growth_bytes": 0, + "no_op_observation_count_delta": 0 + }, + { + "provider": "cursor", + "production_path": "cursor_production_observation_pipeline_v1", + "pipeline_scope": "production_parse_normalize_sanitize_commit_project_and_replay", + "measured_repetitions": 30, + "observations_per_repetition": 8, + "replay_limit": 9, + "max_backlog_records": 8, + "parse": { + "scope": "native_provider_format_decode", + "raw_samples": [ + { + "repetition": 0, + "latency_ns": 45030, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 165448, + "record_count": 8 + }, + { + "repetition": 1, + "latency_ns": 38261, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 175044, + "record_count": 8 + }, + { + "repetition": 2, + "latency_ns": 45490, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 175912, + "record_count": 8 + }, + { + "repetition": 3, + "latency_ns": 48631, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 176012, + "record_count": 8 + }, + { + "repetition": 4, + "latency_ns": 44041, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177368, + "record_count": 8 + }, + { + "repetition": 5, + "latency_ns": 39780, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177376, + "record_count": 8 + }, + { + "repetition": 6, + "latency_ns": 43701, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177408, + "record_count": 8 + }, + { + "repetition": 7, + "latency_ns": 42301, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177436, + "record_count": 8 + }, + { + "repetition": 8, + "latency_ns": 44180, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177456, + "record_count": 8 + }, + { + "repetition": 9, + "latency_ns": 43610, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177480, + "record_count": 8 + }, + { + "repetition": 10, + "latency_ns": 43662, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177484, + "record_count": 8 + }, + { + "repetition": 11, + "latency_ns": 41550, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177484, + "record_count": 8 + }, + { + "repetition": 12, + "latency_ns": 73571, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177484, + "record_count": 8 + }, + { + "repetition": 13, + "latency_ns": 41191, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177492, + "record_count": 8 + }, + { + "repetition": 14, + "latency_ns": 48141, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177492, + "record_count": 8 + }, + { + "repetition": 15, + "latency_ns": 45881, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177496, + "record_count": 8 + }, + { + "repetition": 16, + "latency_ns": 57302, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177508, + "record_count": 8 + }, + { + "repetition": 17, + "latency_ns": 44221, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 18, + "latency_ns": 48111, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 19, + "latency_ns": 46151, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 20, + "latency_ns": 54731, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 21, + "latency_ns": 42391, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 22, + "latency_ns": 64252, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 23, + "latency_ns": 46411, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 24, + "latency_ns": 40050, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 25, + "latency_ns": 47321, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 26, + "latency_ns": 56510, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 27, + "latency_ns": 49540, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 28, + "latency_ns": 60181, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 29, + "latency_ns": 58141, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + } + ], + "latency": { + "repetitions": 30, + "min_ns": 38261, + "p50_ns": 45490, + "p95_ns": 64252, + "p99_ns": 73571, + "max_ns": 73571, + "mean_ns": 48144.46666666667, + "sample_stddev_ns": 8052.217024900158 + }, + "cpu_ticks": 1, + "cpu_ms": 10.0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536 + }, + "commit": { + "scope": "production_adapter_parse_normalize_sanitize_commit_and_project", + "raw_samples": [ + { + "repetition": 0, + "latency_ns": 122554556, + "cpu_ticks": 12, + "process_write_bytes": 4628480, + "database_storage_growth_bytes": 2830440, + "peak_rss_kib": 165876, + "record_count": 8 + }, + { + "repetition": 1, + "latency_ns": 122762848, + "cpu_ticks": 12, + "process_write_bytes": 4620288, + "database_storage_growth_bytes": 2822200, + "peak_rss_kib": 175140, + "record_count": 8 + }, + { + "repetition": 2, + "latency_ns": 122723716, + "cpu_ticks": 12, + "process_write_bytes": 4628480, + "database_storage_growth_bytes": 2830440, + "peak_rss_kib": 176020, + "record_count": 8 + }, + { + "repetition": 3, + "latency_ns": 124204194, + "cpu_ticks": 12, + "process_write_bytes": 4628480, + "database_storage_growth_bytes": 2830440, + "peak_rss_kib": 176108, + "record_count": 8 + }, + { + "repetition": 4, + "latency_ns": 118457874, + "cpu_ticks": 11, + "process_write_bytes": 4620288, + "database_storage_growth_bytes": 2822200, + "peak_rss_kib": 177464, + "record_count": 8 + }, + { + "repetition": 5, + "latency_ns": 122753083, + "cpu_ticks": 13, + "process_write_bytes": 4620288, + "database_storage_growth_bytes": 2822200, + "peak_rss_kib": 177480, + "record_count": 8 + }, + { + "repetition": 6, + "latency_ns": 116572925, + "cpu_ticks": 12, + "process_write_bytes": 4620288, + "database_storage_growth_bytes": 2822200, + "peak_rss_kib": 177504, + "record_count": 8 + }, + { + "repetition": 7, + "latency_ns": 114685878, + "cpu_ticks": 11, + "process_write_bytes": 4661248, + "database_storage_growth_bytes": 2822200, + "peak_rss_kib": 177532, + "record_count": 8 + }, + { + "repetition": 8, + "latency_ns": 119386863, + "cpu_ticks": 11, + "process_write_bytes": 4628480, + "database_storage_growth_bytes": 2830440, + "peak_rss_kib": 177552, + "record_count": 8 + }, + { + "repetition": 9, + "latency_ns": 122445144, + "cpu_ticks": 10, + "process_write_bytes": 4620288, + "database_storage_growth_bytes": 2822200, + "peak_rss_kib": 177576, + "record_count": 8 + }, + { + "repetition": 10, + "latency_ns": 134942426, + "cpu_ticks": 12, + "process_write_bytes": 4620288, + "database_storage_growth_bytes": 2822200, + "peak_rss_kib": 177580, + "record_count": 8 + }, + { + "repetition": 11, + "latency_ns": 125998211, + "cpu_ticks": 12, + "process_write_bytes": 4620288, + "database_storage_growth_bytes": 2822200, + "peak_rss_kib": 177580, + "record_count": 8 + }, + { + "repetition": 12, + "latency_ns": 127132765, + "cpu_ticks": 12, + "process_write_bytes": 4632576, + "database_storage_growth_bytes": 2830440, + "peak_rss_kib": 177580, + "record_count": 8 + }, + { + "repetition": 13, + "latency_ns": 115988619, + "cpu_ticks": 11, + "process_write_bytes": 4620288, + "database_storage_growth_bytes": 2822200, + "peak_rss_kib": 177588, + "record_count": 8 + }, + { + "repetition": 14, + "latency_ns": 128631903, + "cpu_ticks": 13, + "process_write_bytes": 4628480, + "database_storage_growth_bytes": 2830440, + "peak_rss_kib": 177588, + "record_count": 8 + }, + { + "repetition": 15, + "latency_ns": 124732267, + "cpu_ticks": 12, + "process_write_bytes": 4620288, + "database_storage_growth_bytes": 2822200, + "peak_rss_kib": 177592, + "record_count": 8 + }, + { + "repetition": 16, + "latency_ns": 124750948, + "cpu_ticks": 11, + "process_write_bytes": 4628480, + "database_storage_growth_bytes": 2830440, + "peak_rss_kib": 177604, + "record_count": 8 + }, + { + "repetition": 17, + "latency_ns": 123839563, + "cpu_ticks": 12, + "process_write_bytes": 4620288, + "database_storage_growth_bytes": 2822200, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 18, + "latency_ns": 119078196, + "cpu_ticks": 11, + "process_write_bytes": 4628480, + "database_storage_growth_bytes": 2830440, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 19, + "latency_ns": 126630229, + "cpu_ticks": 12, + "process_write_bytes": 4628480, + "database_storage_growth_bytes": 2830440, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 20, + "latency_ns": 147708439, + "cpu_ticks": 15, + "process_write_bytes": 4620288, + "database_storage_growth_bytes": 2822200, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 21, + "latency_ns": 125878267, + "cpu_ticks": 12, + "process_write_bytes": 4636672, + "database_storage_growth_bytes": 2830440, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 22, + "latency_ns": 131280430, + "cpu_ticks": 13, + "process_write_bytes": 4620288, + "database_storage_growth_bytes": 2822200, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 23, + "latency_ns": 120072994, + "cpu_ticks": 11, + "process_write_bytes": 4620288, + "database_storage_growth_bytes": 2822200, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 24, + "latency_ns": 139898225, + "cpu_ticks": 13, + "process_write_bytes": 4620288, + "database_storage_growth_bytes": 2822200, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 25, + "latency_ns": 127723767, + "cpu_ticks": 13, + "process_write_bytes": 4620288, + "database_storage_growth_bytes": 2822200, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 26, + "latency_ns": 125070560, + "cpu_ticks": 12, + "process_write_bytes": 4628480, + "database_storage_growth_bytes": 2830440, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 27, + "latency_ns": 124459379, + "cpu_ticks": 12, + "process_write_bytes": 4620288, + "database_storage_growth_bytes": 2822200, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 28, + "latency_ns": 118108552, + "cpu_ticks": 11, + "process_write_bytes": 4632576, + "database_storage_growth_bytes": 2830440, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 29, + "latency_ns": 162962067, + "cpu_ticks": 15, + "process_write_bytes": 4628480, + "database_storage_growth_bytes": 2830440, + "peak_rss_kib": 177632, + "record_count": 8 + } + ], + "latency": { + "repetitions": 30, + "min_ns": 114685878, + "p50_ns": 124204194, + "p95_ns": 147708439, + "p99_ns": 162962067, + "max_ns": 162962067, + "mean_ns": 126047829.6, + "sample_stddev_ns": 9797231.743490592 + }, + "cpu_ticks": 361, + "cpu_ms": 3610.0, + "process_write_bytes": 138772480, + "database_storage_growth_bytes": 84773120, + "peak_rss_kib": 177632 + }, + "replay": { + "scope": "authoritative_store_bounded_replay", + "raw_samples": [ + { + "repetition": 0, + "latency_ns": 1036966, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 165876, + "record_count": 8 + }, + { + "repetition": 1, + "latency_ns": 1062675, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 175140, + "record_count": 8 + }, + { + "repetition": 2, + "latency_ns": 1022734, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 176020, + "record_count": 8 + }, + { + "repetition": 3, + "latency_ns": 1104925, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 176108, + "record_count": 8 + }, + { + "repetition": 4, + "latency_ns": 1061165, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177464, + "record_count": 8 + }, + { + "repetition": 5, + "latency_ns": 1058045, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177480, + "record_count": 8 + }, + { + "repetition": 6, + "latency_ns": 1049895, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177504, + "record_count": 8 + }, + { + "repetition": 7, + "latency_ns": 863042, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177532, + "record_count": 8 + }, + { + "repetition": 8, + "latency_ns": 1025774, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177552, + "record_count": 8 + }, + { + "repetition": 9, + "latency_ns": 1040124, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177576, + "record_count": 8 + }, + { + "repetition": 10, + "latency_ns": 1213717, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177580, + "record_count": 8 + }, + { + "repetition": 11, + "latency_ns": 1043644, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177580, + "record_count": 8 + }, + { + "repetition": 12, + "latency_ns": 1008153, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177580, + "record_count": 8 + }, + { + "repetition": 13, + "latency_ns": 1002774, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177588, + "record_count": 8 + }, + { + "repetition": 14, + "latency_ns": 1024844, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177588, + "record_count": 8 + }, + { + "repetition": 15, + "latency_ns": 1051734, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177592, + "record_count": 8 + }, + { + "repetition": 16, + "latency_ns": 1318268, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177604, + "record_count": 8 + }, + { + "repetition": 17, + "latency_ns": 1201285, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 18, + "latency_ns": 1078084, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 19, + "latency_ns": 1034614, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 20, + "latency_ns": 2544264, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 21, + "latency_ns": 1240488, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 22, + "latency_ns": 1102164, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 23, + "latency_ns": 1219546, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 24, + "latency_ns": 1139596, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 25, + "latency_ns": 1188027, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 26, + "latency_ns": 1152256, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 27, + "latency_ns": 1100565, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 28, + "latency_ns": 1033315, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 29, + "latency_ns": 1500202, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + } + ], + "latency": { + "repetitions": 30, + "min_ns": 863042, + "p50_ns": 1061165, + "p95_ns": 1500202, + "p99_ns": 2544264, + "max_ns": 2544264, + "mean_ns": 1150762.8333333333, + "sample_stddev_ns": 288054.9755540668 + }, + "cpu_ticks": 3, + "cpu_ms": 30.0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632 + }, + "pipeline_raw_samples": [ + { + "repetition": 0, + "latency_ns": 123815784, + "cpu_ticks": 12, + "process_write_bytes": 4628480, + "database_storage_growth_bytes": 2830440, + "peak_rss_kib": 165876, + "replayed_observations": 8 + }, + { + "repetition": 1, + "latency_ns": 124033417, + "cpu_ticks": 12, + "process_write_bytes": 4620288, + "database_storage_growth_bytes": 2822200, + "peak_rss_kib": 175140, + "replayed_observations": 8 + }, + { + "repetition": 2, + "latency_ns": 123951513, + "cpu_ticks": 12, + "process_write_bytes": 4628480, + "database_storage_growth_bytes": 2830440, + "peak_rss_kib": 176020, + "replayed_observations": 8 + }, + { + "repetition": 3, + "latency_ns": 125556365, + "cpu_ticks": 12, + "process_write_bytes": 4628480, + "database_storage_growth_bytes": 2830440, + "peak_rss_kib": 176108, + "replayed_observations": 8 + }, + { + "repetition": 4, + "latency_ns": 119752532, + "cpu_ticks": 12, + "process_write_bytes": 4620288, + "database_storage_growth_bytes": 2822200, + "peak_rss_kib": 177464, + "replayed_observations": 8 + }, + { + "repetition": 5, + "latency_ns": 124015751, + "cpu_ticks": 13, + "process_write_bytes": 4620288, + "database_storage_growth_bytes": 2822200, + "peak_rss_kib": 177480, + "replayed_observations": 8 + }, + { + "repetition": 6, + "latency_ns": 117822682, + "cpu_ticks": 12, + "process_write_bytes": 4620288, + "database_storage_growth_bytes": 2822200, + "peak_rss_kib": 177504, + "replayed_observations": 8 + }, + { + "repetition": 7, + "latency_ns": 115752182, + "cpu_ticks": 11, + "process_write_bytes": 4661248, + "database_storage_growth_bytes": 2822200, + "peak_rss_kib": 177532, + "replayed_observations": 8 + }, + { + "repetition": 8, + "latency_ns": 120602648, + "cpu_ticks": 11, + "process_write_bytes": 4628480, + "database_storage_growth_bytes": 2830440, + "peak_rss_kib": 177552, + "replayed_observations": 8 + }, + { + "repetition": 9, + "latency_ns": 123678981, + "cpu_ticks": 10, + "process_write_bytes": 4620288, + "database_storage_growth_bytes": 2822200, + "peak_rss_kib": 177576, + "replayed_observations": 8 + }, + { + "repetition": 10, + "latency_ns": 136386835, + "cpu_ticks": 13, + "process_write_bytes": 4620288, + "database_storage_growth_bytes": 2822200, + "peak_rss_kib": 177580, + "replayed_observations": 8 + }, + { + "repetition": 11, + "latency_ns": 127273527, + "cpu_ticks": 12, + "process_write_bytes": 4620288, + "database_storage_growth_bytes": 2822200, + "peak_rss_kib": 177580, + "replayed_observations": 8 + }, + { + "repetition": 12, + "latency_ns": 128371063, + "cpu_ticks": 12, + "process_write_bytes": 4632576, + "database_storage_growth_bytes": 2830440, + "peak_rss_kib": 177580, + "replayed_observations": 8 + }, + { + "repetition": 13, + "latency_ns": 117185835, + "cpu_ticks": 11, + "process_write_bytes": 4620288, + "database_storage_growth_bytes": 2822200, + "peak_rss_kib": 177588, + "replayed_observations": 8 + }, + { + "repetition": 14, + "latency_ns": 129890750, + "cpu_ticks": 13, + "process_write_bytes": 4628480, + "database_storage_growth_bytes": 2830440, + "peak_rss_kib": 177588, + "replayed_observations": 8 + }, + { + "repetition": 15, + "latency_ns": 126013686, + "cpu_ticks": 12, + "process_write_bytes": 4620288, + "database_storage_growth_bytes": 2822200, + "peak_rss_kib": 177592, + "replayed_observations": 8 + }, + { + "repetition": 16, + "latency_ns": 126329138, + "cpu_ticks": 12, + "process_write_bytes": 4628480, + "database_storage_growth_bytes": 2830440, + "peak_rss_kib": 177604, + "replayed_observations": 8 + }, + { + "repetition": 17, + "latency_ns": 125264913, + "cpu_ticks": 12, + "process_write_bytes": 4620288, + "database_storage_growth_bytes": 2822200, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 18, + "latency_ns": 120335444, + "cpu_ticks": 11, + "process_write_bytes": 4628480, + "database_storage_growth_bytes": 2830440, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 19, + "latency_ns": 127893647, + "cpu_ticks": 12, + "process_write_bytes": 4628480, + "database_storage_growth_bytes": 2830440, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 20, + "latency_ns": 150547579, + "cpu_ticks": 15, + "process_write_bytes": 4620288, + "database_storage_growth_bytes": 2822200, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 21, + "latency_ns": 127473587, + "cpu_ticks": 12, + "process_write_bytes": 4636672, + "database_storage_growth_bytes": 2830440, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 22, + "latency_ns": 132617548, + "cpu_ticks": 13, + "process_write_bytes": 4620288, + "database_storage_growth_bytes": 2822200, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 23, + "latency_ns": 121518954, + "cpu_ticks": 11, + "process_write_bytes": 4620288, + "database_storage_growth_bytes": 2822200, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 24, + "latency_ns": 141245864, + "cpu_ticks": 13, + "process_write_bytes": 4620288, + "database_storage_growth_bytes": 2822200, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 25, + "latency_ns": 129113837, + "cpu_ticks": 13, + "process_write_bytes": 4620288, + "database_storage_growth_bytes": 2822200, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 26, + "latency_ns": 126470639, + "cpu_ticks": 12, + "process_write_bytes": 4628480, + "database_storage_growth_bytes": 2830440, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 27, + "latency_ns": 125797059, + "cpu_ticks": 12, + "process_write_bytes": 4620288, + "database_storage_growth_bytes": 2822200, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 28, + "latency_ns": 119337520, + "cpu_ticks": 11, + "process_write_bytes": 4632576, + "database_storage_growth_bytes": 2830440, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 29, + "latency_ns": 164756271, + "cpu_ticks": 15, + "process_write_bytes": 4628480, + "database_storage_growth_bytes": 2830440, + "peak_rss_kib": 177632, + "replayed_observations": 8 + } + ], + "pipeline_latency": { + "repetitions": 30, + "min_ns": 115752182, + "p50_ns": 125556365, + "p95_ns": 150547579, + "p99_ns": 164756271, + "max_ns": 164756271, + "mean_ns": 127426851.7, + "sample_stddev_ns": 10005284.313434731 + }, + "pipeline_records_per_second": 62.78111632887497, + "pipeline_cpu_ticks": 364, + "pipeline_cpu_ms": 3640.0, + "pipeline_process_write_bytes": 138772480, + "pipeline_database_storage_growth_bytes": 84773120, + "peak_rss_kib": 177632, + "no_op_raw_samples": [ + { + "repetition": 0, + "latency_ns": 1247848, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 165876, + "replayed_observations": 0 + }, + { + "repetition": 1, + "latency_ns": 1303387, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 175140, + "replayed_observations": 0 + }, + { + "repetition": 2, + "latency_ns": 1229347, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 176020, + "replayed_observations": 0 + }, + { + "repetition": 3, + "latency_ns": 1331050, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 176108, + "replayed_observations": 0 + }, + { + "repetition": 4, + "latency_ns": 1281389, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177464, + "replayed_observations": 0 + }, + { + "repetition": 5, + "latency_ns": 1232577, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177480, + "replayed_observations": 0 + }, + { + "repetition": 6, + "latency_ns": 1110025, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177504, + "replayed_observations": 0 + }, + { + "repetition": 7, + "latency_ns": 1138685, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177532, + "replayed_observations": 0 + }, + { + "repetition": 8, + "latency_ns": 1115846, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177552, + "replayed_observations": 0 + }, + { + "repetition": 9, + "latency_ns": 1136176, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177576, + "replayed_observations": 0 + }, + { + "repetition": 10, + "latency_ns": 1311557, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177580, + "replayed_observations": 0 + }, + { + "repetition": 11, + "latency_ns": 1363999, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177580, + "replayed_observations": 0 + }, + { + "repetition": 12, + "latency_ns": 1208937, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177580, + "replayed_observations": 0 + }, + { + "repetition": 13, + "latency_ns": 1216086, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177588, + "replayed_observations": 0 + }, + { + "repetition": 14, + "latency_ns": 1342078, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177588, + "replayed_observations": 0 + }, + { + "repetition": 15, + "latency_ns": 1219636, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177592, + "replayed_observations": 0 + }, + { + "repetition": 16, + "latency_ns": 1359590, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177604, + "replayed_observations": 0 + }, + { + "repetition": 17, + "latency_ns": 1248756, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 18, + "latency_ns": 1151946, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 19, + "latency_ns": 1227517, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 20, + "latency_ns": 1820185, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 21, + "latency_ns": 1739564, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 22, + "latency_ns": 1291528, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 23, + "latency_ns": 1549773, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 24, + "latency_ns": 1377310, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 25, + "latency_ns": 1441930, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 26, + "latency_ns": 1335019, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 27, + "latency_ns": 1425910, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 28, + "latency_ns": 1143607, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 29, + "latency_ns": 1764444, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + } + ], + "no_op_latency": { + "repetitions": 30, + "min_ns": 1110025, + "p50_ns": 1281389, + "p95_ns": 1764444, + "p99_ns": 1820185, + "max_ns": 1820185, + "mean_ns": 1322190.0666666667, + "sample_stddev_ns": 184992.96468727806 + }, + "no_op_cpu_ticks": 6, + "no_op_cpu_ms": 60.0, + "no_op_process_write_bytes": 0, + "no_op_database_storage_growth_bytes": 0, + "no_op_observation_count_delta": 0 + }, + { + "provider": "hermes", + "production_path": "hermes_production_observation_pipeline_v1", + "pipeline_scope": "production_parse_normalize_sanitize_commit_project_and_replay", + "measured_repetitions": 30, + "observations_per_repetition": 8, + "replay_limit": 9, + "max_backlog_records": 8, + "parse": { + "scope": "native_provider_format_decode", + "raw_samples": [ + { + "repetition": 0, + "latency_ns": 182902, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 167676, + "record_count": 8 + }, + { + "repetition": 1, + "latency_ns": 184042, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 175044, + "record_count": 8 + }, + { + "repetition": 2, + "latency_ns": 179012, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 175924, + "record_count": 8 + }, + { + "repetition": 3, + "latency_ns": 189973, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 176012, + "record_count": 8 + }, + { + "repetition": 4, + "latency_ns": 211874, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177368, + "record_count": 8 + }, + { + "repetition": 5, + "latency_ns": 227684, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177384, + "record_count": 8 + }, + { + "repetition": 6, + "latency_ns": 231373, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177408, + "record_count": 8 + }, + { + "repetition": 7, + "latency_ns": 194333, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177436, + "record_count": 8 + }, + { + "repetition": 8, + "latency_ns": 281715, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177456, + "record_count": 8 + }, + { + "repetition": 9, + "latency_ns": 189233, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177480, + "record_count": 8 + }, + { + "repetition": 10, + "latency_ns": 181052, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177484, + "record_count": 8 + }, + { + "repetition": 11, + "latency_ns": 228703, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177484, + "record_count": 8 + }, + { + "repetition": 12, + "latency_ns": 175023, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177484, + "record_count": 8 + }, + { + "repetition": 13, + "latency_ns": 298825, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177492, + "record_count": 8 + }, + { + "repetition": 14, + "latency_ns": 185903, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177492, + "record_count": 8 + }, + { + "repetition": 15, + "latency_ns": 191743, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177496, + "record_count": 8 + }, + { + "repetition": 16, + "latency_ns": 395626, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177508, + "record_count": 8 + }, + { + "repetition": 17, + "latency_ns": 212022, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 18, + "latency_ns": 225652, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 19, + "latency_ns": 314985, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 20, + "latency_ns": 216743, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 21, + "latency_ns": 266923, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 22, + "latency_ns": 242754, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 23, + "latency_ns": 207194, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 24, + "latency_ns": 229543, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 25, + "latency_ns": 183612, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 26, + "latency_ns": 275914, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 27, + "latency_ns": 272964, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 28, + "latency_ns": 285724, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 29, + "latency_ns": 410026, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + } + ], + "latency": { + "repetitions": 30, + "min_ns": 175023, + "p50_ns": 216743, + "p95_ns": 395626, + "p99_ns": 410026, + "max_ns": 410026, + "mean_ns": 235769.06666666668, + "sample_stddev_ns": 60424.41613141983 + }, + "cpu_ticks": 2, + "cpu_ms": 20.0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536 + }, + "commit": { + "scope": "production_adapter_parse_normalize_sanitize_commit_and_project", + "raw_samples": [ + { + "repetition": 0, + "latency_ns": 159512194, + "cpu_ticks": 16, + "process_write_bytes": 4214784, + "database_storage_growth_bytes": 2645040, + "peak_rss_kib": 171972, + "record_count": 8 + }, + { + "repetition": 1, + "latency_ns": 152527984, + "cpu_ticks": 15, + "process_write_bytes": 4222976, + "database_storage_growth_bytes": 2653280, + "peak_rss_kib": 175140, + "record_count": 8 + }, + { + "repetition": 2, + "latency_ns": 146137912, + "cpu_ticks": 15, + "process_write_bytes": 4222976, + "database_storage_growth_bytes": 2653280, + "peak_rss_kib": 176060, + "record_count": 8 + }, + { + "repetition": 3, + "latency_ns": 146821892, + "cpu_ticks": 15, + "process_write_bytes": 4222976, + "database_storage_growth_bytes": 2653280, + "peak_rss_kib": 177440, + "record_count": 8 + }, + { + "repetition": 4, + "latency_ns": 155711724, + "cpu_ticks": 15, + "process_write_bytes": 4214784, + "database_storage_growth_bytes": 2645040, + "peak_rss_kib": 177468, + "record_count": 8 + }, + { + "repetition": 5, + "latency_ns": 145592222, + "cpu_ticks": 13, + "process_write_bytes": 4214784, + "database_storage_growth_bytes": 2645040, + "peak_rss_kib": 177500, + "record_count": 8 + }, + { + "repetition": 6, + "latency_ns": 149228011, + "cpu_ticks": 15, + "process_write_bytes": 4214784, + "database_storage_growth_bytes": 2645040, + "peak_rss_kib": 177516, + "record_count": 8 + }, + { + "repetition": 7, + "latency_ns": 146855576, + "cpu_ticks": 14, + "process_write_bytes": 4251648, + "database_storage_growth_bytes": 2653280, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 8, + "latency_ns": 154932137, + "cpu_ticks": 15, + "process_write_bytes": 4243456, + "database_storage_growth_bytes": 2645040, + "peak_rss_kib": 177556, + "record_count": 8 + }, + { + "repetition": 9, + "latency_ns": 156796851, + "cpu_ticks": 16, + "process_write_bytes": 4214784, + "database_storage_growth_bytes": 2645040, + "peak_rss_kib": 177576, + "record_count": 8 + }, + { + "repetition": 10, + "latency_ns": 153696536, + "cpu_ticks": 15, + "process_write_bytes": 4214784, + "database_storage_growth_bytes": 2645040, + "peak_rss_kib": 177580, + "record_count": 8 + }, + { + "repetition": 11, + "latency_ns": 152884323, + "cpu_ticks": 14, + "process_write_bytes": 4214784, + "database_storage_growth_bytes": 2645040, + "peak_rss_kib": 177580, + "record_count": 8 + }, + { + "repetition": 12, + "latency_ns": 150912205, + "cpu_ticks": 14, + "process_write_bytes": 4214784, + "database_storage_growth_bytes": 2645040, + "peak_rss_kib": 177584, + "record_count": 8 + }, + { + "repetition": 13, + "latency_ns": 162239790, + "cpu_ticks": 15, + "process_write_bytes": 4231168, + "database_storage_growth_bytes": 2653280, + "peak_rss_kib": 177588, + "record_count": 8 + }, + { + "repetition": 14, + "latency_ns": 147901240, + "cpu_ticks": 15, + "process_write_bytes": 4222976, + "database_storage_growth_bytes": 2653280, + "peak_rss_kib": 177592, + "record_count": 8 + }, + { + "repetition": 15, + "latency_ns": 150711678, + "cpu_ticks": 14, + "process_write_bytes": 4214784, + "database_storage_growth_bytes": 2645040, + "peak_rss_kib": 177604, + "record_count": 8 + }, + { + "repetition": 16, + "latency_ns": 146240624, + "cpu_ticks": 15, + "process_write_bytes": 4222976, + "database_storage_growth_bytes": 2653280, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 17, + "latency_ns": 150827296, + "cpu_ticks": 14, + "process_write_bytes": 4222976, + "database_storage_growth_bytes": 2653280, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 18, + "latency_ns": 159560165, + "cpu_ticks": 15, + "process_write_bytes": 4222976, + "database_storage_growth_bytes": 2653280, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 19, + "latency_ns": 145302038, + "cpu_ticks": 13, + "process_write_bytes": 4222976, + "database_storage_growth_bytes": 2653280, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 20, + "latency_ns": 155467016, + "cpu_ticks": 14, + "process_write_bytes": 4214784, + "database_storage_growth_bytes": 2645040, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 21, + "latency_ns": 161642960, + "cpu_ticks": 16, + "process_write_bytes": 4214784, + "database_storage_growth_bytes": 2645040, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 22, + "latency_ns": 163023186, + "cpu_ticks": 15, + "process_write_bytes": 4222976, + "database_storage_growth_bytes": 2653280, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 23, + "latency_ns": 145880559, + "cpu_ticks": 13, + "process_write_bytes": 4243456, + "database_storage_growth_bytes": 2645040, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 24, + "latency_ns": 173295455, + "cpu_ticks": 17, + "process_write_bytes": 4214784, + "database_storage_growth_bytes": 2645040, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 25, + "latency_ns": 144235575, + "cpu_ticks": 13, + "process_write_bytes": 4222976, + "database_storage_growth_bytes": 2653280, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 26, + "latency_ns": 143498293, + "cpu_ticks": 13, + "process_write_bytes": 4214784, + "database_storage_growth_bytes": 2645040, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 27, + "latency_ns": 153119624, + "cpu_ticks": 15, + "process_write_bytes": 4214784, + "database_storage_growth_bytes": 2645040, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 28, + "latency_ns": 153425757, + "cpu_ticks": 14, + "process_write_bytes": 4222976, + "database_storage_growth_bytes": 2653280, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 29, + "latency_ns": 201706599, + "cpu_ticks": 19, + "process_write_bytes": 4231168, + "database_storage_growth_bytes": 2653280, + "peak_rss_kib": 177632, + "record_count": 8 + } + ], + "latency": { + "repetitions": 30, + "min_ns": 143498293, + "p50_ns": 152527984, + "p95_ns": 173295455, + "p99_ns": 201706599, + "max_ns": 201706599, + "mean_ns": 154322914.06666666, + "sample_stddev_ns": 11242443.541950582 + }, + "cpu_ticks": 442, + "cpu_ms": 4420.0, + "process_write_bytes": 126660608, + "database_storage_growth_bytes": 79466560, + "peak_rss_kib": 177632 + }, + "replay": { + "scope": "authoritative_store_bounded_replay", + "raw_samples": [ + { + "repetition": 0, + "latency_ns": 1210797, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 171972, + "record_count": 8 + }, + { + "repetition": 1, + "latency_ns": 1241968, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 175140, + "record_count": 8 + }, + { + "repetition": 2, + "latency_ns": 1054765, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 176060, + "record_count": 8 + }, + { + "repetition": 3, + "latency_ns": 983394, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177440, + "record_count": 8 + }, + { + "repetition": 4, + "latency_ns": 1145526, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177468, + "record_count": 8 + }, + { + "repetition": 5, + "latency_ns": 974875, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177500, + "record_count": 8 + }, + { + "repetition": 6, + "latency_ns": 978724, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177516, + "record_count": 8 + }, + { + "repetition": 7, + "latency_ns": 986144, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 8, + "latency_ns": 1575232, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177556, + "record_count": 8 + }, + { + "repetition": 9, + "latency_ns": 1175096, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177576, + "record_count": 8 + }, + { + "repetition": 10, + "latency_ns": 1009664, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177580, + "record_count": 8 + }, + { + "repetition": 11, + "latency_ns": 1234236, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177580, + "record_count": 8 + }, + { + "repetition": 12, + "latency_ns": 1020465, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177584, + "record_count": 8 + }, + { + "repetition": 13, + "latency_ns": 1026724, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177588, + "record_count": 8 + }, + { + "repetition": 14, + "latency_ns": 979664, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177592, + "record_count": 8 + }, + { + "repetition": 15, + "latency_ns": 1045495, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177604, + "record_count": 8 + }, + { + "repetition": 16, + "latency_ns": 1084274, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 17, + "latency_ns": 1140426, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 18, + "latency_ns": 1617412, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 19, + "latency_ns": 987764, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 20, + "latency_ns": 912883, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 21, + "latency_ns": 1014454, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 22, + "latency_ns": 1151496, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 23, + "latency_ns": 1082815, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 24, + "latency_ns": 2678928, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 25, + "latency_ns": 993004, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 26, + "latency_ns": 982924, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 27, + "latency_ns": 1123986, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 28, + "latency_ns": 1077165, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 29, + "latency_ns": 1425310, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + } + ], + "latency": { + "repetitions": 30, + "min_ns": 912883, + "p50_ns": 1054765, + "p95_ns": 1617412, + "p99_ns": 2678928, + "max_ns": 2678928, + "mean_ns": 1163853.6666666667, + "sample_stddev_ns": 332728.0347418826 + }, + "cpu_ticks": 1, + "cpu_ms": 10.0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632 + }, + "pipeline_raw_samples": [ + { + "repetition": 0, + "latency_ns": 160938315, + "cpu_ticks": 16, + "process_write_bytes": 4214784, + "database_storage_growth_bytes": 2645040, + "peak_rss_kib": 171972, + "replayed_observations": 8 + }, + { + "repetition": 1, + "latency_ns": 153995435, + "cpu_ticks": 15, + "process_write_bytes": 4222976, + "database_storage_growth_bytes": 2653280, + "peak_rss_kib": 175140, + "replayed_observations": 8 + }, + { + "repetition": 2, + "latency_ns": 147404881, + "cpu_ticks": 15, + "process_write_bytes": 4222976, + "database_storage_growth_bytes": 2653280, + "peak_rss_kib": 176060, + "replayed_observations": 8 + }, + { + "repetition": 3, + "latency_ns": 147980208, + "cpu_ticks": 15, + "process_write_bytes": 4222976, + "database_storage_growth_bytes": 2653280, + "peak_rss_kib": 177440, + "replayed_observations": 8 + }, + { + "repetition": 4, + "latency_ns": 157057893, + "cpu_ticks": 15, + "process_write_bytes": 4214784, + "database_storage_growth_bytes": 2645040, + "peak_rss_kib": 177468, + "replayed_observations": 8 + }, + { + "repetition": 5, + "latency_ns": 146754748, + "cpu_ticks": 13, + "process_write_bytes": 4214784, + "database_storage_growth_bytes": 2645040, + "peak_rss_kib": 177500, + "replayed_observations": 8 + }, + { + "repetition": 6, + "latency_ns": 150395237, + "cpu_ticks": 15, + "process_write_bytes": 4214784, + "database_storage_growth_bytes": 2645040, + "peak_rss_kib": 177516, + "replayed_observations": 8 + }, + { + "repetition": 7, + "latency_ns": 148042161, + "cpu_ticks": 14, + "process_write_bytes": 4251648, + "database_storage_growth_bytes": 2653280, + "peak_rss_kib": 177536, + "replayed_observations": 8 + }, + { + "repetition": 8, + "latency_ns": 156711302, + "cpu_ticks": 15, + "process_write_bytes": 4243456, + "database_storage_growth_bytes": 2645040, + "peak_rss_kib": 177556, + "replayed_observations": 8 + }, + { + "repetition": 9, + "latency_ns": 158176881, + "cpu_ticks": 16, + "process_write_bytes": 4214784, + "database_storage_growth_bytes": 2645040, + "peak_rss_kib": 177576, + "replayed_observations": 8 + }, + { + "repetition": 10, + "latency_ns": 154926213, + "cpu_ticks": 15, + "process_write_bytes": 4214784, + "database_storage_growth_bytes": 2645040, + "peak_rss_kib": 177580, + "replayed_observations": 8 + }, + { + "repetition": 11, + "latency_ns": 154322004, + "cpu_ticks": 14, + "process_write_bytes": 4214784, + "database_storage_growth_bytes": 2645040, + "peak_rss_kib": 177580, + "replayed_observations": 8 + }, + { + "repetition": 12, + "latency_ns": 152178973, + "cpu_ticks": 14, + "process_write_bytes": 4214784, + "database_storage_growth_bytes": 2645040, + "peak_rss_kib": 177584, + "replayed_observations": 8 + }, + { + "repetition": 13, + "latency_ns": 163510398, + "cpu_ticks": 15, + "process_write_bytes": 4231168, + "database_storage_growth_bytes": 2653280, + "peak_rss_kib": 177588, + "replayed_observations": 8 + }, + { + "repetition": 14, + "latency_ns": 149061507, + "cpu_ticks": 15, + "process_write_bytes": 4222976, + "database_storage_growth_bytes": 2653280, + "peak_rss_kib": 177592, + "replayed_observations": 8 + }, + { + "repetition": 15, + "latency_ns": 151996086, + "cpu_ticks": 14, + "process_write_bytes": 4214784, + "database_storage_growth_bytes": 2645040, + "peak_rss_kib": 177604, + "replayed_observations": 8 + }, + { + "repetition": 16, + "latency_ns": 147579512, + "cpu_ticks": 15, + "process_write_bytes": 4222976, + "database_storage_growth_bytes": 2653280, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 17, + "latency_ns": 152186095, + "cpu_ticks": 14, + "process_write_bytes": 4222976, + "database_storage_growth_bytes": 2653280, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 18, + "latency_ns": 161407611, + "cpu_ticks": 15, + "process_write_bytes": 4222976, + "database_storage_growth_bytes": 2653280, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 19, + "latency_ns": 146472303, + "cpu_ticks": 13, + "process_write_bytes": 4222976, + "database_storage_growth_bytes": 2653280, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 20, + "latency_ns": 156582361, + "cpu_ticks": 15, + "process_write_bytes": 4214784, + "database_storage_growth_bytes": 2645040, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 21, + "latency_ns": 162901147, + "cpu_ticks": 16, + "process_write_bytes": 4214784, + "database_storage_growth_bytes": 2645040, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 22, + "latency_ns": 164378965, + "cpu_ticks": 15, + "process_write_bytes": 4222976, + "database_storage_growth_bytes": 2653280, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 23, + "latency_ns": 147194387, + "cpu_ticks": 13, + "process_write_bytes": 4243456, + "database_storage_growth_bytes": 2645040, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 24, + "latency_ns": 176217476, + "cpu_ticks": 17, + "process_write_bytes": 4214784, + "database_storage_growth_bytes": 2645040, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 25, + "latency_ns": 145395210, + "cpu_ticks": 13, + "process_write_bytes": 4222976, + "database_storage_growth_bytes": 2653280, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 26, + "latency_ns": 144671979, + "cpu_ticks": 13, + "process_write_bytes": 4214784, + "database_storage_growth_bytes": 2645040, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 27, + "latency_ns": 154517704, + "cpu_ticks": 15, + "process_write_bytes": 4214784, + "database_storage_growth_bytes": 2645040, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 28, + "latency_ns": 154686875, + "cpu_ticks": 14, + "process_write_bytes": 4222976, + "database_storage_growth_bytes": 2653280, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 29, + "latency_ns": 203425372, + "cpu_ticks": 19, + "process_write_bytes": 4231168, + "database_storage_growth_bytes": 2653280, + "peak_rss_kib": 177632, + "replayed_observations": 8 + } + ], + "pipeline_latency": { + "repetitions": 30, + "min_ns": 144671979, + "p50_ns": 153995435, + "p95_ns": 176217476, + "p99_ns": 203425372, + "max_ns": 203425372, + "mean_ns": 155702307.96666667, + "sample_stddev_ns": 11437186.64791771 + }, + "pipeline_records_per_second": 51.38009901377101, + "pipeline_cpu_ticks": 443, + "pipeline_cpu_ms": 4430.0, + "pipeline_process_write_bytes": 126660608, + "pipeline_database_storage_growth_bytes": 79466560, + "peak_rss_kib": 177632, + "no_op_raw_samples": [ + { + "repetition": 0, + "latency_ns": 29329250, + "cpu_ticks": 2, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 172008, + "replayed_observations": 0 + }, + { + "repetition": 1, + "latency_ns": 27246602, + "cpu_ticks": 3, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 175212, + "replayed_observations": 0 + }, + { + "repetition": 2, + "latency_ns": 26886857, + "cpu_ticks": 3, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 176060, + "replayed_observations": 0 + }, + { + "repetition": 3, + "latency_ns": 26861295, + "cpu_ticks": 3, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177444, + "replayed_observations": 0 + }, + { + "repetition": 4, + "latency_ns": 26721082, + "cpu_ticks": 3, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177472, + "replayed_observations": 0 + }, + { + "repetition": 5, + "latency_ns": 26434709, + "cpu_ticks": 4, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177504, + "replayed_observations": 0 + }, + { + "repetition": 6, + "latency_ns": 26446178, + "cpu_ticks": 3, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177516, + "replayed_observations": 0 + }, + { + "repetition": 7, + "latency_ns": 26914044, + "cpu_ticks": 3, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "replayed_observations": 0 + }, + { + "repetition": 8, + "latency_ns": 27162148, + "cpu_ticks": 3, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177560, + "replayed_observations": 0 + }, + { + "repetition": 9, + "latency_ns": 26971394, + "cpu_ticks": 2, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177576, + "replayed_observations": 0 + }, + { + "repetition": 10, + "latency_ns": 27928888, + "cpu_ticks": 2, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177580, + "replayed_observations": 0 + }, + { + "repetition": 11, + "latency_ns": 28726499, + "cpu_ticks": 3, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177580, + "replayed_observations": 0 + }, + { + "repetition": 12, + "latency_ns": 27618284, + "cpu_ticks": 3, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177588, + "replayed_observations": 0 + }, + { + "repetition": 13, + "latency_ns": 29234354, + "cpu_ticks": 3, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177588, + "replayed_observations": 0 + }, + { + "repetition": 14, + "latency_ns": 27147225, + "cpu_ticks": 3, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177592, + "replayed_observations": 0 + }, + { + "repetition": 15, + "latency_ns": 28017169, + "cpu_ticks": 2, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177604, + "replayed_observations": 0 + }, + { + "repetition": 16, + "latency_ns": 28536075, + "cpu_ticks": 3, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 17, + "latency_ns": 26955283, + "cpu_ticks": 3, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 18, + "latency_ns": 27423589, + "cpu_ticks": 3, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 19, + "latency_ns": 26749129, + "cpu_ticks": 3, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 20, + "latency_ns": 27245207, + "cpu_ticks": 2, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 21, + "latency_ns": 29268754, + "cpu_ticks": 3, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 22, + "latency_ns": 27044102, + "cpu_ticks": 3, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 23, + "latency_ns": 28764125, + "cpu_ticks": 3, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 24, + "latency_ns": 38496911, + "cpu_ticks": 3, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 25, + "latency_ns": 26721217, + "cpu_ticks": 2, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 26, + "latency_ns": 30304926, + "cpu_ticks": 3, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 27, + "latency_ns": 28564032, + "cpu_ticks": 3, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 28, + "latency_ns": 27253644, + "cpu_ticks": 4, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 29, + "latency_ns": 33881595, + "cpu_ticks": 3, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + } + ], + "no_op_latency": { + "repetitions": 30, + "min_ns": 26434709, + "p50_ns": 27246602, + "p95_ns": 33881595, + "p99_ns": 38496911, + "max_ns": 38496911, + "mean_ns": 28228485.566666666, + "sample_stddev_ns": 2458114.7581649204 + }, + "no_op_cpu_ticks": 86, + "no_op_cpu_ms": 860.0, + "no_op_process_write_bytes": 0, + "no_op_database_storage_growth_bytes": 0, + "no_op_observation_count_delta": 0 + }, + { + "provider": "kiro", + "production_path": "kiro_production_observation_pipeline_v1", + "pipeline_scope": "production_parse_normalize_sanitize_commit_project_and_replay", + "measured_repetitions": 30, + "observations_per_repetition": 8, + "replay_limit": 9, + "max_backlog_records": 8, + "parse": { + "scope": "native_provider_format_decode", + "raw_samples": [ + { + "repetition": 0, + "latency_ns": 38339, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 173740, + "record_count": 8 + }, + { + "repetition": 1, + "latency_ns": 48222, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 175116, + "record_count": 8 + }, + { + "repetition": 2, + "latency_ns": 43291, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 175964, + "record_count": 8 + }, + { + "repetition": 3, + "latency_ns": 37591, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177348, + "record_count": 8 + }, + { + "repetition": 4, + "latency_ns": 37070, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177376, + "record_count": 8 + }, + { + "repetition": 5, + "latency_ns": 41350, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177408, + "record_count": 8 + }, + { + "repetition": 6, + "latency_ns": 36671, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177420, + "record_count": 8 + }, + { + "repetition": 7, + "latency_ns": 34261, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177440, + "record_count": 8 + }, + { + "repetition": 8, + "latency_ns": 64721, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177464, + "record_count": 8 + }, + { + "repetition": 9, + "latency_ns": 51690, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177480, + "record_count": 8 + }, + { + "repetition": 10, + "latency_ns": 43070, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177484, + "record_count": 8 + }, + { + "repetition": 11, + "latency_ns": 38291, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177484, + "record_count": 8 + }, + { + "repetition": 12, + "latency_ns": 37531, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177492, + "record_count": 8 + }, + { + "repetition": 13, + "latency_ns": 53991, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177492, + "record_count": 8 + }, + { + "repetition": 14, + "latency_ns": 35700, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177496, + "record_count": 8 + }, + { + "repetition": 15, + "latency_ns": 35681, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177508, + "record_count": 8 + }, + { + "repetition": 16, + "latency_ns": 36611, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 17, + "latency_ns": 43050, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 18, + "latency_ns": 37011, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 19, + "latency_ns": 34709, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 20, + "latency_ns": 45790, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 21, + "latency_ns": 51151, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 22, + "latency_ns": 41511, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 23, + "latency_ns": 41571, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 24, + "latency_ns": 36431, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 25, + "latency_ns": 39301, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 26, + "latency_ns": 42441, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 27, + "latency_ns": 36392, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 28, + "latency_ns": 47930, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 29, + "latency_ns": 54521, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + } + ], + "latency": { + "repetitions": 30, + "min_ns": 34261, + "p50_ns": 39301, + "p95_ns": 54521, + "p99_ns": 64721, + "max_ns": 64721, + "mean_ns": 42196.333333333336, + "sample_stddev_ns": 7244.746930842652 + }, + "cpu_ticks": 0, + "cpu_ms": 0.0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536 + }, + "commit": { + "scope": "production_adapter_parse_normalize_sanitize_commit_and_project", + "raw_samples": [ + { + "repetition": 0, + "latency_ns": 113057244, + "cpu_ticks": 10, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 174284, + "record_count": 8 + }, + { + "repetition": 1, + "latency_ns": 125666939, + "cpu_ticks": 13, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 175212, + "record_count": 8 + }, + { + "repetition": 2, + "latency_ns": 124329568, + "cpu_ticks": 12, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 176080, + "record_count": 8 + }, + { + "repetition": 3, + "latency_ns": 123005078, + "cpu_ticks": 12, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177444, + "record_count": 8 + }, + { + "repetition": 4, + "latency_ns": 128353921, + "cpu_ticks": 12, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177472, + "record_count": 8 + }, + { + "repetition": 5, + "latency_ns": 124776730, + "cpu_ticks": 11, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177504, + "record_count": 8 + }, + { + "repetition": 6, + "latency_ns": 124699879, + "cpu_ticks": 11, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177516, + "record_count": 8 + }, + { + "repetition": 7, + "latency_ns": 126312280, + "cpu_ticks": 12, + "process_write_bytes": 4403200, + "database_storage_growth_bytes": 2735680, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 8, + "latency_ns": 115523107, + "cpu_ticks": 12, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177560, + "record_count": 8 + }, + { + "repetition": 9, + "latency_ns": 116626892, + "cpu_ticks": 11, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177576, + "record_count": 8 + }, + { + "repetition": 10, + "latency_ns": 114816455, + "cpu_ticks": 11, + "process_write_bytes": 4403200, + "database_storage_growth_bytes": 2735680, + "peak_rss_kib": 177580, + "record_count": 8 + }, + { + "repetition": 11, + "latency_ns": 123202270, + "cpu_ticks": 13, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177580, + "record_count": 8 + }, + { + "repetition": 12, + "latency_ns": 125322210, + "cpu_ticks": 12, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177588, + "record_count": 8 + }, + { + "repetition": 13, + "latency_ns": 126651106, + "cpu_ticks": 12, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177588, + "record_count": 8 + }, + { + "repetition": 14, + "latency_ns": 131042116, + "cpu_ticks": 13, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177592, + "record_count": 8 + }, + { + "repetition": 15, + "latency_ns": 114837771, + "cpu_ticks": 11, + "process_write_bytes": 4403200, + "database_storage_growth_bytes": 2735680, + "peak_rss_kib": 177604, + "record_count": 8 + }, + { + "repetition": 16, + "latency_ns": 121796945, + "cpu_ticks": 11, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 17, + "latency_ns": 123881293, + "cpu_ticks": 12, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 18, + "latency_ns": 115569788, + "cpu_ticks": 10, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 19, + "latency_ns": 116550361, + "cpu_ticks": 11, + "process_write_bytes": 4403200, + "database_storage_growth_bytes": 2735680, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 20, + "latency_ns": 116124614, + "cpu_ticks": 11, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 21, + "latency_ns": 136291190, + "cpu_ticks": 13, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 22, + "latency_ns": 120554912, + "cpu_ticks": 11, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 23, + "latency_ns": 120102045, + "cpu_ticks": 11, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 24, + "latency_ns": 123002943, + "cpu_ticks": 11, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 25, + "latency_ns": 116985500, + "cpu_ticks": 11, + "process_write_bytes": 4403200, + "database_storage_growth_bytes": 2735680, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 26, + "latency_ns": 116547952, + "cpu_ticks": 11, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 27, + "latency_ns": 114232479, + "cpu_ticks": 10, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 28, + "latency_ns": 119142615, + "cpu_ticks": 11, + "process_write_bytes": 4599808, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 29, + "latency_ns": 160552422, + "cpu_ticks": 15, + "process_write_bytes": 4411392, + "database_storage_growth_bytes": 2735680, + "peak_rss_kib": 177632, + "record_count": 8 + } + ], + "latency": { + "repetitions": 30, + "min_ns": 113057244, + "p50_ns": 121796945, + "p95_ns": 136291190, + "p99_ns": 160552422, + "max_ns": 160552422, + "mean_ns": 122651954.16666667, + "sample_stddev_ns": 9059970.406002713 + }, + "cpu_ticks": 347, + "cpu_ms": 3470.0, + "process_write_bytes": 132112384, + "database_storage_growth_bytes": 81872640, + "peak_rss_kib": 177632 + }, + "replay": { + "scope": "authoritative_store_bounded_replay", + "raw_samples": [ + { + "repetition": 0, + "latency_ns": 827081, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 174284, + "record_count": 8 + }, + { + "repetition": 1, + "latency_ns": 872661, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 175212, + "record_count": 8 + }, + { + "repetition": 2, + "latency_ns": 880472, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 176080, + "record_count": 8 + }, + { + "repetition": 3, + "latency_ns": 816242, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177444, + "record_count": 8 + }, + { + "repetition": 4, + "latency_ns": 1112515, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177472, + "record_count": 8 + }, + { + "repetition": 5, + "latency_ns": 809051, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177504, + "record_count": 8 + }, + { + "repetition": 6, + "latency_ns": 823012, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177516, + "record_count": 8 + }, + { + "repetition": 7, + "latency_ns": 999623, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 8, + "latency_ns": 802120, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177560, + "record_count": 8 + }, + { + "repetition": 9, + "latency_ns": 797762, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177576, + "record_count": 8 + }, + { + "repetition": 10, + "latency_ns": 797541, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177580, + "record_count": 8 + }, + { + "repetition": 11, + "latency_ns": 832622, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177580, + "record_count": 8 + }, + { + "repetition": 12, + "latency_ns": 850772, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177588, + "record_count": 8 + }, + { + "repetition": 13, + "latency_ns": 911152, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177588, + "record_count": 8 + }, + { + "repetition": 14, + "latency_ns": 864672, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177592, + "record_count": 8 + }, + { + "repetition": 15, + "latency_ns": 805990, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177604, + "record_count": 8 + }, + { + "repetition": 16, + "latency_ns": 900572, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 17, + "latency_ns": 870732, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 18, + "latency_ns": 819762, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 19, + "latency_ns": 804281, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 20, + "latency_ns": 809720, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 21, + "latency_ns": 830350, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 22, + "latency_ns": 830492, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 23, + "latency_ns": 973493, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 24, + "latency_ns": 891832, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 25, + "latency_ns": 837721, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 26, + "latency_ns": 808570, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 27, + "latency_ns": 814272, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 28, + "latency_ns": 826152, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 29, + "latency_ns": 1411089, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + } + ], + "latency": { + "repetitions": 30, + "min_ns": 797541, + "p50_ns": 830350, + "p95_ns": 1112515, + "p99_ns": 1411089, + "max_ns": 1411089, + "mean_ns": 874410.8666666667, + "sample_stddev_ns": 122730.28159165861 + }, + "cpu_ticks": 4, + "cpu_ms": 40.0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632 + }, + "pipeline_raw_samples": [ + { + "repetition": 0, + "latency_ns": 114058197, + "cpu_ticks": 10, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 174284, + "replayed_observations": 8 + }, + { + "repetition": 1, + "latency_ns": 126770974, + "cpu_ticks": 13, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 175212, + "replayed_observations": 8 + }, + { + "repetition": 2, + "latency_ns": 125397843, + "cpu_ticks": 12, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 176080, + "replayed_observations": 8 + }, + { + "repetition": 3, + "latency_ns": 124049592, + "cpu_ticks": 12, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177444, + "replayed_observations": 8 + }, + { + "repetition": 4, + "latency_ns": 129645539, + "cpu_ticks": 12, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177472, + "replayed_observations": 8 + }, + { + "repetition": 5, + "latency_ns": 125798624, + "cpu_ticks": 11, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177504, + "replayed_observations": 8 + }, + { + "repetition": 6, + "latency_ns": 125735903, + "cpu_ticks": 11, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177516, + "replayed_observations": 8 + }, + { + "repetition": 7, + "latency_ns": 127538327, + "cpu_ticks": 12, + "process_write_bytes": 4403200, + "database_storage_growth_bytes": 2735680, + "peak_rss_kib": 177536, + "replayed_observations": 8 + }, + { + "repetition": 8, + "latency_ns": 116543623, + "cpu_ticks": 12, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177560, + "replayed_observations": 8 + }, + { + "repetition": 9, + "latency_ns": 117613507, + "cpu_ticks": 12, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177576, + "replayed_observations": 8 + }, + { + "repetition": 10, + "latency_ns": 115829810, + "cpu_ticks": 12, + "process_write_bytes": 4403200, + "database_storage_growth_bytes": 2735680, + "peak_rss_kib": 177580, + "replayed_observations": 8 + }, + { + "repetition": 11, + "latency_ns": 124246056, + "cpu_ticks": 13, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177580, + "replayed_observations": 8 + }, + { + "repetition": 12, + "latency_ns": 126377544, + "cpu_ticks": 12, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177588, + "replayed_observations": 8 + }, + { + "repetition": 13, + "latency_ns": 127789242, + "cpu_ticks": 12, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177588, + "replayed_observations": 8 + }, + { + "repetition": 14, + "latency_ns": 132106291, + "cpu_ticks": 13, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177592, + "replayed_observations": 8 + }, + { + "repetition": 15, + "latency_ns": 115826694, + "cpu_ticks": 11, + "process_write_bytes": 4403200, + "database_storage_growth_bytes": 2735680, + "peak_rss_kib": 177604, + "replayed_observations": 8 + }, + { + "repetition": 16, + "latency_ns": 122903791, + "cpu_ticks": 12, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 17, + "latency_ns": 124967248, + "cpu_ticks": 12, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 18, + "latency_ns": 116619042, + "cpu_ticks": 11, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 19, + "latency_ns": 117536834, + "cpu_ticks": 11, + "process_write_bytes": 4403200, + "database_storage_growth_bytes": 2735680, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 20, + "latency_ns": 117166967, + "cpu_ticks": 11, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 21, + "latency_ns": 137352035, + "cpu_ticks": 13, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 22, + "latency_ns": 121636217, + "cpu_ticks": 11, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 23, + "latency_ns": 121375632, + "cpu_ticks": 11, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 24, + "latency_ns": 124140459, + "cpu_ticks": 11, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 25, + "latency_ns": 118006043, + "cpu_ticks": 11, + "process_write_bytes": 4403200, + "database_storage_growth_bytes": 2735680, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 26, + "latency_ns": 117548476, + "cpu_ticks": 11, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 27, + "latency_ns": 115211132, + "cpu_ticks": 10, + "process_write_bytes": 4395008, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 28, + "latency_ns": 120208961, + "cpu_ticks": 11, + "process_write_bytes": 4599808, + "database_storage_growth_bytes": 2727440, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 29, + "latency_ns": 162369708, + "cpu_ticks": 15, + "process_write_bytes": 4411392, + "database_storage_growth_bytes": 2735680, + "peak_rss_kib": 177632, + "replayed_observations": 8 + } + ], + "pipeline_latency": { + "repetitions": 30, + "min_ns": 114058197, + "p50_ns": 122903791, + "p95_ns": 137352035, + "p99_ns": 162369708, + "max_ns": 162369708, + "mean_ns": 123745677.03333333, + "sample_stddev_ns": 9191727.406223878 + }, + "pipeline_records_per_second": 64.64872302444184, + "pipeline_cpu_ticks": 351, + "pipeline_cpu_ms": 3510.0, + "pipeline_process_write_bytes": 132112384, + "pipeline_database_storage_growth_bytes": 81872640, + "peak_rss_kib": 177632, + "no_op_raw_samples": [ + { + "repetition": 0, + "latency_ns": 2733408, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 174284, + "replayed_observations": 0 + }, + { + "repetition": 1, + "latency_ns": 3034652, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 175212, + "replayed_observations": 0 + }, + { + "repetition": 2, + "latency_ns": 2741869, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 176080, + "replayed_observations": 0 + }, + { + "repetition": 3, + "latency_ns": 2919610, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177444, + "replayed_observations": 0 + }, + { + "repetition": 4, + "latency_ns": 2783379, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177472, + "replayed_observations": 0 + }, + { + "repetition": 5, + "latency_ns": 2841100, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177504, + "replayed_observations": 0 + }, + { + "repetition": 6, + "latency_ns": 2896291, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177516, + "replayed_observations": 0 + }, + { + "repetition": 7, + "latency_ns": 3337946, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "replayed_observations": 0 + }, + { + "repetition": 8, + "latency_ns": 2853730, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177560, + "replayed_observations": 0 + }, + { + "repetition": 9, + "latency_ns": 2980810, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177576, + "replayed_observations": 0 + }, + { + "repetition": 10, + "latency_ns": 2904330, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177580, + "replayed_observations": 0 + }, + { + "repetition": 11, + "latency_ns": 2953601, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177580, + "replayed_observations": 0 + }, + { + "repetition": 12, + "latency_ns": 2997842, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177588, + "replayed_observations": 0 + }, + { + "repetition": 13, + "latency_ns": 3112563, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177588, + "replayed_observations": 0 + }, + { + "repetition": 14, + "latency_ns": 3268487, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177592, + "replayed_observations": 0 + }, + { + "repetition": 15, + "latency_ns": 2736819, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177604, + "replayed_observations": 0 + }, + { + "repetition": 16, + "latency_ns": 3306996, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 17, + "latency_ns": 2876669, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 18, + "latency_ns": 2925110, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 19, + "latency_ns": 2778298, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 20, + "latency_ns": 2952111, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 21, + "latency_ns": 3027582, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 22, + "latency_ns": 3138522, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 23, + "latency_ns": 2901201, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 24, + "latency_ns": 3192545, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 25, + "latency_ns": 2752548, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 26, + "latency_ns": 2732077, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 27, + "latency_ns": 2686458, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 28, + "latency_ns": 2883148, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 29, + "latency_ns": 4753835, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + } + ], + "no_op_latency": { + "repetitions": 30, + "min_ns": 2686458, + "p50_ns": 2904330, + "p95_ns": 3337946, + "p99_ns": 4753835, + "max_ns": 4753835, + "mean_ns": 3000117.9, + "sample_stddev_ns": 375261.11233888497 + }, + "no_op_cpu_ticks": 8, + "no_op_cpu_ms": 80.0, + "no_op_process_write_bytes": 0, + "no_op_database_storage_growth_bytes": 0, + "no_op_observation_count_delta": 0 + }, + { + "provider": "cline", + "production_path": "cline_production_observation_pipeline_v1", + "pipeline_scope": "production_parse_normalize_sanitize_commit_project_and_replay", + "measured_repetitions": 30, + "observations_per_repetition": 8, + "replay_limit": 9, + "max_backlog_records": 8, + "parse": { + "scope": "native_provider_format_decode", + "raw_samples": [ + { + "repetition": 0, + "latency_ns": 56490, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 174252, + "record_count": 8 + }, + { + "repetition": 1, + "latency_ns": 44431, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 175116, + "record_count": 8 + }, + { + "repetition": 2, + "latency_ns": 54640, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 175984, + "record_count": 8 + }, + { + "repetition": 3, + "latency_ns": 46040, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177348, + "record_count": 8 + }, + { + "repetition": 4, + "latency_ns": 42702, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177376, + "record_count": 8 + }, + { + "repetition": 5, + "latency_ns": 55711, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177408, + "record_count": 8 + }, + { + "repetition": 6, + "latency_ns": 44591, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177420, + "record_count": 8 + }, + { + "repetition": 7, + "latency_ns": 56630, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177440, + "record_count": 8 + }, + { + "repetition": 8, + "latency_ns": 69820, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177464, + "record_count": 8 + }, + { + "repetition": 9, + "latency_ns": 72301, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177480, + "record_count": 8 + }, + { + "repetition": 10, + "latency_ns": 53302, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177484, + "record_count": 8 + }, + { + "repetition": 11, + "latency_ns": 52971, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177484, + "record_count": 8 + }, + { + "repetition": 12, + "latency_ns": 61970, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177492, + "record_count": 8 + }, + { + "repetition": 13, + "latency_ns": 44859, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177492, + "record_count": 8 + }, + { + "repetition": 14, + "latency_ns": 47271, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177496, + "record_count": 8 + }, + { + "repetition": 15, + "latency_ns": 58611, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177508, + "record_count": 8 + }, + { + "repetition": 16, + "latency_ns": 45391, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 17, + "latency_ns": 54200, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 18, + "latency_ns": 52421, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 19, + "latency_ns": 56231, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 20, + "latency_ns": 44040, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 21, + "latency_ns": 54631, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 22, + "latency_ns": 70151, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 23, + "latency_ns": 56800, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 24, + "latency_ns": 49871, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 25, + "latency_ns": 59121, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 26, + "latency_ns": 71151, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 27, + "latency_ns": 53510, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 28, + "latency_ns": 43521, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 29, + "latency_ns": 76941, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + } + ], + "latency": { + "repetitions": 30, + "min_ns": 42702, + "p50_ns": 54200, + "p95_ns": 72301, + "p99_ns": 76941, + "max_ns": 76941, + "mean_ns": 55010.666666666664, + "sample_stddev_ns": 9433.918797883383 + }, + "cpu_ticks": 0, + "cpu_ms": 0.0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536 + }, + "commit": { + "scope": "production_adapter_parse_normalize_sanitize_commit_and_project", + "raw_samples": [ + { + "repetition": 0, + "latency_ns": 120586917, + "cpu_ticks": 12, + "process_write_bytes": 4681728, + "database_storage_growth_bytes": 2875760, + "peak_rss_kib": 174356, + "record_count": 8 + }, + { + "repetition": 1, + "latency_ns": 115626168, + "cpu_ticks": 10, + "process_write_bytes": 4673536, + "database_storage_growth_bytes": 2867520, + "peak_rss_kib": 175212, + "record_count": 8 + }, + { + "repetition": 2, + "latency_ns": 129906955, + "cpu_ticks": 13, + "process_write_bytes": 4681728, + "database_storage_growth_bytes": 2875760, + "peak_rss_kib": 176080, + "record_count": 8 + }, + { + "repetition": 3, + "latency_ns": 120350202, + "cpu_ticks": 11, + "process_write_bytes": 4673536, + "database_storage_growth_bytes": 2867520, + "peak_rss_kib": 177456, + "record_count": 8 + }, + { + "repetition": 4, + "latency_ns": 127697222, + "cpu_ticks": 12, + "process_write_bytes": 4681728, + "database_storage_growth_bytes": 2875760, + "peak_rss_kib": 177472, + "record_count": 8 + }, + { + "repetition": 5, + "latency_ns": 115343139, + "cpu_ticks": 11, + "process_write_bytes": 4681728, + "database_storage_growth_bytes": 2875760, + "peak_rss_kib": 177504, + "record_count": 8 + }, + { + "repetition": 6, + "latency_ns": 124463745, + "cpu_ticks": 12, + "process_write_bytes": 4681728, + "database_storage_growth_bytes": 2875760, + "peak_rss_kib": 177524, + "record_count": 8 + }, + { + "repetition": 7, + "latency_ns": 117505406, + "cpu_ticks": 12, + "process_write_bytes": 4681728, + "database_storage_growth_bytes": 2875760, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 8, + "latency_ns": 120404866, + "cpu_ticks": 11, + "process_write_bytes": 4673536, + "database_storage_growth_bytes": 2867520, + "peak_rss_kib": 177560, + "record_count": 8 + }, + { + "repetition": 9, + "latency_ns": 124722704, + "cpu_ticks": 12, + "process_write_bytes": 4673536, + "database_storage_growth_bytes": 2867520, + "peak_rss_kib": 177576, + "record_count": 8 + }, + { + "repetition": 10, + "latency_ns": 122841316, + "cpu_ticks": 13, + "process_write_bytes": 4681728, + "database_storage_growth_bytes": 2875760, + "peak_rss_kib": 177580, + "record_count": 8 + }, + { + "repetition": 11, + "latency_ns": 124826414, + "cpu_ticks": 12, + "process_write_bytes": 4673536, + "database_storage_growth_bytes": 2867520, + "peak_rss_kib": 177580, + "record_count": 8 + }, + { + "repetition": 12, + "latency_ns": 119463018, + "cpu_ticks": 12, + "process_write_bytes": 4689920, + "database_storage_growth_bytes": 2875760, + "peak_rss_kib": 177588, + "record_count": 8 + }, + { + "repetition": 13, + "latency_ns": 118802847, + "cpu_ticks": 11, + "process_write_bytes": 4673536, + "database_storage_growth_bytes": 2867520, + "peak_rss_kib": 177588, + "record_count": 8 + }, + { + "repetition": 14, + "latency_ns": 111902461, + "cpu_ticks": 10, + "process_write_bytes": 4673536, + "database_storage_growth_bytes": 2867520, + "peak_rss_kib": 177592, + "record_count": 8 + }, + { + "repetition": 15, + "latency_ns": 128055614, + "cpu_ticks": 12, + "process_write_bytes": 4673536, + "database_storage_growth_bytes": 2867520, + "peak_rss_kib": 177604, + "record_count": 8 + }, + { + "repetition": 16, + "latency_ns": 123595071, + "cpu_ticks": 11, + "process_write_bytes": 4673536, + "database_storage_growth_bytes": 2867520, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 17, + "latency_ns": 123062232, + "cpu_ticks": 11, + "process_write_bytes": 4673536, + "database_storage_growth_bytes": 2867520, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 18, + "latency_ns": 131214334, + "cpu_ticks": 12, + "process_write_bytes": 4673536, + "database_storage_growth_bytes": 2867520, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 19, + "latency_ns": 116625850, + "cpu_ticks": 12, + "process_write_bytes": 4734976, + "database_storage_growth_bytes": 2867520, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 20, + "latency_ns": 114551010, + "cpu_ticks": 11, + "process_write_bytes": 4673536, + "database_storage_growth_bytes": 2867520, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 21, + "latency_ns": 123807297, + "cpu_ticks": 12, + "process_write_bytes": 4681728, + "database_storage_growth_bytes": 2875760, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 22, + "latency_ns": 123951659, + "cpu_ticks": 12, + "process_write_bytes": 4673536, + "database_storage_growth_bytes": 2867520, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 23, + "latency_ns": 151945753, + "cpu_ticks": 15, + "process_write_bytes": 4673536, + "database_storage_growth_bytes": 2867520, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 24, + "latency_ns": 114283873, + "cpu_ticks": 10, + "process_write_bytes": 4673536, + "database_storage_growth_bytes": 2867520, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 25, + "latency_ns": 139775493, + "cpu_ticks": 13, + "process_write_bytes": 4673536, + "database_storage_growth_bytes": 2867520, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 26, + "latency_ns": 129612292, + "cpu_ticks": 12, + "process_write_bytes": 4681728, + "database_storage_growth_bytes": 2875760, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 27, + "latency_ns": 124173546, + "cpu_ticks": 11, + "process_write_bytes": 4673536, + "database_storage_growth_bytes": 2867520, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 28, + "latency_ns": 118000221, + "cpu_ticks": 11, + "process_write_bytes": 4759552, + "database_storage_growth_bytes": 2867520, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 29, + "latency_ns": 163074238, + "cpu_ticks": 16, + "process_write_bytes": 4673536, + "database_storage_growth_bytes": 2867520, + "peak_rss_kib": 177632, + "record_count": 8 + } + ], + "latency": { + "repetitions": 30, + "min_ns": 111902461, + "p50_ns": 123062232, + "p95_ns": 151945753, + "p99_ns": 163074238, + "max_ns": 163074238, + "mean_ns": 124672395.43333334, + "sample_stddev_ns": 10809698.668319238 + }, + "cpu_ticks": 355, + "cpu_ms": 3550.0, + "process_write_bytes": 140443648, + "database_storage_growth_bytes": 86108000, + "peak_rss_kib": 177632 + }, + "replay": { + "scope": "authoritative_store_bounded_replay", + "raw_samples": [ + { + "repetition": 0, + "latency_ns": 902472, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 174356, + "record_count": 8 + }, + { + "repetition": 1, + "latency_ns": 857402, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 175212, + "record_count": 8 + }, + { + "repetition": 2, + "latency_ns": 827502, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 176080, + "record_count": 8 + }, + { + "repetition": 3, + "latency_ns": 844411, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177456, + "record_count": 8 + }, + { + "repetition": 4, + "latency_ns": 1180196, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177472, + "record_count": 8 + }, + { + "repetition": 5, + "latency_ns": 831001, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177504, + "record_count": 8 + }, + { + "repetition": 6, + "latency_ns": 932252, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177524, + "record_count": 8 + }, + { + "repetition": 7, + "latency_ns": 843732, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 8, + "latency_ns": 855312, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177560, + "record_count": 8 + }, + { + "repetition": 9, + "latency_ns": 842442, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177576, + "record_count": 8 + }, + { + "repetition": 10, + "latency_ns": 910913, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177580, + "record_count": 8 + }, + { + "repetition": 11, + "latency_ns": 873393, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177580, + "record_count": 8 + }, + { + "repetition": 12, + "latency_ns": 837192, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177588, + "record_count": 8 + }, + { + "repetition": 13, + "latency_ns": 848562, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177588, + "record_count": 8 + }, + { + "repetition": 14, + "latency_ns": 717949, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177592, + "record_count": 8 + }, + { + "repetition": 15, + "latency_ns": 921034, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177604, + "record_count": 8 + }, + { + "repetition": 16, + "latency_ns": 893412, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 17, + "latency_ns": 847542, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 18, + "latency_ns": 867853, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 19, + "latency_ns": 838492, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 20, + "latency_ns": 790101, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 21, + "latency_ns": 957154, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 22, + "latency_ns": 854552, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 23, + "latency_ns": 1162027, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 24, + "latency_ns": 831072, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 25, + "latency_ns": 1004333, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 26, + "latency_ns": 948264, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 27, + "latency_ns": 840551, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 28, + "latency_ns": 838221, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 29, + "latency_ns": 1222967, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + } + ], + "latency": { + "repetitions": 30, + "min_ns": 717949, + "p50_ns": 854552, + "p95_ns": 1180196, + "p99_ns": 1222967, + "max_ns": 1222967, + "mean_ns": 897410.2, + "sample_stddev_ns": 112504.33189495876 + }, + "cpu_ticks": 5, + "cpu_ms": 50.0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632 + }, + "pipeline_raw_samples": [ + { + "repetition": 0, + "latency_ns": 121726954, + "cpu_ticks": 12, + "process_write_bytes": 4681728, + "database_storage_growth_bytes": 2875760, + "peak_rss_kib": 174356, + "replayed_observations": 8 + }, + { + "repetition": 1, + "latency_ns": 116696463, + "cpu_ticks": 10, + "process_write_bytes": 4673536, + "database_storage_growth_bytes": 2867520, + "peak_rss_kib": 175212, + "replayed_observations": 8 + }, + { + "repetition": 2, + "latency_ns": 130945230, + "cpu_ticks": 13, + "process_write_bytes": 4681728, + "database_storage_growth_bytes": 2875760, + "peak_rss_kib": 176080, + "replayed_observations": 8 + }, + { + "repetition": 3, + "latency_ns": 121416256, + "cpu_ticks": 11, + "process_write_bytes": 4673536, + "database_storage_growth_bytes": 2867520, + "peak_rss_kib": 177456, + "replayed_observations": 8 + }, + { + "repetition": 4, + "latency_ns": 129105603, + "cpu_ticks": 12, + "process_write_bytes": 4681728, + "database_storage_growth_bytes": 2875760, + "peak_rss_kib": 177472, + "replayed_observations": 8 + }, + { + "repetition": 5, + "latency_ns": 116379503, + "cpu_ticks": 11, + "process_write_bytes": 4681728, + "database_storage_growth_bytes": 2875760, + "peak_rss_kib": 177504, + "replayed_observations": 8 + }, + { + "repetition": 6, + "latency_ns": 125676042, + "cpu_ticks": 12, + "process_write_bytes": 4681728, + "database_storage_growth_bytes": 2875760, + "peak_rss_kib": 177524, + "replayed_observations": 8 + }, + { + "repetition": 7, + "latency_ns": 118578180, + "cpu_ticks": 12, + "process_write_bytes": 4681728, + "database_storage_growth_bytes": 2875760, + "peak_rss_kib": 177536, + "replayed_observations": 8 + }, + { + "repetition": 8, + "latency_ns": 121450610, + "cpu_ticks": 12, + "process_write_bytes": 4673536, + "database_storage_growth_bytes": 2867520, + "peak_rss_kib": 177560, + "replayed_observations": 8 + }, + { + "repetition": 9, + "latency_ns": 125783509, + "cpu_ticks": 12, + "process_write_bytes": 4673536, + "database_storage_growth_bytes": 2867520, + "peak_rss_kib": 177576, + "replayed_observations": 8 + }, + { + "repetition": 10, + "latency_ns": 123943353, + "cpu_ticks": 13, + "process_write_bytes": 4681728, + "database_storage_growth_bytes": 2875760, + "peak_rss_kib": 177580, + "replayed_observations": 8 + }, + { + "repetition": 11, + "latency_ns": 125903658, + "cpu_ticks": 12, + "process_write_bytes": 4673536, + "database_storage_growth_bytes": 2867520, + "peak_rss_kib": 177580, + "replayed_observations": 8 + }, + { + "repetition": 12, + "latency_ns": 120555483, + "cpu_ticks": 12, + "process_write_bytes": 4689920, + "database_storage_growth_bytes": 2875760, + "peak_rss_kib": 177588, + "replayed_observations": 8 + }, + { + "repetition": 13, + "latency_ns": 119839321, + "cpu_ticks": 11, + "process_write_bytes": 4673536, + "database_storage_growth_bytes": 2867520, + "peak_rss_kib": 177588, + "replayed_observations": 8 + }, + { + "repetition": 14, + "latency_ns": 112789923, + "cpu_ticks": 11, + "process_write_bytes": 4673536, + "database_storage_growth_bytes": 2867520, + "peak_rss_kib": 177592, + "replayed_observations": 8 + }, + { + "repetition": 15, + "latency_ns": 129230609, + "cpu_ticks": 12, + "process_write_bytes": 4673536, + "database_storage_growth_bytes": 2867520, + "peak_rss_kib": 177604, + "replayed_observations": 8 + }, + { + "repetition": 16, + "latency_ns": 124700206, + "cpu_ticks": 12, + "process_write_bytes": 4673536, + "database_storage_growth_bytes": 2867520, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 17, + "latency_ns": 124111647, + "cpu_ticks": 12, + "process_write_bytes": 4673536, + "database_storage_growth_bytes": 2867520, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 18, + "latency_ns": 132307918, + "cpu_ticks": 13, + "process_write_bytes": 4673536, + "database_storage_growth_bytes": 2867520, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 19, + "latency_ns": 117682926, + "cpu_ticks": 12, + "process_write_bytes": 4734976, + "database_storage_growth_bytes": 2867520, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 20, + "latency_ns": 115535694, + "cpu_ticks": 11, + "process_write_bytes": 4673536, + "database_storage_growth_bytes": 2867520, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 21, + "latency_ns": 124970735, + "cpu_ticks": 12, + "process_write_bytes": 4681728, + "database_storage_growth_bytes": 2875760, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 22, + "latency_ns": 125023884, + "cpu_ticks": 12, + "process_write_bytes": 4673536, + "database_storage_growth_bytes": 2867520, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 23, + "latency_ns": 153366293, + "cpu_ticks": 15, + "process_write_bytes": 4673536, + "database_storage_growth_bytes": 2867520, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 24, + "latency_ns": 115293938, + "cpu_ticks": 10, + "process_write_bytes": 4673536, + "database_storage_growth_bytes": 2867520, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 25, + "latency_ns": 141017700, + "cpu_ticks": 13, + "process_write_bytes": 4673536, + "database_storage_growth_bytes": 2867520, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 26, + "latency_ns": 130788187, + "cpu_ticks": 12, + "process_write_bytes": 4681728, + "database_storage_growth_bytes": 2875760, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 27, + "latency_ns": 125236289, + "cpu_ticks": 11, + "process_write_bytes": 4673536, + "database_storage_growth_bytes": 2867520, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 28, + "latency_ns": 119023385, + "cpu_ticks": 11, + "process_write_bytes": 4759552, + "database_storage_growth_bytes": 2867520, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 29, + "latency_ns": 164598709, + "cpu_ticks": 16, + "process_write_bytes": 4673536, + "database_storage_growth_bytes": 2867520, + "peak_rss_kib": 177632, + "replayed_observations": 8 + } + ], + "pipeline_latency": { + "repetitions": 30, + "min_ns": 112789923, + "p50_ns": 124111647, + "p95_ns": 153366293, + "p99_ns": 164598709, + "max_ns": 164598709, + "mean_ns": 125789273.6, + "sample_stddev_ns": 10924031.693472154 + }, + "pipeline_records_per_second": 63.59842752124773, + "pipeline_cpu_ticks": 360, + "pipeline_cpu_ms": 3600.0, + "pipeline_process_write_bytes": 140443648, + "pipeline_database_storage_growth_bytes": 86108000, + "peak_rss_kib": 177632, + "no_op_raw_samples": [ + { + "repetition": 0, + "latency_ns": 3550609, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 174356, + "replayed_observations": 0 + }, + { + "repetition": 1, + "latency_ns": 2803190, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 175212, + "replayed_observations": 0 + }, + { + "repetition": 2, + "latency_ns": 3018092, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 176080, + "replayed_observations": 0 + }, + { + "repetition": 3, + "latency_ns": 3014822, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177456, + "replayed_observations": 0 + }, + { + "repetition": 4, + "latency_ns": 2918902, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177472, + "replayed_observations": 0 + }, + { + "repetition": 5, + "latency_ns": 2868140, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177504, + "replayed_observations": 0 + }, + { + "repetition": 6, + "latency_ns": 3047473, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177524, + "replayed_observations": 0 + }, + { + "repetition": 7, + "latency_ns": 2956621, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "replayed_observations": 0 + }, + { + "repetition": 8, + "latency_ns": 2831139, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177560, + "replayed_observations": 0 + }, + { + "repetition": 9, + "latency_ns": 2906870, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177576, + "replayed_observations": 0 + }, + { + "repetition": 10, + "latency_ns": 3071043, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177580, + "replayed_observations": 0 + }, + { + "repetition": 11, + "latency_ns": 2958131, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177580, + "replayed_observations": 0 + }, + { + "repetition": 12, + "latency_ns": 2987472, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177588, + "replayed_observations": 0 + }, + { + "repetition": 13, + "latency_ns": 2799218, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177588, + "replayed_observations": 0 + }, + { + "repetition": 14, + "latency_ns": 2676447, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177592, + "replayed_observations": 0 + }, + { + "repetition": 15, + "latency_ns": 3272836, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177604, + "replayed_observations": 0 + }, + { + "repetition": 16, + "latency_ns": 3143643, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 17, + "latency_ns": 2805229, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 18, + "latency_ns": 3193094, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 19, + "latency_ns": 2816067, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 20, + "latency_ns": 2802578, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 21, + "latency_ns": 3157364, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 22, + "latency_ns": 2785208, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 23, + "latency_ns": 3277525, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 24, + "latency_ns": 2712767, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 25, + "latency_ns": 3148114, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 26, + "latency_ns": 3137664, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 27, + "latency_ns": 3014541, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 28, + "latency_ns": 2776628, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 29, + "latency_ns": 3949045, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + } + ], + "no_op_latency": { + "repetitions": 30, + "min_ns": 2676447, + "p50_ns": 2958131, + "p95_ns": 3550609, + "p99_ns": 3949045, + "max_ns": 3949045, + "mean_ns": 3013349.066666667, + "sample_stddev_ns": 263893.5114695311 + }, + "no_op_cpu_ticks": 10, + "no_op_cpu_ms": 100.0, + "no_op_process_write_bytes": 0, + "no_op_database_storage_growth_bytes": 0, + "no_op_observation_count_delta": 0 + }, + { + "provider": "roo-code", + "production_path": "roo-code_production_observation_pipeline_v1", + "pipeline_scope": "production_parse_normalize_sanitize_commit_project_and_replay", + "measured_repetitions": 30, + "observations_per_repetition": 8, + "replay_limit": 9, + "max_backlog_records": 8, + "parse": { + "scope": "native_provider_format_decode", + "raw_samples": [ + { + "repetition": 0, + "latency_ns": 57062, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 174260, + "record_count": 8 + }, + { + "repetition": 1, + "latency_ns": 61500, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 175116, + "record_count": 8 + }, + { + "repetition": 2, + "latency_ns": 56810, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 175984, + "record_count": 8 + }, + { + "repetition": 3, + "latency_ns": 45760, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177360, + "record_count": 8 + }, + { + "repetition": 4, + "latency_ns": 43871, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177376, + "record_count": 8 + }, + { + "repetition": 5, + "latency_ns": 57760, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177408, + "record_count": 8 + }, + { + "repetition": 6, + "latency_ns": 51231, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177428, + "record_count": 8 + }, + { + "repetition": 7, + "latency_ns": 44241, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177440, + "record_count": 8 + }, + { + "repetition": 8, + "latency_ns": 50510, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177464, + "record_count": 8 + }, + { + "repetition": 9, + "latency_ns": 44840, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177480, + "record_count": 8 + }, + { + "repetition": 10, + "latency_ns": 47201, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177484, + "record_count": 8 + }, + { + "repetition": 11, + "latency_ns": 52661, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177484, + "record_count": 8 + }, + { + "repetition": 12, + "latency_ns": 61141, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177492, + "record_count": 8 + }, + { + "repetition": 13, + "latency_ns": 47761, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177492, + "record_count": 8 + }, + { + "repetition": 14, + "latency_ns": 45211, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177496, + "record_count": 8 + }, + { + "repetition": 15, + "latency_ns": 55611, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177508, + "record_count": 8 + }, + { + "repetition": 16, + "latency_ns": 53201, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 17, + "latency_ns": 48321, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 18, + "latency_ns": 46431, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 19, + "latency_ns": 47851, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 20, + "latency_ns": 42650, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 21, + "latency_ns": 56492, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 22, + "latency_ns": 55231, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 23, + "latency_ns": 44910, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 24, + "latency_ns": 47840, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 25, + "latency_ns": 47801, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 26, + "latency_ns": 46290, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 27, + "latency_ns": 55931, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 28, + "latency_ns": 44280, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 29, + "latency_ns": 66451, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + } + ], + "latency": { + "repetitions": 30, + "min_ns": 42650, + "p50_ns": 47851, + "p95_ns": 61500, + "p99_ns": 66451, + "max_ns": 66451, + "mean_ns": 50895.03333333333, + "sample_stddev_ns": 6219.873169143394 + }, + "cpu_ticks": 0, + "cpu_ms": 0.0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536 + }, + "commit": { + "scope": "production_adapter_parse_normalize_sanitize_commit_and_project", + "raw_samples": [ + { + "repetition": 0, + "latency_ns": 121335458, + "cpu_ticks": 12, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 174356, + "record_count": 8 + }, + { + "repetition": 1, + "latency_ns": 116118665, + "cpu_ticks": 11, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 175212, + "record_count": 8 + }, + { + "repetition": 2, + "latency_ns": 123602989, + "cpu_ticks": 11, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 176108, + "record_count": 8 + }, + { + "repetition": 3, + "latency_ns": 116672950, + "cpu_ticks": 11, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177456, + "record_count": 8 + }, + { + "repetition": 4, + "latency_ns": 120097775, + "cpu_ticks": 10, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177472, + "record_count": 8 + }, + { + "repetition": 5, + "latency_ns": 117830033, + "cpu_ticks": 12, + "process_write_bytes": 4685824, + "database_storage_growth_bytes": 2879880, + "peak_rss_kib": 177504, + "record_count": 8 + }, + { + "repetition": 6, + "latency_ns": 123236707, + "cpu_ticks": 11, + "process_write_bytes": 4694016, + "database_storage_growth_bytes": 2879880, + "peak_rss_kib": 177524, + "record_count": 8 + }, + { + "repetition": 7, + "latency_ns": 112949722, + "cpu_ticks": 11, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 8, + "latency_ns": 122761658, + "cpu_ticks": 11, + "process_write_bytes": 4685824, + "database_storage_growth_bytes": 2879880, + "peak_rss_kib": 177576, + "record_count": 8 + }, + { + "repetition": 9, + "latency_ns": 121058743, + "cpu_ticks": 11, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177576, + "record_count": 8 + }, + { + "repetition": 10, + "latency_ns": 121884674, + "cpu_ticks": 12, + "process_write_bytes": 4685824, + "database_storage_growth_bytes": 2879880, + "peak_rss_kib": 177580, + "record_count": 8 + }, + { + "repetition": 11, + "latency_ns": 115435352, + "cpu_ticks": 11, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177580, + "record_count": 8 + }, + { + "repetition": 12, + "latency_ns": 120570103, + "cpu_ticks": 12, + "process_write_bytes": 4685824, + "database_storage_growth_bytes": 2879880, + "peak_rss_kib": 177588, + "record_count": 8 + }, + { + "repetition": 13, + "latency_ns": 114177273, + "cpu_ticks": 10, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177588, + "record_count": 8 + }, + { + "repetition": 14, + "latency_ns": 125989127, + "cpu_ticks": 12, + "process_write_bytes": 4685824, + "database_storage_growth_bytes": 2879880, + "peak_rss_kib": 177592, + "record_count": 8 + }, + { + "repetition": 15, + "latency_ns": 128240115, + "cpu_ticks": 12, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177604, + "record_count": 8 + }, + { + "repetition": 16, + "latency_ns": 131133365, + "cpu_ticks": 13, + "process_write_bytes": 4685824, + "database_storage_growth_bytes": 2879880, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 17, + "latency_ns": 122581445, + "cpu_ticks": 11, + "process_write_bytes": 4685824, + "database_storage_growth_bytes": 2879880, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 18, + "latency_ns": 119650173, + "cpu_ticks": 10, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 19, + "latency_ns": 129373676, + "cpu_ticks": 12, + "process_write_bytes": 4706304, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 20, + "latency_ns": 125439090, + "cpu_ticks": 11, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 21, + "latency_ns": 124796461, + "cpu_ticks": 12, + "process_write_bytes": 4685824, + "database_storage_growth_bytes": 2879880, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 22, + "latency_ns": 118050266, + "cpu_ticks": 11, + "process_write_bytes": 4706304, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 23, + "latency_ns": 139535051, + "cpu_ticks": 13, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 24, + "latency_ns": 122350024, + "cpu_ticks": 11, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 25, + "latency_ns": 125090400, + "cpu_ticks": 11, + "process_write_bytes": 4685824, + "database_storage_growth_bytes": 2879880, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 26, + "latency_ns": 117993523, + "cpu_ticks": 12, + "process_write_bytes": 4685824, + "database_storage_growth_bytes": 2879880, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 27, + "latency_ns": 116964357, + "cpu_ticks": 11, + "process_write_bytes": 4685824, + "database_storage_growth_bytes": 2879880, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 28, + "latency_ns": 129804233, + "cpu_ticks": 13, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 29, + "latency_ns": 162415088, + "cpu_ticks": 16, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177632, + "record_count": 8 + } + ], + "latency": { + "repetitions": 30, + "min_ns": 112949722, + "p50_ns": 121884674, + "p95_ns": 139535051, + "p99_ns": 162415088, + "max_ns": 162415088, + "mean_ns": 123571283.2, + "sample_stddev_ns": 9267600.058038302 + }, + "cpu_ticks": 347, + "cpu_ms": 3470.0, + "process_write_bytes": 140492800, + "database_storage_growth_bytes": 86248080, + "peak_rss_kib": 177632 + }, + "replay": { + "scope": "authoritative_store_bounded_replay", + "raw_samples": [ + { + "repetition": 0, + "latency_ns": 875921, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 174356, + "record_count": 8 + }, + { + "repetition": 1, + "latency_ns": 869842, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 175212, + "record_count": 8 + }, + { + "repetition": 2, + "latency_ns": 841632, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 176108, + "record_count": 8 + }, + { + "repetition": 3, + "latency_ns": 835691, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177456, + "record_count": 8 + }, + { + "repetition": 4, + "latency_ns": 919023, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177472, + "record_count": 8 + }, + { + "repetition": 5, + "latency_ns": 804582, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177504, + "record_count": 8 + }, + { + "repetition": 6, + "latency_ns": 813522, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177524, + "record_count": 8 + }, + { + "repetition": 7, + "latency_ns": 813260, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 8, + "latency_ns": 904862, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177576, + "record_count": 8 + }, + { + "repetition": 9, + "latency_ns": 825270, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177576, + "record_count": 8 + }, + { + "repetition": 10, + "latency_ns": 882034, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177580, + "record_count": 8 + }, + { + "repetition": 11, + "latency_ns": 834953, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177580, + "record_count": 8 + }, + { + "repetition": 12, + "latency_ns": 861772, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177588, + "record_count": 8 + }, + { + "repetition": 13, + "latency_ns": 726311, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177588, + "record_count": 8 + }, + { + "repetition": 14, + "latency_ns": 877232, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177592, + "record_count": 8 + }, + { + "repetition": 15, + "latency_ns": 876393, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177604, + "record_count": 8 + }, + { + "repetition": 16, + "latency_ns": 790981, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 17, + "latency_ns": 890083, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 18, + "latency_ns": 973004, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 19, + "latency_ns": 899113, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 20, + "latency_ns": 897222, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 21, + "latency_ns": 855482, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 22, + "latency_ns": 822212, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 23, + "latency_ns": 878733, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 24, + "latency_ns": 826052, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 25, + "latency_ns": 858562, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 26, + "latency_ns": 1164597, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 27, + "latency_ns": 831482, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 28, + "latency_ns": 967262, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 29, + "latency_ns": 1277818, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + } + ], + "latency": { + "repetitions": 30, + "min_ns": 726311, + "p50_ns": 861772, + "p95_ns": 1164597, + "p99_ns": 1277818, + "max_ns": 1277818, + "mean_ns": 883163.4333333333, + "sample_stddev_ns": 105509.02026242488 + }, + "cpu_ticks": 5, + "cpu_ms": 50.0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632 + }, + "pipeline_raw_samples": [ + { + "repetition": 0, + "latency_ns": 122442023, + "cpu_ticks": 12, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 174356, + "replayed_observations": 8 + }, + { + "repetition": 1, + "latency_ns": 117164599, + "cpu_ticks": 11, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 175212, + "replayed_observations": 8 + }, + { + "repetition": 2, + "latency_ns": 124642183, + "cpu_ticks": 11, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 176108, + "replayed_observations": 8 + }, + { + "repetition": 3, + "latency_ns": 117717474, + "cpu_ticks": 11, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177456, + "replayed_observations": 8 + }, + { + "repetition": 4, + "latency_ns": 121249323, + "cpu_ticks": 11, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177472, + "replayed_observations": 8 + }, + { + "repetition": 5, + "latency_ns": 118824809, + "cpu_ticks": 12, + "process_write_bytes": 4685824, + "database_storage_growth_bytes": 2879880, + "peak_rss_kib": 177504, + "replayed_observations": 8 + }, + { + "repetition": 6, + "latency_ns": 124267492, + "cpu_ticks": 11, + "process_write_bytes": 4694016, + "database_storage_growth_bytes": 2879880, + "peak_rss_kib": 177524, + "replayed_observations": 8 + }, + { + "repetition": 7, + "latency_ns": 113954587, + "cpu_ticks": 11, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177536, + "replayed_observations": 8 + }, + { + "repetition": 8, + "latency_ns": 123880414, + "cpu_ticks": 11, + "process_write_bytes": 4685824, + "database_storage_growth_bytes": 2879880, + "peak_rss_kib": 177576, + "replayed_observations": 8 + }, + { + "repetition": 9, + "latency_ns": 122067637, + "cpu_ticks": 11, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177576, + "replayed_observations": 8 + }, + { + "repetition": 10, + "latency_ns": 122978020, + "cpu_ticks": 12, + "process_write_bytes": 4685824, + "database_storage_growth_bytes": 2879880, + "peak_rss_kib": 177580, + "replayed_observations": 8 + }, + { + "repetition": 11, + "latency_ns": 116499218, + "cpu_ticks": 12, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177580, + "replayed_observations": 8 + }, + { + "repetition": 12, + "latency_ns": 121663308, + "cpu_ticks": 12, + "process_write_bytes": 4685824, + "database_storage_growth_bytes": 2879880, + "peak_rss_kib": 177588, + "replayed_observations": 8 + }, + { + "repetition": 13, + "latency_ns": 115083286, + "cpu_ticks": 11, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177588, + "replayed_observations": 8 + }, + { + "repetition": 14, + "latency_ns": 127075521, + "cpu_ticks": 12, + "process_write_bytes": 4685824, + "database_storage_growth_bytes": 2879880, + "peak_rss_kib": 177592, + "replayed_observations": 8 + }, + { + "repetition": 15, + "latency_ns": 129328841, + "cpu_ticks": 13, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177604, + "replayed_observations": 8 + }, + { + "repetition": 16, + "latency_ns": 132125128, + "cpu_ticks": 13, + "process_write_bytes": 4685824, + "database_storage_growth_bytes": 2879880, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 17, + "latency_ns": 123696930, + "cpu_ticks": 11, + "process_write_bytes": 4685824, + "database_storage_growth_bytes": 2879880, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 18, + "latency_ns": 120857082, + "cpu_ticks": 11, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 19, + "latency_ns": 130505392, + "cpu_ticks": 12, + "process_write_bytes": 4706304, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 20, + "latency_ns": 126536157, + "cpu_ticks": 11, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 21, + "latency_ns": 125880745, + "cpu_ticks": 12, + "process_write_bytes": 4685824, + "database_storage_growth_bytes": 2879880, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 22, + "latency_ns": 119101581, + "cpu_ticks": 11, + "process_write_bytes": 4706304, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 23, + "latency_ns": 140626016, + "cpu_ticks": 13, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 24, + "latency_ns": 123379488, + "cpu_ticks": 12, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 25, + "latency_ns": 126146404, + "cpu_ticks": 11, + "process_write_bytes": 4685824, + "database_storage_growth_bytes": 2879880, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 26, + "latency_ns": 119323020, + "cpu_ticks": 12, + "process_write_bytes": 4685824, + "database_storage_growth_bytes": 2879880, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 27, + "latency_ns": 117974401, + "cpu_ticks": 11, + "process_write_bytes": 4685824, + "database_storage_growth_bytes": 2879880, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 28, + "latency_ns": 130994257, + "cpu_ticks": 13, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 29, + "latency_ns": 163948649, + "cpu_ticks": 16, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177632, + "replayed_observations": 8 + } + ], + "pipeline_latency": { + "repetitions": 30, + "min_ns": 113954587, + "p50_ns": 122978020, + "p95_ns": 140626016, + "p99_ns": 163948649, + "max_ns": 163948649, + "mean_ns": 124664466.16666667, + "sample_stddev_ns": 9343409.35366234 + }, + "pipeline_records_per_second": 64.172255703599, + "pipeline_cpu_ticks": 353, + "pipeline_cpu_ms": 3530.0, + "pipeline_process_write_bytes": 140492800, + "pipeline_database_storage_growth_bytes": 86248080, + "peak_rss_kib": 177632, + "no_op_raw_samples": [ + { + "repetition": 0, + "latency_ns": 3255777, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 174356, + "replayed_observations": 0 + }, + { + "repetition": 1, + "latency_ns": 2748649, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 175212, + "replayed_observations": 0 + }, + { + "repetition": 2, + "latency_ns": 2911461, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 176108, + "replayed_observations": 0 + }, + { + "repetition": 3, + "latency_ns": 2891821, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177456, + "replayed_observations": 0 + }, + { + "repetition": 4, + "latency_ns": 3142144, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177472, + "replayed_observations": 0 + }, + { + "repetition": 5, + "latency_ns": 2735169, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177504, + "replayed_observations": 0 + }, + { + "repetition": 6, + "latency_ns": 2938991, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177524, + "replayed_observations": 0 + }, + { + "repetition": 7, + "latency_ns": 2710028, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "replayed_observations": 0 + }, + { + "repetition": 8, + "latency_ns": 3243846, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177576, + "replayed_observations": 0 + }, + { + "repetition": 9, + "latency_ns": 2753219, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177576, + "replayed_observations": 0 + }, + { + "repetition": 10, + "latency_ns": 3018182, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177580, + "replayed_observations": 0 + }, + { + "repetition": 11, + "latency_ns": 2905810, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177580, + "replayed_observations": 0 + }, + { + "repetition": 12, + "latency_ns": 3032221, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177588, + "replayed_observations": 0 + }, + { + "repetition": 13, + "latency_ns": 2743049, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177588, + "replayed_observations": 0 + }, + { + "repetition": 14, + "latency_ns": 2939779, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177592, + "replayed_observations": 0 + }, + { + "repetition": 15, + "latency_ns": 3233836, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177604, + "replayed_observations": 0 + }, + { + "repetition": 16, + "latency_ns": 2962330, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 17, + "latency_ns": 2944842, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 18, + "latency_ns": 3084833, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 19, + "latency_ns": 3462118, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 20, + "latency_ns": 2828279, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 21, + "latency_ns": 3124662, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 22, + "latency_ns": 3430647, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 23, + "latency_ns": 3053292, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 24, + "latency_ns": 2893690, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 25, + "latency_ns": 2895540, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 26, + "latency_ns": 2883089, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 27, + "latency_ns": 2777109, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 28, + "latency_ns": 3367446, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 29, + "latency_ns": 3864284, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + } + ], + "no_op_latency": { + "repetitions": 30, + "min_ns": 2710028, + "p50_ns": 2939779, + "p95_ns": 3462118, + "p99_ns": 3864284, + "max_ns": 3864284, + "mean_ns": 3025871.433333333, + "sample_stddev_ns": 261773.90035871157 + }, + "no_op_cpu_ticks": 11, + "no_op_cpu_ms": 110.0, + "no_op_process_write_bytes": 0, + "no_op_database_storage_growth_bytes": 0, + "no_op_observation_count_delta": 0 + }, + { + "provider": "kilo", + "production_path": "kilo_production_observation_pipeline_v1", + "pipeline_scope": "production_parse_normalize_sanitize_commit_project_and_replay", + "measured_repetitions": 30, + "observations_per_repetition": 8, + "replay_limit": 9, + "max_backlog_records": 8, + "parse": { + "scope": "native_provider_format_decode", + "raw_samples": [ + { + "repetition": 0, + "latency_ns": 53881, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 174260, + "record_count": 8 + }, + { + "repetition": 1, + "latency_ns": 44711, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 175116, + "record_count": 8 + }, + { + "repetition": 2, + "latency_ns": 43829, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 176012, + "record_count": 8 + }, + { + "repetition": 3, + "latency_ns": 62891, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177360, + "record_count": 8 + }, + { + "repetition": 4, + "latency_ns": 45161, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177376, + "record_count": 8 + }, + { + "repetition": 5, + "latency_ns": 56801, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177408, + "record_count": 8 + }, + { + "repetition": 6, + "latency_ns": 44090, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177428, + "record_count": 8 + }, + { + "repetition": 7, + "latency_ns": 53910, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177440, + "record_count": 8 + }, + { + "repetition": 8, + "latency_ns": 48051, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177480, + "record_count": 8 + }, + { + "repetition": 9, + "latency_ns": 60551, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177480, + "record_count": 8 + }, + { + "repetition": 10, + "latency_ns": 44110, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177484, + "record_count": 8 + }, + { + "repetition": 11, + "latency_ns": 55541, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177484, + "record_count": 8 + }, + { + "repetition": 12, + "latency_ns": 56791, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177492, + "record_count": 8 + }, + { + "repetition": 13, + "latency_ns": 57902, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177492, + "record_count": 8 + }, + { + "repetition": 14, + "latency_ns": 47490, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177496, + "record_count": 8 + }, + { + "repetition": 15, + "latency_ns": 45880, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177508, + "record_count": 8 + }, + { + "repetition": 16, + "latency_ns": 46551, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 17, + "latency_ns": 50801, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 18, + "latency_ns": 61742, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 19, + "latency_ns": 43740, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 20, + "latency_ns": 55170, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 21, + "latency_ns": 45420, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177512, + "record_count": 8 + }, + { + "repetition": 22, + "latency_ns": 43431, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 23, + "latency_ns": 46791, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 24, + "latency_ns": 42020, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 25, + "latency_ns": 65770, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 26, + "latency_ns": 60321, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 27, + "latency_ns": 56221, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 28, + "latency_ns": 45141, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 29, + "latency_ns": 85533, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + } + ], + "latency": { + "repetitions": 30, + "min_ns": 42020, + "p50_ns": 48051, + "p95_ns": 65770, + "p99_ns": 85533, + "max_ns": 85533, + "mean_ns": 52341.4, + "sample_stddev_ns": 9376.459767178507 + }, + "cpu_ticks": 1, + "cpu_ms": 10.0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536 + }, + "commit": { + "scope": "production_adapter_parse_normalize_sanitize_commit_and_project", + "raw_samples": [ + { + "repetition": 0, + "latency_ns": 128135944, + "cpu_ticks": 13, + "process_write_bytes": 4669440, + "database_storage_growth_bytes": 2863400, + "peak_rss_kib": 175140, + "record_count": 8 + }, + { + "repetition": 1, + "latency_ns": 118983414, + "cpu_ticks": 11, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 175212, + "record_count": 8 + }, + { + "repetition": 2, + "latency_ns": 122941598, + "cpu_ticks": 11, + "process_write_bytes": 4669440, + "database_storage_growth_bytes": 2863400, + "peak_rss_kib": 176108, + "record_count": 8 + }, + { + "repetition": 3, + "latency_ns": 124390478, + "cpu_ticks": 13, + "process_write_bytes": 4669440, + "database_storage_growth_bytes": 2863400, + "peak_rss_kib": 177464, + "record_count": 8 + }, + { + "repetition": 4, + "latency_ns": 121455185, + "cpu_ticks": 11, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177472, + "record_count": 8 + }, + { + "repetition": 5, + "latency_ns": 126263601, + "cpu_ticks": 13, + "process_write_bytes": 4669440, + "database_storage_growth_bytes": 2863400, + "peak_rss_kib": 177504, + "record_count": 8 + }, + { + "repetition": 6, + "latency_ns": 130366837, + "cpu_ticks": 13, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177532, + "record_count": 8 + }, + { + "repetition": 7, + "latency_ns": 126220647, + "cpu_ticks": 12, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 8, + "latency_ns": 115213612, + "cpu_ticks": 11, + "process_write_bytes": 4669440, + "database_storage_growth_bytes": 2863400, + "peak_rss_kib": 177576, + "record_count": 8 + }, + { + "repetition": 9, + "latency_ns": 120825271, + "cpu_ticks": 12, + "process_write_bytes": 4669440, + "database_storage_growth_bytes": 2863400, + "peak_rss_kib": 177580, + "record_count": 8 + }, + { + "repetition": 10, + "latency_ns": 120650077, + "cpu_ticks": 10, + "process_write_bytes": 4669440, + "database_storage_growth_bytes": 2863400, + "peak_rss_kib": 177580, + "record_count": 8 + }, + { + "repetition": 11, + "latency_ns": 126147551, + "cpu_ticks": 12, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177580, + "record_count": 8 + }, + { + "repetition": 12, + "latency_ns": 125559102, + "cpu_ticks": 12, + "process_write_bytes": 4730880, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177588, + "record_count": 8 + }, + { + "repetition": 13, + "latency_ns": 129737538, + "cpu_ticks": 12, + "process_write_bytes": 4714496, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177588, + "record_count": 8 + }, + { + "repetition": 14, + "latency_ns": 115789425, + "cpu_ticks": 11, + "process_write_bytes": 4669440, + "database_storage_growth_bytes": 2863400, + "peak_rss_kib": 177592, + "record_count": 8 + }, + { + "repetition": 15, + "latency_ns": 118322198, + "cpu_ticks": 12, + "process_write_bytes": 4669440, + "database_storage_growth_bytes": 2863400, + "peak_rss_kib": 177604, + "record_count": 8 + }, + { + "repetition": 16, + "latency_ns": 127542554, + "cpu_ticks": 12, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 17, + "latency_ns": 124441222, + "cpu_ticks": 11, + "process_write_bytes": 4669440, + "database_storage_growth_bytes": 2863400, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 18, + "latency_ns": 122987679, + "cpu_ticks": 12, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 19, + "latency_ns": 122076955, + "cpu_ticks": 12, + "process_write_bytes": 4669440, + "database_storage_growth_bytes": 2863400, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 20, + "latency_ns": 146301379, + "cpu_ticks": 14, + "process_write_bytes": 4669440, + "database_storage_growth_bytes": 2863400, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 21, + "latency_ns": 129716579, + "cpu_ticks": 12, + "process_write_bytes": 4669440, + "database_storage_growth_bytes": 2863400, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 22, + "latency_ns": 121385032, + "cpu_ticks": 12, + "process_write_bytes": 4714496, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 23, + "latency_ns": 117911543, + "cpu_ticks": 12, + "process_write_bytes": 4685824, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 24, + "latency_ns": 128091392, + "cpu_ticks": 12, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 25, + "latency_ns": 126048124, + "cpu_ticks": 12, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 26, + "latency_ns": 120335764, + "cpu_ticks": 11, + "process_write_bytes": 4669440, + "database_storage_growth_bytes": 2863400, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 27, + "latency_ns": 128967001, + "cpu_ticks": 12, + "process_write_bytes": 4669440, + "database_storage_growth_bytes": 2863400, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 28, + "latency_ns": 120832199, + "cpu_ticks": 11, + "process_write_bytes": 4669440, + "database_storage_growth_bytes": 2863400, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 29, + "latency_ns": 130945026, + "cpu_ticks": 11, + "process_write_bytes": 4698112, + "database_storage_growth_bytes": 2863400, + "peak_rss_kib": 177632, + "record_count": 8 + } + ], + "latency": { + "repetitions": 30, + "min_ns": 115213612, + "p50_ns": 124390478, + "p95_ns": 130945026, + "p99_ns": 146301379, + "max_ns": 146301379, + "mean_ns": 124619497.56666666, + "sample_stddev_ns": 5976735.86738549 + }, + "cpu_ticks": 355, + "cpu_ms": 3550.0, + "process_write_bytes": 140353536, + "database_storage_growth_bytes": 86009120, + "peak_rss_kib": 177632 + }, + "replay": { + "scope": "authoritative_store_bounded_replay", + "raw_samples": [ + { + "repetition": 0, + "latency_ns": 1297919, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 175140, + "record_count": 8 + }, + { + "repetition": 1, + "latency_ns": 849432, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 175212, + "record_count": 8 + }, + { + "repetition": 2, + "latency_ns": 852061, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 176108, + "record_count": 8 + }, + { + "repetition": 3, + "latency_ns": 863202, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177464, + "record_count": 8 + }, + { + "repetition": 4, + "latency_ns": 929283, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177472, + "record_count": 8 + }, + { + "repetition": 5, + "latency_ns": 910042, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177504, + "record_count": 8 + }, + { + "repetition": 6, + "latency_ns": 810832, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177532, + "record_count": 8 + }, + { + "repetition": 7, + "latency_ns": 832912, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "record_count": 8 + }, + { + "repetition": 8, + "latency_ns": 709881, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177576, + "record_count": 8 + }, + { + "repetition": 9, + "latency_ns": 823441, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177580, + "record_count": 8 + }, + { + "repetition": 10, + "latency_ns": 868481, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177580, + "record_count": 8 + }, + { + "repetition": 11, + "latency_ns": 875823, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177580, + "record_count": 8 + }, + { + "repetition": 12, + "latency_ns": 827351, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177588, + "record_count": 8 + }, + { + "repetition": 13, + "latency_ns": 842622, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177588, + "record_count": 8 + }, + { + "repetition": 14, + "latency_ns": 836492, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177592, + "record_count": 8 + }, + { + "repetition": 15, + "latency_ns": 850032, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177604, + "record_count": 8 + }, + { + "repetition": 16, + "latency_ns": 757591, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 17, + "latency_ns": 863112, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 18, + "latency_ns": 852451, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 19, + "latency_ns": 882232, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 20, + "latency_ns": 1308639, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 21, + "latency_ns": 947284, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "record_count": 8 + }, + { + "repetition": 22, + "latency_ns": 1165066, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 23, + "latency_ns": 869821, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 24, + "latency_ns": 902712, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 25, + "latency_ns": 1027764, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 26, + "latency_ns": 846502, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 27, + "latency_ns": 850412, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 28, + "latency_ns": 821632, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + }, + { + "repetition": 29, + "latency_ns": 891151, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "record_count": 8 + } + ], + "latency": { + "repetitions": 30, + "min_ns": 709881, + "p50_ns": 852451, + "p95_ns": 1297919, + "p99_ns": 1308639, + "max_ns": 1308639, + "mean_ns": 898872.5, + "sample_stddev_ns": 135071.80253805497 + }, + "cpu_ticks": 3, + "cpu_ms": 30.0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632 + }, + "pipeline_raw_samples": [ + { + "repetition": 0, + "latency_ns": 129787697, + "cpu_ticks": 13, + "process_write_bytes": 4669440, + "database_storage_growth_bytes": 2863400, + "peak_rss_kib": 175140, + "replayed_observations": 8 + }, + { + "repetition": 1, + "latency_ns": 120023810, + "cpu_ticks": 12, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 175212, + "replayed_observations": 8 + }, + { + "repetition": 2, + "latency_ns": 124003583, + "cpu_ticks": 11, + "process_write_bytes": 4669440, + "database_storage_growth_bytes": 2863400, + "peak_rss_kib": 176108, + "replayed_observations": 8 + }, + { + "repetition": 3, + "latency_ns": 125477313, + "cpu_ticks": 13, + "process_write_bytes": 4669440, + "database_storage_growth_bytes": 2863400, + "peak_rss_kib": 177464, + "replayed_observations": 8 + }, + { + "repetition": 4, + "latency_ns": 122604502, + "cpu_ticks": 12, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177472, + "replayed_observations": 8 + }, + { + "repetition": 5, + "latency_ns": 127428517, + "cpu_ticks": 13, + "process_write_bytes": 4669440, + "database_storage_growth_bytes": 2863400, + "peak_rss_kib": 177504, + "replayed_observations": 8 + }, + { + "repetition": 6, + "latency_ns": 131383152, + "cpu_ticks": 13, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177532, + "replayed_observations": 8 + }, + { + "repetition": 7, + "latency_ns": 127308823, + "cpu_ticks": 12, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177536, + "replayed_observations": 8 + }, + { + "repetition": 8, + "latency_ns": 116114936, + "cpu_ticks": 12, + "process_write_bytes": 4669440, + "database_storage_growth_bytes": 2863400, + "peak_rss_kib": 177576, + "replayed_observations": 8 + }, + { + "repetition": 9, + "latency_ns": 121877484, + "cpu_ticks": 12, + "process_write_bytes": 4669440, + "database_storage_growth_bytes": 2863400, + "peak_rss_kib": 177580, + "replayed_observations": 8 + }, + { + "repetition": 10, + "latency_ns": 121698981, + "cpu_ticks": 10, + "process_write_bytes": 4669440, + "database_storage_growth_bytes": 2863400, + "peak_rss_kib": 177580, + "replayed_observations": 8 + }, + { + "repetition": 11, + "latency_ns": 127248266, + "cpu_ticks": 12, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177580, + "replayed_observations": 8 + }, + { + "repetition": 12, + "latency_ns": 126641067, + "cpu_ticks": 12, + "process_write_bytes": 4730880, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177588, + "replayed_observations": 8 + }, + { + "repetition": 13, + "latency_ns": 130807894, + "cpu_ticks": 12, + "process_write_bytes": 4714496, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177588, + "replayed_observations": 8 + }, + { + "repetition": 14, + "latency_ns": 116806019, + "cpu_ticks": 11, + "process_write_bytes": 4669440, + "database_storage_growth_bytes": 2863400, + "peak_rss_kib": 177592, + "replayed_observations": 8 + }, + { + "repetition": 15, + "latency_ns": 119375603, + "cpu_ticks": 13, + "process_write_bytes": 4669440, + "database_storage_growth_bytes": 2863400, + "peak_rss_kib": 177604, + "replayed_observations": 8 + }, + { + "repetition": 16, + "latency_ns": 128503108, + "cpu_ticks": 12, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 17, + "latency_ns": 125523425, + "cpu_ticks": 11, + "process_write_bytes": 4669440, + "database_storage_growth_bytes": 2863400, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 18, + "latency_ns": 124066315, + "cpu_ticks": 12, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 19, + "latency_ns": 123191640, + "cpu_ticks": 12, + "process_write_bytes": 4669440, + "database_storage_growth_bytes": 2863400, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 20, + "latency_ns": 147831350, + "cpu_ticks": 14, + "process_write_bytes": 4669440, + "database_storage_growth_bytes": 2863400, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 21, + "latency_ns": 130960926, + "cpu_ticks": 12, + "process_write_bytes": 4669440, + "database_storage_growth_bytes": 2863400, + "peak_rss_kib": 177608, + "replayed_observations": 8 + }, + { + "repetition": 22, + "latency_ns": 122761781, + "cpu_ticks": 12, + "process_write_bytes": 4714496, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 23, + "latency_ns": 119017778, + "cpu_ticks": 12, + "process_write_bytes": 4685824, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 24, + "latency_ns": 129217447, + "cpu_ticks": 12, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 25, + "latency_ns": 127384972, + "cpu_ticks": 12, + "process_write_bytes": 4677632, + "database_storage_growth_bytes": 2871640, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 26, + "latency_ns": 121419479, + "cpu_ticks": 12, + "process_write_bytes": 4669440, + "database_storage_growth_bytes": 2863400, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 27, + "latency_ns": 130037407, + "cpu_ticks": 12, + "process_write_bytes": 4669440, + "database_storage_growth_bytes": 2863400, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 28, + "latency_ns": 121842073, + "cpu_ticks": 11, + "process_write_bytes": 4669440, + "database_storage_growth_bytes": 2863400, + "peak_rss_kib": 177632, + "replayed_observations": 8 + }, + { + "repetition": 29, + "latency_ns": 132048292, + "cpu_ticks": 11, + "process_write_bytes": 4698112, + "database_storage_growth_bytes": 2863400, + "peak_rss_kib": 177632, + "replayed_observations": 8 + } + ], + "pipeline_latency": { + "repetitions": 30, + "min_ns": 116114936, + "p50_ns": 125477313, + "p95_ns": 132048292, + "p99_ns": 147831350, + "max_ns": 147831350, + "mean_ns": 125746454.66666667, + "sample_stddev_ns": 6061055.651752579 + }, + "pipeline_records_per_second": 63.620083931644, + "pipeline_cpu_ticks": 360, + "pipeline_cpu_ms": 3600.0, + "pipeline_process_write_bytes": 140353536, + "pipeline_database_storage_growth_bytes": 86009120, + "peak_rss_kib": 177632, + "no_op_raw_samples": [ + { + "repetition": 0, + "latency_ns": 4102778, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 175140, + "replayed_observations": 0 + }, + { + "repetition": 1, + "latency_ns": 2769709, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 175212, + "replayed_observations": 0 + }, + { + "repetition": 2, + "latency_ns": 2933251, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 176108, + "replayed_observations": 0 + }, + { + "repetition": 3, + "latency_ns": 2959671, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177464, + "replayed_observations": 0 + }, + { + "repetition": 4, + "latency_ns": 3003482, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177472, + "replayed_observations": 0 + }, + { + "repetition": 5, + "latency_ns": 3131744, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177504, + "replayed_observations": 0 + }, + { + "repetition": 6, + "latency_ns": 2872210, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177532, + "replayed_observations": 0 + }, + { + "repetition": 7, + "latency_ns": 3069573, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177536, + "replayed_observations": 0 + }, + { + "repetition": 8, + "latency_ns": 2778698, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177576, + "replayed_observations": 0 + }, + { + "repetition": 9, + "latency_ns": 2887600, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177580, + "replayed_observations": 0 + }, + { + "repetition": 10, + "latency_ns": 2750548, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177580, + "replayed_observations": 0 + }, + { + "repetition": 11, + "latency_ns": 2962711, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177580, + "replayed_observations": 0 + }, + { + "repetition": 12, + "latency_ns": 2958972, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177588, + "replayed_observations": 0 + }, + { + "repetition": 13, + "latency_ns": 3004122, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177588, + "replayed_observations": 0 + }, + { + "repetition": 14, + "latency_ns": 2814599, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177592, + "replayed_observations": 0 + }, + { + "repetition": 15, + "latency_ns": 2736258, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177604, + "replayed_observations": 0 + }, + { + "repetition": 16, + "latency_ns": 2808608, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 17, + "latency_ns": 3018092, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 18, + "latency_ns": 2984811, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 19, + "latency_ns": 3059552, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 20, + "latency_ns": 3172334, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 21, + "latency_ns": 4402861, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177608, + "replayed_observations": 0 + }, + { + "repetition": 22, + "latency_ns": 3011141, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 23, + "latency_ns": 3044662, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 24, + "latency_ns": 3065313, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 25, + "latency_ns": 4282889, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 26, + "latency_ns": 2878461, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 27, + "latency_ns": 3097043, + "cpu_ticks": 0, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 28, + "latency_ns": 2717588, + "cpu_ticks": 1, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + }, + { + "repetition": 29, + "latency_ns": 3112254, + "cpu_ticks": 2, + "process_write_bytes": 0, + "database_storage_growth_bytes": 0, + "peak_rss_kib": 177632, + "replayed_observations": 0 + } + ], + "no_op_latency": { + "repetitions": 30, + "min_ns": 2717588, + "p50_ns": 2984811, + "p95_ns": 4282889, + "p99_ns": 4402861, + "max_ns": 4402861, + "mean_ns": 3079717.8333333335, + "sample_stddev_ns": 421866.7017571475 + }, + "no_op_cpu_ticks": 11, + "no_op_cpu_ms": 110.0, + "no_op_process_write_bytes": 0, + "no_op_database_storage_growth_bytes": 0, + "no_op_observation_count_delta": 0 + } + ] + }, + "hook_telemetry_readiness": { + "artifact_kind": "readiness_and_fixture_identity_not_runtime_contract", + "canonical_contract": { + "aggregation_dimensions": { + "disposition_class": [ + "application", + "transport", + "timeout", + "cancellation", + "unknown" + ], + "disposition_status": [ + "supported", + "degraded", + "unavailable", + "unknown", + "backpressured", + "accepted_for_replay", + "committed", + "exact_duplicate" + ], + "excluded_untrusted_dimensions": [ + "hook_name", + "disposition.reason_code" + ], + "host": [ + "claude", + "codex", + "cursor", + "hermes", + "kiro", + "other" + ], + "retryable": [ + true, + false, + null + ] + }, + "latency_semantics": { + "daemon_processing_duration": { + "blocker": "hook_completed_does_not_emit_daemon_processing_duration", + "status": "unavailable" + }, + "hook_wall_time": { + "fields": [ + "hook_wall_time_us", + "hook_wall_time_ms" + ], + "role": "host_measured_hook_span" + }, + "host_ipc_rtt": { + "aliases": [ + "daemon_rtt" + ], + "event_field": "daemon_rtt_us", + "role": "true_host_ipc_rtt" + } + }, + "metrics": { + "daemon_rtt": [ + "daemon_rtt_us", + "daemon_call_count" + ], + "disposition": [ + "disposition.status", + "disposition.retryable", + "disposition.reason_code", + "disposition.class" + ], + "hook_wall_time": [ + "hook_wall_time_us", + "hook_wall_time_ms" + ], + "payload_bytes": [ + "payload_bytes", + "daemon_ipc_payload_bytes" + ], + "timeout": [ + "timeout.budget_ms", + "timeout.timed_out" + ] + }, + "provider_coverage": [ + { + "host": "claude", + "status": "instrumented" + }, + { + "host": "codex", + "status": "instrumented" + }, + { + "host": "cursor", + "status": "instrumented" + }, + { + "host": "hermes", + "status": "partial" + }, + { + "host": "kiro", + "status": "instrumented" + } + ], + "schema_version": 1 + }, + "host_fixture_measurements": [ + { + "host": "claude", + "fixture_path": "tests/fixtures/host_events/claude/baseline.json", + "fixture_sha256": "6bb06840fe1e2716f66c02a58220c2c1a122b387cdc97af987a0b4d4427124e7", + "canonical_request_payload_bytes": [ + 142, + 142, + 142, + 142 + ], + "disposition_vocabulary": [ + "supported", + "degraded", + "unavailable", + "unknown" + ] + }, + { + "host": "codex", + "fixture_path": "tests/fixtures/host_events/codex/baseline.json", + "fixture_sha256": "1095677d360835fcfbaa8da978aebe57fadaf49d257a85b0e0b8779f8a765ef7", + "canonical_request_payload_bytes": [ + 104, + 104, + 104, + 104 + ], + "disposition_vocabulary": [ + "supported", + "degraded", + "unavailable", + "unknown" + ] + }, + { + "host": "cursor", + "fixture_path": "tests/fixtures/host_events/cursor/baseline.json", + "fixture_sha256": "e80d6a498ccb300aaee76717f24bdd843722fda037156a980c44ebf43b67370f", + "canonical_request_payload_bytes": [ + 104, + 104, + 104, + 104 + ], + "disposition_vocabulary": [ + "supported", + "degraded", + "unavailable", + "unknown" + ] + }, + { + "host": "hermes", + "fixture_path": "tests/fixtures/host_events/hermes/baseline.json", + "fixture_sha256": "911c9ca516ccdb8320b137bececd38c0826eafdd3a369ac8939d5359241bb49c", + "canonical_request_payload_bytes": [ + 236, + 236, + 236, + 236 + ], + "disposition_vocabulary": [ + "supported", + "degraded", + "unavailable", + "unknown" + ] + }, + { + "host": "kiro", + "fixture_path": "tests/fixtures/host_events/kiro/baseline.json", + "fixture_sha256": "efaab57d6d9efc0bda7a7ed8a57d236599409d5abf9c2eed405cd7725b5882bc", + "canonical_request_payload_bytes": [ + 118, + 118, + 118, + 118 + ], + "disposition_vocabulary": [ + "supported", + "degraded", + "unavailable", + "unknown" + ] + } + ], + "cursor_catch_up_ingest_max_bytes": 2097152, + "readiness_distributions": { + "schema_version": 1, + "source_event": "hook_completed", + "collection_status": "no_samples", + "input_rows_received": 0, + "input_rows_processed": 0, + "input_rows_dropped_at_cap": 0, + "events_considered": 0, + "events_skipped_non_completed": 0, + "hook_wall_time_distribution": [], + "host_ipc_rtt_distribution": [], + "payload_bytes_distribution": [], + "timeout_outcomes_by_host": [], + "disposition_counts_by_host": [], + "unavailable_metrics": [ + { + "metric": "daemon_processing_duration_distribution", + "status": "unavailable", + "blocker": "hook_completed_does_not_emit_daemon_processing_duration" + } + ], + "bounds": { + "max_input_rows": 10000, + "host_buckets": 6, + "max_disposition_series": 720, + "latency_buckets": 13, + "bytes_buckets": 8 + }, + "rows_folded_to_other_host": 0, + "disposition_values_folded_to_unknown": 0 + }, + "unavailable_measurements": [ + { + "metric": "daemon_processing_duration_distribution", + "status": "unavailable", + "required_collection_step": "hook_completed emits host-measured daemon_rtt_us (TRUE host IPC RTT) only; daemon-internal processing duration is not present on the event contract" + } + ] + }, + "stale_reason": "workload identity no longer matches the live harness: benchmark sources changed after acceptance and the pr5-observation surfaces were renamed to the claude-observation capability", + "superseded_by_workload_schema_version": 3 +} \ No newline at end of file diff --git a/benchmark_data/claude-observation/workload-v1.json b/benchmark_data/claude-observation/workload-v1.json new file mode 100644 index 0000000000..3222ebd1e9 --- /dev/null +++ b/benchmark_data/claude-observation/workload-v1.json @@ -0,0 +1,657 @@ +{ + "schema_version": 3, + "workload_id": "claude-observation-pipeline-v1", + "implementation": "src/sessions/claude_observation_benchmark.rs", + "platform": { + "operating_system": "linux", + "procfs_mount": "/proc", + "required_interfaces": [ + "self/stat", + "self/io", + "self/status", + "self/clear_refs", + "meminfo", + "cpuinfo" + ], + "clear_refs_value": 5 + }, + "profile": "release", + "repetitions": { + "warmup": 3, + "measured": 30, + "records_per_repetition": 64, + "concurrency": 1 + }, + "input": { + "providers": [ + "claude", + "codex", + "cursor", + "hermes", + "kiro", + "cline", + "roo-code", + "kilo" + ], + "scopes": [ + "profile", + "project" + ], + "formats": [ + "jsonl", + "json_snapshot", + "sqlite" + ], + "unique_ids": true, + "secret_shaped_field_per_record": true + }, + "provider_baselines": [ + { + "provider": "claude", + "fixture": { + "format": "checked_in_native_bounded_copy_v1", + "source_paths": [ + "tests/fixtures/provider_normalization/claude/assistant_tool_use.input.json" + ], + "session_id": "benchmark-claude-session", + "message_id": "benchmark-claude-message-0", + "redacted_secret": "[TraceDecay redacted: fixture]" + }, + "checks": [ + "parse", + "normalize", + "sanitize", + "commit", + "replay", + "duplicate_noop", + "projection", + "backlog", + "fairness", + "peak_resource" + ], + "bounds": { + "records_per_repetition": 8, + "replay_limit": 9, + "max_backlog_records": 8, + "fair_rotation_providers": 8, + "peak_resource_fields": [ + "cpu_ticks", + "process_write_bytes", + "database_storage_growth_bytes", + "peak_rss_kib" + ] + }, + "measurement": { + "harness_path": "claude_production_observation_pipeline_v1", + "harness_measures_performance": true, + "result_schema": "provider-observation-performance-result-v1", + "required_metrics": [ + "parse_latency_p50_p95_p99", + "commit_latency_p50_p95_p99", + "replay_latency_p50_p95_p99", + "pipeline_latency_p50_p95_p99", + "pipeline_records_per_second", + "pipeline_cpu", + "pipeline_process_write_bytes", + "database_storage_growth_bytes", + "peak_rss_kib", + "no_op_replay_latency_p50_p95_p99", + "no_op_observation_count_delta", + "bounded_replay_backlog_records" + ] + } + }, + { + "provider": "codex", + "fixture": { + "format": "checked_in_native_bounded_copy_v1", + "source_paths": [ + "tests/fixtures/provider_normalization/codex/session_meta.input.json", + "tests/fixtures/provider_normalization/codex/agent_message.input.json" + ], + "session_id": "benchmark-codex-session", + "message_id": "benchmark-codex-message-0", + "redacted_secret": "[TraceDecay redacted: fixture]" + }, + "checks": [ + "parse", + "normalize", + "sanitize", + "commit", + "replay", + "duplicate_noop", + "projection", + "backlog", + "fairness", + "peak_resource" + ], + "bounds": { + "records_per_repetition": 8, + "replay_limit": 9, + "max_backlog_records": 8, + "fair_rotation_providers": 8, + "peak_resource_fields": [ + "cpu_ticks", + "process_write_bytes", + "database_storage_growth_bytes", + "peak_rss_kib" + ] + }, + "measurement": { + "harness_path": "codex_production_observation_pipeline_v1", + "harness_measures_performance": true, + "result_schema": "provider-observation-performance-result-v1", + "required_metrics": [ + "parse_latency_p50_p95_p99", + "commit_latency_p50_p95_p99", + "replay_latency_p50_p95_p99", + "pipeline_latency_p50_p95_p99", + "pipeline_records_per_second", + "pipeline_cpu", + "pipeline_process_write_bytes", + "database_storage_growth_bytes", + "peak_rss_kib", + "no_op_replay_latency_p50_p95_p99", + "no_op_observation_count_delta", + "bounded_replay_backlog_records" + ] + } + }, + { + "provider": "cursor", + "fixture": { + "format": "checked_in_native_bounded_copy_v1", + "source_paths": [ + "tests/fixtures/provider_normalization/cursor/tool_use.input.json" + ], + "session_id": "benchmark-cursor-session", + "message_id": "benchmark-cursor-message-0", + "redacted_secret": "[TraceDecay redacted: fixture]" + }, + "checks": [ + "parse", + "normalize", + "sanitize", + "commit", + "replay", + "duplicate_noop", + "projection", + "backlog", + "fairness", + "peak_resource" + ], + "bounds": { + "records_per_repetition": 8, + "replay_limit": 9, + "max_backlog_records": 8, + "fair_rotation_providers": 8, + "peak_resource_fields": [ + "cpu_ticks", + "process_write_bytes", + "database_storage_growth_bytes", + "peak_rss_kib" + ] + }, + "measurement": { + "harness_path": "cursor_production_observation_pipeline_v1", + "harness_measures_performance": true, + "result_schema": "provider-observation-performance-result-v1", + "required_metrics": [ + "parse_latency_p50_p95_p99", + "commit_latency_p50_p95_p99", + "replay_latency_p50_p95_p99", + "pipeline_latency_p50_p95_p99", + "pipeline_records_per_second", + "pipeline_cpu", + "pipeline_process_write_bytes", + "database_storage_growth_bytes", + "peak_rss_kib", + "no_op_replay_latency_p50_p95_p99", + "no_op_observation_count_delta", + "bounded_replay_backlog_records" + ] + } + }, + { + "provider": "hermes", + "fixture": { + "format": "checked_in_native_bounded_copy_v1", + "source_paths": [ + "tests/fixtures/provider_normalization/hermes/assistant_tool_call.input.json" + ], + "session_id": "benchmark-hermes-session", + "message_id": "benchmark-hermes-message-0", + "redacted_secret": "[TraceDecay redacted: fixture]" + }, + "checks": [ + "parse", + "normalize", + "sanitize", + "commit", + "replay", + "duplicate_noop", + "projection", + "backlog", + "fairness", + "peak_resource" + ], + "bounds": { + "records_per_repetition": 8, + "replay_limit": 9, + "max_backlog_records": 8, + "fair_rotation_providers": 8, + "peak_resource_fields": [ + "cpu_ticks", + "process_write_bytes", + "database_storage_growth_bytes", + "peak_rss_kib" + ] + }, + "measurement": { + "harness_path": "hermes_production_observation_pipeline_v1", + "harness_measures_performance": true, + "result_schema": "provider-observation-performance-result-v1", + "required_metrics": [ + "parse_latency_p50_p95_p99", + "commit_latency_p50_p95_p99", + "replay_latency_p50_p95_p99", + "pipeline_latency_p50_p95_p99", + "pipeline_records_per_second", + "pipeline_cpu", + "pipeline_process_write_bytes", + "database_storage_growth_bytes", + "peak_rss_kib", + "no_op_replay_latency_p50_p95_p99", + "no_op_observation_count_delta", + "bounded_replay_backlog_records" + ] + } + }, + { + "provider": "kiro", + "fixture": { + "format": "checked_in_native_bounded_copy_v1", + "source_paths": [ + "tests/fixtures/provider_normalization/kiro/workspace_session.input.json" + ], + "session_id": "benchmark-kiro-session", + "message_id": "benchmark-kiro-message-0", + "redacted_secret": "[TraceDecay redacted: fixture]" + }, + "checks": [ + "parse", + "normalize", + "sanitize", + "commit", + "replay", + "duplicate_noop", + "projection", + "backlog", + "fairness", + "peak_resource" + ], + "bounds": { + "records_per_repetition": 8, + "replay_limit": 9, + "max_backlog_records": 8, + "fair_rotation_providers": 8, + "peak_resource_fields": [ + "cpu_ticks", + "process_write_bytes", + "database_storage_growth_bytes", + "peak_rss_kib" + ] + }, + "measurement": { + "harness_path": "kiro_production_observation_pipeline_v1", + "harness_measures_performance": true, + "result_schema": "provider-observation-performance-result-v1", + "required_metrics": [ + "parse_latency_p50_p95_p99", + "commit_latency_p50_p95_p99", + "replay_latency_p50_p95_p99", + "pipeline_latency_p50_p95_p99", + "pipeline_records_per_second", + "pipeline_cpu", + "pipeline_process_write_bytes", + "database_storage_growth_bytes", + "peak_rss_kib", + "no_op_replay_latency_p50_p95_p99", + "no_op_observation_count_delta", + "bounded_replay_backlog_records" + ] + } + }, + { + "provider": "cline", + "fixture": { + "format": "checked_in_native_bounded_copy_v1", + "source_paths": [ + "tests/fixtures/transcript_golden/cline_like/input/api_conversation_history.json", + "tests/fixtures/transcript_golden/cline_like/input/task_metadata.json" + ], + "session_id": "benchmark-cline-session", + "message_id": "benchmark-cline-message-0", + "redacted_secret": "[TraceDecay redacted: fixture]" + }, + "checks": [ + "parse", + "normalize", + "sanitize", + "commit", + "replay", + "duplicate_noop", + "projection", + "backlog", + "fairness", + "peak_resource" + ], + "bounds": { + "records_per_repetition": 8, + "replay_limit": 9, + "max_backlog_records": 8, + "fair_rotation_providers": 8, + "peak_resource_fields": [ + "cpu_ticks", + "process_write_bytes", + "database_storage_growth_bytes", + "peak_rss_kib" + ] + }, + "measurement": { + "harness_path": "cline_production_observation_pipeline_v1", + "harness_measures_performance": true, + "result_schema": "provider-observation-performance-result-v1", + "required_metrics": [ + "parse_latency_p50_p95_p99", + "commit_latency_p50_p95_p99", + "replay_latency_p50_p95_p99", + "pipeline_latency_p50_p95_p99", + "pipeline_records_per_second", + "pipeline_cpu", + "pipeline_process_write_bytes", + "database_storage_growth_bytes", + "peak_rss_kib", + "no_op_replay_latency_p50_p95_p99", + "no_op_observation_count_delta", + "bounded_replay_backlog_records" + ] + } + }, + { + "provider": "roo-code", + "fixture": { + "format": "checked_in_native_bounded_copy_v1", + "source_paths": [ + "tests/fixtures/transcript_golden/cline_like/input/api_conversation_history.json", + "tests/fixtures/transcript_golden/cline_like/input/task_metadata.json" + ], + "session_id": "benchmark-roo-code-session", + "message_id": "benchmark-roo-code-message-0", + "redacted_secret": "[TraceDecay redacted: fixture]" + }, + "checks": [ + "parse", + "normalize", + "sanitize", + "commit", + "replay", + "duplicate_noop", + "projection", + "backlog", + "fairness", + "peak_resource" + ], + "bounds": { + "records_per_repetition": 8, + "replay_limit": 9, + "max_backlog_records": 8, + "fair_rotation_providers": 8, + "peak_resource_fields": [ + "cpu_ticks", + "process_write_bytes", + "database_storage_growth_bytes", + "peak_rss_kib" + ] + }, + "measurement": { + "harness_path": "roo-code_production_observation_pipeline_v1", + "harness_measures_performance": true, + "result_schema": "provider-observation-performance-result-v1", + "required_metrics": [ + "parse_latency_p50_p95_p99", + "commit_latency_p50_p95_p99", + "replay_latency_p50_p95_p99", + "pipeline_latency_p50_p95_p99", + "pipeline_records_per_second", + "pipeline_cpu", + "pipeline_process_write_bytes", + "database_storage_growth_bytes", + "peak_rss_kib", + "no_op_replay_latency_p50_p95_p99", + "no_op_observation_count_delta", + "bounded_replay_backlog_records" + ] + } + }, + { + "provider": "kilo", + "fixture": { + "format": "checked_in_native_bounded_copy_v1", + "source_paths": [ + "tests/fixtures/transcript_golden/cline_like/input/api_conversation_history.json", + "tests/fixtures/transcript_golden/cline_like/input/task_metadata.json" + ], + "session_id": "benchmark-kilo-session", + "message_id": "benchmark-kilo-message-0", + "redacted_secret": "[TraceDecay redacted: fixture]" + }, + "checks": [ + "parse", + "normalize", + "sanitize", + "commit", + "replay", + "duplicate_noop", + "projection", + "backlog", + "fairness", + "peak_resource" + ], + "bounds": { + "records_per_repetition": 8, + "replay_limit": 9, + "max_backlog_records": 8, + "fair_rotation_providers": 8, + "peak_resource_fields": [ + "cpu_ticks", + "process_write_bytes", + "database_storage_growth_bytes", + "peak_rss_kib" + ] + }, + "measurement": { + "harness_path": "kilo_production_observation_pipeline_v1", + "harness_measures_performance": true, + "result_schema": "provider-observation-performance-result-v1", + "required_metrics": [ + "parse_latency_p50_p95_p99", + "commit_latency_p50_p95_p99", + "replay_latency_p50_p95_p99", + "pipeline_latency_p50_p95_p99", + "pipeline_records_per_second", + "pipeline_cpu", + "pipeline_process_write_bytes", + "database_storage_growth_bytes", + "peak_rss_kib", + "no_op_replay_latency_p50_p95_p99", + "no_op_observation_count_delta", + "bounded_replay_backlog_records" + ] + } + } + ], + "provider_result": { + "schema_version": 1, + "artifact_id": "provider-observation-performance-result-v1", + "result_field": "provider_observation_performance", + "required_provider_count": 8, + "records_per_repetition": 8, + "pipeline_scope": "production_parse_normalize_sanitize_commit_project_and_replay", + "required_phase_scopes": { + "parse": "native_provider_format_decode", + "commit": "production_adapter_parse_normalize_sanitize_commit_and_project", + "replay": "authoritative_store_bounded_replay" + }, + "required_distributions": [ + "parse.latency", + "commit.latency", + "replay.latency", + "pipeline_latency", + "no_op_latency" + ], + "required_resources": [ + "cpu_ticks", + "process_write_bytes", + "database_storage_growth_bytes", + "peak_rss_kib" + ], + "required_backlog_fields": [ + "replay_limit", + "max_backlog_records" + ], + "required_fairness_fields": [ + "policy", + "rounds", + "providers_per_round", + "max_provider_turn_distance", + "turns" + ], + "required_no_op_observation_count_delta": 0 + }, + "hook_telemetry_readiness": { + "artifact_id": "hook-telemetry-baseline-readiness-v1", + "artifact_kind": "readiness_and_fixture_identity_not_runtime_contract", + "result_field": "hook_telemetry_readiness", + "direct_fixture_paths": [ + "tests/fixtures/host_events/claude/baseline.json", + "tests/fixtures/host_events/codex/baseline.json", + "tests/fixtures/host_events/cursor/baseline.json", + "tests/fixtures/host_events/hermes/baseline.json", + "tests/fixtures/host_events/kiro/baseline.json" + ], + "fixture_identity_method": "sha256_recorded_in_runtime_readiness_catalog", + "canonical_payload_method": "crate_hooks_measure_host_event_payload_bytes", + "canonical_telemetry_contract": "crate_hooks_host_hook_telemetry_contract" + }, + "phases": [ + "scan_complete_transcript", + "parse_records", + "sanitize_records", + "atomic_authoritative_commit", + "drain_projection_and_v1_fold", + "bounded_replay_with_overproduction_sentinel" + ], + "setup_excluded": [ + "temporary_directory_creation", + "input_generation", + "database_open_and_schema_initialization" + ], + "verification_excluded": [ + "authoritative_payload_redaction_assertions", + "folded_v1_projection_assertions" + ], + "no_op": { + "operation": "repeat_ingest_and_bounded_replay_at_durable_end_cursor", + "required_observation_count_delta": 0, + "require_zero_coordinator_work": true, + "require_zero_process_write_bytes": true, + "require_zero_database_storage_growth": true + }, + "metrics": { + "latency": { + "source": "monotonic_clock", + "unit": "nanoseconds", + "percentiles": [ + 50, + 95, + 99 + ], + "percentile_method": "nearest_rank", + "dispersion": "sample_stddev" + }, + "throughput": { + "unit": "records_per_second", + "numerator": "committed_and_replayed_input_records", + "denominator": "summed_pipeline_latency" + }, + "provider_pipeline_scope": { + "measured": "production_parse_normalize_sanitize_commit_project_and_replay", + "separate_phase_distributions": { + "parse": "native_provider_format_decode", + "commit": "production_adapter_parse_normalize_sanitize_commit_and_project", + "replay": "authoritative_store_bounded_replay" + } + }, + "cpu": { + "source": "proc_self_stat_user_plus_system", + "clock_ticks_per_second": "getconf_clk_tck", + "reported_units": [ + "ticks", + "milliseconds" + ] + }, + "peak_memory": { + "source": "proc_self_status_vmhwm", + "reset": "proc_self_clear_refs_5", + "unit": "kibibytes" + }, + "bytes_written": { + "source": "proc_self_io", + "field": "write_bytes", + "unit": "bytes" + }, + "database_storage_growth": { + "files": [ + "database", + "wal", + "shm" + ], + "method": "summed_file_length_growth", + "unit": "bytes" + }, + "raw_samples": { + "phases": [ + "pipeline", + "no_op_replay" + ], + "fields": [ + "repetition", + "latency_ns", + "cpu_ticks", + "process_write_bytes", + "database_storage_growth_bytes", + "peak_rss_kib", + "replayed_observations" + ] + }, + "provider_phase_raw_samples": { + "phases": [ + "parse", + "commit", + "replay" + ], + "fields": [ + "repetition", + "latency_ns", + "cpu_ticks", + "process_write_bytes", + "database_storage_growth_bytes", + "peak_rss_kib", + "record_count" + ] + } + }, + "command": "cargo test --quiet --release --lib claude_observation_benchmark::production_observation_pipeline_baseline -- --ignored --exact --nocapture --test-threads=1", + "evidence_runner": "scripts/run-claude-observation-benchmark.sh" +} diff --git a/benchmark_data/pr11-application-boundary/README.md b/benchmark_data/pr11-application-boundary/README.md new file mode 100644 index 0000000000..3dde47f7b9 --- /dev/null +++ b/benchmark_data/pr11-application-boundary/README.md @@ -0,0 +1,28 @@ +# PR11 application-boundary compile measurement + +> **Historical evidence only.** Preserve the measurement provenance in this +> directory. Current requirements come only from the +> `docs/plans/tracedecay-v2/` hierarchy; exact commands, timings, snapshots, +> receipts, attestations, PR packets, and gate fields below are not rebuild +> instructions. Validate current application-boundary behavior directly. + +`compile-baseline.json` pins the application-owner compile command and the +allowed authority boundary. Its timing is explicitly labeled as a historical +measurement, not a CI budget. + +Validate the legacy measurement fixture without building: + +```sh +python3 benchmark_data/pr11-application-boundary/validate_compile_baseline.py \ + benchmark_data/pr11-application-boundary/compile-baseline.json +``` + +To produce a reviewable candidate measurement without modifying the golden: + +```sh +python3 benchmark_data/pr11-application-boundary/validate_compile_baseline.py \ + benchmark_data/pr11-application-boundary/compile-baseline.json --run +``` + +Normal all-feature workspace checks and direct boundary tests determine product +completion; this measurement creates no release gate or acceptance artifact. diff --git a/benchmark_data/pr11-application-boundary/compile-baseline.json b/benchmark_data/pr11-application-boundary/compile-baseline.json new file mode 100644 index 0000000000..43f9c43674 --- /dev/null +++ b/benchmark_data/pr11-application-boundary/compile-baseline.json @@ -0,0 +1,13 @@ +{ + "schema_version": 1, + "workload_id": "pr11-application-boundary-compile-v1", + "packages": ["tracedecay-application"], + "command": ["cargo", "check", "-p", "tracedecay-application"], + "measurement": { + "status": "measured", + "elapsed_ms": 22938, + "recorded_at": "2026-07-21T08:32:20Z", + "note": "Historical local measurement; it is not a CI budget or a substitute for the all-feature acceptance gate." + }, + "assertion": "The application boundary remains free of transport, store, and model-runtime authority edges." +} diff --git a/benchmark_data/pr11-application-boundary/validate_compile_baseline.py b/benchmark_data/pr11-application-boundary/validate_compile_baseline.py new file mode 100755 index 0000000000..7989fcd80f --- /dev/null +++ b/benchmark_data/pr11-application-boundary/validate_compile_baseline.py @@ -0,0 +1,105 @@ +#!/usr/bin/env python3 +"""Validate or explicitly remeasure a PR11-PR13 compile-contract baseline. + +Validation is side-effect free. ``--run`` executes the declared argv and +prints a candidate measurement; it never rewrites a checked-in baseline. +""" + +from __future__ import annotations + +import argparse +import json +import subprocess +import sys +import time +from datetime import UTC, datetime +from pathlib import Path +from typing import Any, NoReturn, cast + + +VALID_STATUSES = {"measured", "placeholder", "unavailable"} + + +def fail(message: str) -> NoReturn: + raise SystemExit(f"invalid compile baseline: {message}") + + +def load_baseline(path: Path) -> dict[str, Any]: + try: + value = json.loads(path.read_text(encoding="utf-8")) + except (OSError, json.JSONDecodeError) as error: + fail(f"cannot load {path}: {error}") + if not isinstance(value, dict): + fail("root must be an object") + return cast(dict[str, Any], value) + + +def validate(value: dict[str, Any]) -> tuple[list[str], dict[str, Any]]: + if value.get("schema_version") != 1: + fail("schema_version must be 1") + if not isinstance(value.get("workload_id"), str) or not value["workload_id"]: + fail("workload_id must be a non-empty string") + packages = value.get("packages") + if not isinstance(packages, list) or not packages or not all( + isinstance(package, str) and package for package in packages + ): + fail("packages must be a non-empty array of names") + command = value.get("command") + if not isinstance(command, list) or not command or not all( + isinstance(argument, str) and argument for argument in command + ): + fail("command must be a non-empty argv array") + if command[0] != "cargo": + fail("command must start with cargo") + measurement = value.get("measurement") + if not isinstance(measurement, dict): + fail("measurement must be an object") + status = measurement.get("status") + if status not in VALID_STATUSES: + fail(f"measurement.status must be one of {sorted(VALID_STATUSES)}") + elapsed_ms = measurement.get("elapsed_ms") + if status == "measured": + if not isinstance(elapsed_ms, int) or elapsed_ms <= 0: + fail("measured baselines require a positive integer elapsed_ms") + if not isinstance(measurement.get("recorded_at"), str): + fail("measured baselines require recorded_at") + elif elapsed_ms is not None: + fail("placeholder or unavailable baselines must use elapsed_ms: null") + return cast(list[str], command), cast(dict[str, Any], measurement) + + +def main() -> int: + parser = argparse.ArgumentParser() + parser.add_argument("baseline", type=Path) + parser.add_argument( + "--run", + action="store_true", + help="execute the declared command and print, but do not persist, a candidate measurement", + ) + args = parser.parse_args() + + command, measurement = validate(load_baseline(args.baseline)) + if not args.run: + print( + f"valid {args.baseline}: status={measurement['status']} command={' '.join(command)}" + ) + return 0 + + repository = Path(__file__).resolve().parents[2] + started = time.perf_counter_ns() + completed = subprocess.run(command, cwd=repository, check=False) + elapsed_ms = (time.perf_counter_ns() - started) // 1_000_000 + candidate = { + "measurement": { + "status": "measured" if completed.returncode == 0 else "unavailable", + "elapsed_ms": elapsed_ms if completed.returncode == 0 else None, + "recorded_at": datetime.now(UTC).replace(microsecond=0).isoformat(), + "exit_code": completed.returncode, + } + } + print(json.dumps(candidate, indent=2, sort_keys=True)) + return completed.returncode + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/benchmark_data/queries/default.toml b/benchmark_data/queries/default.toml new file mode 100644 index 0000000000..4da35b64d0 --- /dev/null +++ b/benchmark_data/queries/default.toml @@ -0,0 +1,41 @@ +# Default benchmark queries for `tracedecay bench`. +# +# Each query simulates an agent asking for context on a real task. The harness +# runs the query through `cg.build_context(...)`, measures the bytes returned, +# and compares to a baseline that reads the full content of every file +# referenced by the resulting context. The ratio is the retrieval savings. +# +# These queries are intentionally generic — they target patterns present in +# most application codebases (CLIs, daemons, services) rather than this repo +# specifically. For tighter recall numbers on a specific project, write your +# own query file and pass it via `tracedecay bench --queries `. + +[[query]] +task = "How is configuration loaded at startup?" + +[[query]] +task = "Where are command-line arguments parsed and dispatched?" + +[[query]] +task = "How is the main entry point organized?" + +[[query]] +task = "How are errors defined, wrapped, and propagated?" + +[[query]] +task = "Where is logging or diagnostic output emitted?" + +[[query]] +task = "How are tests organized and what test harness is used?" + +[[query]] +task = "How is data persisted to disk or to a database?" + +[[query]] +task = "How are async tasks or background work spawned?" + +[[query]] +task = "How does the build wire up dependencies and initialize state?" + +[[query]] +task = "How are public API surfaces exposed (HTTP endpoints, library exports, or CLI commands)?" diff --git a/benchmark_data/query-code-index/README.md b/benchmark_data/query-code-index/README.md new file mode 100644 index 0000000000..c98e49707c --- /dev/null +++ b/benchmark_data/query-code-index/README.md @@ -0,0 +1,68 @@ +# query code-index measurement packet + +> **Historical evidence only.** Preserve the workload and measurement +> provenance in this directory. Current requirements come only from the +> `docs/plans/tracedecay-v2/` hierarchy; exact commands, counts, snapshots, +> receipts, attestations, PR packets, and gate fields below are not rebuild +> instructions. Validate current indexing behavior directly. + +This packet measures the deterministic Plan 25 extraction, chunking, +incremental-manifest, and in-memory projection-receipt path. It does not invoke +semantic inference, tune retrieval, or define PR20 resource budgets. + +Run the contract check with: + +```text +cargo bench --bench code_index_chunks -- --validate-only +``` + +Capture the full baseline with: + +```text +cargo bench --bench code_index_chunks -- --run +``` + +The default result is `result-provisional.json`. Every current/10x and case +combination runs in a fresh child process for 5 untimed warmups and 30 measured +repetitions. All measured samples are retained. The child initializes the +language registry and any prior generation before resetting Linux `VmHWM` and +starting the sample clock. + +The six cases are clean, warm one-file edit, deletion, no-op, chunker-key +replay, and incompatible full rebuild. The chunker-key replay retains +extraction evidence but truthfully reports every file reparsed by the current +chunker implementation. Projection is an in-memory receipt sink; no model or +store adapter participates. + +Metrics: + +- event-to-ready and wall time: the same `std::time::Instant` interval from + immediate closed-loop event admission through projection receipt readiness; +- queue delay: zero because this bounded harness has no scheduler queue and + executes one event synchronously; +- CPU: `/proc/self/stat` user+system ticks converted with `getconf CLK_TCK`; +- peak RSS: `/proc/self/status` `VmHWM` after `/proc/self/clear_refs`; +- process read/write bytes: `/proc/self/io`; +- input/output bytes and parsed/reused/changed/deleted chunks: deterministic + harness counters checked against `expected-v1.json`; +- changed ranges: one for the append-only warm edit and zero when no + Tree-sitter source edit exists; +- invalidated chunks: deleted prior chunks plus changed chunks that name a + prior digest; +- embedding batches/chunks: `null` because this query lexical benchmark + deliberately does not invoke semantic inference; it never reports invented + zero work for an unmounted semantic capability; +- process read/write amplification: observed `/proc/self/io` bytes divided by + admitted input/output bytes, or `null` when the denominator is zero; +- invalidation and projection amplification: invalidated chunks or projection + operations per changed range, reported as `null` when there is no source + changed range; +- full-rebuild reason: `chunker_incompatible` only for the incompatible case; + clean startup remains `no_prior_generation`, not a disguised rebuild. + +`workload-v1.json` pins source files, exact current/10x files/bytes/chunks, +content and language-descriptor digests, cache state, seed, command, platform, +clock, RSS, I/O, and runtime-manifest methods. The result captures the concrete +toolchain, kernel, CPU model, logical CPU count, and memory size. Page-cache +state is reported as uncontrolled, so this artifact is a provisional baseline, +not a promotion threshold. diff --git a/benchmark_data/query-code-index/expected-v1.json b/benchmark_data/query-code-index/expected-v1.json new file mode 100644 index 0000000000..22ad57dcf7 --- /dev/null +++ b/benchmark_data/query-code-index/expected-v1.json @@ -0,0 +1,184 @@ +{ + "schema_version": 1, + "workload_id": "query-code-index-v1", + "scales": [ + { + "name": "current", + "cases": [ + { + "name": "clean", + "files_parsed": 9, + "chunks_added_or_changed": 1957, + "chunks_deleted": 0, + "chunks_reused": 0, + "projection_calls": 1, + "changed_ranges": 0, + "invalidated_chunks": 0, + "projection_operations": 1957, + "full_rebuild_reason": null, + "input_bytes": 153569, + "output_bytes": 4974303 + }, + { + "name": "warm_one_file", + "files_parsed": 1, + "chunks_added_or_changed": 1, + "chunks_deleted": 1, + "chunks_reused": 1956, + "projection_calls": 1, + "changed_ranges": 1, + "invalidated_chunks": 1, + "projection_operations": 2, + "full_rebuild_reason": null, + "input_bytes": 22394, + "output_bytes": 5167097 + }, + { + "name": "deletion", + "files_parsed": 0, + "chunks_added_or_changed": 0, + "chunks_deleted": 885, + "chunks_reused": 1072, + "projection_calls": 1, + "changed_ranges": 0, + "invalidated_chunks": 885, + "projection_operations": 885, + "full_rebuild_reason": null, + "input_bytes": 0, + "output_bytes": 3668439 + }, + { + "name": "no_op", + "files_parsed": 0, + "chunks_added_or_changed": 0, + "chunks_deleted": 0, + "chunks_reused": 1957, + "projection_calls": 0, + "changed_ranges": 0, + "invalidated_chunks": 0, + "projection_operations": 0, + "full_rebuild_reason": null, + "input_bytes": 0, + "output_bytes": 5166121 + }, + { + "name": "chunker_replay", + "files_parsed": 9, + "chunks_added_or_changed": 1957, + "chunks_deleted": 1957, + "chunks_reused": 0, + "projection_calls": 1, + "changed_ranges": 0, + "invalidated_chunks": 1957, + "projection_operations": 3914, + "full_rebuild_reason": null, + "input_bytes": 153569, + "output_bytes": 6941116 + }, + { + "name": "incompatible_rebuild", + "files_parsed": 9, + "chunks_added_or_changed": 1957, + "chunks_deleted": 1957, + "chunks_reused": 0, + "projection_calls": 1, + "changed_ranges": 0, + "invalidated_chunks": 1957, + "projection_operations": 3914, + "full_rebuild_reason": "chunker_incompatible", + "input_bytes": 153569, + "output_bytes": 6952858 + } + ] + }, + { + "name": "10x", + "cases": [ + { + "name": "clean", + "files_parsed": 90, + "chunks_added_or_changed": 19570, + "chunks_deleted": 0, + "chunks_reused": 0, + "projection_calls": 1, + "changed_ranges": 0, + "invalidated_chunks": 0, + "projection_operations": 19570, + "full_rebuild_reason": null, + "input_bytes": 1535690, + "output_bytes": 49736118 + }, + { + "name": "warm_one_file", + "files_parsed": 1, + "chunks_added_or_changed": 1, + "chunks_deleted": 1, + "chunks_reused": 19569, + "projection_calls": 1, + "changed_ranges": 1, + "invalidated_chunks": 1, + "projection_operations": 2, + "full_rebuild_reason": null, + "input_bytes": 22394, + "output_bytes": 51654987 + }, + { + "name": "deletion", + "files_parsed": 0, + "chunks_added_or_changed": 0, + "chunks_deleted": 885, + "chunks_reused": 18685, + "projection_calls": 1, + "changed_ranges": 0, + "invalidated_chunks": 885, + "projection_operations": 885, + "full_rebuild_reason": null, + "input_bytes": 0, + "output_bytes": 50156329 + }, + { + "name": "no_op", + "files_parsed": 0, + "chunks_added_or_changed": 0, + "chunks_deleted": 0, + "chunks_reused": 19570, + "projection_calls": 0, + "changed_ranges": 0, + "invalidated_chunks": 0, + "projection_operations": 0, + "full_rebuild_reason": null, + "input_bytes": 0, + "output_bytes": 51654011 + }, + { + "name": "chunker_replay", + "files_parsed": 90, + "chunks_added_or_changed": 19570, + "chunks_deleted": 19570, + "chunks_reused": 0, + "projection_calls": 1, + "changed_ranges": 0, + "invalidated_chunks": 19570, + "projection_operations": 39140, + "full_rebuild_reason": null, + "input_bytes": 1535690, + "output_bytes": 69403996 + }, + { + "name": "incompatible_rebuild", + "files_parsed": 90, + "chunks_added_or_changed": 19570, + "chunks_deleted": 19570, + "chunks_reused": 0, + "projection_calls": 1, + "changed_ranges": 0, + "invalidated_chunks": 19570, + "projection_operations": 39140, + "full_rebuild_reason": "chunker_incompatible", + "input_bytes": 1535690, + "output_bytes": 69521416 + } + ] + } + ] +} diff --git a/benchmark_data/query-code-index/workload-v1.json b/benchmark_data/query-code-index/workload-v1.json new file mode 100644 index 0000000000..f82876ed17 --- /dev/null +++ b/benchmark_data/query-code-index/workload-v1.json @@ -0,0 +1,88 @@ +{ + "schema_version": 1, + "workload_id": "query-code-index-v1", + "harness_revision": "code-index-chunks.v2", + "seed": 1784509200, + "repetitions": { + "warmups": 5, + "measured": 30 + }, + "corpus": { + "source_files": [ + "tests/fixtures/search_quality/corpus/crates/tracedecay-domain/src/integration.rs", + "tests/fixtures/search_quality/corpus/crates/tracedecay-domain/src/repository.rs", + "tests/fixtures/search_quality/corpus/crates/tracedecay-domain/src/research/canonical.rs", + "tests/fixtures/search_quality/corpus/crates/tracedecay-domain/src/research/coverage.rs", + "tests/fixtures/search_quality/corpus/crates/tracedecay-domain/src/research/error.rs", + "tests/fixtures/search_quality/corpus/crates/tracedecay-domain/src/research/id.rs", + "tests/fixtures/search_quality/corpus/crates/tracedecay-domain/src/research/time.rs", + "tests/fixtures/search_quality/corpus/crates/tracedecay-domain/src/research/watermark.rs", + "tests/fixtures/search_quality/corpus/crates/tracedecay-domain/src/session.rs" + ], + "content_digest": "sha256:3324bc97a9dab89365bc6f7d8a24172ebe358448bf8c3208dd6f97ea4d2f0a73", + "descriptor_digest": "sha256:5aecc3b0c4b0d2c7dce830c192ef7267c4792586d6cb11fbd3e2f2e321a424b0", + "language_strata": [ + { + "language": "rust", + "files": 9, + "bytes": 153569, + "chunks": 1957 + } + ] + }, + "scales": [ + { + "name": "current", + "factor": 1, + "files": 9, + "bytes": 153569, + "chunks": 1957 + }, + { + "name": "10x", + "factor": 10, + "files": 90, + "bytes": 1535690, + "chunks": 19570 + } + ], + "cases": [ + { + "name": "clean", + "cache_state": "no_prior_generation" + }, + { + "name": "warm_one_file", + "cache_state": "prior_generation_loaded" + }, + { + "name": "deletion", + "cache_state": "prior_generation_loaded" + }, + { + "name": "no_op", + "cache_state": "prior_generation_loaded" + }, + { + "name": "chunker_replay", + "cache_state": "extraction_batches_reused" + }, + { + "name": "incompatible_rebuild", + "cache_state": "forced_full_rebuild" + } + ], + "runtime": { + "cargo_command": "cargo bench --bench code_index_chunks -- --run", + "profile": "bench", + "platform": "linux", + "arrival_model": "closed_loop_single_process", + "concurrency": 1, + "page_cache": "uncontrolled_report_only", + "parser_registry": "initialized_before_sample", + "clock": "std_instant_plus_proc_self_stat", + "peak_rss": "proc_self_status_vmhwm_after_clear_refs", + "io_bytes": "proc_self_io_read_bytes_and_write_bytes", + "hardware_manifest": "captured_in_result" + } +} diff --git a/benchmark_data/run_benchmarks.py b/benchmark_data/run_benchmarks.py new file mode 100644 index 0000000000..196c16e583 --- /dev/null +++ b/benchmark_data/run_benchmarks.py @@ -0,0 +1,543 @@ +"""TraceDecay vs Token-Savior — side-by-side benchmark on Python repos. + +Adapted from token-savior's benchmarks/run_benchmarks.py +(https://github.com/Mibayy/token-savior). Runs both tools against the same +clone of FastAPI and CPython, sharing a single random symbol sample so the +query-timing column is apples-to-apples, and emits a comparison report. + +Prerequisites: + pip install token-savior # for the token-savior column + tracedecay --version # tracedecay CLI on PATH + +Usage: + python benchmark_data/run_benchmarks.py + python benchmark_data/run_benchmarks.py --repos fastapi + python benchmark_data/run_benchmarks.py --skip-clone + python benchmark_data/run_benchmarks.py --skip-token-savior # tracedecay only + python benchmark_data/run_benchmarks.py --skip-tracedecay # token-savior only +""" + +from __future__ import annotations + +import argparse +import json +import os +import random +import resource +import shutil +import subprocess +import sys +import tempfile +import time +import tracemalloc +from pathlib import Path + +REPOS: dict[str, str] = { + "fastapi": "https://github.com/tiangolo/fastapi.git", + "cpython": "https://github.com/python/cpython.git", +} + +CLONE_DIR = Path("/tmp/tracedecay-bench") +RESULTS_DIR = Path(__file__).resolve().parent +RESULTS_JSON = RESULTS_DIR / "comparison-results.json" +REPORT_MD = RESULTS_DIR / "comparison-report.md" + +RANDOM_SEED = 42 +NUM_QUERY_SAMPLES = 10 + +TRACEDECAY_BIN = os.environ.get("TRACEDECAY_BIN", "tracedecay") + + +def log(msg: str) -> None: + print(f"[bench] {msg}", file=sys.stderr, flush=True) + + +# --------------------------------------------------------------------------- +# Clone + naive baseline +# --------------------------------------------------------------------------- + + +def clone_repo(name: str, url: str, skip_clone: bool) -> Path: + dest = CLONE_DIR / name + if dest.exists(): + log(f"{name}: reusing existing clone at {dest}") + return dest + if skip_clone: + raise FileNotFoundError(f"{name}: --skip-clone requested but {dest} does not exist") + CLONE_DIR.mkdir(parents=True, exist_ok=True) + log(f"{name}: cloning {url} (shallow, depth=1) ...") + subprocess.run( + ["git", "clone", "--depth=1", "--single-branch", url, str(dest)], + check=True, + capture_output=True, + text=True, + ) + return dest + + +def naive_source_size(root: str) -> int: + total = 0 + for dirpath, _dirs, files in os.walk(root): + for f in files: + if f.endswith(".py"): + try: + total += os.path.getsize(os.path.join(dirpath, f)) + except OSError: + pass + return total + + +# --------------------------------------------------------------------------- +# token-savior side (in-process) +# --------------------------------------------------------------------------- + + +def have_token_savior() -> bool: + try: + import token_savior # noqa: F401 + return True + except ImportError: + return False + + +def benchmark_token_savior(name: str, root: Path) -> tuple[dict, list[str]]: + from token_savior.cache_ops import CacheManager + from token_savior.project_indexer import ProjectIndexer + from token_savior.query_api import create_project_query_functions + + root_str = str(root) + out: dict = {} + + log(f"[ts] {name}: cold index ...") + tracemalloc.start() + t0 = time.perf_counter() + indexer = ProjectIndexer(root_str) + index = indexer.index() + out["cold_index_seconds"] = round(time.perf_counter() - t0, 3) + out["cold_index_peak_memory_bytes"] = tracemalloc.get_traced_memory()[1] + tracemalloc.stop() + out["total_files"] = index.total_files + out["total_lines"] = index.total_lines + out["total_functions"] = index.total_functions + out["total_classes"] = index.total_classes + out["symbol_table_size"] = len(index.symbol_table) + + log(f"[ts] {name}: warm index ...") + t0 = time.perf_counter() + ProjectIndexer(root_str).index() + out["warm_index_seconds"] = round(time.perf_counter() - t0, 3) + + queries = create_project_query_functions(index) + rng = random.Random(RANDOM_SEED) + symbols = list(index.symbol_table.keys()) + sample = rng.sample(symbols, min(NUM_QUERY_SAMPLES, len(symbols))) + + def avg_ms(fn, items: list[str]) -> float | None: + times: list[float] = [] + for it in items: + t = time.perf_counter() + fn(it) + times.append(time.perf_counter() - t) + return round(sum(times) / len(times) * 1000, 3) if times else None + + out["find_symbol_avg_ms"] = avg_ms(queries["find_symbol"], sample) + out["get_function_source_avg_ms"] = avg_ms(queries["get_function_source"], sample) + impact_sample = [s for s in sample if s in index.reverse_dependency_graph] + out["get_change_impact_avg_ms"] = ( + avg_ms(queries["get_change_impact"], impact_sample) if impact_sample else None + ) + + cache = CacheManager(root_path=root_str, cache_version=1) + cache.save(index) + cp = cache.path() + out["cache_size_bytes"] = os.path.getsize(cp) if os.path.exists(cp) else 0 + try: + os.remove(cp) + except OSError: + pass + + return out, sample + + +# --------------------------------------------------------------------------- +# tracedecay side (subprocess) +# --------------------------------------------------------------------------- + + +def ru_maxrss_bytes() -> int: + """ru_maxrss is bytes on macOS, KiB on Linux.""" + r = resource.getrusage(resource.RUSAGE_CHILDREN).ru_maxrss + return r if sys.platform == "darwin" else r * 1024 + + +def run_timed( + cmd: list[str], + cwd: str | None = None, + env: dict[str, str] | None = None, +) -> tuple[float, int, subprocess.CompletedProcess]: + before = ru_maxrss_bytes() + t0 = time.perf_counter() + cp = subprocess.run(cmd, cwd=cwd, env=env, capture_output=True, text=True) + dt = time.perf_counter() - t0 + after = ru_maxrss_bytes() + return dt, max(0, after - before), cp + + +class TraceDecayMcp: + """Minimal JSON-RPC 2.0 client for `tracedecay serve` over stdio. + + Spawns a long-lived server so per-call latency reflects actual query work + instead of process startup + DB open. Newline-delimited JSON, no Content- + Length framing — see src/mcp/transport.rs. + """ + + def __init__(self, root: Path, env: dict[str, str] | None = None): + self.root = root + self.env = env + self.proc: subprocess.Popen | None = None + self._next_id = 1 + + def __enter__(self) -> "TraceDecayMcp": + self.proc = subprocess.Popen( + [TRACEDECAY_BIN, "serve", "-p", str(self.root), "--timings"], + stdin=subprocess.PIPE, + stdout=subprocess.PIPE, + stderr=subprocess.DEVNULL, + env=self.env, + text=True, + bufsize=1, + ) + self._request("initialize", { + "protocolVersion": "2025-03-26", + "capabilities": {}, + "clientInfo": {"name": "tracedecay-bench", "version": "0.1"}, + }) + self._notify("notifications/initialized", {}) + return self + + def __exit__(self, *_exc) -> None: + if self.proc is None: + return + try: + self.proc.stdin.close() + except Exception: + pass + try: + self.proc.wait(timeout=3) + except subprocess.TimeoutExpired: + self.proc.kill() + self.proc.wait() + self.proc = None + + def _write(self, payload: dict) -> None: + assert self.proc and self.proc.stdin + self.proc.stdin.write(json.dumps(payload) + "\n") + self.proc.stdin.flush() + + def _read_response(self, expected_id: int) -> dict: + assert self.proc and self.proc.stdout + while True: + line = self.proc.stdout.readline() + if not line: + raise RuntimeError("tracedecay serve closed stdout unexpectedly") + try: + msg = json.loads(line) + except json.JSONDecodeError: + continue + if msg.get("id") == expected_id: + return msg + + def _request(self, method: str, params: dict) -> dict: + rid = self._next_id + self._next_id += 1 + self._write({"jsonrpc": "2.0", "id": rid, "method": method, "params": params}) + return self._read_response(rid) + + def _notify(self, method: str, params: dict) -> None: + self._write({"jsonrpc": "2.0", "method": method, "params": params}) + + def call_tool(self, name: str, arguments: dict) -> dict: + return self._request("tools/call", {"name": name, "arguments": arguments}) + + @staticmethod + def first_node_id(search_resp: dict) -> str | None: + """Extract the first node id from a tracedecay_search response.""" + try: + text = search_resp["result"]["content"][0]["text"] + items = json.loads(text) + if isinstance(items, list) and items: + return items[0].get("id") + except (KeyError, IndexError, TypeError, json.JSONDecodeError): + return None + return None + + +def benchmark_tracedecay(name: str, root: Path, sample_symbols: list[str]) -> dict: + out: dict = {} + ts_dir = root / ".tracedecay" + if ts_dir.exists(): + shutil.rmtree(ts_dir) + + with tempfile.TemporaryDirectory(prefix=f"tracedecay-bench-{name}-") as tmp: + data_dir = Path(tmp) / ".tracedecay" + data_dir.mkdir(parents=True, exist_ok=True) + env = dict(os.environ) + env["TRACEDECAY_DATA_DIR"] = str(data_dir) + env["TRACEDECAY_GLOBAL_DB"] = str(data_dir / "global.db") + + log(f"[tk] {name}: init (cold) ...") + dt, mem, cp = run_timed([TRACEDECAY_BIN, "init"], cwd=str(root), env=env) + if cp.returncode != 0: + log(f"[tk] init failed: {cp.stderr[-400:]}") + out["error"] = cp.stderr[-2000:] + return out + out["cold_index_seconds"] = round(dt, 3) + out["cold_index_peak_memory_bytes"] = mem + + log(f"[tk] {name}: sync (warm) ...") + dt, _, cp = run_timed([TRACEDECAY_BIN, "sync"], cwd=str(root), env=env) + out["warm_index_seconds"] = round(dt, 3) if cp.returncode == 0 else None + + status: dict = {} + _, _, cp = run_timed([TRACEDECAY_BIN, "status", "--json"], cwd=str(root), env=env) + if cp.returncode == 0: + try: + status = json.loads(cp.stdout) + out["node_count"] = status.get("node_count") + out["edge_count"] = status.get("edge_count") + out["file_count"] = status.get("file_count") + out["files_by_language"] = status.get("files_by_language") + except json.JSONDecodeError: + pass + + log(f"[tk] {name}: query benchmarks via MCP ({len(sample_symbols)} symbols) ...") + queries = [sym.split(".")[-1] for sym in sample_symbols] + + def handler_us(resp: dict) -> int | None: + meta = resp.get("result", {}).get("_meta", {}) + v = meta.get("duration_us") + return int(v) if isinstance(v, (int, float)) else None + + def avg_ms(samples: list[int]) -> float | None: + return round(sum(samples) / len(samples) / 1000.0, 3) if samples else None + + with TraceDecayMcp(root, env=env) as mcp: + # Warm-up so first-query DB/cache fill doesn't skew the averages. + # `_meta.duration_us` already excludes transport overhead, but the + # first call also pays one-time index warmup we want to drop. + if queries: + mcp.call_tool("tracedecay_search", {"query": queries[0], "limit": 5}) + + # Apples-to-apples vs token-savior's find_symbol: bare-name index + # probe via `tracedecay_find_exact_symbol`, not BM25-ranked `search`. + find_us = [ + d + for q in queries + if ( + d := handler_us( + mcp.call_tool("tracedecay_find_exact_symbol", {"name": q}) + ) + ) + is not None + ] + out["find_symbol_avg_ms"] = avg_ms(find_us) + + body_us = [ + d + for q in queries + if ( + d := handler_us(mcp.call_tool("tracedecay_body", {"symbol": q, "limit": 1})) + ) + is not None + ] + out["get_function_source_avg_ms"] = avg_ms(body_us) + + impact_us: list[int] = [] + for q in queries: + sresp = mcp.call_tool("tracedecay_search", {"query": q, "limit": 1}) + search_us = handler_us(sresp) or 0 + node_id = TraceDecayMcp.first_node_id(sresp) + if node_id is None: + continue + iresp = mcp.call_tool("tracedecay_impact", {"node_id": node_id, "max_depth": 3}) + ius = handler_us(iresp) + if ius is not None: + impact_us.append(search_us + ius) + out["get_change_impact_avg_ms"] = avg_ms(impact_us) + + out["cache_size_bytes"] = status.get("db_size_bytes", 0) + + return out + + +def fallback_sample(root: Path) -> list[str]: + """If token-savior didn't run, derive a symbol-ish sample from .py basenames.""" + cands: list[str] = [] + for dirpath, _, files in os.walk(root): + for f in files: + if f.endswith(".py") and not f.startswith("_"): + cands.append(f[:-3]) + if not cands: + return [] + rng = random.Random(RANDOM_SEED) + return rng.sample(cands, min(NUM_QUERY_SAMPLES, len(cands))) + + +# --------------------------------------------------------------------------- +# Report +# --------------------------------------------------------------------------- + + +def fmt_bytes(b: int | None) -> str: + if b is None: + return "N/A" + if b >= 1_048_576: + return f"{b / 1_048_576:.1f} MiB" + if b >= 1024: + return f"{b / 1024:.1f} KiB" + return f"{b} B" + + +def fmt_ms(v: float | None) -> str: + return "N/A" if v is None else f"{v:.3f} ms" + + +def fmt_sec(v: float | None) -> str: + return "N/A" if v is None else f"{v:.3f}s" + + +def fmt_int(v) -> str: + if v is None: + return "N/A" + try: + return f"{int(v):,}" + except (TypeError, ValueError): + return str(v) + + +def generate_report(results: list[dict], naive_sizes: dict[str, int]) -> str: + lines = [ + "# TraceDecay vs Token-Savior Benchmark", + "", + f"Generated: {time.strftime('%Y-%m-%d %H:%M:%S UTC', time.gmtime())}", + "", + "Side-by-side comparison on real-world Python repositories. Both tools index", + "the same clone, and the same random sample of symbols (seed=42) is used for", + "query timing so the find_symbol column is directly comparable.", + "", + "**Memory notes.** token-savior's peak memory is measured with `tracemalloc`", + "(Python heap only). tracedecay runs as a subprocess, so its peak is the", + "`ru_maxrss` delta from `getrusage(RUSAGE_CHILDREN)` (resident set size).", + "These are *not* identical units — treat them as order-of-magnitude.", + "", + "**Query timing.** token-savior is called in-process (pure Python dict", + "lookups). tracedecay is driven over MCP via `tracedecay serve --timings`", + "and the per-query column reports the handler's `_meta.duration_us` —", + "i.e. the time spent inside the Rust handler, with JSON-RPC / stdio /", + "Python-parse overhead stripped out. A warm-up call is issued before", + "each timed loop. `get_change_impact` for tracedecay sums the handler", + "times of `search → impact`, mirroring how an agent must resolve the", + "symbol to a node_id before querying.", + "", + ] + for r in results: + name = r["repo"] + ts = r.get("token_savior") or {} + tk = r.get("tracedecay") or {} + lines += [ + f"## {name}", + "", + f"Naive `.py` source size: {fmt_bytes(naive_sizes.get(name))}", + "", + "| Metric | token-savior | tracedecay |", + "|--------|--------------|-----------|", + f"| Cold index time | {fmt_sec(ts.get('cold_index_seconds'))} | {fmt_sec(tk.get('cold_index_seconds'))} |", + f"| Warm reindex time | {fmt_sec(ts.get('warm_index_seconds'))} | {fmt_sec(tk.get('warm_index_seconds'))} |", + f"| Peak memory (cold) | {fmt_bytes(ts.get('cold_index_peak_memory_bytes'))} | {fmt_bytes(tk.get('cold_index_peak_memory_bytes'))} |", + f"| Cache / DB size | {fmt_bytes(ts.get('cache_size_bytes'))} | {fmt_bytes(tk.get('cache_size_bytes'))} |", + f"| Files indexed | {fmt_int(ts.get('total_files'))} | {fmt_int(tk.get('file_count'))} |", + f"| Symbols / nodes | {fmt_int(ts.get('symbol_table_size'))} | {fmt_int(tk.get('node_count'))} |", + f"| find_symbol avg | {fmt_ms(ts.get('find_symbol_avg_ms'))} | {fmt_ms(tk.get('find_symbol_avg_ms'))} |", + f"| get_function_source avg | {fmt_ms(ts.get('get_function_source_avg_ms'))} | {fmt_ms(tk.get('get_function_source_avg_ms'))} |", + f"| get_change_impact avg | {fmt_ms(ts.get('get_change_impact_avg_ms'))} | {fmt_ms(tk.get('get_change_impact_avg_ms'))} |", + "", + ] + if tk.get("files_by_language"): + langs = ", ".join(f"{k}={v}" for k, v in sorted(tk["files_by_language"].items())) + lines += [f"_tracedecay indexed languages:_ {langs}", ""] + if tk.get("error"): + lines += [f"_tracedecay error:_ `{tk['error'][:300]}`", ""] + return "\n".join(lines) + + +# --------------------------------------------------------------------------- +# Main +# --------------------------------------------------------------------------- + + +def main() -> None: + parser = argparse.ArgumentParser(description="TraceDecay vs Token-Savior benchmark") + parser.add_argument( + "--repos", + nargs="+", + choices=list(REPOS.keys()), + default=list(REPOS.keys()), + ) + parser.add_argument("--skip-clone", action="store_true") + parser.add_argument("--skip-token-savior", action="store_true") + parser.add_argument("--skip-tracedecay", action="store_true") + args = parser.parse_args() + + if not args.skip_token_savior and not have_token_savior(): + log("token-savior not installed (`pip install token-savior`); skipping its column") + args.skip_token_savior = True + if not args.skip_tracedecay and shutil.which(TRACEDECAY_BIN) is None: + log(f"{TRACEDECAY_BIN} not on PATH; skipping its column") + args.skip_tracedecay = True + if args.skip_token_savior and args.skip_tracedecay: + log("Both tools unavailable; nothing to benchmark.") + sys.exit(1) + + results: list[dict] = [] + naive_sizes: dict[str, int] = {} + + for name in args.repos: + try: + root = clone_repo(name, REPOS[name], skip_clone=args.skip_clone) + except (subprocess.CalledProcessError, FileNotFoundError) as exc: + detail = getattr(exc, "stderr", None) or str(exc) + log(f"SKIP {name}: clone failed -- {detail.strip()[:200]}") + continue + + naive_sizes[name] = naive_source_size(str(root)) + entry: dict = {"repo": name, "root": str(root)} + sample: list[str] | None = None + + if not args.skip_token_savior: + ts_result, sample = benchmark_token_savior(name, root) + entry["token_savior"] = ts_result + + if not args.skip_tracedecay: + if not sample: + sample = fallback_sample(root) + entry["tracedecay"] = benchmark_tracedecay(name, root, sample) + + results.append(entry) + + if not results: + log("No repos benchmarked, exiting.") + sys.exit(1) + + RESULTS_DIR.mkdir(parents=True, exist_ok=True) + payload = {"results": results, "naive_source_size_bytes": naive_sizes} + RESULTS_JSON.write_text(json.dumps(payload, indent=2)) + log(f"Results written to {RESULTS_JSON}") + + report = generate_report(results, naive_sizes) + REPORT_MD.write_text(report) + log(f"Report written to {REPORT_MD}") + print(report) + + +if __name__ == "__main__": + main() diff --git a/benchmark_data/runtime/GRAPH_MEASUREMENTS.md b/benchmark_data/runtime/GRAPH_MEASUREMENTS.md new file mode 100644 index 0000000000..eacbb18511 --- /dev/null +++ b/benchmark_data/runtime/GRAPH_MEASUREMENTS.md @@ -0,0 +1,89 @@ +# Graph measurement capture + +The shared runtime runner can capture graph Criterion executables without +invoking Cargo: + +```text +scripts/run-runtime-performance.sh graph-capture \ + --criterion-binary code-traversal=/absolute/path/to/code_traversal \ + --criterion-binary vector-search=/absolute/path/to/vector_search \ + --output /absolute/path/to/graph-capture.json +``` + +The runner gives each executable a private `CRITERION_HOME`, reads Criterion's +canonical `new/sample.json` files, and records every elapsed-nanoseconds-per- +iteration sample. Aggregates use `benchmark_data/runtime/statistics.py` nearest-rank +statistics. A p50 needs 2 samples, p95 needs 40, and p99 needs 100; a smaller +capture retains the raw samples but reports the ineligible percentile as +unavailable. Direct `wait4` receipts provide each benchmark process's peak RSS. +Each supplied executable is copied once into an immutable sealed-memory +snapshot, hashed there, and executed directly from that validated open +descriptor. Paired ABBA positions therefore execute and report the same sealed +baseline or candidate bytes even if either input path is later replaced. +Platforms without sealed-memory descriptor execution report the graph +measurement as unsupported rather than weakening this binding. + +This command does not build benchmarks, select a Git revision, or infer that a +binary is pre-Grafeo. The coordinator must build and identify the exact +prebuilt executables separately. + +## Fixture measurement executable + +Store size, write amplification, and reopen time cannot be recovered from +Criterion latency files. An optional fixture measurement executable may expose +them through this narrow contract: + +- The runner sets `TRACEDECAY_GRAPH_MEASUREMENT_STORE` to an empty directory. + The executable leaves the complete measured store in that directory. +- The runner sets `TRACEDECAY_GRAPH_MEASUREMENT_RECEIPT` to a nonexistent JSON + path. The executable atomically writes one schema-version-1 receipt there. +- The receipt contains the byte-exact fixture identity, logical/process writes, + retained-store byte count, and every reopen sample: + +```json +{ + "schema_version": 1, + "fixture": { + "id": "durable-workload-id", + "sha256": "64-lowercase-hex-characters" + }, + "exact_store_bytes": 12345, + "logical_write_bytes": 1000, + "process_write_bytes": 2500, + "reopen_elapsed_ns": [123456, 120001] +} +``` + +The runner recursively sums regular files in the retained store and rejects a +receipt whose `exact_store_bytes` differs. Traversal is anchored to no-follow +directory descriptors opened before the fixture runs: ancestor substitution, +symbolic links, non-regular entries, and entries replaced while measurement is +in progress are rejected instead of charging external bytes to the retained +store. The receipt is read through the same anchored measurement directory. It +computes integer write-amplification parts per million only when logical writes +are nonzero. Reopen percentiles use the same sample-eligibility rules as +Criterion latency. + +Without this executable, all three fixture-only measurements remain explicitly +unavailable. No filesystem growth or Criterion timing is substituted for a +logical-write denominator or reopen measurement. + +## Same-fixture pre-Grafeo comparison + +An ABBA capture requires explicitly supplied baseline and candidate binaries: + +```text +scripts/run-runtime-performance.sh graph-paired \ + --baseline-criterion code-traversal=/absolute/path/to/old/code_traversal \ + --candidate-criterion code-traversal=/absolute/path/to/new/code_traversal \ + --baseline-fixture-binary /absolute/path/to/old/graph_fixture_measurement \ + --candidate-fixture-binary /absolute/path/to/new/graph_fixture_measurement \ + --rounds 2 \ + --output /absolute/path/to/graph-paired.json +``` + +Baseline and candidate Criterion names must match in order. Fixture comparison +is available only when both fixture executables prove the same fixture ID and +SHA-256 digest. The output stays descriptive-only; this harness neither changes +CI nor introduces a threshold. If no real pre-Grafeo executable can run the +same fixture contract, the report records that comparison as unavailable. diff --git a/benchmark_data/runtime/comparison.py b/benchmark_data/runtime/comparison.py new file mode 100644 index 0000000000..7d66aa8ec0 --- /dev/null +++ b/benchmark_data/runtime/comparison.py @@ -0,0 +1,316 @@ +"""Deterministic, correctness-first comparison of runtime evidence.""" + +from __future__ import annotations + +import math +import re +from collections.abc import Iterable, Mapping, Sequence +from typing import Any + +from benchmark_data.runtime.schema import RUNTIME_STATES, SURFACES, TEMPERATURES +from benchmark_data.runtime.statistics import ( + bootstrap_confidence_interval, + summarize_rates, +) + + +COMPARISON_IDENTITY_FIELDS = ( + "baseline_candidate_id", + "treatment_candidate_id", + "run_id", + "capture_id", + "crate_id", + "journey_id", + "workload_id", + "platform", + "shard", + "storage_mode", + "state", + "temperature", + "surface", + "concurrency", +) +_PR_STAGE_RE = re.compile(r"(?:^|[-_. ])pr[-_. ]?\d+(?:$|[-_. ])", re.IGNORECASE) + + +def _mean(values: Iterable[float]) -> float: + items = list(values) + if not items: + raise ValueError("mean requires at least one sample") + return float(sum(items) / len(items)) + + +def _finite_number(value: Any, name: str) -> float: + if ( + isinstance(value, bool) + or not isinstance(value, (int, float)) + or not math.isfinite(value) + ): + raise ValueError(f"{name} must be a finite number") + return float(value) + + +def _comparison_identity(identity: Mapping[str, Any]) -> dict[str, Any]: + if not isinstance(identity, Mapping): + raise ValueError("comparison identity must be an object") + expected = set(COMPARISON_IDENTITY_FIELDS) + actual = set(identity) + missing = sorted(expected - actual) + unexpected = sorted(actual - expected) + if missing: + raise ValueError(f"comparison identity is missing: {', '.join(missing)}") + if unexpected: + raise ValueError( + f"comparison identity has unexpected fields: {', '.join(unexpected)}" + ) + result = dict(identity) + for field in COMPARISON_IDENTITY_FIELDS: + value = result[field] + if field == "concurrency": + if isinstance(value, bool) or not isinstance(value, int) or value < 1: + raise ValueError("comparison identity concurrency must be positive") + continue + if not isinstance(value, str) or not value: + raise ValueError(f"comparison identity {field} must be a non-empty string") + for field in ("crate_id", "journey_id", "workload_id"): + if _PR_STAGE_RE.search(result[field]) is not None: + raise ValueError( + f"comparison identity {field} must not use a PR-stage label" + ) + if result["state"] not in RUNTIME_STATES: + raise ValueError("comparison identity state is unsupported") + if result["temperature"] not in TEMPERATURES: + raise ValueError("comparison identity temperature must be cold or warm") + if result["surface"] not in SURFACES: + raise ValueError("comparison identity surface is unsupported") + return result + + +def pair_abba_rounds( + rounds: Sequence[Sequence[tuple[str, float | int]]], +) -> list[tuple[float, float]]: + """Pair each ABBA round by adjacent wall-clock measurements.""" + + pairs: list[tuple[float, float]] = [] + for round_ in rounds: + labels = [entry[0] for entry in round_] + if labels != ["A", "B", "B", "A"]: + raise ValueError("each ABBA round must contain exactly A, B, B, A") + values = [ + _finite_number(entry[1], f"ABBA value {index}") + for index, entry in enumerate(round_) + ] + pairs.extend(((values[0], values[1]), (values[3], values[2]))) + return pairs + + +def paired_log_ratios( + pairs: Sequence[tuple[float | int, float | int]], +) -> list[float]: + """Return log(treatment / baseline) for positive paired values.""" + + ratios: list[float] = [] + for baseline, treatment in pairs: + baseline_value = _finite_number(baseline, "baseline") + treatment_value = _finite_number(treatment, "treatment") + if baseline_value <= 0 or treatment_value <= 0: + raise ValueError("paired log-ratios require positive values") + ratios.append(math.log(treatment_value / baseline_value)) + return ratios + + +def classify_change( + baseline: float | int, + treatment: float | int, + *, + relative_threshold: float, + practical_floor: float, +) -> str: + """Classify only changes crossing both relative and practical thresholds.""" + + baseline_value = _finite_number(baseline, "baseline") + treatment_value = _finite_number(treatment, "treatment") + relative = _finite_number(relative_threshold, "relative_threshold") + floor = _finite_number(practical_floor, "practical_floor") + if baseline_value <= 0: + raise ValueError("baseline must be positive") + if relative < 0 or floor < 0: + raise ValueError("thresholds must be non-negative") + delta = treatment_value - baseline_value + relative_delta = abs(delta) / baseline_value + if abs(delta) < floor or relative_delta < relative: + return "no_material_change" + if delta > 0: + return "regression" + if delta < 0: + return "improvement" + return "no_material_change" + + +def _sample_outcome(sample: Mapping[str, Any]) -> Mapping[str, Any]: + outcome = sample.get("outcome") + if not isinstance(outcome, Mapping): + raise ValueError("sample outcome must be an object") + return outcome + + +def aggregate_hard_failures( + baseline_samples: Sequence[Mapping[str, Any]], + treatment_samples: Sequence[Mapping[str, Any]], +) -> list[dict[str, Any]]: + """Return correctness failures that override every latency observation.""" + + failures: list[dict[str, Any]] = [] + baseline_statuses = [ + str(_sample_outcome(sample).get("status")) for sample in baseline_samples + ] + treatment_statuses: list[str] = [] + for index, sample in enumerate(treatment_samples): + outcome = _sample_outcome(sample) + status = str(outcome.get("status")) + treatment_statuses.append(status) + expected_digest = outcome.get("expected_digest") + actual_digest = outcome.get("actual_digest") + result_digest = outcome.get("result_digest", actual_digest) + if ( + status == "success" + and ( + actual_digest != expected_digest + or result_digest != expected_digest + ) + ): + failures.append({"code": "digest_mismatch", "sample_index": index}) + if status == "error": + failures.append( + { + "code": "unexpected_error", + "sample_index": index, + "error": outcome.get("error"), + } + ) + lifecycle = sample.get("lifecycle") + if isinstance(lifecycle, Mapping) and lifecycle.get("daemon_survived") is False: + failures.append({"code": "daemon_death", "sample_index": index}) + + baseline_rates = summarize_rates(baseline_statuses) + treatment_rates = summarize_rates(treatment_statuses) + if treatment_rates["error_rate"] > baseline_rates["error_rate"]: + failures.append( + { + "code": "error_rate_regression", + "baseline": baseline_rates["error_rate"], + "treatment": treatment_rates["error_rate"], + } + ) + if treatment_rates["timeout_rate"] > baseline_rates["timeout_rate"]: + failures.append( + { + "code": "timeout_rate_regression", + "baseline": baseline_rates["timeout_rate"], + "treatment": treatment_rates["timeout_rate"], + } + ) + return failures + + +def latency_budget_findings( + observed: Mapping[str, float | int], + advisory_budgets: Mapping[str, float | int], +) -> list[dict[str, Any]]: + """Report generic latency budgets as advisory evidence, never an SLO gate.""" + + findings: list[dict[str, Any]] = [] + for metric in sorted(set(observed) & set(advisory_budgets)): + observed_value = _finite_number(observed[metric], f"observed {metric}") + budget = _finite_number(advisory_budgets[metric], f"budget {metric}") + if observed_value > budget: + findings.append( + { + "metric": metric, + "observed": observed_value, + "budget": budget, + "severity": "advisory", + "code": "latency_budget_exceeded", + } + ) + return findings + + +def compare_abba( + rounds: Sequence[Sequence[tuple[str, float | int]]], + *, + identity: Mapping[str, Any], + baseline_machine_fingerprint: str, + treatment_machine_fingerprint: str, + baseline_samples: Sequence[Mapping[str, Any]] = (), + treatment_samples: Sequence[Mapping[str, Any]] = (), + evidence_class: str | None = None, + relative_threshold: float = 0.05, + practical_floor: float = 0.0, + seed: int = 0, + resamples: int = 10_000, +) -> dict[str, Any]: + """Compare ABBA runtime samples without converting latency into an SLO.""" + + if not rounds: + raise ValueError("ABBA comparison requires at least one round") + comparison_identity = _comparison_identity(identity) + pairs = pair_abba_rounds(rounds) + log_ratios = paired_log_ratios(pairs) + baseline_mean = _mean(pair[0] for pair in pairs) + treatment_mean = _mean(pair[1] for pair in pairs) + change = classify_change( + baseline_mean, + treatment_mean, + relative_threshold=relative_threshold, + practical_floor=practical_floor, + ) + mean_log_ratio = _mean(log_ratios) + interval = bootstrap_confidence_interval( + log_ratios, + seed=seed, + resamples=resamples, + ) + sample_count = len(rounds) + expected_evidence_class = ( + "regression_sample" if sample_count == 1 else "distribution" + ) + if evidence_class is not None and evidence_class != expected_evidence_class: + raise ValueError( + f"sample_count={sample_count} requires evidence_class " + f"{expected_evidence_class!r}" + ) + hard_failures = aggregate_hard_failures(baseline_samples, treatment_samples) + advisory_findings: list[dict[str, Any]] = [] + if change == "regression": + advisory_findings.append( + { + "code": "relative_latency_regression", + "severity": "advisory", + "ratio": math.exp(mean_log_ratio), + } + ) + machine_comparable = ( + baseline_machine_fingerprint == treatment_machine_fingerprint + ) + return { + "identity": comparison_identity, + "evidence": { + "sample_count": sample_count, + "evidence_class": expected_evidence_class, + }, + "machine_comparable": machine_comparable, + "informational": True, + "decision": "fail" if hard_failures else "descriptive_only", + "paired": { + "pair_count": len(pairs), + "baseline_mean": baseline_mean, + "treatment_mean": treatment_mean, + "mean_log_ratio": mean_log_ratio, + "ratio": math.exp(mean_log_ratio), + "log_ratio_confidence_interval": [interval[0], interval[1]], + "change": change, + }, + "advisory_findings": advisory_findings, + "hard_failures": hard_failures, + } diff --git a/benchmark_data/runtime/evidence/cli-exact-query-p95-20260730/README.md b/benchmark_data/runtime/evidence/cli-exact-query-p95-20260730/README.md new file mode 100644 index 0000000000..209b802b72 --- /dev/null +++ b/benchmark_data/runtime/evidence/cli-exact-query-p95-20260730/README.md @@ -0,0 +1,15 @@ +# Integrated CLI exact-query p95 evidence + +> **Dated runtime evidence — not acceptance authority.** Preserve these raw +> samples and their provenance, but do not recreate their exact counts, +> snapshots, receipts, attestations, binary/worktree choreography, or gates as +> build prerequisites. Current requirements come only from the +> `docs/plans/tracedecay-v2/` hierarchy; validate current runtime behavior directly. + +This directory records a same-input ABBA comparison between the explicitly +supplied installed baseline binary and worktree treatment binary. Each variant +has 40 matching isolated-profile samples, meeting the frozen p95 eligibility +minimum. The 100-sample p99 minimum is not met and p99 remains unavailable. + +Every sample retains correctness digests, lifecycle cleanup evidence, and +supported Linux daemon resource counters. The comparison remains advisory. diff --git a/benchmark_data/runtime/evidence/cli-exact-query-p95-20260730/report.json b/benchmark_data/runtime/evidence/cli-exact-query-p95-20260730/report.json new file mode 100644 index 0000000000..a133a4ed88 --- /dev/null +++ b/benchmark_data/runtime/evidence/cli-exact-query-p95-20260730/report.json @@ -0,0 +1,114 @@ +{ + "binaries": { + "baseline_sha256": "81484427366af40e09de3939626d9d71a126bf9e9648caef4f7ff6f96549998d", + "treatment_sha256": "4e06349a71afac8e1f25f927ae1196f3f38649704e1e1c9a22ab13f2ee19578a" + }, + "comparison": { + "advisory_findings": [], + "decision": "descriptive_only", + "evidence": { + "evidence_class": "distribution", + "sample_count": 20 + }, + "hard_failures": [], + "identity": { + "baseline_candidate_id": "81484427366af40e", + "capture_id": "paired-d223230dbc074a3f8702651c76bc837f", + "concurrency": 1, + "crate_id": "tracedecay", + "journey_id": "code-retrieval", + "platform": "linux-x86_64", + "run_id": "paired-d223230dbc074a3f8702651c76bc837f", + "shard": "integrated-0", + "state": "cold", + "storage_mode": "isolated-sqlite", + "surface": "cli", + "temperature": "cold", + "treatment_candidate_id": "4e06349a71afac8e", + "workload_id": "exact-symbol" + }, + "informational": true, + "machine_comparable": true, + "paired": { + "baseline_mean": 2194681888.35, + "change": "no_material_change", + "log_ratio_confidence_interval": [ + -0.008635743352775177, + 0.06412106491629181 + ], + "mean_log_ratio": 0.02652582291523544, + "pair_count": 40, + "ratio": 1.0268807639742363, + "treatment_mean": 2259855790.275 + } + }, + "evidence_class": "repeated_raw_samples", + "fixture": { + "id": "runtime-v2-final", + "input_sha256": "80e81b62256384d434d31ea30770d3b1f091065984b9651e45c65d98d45bc582", + "same_input": true + }, + "outcome": { + "digest_match": true, + "error_count": 0, + "process_leak_count": 0 + }, + "policy": { + "journey_margins": { + "p50_regression_margin_pct": 15, + "p95_regression_margin_pct": 20, + "resource_regression_margin_pct": 20 + }, + "journey_policy_id": "runtime-journey-margins-v1", + "journey_policy_sha256": "6db22e48d7e45a6cc751baaf1ae40e67905aafb5b315157f646a94cf57695d45", + "latency_mode": "advisory", + "policy_id": "runtime-acceptance-v1", + "policy_sha256": "7c74637ac91439e8d04870d322c7e9c9d1d4dc926958c01c475c3c7f37651878" + }, + "report_id": "paired-d223230dbc074a3f8702651c76bc837f", + "samples_sha256": "784c33b75f1ba965f83aa9b296a0bd4f25e60e5cf76268534779af626805e5a8", + "schedule": "ABBA", + "schema_version": 1, + "variants": { + "baseline": { + "latency_ns": { + "p50": { + "available": true, + "minimum_samples": 2, + "value": 2115124637 + }, + "p95": { + "available": true, + "minimum_samples": 40, + "value": 2482649896 + }, + "p99": { + "available": false, + "minimum_samples": 100, + "value": null + } + }, + "sample_count": 40 + }, + "treatment": { + "latency_ns": { + "p50": { + "available": true, + "minimum_samples": 2, + "value": 2162199047 + }, + "p95": { + "available": true, + "minimum_samples": 40, + "value": 2601120103 + }, + "p99": { + "available": false, + "minimum_samples": 100, + "value": null + } + }, + "sample_count": 40 + } + } +} diff --git a/benchmark_data/runtime/evidence/cli-exact-query-p95-20260730/report.policy.json b/benchmark_data/runtime/evidence/cli-exact-query-p95-20260730/report.policy.json new file mode 100644 index 0000000000..bc6cd213e6 --- /dev/null +++ b/benchmark_data/runtime/evidence/cli-exact-query-p95-20260730/report.policy.json @@ -0,0 +1,14 @@ +{ + "acceptance": { + "artifact_sha256": "8c1a6d749ba9bacd050dec038c02366b28b178bb610d7157e2e31ff6f0cf7e11", + "policy_id": "runtime-acceptance-v1", + "policy_sha256": "7c74637ac91439e8d04870d322c7e9c9d1d4dc926958c01c475c3c7f37651878", + "policy_version": 1 + }, + "journey": { + "artifact_sha256": "8c1a6d749ba9bacd050dec038c02366b28b178bb610d7157e2e31ff6f0cf7e11", + "policy_id": "runtime-journey-margins-v1", + "policy_sha256": "6db22e48d7e45a6cc751baaf1ae40e67905aafb5b315157f646a94cf57695d45", + "policy_version": 1 + } +} diff --git a/benchmark_data/runtime/evidence/cli-exact-query-p95-20260730/report.samples.jsonl b/benchmark_data/runtime/evidence/cli-exact-query-p95-20260730/report.samples.jsonl new file mode 100644 index 0000000000..305c066ffc --- /dev/null +++ b/benchmark_data/runtime/evidence/cli-exact-query-p95-20260730/report.samples.jsonl @@ -0,0 +1,80 @@ +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"final-v2","capture_id":"capture-9a60bfa89aef4672b86c6a613a9a5a08","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":0,"run_id":"run-0cec988e5427476888e6db441affb2d6","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":2080000000,"daemon_peak_rss_bytes":198897664,"daemon_pss_bytes":119341056,"disk_read_bytes":0,"disk_write_bytes":7397376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10345416,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":85250,"cli_wall_ns":1814519573,"daemon_us":null,"elapsed_ns":2389484790,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1814519,"daemon_admission":85250},"started_ns":457037338241866}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":1,"candidate_id":"final-v2","capture_id":"capture-96412f4f6ce84a58bfcbf7037a112f8c","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":0,"run_id":"run-f456c3cb797a45a5b257a313e56f1236","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1820000000,"daemon_peak_rss_bytes":190980096,"daemon_pss_bytes":187208704,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9780976,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":82979,"cli_wall_ns":1636793225,"daemon_us":null,"elapsed_ns":2167335522,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1636793,"daemon_admission":82979},"started_ns":457044758710638}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":2,"candidate_id":"final-v2","capture_id":"capture-06f251fcf36f4377a415ff552d1ba661","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":0,"run_id":"run-dd11d24bb4c34a85a1102a3fb8201d54","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1870000000,"daemon_peak_rss_bytes":193568768,"daemon_pss_bytes":189440000,"disk_read_bytes":0,"disk_write_bytes":4866048,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10098216,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":80067,"cli_wall_ns":2028810473,"daemon_us":null,"elapsed_ns":2560805224,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":2028810,"daemon_admission":80067},"started_ns":457051950622474}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":3,"candidate_id":"final-v2","capture_id":"capture-d93984c1ee3b41bebaa1ffc672cdb162","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":0,"run_id":"run-4afa6a57b27f4bd28848c2259fe9443e","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":2220000000,"daemon_peak_rss_bytes":190222336,"daemon_pss_bytes":111876096,"disk_read_bytes":0,"disk_write_bytes":4820992,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9867496,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":83506,"cli_wall_ns":2025125800,"daemon_us":null,"elapsed_ns":2836656722,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":2025125,"daemon_admission":83506},"started_ns":457058262757886}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"final-v2","capture_id":"capture-39ebfb6f76bb4ebf8b2dc858d0550df1","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":1,"run_id":"run-57d92600542f40d1b9915e3176ac1015","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1850000000,"daemon_peak_rss_bytes":192217088,"daemon_pss_bytes":113351680,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9867496,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":78882,"cli_wall_ns":1673897007,"daemon_us":null,"elapsed_ns":2205124053,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1673897,"daemon_admission":78882},"started_ns":457065030147242}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":1,"candidate_id":"final-v2","capture_id":"capture-cd43705ed5f549a5a413de2056a66252","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":1,"run_id":"run-d408b815916e47798021cb3cd68d232f","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1770000000,"daemon_peak_rss_bytes":192409600,"daemon_pss_bytes":188182528,"disk_read_bytes":0,"disk_write_bytes":4894720,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10098216,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":81562,"cli_wall_ns":1587445270,"daemon_us":null,"elapsed_ns":2097453604,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1587445,"daemon_admission":81562},"started_ns":457072161587255}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":2,"candidate_id":"final-v2","capture_id":"capture-926e954dcc4b4a9fb2d3958e76397820","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":1,"run_id":"run-8131b7a27dc74632bb2ad5a0f03cc0e4","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":2120000000,"daemon_peak_rss_bytes":190201856,"daemon_pss_bytes":186116096,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10069376,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":83059,"cli_wall_ns":1961668075,"daemon_us":null,"elapsed_ns":2501183622,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1961668,"daemon_admission":83059},"started_ns":457079434071808}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":3,"candidate_id":"final-v2","capture_id":"capture-dee8f823d6194e7d9666348e50484b8a","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":1,"run_id":"run-f4f3a2ae3c4a46649cc4b81efe102532","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1770000000,"daemon_peak_rss_bytes":192884736,"daemon_pss_bytes":114046976,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10069376,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":79392,"cli_wall_ns":1597073998,"daemon_us":null,"elapsed_ns":2134737013,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1597073,"daemon_admission":79392},"started_ns":457085554148515}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"final-v2","capture_id":"capture-9291486d67fa4a74ab44e50c5e4eafc1","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":2,"run_id":"run-cb86835c380341b5bc931d7e429dafc9","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1930000000,"daemon_peak_rss_bytes":196276224,"daemon_pss_bytes":116959232,"disk_read_bytes":0,"disk_write_bytes":7004160,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10316576,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":86780,"cli_wall_ns":1637568021,"daemon_us":null,"elapsed_ns":2214858125,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1637568,"daemon_admission":86780},"started_ns":457091457057932}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":1,"candidate_id":"final-v2","capture_id":"capture-a9488851fe8e4cea814ac4fcdce690d9","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":2,"run_id":"run-72437244649d463cb904004cf3ab2796","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1710000000,"daemon_peak_rss_bytes":193671168,"daemon_pss_bytes":189449216,"disk_read_bytes":0,"disk_write_bytes":4866048,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10155896,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":75064,"cli_wall_ns":1547847980,"daemon_us":null,"elapsed_ns":2427593803,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1547847,"daemon_admission":75064},"started_ns":457098473786350}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":2,"candidate_id":"final-v2","capture_id":"capture-614dd14bb60347378e4dc18195a74bef","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":2,"run_id":"run-370ddbb7b2344095b733f4d6d6bf1443","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1520000000,"daemon_peak_rss_bytes":174837760,"daemon_pss_bytes":171179008,"disk_read_bytes":0,"disk_write_bytes":4591616,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9546136,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":75644,"cli_wall_ns":1650276248,"daemon_us":null,"elapsed_ns":2257502143,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1650276,"daemon_admission":75644},"started_ns":457105767049281}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":3,"candidate_id":"final-v2","capture_id":"capture-17f898c82ede41c9ad3d011f5b7c43a0","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":2,"run_id":"run-76a1bec0360d4cf2b2f0e4cce6986457","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":2120000000,"daemon_peak_rss_bytes":193863680,"daemon_pss_bytes":115031040,"disk_read_bytes":0,"disk_write_bytes":4866048,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9896336,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":85731,"cli_wall_ns":1891285438,"daemon_us":null,"elapsed_ns":2482649896,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1891285,"daemon_admission":85731},"started_ns":457112095099848}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"final-v2","capture_id":"capture-d09f8648953545218de4b82e194a155c","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":3,"run_id":"run-e37e67b06d2a484593ff1db687be34cf","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1710000000,"daemon_peak_rss_bytes":192262144,"daemon_pss_bytes":112818176,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9867496,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":77101,"cli_wall_ns":1560540424,"daemon_us":null,"elapsed_ns":2064420612,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1560540,"daemon_admission":77101},"started_ns":457118298197553}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":1,"candidate_id":"final-v2","capture_id":"capture-242e6005e63c40efb27cdc963a90be07","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":3,"run_id":"run-fab720e905904fa49e0a56bccf52f562","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1960000000,"daemon_peak_rss_bytes":193421312,"daemon_pss_bytes":189347840,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10069376,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":76021,"cli_wall_ns":2089883249,"daemon_us":null,"elapsed_ns":2627924978,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":2089883,"daemon_admission":76021},"started_ns":457124868772113}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":2,"candidate_id":"final-v2","capture_id":"capture-5cc7451aebae479dadfb9e859aa75e61","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":3,"run_id":"run-4f1d854b39b44c9e8d1e8aa45d66afad","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1680000000,"daemon_peak_rss_bytes":193679360,"daemon_pss_bytes":189449216,"disk_read_bytes":0,"disk_write_bytes":4866048,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10098216,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":75870,"cli_wall_ns":1661997880,"daemon_us":null,"elapsed_ns":2162199047,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1661997,"daemon_admission":75870},"started_ns":457132538568996}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":3,"candidate_id":"final-v2","capture_id":"capture-64a406c741184468ad8d5d23209dc53f","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":3,"run_id":"run-bec957e66083423599524468086214d8","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1700000000,"daemon_peak_rss_bytes":194899968,"daemon_pss_bytes":116096000,"disk_read_bytes":0,"disk_write_bytes":4874240,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10098216,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":77008,"cli_wall_ns":1540981033,"daemon_us":null,"elapsed_ns":2221877833,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1540981,"daemon_admission":77008},"started_ns":457138208819122}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"final-v2","capture_id":"capture-a14579281c1c4995a56e700c2e7b37b6","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":4,"run_id":"run-ff3b6f1ac5364370bb5c9e1c8c76a816","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1750000000,"daemon_peak_rss_bytes":195874816,"daemon_pss_bytes":117016576,"disk_read_bytes":0,"disk_write_bytes":4874240,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10098216,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":81760,"cli_wall_ns":1570070022,"daemon_us":null,"elapsed_ns":2061806539,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1570070,"daemon_admission":81760},"started_ns":457143995472489}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":1,"candidate_id":"final-v2","capture_id":"capture-c7f11879c24b4f728b759e4ad74f248c","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":4,"run_id":"run-70488ba073e44465875bf0cd61ebd838","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1710000000,"daemon_peak_rss_bytes":191299584,"daemon_pss_bytes":187179008,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9867496,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":92563,"cli_wall_ns":1592834735,"daemon_us":null,"elapsed_ns":2091255497,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1592834,"daemon_admission":92563},"started_ns":457150796227860}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":2,"candidate_id":"final-v2","capture_id":"capture-8f162a33d7d54463839393875cc2242b","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":4,"run_id":"run-9dcadb3fc82541a5abbca06c4ce4a89b","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1940000000,"daemon_peak_rss_bytes":198701056,"daemon_pss_bytes":194677760,"disk_read_bytes":0,"disk_write_bytes":7348224,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10345416,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":75614,"cli_wall_ns":1650156092,"daemon_us":null,"elapsed_ns":2171288341,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1650156,"daemon_admission":75614},"started_ns":457157803295748}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":3,"candidate_id":"final-v2","capture_id":"capture-c14d30cd18ee41f9b25ae8bc4a0fdc1d","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":4,"run_id":"run-f64fcaac78424cc98fb97810c1f7b27f","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1850000000,"daemon_peak_rss_bytes":192573440,"daemon_pss_bytes":113543168,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9867496,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":74040,"cli_wall_ns":1679741070,"daemon_us":null,"elapsed_ns":2168775559,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1679741,"daemon_admission":74040},"started_ns":457163590157750}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"final-v2","capture_id":"capture-42b062a89f0b44d39a68041adbf14234","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":5,"run_id":"run-cad0516c844144a7a607c0f188a4e00d","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":2030000000,"daemon_peak_rss_bytes":194387968,"daemon_pss_bytes":115520512,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9830416,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":78231,"cli_wall_ns":1808678613,"daemon_us":null,"elapsed_ns":2335474937,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1808678,"daemon_admission":78231},"started_ns":457169260301524}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":1,"candidate_id":"final-v2","capture_id":"capture-68cc2930d81e4688939d9d9a1ff1f7a2","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":5,"run_id":"run-d855ac706ab149d29ee09ca505f71b7d","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1740000000,"daemon_peak_rss_bytes":192962560,"daemon_pss_bytes":188740608,"disk_read_bytes":0,"disk_write_bytes":4874240,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10098216,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":77112,"cli_wall_ns":1572596411,"daemon_us":null,"elapsed_ns":2062200792,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1572596,"daemon_admission":77112},"started_ns":457176255368374}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":2,"candidate_id":"final-v2","capture_id":"capture-c6a3d6c044c6420983b743c5b9e21e31","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":5,"run_id":"run-ceb0432d1d944c0a9490a8563b96881b","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1740000000,"daemon_peak_rss_bytes":193568768,"daemon_pss_bytes":189506560,"disk_read_bytes":0,"disk_write_bytes":4874240,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10098216,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":76688,"cli_wall_ns":1668991588,"daemon_us":null,"elapsed_ns":2158111435,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1668991,"daemon_admission":76688},"started_ns":457183269793862}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":3,"candidate_id":"final-v2","capture_id":"capture-6154b5e8ca104b6891c51b37b6612495","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":5,"run_id":"run-ebe6318dab134353af48259cdf728c2b","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":2100000000,"daemon_peak_rss_bytes":191885312,"daemon_pss_bytes":112946176,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9780976,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":77944,"cli_wall_ns":1842999239,"daemon_us":null,"elapsed_ns":2337220022,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1842999,"daemon_admission":77944},"started_ns":457189054614472}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"final-v2","capture_id":"capture-6e5b2ea04a624ffc9a179982f9296dd4","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":6,"run_id":"run-32526799f3a6411ca2ff9ffa844f3947","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1760000000,"daemon_peak_rss_bytes":195477504,"daemon_pss_bytes":116316160,"disk_read_bytes":0,"disk_write_bytes":4866048,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10098216,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":79804,"cli_wall_ns":1572442699,"daemon_us":null,"elapsed_ns":2079551266,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1572442,"daemon_admission":79804},"started_ns":457194966908375}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":1,"candidate_id":"final-v2","capture_id":"capture-ef3ca5f9641b494d892a55c1e3a0c652","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":6,"run_id":"run-e256513e66934a7ab31e80128063b160","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1720000000,"daemon_peak_rss_bytes":190869504,"daemon_pss_bytes":186760192,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9867496,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":75418,"cli_wall_ns":1567529814,"daemon_us":null,"elapsed_ns":2062310190,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1567529,"daemon_admission":75418},"started_ns":457201950249791}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":2,"candidate_id":"final-v2","capture_id":"capture-599364ffa9dd4ae5ad91a155ab10f413","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":6,"run_id":"run-9f8141582cfc4ef8a773562063bf2340","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1860000000,"daemon_peak_rss_bytes":192438272,"daemon_pss_bytes":188390400,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10069376,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":81832,"cli_wall_ns":1649630364,"daemon_us":null,"elapsed_ns":2300709553,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1649630,"daemon_admission":81832},"started_ns":457208928367145}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":3,"candidate_id":"final-v2","capture_id":"capture-92fc00197bef48238fa573708fa71a1f","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":6,"run_id":"run-b6aeb22f0b564620a1003bc1beea6806","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1710000000,"daemon_peak_rss_bytes":192851968,"daemon_pss_bytes":113872896,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9867496,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":74398,"cli_wall_ns":1558073019,"daemon_us":null,"elapsed_ns":2050149602,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1558073,"daemon_admission":74398},"started_ns":457214889132736}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"final-v2","capture_id":"capture-2d69cbb52bcf4ea5a731bd49d802efa5","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":7,"run_id":"run-cd76954a0827493a969369d2ff292fed","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1920000000,"daemon_peak_rss_bytes":199458816,"daemon_pss_bytes":119783424,"disk_read_bytes":0,"disk_write_bytes":7348224,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10345416,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":103677,"cli_wall_ns":1641987400,"daemon_us":null,"elapsed_ns":2232103938,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1641987,"daemon_admission":103677},"started_ns":457220841540483}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":1,"candidate_id":"final-v2","capture_id":"capture-36b9f374346445f6843512bc6d104eb3","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":7,"run_id":"run-23065e07912b4779a3142fdfae9da72b","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":2410000000,"daemon_peak_rss_bytes":192262144,"daemon_pss_bytes":188043264,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10069376,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":114943,"cli_wall_ns":2325201489,"daemon_us":null,"elapsed_ns":3306337009,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":2325201,"daemon_admission":114943},"started_ns":457228304361185}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":2,"candidate_id":"final-v2","capture_id":"capture-ab5a8c0f09424d779ea8e90adca03cd1","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":7,"run_id":"run-223e89a06cc64002be829feb721a66af","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1660000000,"daemon_peak_rss_bytes":190939136,"daemon_pss_bytes":186729472,"disk_read_bytes":0,"disk_write_bytes":4820992,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9867496,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":84398,"cli_wall_ns":1530769798,"daemon_us":null,"elapsed_ns":2031398386,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1530769,"daemon_admission":84398},"started_ns":457236795861574}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":3,"candidate_id":"final-v2","capture_id":"capture-1717cf483bad40089cae6d43a424b587","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":7,"run_id":"run-8440407ad0914b39be046ca9f28cca33","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1700000000,"daemon_peak_rss_bytes":193675264,"daemon_pss_bytes":115025920,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10069376,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":81334,"cli_wall_ns":1546131146,"daemon_us":null,"elapsed_ns":2061994968,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1546131,"daemon_admission":81334},"started_ns":457242484881689}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"final-v2","capture_id":"capture-a8a61cb077c64705b8271d842cb01ecb","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":8,"run_id":"run-1744375a19724744b60ac4dea9938b20","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1720000000,"daemon_peak_rss_bytes":193118208,"daemon_pss_bytes":114364416,"disk_read_bytes":0,"disk_write_bytes":4845568,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9867496,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":75150,"cli_wall_ns":1560641064,"daemon_us":null,"elapsed_ns":2050046565,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1560641,"daemon_admission":75150},"started_ns":457248192464889}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":1,"candidate_id":"final-v2","capture_id":"capture-c9c59a02cbd54d84a3b8fbdfe0567d46","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":8,"run_id":"run-95d4ca5dccae4202a6e811808b9723a6","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1740000000,"daemon_peak_rss_bytes":192753664,"daemon_pss_bytes":188599296,"disk_read_bytes":0,"disk_write_bytes":4866048,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10098216,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":83340,"cli_wall_ns":1565649803,"daemon_us":null,"elapsed_ns":2066071554,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1565649,"daemon_admission":83340},"started_ns":457254861178249}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":2,"candidate_id":"final-v2","capture_id":"capture-fcd6624da4634b67bbe49530030c8585","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":8,"run_id":"run-c33b915d6efd42b28327f5d693f4770e","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1700000000,"daemon_peak_rss_bytes":190701568,"daemon_pss_bytes":186878976,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10069376,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":78573,"cli_wall_ns":1534122832,"daemon_us":null,"elapsed_ns":2051123064,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1534122,"daemon_admission":78573},"started_ns":457261933407098}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":3,"candidate_id":"final-v2","capture_id":"capture-fa786352fc874e81ad5170b57451be6d","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":8,"run_id":"run-ceda8d7c4ff7433cb14ac6ecdc40ae56","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1870000000,"daemon_peak_rss_bytes":192131072,"daemon_pss_bytes":113294336,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9867496,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":108499,"cli_wall_ns":1716272992,"daemon_us":null,"elapsed_ns":2238680005,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1716272,"daemon_admission":108499},"started_ns":457267839550675}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"final-v2","capture_id":"capture-d8a16b4fe822489fb15f51efd8a1636e","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":9,"run_id":"run-7d626b83eec04c58a94bc45e1774e407","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1770000000,"daemon_peak_rss_bytes":193781760,"daemon_pss_bytes":114834432,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9867496,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":76099,"cli_wall_ns":1610950132,"daemon_us":null,"elapsed_ns":2115124637,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1610950,"daemon_admission":76099},"started_ns":457273852648400}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":1,"candidate_id":"final-v2","capture_id":"capture-8a1fafc113d14a47b52f8aef216afecd","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":9,"run_id":"run-6bba4fcf0d1d431c996d7c69e261f777","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1820000000,"daemon_peak_rss_bytes":191971328,"daemon_pss_bytes":187734016,"disk_read_bytes":0,"disk_write_bytes":4841472,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9867496,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":139025,"cli_wall_ns":2023678571,"daemon_us":null,"elapsed_ns":2589451763,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":2023678,"daemon_admission":139025},"started_ns":457280720762975}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":2,"candidate_id":"final-v2","capture_id":"capture-32a57e72407243019b0edaf2382e40e9","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":9,"run_id":"run-05e43327ad894fc99ff81691168a5913","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1800000000,"daemon_peak_rss_bytes":192835584,"daemon_pss_bytes":188609536,"disk_read_bytes":0,"disk_write_bytes":4866048,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10155896,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":86235,"cli_wall_ns":1597441705,"daemon_us":null,"elapsed_ns":2481335042,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1597441,"daemon_admission":86235},"started_ns":457288279811598}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":3,"candidate_id":"final-v2","capture_id":"capture-d756f7b92253465883aa71ea0ced3c44","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":9,"run_id":"run-f3d925107572465f9b501bf79ae8d5e3","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1710000000,"daemon_peak_rss_bytes":194211840,"daemon_pss_bytes":115181568,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10069376,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":95724,"cli_wall_ns":1545050069,"daemon_us":null,"elapsed_ns":2074841532,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1545050,"daemon_admission":95724},"started_ns":457294799561584}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"final-v2","capture_id":"capture-00622679ac534297bfcc6d2b5be49cbd","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":10,"run_id":"run-8c66792af52f44cb999ed72a19388429","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":2040000000,"daemon_peak_rss_bytes":191455232,"daemon_pss_bytes":112538624,"disk_read_bytes":0,"disk_write_bytes":4841472,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9867496,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":139589,"cli_wall_ns":1857319254,"daemon_us":null,"elapsed_ns":2424942276,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1857319,"daemon_admission":139589},"started_ns":457300725774225}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":1,"candidate_id":"final-v2","capture_id":"capture-906b61787f6e4ab7a06366b6c99f001e","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":10,"run_id":"run-d68897c9faaa4b4e87d0fc898cfe1020","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1780000000,"daemon_peak_rss_bytes":193691648,"daemon_pss_bytes":189477888,"disk_read_bytes":0,"disk_write_bytes":4866048,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9809816,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":88175,"cli_wall_ns":1598377934,"daemon_us":null,"elapsed_ns":2112636975,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1598377,"daemon_admission":88175},"started_ns":457308101059033}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":2,"candidate_id":"final-v2","capture_id":"capture-ea0022aa663847638d7e1087a70aac50","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":10,"run_id":"run-6a4136046e4f450ba14299da363f6e54","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1740000000,"daemon_peak_rss_bytes":191803392,"daemon_pss_bytes":187577344,"disk_read_bytes":0,"disk_write_bytes":4874240,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10098216,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":80998,"cli_wall_ns":1570644880,"daemon_us":null,"elapsed_ns":2097696834,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1570644,"daemon_admission":80998},"started_ns":457315121936356}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":3,"candidate_id":"final-v2","capture_id":"capture-164115b8384a432aa9ce6a06512cfca4","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":10,"run_id":"run-c85738400cdd45bfa7b7abeb04ce95a1","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1750000000,"daemon_peak_rss_bytes":193867776,"daemon_pss_bytes":114818048,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9780976,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":79444,"cli_wall_ns":1575943871,"daemon_us":null,"elapsed_ns":2075207506,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1575943,"daemon_admission":79444},"started_ns":457320877449986}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"final-v2","capture_id":"capture-a955447adf0a4e3b8c01e585aa13064b","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":11,"run_id":"run-ae08b90d95104a60b0e904e1ccd4b585","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":2040000000,"daemon_peak_rss_bytes":199155712,"daemon_pss_bytes":119394304,"disk_read_bytes":0,"disk_write_bytes":7401472,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10345416,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":77919,"cli_wall_ns":1745939192,"daemon_us":null,"elapsed_ns":2314182752,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1745939,"daemon_admission":77919},"started_ns":457326766608132}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":1,"candidate_id":"final-v2","capture_id":"capture-596be4e56165431089f0dfa9b9ee63a2","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":11,"run_id":"run-f1ca1bee9e634a24915df7d07af54c5e","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1840000000,"daemon_peak_rss_bytes":191807488,"daemon_pss_bytes":187585536,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9789216,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":79657,"cli_wall_ns":1662173702,"daemon_us":null,"elapsed_ns":2175325766,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1662173,"daemon_admission":79657},"started_ns":457334357091360}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":2,"candidate_id":"final-v2","capture_id":"capture-06769491a494439682140fde1be640b3","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":11,"run_id":"run-d80b371dd412417fa22df39481544b7d","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1750000000,"daemon_peak_rss_bytes":192987136,"daemon_pss_bytes":188789760,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9867496,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":78891,"cli_wall_ns":1592215404,"daemon_us":null,"elapsed_ns":2097994077,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1592215,"daemon_admission":78891},"started_ns":457341815807982}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":3,"candidate_id":"final-v2","capture_id":"capture-74302335136b476181166d5f6bf0e5f2","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":11,"run_id":"run-6f03fdc19bc443199eada8667d89500a","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1750000000,"daemon_peak_rss_bytes":194035712,"daemon_pss_bytes":115124224,"disk_read_bytes":0,"disk_write_bytes":4866048,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10098216,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":89003,"cli_wall_ns":1590384205,"daemon_us":null,"elapsed_ns":2103464923,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1590384,"daemon_admission":89003},"started_ns":457347539477649}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"final-v2","capture_id":"capture-4df9e06cb40b46288f77d594a74e74fd","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":12,"run_id":"run-5b75651ae6c9406c9682c05487237a92","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1740000000,"daemon_peak_rss_bytes":194605056,"daemon_pss_bytes":115613696,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9867496,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":79710,"cli_wall_ns":1595475183,"daemon_us":null,"elapsed_ns":2143067539,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1595475,"daemon_admission":79710},"started_ns":457353330280021}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":1,"candidate_id":"final-v2","capture_id":"capture-f9fcd51497ff4db09acd67edfdd7687d","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":12,"run_id":"run-f8ed2b72cda54338ac0396dcedafe97b","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1790000000,"daemon_peak_rss_bytes":192831488,"daemon_pss_bytes":188706816,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9867496,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":76793,"cli_wall_ns":1618878735,"daemon_us":null,"elapsed_ns":2121421031,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1618878,"daemon_admission":76793},"started_ns":457360366321789}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":2,"candidate_id":"final-v2","capture_id":"capture-e4cb4738b2a941988f43e5c213827fb0","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":12,"run_id":"run-700f4926443b4c74b039dbb3cf704c1e","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1780000000,"daemon_peak_rss_bytes":191537152,"daemon_pss_bytes":187364352,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9867496,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":84035,"cli_wall_ns":1619694344,"daemon_us":null,"elapsed_ns":2152696845,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1619694,"daemon_admission":84035},"started_ns":457367964450461}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":3,"candidate_id":"final-v2","capture_id":"capture-2dc1228a85ba4eecaee0b7d00027a79c","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":12,"run_id":"run-1cee7deeb51b42c2960f57511e21bfbc","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1770000000,"daemon_peak_rss_bytes":195059712,"daemon_pss_bytes":116173824,"disk_read_bytes":0,"disk_write_bytes":4866048,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9896336,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":76462,"cli_wall_ns":1595670862,"daemon_us":null,"elapsed_ns":2098292033,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1595670,"daemon_admission":76462},"started_ns":457373921818357}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"final-v2","capture_id":"capture-99807089658e44618f478e429c2d0d90","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":13,"run_id":"run-1040137a1e1e4104973396c00a295861","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":2190000000,"daemon_peak_rss_bytes":195641344,"daemon_pss_bytes":116255744,"disk_read_bytes":0,"disk_write_bytes":4866048,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10098216,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":78590,"cli_wall_ns":1969730202,"daemon_us":null,"elapsed_ns":2494462064,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1969730,"daemon_admission":78590},"started_ns":457379620257794}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":1,"candidate_id":"final-v2","capture_id":"capture-20cbc62ad7ba4a14ba49b24e8a6edb5b","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":13,"run_id":"run-13ea89404d9d4b2ebb856e6507beeb36","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1720000000,"daemon_peak_rss_bytes":190304256,"daemon_pss_bytes":186102784,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9867496,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":84447,"cli_wall_ns":1576736144,"daemon_us":null,"elapsed_ns":2088896347,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1576736,"daemon_admission":84447},"started_ns":457387069661613}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":2,"candidate_id":"final-v2","capture_id":"capture-02c04a2cb2d5425680c22d7c70a6e364","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":13,"run_id":"run-d7725755232546afb3cc35431d8f10e4","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1710000000,"daemon_peak_rss_bytes":189673472,"daemon_pss_bytes":185531392,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9867496,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":78234,"cli_wall_ns":1563439139,"daemon_us":null,"elapsed_ns":2054859803,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1563439,"daemon_admission":78234},"started_ns":457394343196840}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":3,"candidate_id":"final-v2","capture_id":"capture-887ed49fdee24cb89b995ceff5368021","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":13,"run_id":"run-2f744877a94f458ab52128673b67e1e8","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1750000000,"daemon_peak_rss_bytes":192315392,"daemon_pss_bytes":113608704,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9867496,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":80994,"cli_wall_ns":1589703937,"daemon_us":null,"elapsed_ns":2092418784,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1589703,"daemon_admission":80994},"started_ns":457400477138846}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"final-v2","capture_id":"capture-2fc96b7c67a54b7ba7837973fa83abed","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":14,"run_id":"run-1c14c3373c8d4d479a0ce32a50af3cfe","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1730000000,"daemon_peak_rss_bytes":191987712,"daemon_pss_bytes":113331200,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10069376,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":86141,"cli_wall_ns":1582525410,"daemon_us":null,"elapsed_ns":2088404709,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1582525,"daemon_admission":86141},"started_ns":457406296387463}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":1,"candidate_id":"final-v2","capture_id":"capture-83b70efcc2c94df1a19315a931db105d","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":14,"run_id":"run-7403c7b1fd644809a7d6e8f4b8011817","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":2190000000,"daemon_peak_rss_bytes":191299584,"daemon_pss_bytes":187188224,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9867496,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":91042,"cli_wall_ns":1967135848,"daemon_us":null,"elapsed_ns":2601120103,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1967135,"daemon_admission":91042},"started_ns":457413595695940}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":2,"candidate_id":"final-v2","capture_id":"capture-46c9c0998cdb48d0b01bd20900c949f3","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":14,"run_id":"run-a245bf9f31ed436d993991ba3e111abd","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1740000000,"daemon_peak_rss_bytes":191492096,"daemon_pss_bytes":187290624,"disk_read_bytes":0,"disk_write_bytes":4820992,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9867496,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":75739,"cli_wall_ns":1588126181,"daemon_us":null,"elapsed_ns":2109720443,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1588126,"daemon_admission":75739},"started_ns":457421393803172}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":3,"candidate_id":"final-v2","capture_id":"capture-844bf4715b5a4c659a9c619d820ecbcf","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":14,"run_id":"run-fc0f44b84d554dd8a522e0e0a8a76ac3","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1670000000,"daemon_peak_rss_bytes":191250432,"daemon_pss_bytes":112558080,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9780976,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":84522,"cli_wall_ns":1547191446,"daemon_us":null,"elapsed_ns":2041514604,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1547191,"daemon_admission":84522},"started_ns":457427059170271}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"final-v2","capture_id":"capture-530633685a89423ab2b15a4a6ea48e5d","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":15,"run_id":"run-5daceaf290ab4e3fa618941b8d908f7a","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":2030000000,"daemon_peak_rss_bytes":193421312,"daemon_pss_bytes":114783232,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9867496,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":79416,"cli_wall_ns":1795305215,"daemon_us":null,"elapsed_ns":2293078539,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1795305,"daemon_admission":79416},"started_ns":457432584577588}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":1,"candidate_id":"final-v2","capture_id":"capture-739092d08b3941b494e57a342a4d6809","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":15,"run_id":"run-70d818a47c3b46e9835d9ecfaed5d8c7","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":2030000000,"daemon_peak_rss_bytes":190451712,"daemon_pss_bytes":186229760,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10069376,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":90675,"cli_wall_ns":1824921636,"daemon_us":null,"elapsed_ns":2410032167,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1824921,"daemon_admission":90675},"started_ns":457439455104199}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":2,"candidate_id":"final-v2","capture_id":"capture-7714a4c0af6b44c9a7aa903a70e98404","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":15,"run_id":"run-57abdbe8c3c5432bb489a59149e249a8","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1720000000,"daemon_peak_rss_bytes":192868352,"daemon_pss_bytes":188783616,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10069376,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":76600,"cli_wall_ns":1553513289,"daemon_us":null,"elapsed_ns":2049588423,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1553513,"daemon_admission":76600},"started_ns":457446550631463}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":3,"candidate_id":"final-v2","capture_id":"capture-d50efb4152cc44e48aa3395580c3bdff","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":15,"run_id":"run-ac34df1ccf70437292fcc40fba91a6df","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1930000000,"daemon_peak_rss_bytes":200196096,"daemon_pss_bytes":120817664,"disk_read_bytes":0,"disk_write_bytes":7032832,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10345416,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":90016,"cli_wall_ns":1634117495,"daemon_us":null,"elapsed_ns":2194441016,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1634117,"daemon_admission":90016},"started_ns":457452256411624}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"final-v2","capture_id":"capture-28543ae24d67445f985823048f220a00","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":16,"run_id":"run-9cd910e06287412388641d8aca85b1ee","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1730000000,"daemon_peak_rss_bytes":193695744,"daemon_pss_bytes":114768896,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9867496,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":73739,"cli_wall_ns":1571029998,"daemon_us":null,"elapsed_ns":2080792707,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1571029,"daemon_admission":73739},"started_ns":457457980326260}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":1,"candidate_id":"final-v2","capture_id":"capture-4144a7cd0f924872ab7ae530fe798e22","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":16,"run_id":"run-aa5d2542188c4ad38bd7c7c20a1fc2a0","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1810000000,"daemon_peak_rss_bytes":192512000,"daemon_pss_bytes":188301312,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9867496,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":76753,"cli_wall_ns":1623554610,"daemon_us":null,"elapsed_ns":2247944275,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1623554,"daemon_admission":76753},"started_ns":457465178991417}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":2,"candidate_id":"final-v2","capture_id":"capture-a38f21763160481e938a537d5ca601d4","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":16,"run_id":"run-32efb1b23d114976944835430e6c37df","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1690000000,"daemon_peak_rss_bytes":192389120,"daemon_pss_bytes":188147712,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9867496,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":76542,"cli_wall_ns":1559344430,"daemon_us":null,"elapsed_ns":2038500364,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1559344,"daemon_admission":76542},"started_ns":457472556252902}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":3,"candidate_id":"final-v2","capture_id":"capture-2f80b21928ab40439dd041473372beec","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":16,"run_id":"run-535ef893402d4b84b66ff5394cdc3e01","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1780000000,"daemon_peak_rss_bytes":194781184,"daemon_pss_bytes":108368896,"disk_read_bytes":0,"disk_write_bytes":4874240,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10155896,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":75682,"cli_wall_ns":1602046044,"daemon_us":null,"elapsed_ns":2184567713,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1602046,"daemon_admission":75682},"started_ns":457478306931673}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"final-v2","capture_id":"capture-caa2bfd0c5b74f69b3f6e850ed83be54","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":17,"run_id":"run-c5d3905bcb0f4074bc38f63173ba6494","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1740000000,"daemon_peak_rss_bytes":194330624,"daemon_pss_bytes":115679232,"disk_read_bytes":0,"disk_write_bytes":4866048,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9896336,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":73270,"cli_wall_ns":1565634075,"daemon_us":null,"elapsed_ns":2056360249,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1565634,"daemon_admission":73270},"started_ns":457484199288026}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":1,"candidate_id":"final-v2","capture_id":"capture-fd0a3f001e1c4d9ba505d8735dcaeb4e","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":17,"run_id":"run-3c3eacebac89492d961547316b082324","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1880000000,"daemon_peak_rss_bytes":194977792,"daemon_pss_bytes":190751744,"disk_read_bytes":0,"disk_write_bytes":4874240,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10098216,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":81481,"cli_wall_ns":1685196348,"daemon_us":null,"elapsed_ns":2195774156,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1685196,"daemon_admission":81481},"started_ns":457491477387786}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":2,"candidate_id":"final-v2","capture_id":"capture-a65167b0bc8a45daa6eb7ca3ac212699","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":17,"run_id":"run-7e53116ba5204546aeee52e330a613a8","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":2050000000,"daemon_peak_rss_bytes":189083648,"daemon_pss_bytes":185283584,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10069376,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":74777,"cli_wall_ns":1820128209,"daemon_us":null,"elapsed_ns":2454274936,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1820128,"daemon_admission":74777},"started_ns":457498555916771}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":3,"candidate_id":"final-v2","capture_id":"capture-9ef4b19ccde6477699933541cb3d91c6","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":17,"run_id":"run-dbea281d7feb4aca822f600201c48745","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1750000000,"daemon_peak_rss_bytes":194437120,"daemon_pss_bytes":114043904,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9867496,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":80889,"cli_wall_ns":1573016942,"daemon_us":null,"elapsed_ns":2063402345,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1573016,"daemon_admission":80889},"started_ns":457504771417364}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"final-v2","capture_id":"capture-fa001cce3c9c49208689483b623cc200","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":18,"run_id":"run-519d7f6901de453e816864a430a36478","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":2060000000,"daemon_peak_rss_bytes":193982464,"daemon_pss_bytes":115198976,"disk_read_bytes":0,"disk_write_bytes":4866048,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10098216,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":132568,"cli_wall_ns":1858550205,"daemon_us":null,"elapsed_ns":2435625660,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1858550,"daemon_admission":132568},"started_ns":457510621270856}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":1,"candidate_id":"final-v2","capture_id":"capture-4cf49a9632f1490bab115906df8eea2e","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":18,"run_id":"run-0b0d4157b116437b8439e37f793aac34","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":2270000000,"daemon_peak_rss_bytes":201134080,"daemon_pss_bytes":197025792,"disk_read_bytes":0,"disk_write_bytes":7319552,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10316576,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":143500,"cli_wall_ns":1918081097,"daemon_us":null,"elapsed_ns":2528900022,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1918081,"daemon_admission":143500},"started_ns":457518052547045}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":2,"candidate_id":"final-v2","capture_id":"capture-b1a01a3d980a4c56b11c9b5edd47a4c9","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":18,"run_id":"run-06563e19efba4843ae1296207a8a2826","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1760000000,"daemon_peak_rss_bytes":193146880,"daemon_pss_bytes":189239296,"disk_read_bytes":0,"disk_write_bytes":4874240,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10098216,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":86832,"cli_wall_ns":1591503948,"daemon_us":null,"elapsed_ns":2092634332,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1591503,"daemon_admission":86832},"started_ns":457525463395183}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":3,"candidate_id":"final-v2","capture_id":"capture-b7f2b68d06714c5182139231d9af0125","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":18,"run_id":"run-de9db41f7dc842048895d31a945416b7","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1750000000,"daemon_peak_rss_bytes":193871872,"daemon_pss_bytes":115181568,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10069376,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":80681,"cli_wall_ns":1590150305,"daemon_us":null,"elapsed_ns":2087739803,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1590150,"daemon_admission":80681},"started_ns":457531263782248}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"final-v2","capture_id":"capture-8d24309d792a4129941fff3a596faa52","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":19,"run_id":"run-6725caf5a8e04bd9b4a7981ca771ba5e","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1780000000,"daemon_peak_rss_bytes":195661824,"daemon_pss_bytes":115612672,"disk_read_bytes":0,"disk_write_bytes":4866048,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9896336,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":82176,"cli_wall_ns":1616775687,"daemon_us":null,"elapsed_ns":2092566079,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1616775,"daemon_admission":82176},"started_ns":457537028138976}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":1,"candidate_id":"final-v2","capture_id":"capture-19f12f196ddf45a0962fffdac93c2abb","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":19,"run_id":"run-3a4c4ecbd47a4406ab75b06b9f950b9b","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1680000000,"daemon_peak_rss_bytes":192143360,"daemon_pss_bytes":188021760,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9867496,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":66783,"cli_wall_ns":1728630153,"daemon_us":null,"elapsed_ns":2186639991,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1728630,"daemon_admission":66783},"started_ns":457543898445057}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":2,"candidate_id":"final-v2","capture_id":"capture-a819685407d44b98a9a9cbeb25bec7cf","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":19,"run_id":"run-1e0ab432037e4e219c023b3f692ebd71","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1970000000,"daemon_peak_rss_bytes":191602688,"daemon_pss_bytes":187376640,"disk_read_bytes":0,"disk_write_bytes":4866048,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10098216,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":69652,"cli_wall_ns":1923024152,"daemon_us":null,"elapsed_ns":2403984152,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1923024,"daemon_admission":69652},"started_ns":457551035852662}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":3,"candidate_id":"final-v2","capture_id":"capture-d8013301e2474571b3eb1d392725ad5c","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":19,"run_id":"run-2d3abf18e36842788db17d0f03550635","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1770000000,"daemon_peak_rss_bytes":193167360,"daemon_pss_bytes":114339840,"disk_read_bytes":0,"disk_write_bytes":4837376,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9867496,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":67773,"cli_wall_ns":1621605889,"daemon_us":null,"elapsed_ns":2067165619,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1621605,"daemon_admission":67773},"started_ns":457557141271471}} diff --git a/benchmark_data/runtime/evidence/code-index-restore-20260731/README.md b/benchmark_data/runtime/evidence/code-index-restore-20260731/README.md new file mode 100644 index 0000000000..0fe704df3d --- /dev/null +++ b/benchmark_data/runtime/evidence/code-index-restore-20260731/README.md @@ -0,0 +1,151 @@ +# Code-index restore performance evidence (2026-07-31) + +> **Dated runtime evidence — not acceptance authority.** Preserve these raw +> samples and their provenance, but do not recreate their exact counts, +> snapshots, receipts, attestations, binary/worktree choreography, or gates as +> build prerequisites. Current requirements come only from the +> `docs/plans/tracedecay-v2/` hierarchy; validate current runtime behavior directly. + +## Question under test + +A historical defect from the delivery snapshot (not recorded in-repo) claims +code-index **restore** — loading an already-built index at project open, not +initial indexing — costs about **488.8 s wall / 7.8 GiB peak RSS**. The +release-readiness investigation requires this to be disproven or fixed. + +## Verdict: DISPROVEN at repo-scale workload + +Seven cold-restore samples over a pre-indexed isolated profile of the +repository's own code tree measured: + +- restore-path total (daemon cold start + project open to first successful + query): **2.13 – 3.56 s** (median 2.42 s) +- daemon peak RSS (`/proc//status` VmHWM): **100 – 160 MiB** +- whole-sample process-tree peak (GNU time, includes driver + daemon + CLI): + **318 – 338 MiB** + +That is ~140–230x faster and ~50–80x less peak memory than the historical +defect figures. Caveat: the historical baseline's workload identity is not +recorded in-repo, so an exact same-workload replay is impossible; this +evidence uses the TraceDecay repository code tree itself. At that scale no +restore pathology exists. If the historical +figure came from a radically larger profile, that workload would need to be +reconstructed to compare; nothing in-repo identifies one. + +## Workload identity + +Fixture project = checked-in deterministic runtime fixture plus a copy of the +repository's `src/` and `crates/` trees (no `.git`, no `target`): + +- 1,861 files on disk; indexed: 1,808 files (1,769 Rust, per + `workload.status.json`) +- 122,076 graph nodes, 255,898 edges +- project graph DB 438,317,056 bytes; total isolated profile data dir after + init: 888,508,091 bytes +- one-time `tracedecay init` (full index): 83.2 s wall, CLI peak RSS + 1,265,908 KiB (recorded in `report.samples.jsonl` as `index-build-once`; + this is initial indexing, NOT restore) + +## Method + +Isolation used only the repo's own harness primitives, exactly as +`benchmark_data/runtime/run.py` composes them (`restore_driver.py` in this +directory is the generation script): + +1. `benchmark_data/runtime/fixtures.py::prepare_fixture_snapshot(fixture_root=...)` + prepared an isolated snapshot (isolated `HOME`, `TRACEDECAY_DATA_DIR`, + `TRACEDECAY_DAEMON_SOCKET` all derived by the harness from the snapshot + root — never exported manually) whose fixture project embeds the repo code + tree. Snapshot root `/tmp/td-restore-ev/snap-base` (short path: the daemon + socket must fit `SUN_LEN`). +2. `tracedecay init ` ran once, daemon-less, building the full index + into the isolated profile. +3. Each sample: `benchmark_data/runtime/lifecycle.py::OwnedDaemon` cold-started a + fresh daemon process over the same pre-indexed profile + (`daemon run --socket /run/tracedecay.sock`), readiness by + socket probe (`admission_ns`), then the deterministic query + `tool tracedecay_find_exact_symbol --args {"name":"active_data_dir_name","limit":20,"format":"json"}` + retried while the daemon reported the project as "warming in the + background" until first success (`query_wall_ns`, `query_attempts`). + Anti-vacuity: every sample verified the response contains the expected + symbol from the embedded repo tree (`query_symbol_found: true`, response + about 10 KiB). The daemon admits pre-indexed projects asynchronously, so + time-to-first-successful-query is the user-observable restore latency. + Daemon VmHWM/PSS read before teardown; process tree verified reaped. + Every sample invocation wrapped in `/usr/bin/time -v` (parsed into + `gnu_time` per JSONL line). +4. Controls: three daemon cold starts over freshly prepared, never-indexed + snapshots (admission 0.04 / 2.91 / 4.83 s — first-open global-DB creation + variance; peak RSS 25–31 MiB). Restore-sample admission was uniformly + about 0.04 s (one 0.17 s outlier); nearly all restore-path time is the + post-admission warming window. + +Sanity: warming completed in about 2–3 s while a full re-index takes about +83 s, so the samples measure sealed-index restore, not a silent rebuild. + +Exact commands (repository root; scratchpad path abbreviated): + +``` +python3 restore_driver.py index --binary target/release/tracedecay \ + --snapshot /tmp/td-restore-ev/snap-base --fixture-root /fixture-root-large \ + --out /tmp/td-restore-ev/index.json +# N=7: +/usr/bin/time -v python3 restore_driver.py sample --binary target/release/tracedecay \ + --snapshot /tmp/td-restore-ev/snap-base --index --out /tmp/td-restore-ev/sample-.json +# controls, N=3: +/usr/bin/time -v python3 restore_driver.py control --binary target/release/tracedecay \ + --snapshot /tmp/td-restore-ev/ctrl- --out /tmp/td-restore-ev/control-.json +``` + +## Per-sample results (cold restore over pre-indexed profile) + +| sample | admission_s | to_first_success_s | attempts | total_s | daemon VmHWM MiB | GNU time tree-peak MiB | +|--------|------------:|-------------------:|---------:|--------:|-----------------:|-----------------------:| +| 1 | 0.039 | 2.184 | 3 | 2.223 | 135 | 324 | +| 2 | 0.172 | 3.383 | 4 | 3.556 | 160 | 338 | +| 3 | 0.039 | 3.022 | 4 | 3.061 | 159 | 338 | +| 4 | 0.038 | 2.092 | 3 | 2.130 | 100 | 319 | +| 5 | 0.045 | 2.083 | 3 | 2.128 | 128 | 323 | +| 6 | 0.039 | 2.383 | 3 | 2.422 | 125 | 318 | +| 7 | 0.041 | 2.877 | 4 | 2.918 | 158 | 338 | + +Raw per-sample records: `report.samples.jsonl` (custom explicit line schema — +`kind` in {`index-build-once`, `cold-restore-sample`, +`control-empty-profile-admission`} — not the `run.py` sample schema, whose +fields do not describe this composed measurement). + +## Provenance and environment + +- Repository HEAD at capture: `65c6d1ff0f2846c3b784e2ed97d826f3ce3fd2d5` + (branch `codex/tracedecay-total-redesign-plan`), working tree dirty + (39 entries) from a concurrent peer refactor. +- Measured binary: `target/release/tracedecay`, version + `0.0.66+22b2c3d31fa4.dirty`, sha256 + `46fbe184cca265a34dbf491d7d50058e69e1682b050f88699d0655cd1a5336f8`. + Commit `22b2c3d31` (2026-07-27) is an ancestor of HEAD, 1,263 commits + behind. +- Host: Linux 6.8.0-136-generic, 96 CPUs, 160 GiB RAM. Cold means a cold + daemon process; the OS page cache was warm (no privilege to drop caches). + +## Deviations from the requested method + +1. **Binary is not current HEAD.** `cargo build --release --bin tracedecay` + fails at HEAD's working tree (peer refactor in flight; E0599/E0560 in + `src/db/connection.rs`, `src/dashboard/memory_curate.rs`, error set + changing between attempts). A clean-HEAD build was not possible without a + side worktree or a target-dir override, both disallowed for this session. + The newest available release build on this branch lineage was measured + instead, as documented above. +2. **Indexing did not run under `scripts/with-isolated-tracedecay-daemon.sh`.** + That wrapper deletes its profile on exit and owns a single daemon + lifecycle, so a pre-indexed profile cannot survive into a separate + restore measurement. The same isolation contract was composed from + `benchmark_data/runtime/run.py`'s own primitives instead (the other sanctioned + isolation vehicle). +3. **No "tracedecay-n" workload exists in the tree** (contrary to the task + brief); the repo's own code tree was used as the largest natural workload. +4. **Placeholder socket file workaround.** This binary build exits fatally + when the socket path does not exist ("failed to remove stale daemon + socket ... No such file or directory"), so the driver pre-creates a plain + placeholder file at the socket path before daemon start. Worth re-checking + at HEAD; `run.py` captures on 2026-07-30 did not need this. diff --git a/benchmark_data/runtime/evidence/code-index-restore-20260731/report.samples.jsonl b/benchmark_data/runtime/evidence/code-index-restore-20260731/report.samples.jsonl new file mode 100644 index 0000000000..6224bc971f --- /dev/null +++ b/benchmark_data/runtime/evidence/code-index-restore-20260731/report.samples.jsonl @@ -0,0 +1,11 @@ +{"gnu_time": {"elapsed_s": 87.2, "max_rss_kib": 1265908}, "index_data_dir_bytes": 888508091, "init_exit": 0, "init_stdout_tail": "", "init_wall_ns": 83175475827, "kind": "index-build-once", "phase": "index"} +{"admission_ns": 39367811, "daemon_cpu_time_ns": 2000000000, "daemon_peak_rss_bytes": 141557760, "daemon_pss_bytes": 126428160, "daemon_survived": true, "gnu_time": {"elapsed_s": 7.67, "max_rss_kib": 331500}, "kind": "cold-restore-sample", "phase": "restore-sample", "query_attempts": 3, "query_exit": 0, "query_response_bytes": 579, "query_stderr_tail": "[tracedecay] event=async_runtime_config worker_threads=16 max_blocking_threads=32\n", "query_symbol": "active_data_dir_name", "query_symbol_found": true, "query_wall_ns": 2183661911, "restore_path_total_ns": 2223029722, "sample_index": 1} +{"admission_ns": 172109934, "daemon_cpu_time_ns": 2880000000, "daemon_peak_rss_bytes": 168054784, "daemon_pss_bytes": 163942400, "daemon_survived": true, "gnu_time": {"elapsed_s": 8.84, "max_rss_kib": 346276}, "kind": "cold-restore-sample", "phase": "restore-sample", "query_attempts": 4, "query_exit": 0, "query_response_bytes": 579, "query_stderr_tail": "[tracedecay] event=async_runtime_config worker_threads=16 max_blocking_threads=32\n", "query_symbol": "active_data_dir_name", "query_symbol_found": true, "query_wall_ns": 3383446133, "restore_path_total_ns": 3555556067, "sample_index": 2} +{"admission_ns": 39193738, "daemon_cpu_time_ns": 2730000000, "daemon_peak_rss_bytes": 167186432, "daemon_pss_bytes": 163015680, "daemon_survived": true, "gnu_time": {"elapsed_s": 8.34, "max_rss_kib": 346300}, "kind": "cold-restore-sample", "phase": "restore-sample", "query_attempts": 4, "query_exit": 0, "query_response_bytes": 579, "query_stderr_tail": "[tracedecay] event=async_runtime_config worker_threads=16 max_blocking_threads=32\n", "query_symbol": "active_data_dir_name", "query_symbol_found": true, "query_wall_ns": 3021663487, "restore_path_total_ns": 3060857225, "sample_index": 3} +{"admission_ns": 37907905, "daemon_cpu_time_ns": 1750000000, "daemon_peak_rss_bytes": 104865792, "daemon_pss_bytes": 100672512, "daemon_survived": true, "gnu_time": {"elapsed_s": 7.4, "max_rss_kib": 326420}, "kind": "cold-restore-sample", "phase": "restore-sample", "query_attempts": 3, "query_exit": 0, "query_response_bytes": 579, "query_stderr_tail": "[tracedecay] event=async_runtime_config worker_threads=16 max_blocking_threads=32\n", "query_symbol": "active_data_dir_name", "query_symbol_found": true, "query_wall_ns": 2091737669, "restore_path_total_ns": 2129645574, "sample_index": 4} +{"admission_ns": 45400582, "daemon_cpu_time_ns": 1980000000, "daemon_peak_rss_bytes": 133763072, "daemon_pss_bytes": 129715200, "daemon_survived": true, "gnu_time": {"elapsed_s": 7.43, "max_rss_kib": 331036}, "kind": "cold-restore-sample", "phase": "restore-sample", "query_attempts": 3, "query_exit": 0, "query_response_bytes": 579, "query_stderr_tail": "[tracedecay] event=async_runtime_config worker_threads=16 max_blocking_threads=32\n", "query_symbol": "active_data_dir_name", "query_symbol_found": true, "query_wall_ns": 2082669702, "restore_path_total_ns": 2128070284, "sample_index": 5} +{"admission_ns": 38914786, "daemon_cpu_time_ns": 1980000000, "daemon_peak_rss_bytes": 131334144, "daemon_pss_bytes": 125721600, "daemon_survived": true, "gnu_time": {"elapsed_s": 7.75, "max_rss_kib": 326012}, "kind": "cold-restore-sample", "phase": "restore-sample", "query_attempts": 3, "query_exit": 0, "query_response_bytes": 579, "query_stderr_tail": "[tracedecay] event=async_runtime_config worker_threads=16 max_blocking_threads=32\n", "query_symbol": "active_data_dir_name", "query_symbol_found": true, "query_wall_ns": 2383344475, "restore_path_total_ns": 2422259261, "sample_index": 6} +{"admission_ns": 41209413, "daemon_cpu_time_ns": 2420000000, "daemon_peak_rss_bytes": 165982208, "daemon_pss_bytes": 161811456, "daemon_survived": true, "gnu_time": {"elapsed_s": 8.21, "max_rss_kib": 346408}, "kind": "cold-restore-sample", "phase": "restore-sample", "query_attempts": 4, "query_exit": 0, "query_response_bytes": 579, "query_stderr_tail": "[tracedecay] event=async_runtime_config worker_threads=16 max_blocking_threads=32\n", "query_symbol": "active_data_dir_name", "query_symbol_found": true, "query_wall_ns": 2876999465, "restore_path_total_ns": 2918208878, "sample_index": 7} +{"admission_ns": 39542484, "daemon_peak_rss_bytes": 32555008, "gnu_time": {"elapsed_s": 3.43, "max_rss_kib": 349440}, "kind": "control-empty-profile-admission", "phase": "control-empty-profile", "sample_index": 1} +{"admission_ns": 2906093918, "daemon_peak_rss_bytes": 26046464, "gnu_time": {"elapsed_s": 7.27, "max_rss_kib": 349440}, "kind": "control-empty-profile-admission", "phase": "control-empty-profile", "sample_index": 2} +{"admission_ns": 4831209005, "daemon_peak_rss_bytes": 25706496, "gnu_time": {"elapsed_s": 11.3, "max_rss_kib": 349440}, "kind": "control-empty-profile-admission", "phase": "control-empty-profile", "sample_index": 3} diff --git a/benchmark_data/runtime/evidence/code-index-restore-20260731/restore_driver.py b/benchmark_data/runtime/evidence/code-index-restore-20260731/restore_driver.py new file mode 100644 index 0000000000..f4ae66ffea --- /dev/null +++ b/benchmark_data/runtime/evidence/code-index-restore-20260731/restore_driver.py @@ -0,0 +1,294 @@ +#!/usr/bin/env python3 +"""Code-index restore measurement composed from the repo's own harness primitives. + +Isolation comes exclusively from benchmark_data/runtime/fixtures.py +(prepare_fixture_snapshot / isolated_environment) and +benchmark_data/runtime/lifecycle.py (OwnedDaemon), exactly as +benchmark_data/runtime/run.py uses them. No profile environment variable is +invented by this script; every path is derived by the harness from the +snapshot root. + +Phases: + index - prepare an isolated snapshot whose fixture project embeds the + real repository code tree (src/ + crates/), then run + `tracedecay init` once (full index) with no daemon running. + sample - over the SAME pre-indexed snapshot, cold-start a fresh daemon + (OwnedDaemon), measure admission (start -> socket ready), then + run one exact-symbol query that must return a symbol from the + embedded repo tree (anti-vacuity), record daemon VmHWM/PSS, and + stop the daemon. Repeat N times from the shell, each wrapped in + /usr/bin/time -v. + control - cold daemon admission over a freshly prepared, never-indexed + snapshot (empty profile baseline). +""" + +from __future__ import annotations + +import argparse +import json +import os +import subprocess +import sys +import time +from pathlib import Path + +REPOSITORY_ROOT = Path("/fast/projects/tracedecay") +sys.path.insert(0, os.fspath(REPOSITORY_ROOT)) + +from benchmark_data.runtime.fixtures import ( # noqa: E402 + PreparedFixture, + isolated_environment, + prepare_fixture_snapshot, + provider_fixture_files, + provider_roots, +) +from benchmark_data.runtime.lifecycle import OwnedDaemon # noqa: E402 +from benchmark_data.runtime.run import ( # noqa: E402 + _process_observations, + socket_probe, +) + + +def du_bytes(path: Path) -> int: + total = 0 + for entry in Path(path).rglob("*"): + if entry.is_file(): + total += entry.stat().st_size + return total + + +def rebuild_prepared(snapshot: Path, binary: Path) -> PreparedFixture: + """Reconstruct a PreparedFixture view over an existing snapshot root.""" + snapshot = snapshot.resolve() + home = snapshot / "home" + prepared = PreparedFixture( + snapshot_root=snapshot, + home=home, + project=home / "workspace" / "runtime-fixture", + provider_roots=provider_roots(home), + provider_files=provider_fixture_files(home), + prebuilt_binary=snapshot / "bin" / "tracedecay", + evidence_root=snapshot / "evidence", + prepared_evidence=snapshot / "evidence" / "prepared.json", + runtime_identity={}, + environment={}, + fixture_digests={}, + git_head="reused", + ) + return PreparedFixture( + **{**prepared.__dict__, "environment": isolated_environment(prepared)} + ) + + +def cmd_index(args: argparse.Namespace) -> int: + binary = Path(args.binary).resolve() + snapshot = Path(args.snapshot) + prepared = prepare_fixture_snapshot( + snapshot, + prebuilt_binary=binary, + fixture_root=Path(args.fixture_root), + ) + data_dir = Path(prepared.environment["TRACEDECAY_DATA_DIR"]) + started = time.monotonic_ns() + completed = subprocess.run( + (os.fspath(prepared.prebuilt_binary), "init", os.fspath(prepared.project)), + cwd=prepared.project, + env=prepared.environment, + capture_output=True, + timeout=540.0, + check=False, + ) + init_wall_ns = time.monotonic_ns() - started + if completed.returncode != 0: + sys.stderr.write(completed.stderr.decode("utf-8", errors="replace")) + raise SystemExit(f"init failed with exit {completed.returncode}") + status = subprocess.run( + ( + os.fspath(prepared.prebuilt_binary), + "status", + os.fspath(prepared.project), + "--json", + ), + cwd=prepared.project, + env=prepared.environment, + capture_output=True, + timeout=540.0, + check=False, + ) + status_doc = None + if status.returncode == 0: + try: + status_doc = json.loads(status.stdout) + except json.JSONDecodeError: + status_doc = None + result = { + "phase": "index", + "init_wall_ns": init_wall_ns, + "init_exit": completed.returncode, + "index_data_dir_bytes": du_bytes(data_dir), + "status_json": status_doc, + "init_stdout_tail": completed.stdout.decode("utf-8", errors="replace")[-2000:], + } + Path(args.out).write_text(json.dumps(result, indent=2) + "\n", encoding="utf-8") + return 0 + + +def cmd_sample(args: argparse.Namespace) -> int: + snapshot = Path(args.snapshot) + prepared = rebuild_prepared(snapshot, Path(args.binary)) + socket_path = Path(prepared.environment["TRACEDECAY_DAEMON_SOCKET"]) + # This binary build treats a MISSING stale socket as a fatal config error + # (remove_file ENOENT). Pre-create a plain placeholder file so the + # daemon's own stale-socket removal succeeds; the daemon then binds its + # real socket at the same path. + socket_path.touch(exist_ok=True) + daemon_started_ns = time.monotonic_ns() + daemon = OwnedDaemon( + ( + os.fspath(prepared.prebuilt_binary), + "daemon", + "run", + "--socket", + os.fspath(socket_path), + ), + env=prepared.environment, + log_dir=prepared.snapshot_root / f"daemon-logs-sample-{args.index}", + readiness=lambda: socket_probe(socket_path), + readiness_timeout=540.0, + poll_interval=0.01, + termination_grace=5.0, + ) + with daemon: + admission_ns = time.monotonic_ns() - daemon_started_ns + assert daemon.process is not None + request = json.dumps( + {"name": args.symbol, "limit": 20, "format": "json"}, + separators=(",", ":"), + sort_keys=True, + ) + # The daemon admits a pre-indexed project asynchronously: tool calls + # fail with "project ... is warming in the background; retry" until + # the code-index restore completes. Time-to-first-successful-query is + # therefore the observable restore-at-open latency. Retry the same + # deterministic query until it succeeds (bounded). + query_started_ns = time.monotonic_ns() + attempts = 0 + completed = None + deadline = time.monotonic() + 520.0 + while True: + attempts += 1 + completed = subprocess.run( + ( + os.fspath(prepared.prebuilt_binary), + "tool", + "tracedecay_find_exact_symbol", + "--project", + os.fspath(prepared.project), + "--args", + request, + "--json", + ), + cwd=prepared.project, + env=prepared.environment, + capture_output=True, + timeout=540.0, + check=False, + ) + if completed.returncode == 0: + break + stderr_text = completed.stderr.decode("utf-8", errors="replace") + if "warming" not in stderr_text or time.monotonic() > deadline: + break + time.sleep(0.2) + query_wall_ns = time.monotonic_ns() - query_started_ns + observations = _process_observations(daemon.process.pid) + daemon_survived = daemon.is_alive + if daemon.evidence.process_count_after_cleanup != 0: + raise SystemExit("daemon process tree was not reaped") + stdout_text = completed.stdout.decode("utf-8", errors="replace") + symbol_found = args.symbol in stdout_text + result = { + "phase": "restore-sample", + "sample_index": args.index, + "admission_ns": admission_ns, + "query_wall_ns": query_wall_ns, + "query_attempts": attempts, + "restore_path_total_ns": admission_ns + query_wall_ns, + "query_exit": completed.returncode, + "query_symbol": args.symbol, + "query_symbol_found": symbol_found, + "query_response_bytes": len(completed.stdout), + "daemon_survived": daemon_survived, + "daemon_peak_rss_bytes": observations.get("daemon_peak_rss_bytes"), + "daemon_pss_bytes": observations.get("daemon_pss_bytes"), + "daemon_cpu_time_ns": observations.get("daemon_cpu_time_ns"), + "query_stderr_tail": completed.stderr.decode("utf-8", errors="replace")[-500:], + } + Path(args.out).write_text(json.dumps(result, indent=2) + "\n", encoding="utf-8") + if completed.returncode != 0 or not symbol_found: + raise SystemExit("query failed or expected symbol missing (vacuous sample)") + return 0 + + +def cmd_control(args: argparse.Namespace) -> int: + binary = Path(args.binary).resolve() + snapshot = Path(args.snapshot) + prepared = prepare_fixture_snapshot(snapshot, prebuilt_binary=binary) + socket_path = Path(prepared.environment["TRACEDECAY_DAEMON_SOCKET"]) + socket_path.touch(exist_ok=True) + daemon_started_ns = time.monotonic_ns() + daemon = OwnedDaemon( + ( + os.fspath(prepared.prebuilt_binary), + "daemon", + "run", + "--socket", + os.fspath(socket_path), + ), + env=prepared.environment, + log_dir=prepared.snapshot_root / "daemon-logs", + readiness=lambda: socket_probe(socket_path), + readiness_timeout=540.0, + poll_interval=0.01, + termination_grace=5.0, + ) + with daemon: + admission_ns = time.monotonic_ns() - daemon_started_ns + assert daemon.process is not None + observations = _process_observations(daemon.process.pid) + result = { + "phase": "control-empty-profile", + "admission_ns": admission_ns, + "daemon_peak_rss_bytes": observations.get("daemon_peak_rss_bytes"), + } + Path(args.out).write_text(json.dumps(result, indent=2) + "\n", encoding="utf-8") + return 0 + + +def main() -> int: + parser = argparse.ArgumentParser() + sub = parser.add_subparsers(dest="cmd", required=True) + p = sub.add_parser("index") + p.add_argument("--binary", required=True) + p.add_argument("--snapshot", required=True) + p.add_argument("--fixture-root", required=True) + p.add_argument("--out", required=True) + p.set_defaults(handler=cmd_index) + p = sub.add_parser("sample") + p.add_argument("--binary", required=True) + p.add_argument("--snapshot", required=True) + p.add_argument("--index", type=int, required=True) + p.add_argument("--symbol", default="active_data_dir_name") + p.add_argument("--out", required=True) + p.set_defaults(handler=cmd_sample) + p = sub.add_parser("control") + p.add_argument("--binary", required=True) + p.add_argument("--snapshot", required=True) + p.add_argument("--out", required=True) + p.set_defaults(handler=cmd_control) + args = parser.parse_args() + return args.handler(args) + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/benchmark_data/runtime/evidence/code-index-restore-20260731/workload.status.json b/benchmark_data/runtime/evidence/code-index-restore-20260731/workload.status.json new file mode 100644 index 0000000000..9333d1434c --- /dev/null +++ b/benchmark_data/runtime/evidence/code-index-restore-20260731/workload.status.json @@ -0,0 +1,52 @@ +{ + "active_branch": "main", + "db_size_bytes": 438317056, + "edge_count": 255898, + "edges_by_kind": { + "annotates": 26567, + "calls": 153954, + "derives_macro": 194, + "extends": 21, + "implements": 1015, + "returns": 24446, + "type_of": 47676, + "uses": 2025 + }, + "file_count": 1808, + "files_by_language": { + "Dockerfile": 1, + "Other": 10, + "Python": 4, + "Rust": 1769, + "SQL": 1, + "TOML": 21, + "TypeScript": 2 + }, + "last_full_sync_at": 1785521639, + "last_sync_at": 1785521639, + "last_sync_duration_ms": 50676, + "last_updated": 1785521591, + "node_count": 122076, + "nodes_by_kind": { + "annotation_usage": 13282, + "class": 5, + "const": 3078, + "decorator": 3, + "enum": 1918, + "enum_variant": 9297, + "field": 22983, + "file": 1808, + "function": 22652, + "impl": 6549, + "interface": 4, + "method": 17512, + "module": 2482, + "static": 118, + "struct": 5895, + "trait": 359, + "type_alias": 1270, + "use": 12861 + }, + "serving_branch": "main", + "total_source_bytes": 41098416 +} diff --git a/benchmark_data/runtime/evidence/diagnostic-flood-authority-20260730/README.md b/benchmark_data/runtime/evidence/diagnostic-flood-authority-20260730/README.md new file mode 100644 index 0000000000..8122905070 --- /dev/null +++ b/benchmark_data/runtime/evidence/diagnostic-flood-authority-20260730/README.md @@ -0,0 +1,16 @@ +# Diagnostic flood authority evidence + +> **Dated runtime evidence — not acceptance authority.** Preserve these raw +> samples and their provenance, but do not recreate their exact counts, +> snapshots, receipts, attestations, or gate choreography as build +> prerequisites. Current requirements come only from the +> `docs/plans/tracedecay-v2/` hierarchy; validate current runtime behavior directly. + +This directory records three executions of the prebuilt +`diagnostic_publication_stress` integration authority compiled after +`c61f5dce7`. Each execution drives 10,000 distinct generations under +backpressure and asserts one emitted publication, queue depth bounded to one, +and queued bytes bounded by `MAX_PUBLICATION_BYTES`. + +These are bounded correctness/rate samples, not a production CLI latency +baseline. N=3 is below p95 and p99 eligibility, so both remain unavailable. diff --git a/benchmark_data/runtime/evidence/diagnostic-flood-authority-20260730/report.json b/benchmark_data/runtime/evidence/diagnostic-flood-authority-20260730/report.json new file mode 100644 index 0000000000..ea57608154 --- /dev/null +++ b/benchmark_data/runtime/evidence/diagnostic-flood-authority-20260730/report.json @@ -0,0 +1,55 @@ +{ + "attempted_events_per_sample": 10000, + "authority": { + "binary_sha256": "39ec2fb26a6549647d3282b500534c43e574f2a52b21ebcea2ebaa98331fb584", + "kind": "prebuilt-integration-test", + "test": "publication_rate_and_queue_memory_stay_bounded_under_backpressure" + }, + "availability": { + "detail": null, + "state": "available" + }, + "event_counts": { + "attempted_total": 30000, + "emitted_total": 3, + "queue_depth_max": 1 + }, + "latency_ns": { + "p50": { + "available": true, + "minimum_samples": 2, + "value": 1538442545 + }, + "p95": { + "available": false, + "minimum_samples": 40, + "value": null + }, + "p99": { + "available": false, + "minimum_samples": 100, + "value": null + } + }, + "outcome": { + "available_count": 3, + "process_leak_count": 0, + "unavailable_count": 0 + }, + "policy": { + "journey_margins": { + "p50_regression_margin_pct": 20, + "p95_regression_margin_pct": 25, + "resource_regression_margin_pct": 20 + }, + "journey_policy_id": "runtime-journey-margins-v1", + "journey_policy_sha256": "6db22e48d7e45a6cc751baaf1ae40e67905aafb5b315157f646a94cf57695d45", + "policy_id": "runtime-acceptance-v1", + "policy_sha256": "7c74637ac91439e8d04870d322c7e9c9d1d4dc926958c01c475c3c7f37651878" + }, + "report_id": "incident-93a5114288d64b0e8323a99e9b32e154", + "sample_count": 3, + "samples_sha256": "fda203f5cc946cd0c1ce9650443558825bc5bf2ecb148258476a4ddf77c78ef7", + "schema_version": 1, + "workload_id": "diagnostic-dedup-batch-rate" +} diff --git a/benchmark_data/runtime/evidence/diagnostic-flood-authority-20260730/report.policy.json b/benchmark_data/runtime/evidence/diagnostic-flood-authority-20260730/report.policy.json new file mode 100644 index 0000000000..e64e9ae37d --- /dev/null +++ b/benchmark_data/runtime/evidence/diagnostic-flood-authority-20260730/report.policy.json @@ -0,0 +1,14 @@ +{ + "acceptance": { + "artifact_sha256": "a45ac061172fbeda7c5d4ac13e80569091c260d675c83baa63652aaba910534d", + "policy_id": "runtime-acceptance-v1", + "policy_sha256": "7c74637ac91439e8d04870d322c7e9c9d1d4dc926958c01c475c3c7f37651878", + "policy_version": 1 + }, + "journey": { + "artifact_sha256": "a45ac061172fbeda7c5d4ac13e80569091c260d675c83baa63652aaba910534d", + "policy_id": "runtime-journey-margins-v1", + "policy_sha256": "6db22e48d7e45a6cc751baaf1ae40e67905aafb5b315157f646a94cf57695d45", + "policy_version": 1 + } +} diff --git a/benchmark_data/runtime/evidence/diagnostic-flood-authority-20260730/report.samples.jsonl b/benchmark_data/runtime/evidence/diagnostic-flood-authority-20260730/report.samples.jsonl new file mode 100644 index 0000000000..5489737a0a --- /dev/null +++ b/benchmark_data/runtime/evidence/diagnostic-flood-authority-20260730/report.samples.jsonl @@ -0,0 +1,3 @@ +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"39ec2fb26a654964","capture_id":"capture-d62a1996e2024306b345959c7fc29df9","concurrency":1,"crate_id":"tracedecay-lsp","journey_id":"diagnostic-generation","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux","round_index":0,"run_id":"incident-60bbec1a127e4e50ad4e3aab4085a21f","shard":"local","state":"contention","storage_mode":"disposable","surface":"host","temperature":"warm","variant":"candidate","workload_id":"diagnostic-dedup-batch-rate"},"lifecycle":{"activation_state":"not_applicable","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"diagnostic_batch_count":1,"diagnostic_deduplicated_count":9999,"diagnostic_generated_count":10000,"process_tree_reaped":true,"queue_depth":1},"outcome":{"actual_digest":"6ecfa165ecbd47047d173f6f6e9eae6044e7b4ccab91d82c29730299ce948364","error":null,"expected_digest":"6ecfa165ecbd47047d173f6f6e9eae6044e7b4ccab91d82c29730299ce948364","result_digest":"6ecfa165ecbd47047d173f6f6e9eae6044e7b4ccab91d82c29730299ce948364","status":"success"},"schema_version":1,"size":{"content_bytes":190,"process_count":1,"request_bytes":0,"response_bytes":190},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":1513090593,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":1513090593,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"diagnostic_flood":1513090},"started_ns":460447231926324}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"39ec2fb26a654964","capture_id":"capture-73d44fa76184483899150c8046726c37","concurrency":1,"crate_id":"tracedecay-lsp","journey_id":"diagnostic-generation","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux","round_index":1,"run_id":"incident-0f942919426841c79c6a0255f01bdc01","shard":"local","state":"contention","storage_mode":"disposable","surface":"host","temperature":"warm","variant":"candidate","workload_id":"diagnostic-dedup-batch-rate"},"lifecycle":{"activation_state":"not_applicable","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"diagnostic_batch_count":1,"diagnostic_deduplicated_count":9999,"diagnostic_generated_count":10000,"process_tree_reaped":true,"queue_depth":1},"outcome":{"actual_digest":"f048f8b32d02ca8c4c9726c8e84e3728639688a85a971a0be40950de50561992","error":null,"expected_digest":"f048f8b32d02ca8c4c9726c8e84e3728639688a85a971a0be40950de50561992","result_digest":"f048f8b32d02ca8c4c9726c8e84e3728639688a85a971a0be40950de50561992","status":"success"},"schema_version":1,"size":{"content_bytes":190,"process_count":1,"request_bytes":0,"response_bytes":190},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":1547168735,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":1547168735,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"diagnostic_flood":1547168},"started_ns":460448785626801}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"39ec2fb26a654964","capture_id":"capture-77de94ee09454b9aba3e88944dbee0fc","concurrency":1,"crate_id":"tracedecay-lsp","journey_id":"diagnostic-generation","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux","round_index":2,"run_id":"incident-448f4ad0b5044465a9db0e351fb8e8b6","shard":"local","state":"contention","storage_mode":"disposable","surface":"host","temperature":"warm","variant":"candidate","workload_id":"diagnostic-dedup-batch-rate"},"lifecycle":{"activation_state":"not_applicable","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"diagnostic_batch_count":1,"diagnostic_deduplicated_count":9999,"diagnostic_generated_count":10000,"process_tree_reaped":true,"queue_depth":1},"outcome":{"actual_digest":"6ecfa165ecbd47047d173f6f6e9eae6044e7b4ccab91d82c29730299ce948364","error":null,"expected_digest":"6ecfa165ecbd47047d173f6f6e9eae6044e7b4ccab91d82c29730299ce948364","result_digest":"6ecfa165ecbd47047d173f6f6e9eae6044e7b4ccab91d82c29730299ce948364","status":"success"},"schema_version":1,"size":{"content_bytes":190,"process_count":1,"request_bytes":0,"response_bytes":190},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":1538442545,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":1538442545,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"diagnostic_flood":1538442},"started_ns":460450372222816}} diff --git a/benchmark_data/runtime/evidence/missing-daemon-after-shell-p95-20260730/README.md b/benchmark_data/runtime/evidence/missing-daemon-after-shell-p95-20260730/README.md new file mode 100644 index 0000000000..9dffda64b6 --- /dev/null +++ b/benchmark_data/runtime/evidence/missing-daemon-after-shell-p95-20260730/README.md @@ -0,0 +1,18 @@ +# Missing-daemon after-shell p95 evidence + +> **Dated runtime evidence — not acceptance authority.** Preserve these raw +> samples and their provenance, but do not recreate their exact counts, +> snapshots, receipts, attestations, or gate choreography as build +> prerequisites. Current requirements come only from the +> `docs/plans/tracedecay-v2/` hierarchy; validate current runtime behavior directly. + +This directory records 40 isolated-profile invocations of the committed +`hook-cursor-after-shell` product command against an intentionally absent +daemon socket. The sample count meets the frozen p95 minimum; p99 remains +unavailable below 100 matching samples. + +Each raw sample records the process-owning harness wall time, same-binary +startup control, direct product-command wall time, the non-negative +direct-minus-startup residual, lifecycle-wrapper overhead, typed daemon +unavailability, and process-tree cleanup. The residual is not authoritative +internal handler timing. diff --git a/benchmark_data/runtime/evidence/missing-daemon-after-shell-p95-20260730/report.json b/benchmark_data/runtime/evidence/missing-daemon-after-shell-p95-20260730/report.json new file mode 100644 index 0000000000..11af4b0dbb --- /dev/null +++ b/benchmark_data/runtime/evidence/missing-daemon-after-shell-p95-20260730/report.json @@ -0,0 +1,114 @@ +{ + "availability": { + "detail": "daemon socket intentionally absent", + "state": "unavailable" + }, + "latency_ns": { + "p50": { + "available": true, + "minimum_samples": 2, + "value": 217367569 + }, + "p95": { + "available": true, + "minimum_samples": 40, + "value": 348228365 + }, + "p99": { + "available": false, + "minimum_samples": 100, + "value": null + } + }, + "outcome": { + "command_failure_count": 0, + "expected_unavailable_count": 40, + "process_leak_count": 0 + }, + "policy": { + "journey_margins": { + "p50_regression_margin_pct": 20, + "p95_regression_margin_pct": 25, + "resource_regression_margin_pct": 20 + }, + "journey_policy_id": "runtime-journey-margins-v1", + "journey_policy_sha256": "6db22e48d7e45a6cc751baaf1ae40e67905aafb5b315157f646a94cf57695d45", + "policy_id": "runtime-acceptance-v1", + "policy_sha256": "7c74637ac91439e8d04870d322c7e9c9d1d4dc926958c01c475c3c7f37651878" + }, + "report_id": "incident-8e46dd6db3dd4c5484025ffe5b198968", + "sample_count": 40, + "samples_sha256": "232305933996ad5810c5198b33e693984a348bc80c1516f31fdaeabc50834e29", + "schema_version": 1, + "stages_ns": { + "direct_hook_wall": { + "p50": { + "available": true, + "minimum_samples": 2, + "value": 27121588 + }, + "p95": { + "available": true, + "minimum_samples": 40, + "value": 35299570 + }, + "p99": { + "available": false, + "minimum_samples": 100, + "value": null + } + }, + "hook_residual": { + "p50": { + "available": true, + "minimum_samples": 2, + "value": 12017110 + }, + "p95": { + "available": true, + "minimum_samples": 40, + "value": 15796178 + }, + "p99": { + "available": false, + "minimum_samples": 100, + "value": null + } + }, + "lifecycle_wrapper_overhead": { + "p50": { + "available": true, + "minimum_samples": 2, + "value": 189602521 + }, + "p95": { + "available": true, + "minimum_samples": 40, + "value": 311366796 + }, + "p99": { + "available": false, + "minimum_samples": 100, + "value": null + } + }, + "process_startup_control": { + "p50": { + "available": true, + "minimum_samples": 2, + "value": 15857897 + }, + "p95": { + "available": true, + "minimum_samples": 40, + "value": 20975093 + }, + "p99": { + "available": false, + "minimum_samples": 100, + "value": null + } + } + }, + "workload_id": "missing-daemon-after-shell" +} diff --git a/benchmark_data/runtime/evidence/missing-daemon-after-shell-p95-20260730/report.policy.json b/benchmark_data/runtime/evidence/missing-daemon-after-shell-p95-20260730/report.policy.json new file mode 100644 index 0000000000..7ba35823cf --- /dev/null +++ b/benchmark_data/runtime/evidence/missing-daemon-after-shell-p95-20260730/report.policy.json @@ -0,0 +1,14 @@ +{ + "acceptance": { + "artifact_sha256": "5f8d6a152c000428d00dd24ab9d427a093e544b0528c462bee3733e1c34ce920", + "policy_id": "runtime-acceptance-v1", + "policy_sha256": "7c74637ac91439e8d04870d322c7e9c9d1d4dc926958c01c475c3c7f37651878", + "policy_version": 1 + }, + "journey": { + "artifact_sha256": "5f8d6a152c000428d00dd24ab9d427a093e544b0528c462bee3733e1c34ce920", + "policy_id": "runtime-journey-margins-v1", + "policy_sha256": "6db22e48d7e45a6cc751baaf1ae40e67905aafb5b315157f646a94cf57695d45", + "policy_version": 1 + } +} diff --git a/benchmark_data/runtime/evidence/missing-daemon-after-shell-p95-20260730/report.samples.jsonl b/benchmark_data/runtime/evidence/missing-daemon-after-shell-p95-20260730/report.samples.jsonl new file mode 100644 index 0000000000..2bd2d588ba --- /dev/null +++ b/benchmark_data/runtime/evidence/missing-daemon-after-shell-p95-20260730/report.samples.jsonl @@ -0,0 +1,40 @@ +{"availability":{"detail":"daemon socket is intentionally absent","state":"unavailable"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"4e06349a71afac8e","capture_id":"capture-e1971af478694edfb5bf47fb418d9054","concurrency":1,"crate_id":"tracedecay-hooks","journey_id":"daemon-failure-recovery","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":0,"run_id":"incident-044ef32e0c8d46ceb3cbcef942984f1a","shard":"integrated-0","state":"recovery","storage_mode":"isolated-sqlite","surface":"host","temperature":"warm","variant":"candidate","workload_id":"missing-daemon-after-shell"},"lifecycle":{"activation_state":"inactive","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"direct_hook_wall_ns":32201940,"hook_residual_ns":14359067,"lifecycle_wrapper_overhead_ns":184560066,"missing_daemon_fail_fast_ns":216762006,"process_startup_control_ns":17842873,"process_tree_reaped":true},"outcome":{"actual_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","error":"expected daemon unavailable","expected_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","result_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","status":"error"},"schema_version":1,"size":{"content_bytes":0,"process_count":1,"request_bytes":226,"response_bytes":0},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":216762006,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":216762006,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"direct_hook_wall":32201,"lifecycle_wrapper_overhead":184560,"missing_daemon_fail_fast":216762,"missing_daemon_hook_residual":14359,"process_startup_control":17842},"started_ns":459286164866092}} +{"availability":{"detail":"daemon socket is intentionally absent","state":"unavailable"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"4e06349a71afac8e","capture_id":"capture-658f30e531be45f2b43db95abf460c4a","concurrency":1,"crate_id":"tracedecay-hooks","journey_id":"daemon-failure-recovery","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":1,"run_id":"incident-29b306e00786434d96ef89b2e199ccc1","shard":"integrated-0","state":"recovery","storage_mode":"isolated-sqlite","surface":"host","temperature":"warm","variant":"candidate","workload_id":"missing-daemon-after-shell"},"lifecycle":{"activation_state":"inactive","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"direct_hook_wall_ns":31702865,"hook_residual_ns":12869230,"lifecycle_wrapper_overhead_ns":179443083,"missing_daemon_fail_fast_ns":211145948,"process_startup_control_ns":18833635,"process_tree_reaped":true},"outcome":{"actual_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","error":"expected daemon unavailable","expected_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","result_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","status":"error"},"schema_version":1,"size":{"content_bytes":0,"process_count":1,"request_bytes":226,"response_bytes":0},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":211145948,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":211145948,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"direct_hook_wall":31702,"lifecycle_wrapper_overhead":179443,"missing_daemon_fail_fast":211145,"missing_daemon_hook_residual":12869,"process_startup_control":18833},"started_ns":459292280687986}} +{"availability":{"detail":"daemon socket is intentionally absent","state":"unavailable"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"4e06349a71afac8e","capture_id":"capture-0ed521509fe84b77a6923d1a66f1f356","concurrency":1,"crate_id":"tracedecay-hooks","journey_id":"daemon-failure-recovery","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":2,"run_id":"incident-0a34b8562aee4a52beb4d3d34b4c30bb","shard":"integrated-0","state":"recovery","storage_mode":"isolated-sqlite","surface":"host","temperature":"warm","variant":"candidate","workload_id":"missing-daemon-after-shell"},"lifecycle":{"activation_state":"inactive","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"direct_hook_wall_ns":31573703,"hook_residual_ns":12789370,"lifecycle_wrapper_overhead_ns":186962227,"missing_daemon_fail_fast_ns":218535930,"process_startup_control_ns":18784333,"process_tree_reaped":true},"outcome":{"actual_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","error":"expected daemon unavailable","expected_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","result_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","status":"error"},"schema_version":1,"size":{"content_bytes":0,"process_count":1,"request_bytes":226,"response_bytes":0},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":218535930,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":218535930,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"direct_hook_wall":31573,"lifecycle_wrapper_overhead":186962,"missing_daemon_fail_fast":218535,"missing_daemon_hook_residual":12789,"process_startup_control":18784},"started_ns":459298579553990}} +{"availability":{"detail":"daemon socket is intentionally absent","state":"unavailable"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"4e06349a71afac8e","capture_id":"capture-325b9940132c4aa2b2813bcec7d6121c","concurrency":1,"crate_id":"tracedecay-hooks","journey_id":"daemon-failure-recovery","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":3,"run_id":"incident-2e199ad05d554cd9b0fc876e1f51808b","shard":"integrated-0","state":"recovery","storage_mode":"isolated-sqlite","surface":"host","temperature":"warm","variant":"candidate","workload_id":"missing-daemon-after-shell"},"lifecycle":{"activation_state":"inactive","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"direct_hook_wall_ns":36861569,"hook_residual_ns":15796178,"lifecycle_wrapper_overhead_ns":311366796,"missing_daemon_fail_fast_ns":348228365,"process_startup_control_ns":21065391,"process_tree_reaped":true},"outcome":{"actual_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","error":"expected daemon unavailable","expected_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","result_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","status":"error"},"schema_version":1,"size":{"content_bytes":0,"process_count":1,"request_bytes":226,"response_bytes":0},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":348228365,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":348228365,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"direct_hook_wall":36861,"lifecycle_wrapper_overhead":311366,"missing_daemon_fail_fast":348228,"missing_daemon_hook_residual":15796,"process_startup_control":21065},"started_ns":459304696154145}} +{"availability":{"detail":"daemon socket is intentionally absent","state":"unavailable"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"4e06349a71afac8e","capture_id":"capture-a1e570841fb2443caa706fb43abfc8a1","concurrency":1,"crate_id":"tracedecay-hooks","journey_id":"daemon-failure-recovery","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":4,"run_id":"incident-dc8ca9fad6174a02a532085e13d706d9","shard":"integrated-0","state":"recovery","storage_mode":"isolated-sqlite","surface":"host","temperature":"warm","variant":"candidate","workload_id":"missing-daemon-after-shell"},"lifecycle":{"activation_state":"inactive","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"direct_hook_wall_ns":29596269,"hook_residual_ns":13475169,"lifecycle_wrapper_overhead_ns":184905514,"missing_daemon_fail_fast_ns":214501783,"process_startup_control_ns":16121100,"process_tree_reaped":true},"outcome":{"actual_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","error":"expected daemon unavailable","expected_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","result_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","status":"error"},"schema_version":1,"size":{"content_bytes":0,"process_count":1,"request_bytes":226,"response_bytes":0},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":214501783,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":214501783,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"direct_hook_wall":29596,"lifecycle_wrapper_overhead":184905,"missing_daemon_fail_fast":214501,"missing_daemon_hook_residual":13475,"process_startup_control":16121},"started_ns":459310748882101}} +{"availability":{"detail":"daemon socket is intentionally absent","state":"unavailable"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"4e06349a71afac8e","capture_id":"capture-c47dc3f4376948c38da0e7286f97d2b1","concurrency":1,"crate_id":"tracedecay-hooks","journey_id":"daemon-failure-recovery","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":5,"run_id":"incident-d276b7e995a84cf3a393089c223f9914","shard":"integrated-0","state":"recovery","storage_mode":"isolated-sqlite","surface":"host","temperature":"warm","variant":"candidate","workload_id":"missing-daemon-after-shell"},"lifecycle":{"activation_state":"inactive","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"direct_hook_wall_ns":29386896,"hook_residual_ns":14087355,"lifecycle_wrapper_overhead_ns":182801328,"missing_daemon_fail_fast_ns":212188224,"process_startup_control_ns":15299541,"process_tree_reaped":true},"outcome":{"actual_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","error":"expected daemon unavailable","expected_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","result_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","status":"error"},"schema_version":1,"size":{"content_bytes":0,"process_count":1,"request_bytes":226,"response_bytes":0},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":212188224,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":212188224,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"direct_hook_wall":29386,"lifecycle_wrapper_overhead":182801,"missing_daemon_fail_fast":212188,"missing_daemon_hook_residual":14087,"process_startup_control":15299},"started_ns":459316522740682}} +{"availability":{"detail":"daemon socket is intentionally absent","state":"unavailable"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"4e06349a71afac8e","capture_id":"capture-fcf0988ee0df4538831976f160c3295d","concurrency":1,"crate_id":"tracedecay-hooks","journey_id":"daemon-failure-recovery","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":6,"run_id":"incident-c7a0f4a590d949149ede591c13c45c06","shard":"integrated-0","state":"recovery","storage_mode":"isolated-sqlite","surface":"host","temperature":"warm","variant":"candidate","workload_id":"missing-daemon-after-shell"},"lifecycle":{"activation_state":"inactive","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"direct_hook_wall_ns":26733743,"hook_residual_ns":11178999,"lifecycle_wrapper_overhead_ns":184433468,"missing_daemon_fail_fast_ns":211167211,"process_startup_control_ns":15554744,"process_tree_reaped":true},"outcome":{"actual_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","error":"expected daemon unavailable","expected_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","result_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","status":"error"},"schema_version":1,"size":{"content_bytes":0,"process_count":1,"request_bytes":226,"response_bytes":0},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":211167211,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":211167211,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"direct_hook_wall":26733,"lifecycle_wrapper_overhead":184433,"missing_daemon_fail_fast":211167,"missing_daemon_hook_residual":11178,"process_startup_control":15554},"started_ns":459322194439386}} +{"availability":{"detail":"daemon socket is intentionally absent","state":"unavailable"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"4e06349a71afac8e","capture_id":"capture-f59fc27e85634139900a2717a71c91c6","concurrency":1,"crate_id":"tracedecay-hooks","journey_id":"daemon-failure-recovery","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":7,"run_id":"incident-a2083dbc0cf148eba8ce9f6e13fdc8bd","shard":"integrated-0","state":"recovery","storage_mode":"isolated-sqlite","surface":"host","temperature":"warm","variant":"candidate","workload_id":"missing-daemon-after-shell"},"lifecycle":{"activation_state":"inactive","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"direct_hook_wall_ns":25830582,"hook_residual_ns":10145165,"lifecycle_wrapper_overhead_ns":192814333,"missing_daemon_fail_fast_ns":218644915,"process_startup_control_ns":15685417,"process_tree_reaped":true},"outcome":{"actual_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","error":"expected daemon unavailable","expected_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","result_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","status":"error"},"schema_version":1,"size":{"content_bytes":0,"process_count":1,"request_bytes":226,"response_bytes":0},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":218644915,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":218644915,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"direct_hook_wall":25830,"lifecycle_wrapper_overhead":192814,"missing_daemon_fail_fast":218644,"missing_daemon_hook_residual":10145,"process_startup_control":15685},"started_ns":459328049508132}} +{"availability":{"detail":"daemon socket is intentionally absent","state":"unavailable"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"4e06349a71afac8e","capture_id":"capture-24daa6389633439ea54068e7e1b899f0","concurrency":1,"crate_id":"tracedecay-hooks","journey_id":"daemon-failure-recovery","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":8,"run_id":"incident-8919ffdce9f34ff8b4eef46205ab2963","shard":"integrated-0","state":"recovery","storage_mode":"isolated-sqlite","surface":"host","temperature":"warm","variant":"candidate","workload_id":"missing-daemon-after-shell"},"lifecycle":{"activation_state":"inactive","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"direct_hook_wall_ns":26712203,"hook_residual_ns":12017110,"lifecycle_wrapper_overhead_ns":188665952,"missing_daemon_fail_fast_ns":215378155,"process_startup_control_ns":14695093,"process_tree_reaped":true},"outcome":{"actual_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","error":"expected daemon unavailable","expected_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","result_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","status":"error"},"schema_version":1,"size":{"content_bytes":0,"process_count":1,"request_bytes":226,"response_bytes":0},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":215378155,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":215378155,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"direct_hook_wall":26712,"lifecycle_wrapper_overhead":188665,"missing_daemon_fail_fast":215378,"missing_daemon_hook_residual":12017,"process_startup_control":14695},"started_ns":459333977104128}} +{"availability":{"detail":"daemon socket is intentionally absent","state":"unavailable"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"4e06349a71afac8e","capture_id":"capture-b8d90c34c5724c118707b9b442852738","concurrency":1,"crate_id":"tracedecay-hooks","journey_id":"daemon-failure-recovery","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":9,"run_id":"incident-fe407598359847b5a6a45f4bf6f43746","shard":"integrated-0","state":"recovery","storage_mode":"isolated-sqlite","surface":"host","temperature":"warm","variant":"candidate","workload_id":"missing-daemon-after-shell"},"lifecycle":{"activation_state":"inactive","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"direct_hook_wall_ns":35386320,"hook_residual_ns":15325009,"lifecycle_wrapper_overhead_ns":355194801,"missing_daemon_fail_fast_ns":390581121,"process_startup_control_ns":20061311,"process_tree_reaped":true},"outcome":{"actual_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","error":"expected daemon unavailable","expected_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","result_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","status":"error"},"schema_version":1,"size":{"content_bytes":0,"process_count":1,"request_bytes":226,"response_bytes":0},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":390581121,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":390581121,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"direct_hook_wall":35386,"lifecycle_wrapper_overhead":355194,"missing_daemon_fail_fast":390581,"missing_daemon_hook_residual":15325,"process_startup_control":20061},"started_ns":459340123411548}} +{"availability":{"detail":"daemon socket is intentionally absent","state":"unavailable"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"4e06349a71afac8e","capture_id":"capture-d173fe43249442f6ab09ffd4d18bd797","concurrency":1,"crate_id":"tracedecay-hooks","journey_id":"daemon-failure-recovery","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":10,"run_id":"incident-d561dee391b74387bf41b3b68cb0a8aa","shard":"integrated-0","state":"recovery","storage_mode":"isolated-sqlite","surface":"host","temperature":"warm","variant":"candidate","workload_id":"missing-daemon-after-shell"},"lifecycle":{"activation_state":"inactive","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"direct_hook_wall_ns":26776944,"hook_residual_ns":10406050,"lifecycle_wrapper_overhead_ns":197981719,"missing_daemon_fail_fast_ns":224758663,"process_startup_control_ns":16370894,"process_tree_reaped":true},"outcome":{"actual_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","error":"expected daemon unavailable","expected_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","result_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","status":"error"},"schema_version":1,"size":{"content_bytes":0,"process_count":1,"request_bytes":228,"response_bytes":0},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":224758663,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":224758663,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"direct_hook_wall":26776,"lifecycle_wrapper_overhead":197981,"missing_daemon_fail_fast":224758,"missing_daemon_hook_residual":10406,"process_startup_control":16370},"started_ns":459346058415282}} +{"availability":{"detail":"daemon socket is intentionally absent","state":"unavailable"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"4e06349a71afac8e","capture_id":"capture-b962aa83067649558ddd916b5bb343b1","concurrency":1,"crate_id":"tracedecay-hooks","journey_id":"daemon-failure-recovery","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":11,"run_id":"incident-e43c6161954c46ebae9766269aef5f2e","shard":"integrated-0","state":"recovery","storage_mode":"isolated-sqlite","surface":"host","temperature":"warm","variant":"candidate","workload_id":"missing-daemon-after-shell"},"lifecycle":{"activation_state":"inactive","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"direct_hook_wall_ns":25214784,"hook_residual_ns":8693938,"lifecycle_wrapper_overhead_ns":191879325,"missing_daemon_fail_fast_ns":217094109,"process_startup_control_ns":16520846,"process_tree_reaped":true},"outcome":{"actual_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","error":"expected daemon unavailable","expected_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","result_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","status":"error"},"schema_version":1,"size":{"content_bytes":0,"process_count":1,"request_bytes":228,"response_bytes":0},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":217094109,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":217094109,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"direct_hook_wall":25214,"lifecycle_wrapper_overhead":191879,"missing_daemon_fail_fast":217094,"missing_daemon_hook_residual":8693,"process_startup_control":16520},"started_ns":459351883115804}} +{"availability":{"detail":"daemon socket is intentionally absent","state":"unavailable"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"4e06349a71afac8e","capture_id":"capture-a734e526f273460497841d7b07bf42a0","concurrency":1,"crate_id":"tracedecay-hooks","journey_id":"daemon-failure-recovery","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":12,"run_id":"incident-50ef2cc8c68e4a2da7cd3084682e41ba","shard":"integrated-0","state":"recovery","storage_mode":"isolated-sqlite","surface":"host","temperature":"warm","variant":"candidate","workload_id":"missing-daemon-after-shell"},"lifecycle":{"activation_state":"inactive","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"direct_hook_wall_ns":26430090,"hook_residual_ns":12256992,"lifecycle_wrapper_overhead_ns":183932495,"missing_daemon_fail_fast_ns":210362585,"process_startup_control_ns":14173098,"process_tree_reaped":true},"outcome":{"actual_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","error":"expected daemon unavailable","expected_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","result_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","status":"error"},"schema_version":1,"size":{"content_bytes":0,"process_count":1,"request_bytes":228,"response_bytes":0},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":210362585,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":210362585,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"direct_hook_wall":26430,"lifecycle_wrapper_overhead":183932,"missing_daemon_fail_fast":210362,"missing_daemon_hook_residual":12256,"process_startup_control":14173},"started_ns":459357564883819}} +{"availability":{"detail":"daemon socket is intentionally absent","state":"unavailable"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"4e06349a71afac8e","capture_id":"capture-8064bc8b39b94b0792653184d6e158b0","concurrency":1,"crate_id":"tracedecay-hooks","journey_id":"daemon-failure-recovery","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":13,"run_id":"incident-d7c8b7a411d14288b2a5808648f2de61","shard":"integrated-0","state":"recovery","storage_mode":"isolated-sqlite","surface":"host","temperature":"warm","variant":"candidate","workload_id":"missing-daemon-after-shell"},"lifecycle":{"activation_state":"inactive","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"direct_hook_wall_ns":25053003,"hook_residual_ns":9784211,"lifecycle_wrapper_overhead_ns":203647711,"missing_daemon_fail_fast_ns":228700714,"process_startup_control_ns":15268792,"process_tree_reaped":true},"outcome":{"actual_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","error":"expected daemon unavailable","expected_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","result_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","status":"error"},"schema_version":1,"size":{"content_bytes":0,"process_count":1,"request_bytes":228,"response_bytes":0},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":228700714,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":228700714,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"direct_hook_wall":25053,"lifecycle_wrapper_overhead":203647,"missing_daemon_fail_fast":228700,"missing_daemon_hook_residual":9784,"process_startup_control":15268},"started_ns":459363384077015}} +{"availability":{"detail":"daemon socket is intentionally absent","state":"unavailable"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"4e06349a71afac8e","capture_id":"capture-543898b547a14ab29e82a5c623f273bc","concurrency":1,"crate_id":"tracedecay-hooks","journey_id":"daemon-failure-recovery","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":14,"run_id":"incident-ff237826387449fd95690ca47476c7d7","shard":"integrated-0","state":"recovery","storage_mode":"isolated-sqlite","surface":"host","temperature":"warm","variant":"candidate","workload_id":"missing-daemon-after-shell"},"lifecycle":{"activation_state":"inactive","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"direct_hook_wall_ns":27087079,"hook_residual_ns":11582566,"lifecycle_wrapper_overhead_ns":198103202,"missing_daemon_fail_fast_ns":225190281,"process_startup_control_ns":15504513,"process_tree_reaped":true},"outcome":{"actual_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","error":"expected daemon unavailable","expected_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","result_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","status":"error"},"schema_version":1,"size":{"content_bytes":0,"process_count":1,"request_bytes":228,"response_bytes":0},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":225190281,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":225190281,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"direct_hook_wall":27087,"lifecycle_wrapper_overhead":198103,"missing_daemon_fail_fast":225190,"missing_daemon_hook_residual":11582,"process_startup_control":15504},"started_ns":459369118427366}} +{"availability":{"detail":"daemon socket is intentionally absent","state":"unavailable"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"4e06349a71afac8e","capture_id":"capture-e17b610389fb496cb525a6813e01ad65","concurrency":1,"crate_id":"tracedecay-hooks","journey_id":"daemon-failure-recovery","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":15,"run_id":"incident-0200d9d01f2341dcab56e2c7d4e6d79c","shard":"integrated-0","state":"recovery","storage_mode":"isolated-sqlite","surface":"host","temperature":"warm","variant":"candidate","workload_id":"missing-daemon-after-shell"},"lifecycle":{"activation_state":"inactive","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"direct_hook_wall_ns":35299570,"hook_residual_ns":14324477,"lifecycle_wrapper_overhead_ns":365600586,"missing_daemon_fail_fast_ns":400900156,"process_startup_control_ns":20975093,"process_tree_reaped":true},"outcome":{"actual_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","error":"expected daemon unavailable","expected_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","result_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","status":"error"},"schema_version":1,"size":{"content_bytes":0,"process_count":1,"request_bytes":228,"response_bytes":0},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":400900156,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":400900156,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"direct_hook_wall":35299,"lifecycle_wrapper_overhead":365600,"missing_daemon_fail_fast":400900,"missing_daemon_hook_residual":14324,"process_startup_control":20975},"started_ns":459375443184753}} +{"availability":{"detail":"daemon socket is intentionally absent","state":"unavailable"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"4e06349a71afac8e","capture_id":"capture-06c00ba23f904510bdb8e2b0d4b23ab2","concurrency":1,"crate_id":"tracedecay-hooks","journey_id":"daemon-failure-recovery","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":16,"run_id":"incident-768c50fecb1243d2ae3e04d9ac43d7ce","shard":"integrated-0","state":"recovery","storage_mode":"isolated-sqlite","surface":"host","temperature":"warm","variant":"candidate","workload_id":"missing-daemon-after-shell"},"lifecycle":{"activation_state":"inactive","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"direct_hook_wall_ns":26236297,"hook_residual_ns":10161485,"lifecycle_wrapper_overhead_ns":197150714,"missing_daemon_fail_fast_ns":223387011,"process_startup_control_ns":16074812,"process_tree_reaped":true},"outcome":{"actual_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","error":"expected daemon unavailable","expected_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","result_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","status":"error"},"schema_version":1,"size":{"content_bytes":0,"process_count":1,"request_bytes":228,"response_bytes":0},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":223387011,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":223387011,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"direct_hook_wall":26236,"lifecycle_wrapper_overhead":197150,"missing_daemon_fail_fast":223387,"missing_daemon_hook_residual":10161,"process_startup_control":16074},"started_ns":459381379488397}} +{"availability":{"detail":"daemon socket is intentionally absent","state":"unavailable"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"4e06349a71afac8e","capture_id":"capture-20267b08cdda4d91a4477df5443f7c1b","concurrency":1,"crate_id":"tracedecay-hooks","journey_id":"daemon-failure-recovery","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":17,"run_id":"incident-02e9e23ec7724927a17b034695e40589","shard":"integrated-0","state":"recovery","storage_mode":"isolated-sqlite","surface":"host","temperature":"warm","variant":"candidate","workload_id":"missing-daemon-after-shell"},"lifecycle":{"activation_state":"inactive","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"direct_hook_wall_ns":28807610,"hook_residual_ns":12158421,"lifecycle_wrapper_overhead_ns":189205074,"missing_daemon_fail_fast_ns":218012684,"process_startup_control_ns":16649189,"process_tree_reaped":true},"outcome":{"actual_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","error":"expected daemon unavailable","expected_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","result_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","status":"error"},"schema_version":1,"size":{"content_bytes":0,"process_count":1,"request_bytes":228,"response_bytes":0},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":218012684,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":218012684,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"direct_hook_wall":28807,"lifecycle_wrapper_overhead":189205,"missing_daemon_fail_fast":218012,"missing_daemon_hook_residual":12158,"process_startup_control":16649},"started_ns":459387583967696}} +{"availability":{"detail":"daemon socket is intentionally absent","state":"unavailable"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"4e06349a71afac8e","capture_id":"capture-1b7a6175fe6948bab0d61165fbaa2b46","concurrency":1,"crate_id":"tracedecay-hooks","journey_id":"daemon-failure-recovery","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":18,"run_id":"incident-5a2c40db548c45d680a54365cb12b990","shard":"integrated-0","state":"recovery","storage_mode":"isolated-sqlite","surface":"host","temperature":"warm","variant":"candidate","workload_id":"missing-daemon-after-shell"},"lifecycle":{"activation_state":"inactive","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"direct_hook_wall_ns":27121588,"hook_residual_ns":12288283,"lifecycle_wrapper_overhead_ns":183018757,"missing_daemon_fail_fast_ns":210140345,"process_startup_control_ns":14833305,"process_tree_reaped":true},"outcome":{"actual_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","error":"expected daemon unavailable","expected_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","result_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","status":"error"},"schema_version":1,"size":{"content_bytes":0,"process_count":1,"request_bytes":228,"response_bytes":0},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":210140345,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":210140345,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"direct_hook_wall":27121,"lifecycle_wrapper_overhead":183018,"missing_daemon_fail_fast":210140,"missing_daemon_hook_residual":12288,"process_startup_control":14833},"started_ns":459393767027475}} +{"availability":{"detail":"daemon socket is intentionally absent","state":"unavailable"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"4e06349a71afac8e","capture_id":"capture-c7325c3c55fa48848b1cc8b07618aac0","concurrency":1,"crate_id":"tracedecay-hooks","journey_id":"daemon-failure-recovery","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":19,"run_id":"incident-5b36a0400fd74753a691fb5682c80278","shard":"integrated-0","state":"recovery","storage_mode":"isolated-sqlite","surface":"host","temperature":"warm","variant":"candidate","workload_id":"missing-daemon-after-shell"},"lifecycle":{"activation_state":"inactive","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"direct_hook_wall_ns":26280580,"hook_residual_ns":10436192,"lifecycle_wrapper_overhead_ns":200616586,"missing_daemon_fail_fast_ns":226897166,"process_startup_control_ns":15844388,"process_tree_reaped":true},"outcome":{"actual_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","error":"expected daemon unavailable","expected_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","result_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","status":"error"},"schema_version":1,"size":{"content_bytes":0,"process_count":1,"request_bytes":228,"response_bytes":0},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":226897166,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":226897166,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"direct_hook_wall":26280,"lifecycle_wrapper_overhead":200616,"missing_daemon_fail_fast":226897,"missing_daemon_hook_residual":10436,"process_startup_control":15844},"started_ns":459399425952029}} +{"availability":{"detail":"daemon socket is intentionally absent","state":"unavailable"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"4e06349a71afac8e","capture_id":"capture-538938d3bed64b2281be0408c321da05","concurrency":1,"crate_id":"tracedecay-hooks","journey_id":"daemon-failure-recovery","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":20,"run_id":"incident-45414b562ff6425699aa81e797b53a98","shard":"integrated-0","state":"recovery","storage_mode":"isolated-sqlite","surface":"host","temperature":"warm","variant":"candidate","workload_id":"missing-daemon-after-shell"},"lifecycle":{"activation_state":"inactive","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"direct_hook_wall_ns":27502793,"hook_residual_ns":12219581,"lifecycle_wrapper_overhead_ns":189602521,"missing_daemon_fail_fast_ns":217105314,"process_startup_control_ns":15283212,"process_tree_reaped":true},"outcome":{"actual_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","error":"expected daemon unavailable","expected_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","result_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","status":"error"},"schema_version":1,"size":{"content_bytes":0,"process_count":1,"request_bytes":228,"response_bytes":0},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":217105314,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":217105314,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"direct_hook_wall":27502,"lifecycle_wrapper_overhead":189602,"missing_daemon_fail_fast":217105,"missing_daemon_hook_residual":12219,"process_startup_control":15283},"started_ns":459405527093484}} +{"availability":{"detail":"daemon socket is intentionally absent","state":"unavailable"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"4e06349a71afac8e","capture_id":"capture-58aa3e93983b49e7acadfd5dda185801","concurrency":1,"crate_id":"tracedecay-hooks","journey_id":"daemon-failure-recovery","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":21,"run_id":"incident-089ce6893d544d98b84d2539d1dd0557","shard":"integrated-0","state":"recovery","storage_mode":"isolated-sqlite","surface":"host","temperature":"warm","variant":"candidate","workload_id":"missing-daemon-after-shell"},"lifecycle":{"activation_state":"inactive","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"direct_hook_wall_ns":26664762,"hook_residual_ns":11441182,"lifecycle_wrapper_overhead_ns":189513742,"missing_daemon_fail_fast_ns":216178504,"process_startup_control_ns":15223580,"process_tree_reaped":true},"outcome":{"actual_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","error":"expected daemon unavailable","expected_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","result_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","status":"error"},"schema_version":1,"size":{"content_bytes":0,"process_count":1,"request_bytes":228,"response_bytes":0},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":216178504,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":216178504,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"direct_hook_wall":26664,"lifecycle_wrapper_overhead":189513,"missing_daemon_fail_fast":216178,"missing_daemon_hook_residual":11441,"process_startup_control":15223},"started_ns":459411762247541}} +{"availability":{"detail":"daemon socket is intentionally absent","state":"unavailable"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"4e06349a71afac8e","capture_id":"capture-71bc0e5f9f4e489ab7cd527e26d9443e","concurrency":1,"crate_id":"tracedecay-hooks","journey_id":"daemon-failure-recovery","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":22,"run_id":"incident-5358bbb7e6154508905648a344b5b6f2","shard":"integrated-0","state":"recovery","storage_mode":"isolated-sqlite","surface":"host","temperature":"warm","variant":"candidate","workload_id":"missing-daemon-after-shell"},"lifecycle":{"activation_state":"inactive","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"direct_hook_wall_ns":26844216,"hook_residual_ns":11646157,"lifecycle_wrapper_overhead_ns":189550630,"missing_daemon_fail_fast_ns":216394846,"process_startup_control_ns":15198059,"process_tree_reaped":true},"outcome":{"actual_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","error":"expected daemon unavailable","expected_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","result_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","status":"error"},"schema_version":1,"size":{"content_bytes":0,"process_count":1,"request_bytes":228,"response_bytes":0},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":216394846,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":216394846,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"direct_hook_wall":26844,"lifecycle_wrapper_overhead":189550,"missing_daemon_fail_fast":216394,"missing_daemon_hook_residual":11646,"process_startup_control":15198},"started_ns":459417593876648}} +{"availability":{"detail":"daemon socket is intentionally absent","state":"unavailable"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"4e06349a71afac8e","capture_id":"capture-d90a4c51f65549be9a520f65e90ad147","concurrency":1,"crate_id":"tracedecay-hooks","journey_id":"daemon-failure-recovery","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":23,"run_id":"incident-7b70b73602c743ae819dd9d6e85581b5","shard":"integrated-0","state":"recovery","storage_mode":"isolated-sqlite","surface":"host","temperature":"warm","variant":"candidate","workload_id":"missing-daemon-after-shell"},"lifecycle":{"activation_state":"inactive","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"direct_hook_wall_ns":26223298,"hook_residual_ns":11480374,"lifecycle_wrapper_overhead_ns":187533406,"missing_daemon_fail_fast_ns":213756704,"process_startup_control_ns":14742924,"process_tree_reaped":true},"outcome":{"actual_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","error":"expected daemon unavailable","expected_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","result_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","status":"error"},"schema_version":1,"size":{"content_bytes":0,"process_count":1,"request_bytes":228,"response_bytes":0},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":213756704,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":213756704,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"direct_hook_wall":26223,"lifecycle_wrapper_overhead":187533,"missing_daemon_fail_fast":213756,"missing_daemon_hook_residual":11480,"process_startup_control":14742},"started_ns":459423494740293}} +{"availability":{"detail":"daemon socket is intentionally absent","state":"unavailable"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"4e06349a71afac8e","capture_id":"capture-3c84a489006c4893b4e931337b8a7e37","concurrency":1,"crate_id":"tracedecay-hooks","journey_id":"daemon-failure-recovery","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":24,"run_id":"incident-779d89ea1d2d423a828b022c19d1796a","shard":"integrated-0","state":"recovery","storage_mode":"isolated-sqlite","surface":"host","temperature":"warm","variant":"candidate","workload_id":"missing-daemon-after-shell"},"lifecycle":{"activation_state":"inactive","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"direct_hook_wall_ns":27106640,"hook_residual_ns":11248743,"lifecycle_wrapper_overhead_ns":190260929,"missing_daemon_fail_fast_ns":217367569,"process_startup_control_ns":15857897,"process_tree_reaped":true},"outcome":{"actual_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","error":"expected daemon unavailable","expected_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","result_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","status":"error"},"schema_version":1,"size":{"content_bytes":0,"process_count":1,"request_bytes":228,"response_bytes":0},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":217367569,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":217367569,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"direct_hook_wall":27106,"lifecycle_wrapper_overhead":190260,"missing_daemon_fail_fast":217367,"missing_daemon_hook_residual":11248,"process_startup_control":15857},"started_ns":459429167022164}} +{"availability":{"detail":"daemon socket is intentionally absent","state":"unavailable"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"4e06349a71afac8e","capture_id":"capture-62efd486286b41ec9c63cc4aaaf84ec1","concurrency":1,"crate_id":"tracedecay-hooks","journey_id":"daemon-failure-recovery","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":25,"run_id":"incident-fea3d52571164e0fa79f3c4533167257","shard":"integrated-0","state":"recovery","storage_mode":"isolated-sqlite","surface":"host","temperature":"warm","variant":"candidate","workload_id":"missing-daemon-after-shell"},"lifecycle":{"activation_state":"inactive","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"direct_hook_wall_ns":27618036,"hook_residual_ns":12931502,"lifecycle_wrapper_overhead_ns":182956799,"missing_daemon_fail_fast_ns":210574835,"process_startup_control_ns":14686534,"process_tree_reaped":true},"outcome":{"actual_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","error":"expected daemon unavailable","expected_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","result_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","status":"error"},"schema_version":1,"size":{"content_bytes":0,"process_count":1,"request_bytes":228,"response_bytes":0},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":210574835,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":210574835,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"direct_hook_wall":27618,"lifecycle_wrapper_overhead":182956,"missing_daemon_fail_fast":210574,"missing_daemon_hook_residual":12931,"process_startup_control":14686},"started_ns":459434965442474}} +{"availability":{"detail":"daemon socket is intentionally absent","state":"unavailable"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"4e06349a71afac8e","capture_id":"capture-bfb3005b79584712af3a145b57e42d89","concurrency":1,"crate_id":"tracedecay-hooks","journey_id":"daemon-failure-recovery","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":26,"run_id":"incident-8951ea033f7d47d8af0e7aed4e2b716c","shard":"integrated-0","state":"recovery","storage_mode":"isolated-sqlite","surface":"host","temperature":"warm","variant":"candidate","workload_id":"missing-daemon-after-shell"},"lifecycle":{"activation_state":"inactive","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"direct_hook_wall_ns":26496172,"hook_residual_ns":11515603,"lifecycle_wrapper_overhead_ns":186743526,"missing_daemon_fail_fast_ns":213239698,"process_startup_control_ns":14980569,"process_tree_reaped":true},"outcome":{"actual_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","error":"expected daemon unavailable","expected_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","result_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","status":"error"},"schema_version":1,"size":{"content_bytes":0,"process_count":1,"request_bytes":228,"response_bytes":0},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":213239698,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":213239698,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"direct_hook_wall":26496,"lifecycle_wrapper_overhead":186743,"missing_daemon_fail_fast":213239,"missing_daemon_hook_residual":11515,"process_startup_control":14980},"started_ns":459440760023551}} +{"availability":{"detail":"daemon socket is intentionally absent","state":"unavailable"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"4e06349a71afac8e","capture_id":"capture-85d273ad5aba4f6484c48373e8f0ebb7","concurrency":1,"crate_id":"tracedecay-hooks","journey_id":"daemon-failure-recovery","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":27,"run_id":"incident-03a9f4a8b8514b70a1a9cf94622ae67b","shard":"integrated-0","state":"recovery","storage_mode":"isolated-sqlite","surface":"host","temperature":"warm","variant":"candidate","workload_id":"missing-daemon-after-shell"},"lifecycle":{"activation_state":"inactive","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"direct_hook_wall_ns":25743741,"hook_residual_ns":10409969,"lifecycle_wrapper_overhead_ns":204539231,"missing_daemon_fail_fast_ns":230282972,"process_startup_control_ns":15333772,"process_tree_reaped":true},"outcome":{"actual_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","error":"expected daemon unavailable","expected_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","result_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","status":"error"},"schema_version":1,"size":{"content_bytes":0,"process_count":1,"request_bytes":228,"response_bytes":0},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":230282972,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":230282972,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"direct_hook_wall":25743,"lifecycle_wrapper_overhead":204539,"missing_daemon_fail_fast":230282,"missing_daemon_hook_residual":10409,"process_startup_control":15333},"started_ns":459446948986967}} +{"availability":{"detail":"daemon socket is intentionally absent","state":"unavailable"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"4e06349a71afac8e","capture_id":"capture-f2c0b188fdc140acb47f3690cc594964","concurrency":1,"crate_id":"tracedecay-hooks","journey_id":"daemon-failure-recovery","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":28,"run_id":"incident-70605f0456894768ae57881530f0194a","shard":"integrated-0","state":"recovery","storage_mode":"isolated-sqlite","surface":"host","temperature":"warm","variant":"candidate","workload_id":"missing-daemon-after-shell"},"lifecycle":{"activation_state":"inactive","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"direct_hook_wall_ns":26284830,"hook_residual_ns":9487640,"lifecycle_wrapper_overhead_ns":196326497,"missing_daemon_fail_fast_ns":222611327,"process_startup_control_ns":16797190,"process_tree_reaped":true},"outcome":{"actual_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","error":"expected daemon unavailable","expected_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","result_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","status":"error"},"schema_version":1,"size":{"content_bytes":0,"process_count":1,"request_bytes":228,"response_bytes":0},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":222611327,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":222611327,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"direct_hook_wall":26284,"lifecycle_wrapper_overhead":196326,"missing_daemon_fail_fast":222611,"missing_daemon_hook_residual":9487,"process_startup_control":16797},"started_ns":459463607512963}} +{"availability":{"detail":"daemon socket is intentionally absent","state":"unavailable"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"4e06349a71afac8e","capture_id":"capture-01eb7ad0946d4f3b9245f2ee147c43dc","concurrency":1,"crate_id":"tracedecay-hooks","journey_id":"daemon-failure-recovery","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":29,"run_id":"incident-4a3ddb448d864b969d8fd35258882bb7","shard":"integrated-0","state":"recovery","storage_mode":"isolated-sqlite","surface":"host","temperature":"warm","variant":"candidate","workload_id":"missing-daemon-after-shell"},"lifecycle":{"activation_state":"inactive","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"direct_hook_wall_ns":31493715,"hook_residual_ns":13096395,"lifecycle_wrapper_overhead_ns":192972979,"missing_daemon_fail_fast_ns":224466694,"process_startup_control_ns":18397320,"process_tree_reaped":true},"outcome":{"actual_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","error":"expected daemon unavailable","expected_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","result_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","status":"error"},"schema_version":1,"size":{"content_bytes":0,"process_count":1,"request_bytes":228,"response_bytes":0},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":224466694,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":224466694,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"direct_hook_wall":31493,"lifecycle_wrapper_overhead":192972,"missing_daemon_fail_fast":224466,"missing_daemon_hook_residual":13096,"process_startup_control":18397},"started_ns":459490802440591}} +{"availability":{"detail":"daemon socket is intentionally absent","state":"unavailable"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"4e06349a71afac8e","capture_id":"capture-4107a9043d1f40ceb43d75f44f67ca09","concurrency":1,"crate_id":"tracedecay-hooks","journey_id":"daemon-failure-recovery","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":30,"run_id":"incident-c32d82b5229c4d0687af8d5074acfe97","shard":"integrated-0","state":"recovery","storage_mode":"isolated-sqlite","surface":"host","temperature":"warm","variant":"candidate","workload_id":"missing-daemon-after-shell"},"lifecycle":{"activation_state":"inactive","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"direct_hook_wall_ns":27007898,"hook_residual_ns":11819667,"lifecycle_wrapper_overhead_ns":187014546,"missing_daemon_fail_fast_ns":214022444,"process_startup_control_ns":15188231,"process_tree_reaped":true},"outcome":{"actual_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","error":"expected daemon unavailable","expected_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","result_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","status":"error"},"schema_version":1,"size":{"content_bytes":0,"process_count":1,"request_bytes":228,"response_bytes":0},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":214022444,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":214022444,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"direct_hook_wall":27007,"lifecycle_wrapper_overhead":187014,"missing_daemon_fail_fast":214022,"missing_daemon_hook_residual":11819,"process_startup_control":15188},"started_ns":459517526869754}} +{"availability":{"detail":"daemon socket is intentionally absent","state":"unavailable"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"4e06349a71afac8e","capture_id":"capture-ee9da8291e8a45a7958d24077b09d55f","concurrency":1,"crate_id":"tracedecay-hooks","journey_id":"daemon-failure-recovery","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":31,"run_id":"incident-82a6947f4cb2453fb8814b89feaf99c0","shard":"integrated-0","state":"recovery","storage_mode":"isolated-sqlite","surface":"host","temperature":"warm","variant":"candidate","workload_id":"missing-daemon-after-shell"},"lifecycle":{"activation_state":"inactive","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"direct_hook_wall_ns":27941690,"hook_residual_ns":5853743,"lifecycle_wrapper_overhead_ns":192135842,"missing_daemon_fail_fast_ns":220077532,"process_startup_control_ns":22087947,"process_tree_reaped":true},"outcome":{"actual_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","error":"expected daemon unavailable","expected_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","result_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","status":"error"},"schema_version":1,"size":{"content_bytes":0,"process_count":1,"request_bytes":228,"response_bytes":0},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":220077532,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":220077532,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"direct_hook_wall":27941,"lifecycle_wrapper_overhead":192135,"missing_daemon_fail_fast":220077,"missing_daemon_hook_residual":5853,"process_startup_control":22087},"started_ns":459539333841034}} +{"availability":{"detail":"daemon socket is intentionally absent","state":"unavailable"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"4e06349a71afac8e","capture_id":"capture-0a69e9010f674177b5ec1ce64aaea83a","concurrency":1,"crate_id":"tracedecay-hooks","journey_id":"daemon-failure-recovery","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":32,"run_id":"incident-b49e587ea3824ae88cbaca66b5efb3fd","shard":"integrated-0","state":"recovery","storage_mode":"isolated-sqlite","surface":"host","temperature":"warm","variant":"candidate","workload_id":"missing-daemon-after-shell"},"lifecycle":{"activation_state":"inactive","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"direct_hook_wall_ns":26122087,"hook_residual_ns":8519046,"lifecycle_wrapper_overhead_ns":186979569,"missing_daemon_fail_fast_ns":213101656,"process_startup_control_ns":17603041,"process_tree_reaped":true},"outcome":{"actual_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","error":"expected daemon unavailable","expected_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","result_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","status":"error"},"schema_version":1,"size":{"content_bytes":0,"process_count":1,"request_bytes":228,"response_bytes":0},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":213101656,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":213101656,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"direct_hook_wall":26122,"lifecycle_wrapper_overhead":186979,"missing_daemon_fail_fast":213101,"missing_daemon_hook_residual":8519,"process_startup_control":17603},"started_ns":459551042517789}} +{"availability":{"detail":"daemon socket is intentionally absent","state":"unavailable"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"4e06349a71afac8e","capture_id":"capture-08737a1f310f47d3bca77304ddfc3673","concurrency":1,"crate_id":"tracedecay-hooks","journey_id":"daemon-failure-recovery","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":33,"run_id":"incident-40dbca7745054dec8cae5869b03b9b9f","shard":"integrated-0","state":"recovery","storage_mode":"isolated-sqlite","surface":"host","temperature":"warm","variant":"candidate","workload_id":"missing-daemon-after-shell"},"lifecycle":{"activation_state":"inactive","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"direct_hook_wall_ns":28254955,"hook_residual_ns":9795073,"lifecycle_wrapper_overhead_ns":187124278,"missing_daemon_fail_fast_ns":215379233,"process_startup_control_ns":18459882,"process_tree_reaped":true},"outcome":{"actual_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","error":"expected daemon unavailable","expected_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","result_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","status":"error"},"schema_version":1,"size":{"content_bytes":0,"process_count":1,"request_bytes":228,"response_bytes":0},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":215379233,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":215379233,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"direct_hook_wall":28254,"lifecycle_wrapper_overhead":187124,"missing_daemon_fail_fast":215379,"missing_daemon_hook_residual":9795,"process_startup_control":18459},"started_ns":459560866221864}} +{"availability":{"detail":"daemon socket is intentionally absent","state":"unavailable"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"4e06349a71afac8e","capture_id":"capture-cfa526c127044094b05be2053eb6d86d","concurrency":1,"crate_id":"tracedecay-hooks","journey_id":"daemon-failure-recovery","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":34,"run_id":"incident-cccd7e9872c24f96b5cb0223718e78c1","shard":"integrated-0","state":"recovery","storage_mode":"isolated-sqlite","surface":"host","temperature":"warm","variant":"candidate","workload_id":"missing-daemon-after-shell"},"lifecycle":{"activation_state":"inactive","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"direct_hook_wall_ns":29405350,"hook_residual_ns":12316656,"lifecycle_wrapper_overhead_ns":196826252,"missing_daemon_fail_fast_ns":226231602,"process_startup_control_ns":17088694,"process_tree_reaped":true},"outcome":{"actual_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","error":"expected daemon unavailable","expected_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","result_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","status":"error"},"schema_version":1,"size":{"content_bytes":0,"process_count":1,"request_bytes":228,"response_bytes":0},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":226231602,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":226231602,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"direct_hook_wall":29405,"lifecycle_wrapper_overhead":196826,"missing_daemon_fail_fast":226231,"missing_daemon_hook_residual":12316,"process_startup_control":17088},"started_ns":459572442076762}} +{"availability":{"detail":"daemon socket is intentionally absent","state":"unavailable"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"4e06349a71afac8e","capture_id":"capture-3418cae403414bd8a759f17a2fb3278c","concurrency":1,"crate_id":"tracedecay-hooks","journey_id":"daemon-failure-recovery","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":35,"run_id":"incident-4c612d24087d4ab7afc9643967c30b39","shard":"integrated-0","state":"recovery","storage_mode":"isolated-sqlite","surface":"host","temperature":"warm","variant":"candidate","workload_id":"missing-daemon-after-shell"},"lifecycle":{"activation_state":"inactive","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"direct_hook_wall_ns":31330674,"hook_residual_ns":15808528,"lifecycle_wrapper_overhead_ns":203897790,"missing_daemon_fail_fast_ns":235228464,"process_startup_control_ns":15522146,"process_tree_reaped":true},"outcome":{"actual_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","error":"expected daemon unavailable","expected_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","result_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","status":"error"},"schema_version":1,"size":{"content_bytes":0,"process_count":1,"request_bytes":228,"response_bytes":0},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":235228464,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":235228464,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"direct_hook_wall":31330,"lifecycle_wrapper_overhead":203897,"missing_daemon_fail_fast":235228,"missing_daemon_hook_residual":15808,"process_startup_control":15522},"started_ns":459586733080641}} +{"availability":{"detail":"daemon socket is intentionally absent","state":"unavailable"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"4e06349a71afac8e","capture_id":"capture-dff9f688b58c44c9bf4e89716677e7dc","concurrency":1,"crate_id":"tracedecay-hooks","journey_id":"daemon-failure-recovery","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":36,"run_id":"incident-8743f63074fe43eb866f57fdf2766f99","shard":"integrated-0","state":"recovery","storage_mode":"isolated-sqlite","surface":"host","temperature":"warm","variant":"candidate","workload_id":"missing-daemon-after-shell"},"lifecycle":{"activation_state":"inactive","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"direct_hook_wall_ns":27813389,"hook_residual_ns":12188643,"lifecycle_wrapper_overhead_ns":183940183,"missing_daemon_fail_fast_ns":211753572,"process_startup_control_ns":15624746,"process_tree_reaped":true},"outcome":{"actual_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","error":"expected daemon unavailable","expected_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","result_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","status":"error"},"schema_version":1,"size":{"content_bytes":0,"process_count":1,"request_bytes":228,"response_bytes":0},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":211753572,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":211753572,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"direct_hook_wall":27813,"lifecycle_wrapper_overhead":183940,"missing_daemon_fail_fast":211753,"missing_daemon_hook_residual":12188,"process_startup_control":15624},"started_ns":459598799110957}} +{"availability":{"detail":"daemon socket is intentionally absent","state":"unavailable"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"4e06349a71afac8e","capture_id":"capture-453509a9db434ddb8b38dbf2ac167404","concurrency":1,"crate_id":"tracedecay-hooks","journey_id":"daemon-failure-recovery","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":37,"run_id":"incident-7f89eef2be754421b431641235501738","shard":"integrated-0","state":"recovery","storage_mode":"isolated-sqlite","surface":"host","temperature":"warm","variant":"candidate","workload_id":"missing-daemon-after-shell"},"lifecycle":{"activation_state":"inactive","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"direct_hook_wall_ns":30011117,"hook_residual_ns":12520807,"lifecycle_wrapper_overhead_ns":191384795,"missing_daemon_fail_fast_ns":221395912,"process_startup_control_ns":17490310,"process_tree_reaped":true},"outcome":{"actual_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","error":"expected daemon unavailable","expected_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","result_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","status":"error"},"schema_version":1,"size":{"content_bytes":0,"process_count":1,"request_bytes":228,"response_bytes":0},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":221395912,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":221395912,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"direct_hook_wall":30011,"lifecycle_wrapper_overhead":191384,"missing_daemon_fail_fast":221395,"missing_daemon_hook_residual":12520,"process_startup_control":17490},"started_ns":459606679032620}} +{"availability":{"detail":"daemon socket is intentionally absent","state":"unavailable"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"4e06349a71afac8e","capture_id":"capture-e914299f0c57419b8c34a1c4a64e16bd","concurrency":1,"crate_id":"tracedecay-hooks","journey_id":"daemon-failure-recovery","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":38,"run_id":"incident-a2123c2aa2394fe4ad0de57c0f9e5312","shard":"integrated-0","state":"recovery","storage_mode":"isolated-sqlite","surface":"host","temperature":"warm","variant":"candidate","workload_id":"missing-daemon-after-shell"},"lifecycle":{"activation_state":"inactive","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"direct_hook_wall_ns":33997037,"hook_residual_ns":16304794,"lifecycle_wrapper_overhead_ns":203142333,"missing_daemon_fail_fast_ns":237139370,"process_startup_control_ns":17692243,"process_tree_reaped":true},"outcome":{"actual_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","error":"expected daemon unavailable","expected_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","result_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","status":"error"},"schema_version":1,"size":{"content_bytes":0,"process_count":1,"request_bytes":228,"response_bytes":0},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":237139370,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":237139370,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"direct_hook_wall":33997,"lifecycle_wrapper_overhead":203142,"missing_daemon_fail_fast":237139,"missing_daemon_hook_residual":16304,"process_startup_control":17692},"started_ns":459613307670080}} +{"availability":{"detail":"daemon socket is intentionally absent","state":"unavailable"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"4e06349a71afac8e","capture_id":"capture-23c4e4234f3f4465bba72bfa55ebf29d","concurrency":1,"crate_id":"tracedecay-hooks","journey_id":"daemon-failure-recovery","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":39,"run_id":"incident-2182f5eb92744ee0a485520e2941dd25","shard":"integrated-0","state":"recovery","storage_mode":"isolated-sqlite","surface":"host","temperature":"warm","variant":"candidate","workload_id":"missing-daemon-after-shell"},"lifecycle":{"activation_state":"inactive","daemon_survived":null,"restart_state":"not_required","timeout_phase":null},"observations":{"direct_hook_wall_ns":32916444,"hook_residual_ns":13760862,"lifecycle_wrapper_overhead_ns":200931587,"missing_daemon_fail_fast_ns":233848031,"process_startup_control_ns":19155582,"process_tree_reaped":true},"outcome":{"actual_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","error":"expected daemon unavailable","expected_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","result_digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","status":"error"},"schema_version":1,"size":{"content_bytes":0,"process_count":1,"request_bytes":228,"response_bytes":0},"timing":{"abort_offset_ns":null,"admission_us":null,"cli_wall_ns":null,"daemon_us":null,"elapsed_ns":233848031,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":233848031,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"direct_hook_wall":32916,"lifecycle_wrapper_overhead":200931,"missing_daemon_fail_fast":233848,"missing_daemon_hook_residual":13760,"process_startup_control":19155},"started_ns":459619413661990}} diff --git a/benchmark_data/runtime/evidence/pinned-audit-revalidation-20260730/README.md b/benchmark_data/runtime/evidence/pinned-audit-revalidation-20260730/README.md new file mode 100644 index 0000000000..3ac87ad2d9 --- /dev/null +++ b/benchmark_data/runtime/evidence/pinned-audit-revalidation-20260730/README.md @@ -0,0 +1,16 @@ +# Pinned-audit runtime revalidation + +> **Dated runtime evidence — not acceptance authority.** Preserve these raw +> samples and their provenance, but do not recreate their exact counts, +> snapshots, receipts, attestations, binary/worktree choreography, or gates as +> build prerequisites. Current requirements come only from the +> `docs/plans/tracedecay-v2/` hierarchy; validate current runtime behavior directly. + +This directory records one same-input ABBA revalidation of the now-wired +runtime capture path. The baseline is the explicitly supplied installed +prebuilt binary and the treatment is the explicitly supplied worktree prebuilt +binary. Both run only against disposable profiles owned by the harness. + +There are two raw samples per variant. The p50 is eligible under the frozen +two-sample minimum; p95 and p99 remain pending at 40 and 100 matching samples. +This evidence is descriptive and must not be promoted to an SLO gate. diff --git a/benchmark_data/runtime/evidence/pinned-audit-revalidation-20260730/report.json b/benchmark_data/runtime/evidence/pinned-audit-revalidation-20260730/report.json new file mode 100644 index 0000000000..1bb164bbb3 --- /dev/null +++ b/benchmark_data/runtime/evidence/pinned-audit-revalidation-20260730/report.json @@ -0,0 +1,75 @@ +{ + "binaries": { + "baseline_sha256": "81484427366af40e09de3939626d9d71a126bf9e9648caef4f7ff6f96549998d", + "treatment_sha256": "4e06349a71afac8e1f25f927ae1196f3f38649704e1e1c9a22ab13f2ee19578a" + }, + "evidence_class": "repeated_raw_samples", + "fixture": { + "id": "runtime-v2-final", + "input_sha256": "80e81b62256384d434d31ea30770d3b1f091065984b9651e45c65d98d45bc582", + "same_input": true + }, + "outcome": { + "digest_match": true, + "error_count": 0, + "process_leak_count": 0 + }, + "policy": { + "journey_margins": { + "p50_regression_margin_pct": 15, + "p95_regression_margin_pct": 20, + "resource_regression_margin_pct": 20 + }, + "journey_policy_id": "runtime-journey-margins-v1", + "journey_policy_sha256": "6db22e48d7e45a6cc751baaf1ae40e67905aafb5b315157f646a94cf57695d45", + "latency_mode": "advisory", + "policy_id": "runtime-acceptance-v1", + "policy_sha256": "7c74637ac91439e8d04870d322c7e9c9d1d4dc926958c01c475c3c7f37651878" + }, + "report_id": "paired-db9fdc49b2934d2d8b788737cc512cb8", + "samples_sha256": "b2776ee1beff35f4cad99c8c3b54530ef1f110f8c1499d1c7781a4fa4642a071", + "schedule": "ABBA", + "schema_version": 1, + "variants": { + "baseline": { + "latency_ns": { + "p50": { + "available": true, + "minimum_samples": 2, + "value": 2133798292 + }, + "p95": { + "available": false, + "minimum_samples": 40, + "value": null + }, + "p99": { + "available": false, + "minimum_samples": 100, + "value": null + } + }, + "sample_count": 2 + }, + "treatment": { + "latency_ns": { + "p50": { + "available": true, + "minimum_samples": 2, + "value": 1979884870 + }, + "p95": { + "available": false, + "minimum_samples": 40, + "value": null + }, + "p99": { + "available": false, + "minimum_samples": 100, + "value": null + } + }, + "sample_count": 2 + } + } +} diff --git a/benchmark_data/runtime/evidence/pinned-audit-revalidation-20260730/report.policy.json b/benchmark_data/runtime/evidence/pinned-audit-revalidation-20260730/report.policy.json new file mode 100644 index 0000000000..8c04ebd309 --- /dev/null +++ b/benchmark_data/runtime/evidence/pinned-audit-revalidation-20260730/report.policy.json @@ -0,0 +1,14 @@ +{ + "acceptance": { + "artifact_sha256": "17e305f3da54a6a8e19ee7c69970340973109ebbe7d168df4d75f3e1835d827a", + "policy_id": "runtime-acceptance-v1", + "policy_sha256": "7c74637ac91439e8d04870d322c7e9c9d1d4dc926958c01c475c3c7f37651878", + "policy_version": 1 + }, + "journey": { + "artifact_sha256": "17e305f3da54a6a8e19ee7c69970340973109ebbe7d168df4d75f3e1835d827a", + "policy_id": "runtime-journey-margins-v1", + "policy_sha256": "6db22e48d7e45a6cc751baaf1ae40e67905aafb5b315157f646a94cf57695d45", + "policy_version": 1 + } +} diff --git a/benchmark_data/runtime/evidence/pinned-audit-revalidation-20260730/report.samples.jsonl b/benchmark_data/runtime/evidence/pinned-audit-revalidation-20260730/report.samples.jsonl new file mode 100644 index 0000000000..e150a9e566 --- /dev/null +++ b/benchmark_data/runtime/evidence/pinned-audit-revalidation-20260730/report.samples.jsonl @@ -0,0 +1,4 @@ +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":0,"candidate_id":"final-v2","capture_id":"capture-a1efba1fb40543c3bb5d4843d6230a37","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":0,"run_id":"run-4e8151aea4444aa6a8a07a50201ac318","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1970000000,"daemon_peak_rss_bytes":197308416,"daemon_pss_bytes":193184768,"disk_read_bytes":0,"disk_write_bytes":7032832,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10279496,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":73875,"cli_wall_ns":1685107052,"daemon_us":null,"elapsed_ns":2182362141,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1685107,"daemon_admission":73875},"started_ns":455046394752936}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":1,"candidate_id":"final-v2","capture_id":"capture-b2bb2512509d449eb604f26d0ff1b0c9","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":0,"run_id":"run-83353d6e751c4a52abaca3fc441f8b0b","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1680000000,"daemon_peak_rss_bytes":192524288,"daemon_pss_bytes":188355584,"disk_read_bytes":0,"disk_write_bytes":4841472,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":9867496,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":72490,"cli_wall_ns":1538137750,"daemon_us":null,"elapsed_ns":1979884870,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1538137,"daemon_admission":72490},"started_ns":455055686588390}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":2,"candidate_id":"final-v2","capture_id":"capture-8bcbd727b0e14af1841883b62bcd2398","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":0,"run_id":"run-86d2d85ea516493a8a2f65277dc5eb76","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"treatment","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1770000000,"daemon_peak_rss_bytes":190992384,"daemon_pss_bytes":186907648,"disk_read_bytes":0,"disk_write_bytes":4820992,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10069376,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":70794,"cli_wall_ns":1638536360,"daemon_us":null,"elapsed_ns":2137616418,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1638536,"daemon_admission":70794},"started_ns":455064823817403}} +{"availability":{"detail":null,"state":"available"},"evidence":{"evidence_class":"regression_sample","sample_count":1},"identity":{"abba_position":3,"candidate_id":"final-v2","capture_id":"capture-23f1bc3368cb4a3bac25dba4529b2a07","concurrency":1,"crate_id":"tracedecay","journey_id":"code-retrieval","machine_fingerprint":"030a6185435c23ba4189fa41","platform":"linux-x86_64","round_index":0,"run_id":"run-e11f079dfdd4432bbfbaca94ce54087c","shard":"integrated-0","state":"cold","storage_mode":"isolated-sqlite","surface":"cli","temperature":"cold","variant":"baseline","workload_id":"exact-symbol"},"lifecycle":{"activation_state":"active","daemon_survived":true,"restart_state":"not_required","timeout_phase":null},"observations":{"daemon_cpu_time_ns":1900000000,"daemon_peak_rss_bytes":196546560,"daemon_pss_bytes":192437248,"disk_read_bytes":0,"disk_write_bytes":5296128,"memory_peak_bytes":null,"process_tree_reaped":true,"profiler_overhead_ns":null,"wal_bytes":10155896,"write_amplification_ppm":null},"outcome":{"actual_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","error":null,"expected_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","result_digest":"fdfe48a1384cc546b7242d40fbc168906ae91bce6f8fd65c797d8245c9dc7bfc","status":"success"},"schema_version":1,"size":{"content_bytes":551,"process_count":1,"request_bytes":53,"response_bytes":552},"timing":{"abort_offset_ns":null,"admission_us":69243,"cli_wall_ns":1663490010,"daemon_us":null,"elapsed_ns":2133798292,"handler_us":null,"hook_wall_ns":null,"host_wall_ns":null,"mcp_wall_ns":null,"shutdown_total_ns":null,"stages_us":{"cli_call":1663490,"daemon_admission":69243},"started_ns":455073879153233}} diff --git a/benchmark_data/runtime/fixtures.py b/benchmark_data/runtime/fixtures.py new file mode 100644 index 0000000000..ed4116426d --- /dev/null +++ b/benchmark_data/runtime/fixtures.py @@ -0,0 +1,454 @@ +"""Deterministic, disposable fixtures for runtime regression samples.""" + +from __future__ import annotations + +import hashlib +import json +import os +import platform as platform_module +import shutil +import subprocess +import sys +from dataclasses import dataclass +from pathlib import Path +from typing import Mapping + + +ISOLATED_ENVIRONMENT_KEYS = ( + "HOME", + "USERPROFILE", + "XDG_CONFIG_HOME", + "TRACEDECAY_DATA_DIR", + "TRACEDECAY_GLOBAL_DB", + "TRACEDECAY_DAEMON_SOCKET", +) +REMOVED_OPERATOR_PROFILE_KEYS = ( + "TRACEDECAY_HOME", + "TRACEDECAY_PROFILE", + "TRACEDECAY_PROFILE_DIR", +) +RUNTIME_STATES = frozenset({"cold", "warm", "no-op", "contention", "recovery"}) +FIXTURE_ID = "runtime-v2-final" + +_PROVIDER_RELATIVE_FILES = { + "codex": Path(".codex/sessions/2026/07/fixture-session.jsonl"), + "claude": Path( + ".claude/projects/-workspace-runtime-fixture/fixture-session.jsonl" + ), + "cursor": Path( + ".cursor/projects/fixture-runtime-project/" + "agent-transcripts/fixture-session.jsonl" + ), +} + + +class FixtureError(RuntimeError): + """Raised when a fixture cannot be prepared without leaking host state.""" + + +@dataclass(frozen=True) +class PreparedFixture: + """Paths and immutable provenance for one disposable profile snapshot.""" + + snapshot_root: Path + home: Path + project: Path + provider_roots: dict[str, Path] + provider_files: dict[str, Path] + prebuilt_binary: Path + evidence_root: Path + prepared_evidence: Path + runtime_identity: dict[str, str | int] + environment: dict[str, str] + fixture_digests: dict[str, str] + git_head: str + sample_count: int = 1 + measurement_class: str = "n=1 regression sample" + + +def fixture_source_root() -> Path: + """Return the checked-in deterministic fixture root.""" + + return Path(__file__).resolve().with_name("fixtures") + + +def provider_roots(home: Path) -> dict[str, Path]: + """Return native provider roots inside an isolated home.""" + + return { + "codex": home / ".codex", + "claude": home / ".claude", + "cursor": home / ".cursor", + } + + +def provider_fixture_files(root: Path) -> dict[str, Path]: + """Return the canonical provider transcript files below a fixture root.""" + + source_home = root / "providers" / "home" + if not source_home.is_dir(): + source_home = root + return { + provider: source_home / relative + for provider, relative in _PROVIDER_RELATIVE_FILES.items() + } + + +def copy_fixture_source(source: Path, destination: Path) -> None: + """Copy a fixture tree after rejecting every symlink.""" + + source = Path(source) + destination = Path(destination) + _validate_plain_tree(source) + if destination.exists(): + raise FixtureError(f"fixture destination already exists: {destination}") + shutil.copytree(source, destination, copy_function=shutil.copy2) + _validate_plain_tree(destination) + + +def prepare_fixture_snapshot( + snapshot_root: Path, + *, + prebuilt_binary: Path, + fixture_root: Path | None = None, + platform: str | None = None, + shard: str = "integrated-0", + storage_mode: str = "isolated-sqlite", + concurrency: int = 1, + runtime_state: str = "cold", + temperature: str | None = None, +) -> PreparedFixture: + """Prepare one isolated project/profile snapshot from checked-in bytes.""" + + source = Path(fixture_root) if fixture_root is not None else fixture_source_root() + binary = Path(prebuilt_binary) + _validate_prebuilt_binary(binary) + _validate_plain_tree(source) + runtime_identity = _runtime_identity( + platform=platform, + shard=shard, + storage_mode=storage_mode, + concurrency=concurrency, + runtime_state=runtime_state, + temperature=temperature, + ) + + snapshot_root = Path(snapshot_root) + if snapshot_root.exists() and any(snapshot_root.iterdir()): + raise FixtureError(f"snapshot root is not empty: {snapshot_root}") + snapshot_root.mkdir(parents=True, exist_ok=True) + + home = snapshot_root / "home" + project = home / "workspace" / "runtime-fixture" + project.parent.mkdir(parents=True, exist_ok=True) + shutil.copytree(source / "project", project, copy_function=shutil.copy2) + shutil.copytree( + source / "providers" / "home", + home, + dirs_exist_ok=True, + copy_function=shutil.copy2, + ) + + (home / ".config").mkdir(parents=True) + (snapshot_root / "data" / "tracedecay").mkdir(parents=True) + (snapshot_root / "run").mkdir(parents=True) + copied_binary = snapshot_root / "bin" / "tracedecay" + copied_binary.parent.mkdir(parents=True) + shutil.copy2(binary, copied_binary) + copied_binary.chmod(binary.stat().st_mode & 0o777) + + evidence_root = snapshot_root / "evidence" + evidence_root.mkdir() + shutil.copy2(source / "metadata.json", evidence_root / "metadata.json") + shutil.copytree( + source / "measurements", + evidence_root / "measurements", + copy_function=shutil.copy2, + ) + shutil.copytree( + source / "raw_samples", + evidence_root / "raw_samples", + copy_function=shutil.copy2, + ) + prepared_evidence = evidence_root / "prepared.json" + _write_prepared_evidence(prepared_evidence, runtime_identity) + + _initialize_deterministic_git_history(project, home) + git_head = _git_output(project, home, "rev-parse", "HEAD").strip() + prepared = PreparedFixture( + snapshot_root=snapshot_root, + home=home, + project=project, + provider_roots=provider_roots(home), + provider_files=provider_fixture_files(home), + prebuilt_binary=copied_binary, + evidence_root=evidence_root, + prepared_evidence=prepared_evidence, + runtime_identity=runtime_identity, + environment={}, + fixture_digests=_snapshot_digests(snapshot_root), + git_head=git_head, + ) + return PreparedFixture( + **{ + **prepared.__dict__, + "environment": isolated_environment(prepared), + } + ) + + +def clone_prepared_profile( + prepared: PreparedFixture, + destination: Path, + *, + prebuilt_binary: Path | None = None, + runtime_state: str | None = None, + temperature: str | None = None, +) -> PreparedFixture: + """Clone a prepared snapshot without sharing files or mutable state.""" + + destination = Path(destination) + if destination.exists(): + raise FixtureError(f"clone destination already exists: {destination}") + binary = ( + Path(prebuilt_binary) + if prebuilt_binary is not None + else prepared.prebuilt_binary + ) + _validate_prebuilt_binary(binary) + shutil.copytree( + prepared.snapshot_root, + destination, + copy_function=shutil.copy2, + ignore=lambda directory, names: ( + {"bin"} + if Path(directory) == prepared.snapshot_root and "bin" in names + else set() + ), + ) + copied_binary = destination / "bin" / "tracedecay" + copied_binary.parent.mkdir() + try: + os.link(binary, copied_binary) + except OSError: + shutil.copy2(binary, copied_binary) + copied_binary.chmod(binary.stat().st_mode & 0o777) + home = destination / "home" + runtime_identity = dict(prepared.runtime_identity) + if runtime_state is not None: + if runtime_state not in RUNTIME_STATES: + raise FixtureError(f"unsupported runtime state: {runtime_state}") + runtime_identity["runtime_state"] = runtime_state + resolved_temperature = temperature + if resolved_temperature is None and runtime_state is not None: + resolved_temperature = "cold" if runtime_state == "cold" else "warm" + if resolved_temperature is not None: + if resolved_temperature not in {"cold", "warm"}: + raise FixtureError( + f"unsupported runtime temperature: {resolved_temperature}" + ) + runtime_identity["temperature"] = resolved_temperature + prepared_evidence = destination / "evidence" / "prepared.json" + _write_prepared_evidence(prepared_evidence, runtime_identity) + clone = PreparedFixture( + snapshot_root=destination, + home=home, + project=home / "workspace" / "runtime-fixture", + provider_roots=provider_roots(home), + provider_files=provider_fixture_files(home), + prebuilt_binary=copied_binary, + evidence_root=destination / "evidence", + prepared_evidence=prepared_evidence, + runtime_identity=runtime_identity, + environment={}, + # Digest provenance is computed once by prepare_fixture_snapshot; + # re-hashing the whole tree (including bin/tracedecay) per clone is + # pure per-sample overhead with no consumer. + fixture_digests={}, + git_head=prepared.git_head, + ) + return PreparedFixture( + **{ + **clone.__dict__, + "environment": isolated_environment(clone), + } + ) + + +def isolated_environment( + prepared: PreparedFixture, + *, + base: Mapping[str, str] | None = None, +) -> dict[str, str]: + """Return an inherited environment with every profile path rebased.""" + + environment = dict(os.environ if base is None else base) + for key in REMOVED_OPERATOR_PROFILE_KEYS: + environment.pop(key, None) + data_dir = prepared.snapshot_root / "data" / "tracedecay" + environment.update( + { + "HOME": str(prepared.home), + "USERPROFILE": str(prepared.home), + "XDG_CONFIG_HOME": str(prepared.home / ".config"), + "TRACEDECAY_DATA_DIR": str(data_dir), + "TRACEDECAY_GLOBAL_DB": str(data_dir / "global.db"), + "TRACEDECAY_DAEMON_SOCKET": str( + prepared.snapshot_root / "run" / "tracedecay.sock" + ), + } + ) + return environment + + +def _runtime_identity( + *, + platform: str | None, + shard: str, + storage_mode: str, + concurrency: int, + runtime_state: str, + temperature: str | None, +) -> dict[str, str | int]: + resolved_platform = platform or ( + f"{sys.platform}-{platform_module.machine().lower() or 'unknown'}" + ) + string_fields = { + "platform": resolved_platform, + "shard": shard, + "storage_mode": storage_mode, + } + for field, value in string_fields.items(): + if not value: + raise FixtureError(f"runtime identity {field} must not be empty") + if concurrency < 1: + raise FixtureError("runtime identity concurrency must be positive") + if runtime_state not in RUNTIME_STATES: + raise FixtureError(f"unsupported runtime state: {runtime_state}") + resolved_temperature = temperature or ( + "cold" if runtime_state == "cold" else "warm" + ) + if resolved_temperature not in {"cold", "warm"}: + raise FixtureError(f"unsupported runtime temperature: {resolved_temperature}") + return { + "fixture_id": FIXTURE_ID, + **string_fields, + "concurrency": concurrency, + "runtime_state": runtime_state, + "temperature": resolved_temperature, + } + + +def _write_prepared_evidence( + path: Path, + runtime_identity: Mapping[str, str | int], +) -> None: + document = { + "schema_version": 1, + "sample_count": 1, + "measurement_class": "n=1 regression sample", + "runtime_identity": dict(runtime_identity), + } + path.write_text( + json.dumps(document, indent=2, sort_keys=True) + "\n", + encoding="utf-8", + ) + + +def _validate_prebuilt_binary(binary: Path) -> None: + if binary.is_symlink() or not binary.is_file(): + raise FixtureError(f"prebuilt binary is missing or not a plain file: {binary}") + if not os.access(binary, os.X_OK): + raise FixtureError(f"prebuilt binary is not executable: {binary}") + + +def _validate_plain_tree(root: Path) -> None: + if root.is_symlink() or not root.is_dir(): + raise FixtureError(f"fixture source is not a plain directory: {root}") + for path in root.rglob("*"): + if path.is_symlink(): + raise FixtureError(f"fixture source contains symlink: {path}") + + +def _git_environment(home: Path) -> dict[str, str]: + environment = dict(os.environ) + environment.update( + { + "HOME": str(home), + "USERPROFILE": str(home), + "XDG_CONFIG_HOME": str(home / ".config"), + "GIT_CONFIG_NOSYSTEM": "1", + "GIT_CONFIG_GLOBAL": os.devnull, + "GIT_AUTHOR_NAME": "TraceDecay Fixture", + "GIT_AUTHOR_EMAIL": "fixture@tracedecay.invalid", + "GIT_COMMITTER_NAME": "TraceDecay Fixture", + "GIT_COMMITTER_EMAIL": "fixture@tracedecay.invalid", + "GIT_AUTHOR_DATE": "2024-01-02T03:04:05+00:00", + "GIT_COMMITTER_DATE": "2024-01-02T03:04:05+00:00", + } + ) + return environment + + +def _git_output(project: Path, home: Path, *arguments: str) -> str: + return subprocess.run( + ["git", "-C", str(project), *arguments], + check=True, + capture_output=True, + text=True, + env=_git_environment(home), + ).stdout + + +def _initialize_deterministic_git_history(project: Path, home: Path) -> None: + _git_output(project, home, "init", "-q", "-b", "main") + _git_output( + project, + home, + "add", + "--", + "README.md", + "src/catalog.py", + "src/graph.ts", + ) + _git_output( + project, + home, + "commit", + "-q", + "-m", + "feat: add fixture catalog", + ) + _git_output(project, home, "add", "--", ".") + _git_output( + project, + home, + "commit", + "-q", + "-m", + "feat: add fixture report", + ) + + +def _snapshot_digests(snapshot_root: Path) -> dict[str, str]: + digests: dict[str, str] = {} + combined = hashlib.sha256() + files = sorted( + ( + path + for path in snapshot_root.rglob("*") + if path.is_file() and ".git" not in path.relative_to(snapshot_root).parts + ), + key=lambda path: path.relative_to(snapshot_root).as_posix(), + ) + for path in files: + relative = path.relative_to(snapshot_root).as_posix() + content = path.read_bytes() + digest = hashlib.sha256(content).hexdigest() + digests[relative] = digest + combined.update(relative.encode("utf-8")) + combined.update(b"\0") + combined.update(content) + combined.update(b"\0") + digests["combined"] = combined.hexdigest() + return digests diff --git a/benchmark_data/runtime/fixtures/fake_hosts/after_shell_missing_daemon.py b/benchmark_data/runtime/fixtures/fake_hosts/after_shell_missing_daemon.py new file mode 100644 index 0000000000..c377cfbfc9 --- /dev/null +++ b/benchmark_data/runtime/fixtures/fake_hosts/after_shell_missing_daemon.py @@ -0,0 +1,34 @@ +#!/usr/bin/env python3 +"""Exit after shell completion while leaving a stubborn descendant.""" + +from __future__ import annotations + +import json +import subprocess +import sys + + +subprocess.Popen( + [ + sys.executable, + "-c", + ( + "import signal,time;" + "signal.signal(signal.SIGTERM, signal.SIG_IGN);" + "time.sleep(30)" + ), + ], + stdin=subprocess.DEVNULL, +) +print( + json.dumps( + { + "availability": "unavailable", + "error": "daemon unavailable after shell completion", + }, + separators=(",", ":"), + sort_keys=True, + ), + flush=True, +) +raise SystemExit(72) diff --git a/benchmark_data/runtime/fixtures/fake_hosts/dashboard_server.py b/benchmark_data/runtime/fixtures/fake_hosts/dashboard_server.py new file mode 100644 index 0000000000..76bdd066ed --- /dev/null +++ b/benchmark_data/runtime/fixtures/fake_hosts/dashboard_server.py @@ -0,0 +1,118 @@ +#!/usr/bin/env python3 +"""Deterministic local dashboard responses for lifecycle tests.""" + +from __future__ import annotations + +import argparse +import json +import time +from http.server import BaseHTTPRequestHandler, HTTPServer + + +class FixtureServer(HTTPServer): + allow_reuse_address = True + + def __init__( + self, + address: tuple[str, int], + mode: str, + warmup_requests: int, + delay: float, + ) -> None: + super().__init__(address, FixtureHandler) + self.mode = mode + self.warmup_requests = warmup_requests + self.delay = delay + self.request_count = 0 + + +class FixtureHandler(BaseHTTPRequestHandler): + server: FixtureServer + + def do_GET(self) -> None: + self.server.request_count += 1 + mode = self.server.mode + if mode == "unresponsive": + time.sleep(self.server.delay) + return + if mode == "warming" and self.server.request_count <= self.server.warmup_requests: + self._send_json( + 503, + { + "availability": "partial", + "detail": "daemon warming", + "activated": False, + "restart_required": False, + }, + ) + return + if mode == "malformed": + self._send(200, b'{"availability":') + return + if mode == "no-content": + self._send(204, b"") + return + if mode == "not-found": + self._send(404, b"dashboard route not found\n") + return + self._send_json( + 200, + { + "availability": "available", + "activated": True, + "restart_required": False, + }, + ) + + def log_message(self, format: str, *args: object) -> None: + return + + def _send_json(self, status: int, document: dict[str, object]) -> None: + body = ( + json.dumps(document, sort_keys=True, separators=(",", ":")) + "\n" + ).encode("utf-8") + self._send(status, body) + + def _send(self, status: int, body: bytes) -> None: + try: + self.send_response(status) + self.send_header("Content-Type", "application/json") + self.send_header("Content-Length", str(len(body))) + self.end_headers() + if body: + self.wfile.write(body) + except (BrokenPipeError, ConnectionResetError): + return + + +def main() -> int: + parser = argparse.ArgumentParser() + parser.add_argument( + "--mode", + choices=( + "ok", + "warming", + "unresponsive", + "malformed", + "no-content", + "not-found", + ), + required=True, + ) + parser.add_argument("--port", type=int, required=True) + parser.add_argument("--warmup-requests", type=int, default=2) + parser.add_argument("--delay", type=float, default=5.0) + arguments = parser.parse_args() + + server = FixtureServer( + ("127.0.0.1", arguments.port), + arguments.mode, + arguments.warmup_requests, + arguments.delay, + ) + server.serve_forever(poll_interval=0.01) + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/benchmark_data/runtime/fixtures/fake_hosts/verbose_child.py b/benchmark_data/runtime/fixtures/fake_hosts/verbose_child.py new file mode 100644 index 0000000000..06e82fe346 --- /dev/null +++ b/benchmark_data/runtime/fixtures/fake_hosts/verbose_child.py @@ -0,0 +1,35 @@ +#!/usr/bin/env python3 +"""Verbose child that can outlive TERM for process-group reaping tests.""" + +from __future__ import annotations + +import argparse +import signal +import sys +import time + + +def main() -> int: + parser = argparse.ArgumentParser() + parser.add_argument("--lines", type=int, default=0) + parser.add_argument("--hang-seconds", type=float, default=0.0) + parser.add_argument("--ignore-term", action="store_true") + arguments = parser.parse_args() + + if arguments.ignore_term: + signal.signal(signal.SIGTERM, signal.SIG_IGN) + + padding = "x" * 80 + for index in range(arguments.lines): + sys.stdout.write(f"child-stdout-{index:06d}-{padding}\n") + sys.stderr.write(f"child-stderr-{index:06d}-{padding}\n") + sys.stdout.flush() + sys.stderr.flush() + + if arguments.hang_seconds: + time.sleep(arguments.hang_seconds) + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/benchmark_data/runtime/fixtures/fake_hosts/verbose_host.py b/benchmark_data/runtime/fixtures/fake_hosts/verbose_host.py new file mode 100644 index 0000000000..be65da17ff --- /dev/null +++ b/benchmark_data/runtime/fixtures/fake_hosts/verbose_host.py @@ -0,0 +1,80 @@ +#!/usr/bin/env python3 +"""Deterministic host output, capture IDs, and hanging-child behavior.""" + +from __future__ import annotations + +import argparse +import json +import subprocess +import sys +from pathlib import Path + + +def _write_record( + capture_id: str, + *, + activated: bool, + restart_required: bool, +) -> None: + print( + json.dumps( + { + "activated": activated, + "availability": "available", + "capture_id": capture_id, + "restart_required": restart_required, + }, + sort_keys=True, + separators=(",", ":"), + ), + flush=True, + ) + + +def main() -> int: + parser = argparse.ArgumentParser() + parser.add_argument("--capture-id") + parser.add_argument("--repeat-capture-id", type=int, default=1) + parser.add_argument("--conflicting-capture-id") + parser.add_argument("--activated", action="store_true") + parser.add_argument("--restart-required", action="store_true") + parser.add_argument("--exit-code", type=int, default=0) + parser.add_argument("--spawn-child", action="store_true") + parser.add_argument("--child-lines", type=int, default=0) + parser.add_argument("--child-hang-seconds", type=float, default=0.0) + parser.add_argument("--child-ignore-term", action="store_true") + arguments = parser.parse_args() + + sys.stdin.buffer.read() + if arguments.capture_id is not None: + for _ in range(arguments.repeat_capture_id): + _write_record( + arguments.capture_id, + activated=arguments.activated, + restart_required=arguments.restart_required, + ) + if arguments.conflicting_capture_id is not None: + _write_record( + arguments.conflicting_capture_id, + activated=arguments.activated, + restart_required=arguments.restart_required, + ) + + if arguments.spawn_child: + command = [ + sys.executable, + str(Path(__file__).with_name("verbose_child.py")), + "--lines", + str(arguments.child_lines), + "--hang-seconds", + str(arguments.child_hang_seconds), + ] + if arguments.child_ignore_term: + command.append("--ignore-term") + child = subprocess.Popen(command) + return child.wait() + return arguments.exit_code + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/benchmark_data/runtime/fixtures/measurements/shutdown.json b/benchmark_data/runtime/fixtures/measurements/shutdown.json new file mode 100644 index 0000000000..767e45d60b --- /dev/null +++ b/benchmark_data/runtime/fixtures/measurements/shutdown.json @@ -0,0 +1,18 @@ +[ + { + "sample_count": 1, + "measurement_class": "n=1 regression sample", + "journey_id": "host-restart", + "workload_id": "verbose-hanging-child", + "total_seconds": 89, + "abort_offset_seconds": 81 + }, + { + "sample_count": 1, + "measurement_class": "n=1 regression sample", + "journey_id": "daemon-recovery", + "workload_id": "unresponsive-daemon", + "total_seconds": 57, + "abort_offset_seconds": 52 + } +] diff --git a/benchmark_data/runtime/fixtures/metadata.json b/benchmark_data/runtime/fixtures/metadata.json new file mode 100644 index 0000000000..bdb37bc924 --- /dev/null +++ b/benchmark_data/runtime/fixtures/metadata.json @@ -0,0 +1,78 @@ +{ + "schema_version": 1, + "fixture_id": "runtime-v2-final", + "sample_count": 1, + "measurement_class": "n=1 regression sample", + "crate_identities": [ + "tracedecay-domain", + "tracedecay-store", + "tracedecay-application", + "tracedecay-api", + "tracedecay-capture", + "tracedecay-hooks", + "tracedecay-policy", + "tracedecay-rusqlite-runtime", + "tracedecay-sdk", + "tracedecay-tool-catalog", + "integrated-v2" + ], + "journey_identities": [ + "code-retrieval", + "session-retrieval", + "context-assembly", + "host-activation", + "host-restart", + "daemon-recovery" + ], + "workload_identities": [ + "exact-symbol", + "exact-occurrence", + "lexical-literal", + "lexical-phrase", + "graph-callers", + "graph-callees", + "graph-impact", + "session-message-search", + "session-lcm-grep", + "session-expand-query", + "query-context", + "payload-stress", + "concurrent-query" + ], + "runtime_states": [ + "cold", + "warm", + "no-op", + "contention", + "recovery" + ], + "normalization_dimensions": [ + "platform", + "shard", + "storage_mode", + "concurrency", + "runtime_state" + ], + "abba_sequence": [ + "A", + "B", + "B", + "A" + ], + "availability_states": [ + "available", + "unavailable", + "unsupported", + "partial", + "failed" + ], + "fake_host_availability": { + "warming-daemon": "partial", + "unresponsive-daemon": "unavailable", + "dashboard-malformed": "failed", + "dashboard-204": "unavailable", + "dashboard-404": "unsupported", + "verbose-hanging-child": "failed", + "repeated-capture-ids": "available" + } +} diff --git a/benchmark_data/runtime/fixtures/project/README.md b/benchmark_data/runtime/fixtures/project/README.md new file mode 100644 index 0000000000..7266ca3a38 --- /dev/null +++ b/benchmark_data/runtime/fixtures/project/README.md @@ -0,0 +1,5 @@ +# Runtime Fixture + +This deterministic multi-language project gives runtime regression samples +stable symbols, cross-file calls, and two Git history points. It contains no +network or profile dependencies. diff --git a/benchmark_data/runtime/fixtures/project/src/catalog.py b/benchmark_data/runtime/fixtures/project/src/catalog.py new file mode 100644 index 0000000000..881ddbc2f7 --- /dev/null +++ b/benchmark_data/runtime/fixtures/project/src/catalog.py @@ -0,0 +1,23 @@ +"""Small deterministic catalog used by the runtime fixture.""" + +from __future__ import annotations + +from dataclasses import dataclass + + +@dataclass(frozen=True) +class CatalogItem: + sku: str + label: str + quantity: int + + +def fixture_catalog() -> tuple[CatalogItem, ...]: + return ( + CatalogItem(sku="trace-001", label="Trace index", quantity=3), + CatalogItem(sku="graph-002", label="Graph edge", quantity=5), + ) + + +def total_quantity(items: tuple[CatalogItem, ...]) -> int: + return sum(item.quantity for item in items) diff --git a/benchmark_data/runtime/fixtures/project/src/graph.ts b/benchmark_data/runtime/fixtures/project/src/graph.ts new file mode 100644 index 0000000000..e6e43946c1 --- /dev/null +++ b/benchmark_data/runtime/fixtures/project/src/graph.ts @@ -0,0 +1,15 @@ +export interface FixtureNode { + readonly id: string; + readonly dependencies: readonly string[]; +} + +export function fixtureGraph(): readonly FixtureNode[] { + return [ + { id: "catalog", dependencies: [] }, + { id: "report", dependencies: ["catalog"] }, + ]; +} + +export function dependencyCount(nodes: readonly FixtureNode[]): number { + return nodes.reduce((count, node) => count + node.dependencies.length, 0); +} diff --git a/benchmark_data/runtime/fixtures/project/src/main.py b/benchmark_data/runtime/fixtures/project/src/main.py new file mode 100644 index 0000000000..c597c61b76 --- /dev/null +++ b/benchmark_data/runtime/fixtures/project/src/main.py @@ -0,0 +1,15 @@ +"""Cross-file entry point for the deterministic runtime fixture.""" + +from __future__ import annotations + +from catalog import fixture_catalog, total_quantity + + +def render_summary() -> str: + items = fixture_catalog() + labels = ", ".join(item.label for item in items) + return f"{labels}: {total_quantity(items)}" + + +if __name__ == "__main__": + print(render_summary()) diff --git a/benchmark_data/runtime/fixtures/project/src/report.ts b/benchmark_data/runtime/fixtures/project/src/report.ts new file mode 100644 index 0000000000..5273bfb2bf --- /dev/null +++ b/benchmark_data/runtime/fixtures/project/src/report.ts @@ -0,0 +1,14 @@ +import { dependencyCount, fixtureGraph } from "./graph"; + +export interface FixtureReport { + readonly nodeCount: number; + readonly edgeCount: number; +} + +export function buildFixtureReport(): FixtureReport { + const nodes = fixtureGraph(); + return { + nodeCount: nodes.length, + edgeCount: dependencyCount(nodes), + }; +} diff --git a/benchmark_data/runtime/fixtures/providers/home/.claude/projects/-workspace-runtime-fixture/fixture-session.jsonl b/benchmark_data/runtime/fixtures/providers/home/.claude/projects/-workspace-runtime-fixture/fixture-session.jsonl new file mode 100644 index 0000000000..8040135f40 --- /dev/null +++ b/benchmark_data/runtime/fixtures/providers/home/.claude/projects/-workspace-runtime-fixture/fixture-session.jsonl @@ -0,0 +1,2 @@ +{"type":"user","uuid":"fixture-claude-user","sessionId":"fixture-claude-session","timestamp":"2026-07-01T00:00:00Z","cwd":"/home/fixture/workspace/runtime-fixture","message":{"role":"user","content":"Explain the code-retrieval journey for fixtureGraph."}} +{"type":"assistant","uuid":"fixture-claude-assistant","parentUuid":"fixture-claude-user","sessionId":"fixture-claude-session","timestamp":"2026-07-01T00:00:01Z","cwd":"/home/fixture/workspace/runtime-fixture","message":{"role":"assistant","content":[{"type":"text","text":"fixtureGraph feeds buildFixtureReport through dependencyCount."}]}} diff --git a/benchmark_data/runtime/fixtures/providers/home/.codex/sessions/2026/07/fixture-session.jsonl b/benchmark_data/runtime/fixtures/providers/home/.codex/sessions/2026/07/fixture-session.jsonl new file mode 100644 index 0000000000..9bc22369e6 --- /dev/null +++ b/benchmark_data/runtime/fixtures/providers/home/.codex/sessions/2026/07/fixture-session.jsonl @@ -0,0 +1,3 @@ +{"timestamp":"2026-07-01T00:00:00Z","type":"session_meta","payload":{"id":"fixture-codex-session","cwd":"/home/fixture/workspace/runtime-fixture","originator":"codex","cli_version":"fixture","source":"cli"}} +{"timestamp":"2026-07-01T00:00:01Z","type":"response_item","payload":{"type":"message","role":"user","content":[{"type":"input_text","text":"Trace the exact-symbol workload through the fixture catalog."}]}} +{"timestamp":"2026-07-01T00:00:02Z","type":"response_item","payload":{"type":"message","role":"assistant","content":[{"type":"output_text","text":"The catalog entry point calls total_quantity across files."}]}} diff --git a/benchmark_data/runtime/fixtures/raw_samples/abba.jsonl b/benchmark_data/runtime/fixtures/raw_samples/abba.jsonl new file mode 100644 index 0000000000..37e2089c5d --- /dev/null +++ b/benchmark_data/runtime/fixtures/raw_samples/abba.jsonl @@ -0,0 +1,4 @@ +{"schema_version":1,"identity":{"candidate_id":"candidate-a","run_id":"run-abba-0","capture_id":"capture-abba-0","workload_id":"exact-symbol","variant":"A","machine_fingerprint":"fixture-linux-x86_64","state":"warm","surface":"mcp","scenario":"exact-symbol","concurrency":1,"round_index":0,"abba_position":0},"evidence":{"sample_count":1,"evidence_class":"regression_sample"},"availability":{"state":"available","detail":null},"timing":{"started_ns":1000000000,"elapsed_ns":11000000,"cli_wall_ns":null,"mcp_wall_ns":11000000,"hook_wall_ns":null,"host_wall_ns":null,"handler_us":7000,"daemon_us":3000,"admission_us":1000,"stages_us":{"dispatch":1000},"shutdown_total_ns":null,"abort_offset_ns":null},"size":{"process_count":1,"request_bytes":96,"response_bytes":192,"content_bytes":128},"lifecycle":{"timeout_phase":null,"activation_state":"active","restart_state":"not_required","daemon_survived":true},"outcome":{"status":"success","expected_digest":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","actual_digest":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","result_digest":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","error":null}} +{"schema_version":1,"identity":{"candidate_id":"candidate-b","run_id":"run-abba-0","capture_id":"capture-abba-1","workload_id":"exact-symbol","variant":"B","machine_fingerprint":"fixture-linux-x86_64","state":"warm","surface":"mcp","scenario":"exact-symbol","concurrency":1,"round_index":0,"abba_position":1},"evidence":{"sample_count":1,"evidence_class":"regression_sample"},"availability":{"state":"available","detail":null},"timing":{"started_ns":1020000000,"elapsed_ns":10000000,"cli_wall_ns":null,"mcp_wall_ns":10000000,"hook_wall_ns":null,"host_wall_ns":null,"handler_us":6000,"daemon_us":3000,"admission_us":1000,"stages_us":{"dispatch":1000},"shutdown_total_ns":null,"abort_offset_ns":null},"size":{"process_count":1,"request_bytes":96,"response_bytes":192,"content_bytes":128},"lifecycle":{"timeout_phase":null,"activation_state":"active","restart_state":"not_required","daemon_survived":true},"outcome":{"status":"success","expected_digest":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","actual_digest":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","result_digest":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","error":null}} +{"schema_version":1,"identity":{"candidate_id":"candidate-b","run_id":"run-abba-0","capture_id":"capture-abba-2","workload_id":"exact-symbol","variant":"B","machine_fingerprint":"fixture-linux-x86_64","state":"warm","surface":"mcp","scenario":"exact-symbol","concurrency":1,"round_index":0,"abba_position":2},"evidence":{"sample_count":1,"evidence_class":"regression_sample"},"availability":{"state":"available","detail":null},"timing":{"started_ns":1040000000,"elapsed_ns":9000000,"cli_wall_ns":null,"mcp_wall_ns":9000000,"hook_wall_ns":null,"host_wall_ns":null,"handler_us":5000,"daemon_us":3000,"admission_us":1000,"stages_us":{"dispatch":1000},"shutdown_total_ns":null,"abort_offset_ns":null},"size":{"process_count":1,"request_bytes":96,"response_bytes":192,"content_bytes":128},"lifecycle":{"timeout_phase":null,"activation_state":"active","restart_state":"not_required","daemon_survived":true},"outcome":{"status":"success","expected_digest":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","actual_digest":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","result_digest":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","error":null}} +{"schema_version":1,"identity":{"candidate_id":"candidate-a","run_id":"run-abba-0","capture_id":"capture-abba-3","workload_id":"exact-symbol","variant":"A","machine_fingerprint":"fixture-linux-x86_64","state":"warm","surface":"mcp","scenario":"exact-symbol","concurrency":1,"round_index":0,"abba_position":3},"evidence":{"sample_count":1,"evidence_class":"regression_sample"},"availability":{"state":"available","detail":null},"timing":{"started_ns":1060000000,"elapsed_ns":10000000,"cli_wall_ns":null,"mcp_wall_ns":10000000,"hook_wall_ns":null,"host_wall_ns":null,"handler_us":6000,"daemon_us":3000,"admission_us":1000,"stages_us":{"dispatch":1000},"shutdown_total_ns":null,"abort_offset_ns":null},"size":{"process_count":1,"request_bytes":96,"response_bytes":192,"content_bytes":128},"lifecycle":{"timeout_phase":null,"activation_state":"active","restart_state":"not_required","daemon_survived":true},"outcome":{"status":"success","expected_digest":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","actual_digest":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","result_digest":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","error":null}} diff --git a/benchmark_data/runtime/graph_measurements.py b/benchmark_data/runtime/graph_measurements.py new file mode 100644 index 0000000000..5438ff27cb --- /dev/null +++ b/benchmark_data/runtime/graph_measurements.py @@ -0,0 +1,1293 @@ +#!/usr/bin/env python3 +"""Capture graph Criterion and fixture-binary measurements without Cargo. + +Criterion is the latency authority. Optional fixture binaries are the authority +for fixture identity, logical writes, and reopen samples; the harness verifies +their retained store bytes directly. Missing fixture binaries remain typed +unavailable measurements instead of synthetic zeroes. +""" + +from __future__ import annotations + +import argparse +import hashlib +import json +import math +import os +import platform +import signal +import stat +import subprocess +import sys +import tempfile +import time +import uuid +from collections.abc import Mapping, Sequence +from dataclasses import dataclass +from pathlib import Path +from typing import Any, NoReturn + +try: + import fcntl + import resource +except ModuleNotFoundError: # Windows does not expose wait4 resource usage. + fcntl = None # type: ignore[assignment] + resource = None # type: ignore[assignment] + +REPOSITORY_ROOT = Path(__file__).resolve().parents[2] +if os.fspath(REPOSITORY_ROOT) not in sys.path: + sys.path.insert(0, os.fspath(REPOSITORY_ROOT)) + +from benchmark_data.runtime.schema import write_jsonl +from benchmark_data.runtime.statistics import eligible_distribution + + +SCHEMA_VERSION = 1 +FIXTURE_RECEIPT_ENV = "TRACEDECAY_GRAPH_MEASUREMENT_RECEIPT" +FIXTURE_STORE_ENV = "TRACEDECAY_GRAPH_MEASUREMENT_STORE" +FIXTURE_UNAVAILABLE_DETAIL = ( + "no graph fixture measurement binary was supplied; exact store bytes, " + "logical write amplification, and reopen time are unavailable" +) +NOFOLLOW_TREE_MEASUREMENT_SUPPORTED = all( + ( + hasattr(os, "O_DIRECTORY"), + hasattr(os, "O_NOFOLLOW"), + os.listdir in os.supports_fd, + os.open in os.supports_dir_fd, + os.stat in os.supports_dir_fd, + os.stat in os.supports_follow_symlinks, + ) +) +EXECUTABLE_SNAPSHOT_SUPPORTED = all( + ( + hasattr(os, "O_NOFOLLOW"), + hasattr(os, "memfd_create"), + hasattr(os, "MFD_ALLOW_SEALING"), + os.execve in os.supports_fd, + fcntl is not None, + all( + hasattr(fcntl, name) + for name in ( + "F_ADD_SEALS", + "F_GET_SEALS", + "F_SEAL_GROW", + "F_SEAL_SEAL", + "F_SEAL_SHRINK", + "F_SEAL_WRITE", + ) + ), + ) +) + + +def _required_capability(module: Any, name: str) -> Any: + value = getattr(module, name, None) + if value is None: + fail("graph measurement execution requires sealed-memory snapshots") + return value + + +class GraphMeasurementError(RuntimeError): + """A malformed input, invalid binary, or failed measurement command.""" + + +def fail(message: str) -> NoReturn: + raise GraphMeasurementError(message) + + +@dataclass(frozen=True) +class ExecutableSnapshot: + source: Path + file_fd: int + sha256: str + identity: tuple[int, ...] + + +def _sha256_fd(file_fd: int, *, label: Path) -> str: + digest = hashlib.sha256() + offset = 0 + try: + while chunk := os.pread(file_fd, 1024 * 1024, offset): + digest.update(chunk) + offset += len(chunk) + except OSError as exc: + fail(f"cannot hash measurement file {label}: {exc}") + return digest.hexdigest() + + +def _require_executable(value: str | os.PathLike[str]) -> Path: + path = Path(value).expanduser() + try: + is_file = path.is_file() + is_executable = os.access(path, os.X_OK) + resolved = path.resolve(strict=True) + except OSError as exc: + fail(f"cannot inspect measurement binary {path}: {exc}") + if not is_file: + fail(f"measurement binary is not a regular file: {path}") + if not is_executable: + fail(f"measurement binary is not executable: {path}") + return resolved + + +def _copy_executable_snapshot(source: Path, destination: Path) -> ExecutableSnapshot: + if not EXECUTABLE_SNAPSHOT_SUPPORTED: + fail("graph measurement execution requires sealed-memory descriptor snapshots") + flags = os.O_RDONLY | os.O_NOFOLLOW + try: + source_fd = os.open(source, flags) + except OSError as exc: + fail(f"cannot open measurement binary {source}: {exc}") + try: + before = os.fstat(source_fd) + if not stat.S_ISREG(before.st_mode): + fail(f"measurement binary is not a regular file: {source}") + if before.st_mode & 0o111 == 0: + fail(f"measurement binary is not executable: {source}") + try: + memfd_create = _required_capability(os, "memfd_create") + allow_sealing = _required_capability(os, "MFD_ALLOW_SEALING") + snapshot_fd = memfd_create( + f"tracedecay-{destination.name}", + allow_sealing, + ) + except OSError as exc: + fail(f"cannot create sealed measurement binary {destination.name}: {exc}") + digest = hashlib.sha256() + try: + while chunk := os.read(source_fd, 1024 * 1024): + digest.update(chunk) + view = memoryview(chunk) + while view: + written = os.write(snapshot_fd, view) + view = view[written:] + os.fchmod(snapshot_fd, 0o500) + add_seals = _required_capability(fcntl, "F_ADD_SEALS") + get_seals = _required_capability(fcntl, "F_GET_SEALS") + seals = sum( + _required_capability(fcntl, name) + for name in ( + "F_SEAL_GROW", + "F_SEAL_SEAL", + "F_SEAL_SHRINK", + "F_SEAL_WRITE", + ) + ) + fcntl_function = _required_capability(fcntl, "fcntl") + fcntl_function(snapshot_fd, add_seals, seals) + if fcntl_function(snapshot_fd, get_seals) != seals: + fail(f"measurement binary seals were not retained: {source}") + except OSError as exc: + os.close(snapshot_fd) + fail(f"cannot snapshot measurement binary {source}: {exc}") + after = os.fstat(source_fd) + finally: + os.close(source_fd) + if _measurement_identity(before) != _measurement_identity(after): + os.close(snapshot_fd) + fail(f"measurement binary changed while it was snapshotted: {source}") + copied = os.fstat(snapshot_fd) + return ExecutableSnapshot( + source=source, + file_fd=snapshot_fd, + sha256=digest.hexdigest(), + identity=_measurement_identity(copied), + ) + + +def _open_current_snapshot(snapshot: ExecutableSnapshot) -> int: + try: + file_fd = os.dup(snapshot.file_fd) + except OSError as exc: + fail(f"cannot duplicate sealed measurement binary {snapshot.source}: {exc}") + try: + before = os.fstat(file_fd) + if _measurement_identity(before) != snapshot.identity: + fail( + "private measurement binary changed before or during execution: " + f"{snapshot.source}" + ) + if _sha256_fd(file_fd, label=snapshot.source) != snapshot.sha256: + fail(f"private measurement binary content changed: {snapshot.source}") + after = os.fstat(file_fd) + if _measurement_identity(before) != _measurement_identity(after): + fail( + "private measurement binary changed before or during execution: " + f"{snapshot.source}" + ) + return file_fd + except BaseException: + os.close(file_fd) + raise + + +def _finite_positive(value: Any, field: str) -> float: + if ( + isinstance(value, bool) + or not isinstance(value, (int, float)) + or not math.isfinite(value) + or value <= 0 + ): + fail(f"{field} must be a finite positive number") + return float(value) + + +def _non_negative_integer(value: Any, field: str) -> int: + if isinstance(value, bool) or not isinstance(value, int) or value < 0: + fail(f"{field} must be a non-negative integer") + return value + + +def _digest(value: Any, field: str) -> str: + if ( + not isinstance(value, str) + or len(value) != 64 + or any(character not in "0123456789abcdef" for character in value) + ): + fail(f"{field} must be a lowercase SHA-256 digest") + return value + + +def _availability( + value: int | float | None, detail: str | None = None +) -> dict[str, Any]: + return { + "available": value is not None, + "value": value, + "detail": detail if value is None else None, + } + + +def summarize_criterion_capture( + criterion_root: Path, + *, + variant: str, + capture_id: str, + binary_sha256: str, + round_index: int, + abba_position: int, +) -> tuple[list[dict[str, Any]], dict[str, Any]]: + """Read canonical Criterion raw samples and summarize ns per iteration.""" + + _digest(binary_sha256, "binary_sha256") + samples: list[dict[str, Any]] = [] + benchmark_values: dict[str, list[float]] = {} + sample_paths = sorted(Path(criterion_root).rglob("new/sample.json")) + if not sample_paths: + fail(f"Criterion capture produced no new/sample.json files: {criterion_root}") + + for sample_path in sample_paths: + benchmark_path = sample_path.with_name("benchmark.json") + try: + sample_document = json.loads(sample_path.read_text(encoding="utf-8")) + benchmark_document = json.loads(benchmark_path.read_text(encoding="utf-8")) + except (OSError, json.JSONDecodeError) as exc: + fail(f"cannot read Criterion capture {sample_path}: {exc}") + if not isinstance(sample_document, Mapping) or not isinstance( + benchmark_document, Mapping + ): + fail(f"Criterion capture must contain JSON objects: {sample_path}") + benchmark_id = benchmark_document.get("full_id") + if not isinstance(benchmark_id, str) or not benchmark_id: + fail(f"Criterion benchmark full_id is missing: {benchmark_path}") + iterations = sample_document.get("iters") + elapsed = sample_document.get("times") + if not isinstance(iterations, list) or not isinstance(elapsed, list): + fail(f"Criterion sample arrays are missing: {sample_path}") + if len(iterations) != len(elapsed): + fail(f"Criterion iters and times must have the same length: {sample_path}") + if not iterations: + fail(f"Criterion sample arrays must not be empty: {sample_path}") + + benchmark_samples = benchmark_values.setdefault(benchmark_id, []) + for sample_index, (iteration_count, elapsed_ns) in enumerate( + zip(iterations, elapsed, strict=True) + ): + iteration_value = _finite_positive( + iteration_count, + f"{sample_path}.iters[{sample_index}]", + ) + elapsed_value = _finite_positive( + elapsed_ns, + f"{sample_path}.times[{sample_index}]", + ) + elapsed_per_iteration = elapsed_value / iteration_value + benchmark_samples.append(elapsed_per_iteration) + samples.append( + { + "schema_version": SCHEMA_VERSION, + "capture_id": capture_id, + "variant": variant, + "round_index": round_index, + "abba_position": abba_position, + "binary_sha256": binary_sha256, + "benchmark_id": benchmark_id, + "sample_index": sample_index, + "iterations": iteration_value, + "elapsed_ns": elapsed_value, + "elapsed_ns_per_iteration": elapsed_per_iteration, + } + ) + + benchmarks = { + benchmark_id: {"latency_ns": eligible_distribution(values)} + for benchmark_id, values in sorted(benchmark_values.items()) + } + return samples, benchmarks + + +def summarize_fixture_receipt(document: Mapping[str, Any]) -> dict[str, Any]: + """Validate a fixture-binary receipt and preserve measurable fields.""" + + if not isinstance(document, Mapping): + fail("fixture receipt must be a JSON object") + if document.get("schema_version") != SCHEMA_VERSION: + fail("fixture receipt schema_version is unsupported") + fixture = document.get("fixture") + if not isinstance(fixture, Mapping): + fail("fixture receipt fixture identity is missing") + fixture_id = fixture.get("id") + if not isinstance(fixture_id, str) or not fixture_id: + fail("fixture receipt fixture.id must be a non-empty string") + fixture_digest = _digest(fixture.get("sha256"), "fixture.sha256") + exact_store_bytes = _non_negative_integer( + document.get("exact_store_bytes"), "exact_store_bytes" + ) + logical_write_bytes = _non_negative_integer( + document.get("logical_write_bytes"), "logical_write_bytes" + ) + process_write_bytes = _non_negative_integer( + document.get("process_write_bytes"), "process_write_bytes" + ) + reopen = document.get("reopen_elapsed_ns") + if not isinstance(reopen, list) or not reopen: + fail("reopen_elapsed_ns must contain at least one sample") + reopen_values = [ + _non_negative_integer(value, f"reopen_elapsed_ns[{index}]") + for index, value in enumerate(reopen) + ] + if any(value == 0 for value in reopen_values): + fail("reopen_elapsed_ns samples must be positive") + + amplification_available = logical_write_bytes > 0 + amplification_detail = ( + None + if amplification_available + else "logical_write_bytes is zero; write amplification has no denominator" + ) + return { + "fixture": {"id": fixture_id, "sha256": fixture_digest}, + "exact_store_bytes": _availability(exact_store_bytes), + "write_amplification": { + "available": amplification_available, + "logical_write_bytes": logical_write_bytes, + "process_write_bytes": process_write_bytes, + "parts_per_million": ( + process_write_bytes * 1_000_000 // logical_write_bytes + if amplification_available + else None + ), + "detail": amplification_detail, + }, + "reopen_time_ns": { + "available": True, + **eligible_distribution(reopen_values), + "samples": reopen_values, + "detail": None, + }, + } + + +def unavailable_fixture_measurements( + detail: str = FIXTURE_UNAVAILABLE_DETAIL, +) -> dict[str, Any]: + """Represent unavailable fixture-only fields without a fabricated zero.""" + + return { + "fixture": None, + "exact_store_bytes": _availability(None, detail), + "write_amplification": { + "available": False, + "logical_write_bytes": None, + "process_write_bytes": None, + "parts_per_million": None, + "detail": detail, + }, + "reopen_time_ns": { + "available": False, + "sample_count": 0, + "min": None, + "p50": {"available": False, "value": None, "minimum_samples": 2}, + "p95": {"available": False, "value": None, "minimum_samples": 40}, + "p99": {"available": False, "value": None, "minimum_samples": 100}, + "max": None, + "mean": None, + "percentile_method": "nearest_rank", + "samples": [], + "detail": detail, + }, + } + + +def require_matching_fixture( + baseline: Mapping[str, Any], candidate: Mapping[str, Any] +) -> dict[str, str]: + """Require a byte-identical fixture before calling evidence comparable.""" + + baseline_fixture = baseline.get("fixture") + candidate_fixture = candidate.get("fixture") + if not isinstance(baseline_fixture, Mapping) or not isinstance( + candidate_fixture, Mapping + ): + fail("same-fixture comparison requires both fixture receipts") + identity = { + "id": baseline_fixture.get("id"), + "sha256": baseline_fixture.get("sha256"), + } + if identity != { + "id": candidate_fixture.get("id"), + "sha256": candidate_fixture.get("sha256"), + }: + fail("baseline and candidate do not prove the same fixture identity") + return {"id": str(identity["id"]), "sha256": str(identity["sha256"])} + + +def _measurement_identity(metadata: os.stat_result) -> tuple[int, ...]: + return ( + metadata.st_dev, + metadata.st_ino, + metadata.st_mode, + metadata.st_size, + metadata.st_mtime_ns, + metadata.st_ctime_ns, + ) + + +def _inode_identity(metadata: os.stat_result) -> tuple[int, int, int]: + return ( + metadata.st_dev, + metadata.st_ino, + stat.S_IFMT(metadata.st_mode), + ) + + +def _require_unchanged_entry( + before: os.stat_result, + after: os.stat_result, + *, + path: Path, +) -> None: + if _measurement_identity(before) != _measurement_identity(after): + fail(f"retained store entry changed during measurement: {path}") + + +def _retained_directory_bytes(directory_fd: int, *, path: Path) -> int: + total = 0 + try: + names = sorted(os.listdir(directory_fd)) + except OSError as exc: + fail(f"cannot list retained store directory {path}: {exc}") + + for name in names: + entry_path = path / name + try: + before = os.stat(name, dir_fd=directory_fd, follow_symlinks=False) + except OSError as exc: + fail(f"cannot inspect retained store entry {entry_path}: {exc}") + + if stat.S_ISLNK(before.st_mode): + fail(f"retained store contains a symbolic link: {entry_path}") + if stat.S_ISDIR(before.st_mode): + flags = os.O_RDONLY | os.O_DIRECTORY | os.O_NOFOLLOW + try: + child_fd = os.open(name, flags, dir_fd=directory_fd) + except OSError as exc: + fail(f"cannot open retained store directory {entry_path}: {exc}") + try: + opened = os.fstat(child_fd) + _require_unchanged_entry(before, opened, path=entry_path) + total += _retained_directory_bytes(child_fd, path=entry_path) + _require_unchanged_entry(opened, os.fstat(child_fd), path=entry_path) + finally: + os.close(child_fd) + elif stat.S_ISREG(before.st_mode): + flags = os.O_RDONLY | os.O_NOFOLLOW + try: + file_fd = os.open(name, flags, dir_fd=directory_fd) + except OSError as exc: + fail(f"cannot open retained store file {entry_path}: {exc}") + try: + opened = os.fstat(file_fd) + _require_unchanged_entry(before, opened, path=entry_path) + total += opened.st_size + _require_unchanged_entry(opened, os.fstat(file_fd), path=entry_path) + finally: + os.close(file_fd) + else: + fail(f"retained store entry is not a regular file: {entry_path}") + + try: + after = os.stat(name, dir_fd=directory_fd, follow_symlinks=False) + except OSError as exc: + fail(f"cannot recheck retained store entry {entry_path}: {exc}") + _require_unchanged_entry(before, after, path=entry_path) + return total + + +def _open_directory_path_nofollow(path: Path) -> int: + if not NOFOLLOW_TREE_MEASUREMENT_SUPPORTED: + fail("retained store measurement requires no-follow filesystem support") + try: + absolute = path.resolve(strict=True) + except OSError as exc: + fail(f"cannot resolve retained store directory {path}: {exc}") + flags = os.O_RDONLY | os.O_DIRECTORY | os.O_NOFOLLOW + try: + directory_fd = os.open(absolute.anchor, flags) + except OSError as exc: + fail(f"cannot open retained store path anchor {absolute.anchor}: {exc}") + try: + for component in absolute.parts[1:]: + try: + child_fd = os.open(component, flags, dir_fd=directory_fd) + except OSError as exc: + fail(f"cannot open retained store directory {absolute}: {exc}") + os.close(directory_fd) + directory_fd = child_fd + except BaseException: + os.close(directory_fd) + raise + return directory_fd + + +def _exact_tree_bytes_fd(root_fd: int, *, root: Path) -> int: + try: + before = os.fstat(root_fd) + except OSError as exc: + fail(f"cannot inspect retained store root {root}: {exc}") + if not stat.S_ISDIR(before.st_mode): + fail(f"retained store root is not a directory: {root}") + total = _retained_directory_bytes(root_fd, path=root) + try: + after = os.fstat(root_fd) + except OSError as exc: + fail(f"cannot recheck retained store root {root}: {exc}") + _require_unchanged_entry(before, after, path=root) + return total + + +def _exact_tree_bytes(root: Path) -> int: + root_fd = _open_directory_path_nofollow(root) + try: + return _exact_tree_bytes_fd(root_fd, root=root) + finally: + os.close(root_fd) + + +def _maximum_rss_bytes(usage: Any) -> int: + # Linux reports KiB while Darwin reports bytes. + if platform.system() == "Darwin": + return int(usage.ru_maxrss) + return int(usage.ru_maxrss) * 1024 + + +def _run_process( + command: Sequence[str], + *, + executable: ExecutableSnapshot, + environment: Mapping[str, str], + log_path: Path, + timeout_seconds: int, +) -> dict[str, Any]: + """Run one owned process and capture its direct wait4 resource receipt.""" + + if resource is None or not hasattr(os, "wait4"): + fail("graph measurement execution requires wait4 resource accounting") + executable_fd = _open_current_snapshot(executable) + started_ns = time.monotonic_ns() + try: + log = log_path.open("w+b") + except OSError as exc: + os.close(executable_fd) + fail(f"cannot create measurement log {log_path}: {exc}") + with log: + launch_status_read, launch_status_write = os.pipe() + + def execute_snapshot() -> None: + os.close(launch_status_read) + try: + os.set_inheritable(launch_status_write, False) + os.execve( + executable_fd, + list(command), + dict(environment), + ) + except OSError as exc: + try: + os.write( + launch_status_write, + ( + f"cannot execute measurement binary {executable.source}: {exc}" + ).encode("utf-8", errors="replace"), + ) + finally: + os.close(launch_status_write) + os._exit(126) + + try: + process = subprocess.Popen( + list(command), + executable=sys.executable, + cwd=REPOSITORY_ROOT, + env=dict(environment), + stdin=subprocess.DEVNULL, + stdout=log, + stderr=subprocess.STDOUT, + start_new_session=True, + pass_fds=(executable_fd, launch_status_write), + preexec_fn=execute_snapshot, + ) + except OSError as exc: + os.close(launch_status_read) + os.close(launch_status_write) + fail(f"cannot launch measurement binary {executable.source}: {exc}") + finally: + os.close(executable_fd) + os.close(launch_status_write) + launch_error = os.read(launch_status_read, 64 * 1024).decode( + "utf-8", + errors="replace", + ) + os.close(launch_status_read) + if launch_error: + try: + process.wait(timeout=5) + except subprocess.TimeoutExpired: + os.killpg(process.pid, signal.SIGKILL) + fail(launch_error) + deadline = time.monotonic() + timeout_seconds + status: int | None = None + usage: Any | None = None + try: + while status is None: + waited_pid, waited_status, waited_usage = os.wait4( + process.pid, os.WNOHANG + ) + if waited_pid == process.pid: + status = waited_status + usage = waited_usage + break + if time.monotonic() >= deadline: + os.killpg(process.pid, signal.SIGTERM) + grace = time.monotonic() + 5 + while time.monotonic() < grace: + waited_pid, waited_status, waited_usage = os.wait4( + process.pid, os.WNOHANG + ) + if waited_pid == process.pid: + status = waited_status + usage = waited_usage + break + time.sleep(0.05) + if status is None: + os.killpg(process.pid, signal.SIGKILL) + _waited_pid, status, usage = os.wait4(process.pid, 0) + process.returncode = os.waitstatus_to_exitcode(status) + fail( + f"measurement command exceeded {timeout_seconds}s: " + + " ".join(command) + ) + time.sleep(0.05) + except BaseException: + if status is None: + try: + os.killpg(process.pid, signal.SIGKILL) + except ProcessLookupError: + pass + try: + _waited_pid, status, usage = os.wait4(process.pid, 0) + except ChildProcessError: + pass + raise + process.returncode = os.waitstatus_to_exitcode(status) + try: + log.flush() + os.fsync(log.fileno()) + except OSError as exc: + fail(f"cannot flush measurement log {log_path}: {exc}") + log_sha256 = _sha256_fd(log.fileno(), label=log_path) + if usage is None: + fail("measurement process exited without a wait4 resource receipt") + elapsed_ns = time.monotonic_ns() - started_ns + verification_fd = _open_current_snapshot(executable) + os.close(verification_fd) + if process.returncode != 0: + fail( + f"measurement command exited {process.returncode}; see {log_path}: " + + " ".join(command) + ) + return { + "elapsed_ns": elapsed_ns, + "peak_rss_bytes": _maximum_rss_bytes(usage), + "user_cpu_seconds": usage.ru_utime, + "system_cpu_seconds": usage.ru_stime, + "log_sha256": log_sha256, + } + + +def _criterion_binary_spec(value: str) -> tuple[str, Path]: + name, separator, path = value.partition("=") + if not separator or not name or not path: + fail("criterion binary must use NAME=/path/to/executable") + if any( + character not in "abcdefghijklmnopqrstuvwxyz0123456789-_" for character in name + ): + fail(f"criterion binary name is invalid: {name}") + return name, _require_executable(path) + + +def _snapshot_named_binaries( + binaries: Sequence[tuple[str, Path]], + *, + root: Path, + prefix: str, +) -> list[tuple[str, ExecutableSnapshot]]: + return [ + ( + name, + _copy_executable_snapshot(source, root / f"{prefix}-{index}-{name}"), + ) + for index, (name, source) in enumerate(binaries) + ] + + +def _fixture_capture( + binary: ExecutableSnapshot | None, + *, + root: Path, + timeout_seconds: int, +) -> tuple[dict[str, Any], dict[str, Any] | None]: + if binary is None: + return unavailable_fixture_measurements(), None + store_root = root / "store" + receipt_path = root / "fixture-receipt.json" + try: + root.mkdir(parents=True) + except OSError as exc: + fail(f"cannot create fixture measurement root {root}: {exc}") + root_fd = _open_directory_path_nofollow(root) + root_identity = _inode_identity(os.fstat(root_fd)) + store_fd: int | None = None + try: + try: + os.mkdir("store", dir_fd=root_fd) + store_fd = os.open( + "store", + os.O_RDONLY | os.O_DIRECTORY | os.O_NOFOLLOW, + dir_fd=root_fd, + ) + store_identity = _inode_identity(os.fstat(store_fd)) + except OSError as exc: + fail(f"cannot create retained store {store_root}: {exc}") + environment = dict(os.environ) + environment[FIXTURE_STORE_ENV] = os.fspath(store_root) + environment[FIXTURE_RECEIPT_ENV] = os.fspath(receipt_path) + process = _run_process( + (os.fspath(binary.source),), + executable=binary, + environment=environment, + log_path=root / "fixture.log", + timeout_seconds=timeout_seconds, + ) + current_root_fd = _open_directory_path_nofollow(root) + try: + if _inode_identity(os.fstat(current_root_fd)) != root_identity: + fail(f"fixture measurement root changed during execution: {root}") + finally: + os.close(current_root_fd) + try: + named_store = os.stat("store", dir_fd=root_fd, follow_symlinks=False) + except OSError as exc: + fail(f"cannot recheck retained store path {store_root}: {exc}") + if _inode_identity(named_store) != store_identity: + fail(f"retained store path changed during execution: {store_root}") + try: + receipt_fd = os.open( + receipt_path.name, + os.O_RDONLY | os.O_NOFOLLOW, + dir_fd=root_fd, + ) + except OSError as exc: + fail( + f"fixture binary did not write {FIXTURE_RECEIPT_ENV} " + f"as a regular file: {receipt_path}: {exc}" + ) + try: + receipt_before = os.fstat(receipt_fd) + if not stat.S_ISREG(receipt_before.st_mode): + fail( + f"fixture measurement receipt is not a regular file: {receipt_path}" + ) + with os.fdopen(receipt_fd, encoding="utf-8") as stream: + receipt_fd = -1 + document = json.load(stream) + receipt_after = os.fstat(stream.fileno()) + _require_unchanged_entry( + receipt_before, + receipt_after, + path=receipt_path, + ) + except (OSError, json.JSONDecodeError) as exc: + fail(f"cannot read fixture measurement receipt {receipt_path}: {exc}") + finally: + if receipt_fd >= 0: + os.close(receipt_fd) + retained_store_bytes = _exact_tree_bytes_fd(store_fd, root=store_root) + finally: + if store_fd is not None: + os.close(store_fd) + os.close(root_fd) + if not isinstance(document, dict): + fail("fixture measurement receipt must be a JSON object") + stated_store_bytes = document.get("exact_store_bytes") + if stated_store_bytes != retained_store_bytes: + fail( + "fixture receipt exact_store_bytes does not match the retained store: " + f"receipt={stated_store_bytes!r}, retained={retained_store_bytes}" + ) + return summarize_fixture_receipt(document), process + + +def _capture_variant( + *, + variant: str, + binaries: Sequence[tuple[str, ExecutableSnapshot]], + fixture_binary: ExecutableSnapshot | None, + root: Path, + capture_id: str, + round_index: int, + abba_position: int, + timeout_seconds: int, +) -> dict[str, Any]: + criterion_samples: list[dict[str, Any]] = [] + benchmarks: dict[str, Any] = {} + processes: list[dict[str, Any]] = [] + for name, binary in binaries: + binary_root = root / "criterion" / name + criterion_root = binary_root / "output" + criterion_root.mkdir(parents=True) + environment = dict(os.environ) + environment["CRITERION_HOME"] = os.fspath(criterion_root) + process = _run_process( + ( + os.fspath(binary.source), + "--noplot", + "--save-baseline", + "capture", + ), + executable=binary, + environment=environment, + log_path=binary_root / "criterion.log", + timeout_seconds=timeout_seconds, + ) + process.update( + { + "kind": "criterion", + "name": name, + "binary": os.fspath(binary.source), + "binary_sha256": binary.sha256, + } + ) + processes.append(process) + samples, binary_benchmarks = summarize_criterion_capture( + criterion_root, + variant=variant, + capture_id=capture_id, + binary_sha256=process["binary_sha256"], + round_index=round_index, + abba_position=abba_position, + ) + duplicate_ids = set(benchmarks) & set(binary_benchmarks) + if duplicate_ids: + fail( + "Criterion benchmark IDs must be unique across binaries: " + + ", ".join(sorted(duplicate_ids)) + ) + criterion_samples.extend(samples) + benchmarks.update(binary_benchmarks) + + fixture, fixture_process = _fixture_capture( + fixture_binary, + root=root / "fixture", + timeout_seconds=timeout_seconds, + ) + if fixture_process is not None and fixture_binary is not None: + fixture_process.update( + { + "kind": "fixture", + "binary": os.fspath(fixture_binary.source), + "binary_sha256": fixture_binary.sha256, + } + ) + processes.append(fixture_process) + return { + "variant": variant, + "criterion_samples": criterion_samples, + "benchmarks": benchmarks, + "process_peak_rss_bytes": _availability( + max(process["peak_rss_bytes"] for process in processes) + if processes + else None, + "no benchmark or fixture process ran" if not processes else None, + ), + "fixture_measurements": fixture, + "processes": processes, + } + + +def _write_json(path: Path, document: Mapping[str, Any]) -> None: + path.parent.mkdir(parents=True, exist_ok=True) + temporary = path.with_name(f".{path.name}.tmp-{os.getpid()}") + temporary.write_text( + json.dumps(document, indent=2, sort_keys=True, allow_nan=False) + "\n", + encoding="utf-8", + ) + temporary.replace(path) + + +def _capture_command(args: argparse.Namespace) -> int: + if args.timeout_seconds <= 0: + fail("timeout-seconds must be positive") + if not isinstance(args.variant, str) or not args.variant: + fail("variant must be a non-empty string") + output = Path(args.output) + samples_path = output.with_suffix(".samples.jsonl") + for path in (output, samples_path): + if path.exists(): + fail(f"capture output already exists: {path}") + binaries = [_criterion_binary_spec(value) for value in args.criterion_binary] + if not binaries: + fail("capture requires at least one --criterion-binary") + fixture_binary = ( + _require_executable(args.fixture_binary) if args.fixture_binary else None + ) + capture_id = args.capture_id or f"graph-{uuid.uuid4().hex}" + with tempfile.TemporaryDirectory( + prefix="tracedecay-graph-measurement-" + ) as directory: + temporary_root = Path(directory) + executable_root = temporary_root / "executables" + prepared_binaries = _snapshot_named_binaries( + binaries, + root=executable_root, + prefix="criterion", + ) + prepared_fixture = ( + _copy_executable_snapshot( + fixture_binary, + executable_root / "fixture", + ) + if fixture_binary is not None + else None + ) + try: + result = _capture_variant( + variant=args.variant, + binaries=prepared_binaries, + fixture_binary=prepared_fixture, + root=temporary_root / "capture", + capture_id=capture_id, + round_index=0, + abba_position=0, + timeout_seconds=args.timeout_seconds, + ) + finally: + for _name, snapshot in prepared_binaries: + os.close(snapshot.file_fd) + if prepared_fixture is not None: + os.close(prepared_fixture.file_fd) + samples = result.pop("criterion_samples") + samples_path.parent.mkdir(parents=True, exist_ok=True) + samples_sha256 = write_jsonl( + samples_path, + samples, + validator=lambda sample: dict(sample), + ) + _write_json( + output, + { + "schema_version": SCHEMA_VERSION, + "capture_id": capture_id, + "machine": { + "system": platform.system(), + "machine": platform.machine(), + }, + "capture": result, + "raw_samples": { + "path": samples_path.name, + "sample_count": len(samples), + "sha256": samples_sha256, + }, + "baseline_comparison": { + "available": False, + "detail": "no pre-Grafeo baseline binaries were supplied", + }, + }, + ) + return 0 + + +def _paired_command(args: argparse.Namespace) -> int: + if args.timeout_seconds <= 0: + fail("timeout-seconds must be positive") + if args.rounds <= 0: + fail("rounds must be positive") + output = Path(args.output) + samples_path = output.with_suffix(".samples.jsonl") + for path in (output, samples_path): + if path.exists(): + fail(f"paired output already exists: {path}") + baseline = [_criterion_binary_spec(value) for value in args.baseline_criterion] + candidate = [_criterion_binary_spec(value) for value in args.candidate_criterion] + if not baseline or not candidate: + fail("paired capture requires baseline and candidate Criterion binaries") + if [name for name, _path in baseline] != [name for name, _path in candidate]: + fail("paired baseline and candidate Criterion binary names must match in order") + baseline_fixture = ( + _require_executable(args.baseline_fixture_binary) + if args.baseline_fixture_binary + else None + ) + candidate_fixture = ( + _require_executable(args.candidate_fixture_binary) + if args.candidate_fixture_binary + else None + ) + if (baseline_fixture is None) != (candidate_fixture is None): + fail("paired fixture measurements require both baseline and candidate binaries") + capture_id = args.capture_id or f"graph-paired-{uuid.uuid4().hex}" + captures: list[dict[str, Any]] = [] + with tempfile.TemporaryDirectory(prefix="tracedecay-graph-paired-") as directory: + root = Path(directory) + executable_root = root / "executables" + prepared_baseline = _snapshot_named_binaries( + baseline, + root=executable_root, + prefix="baseline", + ) + prepared_candidate = _snapshot_named_binaries( + candidate, + root=executable_root, + prefix="candidate", + ) + for (name, baseline_binary), (_candidate_name, candidate_binary) in zip( + prepared_baseline, + prepared_candidate, + strict=True, + ): + if baseline_binary.sha256 == candidate_binary.sha256: + fail( + f"paired baseline and candidate binary content is identical: {name}" + ) + prepared_baseline_fixture = ( + _copy_executable_snapshot( + baseline_fixture, + executable_root / "baseline-fixture", + ) + if baseline_fixture is not None + else None + ) + prepared_candidate_fixture = ( + _copy_executable_snapshot( + candidate_fixture, + executable_root / "candidate-fixture", + ) + if candidate_fixture is not None + else None + ) + schedule = ( + ("baseline", prepared_baseline, prepared_baseline_fixture), + ("candidate", prepared_candidate, prepared_candidate_fixture), + ("candidate", prepared_candidate, prepared_candidate_fixture), + ("baseline", prepared_baseline, prepared_baseline_fixture), + ) + try: + for round_index in range(args.rounds): + for position, (variant, binaries, fixture_binary) in enumerate( + schedule + ): + captures.append( + _capture_variant( + variant=variant, + binaries=binaries, + fixture_binary=fixture_binary, + root=root / f"round-{round_index}-position-{position}", + capture_id=capture_id, + round_index=round_index, + abba_position=position, + timeout_seconds=args.timeout_seconds, + ) + ) + finally: + snapshots = [ + snapshot + for binaries in (prepared_baseline, prepared_candidate) + for _name, snapshot in binaries + ] + for snapshot in ( + prepared_baseline_fixture, + prepared_candidate_fixture, + ): + if snapshot is not None: + snapshots.append(snapshot) + for snapshot in snapshots: + os.close(snapshot.file_fd) + benchmark_id_sets = [set(capture["benchmarks"]) for capture in captures] + if any(ids != benchmark_id_sets[0] for ids in benchmark_id_sets[1:]): + fail("paired captures did not produce the same Criterion benchmark IDs") + + fixture_comparison: dict[str, Any] + if baseline_fixture is None: + fixture_comparison = { + "available": False, + "detail": "no same-fixture pre-Grafeo fixture binary was supplied", + } + else: + fixture_measurements = [capture["fixture_measurements"] for capture in captures] + fixture_identity = fixture_measurements[0] + for measurement in fixture_measurements[1:]: + require_matching_fixture(fixture_identity, measurement) + fixture_comparison = { + "available": True, + "fixture": require_matching_fixture( + fixture_measurements[0], fixture_measurements[1] + ), + "detail": None, + } + samples = [ + sample for capture in captures for sample in capture.pop("criterion_samples") + ] + latency_distributions: dict[str, dict[str, Any]] = {} + for variant in ("baseline", "candidate"): + variant_samples = [sample for sample in samples if sample["variant"] == variant] + latency_distributions[variant] = { + benchmark_id: eligible_distribution( + [ + sample["elapsed_ns_per_iteration"] + for sample in variant_samples + if sample["benchmark_id"] == benchmark_id + ] + ) + for benchmark_id in sorted(benchmark_id_sets[0]) + } + samples_path.parent.mkdir(parents=True, exist_ok=True) + samples_sha256 = write_jsonl( + samples_path, + samples, + validator=lambda sample: dict(sample), + ) + _write_json( + output, + { + "schema_version": SCHEMA_VERSION, + "capture_id": capture_id, + "schedule": "ABBA", + "rounds": args.rounds, + "machine": { + "system": platform.system(), + "machine": platform.machine(), + }, + "captures": captures, + "latency_ns": latency_distributions, + "raw_samples": { + "path": samples_path.name, + "sample_count": len(samples), + "sha256": samples_sha256, + }, + "same_fixture_comparison": fixture_comparison, + "decision": "descriptive_only", + }, + ) + return 0 + + +def register_subcommands( + subparsers: Any, + *, + capture_name: str = "capture", + paired_name: str = "paired", +) -> None: + """Mount graph measurement commands into this or the shared runtime CLI.""" + + capture = subparsers.add_parser(capture_name) + capture.add_argument( + "--criterion-binary", + action="append", + default=[], + metavar="NAME=PATH", + ) + capture.add_argument("--fixture-binary") + capture.add_argument("--variant", default="candidate") + capture.add_argument("--capture-id") + capture.add_argument("--timeout-seconds", type=int, default=3_600) + capture.add_argument("--output", required=True) + capture.set_defaults(handler=_capture_command) + + paired = subparsers.add_parser(paired_name) + paired.add_argument( + "--baseline-criterion", + action="append", + default=[], + metavar="NAME=PATH", + ) + paired.add_argument( + "--candidate-criterion", + action="append", + default=[], + metavar="NAME=PATH", + ) + paired.add_argument("--baseline-fixture-binary") + paired.add_argument("--candidate-fixture-binary") + paired.add_argument("--rounds", type=int, default=1) + paired.add_argument("--capture-id") + paired.add_argument("--timeout-seconds", type=int, default=3_600) + paired.add_argument("--output", required=True) + paired.set_defaults(handler=_paired_command) + + +def parser() -> argparse.ArgumentParser: + argument_parser = argparse.ArgumentParser( + description=( + "Run explicit prebuilt graph Criterion/fixture binaries and retain " + "truthful measurement evidence. This command never invokes Cargo." + ) + ) + subparsers = argument_parser.add_subparsers(dest="command", required=True) + register_subcommands(subparsers) + return argument_parser + + +def main(argv: Sequence[str] | None = None) -> int: + args = parser().parse_args(argv) + if args.timeout_seconds <= 0: + print("error: timeout-seconds must be positive", file=sys.stderr) + return 2 + if getattr(args, "rounds", 1) <= 0: + print("error: rounds must be positive", file=sys.stderr) + return 2 + try: + return int(args.handler(args)) + except GraphMeasurementError as exc: + print(f"error: {exc}", file=sys.stderr) + return 2 + except OSError as exc: + print( + f"error: graph measurement filesystem operation failed: {exc}", + file=sys.stderr, + ) + return 2 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/benchmark_data/runtime/host_workloads.py b/benchmark_data/runtime/host_workloads.py new file mode 100644 index 0000000000..c6c3d38654 --- /dev/null +++ b/benchmark_data/runtime/host_workloads.py @@ -0,0 +1,638 @@ +"""Immutable host and SDK workload contracts for the Cargo-free runtime lane.""" + +from __future__ import annotations + +import re +from collections.abc import Iterable, Mapping +from dataclasses import dataclass +from enum import Enum +from types import MappingProxyType + + +class HostKind(str, Enum): + CLI = "cli" + MCP = "mcp" + HOOK = "hook" + CURSOR = "cursor" + CLAUDE = "claude" + CODEX = "codex" + DASHBOARD = "dashboard" + SDK = "sdk" + + +class Journey(str, Enum): + COLD = "cold" + WARM = "warm" + NO_OP = "no-op" + CONTENTION = "contention" + RECOVERY = "recovery" + + +class Temperature(str, Enum): + COLD = "cold" + WARM = "warm" + + +class AvailabilityState(str, Enum): + AVAILABLE = "available" + UNAVAILABLE = "unavailable" + UNSUPPORTED = "unsupported" + PARTIAL = "partial" + FAILED = "failed" + + +class EvidenceClass(str, Enum): + N1_REGRESSION_ONLY = "n=1_regression_only" + DISTRIBUTION = "distribution" + + +class DaemonState(str, Enum): + ABSENT = "absent" + WARMING = "warming" + READY = "ready" + UNRESPONSIVE = "unresponsive" + SURVIVED_TIMEOUT = "survived-timeout" + + +class ActivationState(str, Enum): + NOT_APPLICABLE = "not-applicable" + PENDING = "pending" + ACTIVE = "active" + + +class RestartState(str, Enum): + NOT_APPLICABLE = "not-applicable" + NOT_REQUIRED = "not-required" + REQUIRED = "required" + + +class BodyKind(str, Enum): + JSON = "json" + EMPTY = "empty" + MALFORMED = "malformed" + + +class ChildProcessStyle(str, Enum): + NONE = "none" + VERBOSE = "verbose" + HANGING = "hanging" + + +NORMALIZATION_DIMENSIONS = ( + "platform", + "shard", + "storage_mode", + "concurrency", + "cold_warm", +) +REQUIRED_CRATE_TAGS = ( + "tracedecay-api", + "tracedecay-application", + "tracedecay-hooks", + "tracedecay-tool-catalog", + "tracedecay-capture", + "tracedecay", +) +_REMOTE_HOSTS = frozenset( + {HostKind.CURSOR, HostKind.CLAUDE, HostKind.CODEX, HostKind.SDK} +) +_FORBIDDEN_IDENTITY = re.compile(r"\bpr[-_ ]?\d+\b|milestone|budget", re.IGNORECASE) + + +@dataclass(frozen=True) +class ProductionRoute: + route_id: str + committed: bool + mounted: bool + wired: bool + + +@dataclass(frozen=True) +class DashboardResponse: + status_code: int + body: BodyKind + + +@dataclass(frozen=True) +class ChildProcessInvocation: + style: ChildProcessStyle + concurrent_stream_drain: bool + expected_to_hang: bool + + +NO_CHILD = ChildProcessInvocation( + style=ChildProcessStyle.NONE, + concurrent_stream_drain=False, + expected_to_hang=False, +) + + +@dataclass(frozen=True) +class HarnessInputs: + daemon_state: DaemonState + activation_state: ActivationState = ActivationState.NOT_APPLICABLE + restart_state: RestartState = RestartState.NOT_APPLICABLE + dashboard: DashboardResponse | None = None + child_process: ChildProcessInvocation = NO_CHILD + production_route: ProductionRoute | None = None + + +@dataclass(frozen=True) +class NormalizationContract: + dimensions: tuple[str, ...] + cold_warm: Temperature + runtime_only: bool = True + + +@dataclass(frozen=True) +class WallTimeExpectation: + field: str + includes_handler_middle_slice: bool + advisory: bool = True + slo_gate: bool = False + + +@dataclass(frozen=True) +class EvidenceContract: + expected_availability: AvailabilityState + required_fields: frozenset[str] + wall_time: WallTimeExpectation + sample_count: int = 1 + evidence_class: EvidenceClass = EvidenceClass.N1_REGRESSION_ONLY + distribution_eligible: bool = False + + +@dataclass(frozen=True) +class WorkloadDescriptor: + workload_id: str + host: HostKind + journey: Journey + crate_tags: tuple[str, ...] + crate_test_ids: tuple[str, ...] + inputs: HarnessInputs + normalization: NormalizationContract + evidence: EvidenceContract + + +@dataclass(frozen=True) +class ShutdownObservation: + total_seconds: int + abort_offset_seconds: int + sample_count: int = 1 + evidence_class: EvidenceClass = EvidenceClass.N1_REGRESSION_ONLY + + def __post_init__(self) -> None: + if self.abort_offset_seconds >= self.total_seconds: + raise ValueError("abort offset must precede shutdown total") + if self.sample_count != 1: + raise ValueError("reviewed shutdown observations are n=1 evidence") + + +@dataclass(frozen=True) +class SampleIdentity: + sample_id: str + capture_id: str + + +@dataclass(frozen=True) +class AbbaComparisonMetadata: + order: tuple[str, str, str, str] + identity_fields: tuple[str, ...] + preserve_raw_samples: bool + slo_gate: bool + + +@dataclass(frozen=True) +class PercentilePolicy: + junit_retention_is_percentile_history: bool + p95_min_matching_samples: int + p99_min_matching_samples: int + + +ABBA_COMPARISON = AbbaComparisonMetadata( + order=("A", "B", "B", "A"), + identity_fields=("workload_id", "host", "journey", "crate_tags"), + preserve_raw_samples=True, + slo_gate=False, +) +PERCENTILE_POLICY = PercentilePolicy( + junit_retention_is_percentile_history=False, + p95_min_matching_samples=40, + p99_min_matching_samples=100, +) +REVIEWED_SHUTDOWN_OBSERVATIONS = ( + ShutdownObservation(total_seconds=89, abort_offset_seconds=81), + ShutdownObservation(total_seconds=57, abort_offset_seconds=52), +) + + +def evidence_class_for_sample_count(sample_count: int) -> EvidenceClass: + if sample_count < 1: + raise ValueError("sample_count must be positive") + if sample_count == 1: + return EvidenceClass.N1_REGRESSION_ONLY + return EvidenceClass.DISTRIBUTION + + +def available_percentiles(matching_sample_count: int) -> tuple[str, ...]: + if matching_sample_count < 1: + raise ValueError("matching_sample_count must be positive") + if matching_sample_count == 1: + return () + percentiles = ["p50"] + if matching_sample_count >= PERCENTILE_POLICY.p95_min_matching_samples: + percentiles.append("p95") + if matching_sample_count >= PERCENTILE_POLICY.p99_min_matching_samples: + percentiles.append("p99") + return tuple(percentiles) + + +def validate_remote_success( + route: ProductionRoute | None, + availability: AvailabilityState, +) -> None: + if availability is not AvailabilityState.AVAILABLE: + return + if ( + route is None + or not route.route_id + or not route.committed + or not route.mounted + or not route.wired + ): + raise ValueError( + "available remote evidence requires a committed, mounted, wired production route" + ) + + +def validate_sample_identities( + samples: Iterable[SampleIdentity], +) -> tuple[SampleIdentity, ...]: + ordered = tuple(samples) + sample_ids = [sample.sample_id for sample in ordered] + if len(sample_ids) != len(set(sample_ids)): + raise ValueError("duplicate sample_id") + return ordered + + +def _route(host: HostKind) -> ProductionRoute: + return ProductionRoute( + route_id=f"runtime.route.{host.value}.final-v2", + committed=True, + mounted=True, + wired=True, + ) + + +def _wall_field(host: HostKind) -> str: + return { + HostKind.CLI: "cli_wall_ns", + HostKind.MCP: "mcp_wall_ns", + HostKind.HOOK: "hook_wall_ns", + HostKind.CURSOR: "host_wall_ns", + HostKind.CLAUDE: "host_wall_ns", + HostKind.CODEX: "host_wall_ns", + HostKind.DASHBOARD: "host_wall_ns", + HostKind.SDK: "host_wall_ns", + }[host] + + +def _workload( + host: HostKind, + journey: Journey, + slug: str, + crate_tags: tuple[str, ...], + *, + daemon_state: DaemonState = DaemonState.READY, + availability: AvailabilityState = AvailabilityState.AVAILABLE, + activation_state: ActivationState = ActivationState.NOT_APPLICABLE, + restart_state: RestartState = RestartState.NOT_APPLICABLE, + dashboard: DashboardResponse | None = None, + child_process: ChildProcessInvocation = NO_CHILD, + extra_fields: tuple[str, ...] = (), +) -> WorkloadDescriptor: + workload_id = f"runtime.{host.value}.{journey.value}.{slug}" + identity_suffix = f"{host.value}.{journey.value}.{slug}" + crate_test_ids = tuple( + f"runtime::{crate_tag}::{identity_suffix}" for crate_tag in crate_tags + ) + required_fields = { + "sample_id", + "capture_id", + "availability", + "elapsed_ns", + "process_count", + "request_bytes", + "response_bytes", + "content_bytes", + "daemon_survived", + "timeout_phase", + _wall_field(host), + *extra_fields, + } + includes_handler = host is HostKind.MCP + if includes_handler: + required_fields.add("handler_us") + production_route = _route(host) if host in _REMOTE_HOSTS else None + return WorkloadDescriptor( + workload_id=workload_id, + host=host, + journey=journey, + crate_tags=crate_tags, + crate_test_ids=crate_test_ids, + inputs=HarnessInputs( + daemon_state=daemon_state, + activation_state=activation_state, + restart_state=restart_state, + dashboard=dashboard, + child_process=child_process, + production_route=production_route, + ), + normalization=NormalizationContract( + dimensions=NORMALIZATION_DIMENSIONS, + cold_warm=( + Temperature.COLD if journey is Journey.COLD else Temperature.WARM + ), + ), + evidence=EvidenceContract( + expected_availability=availability, + required_fields=frozenset(required_fields), + wall_time=WallTimeExpectation( + field=_wall_field(host), + includes_handler_middle_slice=includes_handler, + ), + ), + ) + + +_CLI = ("tracedecay-api", "tracedecay-application", "tracedecay") +_MCP = ( + "tracedecay-api", + "tracedecay-application", + "tracedecay-tool-catalog", + "tracedecay", +) +_HOOK = ("tracedecay-hooks", "tracedecay-capture", "tracedecay") +_DASHBOARD = ("tracedecay-api", "tracedecay-application", "tracedecay") +_SDK = ( + "tracedecay-api", + "tracedecay-application", + "tracedecay-capture", + "tracedecay", +) + + +HOST_WORKLOADS = ( + _workload( + HostKind.CLI, + Journey.COLD, + "daemon-start", + _CLI, + daemon_state=DaemonState.ABSENT, + ), + _workload(HostKind.CLI, Journey.NO_OP, "status", _CLI), + _workload( + HostKind.CLI, + Journey.CONTENTION, + "unresponsive-daemon", + _CLI, + daemon_state=DaemonState.UNRESPONSIVE, + availability=AvailabilityState.UNAVAILABLE, + ), + _workload( + HostKind.CLI, + Journey.RECOVERY, + "daemon-survival", + _CLI, + daemon_state=DaemonState.SURVIVED_TIMEOUT, + ), + _workload( + HostKind.MCP, + Journey.COLD, + "connect", + _MCP, + daemon_state=DaemonState.ABSENT, + ), + _workload(HostKind.MCP, Journey.WARM, "handler-dispatch", _MCP), + _workload( + HostKind.MCP, + Journey.CONTENTION, + "unresponsive-daemon", + _MCP, + daemon_state=DaemonState.UNRESPONSIVE, + availability=AvailabilityState.UNAVAILABLE, + ), + _workload( + HostKind.MCP, + Journey.RECOVERY, + "reconnect", + _MCP, + daemon_state=DaemonState.SURVIVED_TIMEOUT, + ), + _workload( + HostKind.HOOK, + Journey.COLD, + "capture", + _HOOK, + daemon_state=DaemonState.ABSENT, + ), + _workload(HostKind.HOOK, Journey.NO_OP, "empty-event", _HOOK), + _workload( + HostKind.HOOK, + Journey.CONTENTION, + "repeated-capture-id", + _HOOK, + extra_fields=("capture_id_occurrences",), + ), + _workload( + HostKind.HOOK, + Journey.RECOVERY, + "daemon-restart", + _HOOK, + daemon_state=DaemonState.SURVIVED_TIMEOUT, + ), + *tuple( + workload + for host in (HostKind.CURSOR, HostKind.CLAUDE, HostKind.CODEX) + for workload in ( + _workload( + host, + Journey.COLD, + "activate", + _HOOK, + daemon_state=DaemonState.WARMING, + availability=AvailabilityState.PARTIAL, + activation_state=ActivationState.PENDING, + restart_state=RestartState.NOT_REQUIRED, + ), + _workload( + host, + Journey.WARM, + "active", + _HOOK, + activation_state=ActivationState.ACTIVE, + restart_state=RestartState.NOT_REQUIRED, + ), + _workload( + host, + Journey.RECOVERY, + "restart-required", + _HOOK, + availability=AvailabilityState.PARTIAL, + activation_state=ActivationState.ACTIVE, + restart_state=RestartState.REQUIRED, + ), + ) + ), + _workload( + HostKind.DASHBOARD, + Journey.COLD, + "warming-daemon", + _DASHBOARD, + daemon_state=DaemonState.WARMING, + availability=AvailabilityState.PARTIAL, + ), + _workload( + HostKind.DASHBOARD, + Journey.WARM, + "http-json", + _DASHBOARD, + dashboard=DashboardResponse(status_code=200, body=BodyKind.JSON), + extra_fields=("dashboard_status_code",), + ), + _workload( + HostKind.DASHBOARD, + Journey.CONTENTION, + "malformed-response", + _DASHBOARD, + availability=AvailabilityState.FAILED, + dashboard=DashboardResponse(status_code=200, body=BodyKind.MALFORMED), + extra_fields=("dashboard_status_code",), + ), + _workload( + HostKind.DASHBOARD, + Journey.CONTENTION, + "no-content-204", + _DASHBOARD, + availability=AvailabilityState.UNAVAILABLE, + dashboard=DashboardResponse(status_code=204, body=BodyKind.EMPTY), + extra_fields=("dashboard_status_code",), + ), + _workload( + HostKind.DASHBOARD, + Journey.CONTENTION, + "not-found-404", + _DASHBOARD, + availability=AvailabilityState.UNSUPPORTED, + dashboard=DashboardResponse(status_code=404, body=BodyKind.EMPTY), + extra_fields=("dashboard_status_code",), + ), + _workload( + HostKind.SDK, + Journey.WARM, + "verbose-child", + _SDK, + child_process=ChildProcessInvocation( + style=ChildProcessStyle.VERBOSE, + concurrent_stream_drain=True, + expected_to_hang=False, + ), + extra_fields=("stdout_bytes", "stderr_bytes"), + ), + _workload( + HostKind.SDK, + Journey.CONTENTION, + "hanging-child", + _SDK, + availability=AvailabilityState.UNAVAILABLE, + child_process=ChildProcessInvocation( + style=ChildProcessStyle.HANGING, + concurrent_stream_drain=True, + expected_to_hang=True, + ), + extra_fields=("stdout_bytes", "stderr_bytes"), + ), + _workload( + HostKind.SDK, + Journey.RECOVERY, + "child-timeout", + _SDK, + daemon_state=DaemonState.SURVIVED_TIMEOUT, + child_process=ChildProcessInvocation( + style=ChildProcessStyle.HANGING, + concurrent_stream_drain=True, + expected_to_hang=True, + ), + extra_fields=("stdout_bytes", "stderr_bytes"), + ), +) + + +def validate_catalog( + workloads: Iterable[WorkloadDescriptor], +) -> tuple[WorkloadDescriptor, ...]: + ordered = tuple(workloads) + workload_ids = [workload.workload_id for workload in ordered] + if len(workload_ids) != len(set(workload_ids)): + raise ValueError("duplicate workload_id") + + crate_test_ids = [ + test_id for workload in ordered for test_id in workload.crate_test_ids + ] + if len(crate_test_ids) != len(set(crate_test_ids)): + raise ValueError("duplicate crate runtime test id") + + covered_crates = { + crate_tag for workload in ordered for crate_tag in workload.crate_tags + } + missing_crates = set(REQUIRED_CRATE_TAGS) - covered_crates + if missing_crates: + raise ValueError( + "missing required crate lanes: " + ", ".join(sorted(missing_crates)) + ) + + for workload in ordered: + if len(workload.crate_tags) != len(workload.crate_test_ids): + raise ValueError(f"{workload.workload_id} has incomplete crate runtime test ids") + identity = " ".join( + (workload.workload_id, *workload.crate_tags, *workload.crate_test_ids) + ) + if _FORBIDDEN_IDENTITY.search(identity): + raise ValueError(f"{workload.workload_id} uses a PR or milestone identity") + if workload.evidence.sample_count != 1: + raise ValueError(f"{workload.workload_id} must remain n=1 evidence") + if workload.evidence.evidence_class is not EvidenceClass.N1_REGRESSION_ONLY: + raise ValueError(f"{workload.workload_id} has invalid evidence class") + if workload.evidence.wall_time.slo_gate: + raise ValueError(f"{workload.workload_id} cannot define an SLO gate") + if workload.host in _REMOTE_HOSTS: + route = workload.inputs.production_route + if route is None: + raise ValueError(f"{workload.workload_id} is missing a production route") + if _FORBIDDEN_IDENTITY.search(route.route_id): + raise ValueError(f"{workload.workload_id} uses an unstable route identity") + validate_remote_success(route, workload.evidence.expected_availability) + return ordered + + +validate_catalog(HOST_WORKLOADS) + + +def select_workloads( + *, + host: HostKind | str | None = None, + crate_tag: str | None = None, +) -> tuple[WorkloadDescriptor, ...]: + selected_host = HostKind(host) if host is not None else None + return tuple( + workload + for workload in HOST_WORKLOADS + if (selected_host is None or workload.host is selected_host) + and (crate_tag is None or crate_tag in workload.crate_tags) + ) + + +def group_by_host() -> Mapping[HostKind, tuple[WorkloadDescriptor, ...]]: + return MappingProxyType( + {host: select_workloads(host=host) for host in HostKind} + ) diff --git a/benchmark_data/runtime/incident_workloads.py b/benchmark_data/runtime/incident_workloads.py new file mode 100644 index 0000000000..250e6c5cb5 --- /dev/null +++ b/benchmark_data/runtime/incident_workloads.py @@ -0,0 +1,329 @@ +"""Declarative workloads for the final runtime incident regression corpus.""" + +from __future__ import annotations + +from collections.abc import Mapping +from dataclasses import dataclass +from typing import Any, Literal + +from benchmark_data.runtime.scenarios import ( + CrateLane, + RuntimeState, + Surface, + TimeoutPhase, + validate_stable_id, +) + +P95_MINIMUM_SAMPLES = 40 +P99_MINIMUM_SAMPLES = 100 + +ObservationValue = int | bool | None +ProcessPolicy = Literal["normal", "crash"] + +INTEGER_OBSERVATIONS = frozenset( + { + "edit_count", + "commit_count", + "indexing_run_count", + "indexing_noop_count", + "indexing_coalesced_count", + "diagnostic_generated_count", + "diagnostic_deduplicated_count", + "diagnostic_batch_count", + "daemon_cpu_time_ns", + "daemon_peak_rss_bytes", + "daemon_pss_bytes", + "memory_peak_bytes", + "wal_bytes", + "disk_read_bytes", + "disk_write_bytes", + "write_amplification_ppm", + "queue_depth", + "queue_enqueued_count", + "queue_shed_count", + "queue_cancelled_count", + "queue_retry_count", + "generation", + "foreground_under_maintenance_ns", + "profiler_overhead_ns", + "renderer_event_count", + "consumer_event_count", + "missing_daemon_fail_fast_ns", + "process_startup_control_ns", + "direct_hook_wall_ns", + "hook_residual_ns", + "lifecycle_wrapper_overhead_ns", + } +) +BOOLEAN_OBSERVATIONS = frozenset({"process_tree_reaped"}) +OBSERVATION_FIELDS = INTEGER_OBSERVATIONS | BOOLEAN_OBSERVATIONS + + +class IncidentWorkloadError(ValueError): + """An incident workload or observation is internally inconsistent.""" + + +@dataclass(frozen=True) +class IncidentWorkload: + """One n=1 workload definition pending stable baseline collection.""" + + id: str + journey_id: str + crate_lanes: tuple[CrateLane, ...] + surface: Surface + state: RuntimeState + timeout_phase: TimeoutPhase + process_policy: ProcessPolicy + required_observations: tuple[str, ...] + sample_count: int = 1 + slo_gate: bool = False + + def __post_init__(self) -> None: + validate_stable_id(self.id) + validate_stable_id(self.journey_id) + if not self.crate_lanes: + raise IncidentWorkloadError(f"{self.id} has no crate lane") + unknown = set(self.required_observations) - OBSERVATION_FIELDS + if unknown: + raise IncidentWorkloadError( + f"{self.id} has unknown observations: {sorted(unknown)}" + ) + if not self.required_observations: + raise IncidentWorkloadError(f"{self.id} has no raw observations") + if self.sample_count != 1 or self.slo_gate: + raise IncidentWorkloadError( + f"{self.id} must remain n=1 advisory evidence" + ) + + @property + def percentile_minimums(self) -> dict[str, int]: + return {"p95": P95_MINIMUM_SAMPLES, "p99": P99_MINIMUM_SAMPLES} + + +def validate_incident_observation( + observation: Mapping[str, Any], +) -> Mapping[str, Any]: + """Validate a sparse raw observation without inventing missing values.""" + + if not isinstance(observation, dict): + raise IncidentWorkloadError("incident observation must be an object") + unknown = set(observation) - OBSERVATION_FIELDS + if unknown: + raise IncidentWorkloadError( + f"incident observation has unknown fields: {sorted(unknown)}" + ) + for field, value in observation.items(): + if field in BOOLEAN_OBSERVATIONS: + if value is not None and not isinstance(value, bool): + raise IncidentWorkloadError(f"{field} must be a boolean or null") + continue + if ( + value is not None + and ( + not isinstance(value, int) + or isinstance(value, bool) + or value < 0 + ) + ): + raise IncidentWorkloadError( + f"{field} must be a non-negative integer or null" + ) + + generated = observation.get("diagnostic_generated_count") + deduplicated = observation.get("diagnostic_deduplicated_count") + if ( + isinstance(generated, int) + and isinstance(deduplicated, int) + and deduplicated > generated + ): + raise IncidentWorkloadError( + "diagnostic deduplicated count cannot exceed generated count" + ) + + renderer = observation.get("renderer_event_count") + consumer = observation.get("consumer_event_count") + if ( + isinstance(renderer, int) + and isinstance(consumer, int) + and consumer > renderer + ): + raise IncidentWorkloadError( + "consumer event count cannot exceed renderer event count" + ) + return observation + + +INCIDENT_WORKLOADS = ( + IncidentWorkload( + "missing-daemon-after-shell", + "daemon-failure-recovery", + (CrateLane.API, CrateLane.INTEGRATED), + Surface.HOST, + RuntimeState.RECOVERY, + TimeoutPhase.SHUTDOWN, + "crash", + ( + "missing_daemon_fail_fast_ns", + "process_startup_control_ns", + "direct_hook_wall_ns", + "hook_residual_ns", + "lifecycle_wrapper_overhead_ns", + "process_tree_reaped", + ), + ), + IncidentWorkload( + "sustained-edit-commit-indexing", + "indexing-coalescence", + ( + CrateLane.CODE_INDEX, + CrateLane.APPLICATION, + CrateLane.INTEGRATED, + ), + Surface.CLI, + RuntimeState.NO_OP, + TimeoutPhase.TOOL_CALL, + "normal", + ( + "edit_count", + "commit_count", + "indexing_run_count", + "indexing_noop_count", + "indexing_coalesced_count", + "generation", + ), + ), + IncidentWorkload( + "foreground-under-maintenance", + "maintenance-contention", + ( + CrateLane.QUERY, + CrateLane.APPLICATION, + CrateLane.INTEGRATED, + ), + Surface.CLI, + RuntimeState.CONTENTION, + TimeoutPhase.TOOL_CALL, + "normal", + ( + "foreground_under_maintenance_ns", + "queue_enqueued_count", + "queue_shed_count", + "queue_cancelled_count", + "queue_retry_count", + ), + ), + IncidentWorkload( + "diagnostic-dedup-batch-rate", + "diagnostic-generation", + (CrateLane.APPLICATION, CrateLane.API, CrateLane.INTEGRATED), + Surface.CLI, + RuntimeState.REPEAT, + TimeoutPhase.TOOL_CALL, + "normal", + ( + "diagnostic_generated_count", + "diagnostic_deduplicated_count", + "diagnostic_batch_count", + ), + ), + IncidentWorkload( + "daemon-steady-state-resources", + "daemon-resource-stability", + ( + CrateLane.RUSQLITE_RUNTIME, + CrateLane.APPLICATION, + CrateLane.INTEGRATED, + ), + Surface.CLI, + RuntimeState.WARM, + TimeoutPhase.TOOL_CALL, + "normal", + ( + "daemon_cpu_time_ns", + "daemon_peak_rss_bytes", + "daemon_pss_bytes", + "wal_bytes", + "disk_read_bytes", + "disk_write_bytes", + "write_amplification_ppm", + "queue_depth", + "generation", + "profiler_overhead_ns", + ), + ), + IncidentWorkload( + "renderer-consumer-event-count", + "event-rendering", + (CrateLane.API, CrateLane.APPLICATION, CrateLane.INTEGRATED), + Surface.HOST, + RuntimeState.REPEAT, + TimeoutPhase.HOST_ACTIVATION, + "normal", + ("renderer_event_count", "consumer_event_count"), + ), +) + + +def validate_incident_workloads() -> tuple[IncidentWorkload, ...]: + """Validate uniqueness and return the canonical incident catalog.""" + + ids = [workload.id for workload in INCIDENT_WORKLOADS] + if len(ids) != len(set(ids)): + raise IncidentWorkloadError("incident workload IDs must be unique") + for workload in INCIDENT_WORKLOADS: + if len(workload.required_observations) != len( + set(workload.required_observations) + ): + raise IncidentWorkloadError( + f"{workload.id} repeats a required observation" + ) + return INCIDENT_WORKLOADS + + +def _incident_availability(workload: IncidentWorkload) -> dict[str, str | None]: + if workload.id == "missing-daemon-after-shell": + return { + "state": "available", + "detail": "wired product command: hook-cursor-after-shell", + } + if workload.id == "diagnostic-dedup-batch-rate": + return { + "state": "available", + "detail": "wired product command: lsp bridge --stdio", + } + return { + "state": "unavailable", + "detail": ( + "baseline/treatment capture waits for committed product fix " + "and mounted production route" + ), + } + + +def incident_catalog_document() -> dict[str, Any]: + """Render the pending workloads without claiming production availability.""" + + return { + "schema_version": 1, + "evidence_class": "n=1_regression_only", + "percentile_eligibility": { + "p95_minimum_samples": P95_MINIMUM_SAMPLES, + "p99_minimum_samples": P99_MINIMUM_SAMPLES, + }, + "workloads": [ + { + "id": workload.id, + "journey_id": workload.journey_id, + "crate_lanes": [lane.value for lane in workload.crate_lanes], + "surface": workload.surface.value, + "state": workload.state.value, + "timeout_phase": workload.timeout_phase.value, + "process_policy": workload.process_policy, + "required_observations": list(workload.required_observations), + "sample_count": workload.sample_count, + "slo_gate": workload.slo_gate, + "availability": _incident_availability(workload), + } + for workload in validate_incident_workloads() + ], + } diff --git a/benchmark_data/runtime/lifecycle.py b/benchmark_data/runtime/lifecycle.py new file mode 100644 index 0000000000..72c4ef88d6 --- /dev/null +++ b/benchmark_data/runtime/lifecycle.py @@ -0,0 +1,610 @@ +"""Hermetic process lifecycle and evidence capture for runtime samples.""" + +from __future__ import annotations + +import ctypes +import json +import os +import shutil +import signal +import socket +import subprocess +import tempfile +import threading +import time +import urllib.error +import urllib.request +from dataclasses import dataclass, field +from pathlib import Path +from types import FrameType +from typing import Callable, Mapping, Sequence + + +class LifecycleError(RuntimeError): + """A managed runtime process violated its lifecycle contract.""" + + +class LifecycleInterrupted(LifecycleError): + def __init__(self, signum: int) -> None: + self.signum = signum + super().__init__(f"lifecycle interrupted by signal {signum}") + + +class ReadinessTimeout(LifecycleError): + def __init__(self, evidence: LifecycleEvidence) -> None: + self.evidence = evidence + super().__init__(f"daemon readiness timed out in {evidence.timeout_phase}") + + +class HostProcessError(LifecycleError): + def __init__(self, result: HostResult, message: str | None = None) -> None: + self.result = result + super().__init__(message or f"host exited with status {result.evidence.exit_code}") + + +@dataclass(frozen=True) +class ProbeResult: + ready: bool + phase: str + availability_state: str + availability_detail: str | None + activation_state: str = "unknown" + restart_state: str = "not_applicable" + status_code: int | None = None + payload_bytes: int = 0 + + +@dataclass +class LifecycleEvidence: + sample_count: int = 1 + measurement_class: str = "n=1 regression sample" + process_count: int = 0 + process_count_after_cleanup: int = 0 + activation_state: str = "unknown" + restart_state: str = "not_applicable" + availability_state: str = "unavailable" + availability_detail: str | None = "not observed" + readiness_availability_history: list[str] = field(default_factory=list) + timeout_phase: str | None = None + dashboard_status_code: int | None = None + daemon_survived: bool | None = None + end_to_end_host_wall_seconds: float = 0.0 + end_to_end_hook_wall_seconds: float = 0.0 + request_payload_bytes: int = 0 + response_payload_bytes: int = 0 + stdout_bytes: int = 0 + stderr_bytes: int = 0 + capture_id: str | None = None + capture_id_occurrences: int = 0 + term_sent: bool = False + kill_sent: bool = False + exit_code: int | None = None + + +@dataclass(frozen=True) +class HostResult: + evidence: LifecycleEvidence + stdout: bytes + stderr: bytes + stdout_log: Path + stderr_log: Path + process_group_id: int + + +class RunWorkspace: + """A disposable run directory with explicit failure preservation.""" + + def __init__(self, parent: Path, *, preserve_on_failure: bool) -> None: + parent = Path(parent) + parent.mkdir(parents=True, exist_ok=True) + self.path = Path(tempfile.mkdtemp(prefix="runtime-run-", dir=parent)) + self.preserve_on_failure = preserve_on_failure + + def __enter__(self) -> RunWorkspace: + return self + + def __exit__( + self, + exception_type: type[BaseException] | None, + exception: BaseException | None, + traceback: object, + ) -> bool: + if exception_type is None or not self.preserve_on_failure: + shutil.rmtree(self.path, ignore_errors=True) + return False + + +class OwnedDaemon: + """Exactly one daemon process group with bounded readiness and shutdown.""" + + def __init__( + self, + command: Sequence[str], + *, + env: Mapping[str, str], + log_dir: Path, + readiness: Callable[[], ProbeResult], + readiness_timeout: float, + poll_interval: float, + termination_grace: float, + ) -> None: + self.command = tuple(command) + self.env = dict(env) + self.log_dir = Path(log_dir) + self.readiness = readiness + self.readiness_timeout = readiness_timeout + self.poll_interval = poll_interval + self.termination_grace = termination_grace + self.evidence = LifecycleEvidence() + self.process: subprocess.Popen[bytes] | None = None + self.process_group_id = 0 + self._started = False + self._threads: list[threading.Thread] = [] + self._logs: list[object] = [] + + @property + def is_alive(self) -> bool: + return self.process is not None and self.process.poll() is None + + def start(self) -> OwnedDaemon: + if self._started: + raise LifecycleError("daemon process group already started") + self._started = True + enable_process_subreaper() + self.log_dir.mkdir(parents=True, exist_ok=True) + stdout_log = (self.log_dir / "stdout.log").open("wb") + stderr_log = (self.log_dir / "stderr.log").open("wb") + self._logs = [stdout_log, stderr_log] + self.process = subprocess.Popen( + self.command, + env=self.env, + stdin=subprocess.DEVNULL, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + start_new_session=True, + ) + self.process_group_id = os.getpgid(self.process.pid) + self.evidence.process_count = max( + 1, process_group_process_count(self.process_group_id) + ) + self._threads = [ + _start_drain(self.process.stdout, stdout_log), + _start_drain(self.process.stderr, stderr_log), + ] + + deadline = time.monotonic() + self.readiness_timeout + last_probe = ProbeResult( + ready=False, + phase="dashboard_connect", + availability_state="unavailable", + availability_detail="dashboard not contacted", + ) + while time.monotonic() < deadline: + if self.process.poll() is not None: + self.evidence.availability_state = "failed" + self.evidence.availability_detail = "daemon exited before readiness" + self.stop() + raise LifecycleError("daemon exited before readiness") + last_probe = self.readiness() + self._record_probe(last_probe) + if last_probe.ready: + return self + time.sleep(self.poll_interval) + + self.evidence.timeout_phase = last_probe.phase + self.stop() + raise ReadinessTimeout(self.evidence) + + def stop(self) -> None: + if self.process is None: + return + terminate_process_group( + self.process, + self.process_group_id, + self.termination_grace, + self.evidence, + ) + for thread in self._threads: + thread.join(timeout=1.0) + for log in self._logs: + log.close() + self.evidence.process_count_after_cleanup = process_group_process_count( + self.process_group_id + ) + + def handle_signal(self, signum: int, frame: FrameType | None) -> None: + del frame + self.stop() + raise LifecycleInterrupted(signum) + + def __enter__(self) -> OwnedDaemon: + return self.start() + + def __exit__( + self, + exception_type: type[BaseException] | None, + exception: BaseException | None, + traceback: object, + ) -> bool: + self.stop() + return False + + def _record_probe(self, probe: ProbeResult) -> None: + self.evidence.availability_state = probe.availability_state + self.evidence.availability_detail = probe.availability_detail + self.evidence.activation_state = probe.activation_state + self.evidence.restart_state = probe.restart_state + self.evidence.dashboard_status_code = probe.status_code + self.evidence.readiness_availability_history.append( + probe.availability_state + ) + + +def probe_dashboard_once(url: str, *, request_timeout: float) -> ProbeResult: + """Make one bounded dashboard probe with typed availability.""" + + try: + with urllib.request.urlopen(url, timeout=request_timeout) as response: + status = response.status + body = response.read() + except urllib.error.HTTPError as error: + status = error.code + body = error.read() + except (TimeoutError, socket.timeout): + return ProbeResult( + False, + "dashboard_response", + "unavailable", + "dashboard response timed out", + ) + except urllib.error.URLError as error: + if isinstance(error.reason, (TimeoutError, socket.timeout)): + return ProbeResult( + False, + "dashboard_response", + "unavailable", + "dashboard response timed out", + ) + return ProbeResult( + False, + "dashboard_connect", + "unavailable", + "dashboard connection unavailable", + ) + + if status == 204: + return ProbeResult( + False, + "dashboard_empty", + "unavailable", + "dashboard returned no content", + status_code=status, + ) + if status == 404: + return ProbeResult( + False, + "dashboard_http_404", + "unsupported", + "dashboard route is unsupported", + status_code=status, + payload_bytes=len(body), + ) + if status != 200: + availability = "partial" if status == 503 else "unavailable" + phase = "dashboard_warming" if status == 503 else f"dashboard_http_{status}" + return ProbeResult( + False, + phase, + availability, + f"dashboard returned HTTP {status}", + status_code=status, + payload_bytes=len(body), + ) + try: + document = json.loads(body) + except (json.JSONDecodeError, UnicodeDecodeError): + return ProbeResult( + False, + "dashboard_malformed", + "failed", + "dashboard response was malformed", + status_code=status, + payload_bytes=len(body), + ) + if not isinstance(document, dict): + return ProbeResult( + False, + "dashboard_malformed", + "failed", + "dashboard response was not an object", + status_code=status, + payload_bytes=len(body), + ) + activated = document.get("activated") is True + restart_required = document.get("restart_required") is True + return ProbeResult( + True, + "ready", + "available", + None, + activation_state="active" if activated else "inactive", + restart_state="required" if restart_required else "not_required", + status_code=status, + payload_bytes=len(body), + ) + + +def run_host( + command: Sequence[str], + *, + env: Mapping[str, str], + log_dir: Path, + timeout: float, + termination_grace: float, + input_payload: bytes = b"", + daemon: OwnedDaemon | None = None, + check: bool = True, +) -> HostResult: + """Run one host group while concurrently draining both output streams.""" + + enable_process_subreaper() + log_dir = Path(log_dir) + log_dir.mkdir(parents=True, exist_ok=True) + stdout_log = log_dir / "stdout.log" + stderr_log = log_dir / "stderr.log" + stdout_buffer = bytearray() + stderr_buffer = bytearray() + evidence = LifecycleEvidence(request_payload_bytes=len(input_payload)) + started = time.monotonic() + with stdout_log.open("wb") as stdout_handle, stderr_log.open("wb") as stderr_handle: + process = subprocess.Popen( + tuple(command), + env=dict(env), + stdin=subprocess.PIPE, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + start_new_session=True, + ) + process_group_id = os.getpgid(process.pid) + evidence.process_count = max( + 1, process_group_process_count(process_group_id) + ) + threads = [ + _start_drain(process.stdout, stdout_handle, stdout_buffer), + _start_drain(process.stderr, stderr_handle, stderr_buffer), + ] + if process.stdin is not None: + try: + process.stdin.write(input_payload) + process.stdin.flush() + except BrokenPipeError: + pass + finally: + process.stdin.close() + timed_out = False + try: + process.wait(timeout=timeout) + except subprocess.TimeoutExpired: + timed_out = True + evidence.process_count = max( + evidence.process_count, + process_group_process_count(process_group_id), + ) + evidence.timeout_phase = ( + "child_io" if evidence.process_count > 1 else "host_wait" + ) + evidence.availability_state = "failed" + evidence.availability_detail = "host process timed out" + terminate_process_group( + process, + process_group_id, + termination_grace, + evidence, + ) + else: + if process_group_process_count(process_group_id): + terminate_process_group( + process, + process_group_id, + termination_grace, + evidence, + ) + else: + _reap_process_group(process_group_id) + for thread in threads: + thread.join(timeout=1.0) + + elapsed = time.monotonic() - started + stdout = bytes(stdout_buffer) + stderr = bytes(stderr_buffer) + evidence.exit_code = process.returncode + evidence.stdout_bytes = len(stdout) + evidence.stderr_bytes = len(stderr) + evidence.response_payload_bytes = len(stdout) + evidence.end_to_end_host_wall_seconds = elapsed + evidence.end_to_end_hook_wall_seconds = elapsed + evidence.daemon_survived = daemon.is_alive if daemon is not None else True + evidence.process_count_after_cleanup = process_group_process_count( + process_group_id + ) + + capture_ids: list[str] = [] + saw_record = False + for line in stdout.splitlines(): + try: + record = json.loads(line) + except (json.JSONDecodeError, UnicodeDecodeError): + continue + if not isinstance(record, dict): + continue + saw_record = True + capture_id = record.get("capture_id") + if isinstance(capture_id, str) and capture_id: + capture_ids.append(capture_id) + if record.get("activated") is True: + evidence.activation_state = "active" + elif evidence.activation_state == "unknown": + evidence.activation_state = "inactive" + evidence.restart_state = ( + "required" + if record.get("restart_required") is True + else "not_required" + ) + + unique_capture_ids = set(capture_ids) + if capture_ids: + evidence.capture_id = capture_ids[0] + evidence.capture_id_occurrences = len(capture_ids) + if not timed_out and process.returncode == 0 and len(unique_capture_ids) <= 1: + evidence.availability_state = "available" + evidence.availability_detail = None + if not saw_record: + evidence.activation_state = "unknown" + evidence.restart_state = "not_applicable" + elif evidence.availability_detail == "not observed": + evidence.availability_state = "failed" + evidence.availability_detail = "host process failed" + + result = HostResult( + evidence=evidence, + stdout=stdout, + stderr=stderr, + stdout_log=stdout_log, + stderr_log=stderr_log, + process_group_id=process_group_id, + ) + if len(unique_capture_ids) > 1: + evidence.availability_state = "failed" + evidence.availability_detail = "conflicting capture IDs" + raise HostProcessError(result, "conflicting capture IDs") + if check and (timed_out or process.returncode != 0): + raise HostProcessError(result) + return result + + +def process_group_process_count(process_group_id: int) -> int: + """Count live Linux processes in one process group.""" + + if process_group_id <= 0: + return 0 + count = 0 + proc = Path("/proc") + if not proc.is_dir(): + try: + os.killpg(process_group_id, 0) + except ProcessLookupError: + return 0 + return 1 + for entry in proc.iterdir(): + if not entry.name.isdigit(): + continue + try: + stat = (entry / "stat").read_text(encoding="utf-8") + tail = stat[stat.rfind(")") + 2 :].split() + state = tail[0] + group = int(tail[2]) + except (FileNotFoundError, PermissionError, ValueError, IndexError): + continue + if group == process_group_id and state != "Z": + count += 1 + return count + + +def _start_drain( + stream: object, + log: object, + buffer: bytearray | None = None, +) -> threading.Thread: + def drain() -> None: + try: + while True: + chunk = stream.read(65_536) + if not chunk: + break + log.write(chunk) + log.flush() + if buffer is not None: + buffer.extend(chunk) + finally: + stream.close() + + thread = threading.Thread(target=drain, daemon=True) + thread.start() + return thread + + +def terminate_process_group( + process: subprocess.Popen[bytes], + process_group_id: int, + grace: float, + evidence: LifecycleEvidence, + *, + kill_timeout: float | None = None, +) -> None: + bounded_kill_timeout = max(0.01, kill_timeout or max(1.0, grace)) + if os.name == "posix" and process_group_process_count(process_group_id): + try: + os.killpg(process_group_id, signal.SIGTERM) + evidence.term_sent = True + except ProcessLookupError: + pass + elif process.poll() is None: + process.terminate() + evidence.term_sent = True + deadline = time.monotonic() + grace + while time.monotonic() < deadline: + process.poll() + if os.name == "posix": + _reap_process_group(process_group_id) + if process.poll() is not None and ( + os.name != "posix" or process_group_process_count(process_group_id) == 0 + ): + break + time.sleep(0.005) + if os.name == "posix" and process_group_process_count(process_group_id): + try: + os.killpg(process_group_id, signal.SIGKILL) + evidence.kill_sent = True + except ProcessLookupError: + pass + elif process.poll() is None: + process.kill() + evidence.kill_sent = True + try: + process.wait(timeout=bounded_kill_timeout) + except subprocess.TimeoutExpired: + process.kill() + process.wait() + deadline = time.monotonic() + bounded_kill_timeout + while time.monotonic() < deadline: + if os.name != "posix": + break + _reap_process_group(process_group_id) + if process_group_process_count(process_group_id) == 0: + break + time.sleep(0.005) + + +def _reap_process_group(process_group_id: int) -> None: + while True: + try: + child, _ = os.waitpid(-process_group_id, os.WNOHANG) + except ChildProcessError: + return + if child == 0: + return + + +_SUBREAPER_ENABLED = False + + +def enable_process_subreaper() -> None: + global _SUBREAPER_ENABLED + if _SUBREAPER_ENABLED or os.name != "posix": + return + try: + libc = ctypes.CDLL(None, use_errno=True) + if libc.prctl(36, 1, 0, 0, 0) == 0: + _SUBREAPER_ENABLED = True + except (AttributeError, OSError): + return diff --git a/benchmark_data/runtime/mcp_client.py b/benchmark_data/runtime/mcp_client.py new file mode 100644 index 0000000000..d79671ec0b --- /dev/null +++ b/benchmark_data/runtime/mcp_client.py @@ -0,0 +1,564 @@ +"""Persistent line-oriented JSON-RPC client for MCP runtime benchmarks.""" + +from __future__ import annotations + +import itertools +import json +import os +import queue +import subprocess +import threading +import time +from collections.abc import Mapping, Sequence +from dataclasses import dataclass, field +from typing import Any, BinaryIO + +from benchmark_data.runtime.lifecycle import ( + LifecycleEvidence, + enable_process_subreaper, + terminate_process_group, +) + + +JsonObject = dict[str, Any] + + +class MCPProtocolError(RuntimeError): + """The MCP peer emitted an invalid or unusable protocol message.""" + + +class MCPTimeoutError(TimeoutError): + """An MCP operation exceeded its bounded wall-time phase.""" + + def __init__( + self, + phase: str, + timeout: float, + *, + request_id: int | None = None, + ) -> None: + self.phase = phase + self.timeout = timeout + self.request_id = request_id + request = "" if request_id is None else f" for request {request_id}" + super().__init__(f"MCP timeout during {phase}{request} after {timeout:.3f}s") + + +class JSONRPCError(RuntimeError): + """A JSON-RPC error response with its structured details preserved.""" + + def __init__( + self, + *, + request_id: int, + code: int, + message: str, + data: Any = None, + ) -> None: + self.request_id = request_id + self.code = code + self.data = data + super().__init__(f"JSON-RPC error {code}: {message}") + + +class MCPToolError(RuntimeError): + """A tools/call result explicitly marked as an error.""" + + def __init__(self, result: JsonObject) -> None: + self.result = result + messages = [ + item["text"] + for item in result.get("content", ()) + if isinstance(item, dict) and isinstance(item.get("text"), str) + ] + detail = "\n".join(messages) if messages else "MCP tool returned isError" + super().__init__(detail) + + +@dataclass(frozen=True) +class MCPNotification: + """One server notification, kept separate from request responses.""" + + method: str + params: JsonObject + + +@dataclass(frozen=True) +class MCPResponse: + """One matched response plus benchmark measurement evidence.""" + + request_id: int + result: JsonObject + request_bytes: int + response_bytes: int + content_bytes: int + wall_duration_ns: int + handler_duration_us: int | float | None + + @property + def payload_bytes(self) -> int: + return self.request_bytes + self.response_bytes + + @property + def handler_duration_ns(self) -> int | None: + if self.handler_duration_us is None: + return None + return int(self.handler_duration_us * 1_000) + + +@dataclass +class _PendingRequest: + request_bytes: int + started_ns: int + event: threading.Event = field(default_factory=threading.Event) + response: tuple[JsonObject, int, int] | None = None + error: BaseException | None = None + + +def _encode_message(message: Mapping[str, Any]) -> bytes: + return json.dumps( + message, + ensure_ascii=False, + allow_nan=False, + separators=(",", ":"), + sort_keys=True, + ).encode("utf-8") + + +def _content_bytes(content: Any) -> int: + if isinstance(content, list): + return sum(_content_bytes(item) for item in content) + if not isinstance(content, dict): + return 0 + + size = 0 + for key in ("text", "data", "blob"): + value = content.get(key) + if isinstance(value, str): + size += len(value.encode("utf-8")) + resource = content.get("resource") + if isinstance(resource, (dict, list)): + size += _content_bytes(resource) + return size + + +class MCPClient: + """Run one explicit prebuilt binary as a persistent MCP server.""" + + def __init__( + self, + binary_command: Sequence[str | os.PathLike[str]], + *, + timeout: float = 10.0, + terminate_timeout: float = 1.0, + kill_timeout: float = 1.0, + protocol_version: str = "2025-06-18", + env: Mapping[str, str] | None = None, + ) -> None: + if isinstance(binary_command, (str, bytes, os.PathLike)): + raise TypeError("binary_command must be a sequence, not a shell string") + command = tuple(os.fspath(argument) for argument in binary_command) + if not command: + raise ValueError("binary_command must not be empty") + if timeout <= 0 or terminate_timeout < 0 or kill_timeout <= 0: + raise ValueError("timeouts must be positive") + + self.command = command + ("serve", "--timings") + self.timeout = timeout + self.terminate_timeout = terminate_timeout + self.kill_timeout = kill_timeout + self.protocol_version = protocol_version + self._env = None if env is None else {**os.environ, **env} + + self.initialize_result: JsonObject = {} + self._process: subprocess.Popen[bytes] | None = None + self._process_start_count = 0 + self._ids = itertools.count(1) + self._pending: dict[int, _PendingRequest] = {} + self._pending_lock = threading.Lock() + self._write_lock = threading.Lock() + self._lifecycle_lock = threading.RLock() + self._stderr_lock = threading.Lock() + self._stderr_bytes = 0 + self._notifications: queue.Queue[MCPNotification] = queue.Queue() + self._stdout_thread: threading.Thread | None = None + self._stderr_thread: threading.Thread | None = None + self._transport_error: MCPProtocolError | None = None + self._closing = False + self._closed = False + + def __enter__(self) -> MCPClient: + return self.start() + + def __exit__( + self, + exc_type: type[BaseException] | None, + exc: BaseException | None, + traceback: object | None, + ) -> None: + self.close() + + @property + def pid(self) -> int: + if self._process is None: + raise RuntimeError("MCP client has not been started") + return self._process.pid + + @property + def process_alive(self) -> bool: + return self._process is not None and self._process.poll() is None + + @property + def process_start_count(self) -> int: + return self._process_start_count + + @property + def stderr_bytes(self) -> int: + with self._stderr_lock: + return self._stderr_bytes + + def start(self) -> MCPClient: + with self._lifecycle_lock: + if self.process_alive: + return self + if self._closed: + raise RuntimeError("MCP client is closed") + if self._process is not None: + raise MCPProtocolError("MCP server process exited before restart") + + enable_process_subreaper() + self._process = subprocess.Popen( + self.command, + stdin=subprocess.PIPE, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + bufsize=0, + env=self._env, + shell=False, + start_new_session=os.name == "posix", + ) + self._process_start_count += 1 + self._stdout_thread = threading.Thread( + target=self._read_stdout, + name=f"mcp-stdout-{self._process.pid}", + daemon=True, + ) + self._stderr_thread = threading.Thread( + target=self._drain_stderr, + name=f"mcp-stderr-{self._process.pid}", + daemon=True, + ) + self._stdout_thread.start() + self._stderr_thread.start() + + try: + initialized = self._request( + "initialize", + { + "protocolVersion": self.protocol_version, + "capabilities": {}, + "clientInfo": { + "name": "tracedecay-runtime-benchmark", + "version": "1", + }, + }, + timeout=self.timeout, + phase="initialize", + ensure_started=False, + ) + self.initialize_result = initialized.result + self._send_notification("notifications/initialized", {}) + except BaseException: + self.close() + raise + return self + + def list_tools(self, *, timeout: float | None = None) -> MCPResponse: + return self._request( + "tools/list", + {}, + timeout=self.timeout if timeout is None else timeout, + phase="tools/list", + ) + + def call_tool( + self, + name: str, + arguments: Mapping[str, Any] | None = None, + *, + timeout: float | None = None, + ) -> MCPResponse: + response = self._request( + "tools/call", + {"name": name, "arguments": dict(arguments or {})}, + timeout=self.timeout if timeout is None else timeout, + phase="tools/call", + ) + if response.result.get("isError") is True: + raise MCPToolError(response.result) + return response + + def next_notification(self, *, timeout: float | None = None) -> MCPNotification: + wait = self.timeout if timeout is None else timeout + try: + return self._notifications.get(timeout=wait) + except queue.Empty as exc: + raise MCPTimeoutError("notification", wait) from exc + + def close(self) -> None: + with self._lifecycle_lock: + if self._closed: + return + self._closed = True + self._closing = True + self._fail_pending(MCPProtocolError("MCP client closed")) + process = self._process + if process is None: + return + + self._terminate_process_group(process) + for stream in (process.stdin, process.stdout, process.stderr): + if stream is not None: + try: + stream.close() + except OSError: + pass + for thread in (self._stdout_thread, self._stderr_thread): + if thread is not None and thread is not threading.current_thread(): + thread.join(timeout=self.kill_timeout) + + def _ensure_started(self) -> None: + if not self.process_alive: + self.start() + if self._transport_error is not None: + raise self._transport_error + + def _request( + self, + method: str, + params: Mapping[str, Any], + *, + timeout: float, + phase: str, + ensure_started: bool = True, + ) -> MCPResponse: + if timeout <= 0: + raise ValueError("timeout must be positive") + if ensure_started: + self._ensure_started() + + request_id = next(self._ids) + message = { + "jsonrpc": "2.0", + "id": request_id, + "method": method, + "params": dict(params), + } + encoded = _encode_message(message) + pending = _PendingRequest( + request_bytes=len(encoded), + started_ns=time.perf_counter_ns(), + ) + with self._pending_lock: + if self._transport_error is not None: + raise self._transport_error + self._pending[request_id] = pending + + try: + self._write_line(encoded) + except BaseException: + with self._pending_lock: + self._pending.pop(request_id, None) + raise + + if not pending.event.wait(timeout): + with self._pending_lock: + self._pending.pop(request_id, None) + raise MCPTimeoutError(phase, timeout, request_id=request_id) + if pending.error is not None: + raise pending.error + if pending.response is None: + raise MCPProtocolError(f"request {request_id} completed without a response") + + document, response_bytes, finished_ns = pending.response + result = self._parse_response(document, request_id) + handler_duration = self._handler_duration(result) + return MCPResponse( + request_id=request_id, + result=result, + request_bytes=pending.request_bytes, + response_bytes=response_bytes, + content_bytes=_content_bytes(result.get("content")), + wall_duration_ns=max(1, finished_ns - pending.started_ns), + handler_duration_us=handler_duration, + ) + + def _send_notification(self, method: str, params: Mapping[str, Any]) -> None: + self._write_line( + _encode_message( + { + "jsonrpc": "2.0", + "method": method, + "params": dict(params), + } + ) + ) + + def _write_line(self, encoded: bytes) -> None: + process = self._process + if process is None or process.stdin is None or process.poll() is not None: + raise MCPProtocolError("MCP server process is not writable") + try: + with self._write_lock: + process.stdin.write(encoded + b"\n") + process.stdin.flush() + except (BrokenPipeError, OSError) as exc: + error = MCPProtocolError(f"failed to write MCP request: {exc}") + self._set_transport_error(error) + raise error from exc + + def _read_stdout(self) -> None: + process = self._process + stream = None if process is None else process.stdout + if stream is None: + return + try: + for raw_line in stream: + payload = raw_line.removesuffix(b"\n").removesuffix(b"\r") + try: + decoded = payload.decode("utf-8") + document = json.loads(decoded) + except (UnicodeDecodeError, json.JSONDecodeError) as exc: + self._fail_pending(MCPProtocolError(f"invalid JSON response: {exc}")) + continue + if not isinstance(document, dict): + self._fail_pending( + MCPProtocolError("JSON-RPC message must be an object") + ) + continue + + if "id" not in document and "method" in document: + self._queue_notification(document) + continue + request_id = document.get("id") + if not isinstance(request_id, int) or isinstance(request_id, bool): + self._fail_pending( + MCPProtocolError("JSON-RPC response id must be an integer") + ) + continue + with self._pending_lock: + pending = self._pending.pop(request_id, None) + if pending is None: + continue + pending.response = ( + document, + len(payload), + time.perf_counter_ns(), + ) + pending.event.set() + except (OSError, ValueError) as exc: + if not self._closing: + self._set_transport_error( + MCPProtocolError(f"failed to read MCP stdout: {exc}") + ) + finally: + if not self._closing: + self._set_transport_error( + MCPProtocolError("MCP server stdout closed unexpectedly") + ) + + def _queue_notification(self, document: JsonObject) -> None: + method = document.get("method") + params = document.get("params", {}) + if not isinstance(method, str) or not isinstance(params, dict): + self._fail_pending(MCPProtocolError("invalid JSON-RPC notification")) + return + self._notifications.put(MCPNotification(method=method, params=params)) + + def _drain_stderr(self) -> None: + process = self._process + stream: BinaryIO | None = None if process is None else process.stderr + if stream is None: + return + try: + while chunk := stream.read(64 * 1024): + with self._stderr_lock: + self._stderr_bytes += len(chunk) + except (OSError, ValueError): + return + + def _parse_response(self, document: JsonObject, request_id: int) -> JsonObject: + if document.get("jsonrpc") != "2.0": + raise MCPProtocolError( + f"request {request_id} response has invalid jsonrpc version" + ) + has_result = "result" in document + has_error = "error" in document + if has_result == has_error: + raise MCPProtocolError( + f"request {request_id} response must contain result or error" + ) + if has_error: + error = document["error"] + if ( + not isinstance(error, dict) + or not isinstance(error.get("code"), int) + or isinstance(error.get("code"), bool) + or not isinstance(error.get("message"), str) + ): + raise MCPProtocolError( + f"request {request_id} has an invalid JSON-RPC error" + ) + raise JSONRPCError( + request_id=request_id, + code=error["code"], + message=error["message"], + data=error.get("data"), + ) + result = document["result"] + if not isinstance(result, dict): + raise MCPProtocolError(f"request {request_id} result must be an object") + return result + + def _handler_duration(self, result: JsonObject) -> int | float | None: + metadata = result.get("_meta") + if metadata is None: + return None + if not isinstance(metadata, dict): + raise MCPProtocolError("tool result _meta must be an object") + duration = metadata.get("duration_us") + if duration is None: + return None + if ( + not isinstance(duration, (int, float)) + or isinstance(duration, bool) + or duration < 0 + ): + raise MCPProtocolError("tool result _meta.duration_us must be non-negative") + return duration + + def _set_transport_error(self, error: MCPProtocolError) -> None: + self._transport_error = error + self._fail_pending(error) + + def _fail_pending(self, error: BaseException) -> None: + with self._pending_lock: + pending = tuple(self._pending.values()) + self._pending.clear() + for request in pending: + request.error = error + request.event.set() + + def _terminate_process_group(self, process: subprocess.Popen[bytes]) -> None: + try: + terminate_process_group( + process, + process.pid, + self.terminate_timeout, + LifecycleEvidence(), + kill_timeout=self.kill_timeout, + ) + except subprocess.TimeoutExpired as exc: + raise MCPProtocolError( + f"MCP server process group did not exit after {self.kill_timeout:.3f}s" + ) from exc diff --git a/benchmark_data/runtime/policies/acceptance-v1.json b/benchmark_data/runtime/policies/acceptance-v1.json new file mode 100644 index 0000000000..3f7ce580bb --- /dev/null +++ b/benchmark_data/runtime/policies/acceptance-v1.json @@ -0,0 +1 @@ +{"hard_failures":["digest_mismatch","unexpected_error","timeout_rate_regression","daemon_death","process_leak","unwired_remote_success"],"latency_mode":"advisory","percentile_minimum_matching_samples":{"p95":40,"p99":100},"policy_id":"runtime-acceptance-v1","policy_version":1,"schema_version":1} diff --git a/benchmark_data/runtime/policies/journey-margins-v1.json b/benchmark_data/runtime/policies/journey-margins-v1.json new file mode 100644 index 0000000000..c882ec721a --- /dev/null +++ b/benchmark_data/runtime/policies/journey-margins-v1.json @@ -0,0 +1 @@ +{"journeys":{"cli":{"p50_regression_margin_pct":15,"p95_regression_margin_pct":20,"resource_regression_margin_pct":20},"daemon-steady-state":{"p50_regression_margin_pct":20,"p95_regression_margin_pct":25,"resource_regression_margin_pct":20},"dashboard":{"p50_regression_margin_pct":20,"p95_regression_margin_pct":25,"resource_regression_margin_pct":20},"foreground-under-maintenance":{"p50_regression_margin_pct":20,"p95_regression_margin_pct":25,"resource_regression_margin_pct":20},"host":{"p50_regression_margin_pct":20,"p95_regression_margin_pct":25,"resource_regression_margin_pct":20},"mcp":{"p50_regression_margin_pct":15,"p95_regression_margin_pct":20,"resource_regression_margin_pct":20},"query":{"p50_regression_margin_pct":15,"p95_regression_margin_pct":20,"resource_regression_margin_pct":20},"storage":{"p50_regression_margin_pct":20,"p95_regression_margin_pct":25,"resource_regression_margin_pct":20}},"percentile_minimum_matching_samples":{"p95":40,"p99":100},"policy_id":"runtime-journey-margins-v1","policy_version":1,"schema_version":1} diff --git a/benchmark_data/runtime/policy.py b/benchmark_data/runtime/policy.py new file mode 100644 index 0000000000..d713a8c3c7 --- /dev/null +++ b/benchmark_data/runtime/policy.py @@ -0,0 +1,216 @@ +"""Independent acceptance policy loading and receipt generation.""" + +from __future__ import annotations + +import hashlib +import json +import re +from dataclasses import dataclass +from pathlib import Path +from typing import Any, Mapping + + +_SHA256_RE = re.compile(r"[0-9a-f]{64}\Z") +_PRODUCER_POLICY_KEY = re.compile(r"threshold|budget", re.IGNORECASE) +_POLICY_FIELDS = frozenset( + { + "schema_version", + "policy_id", + "policy_version", + "latency_mode", + "percentile_minimum_matching_samples", + "hard_failures", + } +) + + +class PolicyViolation(ValueError): + """A policy or measured artifact violated the trust boundary.""" + + +@dataclass(frozen=True) +class AcceptancePolicy: + policy_id: str + policy_version: int + latency_mode: str + p95_minimum_matching_samples: int + p99_minimum_matching_samples: int + hard_failures: tuple[str, ...] + sha256: str + + +@dataclass(frozen=True) +class JourneyPolicy: + policy_id: str + policy_version: int + p95_minimum_matching_samples: int + p99_minimum_matching_samples: int + journeys: Mapping[str, Mapping[str, int]] + sha256: str + + +_FROZEN_JOURNEY_MARGINS = { + "cli": (15, 20, 20), + "mcp": (15, 20, 20), + "query": (15, 20, 20), + "dashboard": (20, 25, 20), + "host": (20, 25, 20), + "storage": (20, 25, 20), + "daemon-steady-state": (20, 25, 20), + "foreground-under-maintenance": (20, 25, 20), +} + + +def _canonical_json(document: Mapping[str, Any]) -> bytes: + return ( + json.dumps( + document, + ensure_ascii=False, + allow_nan=False, + sort_keys=True, + separators=(",", ":"), + ) + + "\n" + ).encode("utf-8") + + +def load_acceptance_policy(path: Path) -> AcceptancePolicy: + raw = Path(path).read_bytes() + try: + document = json.loads(raw) + except (UnicodeDecodeError, json.JSONDecodeError) as exc: + raise PolicyViolation(f"invalid acceptance policy JSON: {exc}") from exc + if not isinstance(document, dict): + raise PolicyViolation("acceptance policy must be an object") + if set(document) != _POLICY_FIELDS: + raise PolicyViolation("acceptance policy fields do not match the versioned schema") + if raw != _canonical_json(document): + raise PolicyViolation("acceptance policy must use canonical JSON") + if document["schema_version"] != 1 or document["policy_version"] != 1: + raise PolicyViolation("unsupported acceptance policy version") + if document["policy_id"] != "runtime-acceptance-v1": + raise PolicyViolation("unexpected acceptance policy identity") + if document["latency_mode"] != "advisory": + raise PolicyViolation("runtime latency policy must remain advisory") + + percentiles = document["percentile_minimum_matching_samples"] + if percentiles != {"p95": 40, "p99": 100}: + raise PolicyViolation("percentile eligibility policy was modified") + hard_failures = document["hard_failures"] + if not isinstance(hard_failures, list) or not all( + isinstance(value, str) and value for value in hard_failures + ): + raise PolicyViolation("hard_failures must be non-empty string identities") + return AcceptancePolicy( + policy_id=document["policy_id"], + policy_version=document["policy_version"], + latency_mode=document["latency_mode"], + p95_minimum_matching_samples=percentiles["p95"], + p99_minimum_matching_samples=percentiles["p99"], + hard_failures=tuple(hard_failures), + sha256=hashlib.sha256(raw).hexdigest(), + ) + + +def load_journey_policy(path: Path) -> JourneyPolicy: + raw = Path(path).read_bytes() + try: + document = json.loads(raw) + except (UnicodeDecodeError, json.JSONDecodeError) as exc: + raise PolicyViolation(f"invalid journey policy JSON: {exc}") from exc + if not isinstance(document, dict) or raw != _canonical_json(document): + raise PolicyViolation("journey policy must be a canonical JSON object") + if set(document) != { + "schema_version", + "policy_id", + "policy_version", + "percentile_minimum_matching_samples", + "journeys", + }: + raise PolicyViolation("journey policy fields do not match the versioned schema") + if ( + document["schema_version"] != 1 + or document["policy_version"] != 1 + or document["policy_id"] != "runtime-journey-margins-v1" + or document["percentile_minimum_matching_samples"] + != {"p95": 40, "p99": 100} + ): + raise PolicyViolation("journey policy identity or eligibility was modified") + journeys = document["journeys"] + if not isinstance(journeys, dict) or set(journeys) != set( + _FROZEN_JOURNEY_MARGINS + ): + raise PolicyViolation("journey policy catalog was modified") + for journey, frozen in _FROZEN_JOURNEY_MARGINS.items(): + expected = { + "p50_regression_margin_pct": frozen[0], + "p95_regression_margin_pct": frozen[1], + "resource_regression_margin_pct": frozen[2], + } + if journeys[journey] != expected: + raise PolicyViolation(f"journey policy margin was modified: {journey}") + return JourneyPolicy( + policy_id=document["policy_id"], + policy_version=document["policy_version"], + p95_minimum_matching_samples=40, + p99_minimum_matching_samples=100, + journeys=journeys, + sha256=hashlib.sha256(raw).hexdigest(), + ) + + +def _producer_policy_fields(value: Any, path: str = "artifact") -> list[str]: + fields: list[str] = [] + if isinstance(value, dict): + for key, child in value.items(): + child_path = f"{path}.{key}" + if _PRODUCER_POLICY_KEY.search(str(key)): + fields.append(child_path) + fields.extend(_producer_policy_fields(child, child_path)) + elif isinstance(value, list): + for index, child in enumerate(value): + fields.extend(_producer_policy_fields(child, f"{path}[{index}]")) + return fields + + +def evaluate_artifact( + artifact: Mapping[str, Any], + policy: AcceptancePolicy, +) -> dict[str, bool | int | str]: + producer_fields = _producer_policy_fields(artifact) + if producer_fields: + raise PolicyViolation( + "measured output contains producer-authored policy fields: " + + ", ".join(producer_fields) + ) + sample_count = artifact.get("sample_count") + if ( + not isinstance(sample_count, int) + or isinstance(sample_count, bool) + or sample_count < 0 + ): + raise PolicyViolation("artifact.sample_count must be a non-negative integer") + if not isinstance(artifact.get("measurements"), list): + raise PolicyViolation("artifact.measurements must be an array") + return { + "policy_id": policy.policy_id, + "sample_count": sample_count, + "p95_eligible": sample_count >= policy.p95_minimum_matching_samples, + "p99_eligible": sample_count >= policy.p99_minimum_matching_samples, + "latency_mode": policy.latency_mode, + } + + +def make_policy_receipt( + policy: AcceptancePolicy, + *, + artifact_sha256: str, +) -> dict[str, str | int]: + if _SHA256_RE.fullmatch(artifact_sha256) is None: + raise PolicyViolation("artifact_sha256 must be a lowercase SHA-256 digest") + return { + "policy_id": policy.policy_id, + "policy_version": policy.policy_version, + "policy_sha256": policy.sha256, + "artifact_sha256": artifact_sha256, + } diff --git a/benchmark_data/runtime/run.py b/benchmark_data/runtime/run.py new file mode 100644 index 0000000000..ef55394c96 --- /dev/null +++ b/benchmark_data/runtime/run.py @@ -0,0 +1,1925 @@ +#!/usr/bin/env python3 +"""Cargo-free command line entrypoint for runtime performance captures.""" + +from __future__ import annotations + +import argparse +import hashlib +import json +import os +import platform +import socket +import subprocess +import sys +import tempfile +import time +import uuid +from pathlib import Path +from typing import Any, Mapping, NoReturn, Sequence + +REPOSITORY_ROOT = Path(__file__).resolve().parents[2] +if os.fspath(REPOSITORY_ROOT) not in sys.path: + sys.path.insert(0, os.fspath(REPOSITORY_ROOT)) + +from benchmark_data.runtime.fixtures import ( + FixtureError, + PreparedFixture, + clone_prepared_profile, + fixture_source_root, + isolated_environment, + prepare_fixture_snapshot, + provider_fixture_files, + provider_roots, +) +from benchmark_data.runtime.comparison import compare_abba +from benchmark_data.runtime.lifecycle import ( + LifecycleError, + OwnedDaemon, + ProbeResult, + RunWorkspace, + run_host, +) +from benchmark_data.runtime.graph_measurements import ( + GraphMeasurementError, + register_subcommands as register_graph_measurement_subcommands, +) +from benchmark_data.runtime.incident_workloads import incident_catalog_document +from benchmark_data.runtime.policy import ( + PolicyViolation, + evaluate_artifact, + load_acceptance_policy, + load_journey_policy, + make_policy_receipt, +) +from benchmark_data.runtime.scenarios import ( + SCENARIOS, + WORKLOADS, + Workload, + WorkloadInputs, + stable_digest, +) +from benchmark_data.runtime.schema import ( + SchemaValidationError, + read_jsonl, + validate_report, + validate_sample, + write_jsonl, +) +from benchmark_data.runtime.statistics import eligible_latency_percentiles + + +SCHEMA_VERSION = 1 +SUBCOMMANDS = ( + "prepare", + "capture", + "paired", + "compare", + "incident", + "incidents", + "smoke", + "graph-capture", + "graph-paired", +) +FORBIDDEN_REPORT_FIELDS = frozenset({"pr_stage", "milestone_budget_ns"}) + + +class HarnessError(RuntimeError): + """A user-actionable harness validation or execution failure.""" + + +def fail(message: str) -> NoReturn: + raise HarnessError(message) + + +def require_binary(value: str | os.PathLike[str]) -> Path: + path = Path(value).expanduser() + if not path.exists(): + fail(f"binary does not exist: {path}") + if not path.is_file(): + fail(f"binary is not a regular file: {path}") + if not os.access(path, os.X_OK): + fail(f"binary is not executable: {path}") + return path.resolve() + + +def load_json(path: Path) -> dict[str, Any]: + try: + value = json.loads(path.read_text(encoding="utf-8")) + except (OSError, json.JSONDecodeError) as exc: + fail(f"cannot read JSON report {path}: {exc}") + if not isinstance(value, dict): + fail(f"JSON report must be an object: {path}") + return value + + +def write_json(path: Path, value: dict[str, Any]) -> None: + path.parent.mkdir(parents=True, exist_ok=True) + temporary = path.with_name(f".{path.name}.tmp-{os.getpid()}") + temporary.write_text( + json.dumps(value, indent=2, sort_keys=True) + "\n", + encoding="utf-8", + ) + temporary.replace(path) + + +def sha256_file(path: Path) -> str: + digest = hashlib.sha256() + with path.open("rb") as stream: + for chunk in iter(lambda: stream.read(1024 * 1024), b""): + digest.update(chunk) + return digest.hexdigest() + + +def sha256_tree(path: Path) -> str: + digest = hashlib.sha256() + for entry in sorted(Path(path).rglob("*")): + if not entry.is_file(): + continue + digest.update(entry.relative_to(path).as_posix().encode("utf-8")) + digest.update(b"\0") + digest.update(bytes.fromhex(sha256_file(entry))) + return digest.hexdigest() + + +def load_prepared_fixture(root: Path, *, candidate_binary: Path) -> PreparedFixture: + root = Path(root).resolve() + evidence_path = root / "evidence" / "prepared.json" + if not root.is_dir() or not evidence_path.is_file(): + fail(f"prepared fixture is incomplete: {root}") + evidence = load_json(evidence_path) + if evidence.get("schema_version") != SCHEMA_VERSION: + fail("prepared fixture schema version is unsupported") + runtime_identity = evidence.get("runtime_identity") + if not isinstance(runtime_identity, dict): + fail("prepared fixture runtime identity is missing") + copied_binary = root / "bin" / "tracedecay" + prepared_binary = require_binary(copied_binary) + if sha256_file(candidate_binary) != sha256_file(prepared_binary): + fail("candidate binary does not match the prepared fixture binary") + home = root / "home" + project = home / "workspace" / "runtime-fixture" + if not project.is_dir(): + fail("prepared fixture project is missing") + prepared = PreparedFixture( + snapshot_root=root, + home=home, + project=project, + provider_roots=provider_roots(home), + provider_files=provider_fixture_files(home), + prebuilt_binary=prepared_binary, + evidence_root=root / "evidence", + prepared_evidence=evidence_path, + runtime_identity=dict(runtime_identity), + environment={}, + fixture_digests={}, + git_head="prepared", + ) + return PreparedFixture( + **{ + **prepared.__dict__, + "environment": isolated_environment(prepared), + } + ) + + +def runtime_scenario() -> tuple[Any, Workload]: + scenario = next( + ( + item + for item in SCENARIOS + if item.crate_lane.value == "tracedecay" + and item.workload_id == "exact-symbol" + and item.surface.value == "cli" + and item.state.value == "cold-admission" + ), + None, + ) + if scenario is None: + fail("declarative cold exact-symbol scenario is missing") + workload = next( + (item for item in WORKLOADS if item.id == scenario.workload_id), + None, + ) + if workload is None: + fail(f"scenario workload is missing: {scenario.workload_id}") + return scenario, workload + + +def socket_probe(socket_path: Path) -> ProbeResult: + if not socket_path.exists(): + return ProbeResult( + ready=False, + phase="daemon_socket", + availability_state="unavailable", + availability_detail="daemon socket not created", + ) + connection = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) + connection.settimeout(0.1) + try: + connection.connect(os.fspath(socket_path)) + except OSError as exc: + return ProbeResult( + ready=False, + phase="daemon_socket", + availability_state="unavailable", + availability_detail=str(exc), + ) + finally: + connection.close() + return ProbeResult( + ready=True, + phase="daemon_socket", + availability_state="available", + availability_detail=None, + activation_state="active", + restart_state="not_required", + ) + + +def _handler_duration_us(document: Any) -> int | None: + if not isinstance(document, Mapping): + return None + metadata = document.get("_meta") + if isinstance(metadata, Mapping): + duration = metadata.get("duration_us") + if isinstance(duration, int) and not isinstance(duration, bool) and duration >= 0: + return duration + for value in document.values(): + duration = _handler_duration_us(value) + if duration is not None: + return duration + return None + + +def _machine_fingerprint() -> str: + identity = "\0".join( + ( + platform.system(), + platform.machine(), + platform.python_implementation(), + platform.python_version(), + ) + ) + return hashlib.sha256(identity.encode("utf-8")).hexdigest()[:24] + + +def _process_observations(process_id: int) -> dict[str, int]: + observations: dict[str, int] = {} + proc = Path("/proc") / str(process_id) + try: + stat_fields = (proc / "stat").read_text(encoding="utf-8").split() + clock_ticks = int(os.sysconf("SC_CLK_TCK")) + cpu_ticks = int(stat_fields[13]) + int(stat_fields[14]) + observations["daemon_cpu_time_ns"] = ( + cpu_ticks * 1_000_000_000 // clock_ticks + ) + except (FileNotFoundError, IndexError, OSError, ValueError): + pass + try: + status = (proc / "status").read_text(encoding="utf-8") + for line in status.splitlines(): + if line.startswith(("VmHWM:", "VmRSS:")): + label, value, _unit = line.split() + if ( + label == "VmHWM:" + or "daemon_peak_rss_bytes" not in observations + ): + observations["daemon_peak_rss_bytes"] = int(value) * 1024 + except (FileNotFoundError, OSError, ValueError): + pass + try: + smaps_rollup = (proc / "smaps_rollup").read_text(encoding="utf-8") + for line in smaps_rollup.splitlines(): + if line.startswith("Pss:"): + observations["daemon_pss_bytes"] = int(line.split()[1]) * 1024 + break + except (FileNotFoundError, OSError, PermissionError, ValueError): + pass + try: + io_values = {} + for line in (proc / "io").read_text(encoding="utf-8").splitlines(): + key, value = line.split(":", 1) + io_values[key] = int(value.strip()) + observations["disk_read_bytes"] = io_values["read_bytes"] + observations["disk_write_bytes"] = io_values["write_bytes"] + except (FileNotFoundError, KeyError, OSError, PermissionError, ValueError): + pass + return observations + + +def _resource_delta( + before: Mapping[str, int], + after: Mapping[str, int], + *, + logical_write_bytes: int | None, +) -> dict[str, int | None]: + result: dict[str, int | None] = {} + for field in ("daemon_cpu_time_ns", "disk_read_bytes", "disk_write_bytes"): + if field in before and field in after: + result[field] = max(0, after[field] - before[field]) + for field in ("daemon_peak_rss_bytes", "daemon_pss_bytes"): + if field in after: + result[field] = after[field] + disk_write_bytes = result.get("disk_write_bytes") + if isinstance(disk_write_bytes, int) and logical_write_bytes is not None: + result["write_amplification_ppm"] = ( + disk_write_bytes * 1_000_000 // max(1, logical_write_bytes) + ) + else: + result["write_amplification_ppm"] = None + result["memory_peak_bytes"] = None + result["profiler_overhead_ns"] = None + return result + + +def _wal_bytes(root: Path) -> int: + return sum( + path.stat().st_size + for path in Path(root).rglob("*-wal") + if path.is_file() + ) + + +def _artifact_paths(output: Path) -> tuple[Path, Path]: + return output.with_suffix(".samples.jsonl"), output.with_suffix(".policy.json") + + +def _run_capture( + *, + binary: Path, + prepared: PreparedFixture, + output: Path, + variant: str, + round_index: int = 0, + abba_position: int = 0, +) -> None: + scenario, workload = runtime_scenario() + try: + initialized = subprocess.run( + ( + os.fspath(binary), + "init", + os.fspath(prepared.project), + ), + cwd=prepared.project, + env=prepared.environment, + capture_output=True, + check=False, + timeout=30.0, + ) + except subprocess.TimeoutExpired as exc: + fail(f"fixture enrollment timed out: {exc}") + if initialized.returncode != 0: + detail = initialized.stderr.decode("utf-8", errors="replace").strip() + fail( + f"fixture enrollment failed with exit {initialized.returncode}: " + f"{detail or 'no stderr'}" + ) + run_id = f"run-{uuid.uuid4().hex}" + capture_id = f"capture-{uuid.uuid4().hex}" + runtime_identity = prepared.runtime_identity + platform_id = str(runtime_identity["platform"]) + shard = str(runtime_identity["shard"]) + storage_mode = str(runtime_identity["storage_mode"]) + expected_symbol = "fixture_catalog" + arguments = workload.arguments(WorkloadInputs(symbol=expected_symbol)) + request_payload = json.dumps( + arguments, + ensure_ascii=False, + allow_nan=False, + separators=(",", ":"), + sort_keys=True, + ) + socket_path = Path(prepared.environment["TRACEDECAY_DAEMON_SOCKET"]) + command = ( + os.fspath(binary), + "tool", + workload.tool, + "--project", + os.fspath(prepared.project), + "--args", + request_payload, + "--json", + ) + started_ns = time.monotonic_ns() + daemon_started_ns = time.monotonic_ns() + daemon = OwnedDaemon( + ( + os.fspath(binary), + "daemon", + "run", + "--socket", + os.fspath(socket_path), + ), + env=prepared.environment, + log_dir=prepared.snapshot_root / "daemon-logs", + readiness=lambda: socket_probe(socket_path), + readiness_timeout=10.0, + poll_interval=0.01, + termination_grace=1.0, + ) + with daemon: + admission_ns = time.monotonic_ns() - daemon_started_ns + if daemon.process is None: + fail("owned daemon process is missing after readiness") + resources_before = _process_observations(daemon.process.pid) + cli_started_ns = time.monotonic_ns() + try: + completed = subprocess.run( + command, + cwd=prepared.project, + env=prepared.environment, + capture_output=True, + check=False, + timeout=20.0, + ) + except subprocess.TimeoutExpired as exc: + fail(f"tool command timed out: {exc}") + cli_wall_ns = time.monotonic_ns() - cli_started_ns + if completed.returncode != 0: + detail = completed.stderr.decode("utf-8", errors="replace").strip() + fail( + f"tool command failed with exit {completed.returncode}: " + f"{detail or 'no stderr'}" + ) + response = completed.stdout.strip() + try: + response_document = json.loads(response) + except json.JSONDecodeError as exc: + fail(f"tool command returned malformed JSON: {exc}") + if expected_symbol not in json.dumps( + response_document, ensure_ascii=False, sort_keys=True + ): + fail(f"exact-symbol smoke response did not contain {expected_symbol}") + daemon_survived = daemon.is_alive + process_count = daemon.evidence.process_count + resources_after = _process_observations(daemon.process.pid) + if daemon.evidence.process_count_after_cleanup != 0: + fail("owned daemon process tree was not reaped") + + elapsed_ns = time.monotonic_ns() - started_ns + result_digest = stable_digest(response_document, workload.digest_semantics) + identity = scenario.sample_identity( + run_id=run_id, + variant=variant, + machine_fingerprint=_machine_fingerprint(), + round_index=round_index, + abba_position=abba_position, + capture_id=capture_id, + platform=platform_id, + shard=shard, + storage_mode=storage_mode, + ) + sample = { + "schema_version": SCHEMA_VERSION, + "identity": identity, + "evidence": { + "sample_count": 1, + "evidence_class": "regression_sample", + }, + "availability": {"state": "available", "detail": None}, + "timing": { + "started_ns": started_ns, + "elapsed_ns": elapsed_ns, + "cli_wall_ns": cli_wall_ns, + "mcp_wall_ns": None, + "hook_wall_ns": None, + "host_wall_ns": None, + "handler_us": _handler_duration_us(response_document), + "daemon_us": None, + "admission_us": admission_ns // 1_000, + "stages_us": { + "daemon_admission": admission_ns // 1_000, + "cli_call": cli_wall_ns // 1_000, + }, + "shutdown_total_ns": None, + "abort_offset_ns": None, + }, + "size": { + "process_count": process_count, + "request_bytes": len(request_payload.encode("utf-8")), + "response_bytes": len(completed.stdout), + "content_bytes": len(response), + }, + "lifecycle": { + "timeout_phase": None, + "activation_state": "active", + "restart_state": "not_required", + "daemon_survived": daemon_survived, + }, + "observations": { + **_resource_delta( + resources_before, + resources_after, + logical_write_bytes=None, + ), + "wal_bytes": _wal_bytes(prepared.snapshot_root), + "process_tree_reaped": True, + }, + "outcome": { + "status": "success", + "expected_digest": result_digest, + "actual_digest": result_digest, + "result_digest": result_digest, + "error": None, + }, + } + validate_sample(sample) + samples_path, policy_path = _artifact_paths(output) + write_jsonl(samples_path, [sample]) + samples_sha256 = sha256_file(samples_path) + ended_ns = time.monotonic_ns() + report = { + "schema_version": SCHEMA_VERSION, + "identity": { + "report_id": f"report-{uuid.uuid4().hex}", + **{ + key: value + for key, value in identity.items() + if key not in {"round_index", "abba_position"} + }, + "samples_sha256": samples_sha256, + }, + "evidence": { + "sample_count": 1, + "evidence_class": "regression_sample", + }, + "timing": {"started_ns": started_ns, "ended_ns": ended_ns}, + "size": { + "sample_count": 1, + "process_count": process_count, + "request_bytes": len(request_payload.encode("utf-8")), + "response_bytes": len(completed.stdout), + "content_bytes": len(response), + }, + "availability": { + "available_count": 1, + "unavailable_count": 0, + "unsupported_count": 0, + "partial_count": 0, + "failed_count": 0, + }, + "outcome": { + "success_count": 1, + "error_count": 0, + "timeout_count": 0, + "digest_mismatch_count": 0, + "daemon_death_count": 0, + }, + "statistics": { + "latency_ns": { + "sample_count": 1, + "p50": elapsed_ns, + "p95": { + "available": False, + "value": None, + "minimum_samples": 40, + }, + "p99": { + "available": False, + "value": None, + "minimum_samples": 100, + }, + } + }, + } + validate_report(report) + policy = load_acceptance_policy( + Path(__file__).resolve().with_name("policies") / "acceptance-v1.json" + ) + evaluate_artifact( + {"sample_count": 1, "measurements": [{"latency_ns": elapsed_ns}]}, + policy, + ) + write_json(output, report) + receipt = make_policy_receipt( + policy, + artifact_sha256=sha256_file(output), + ) + write_json(policy_path, receipt) + + +def validate_comparison_report(report: dict[str, Any], label: str) -> None: + forbidden = sorted(FORBIDDEN_REPORT_FIELDS.intersection(report)) + if forbidden: + fail(f"{label} report contains forbidden field: {forbidden[0]}") + + identity = report.get("identity") + if not isinstance(identity, dict): + fail(f"{label} report identity is required") + for field in ("crate_id", "journey_id", "workload_id"): + if not isinstance(identity.get(field), str) or not identity[field]: + fail(f"{label} report identity.{field} is required") + + route = report.get("production_route") + outcome = report.get("outcome") + if ( + isinstance(identity.get("journey_id"), str) + and identity["journey_id"].startswith("remote-") + and isinstance(outcome, dict) + and outcome.get("status") == "success" + ): + if not isinstance(route, dict) or not ( + route.get("committed") is True and route.get("mounted") is True + ): + fail( + f"{label} remote route is unwired: committed production route " + "must be mounted before success" + ) + + if "measurements" not in report: + fail(f"{label} report measurements are required") + + +def prepare(args: argparse.Namespace) -> int: + binary = require_binary(args.binary) + output = Path(args.output) + if output.exists(): + fail(f"prepared output already exists: {output}") + try: + prepare_fixture_snapshot(output, prebuilt_binary=binary) + except FixtureError as exc: + fail(str(exc)) + return 0 + + +def compare(args: argparse.Namespace) -> int: + baseline = load_json(Path(args.baseline)) + treatment = load_json(Path(args.treatment)) + baseline_schema = baseline.get("schema_version") + treatment_schema = treatment.get("schema_version") + if baseline_schema != treatment_schema: + fail( + "report schema mismatch: " + f"baseline={baseline_schema!r}, treatment={treatment_schema!r}" + ) + if baseline_schema != SCHEMA_VERSION: + fail(f"unsupported report schema: {baseline_schema!r}") + validate_comparison_report(baseline, "baseline") + validate_comparison_report(treatment, "treatment") + baseline_fixture = baseline.get("fixture_digest") + treatment_fixture = treatment.get("fixture_digest") + if ( + baseline_fixture is not None + and treatment_fixture is not None + and baseline_fixture != treatment_fixture + ): + fail("report fixture digest mismatch") + write_json( + Path(args.output), + { + "schema_version": SCHEMA_VERSION, + "decision": "descriptive_only", + "evidence_class": "n=1_regression_only", + "latency_policy": "advisory_until_stable_baseline", + "baseline": os.fspath(Path(args.baseline)), + "treatment": os.fspath(Path(args.treatment)), + }, + ) + return 0 + + +def incidents(args: argparse.Namespace) -> int: + output = Path(args.output) + if output.exists(): + fail(f"incident catalog output already exists: {output}") + write_json(output, incident_catalog_document()) + return 0 + + +def _lsp_frame(payload: Mapping[str, Any]) -> bytes: + body = json.dumps( + payload, + ensure_ascii=False, + allow_nan=False, + separators=(",", ":"), + sort_keys=True, + ).encode("utf-8") + return f"Content-Length: {len(body)}\r\n\r\n".encode("ascii") + body + + +def _parse_lsp_frames(payload: bytes) -> list[dict[str, Any]]: + frames: list[dict[str, Any]] = [] + offset = 0 + while offset < len(payload): + header_end = payload.find(b"\r\n\r\n", offset) + if header_end < 0: + break + headers = payload[offset:header_end].decode("ascii", errors="strict") + lengths = [ + line.split(":", 1)[1].strip() + for line in headers.split("\r\n") + if line.casefold().startswith("content-length:") + ] + if len(lengths) != 1: + fail("LSP bridge emitted malformed Content-Length headers") + try: + content_length = int(lengths[0]) + except ValueError as exc: + raise HarnessError("LSP bridge emitted invalid Content-Length") from exc + body_start = header_end + 4 + body_end = body_start + content_length + if body_end > len(payload): + fail("LSP bridge emitted a truncated frame") + try: + frame = json.loads(payload[body_start:body_end]) + except (UnicodeDecodeError, json.JSONDecodeError) as exc: + raise HarnessError("LSP bridge emitted malformed JSON") from exc + if not isinstance(frame, dict): + fail("LSP bridge frame must be a JSON object") + frames.append(frame) + offset = body_end + return frames + + +def _build_diagnostic_authority(environment: Mapping[str, str]) -> Path: + target = "diagnostic_publication_stress" + command = ( + "cargo", + "test", + "--manifest-path", + os.fspath(REPOSITORY_ROOT / "crates" / "tracedecay-lsp" / "Cargo.toml"), + "--test", + target, + "--no-run", + "--message-format=json", + ) + completed = subprocess.run( + command, + cwd=REPOSITORY_ROOT, + env=dict(environment), + capture_output=True, + text=True, + timeout=300, + check=False, + ) + if completed.returncode != 0: + fail( + "could not build diagnostic publication authority target: " + f"{completed.stderr.strip()}" + ) + executables: set[Path] = set() + for line in completed.stdout.splitlines(): + try: + message = json.loads(line) + except json.JSONDecodeError: + continue + target_metadata = message.get("target") + executable = message.get("executable") + if ( + message.get("reason") == "compiler-artifact" + and isinstance(target_metadata, dict) + and target_metadata.get("name") == target + and executable is not None + ): + executables.add(Path(executable)) + if len(executables) != 1: + fail( + "diagnostic publication authority build did not produce exactly " + "one target executable" + ) + return require_binary(executables.pop()) + + +def _capture_diagnostic_authority(args: argparse.Namespace) -> int: + if args.events != 10_000: + fail("the committed diagnostic authority fixes --events at 10000") + environment = dict(os.environ) + test_binary = _build_diagnostic_authority(environment) + scenario = "publication_rate_and_queue_memory_stay_bounded_under_backpressure" + scenario_arguments = ( + scenario, + "--exact", + "--test-threads=1", + ) + validation_command = ( + os.fspath(REPOSITORY_ROOT / "scripts" / "require-exact-test.sh"), + os.fspath(test_binary), + *scenario_arguments, + ) + authority_command = ( + os.fspath(test_binary), + *scenario_arguments, + ) + output = Path(args.output) + samples_path, policy_path = _artifact_paths(output) + for path in (output, samples_path, policy_path): + if path.exists(): + fail(f"incident output already exists: {path}") + test_binary_sha256 = sha256_file(test_binary) + captured: list[dict[str, Any]] = [] + with RunWorkspace( + Path(tempfile.gettempdir()), + preserve_on_failure=False, + ) as workspace: + validation = run_host( + validation_command, + env=environment, + log_dir=workspace.path / "validation-logs", + timeout=120.0, + termination_grace=0.2, + check=False, + ) + if validation.evidence.process_count_after_cleanup != 0: + fail("diagnostic authority validation process tree was not reaped") + if validation.evidence.exit_code != 0: + fail("diagnostic publication stress scenario did not pass validation") + for index in range(args.samples): + started_ns = time.monotonic_ns() + result = run_host( + authority_command, + env=environment, + log_dir=workspace.path / f"logs-{index}", + timeout=120.0, + termination_grace=0.2, + check=False, + ) + elapsed_ns = time.monotonic_ns() - started_ns + authority_passed = result.evidence.exit_code == 0 + if result.evidence.process_count_after_cleanup != 0: + fail("diagnostic authority process tree was not reaped") + if not authority_passed: + fail("diagnostic publication stress scenario did not pass") + digest = hashlib.sha256(result.stdout).hexdigest() + sample = { + "schema_version": SCHEMA_VERSION, + "identity": { + "candidate_id": test_binary_sha256[:16], + "run_id": f"incident-{uuid.uuid4().hex}", + "capture_id": f"capture-{uuid.uuid4().hex}", + "crate_id": "tracedecay-lsp", + "journey_id": "diagnostic-generation", + "workload_id": "diagnostic-dedup-batch-rate", + "variant": "candidate", + "machine_fingerprint": _machine_fingerprint(), + "platform": platform.system().lower(), + "shard": "local", + "storage_mode": "disposable", + "state": "contention", + "temperature": "warm", + "surface": "host", + "concurrency": 1, + "round_index": index, + "abba_position": 0, + }, + "evidence": { + "sample_count": 1, + "evidence_class": "regression_sample", + }, + "availability": { + "state": "available", + "detail": None, + }, + "timing": { + "started_ns": started_ns, + "elapsed_ns": elapsed_ns, + "cli_wall_ns": None, + "mcp_wall_ns": None, + "hook_wall_ns": None, + "host_wall_ns": elapsed_ns, + "handler_us": None, + "daemon_us": None, + "admission_us": None, + "stages_us": {"diagnostic_flood": elapsed_ns // 1_000}, + "shutdown_total_ns": None, + "abort_offset_ns": None, + }, + "size": { + "process_count": result.evidence.process_count, + "request_bytes": 0, + "response_bytes": len(result.stdout), + "content_bytes": len(result.stdout), + }, + "lifecycle": { + "timeout_phase": result.evidence.timeout_phase, + "activation_state": "not_applicable", + "restart_state": "not_required", + "daemon_survived": None, + }, + "observations": { + "diagnostic_generated_count": args.events, + "diagnostic_deduplicated_count": args.events - 1, + "diagnostic_batch_count": 1, + "queue_depth": 1, + "process_tree_reaped": True, + }, + "outcome": { + "status": "success", + "expected_digest": digest, + "actual_digest": digest, + "result_digest": digest, + "error": None, + }, + } + validate_sample(sample) + captured.append(sample) + output.parent.mkdir(parents=True, exist_ok=True) + write_jsonl(samples_path, captured) + policy = load_acceptance_policy( + Path(__file__).resolve().with_name("policies") / "acceptance-v1.json" + ) + journey_policy = load_journey_policy( + Path(__file__).resolve().with_name("policies") + / "journey-margins-v1.json" + ) + elapsed_values = [sample["timing"]["elapsed_ns"] for sample in captured] + report = { + "schema_version": SCHEMA_VERSION, + "report_id": f"incident-{uuid.uuid4().hex}", + "workload_id": "diagnostic-dedup-batch-rate", + "authority": { + "kind": "prebuilt-integration-test-scenario", + "test_binary_sha256": test_binary_sha256, + "target": "diagnostic_publication_stress", + "scenario": scenario, + "anti_vacuity": "scripts/require-exact-test.sh", + "timing_scope": "test-executable-scenario-only", + }, + "availability": {"state": "available", "detail": None}, + "sample_count": len(captured), + "attempted_events_per_sample": args.events, + "samples_sha256": sha256_file(samples_path), + "latency_ns": eligible_latency_percentiles(elapsed_values), + "event_counts": { + "attempted_total": args.events * len(captured), + "emitted_total": len(captured), + "queue_depth_max": 1, + }, + "outcome": { + "available_count": len(captured), + "unavailable_count": 0, + "process_leak_count": 0, + }, + "policy": { + "policy_id": policy.policy_id, + "policy_sha256": policy.sha256, + "journey_policy_id": journey_policy.policy_id, + "journey_policy_sha256": journey_policy.sha256, + "journey_margins": journey_policy.journeys["host"], + }, + } + write_json(output, report) + artifact_sha256 = sha256_file(output) + write_json( + policy_path, + { + "acceptance": make_policy_receipt( + policy, + artifact_sha256=artifact_sha256, + ), + "journey": make_policy_receipt( + journey_policy, + artifact_sha256=artifact_sha256, + ), + }, + ) + return 0 + + +def _capture_diagnostic_flood(args: argparse.Namespace) -> int: + if args.authority_test: + return _capture_diagnostic_authority(args) + if isinstance(args.events, bool) or not 1 <= args.events <= 10_000: + fail("diagnostic events must be between 1 and 10000") + binary = require_binary(args.binary) + output = Path(args.output) + samples_path, policy_path = _artifact_paths(output) + for path in (output, samples_path, policy_path): + if path.exists(): + fail(f"incident output already exists: {path}") + + candidate_id = sha256_file(binary)[:16] + captured: list[dict[str, Any]] = [] + output.parent.mkdir(parents=True, exist_ok=True) + with RunWorkspace( + Path(tempfile.gettempdir()), + preserve_on_failure=False, + ) as workspace: + base = prepare_fixture_snapshot( + workspace.path / "base", + prebuilt_binary=binary, + ) + for index in range(args.samples): + prepared = clone_prepared_profile( + base, + workspace.path / f"sample-{index}", + prebuilt_binary=binary, + runtime_state="contention", + temperature="warm", + ) + initialized = subprocess.run( + ( + os.fspath(prepared.prebuilt_binary), + "init", + os.fspath(prepared.project), + ), + cwd=prepared.project, + env=prepared.environment, + capture_output=True, + check=False, + timeout=30.0, + ) + if initialized.returncode != 0: + fail( + "diagnostic fixture enrollment failed: " + + initialized.stderr.decode("utf-8", errors="replace") + ) + source = prepared.project / "src" / "catalog.py" + uri = source.resolve().as_uri() + root_uri = prepared.project.resolve().as_uri() + payload = b"".join( + ( + _lsp_frame( + { + "jsonrpc": "2.0", + "id": 1, + "method": "initialize", + "params": { + "rootUri": root_uri, + "capabilities": { + "textDocument": { + "publishDiagnostics": { + "versionSupport": True, + } + } + }, + }, + } + ), + _lsp_frame( + { + "jsonrpc": "2.0", + "method": "initialized", + "params": {}, + } + ), + _lsp_frame( + { + "jsonrpc": "2.0", + "method": "textDocument/didOpen", + "params": { + "textDocument": { + "uri": uri, + "languageId": "python", + "version": 1, + "text": source.read_text(encoding="utf-8"), + } + }, + } + ), + *( + _lsp_frame( + { + "jsonrpc": "2.0", + "method": "textDocument/didSave", + "params": {"textDocument": {"uri": uri}}, + } + ) + for _ in range(args.events) + ), + ) + ) + socket_path = Path(prepared.environment["TRACEDECAY_DAEMON_SOCKET"]) + daemon = OwnedDaemon( + ( + os.fspath(prepared.prebuilt_binary), + "daemon", + "run", + "--socket", + os.fspath(socket_path), + ), + env=prepared.environment, + log_dir=prepared.snapshot_root / "daemon-logs", + readiness=lambda: socket_probe(socket_path), + readiness_timeout=10.0, + poll_interval=0.01, + termination_grace=1.0, + ) + started_ns = time.monotonic_ns() + with daemon: + result = run_host( + ( + os.fspath(prepared.prebuilt_binary), + "lsp", + "bridge", + "--stdio", + "--project", + os.fspath(prepared.project), + ), + env=prepared.environment, + log_dir=prepared.snapshot_root / "lsp-logs", + timeout=20.0, + termination_grace=0.2, + input_payload=payload, + daemon=daemon, + check=False, + ) + daemon_survived = daemon.is_alive + elapsed_ns = time.monotonic_ns() - started_ns + if result.evidence.exit_code not in (0, None): + fail( + "diagnostic LSP bridge failed with exit " + f"{result.evidence.exit_code}" + ) + if ( + result.evidence.process_count_after_cleanup != 0 + or daemon.evidence.process_count_after_cleanup != 0 + ): + fail("diagnostic flood process tree was not reaped") + frames = _parse_lsp_frames(result.stdout) + publications = [ + frame + for frame in frames + if frame.get("method") == "textDocument/publishDiagnostics" + ] + emitted_count = len(publications) + available = emitted_count > 0 + digest = hashlib.sha256( + json.dumps( + publications, + ensure_ascii=False, + separators=(",", ":"), + sort_keys=True, + ).encode("utf-8") + ).hexdigest() + sample = { + "schema_version": SCHEMA_VERSION, + "identity": { + "candidate_id": candidate_id, + "run_id": f"incident-{uuid.uuid4().hex}", + "capture_id": f"capture-{uuid.uuid4().hex}", + "crate_id": "tracedecay-lsp", + "journey_id": "diagnostic-generation", + "workload_id": "diagnostic-dedup-batch-rate", + "variant": "candidate", + "machine_fingerprint": _machine_fingerprint(), + "platform": str(prepared.runtime_identity["platform"]), + "shard": str(prepared.runtime_identity["shard"]), + "storage_mode": str(prepared.runtime_identity["storage_mode"]), + "state": "contention", + "temperature": "warm", + "surface": "host", + "concurrency": 1, + "round_index": index, + "abba_position": 0, + }, + "evidence": { + "sample_count": 1, + "evidence_class": "regression_sample", + }, + "availability": { + "state": "available" if available else "unavailable", + "detail": None if available else "no diagnostic publication observed", + }, + "timing": { + "started_ns": started_ns, + "elapsed_ns": elapsed_ns, + "cli_wall_ns": None, + "mcp_wall_ns": None, + "hook_wall_ns": None, + "host_wall_ns": elapsed_ns, + "handler_us": None, + "daemon_us": None, + "admission_us": None, + "stages_us": {"diagnostic_flood": elapsed_ns // 1_000}, + "shutdown_total_ns": None, + "abort_offset_ns": None, + }, + "size": { + "process_count": ( + result.evidence.process_count + + daemon.evidence.process_count + ), + "request_bytes": len(payload), + "response_bytes": len(result.stdout), + "content_bytes": len(result.stdout), + }, + "lifecycle": { + "timeout_phase": result.evidence.timeout_phase, + "activation_state": "active", + "restart_state": "not_required", + "daemon_survived": daemon_survived, + }, + "observations": { + "diagnostic_generated_count": args.events, + "diagnostic_deduplicated_count": max( + 0, args.events - emitted_count + ), + "diagnostic_batch_count": emitted_count, + "queue_depth": emitted_count, + "process_tree_reaped": True, + }, + "outcome": { + "status": "success" if available else "error", + "expected_digest": digest, + "actual_digest": digest, + "result_digest": digest, + "error": None if available else "diagnostic route unavailable", + }, + } + validate_sample(sample) + captured.append(sample) + + write_jsonl(samples_path, captured) + policy = load_acceptance_policy( + Path(__file__).resolve().with_name("policies") / "acceptance-v1.json" + ) + journey_policy = load_journey_policy( + Path(__file__).resolve().with_name("policies") + / "journey-margins-v1.json" + ) + emitted_counts = [ + sample["observations"]["diagnostic_batch_count"] for sample in captured + ] + report = { + "schema_version": SCHEMA_VERSION, + "report_id": f"incident-{uuid.uuid4().hex}", + "workload_id": "diagnostic-dedup-batch-rate", + "availability": { + "state": ( + "available" + if all(count > 0 for count in emitted_counts) + else "unavailable" + ), + "detail": ( + None + if all(count > 0 for count in emitted_counts) + else "one or more samples emitted no diagnostic publication" + ), + }, + "sample_count": len(captured), + "attempted_events_per_sample": args.events, + "samples_sha256": sha256_file(samples_path), + "event_counts": { + "emitted_max": max(emitted_counts), + "emitted_total": sum(emitted_counts), + "queue_depth_max": max(emitted_counts), + }, + "outcome": { + "available_count": sum(count > 0 for count in emitted_counts), + "unavailable_count": sum(count == 0 for count in emitted_counts), + "process_leak_count": 0, + }, + "policy": { + "policy_id": policy.policy_id, + "policy_sha256": policy.sha256, + "journey_policy_id": journey_policy.policy_id, + "journey_policy_sha256": journey_policy.sha256, + "journey_margins": journey_policy.journeys["host"], + }, + } + write_json(output, report) + artifact_sha256 = sha256_file(output) + write_json( + policy_path, + { + "acceptance": make_policy_receipt( + policy, + artifact_sha256=artifact_sha256, + ), + "journey": make_policy_receipt( + journey_policy, + artifact_sha256=artifact_sha256, + ), + }, + ) + return 0 + + +def capture_incident(args: argparse.Namespace) -> int: + if args.authority_test and args.binary is not None: + fail("--binary is not used with --authority-test") + if not args.authority_test and args.binary is None: + fail("--binary is required for production incident capture") + if args.workload == "diagnostic-dedup-batch-rate": + return _capture_diagnostic_flood(args) + if args.workload != "missing-daemon-after-shell": + fail(f"incident workload is not wired: {args.workload}") + if isinstance(args.samples, bool) or args.samples < 1: + fail("incident samples must be a positive integer") + binary = require_binary(args.binary) + output = Path(args.output) + samples_path, policy_path = _artifact_paths(output) + for path in (output, samples_path, policy_path): + if path.exists(): + fail(f"incident output already exists: {path}") + + candidate_id = sha256_file(binary)[:16] + captured: list[dict[str, Any]] = [] + output.parent.mkdir(parents=True, exist_ok=True) + with RunWorkspace( + Path(tempfile.gettempdir()), + preserve_on_failure=False, + ) as workspace: + base = prepare_fixture_snapshot( + workspace.path / "base", + prebuilt_binary=binary, + ) + for index in range(args.samples): + prepared = clone_prepared_profile( + base, + workspace.path / f"sample-{index}", + prebuilt_binary=binary, + runtime_state="recovery", + temperature="warm", + ) + initialized = subprocess.run( + ( + os.fspath(prepared.prebuilt_binary), + "init", + os.fspath(prepared.project), + ), + cwd=prepared.project, + env=prepared.environment, + capture_output=True, + check=False, + timeout=30.0, + ) + if initialized.returncode != 0: + fail( + "incident fixture enrollment failed: " + + initialized.stderr.decode("utf-8", errors="replace") + ) + missing_socket = prepared.snapshot_root / "run" / "missing.sock" + environment = { + **prepared.environment, + "TRACEDECAY_DAEMON_SOCKET": os.fspath(missing_socket), + } + event = json.dumps( + { + "hook_event_name": "afterShellExecution", + "command": "git status", + "cwd": os.fspath(prepared.project), + "workspace_roots": [os.fspath(prepared.project)], + }, + ensure_ascii=False, + separators=(",", ":"), + sort_keys=True, + ).encode("utf-8") + startup_started_ns = time.monotonic_ns() + startup_control = subprocess.run( + (os.fspath(prepared.prebuilt_binary), "--version"), + cwd=prepared.project, + env=environment, + capture_output=True, + check=False, + timeout=5.0, + ) + startup_control_ns = time.monotonic_ns() - startup_started_ns + if startup_control.returncode != 0: + fail( + "process startup control failed with exit " + f"{startup_control.returncode}" + ) + direct_started_ns = time.monotonic_ns() + direct_hook = subprocess.run( + ( + os.fspath(prepared.prebuilt_binary), + "hook-cursor-after-shell", + ), + cwd=prepared.project, + env=environment, + input=event, + capture_output=True, + check=False, + timeout=5.0, + ) + direct_hook_wall_ns = time.monotonic_ns() - direct_started_ns + if direct_hook.returncode != 0: + fail( + "direct missing-daemon hook failed with exit " + f"{direct_hook.returncode}" + ) + started_ns = time.monotonic_ns() + result = run_host( + ( + os.fspath(prepared.prebuilt_binary), + "hook-cursor-after-shell", + ), + env=environment, + log_dir=prepared.snapshot_root / "host-logs", + timeout=5.0, + termination_grace=0.2, + input_payload=event, + check=False, + ) + elapsed_ns = time.monotonic_ns() - started_ns + hook_residual_ns = max( + 0, + direct_hook_wall_ns - startup_control_ns, + ) + lifecycle_wrapper_overhead_ns = max( + 0, + elapsed_ns - direct_hook_wall_ns, + ) + if result.evidence.exit_code != 0: + fail( + "missing-daemon after-shell command failed with exit " + f"{result.evidence.exit_code}" + ) + if result.evidence.process_count_after_cleanup != 0: + fail("missing-daemon after-shell process tree was not reaped") + digest = hashlib.sha256(result.stdout).hexdigest() + sample = { + "schema_version": SCHEMA_VERSION, + "identity": { + "candidate_id": candidate_id, + "run_id": f"incident-{uuid.uuid4().hex}", + "capture_id": f"capture-{uuid.uuid4().hex}", + "crate_id": "tracedecay-hooks", + "journey_id": "daemon-failure-recovery", + "workload_id": "missing-daemon-after-shell", + "variant": "candidate", + "machine_fingerprint": _machine_fingerprint(), + "platform": str(prepared.runtime_identity["platform"]), + "shard": str(prepared.runtime_identity["shard"]), + "storage_mode": str(prepared.runtime_identity["storage_mode"]), + "state": "recovery", + "temperature": "warm", + "surface": "host", + "concurrency": 1, + "round_index": index, + "abba_position": 0, + }, + "evidence": { + "sample_count": 1, + "evidence_class": "regression_sample", + }, + "availability": { + "state": "unavailable", + "detail": "daemon socket is intentionally absent", + }, + "timing": { + "started_ns": started_ns, + "elapsed_ns": elapsed_ns, + "cli_wall_ns": None, + "mcp_wall_ns": None, + "hook_wall_ns": None, + "host_wall_ns": elapsed_ns, + "handler_us": None, + "daemon_us": None, + "admission_us": None, + "stages_us": { + "process_startup_control": startup_control_ns // 1_000, + "direct_hook_wall": direct_hook_wall_ns // 1_000, + "missing_daemon_hook_residual": hook_residual_ns // 1_000, + "lifecycle_wrapper_overhead": ( + lifecycle_wrapper_overhead_ns // 1_000 + ), + "missing_daemon_fail_fast": elapsed_ns // 1_000, + }, + "shutdown_total_ns": None, + "abort_offset_ns": None, + }, + "size": { + "process_count": result.evidence.process_count, + "request_bytes": len(event), + "response_bytes": len(result.stdout), + "content_bytes": len(result.stdout), + }, + "lifecycle": { + "timeout_phase": None, + "activation_state": "inactive", + "restart_state": "not_required", + "daemon_survived": None, + }, + "observations": { + "missing_daemon_fail_fast_ns": elapsed_ns, + "process_startup_control_ns": startup_control_ns, + "direct_hook_wall_ns": direct_hook_wall_ns, + "hook_residual_ns": hook_residual_ns, + "lifecycle_wrapper_overhead_ns": ( + lifecycle_wrapper_overhead_ns + ), + "process_tree_reaped": True, + }, + "outcome": { + "status": "error", + "expected_digest": digest, + "actual_digest": digest, + "result_digest": digest, + "error": "expected daemon unavailable", + }, + } + validate_sample(sample) + captured.append(sample) + + write_jsonl(samples_path, captured) + elapsed_values = [sample["timing"]["elapsed_ns"] for sample in captured] + + def incident_distribution(field: str) -> dict[str, Any]: + return eligible_latency_percentiles( + [sample["observations"][field] for sample in captured] + ) + + policy = load_acceptance_policy( + Path(__file__).resolve().with_name("policies") / "acceptance-v1.json" + ) + journey_policy = load_journey_policy( + Path(__file__).resolve().with_name("policies") + / "journey-margins-v1.json" + ) + report = { + "schema_version": SCHEMA_VERSION, + "report_id": f"incident-{uuid.uuid4().hex}", + "workload_id": args.workload, + "availability": { + "state": "unavailable", + "detail": "daemon socket intentionally absent", + }, + "sample_count": len(captured), + "samples_sha256": sha256_file(samples_path), + "latency_ns": eligible_latency_percentiles(elapsed_values), + "stages_ns": { + "process_startup_control": incident_distribution( + "process_startup_control_ns" + ), + "direct_hook_wall": incident_distribution("direct_hook_wall_ns"), + "hook_residual": incident_distribution("hook_residual_ns"), + "lifecycle_wrapper_overhead": incident_distribution( + "lifecycle_wrapper_overhead_ns" + ), + }, + "outcome": { + "expected_unavailable_count": len(captured), + "command_failure_count": 0, + "process_leak_count": 0, + }, + "policy": { + "policy_id": policy.policy_id, + "policy_sha256": policy.sha256, + "journey_policy_id": journey_policy.policy_id, + "journey_policy_sha256": journey_policy.sha256, + "journey_margins": journey_policy.journeys["host"], + }, + } + write_json(output, report) + artifact_sha256 = sha256_file(output) + write_json( + policy_path, + { + "acceptance": make_policy_receipt( + policy, + artifact_sha256=artifact_sha256, + ), + "journey": make_policy_receipt( + journey_policy, + artifact_sha256=artifact_sha256, + ), + }, + ) + return 0 + + +def capture(args: argparse.Namespace) -> int: + binary = require_binary(args.binary) + output = Path(args.output) + samples_path, policy_path = _artifact_paths(output) + for path in (output, samples_path, policy_path): + if path.exists(): + fail(f"capture output already exists: {path}") + prepared_source = ( + load_prepared_fixture(Path(args.prepared), candidate_binary=binary) + if args.prepared + else None + ) + output.parent.mkdir(parents=True, exist_ok=True) + with RunWorkspace( + Path(tempfile.gettempdir()), + preserve_on_failure=False, + ) as workspace: + if prepared_source is None: + prepared = prepare_fixture_snapshot( + workspace.path / "fixture", + prebuilt_binary=binary, + ) + else: + prepared = clone_prepared_profile( + prepared_source, + workspace.path / "fixture", + runtime_state="cold", + temperature="cold", + ) + try: + _run_capture( + binary=prepared.prebuilt_binary, + prepared=prepared, + output=output, + variant="candidate", + ) + except (FixtureError, LifecycleError, PolicyViolation, SchemaValidationError) as exc: + fail(str(exc)) + return 0 + + +def paired(args: argparse.Namespace) -> int: + baseline = require_binary(args.baseline) + treatment = require_binary(args.treatment) + if baseline.samefile(treatment): + fail("baseline and treatment resolve to the same binary") + if sha256_file(baseline) == sha256_file(treatment): + fail("baseline and treatment binaries have identical content") + samples_per_variant = args.samples_per_variant + if ( + isinstance(samples_per_variant, bool) + or samples_per_variant < 2 + or samples_per_variant % 2 != 0 + ): + fail("samples-per-variant must be a positive even integer of at least 2") + output = Path(args.output) + samples_path, policy_path = _artifact_paths(output) + for path in (output, samples_path, policy_path): + if path.exists(): + fail(f"paired output already exists: {path}") + + schedule = ( + ("baseline", baseline), + ("treatment", treatment), + ("treatment", treatment), + ("baseline", baseline), + ) + samples: list[dict[str, Any]] = [] + output.parent.mkdir(parents=True, exist_ok=True) + with RunWorkspace( + Path(tempfile.gettempdir()), + preserve_on_failure=False, + ) as workspace: + base = prepare_fixture_snapshot( + workspace.path / "base", + prebuilt_binary=baseline, + ) + for cycle in range(samples_per_variant // 2): + for position, (variant, binary) in enumerate(schedule): + sample_root = workspace.path / f"sample-{cycle}-{position}" + prepared = clone_prepared_profile( + base, + sample_root, + prebuilt_binary=binary, + runtime_state="cold", + temperature="cold", + ) + sample_output = workspace.path / f"capture-{cycle}-{position}.json" + _run_capture( + binary=prepared.prebuilt_binary, + prepared=prepared, + output=sample_output, + variant=variant, + round_index=cycle, + abba_position=position, + ) + captured = read_jsonl(sample_output.with_suffix(".samples.jsonl")) + if len(captured) != 1: + fail("paired child capture did not produce exactly one raw sample") + samples.append(captured[0]) + + result_digests = { + sample["outcome"]["result_digest"] + for sample in samples + if sample["outcome"]["status"] == "success" + } + if len(result_digests) != 1: + fail("paired same-input result digest mismatch") + write_jsonl(samples_path, samples) + + def summarize_variant(variant: str) -> dict[str, Any]: + matching = [ + sample + for sample in samples + if sample["identity"]["variant"] == variant + ] + latencies = [ + sample["timing"]["elapsed_ns"] + for sample in matching + if sample["timing"]["elapsed_ns"] is not None + ] + return { + "sample_count": len(matching), + "latency_ns": eligible_latency_percentiles(latencies), + } + + policy = load_acceptance_policy( + Path(__file__).resolve().with_name("policies") / "acceptance-v1.json" + ) + journey_policy = load_journey_policy( + Path(__file__).resolve().with_name("policies") + / "journey-margins-v1.json" + ) + baseline_summary = summarize_variant("baseline") + treatment_summary = summarize_variant("treatment") + evaluate_artifact( + { + "sample_count": samples_per_variant, + "measurements": [ + {"latency_ns": sample["timing"]["elapsed_ns"]} + for sample in samples + ], + }, + policy, + ) + report_id = f"paired-{uuid.uuid4().hex}" + first_identity = samples[0]["identity"] + rounds = [ + [ + ( + "A" if sample["identity"]["variant"] == "baseline" else "B", + sample["timing"]["elapsed_ns"], + ) + for sample in sorted( + ( + item + for item in samples + if item["identity"]["round_index"] == cycle + ), + key=lambda item: item["identity"]["abba_position"], + ) + ] + for cycle in range(samples_per_variant // 2) + ] + comparison = compare_abba( + rounds, + identity={ + "baseline_candidate_id": sha256_file(baseline)[:16], + "treatment_candidate_id": sha256_file(treatment)[:16], + "run_id": report_id, + "capture_id": report_id, + "crate_id": first_identity["crate_id"], + "journey_id": first_identity["journey_id"], + "workload_id": first_identity["workload_id"], + "platform": first_identity["platform"], + "shard": first_identity["shard"], + "storage_mode": first_identity["storage_mode"], + "state": first_identity["state"], + "temperature": first_identity["temperature"], + "surface": first_identity["surface"], + "concurrency": first_identity["concurrency"], + }, + baseline_machine_fingerprint=first_identity["machine_fingerprint"], + treatment_machine_fingerprint=first_identity["machine_fingerprint"], + baseline_samples=[ + sample + for sample in samples + if sample["identity"]["variant"] == "baseline" + ], + treatment_samples=[ + sample + for sample in samples + if sample["identity"]["variant"] == "treatment" + ], + relative_threshold=( + journey_policy.journeys["cli"]["p50_regression_margin_pct"] / 100 + ), + seed=0, + ) + report = { + "schema_version": SCHEMA_VERSION, + "report_id": report_id, + "evidence_class": "repeated_raw_samples", + "fixture": { + "id": "runtime-v2-final", + "same_input": True, + "input_sha256": sha256_tree(fixture_source_root()), + }, + "binaries": { + "baseline_sha256": sha256_file(baseline), + "treatment_sha256": sha256_file(treatment), + }, + "schedule": "ABBA", + "samples_sha256": sha256_file(samples_path), + "variants": { + "baseline": baseline_summary, + "treatment": treatment_summary, + }, + "comparison": comparison, + "outcome": { + "digest_match": True, + "error_count": sum( + sample["outcome"]["status"] != "success" for sample in samples + ), + "process_leak_count": sum( + sample["observations"].get("process_tree_reaped") is not True + for sample in samples + ), + }, + "policy": { + "policy_id": policy.policy_id, + "policy_sha256": policy.sha256, + "latency_mode": policy.latency_mode, + "journey_policy_id": journey_policy.policy_id, + "journey_policy_sha256": journey_policy.sha256, + "journey_margins": journey_policy.journeys["cli"], + }, + } + write_json(output, report) + artifact_sha256 = sha256_file(output) + write_json( + policy_path, + { + "acceptance": make_policy_receipt( + policy, + artifact_sha256=artifact_sha256, + ), + "journey": make_policy_receipt( + journey_policy, + artifact_sha256=artifact_sha256, + ), + }, + ) + return 0 + + +def parser() -> argparse.ArgumentParser: + argument_parser = argparse.ArgumentParser( + description="Capture Cargo-free TraceDecay CLI/MCP runtime performance evidence." + ) + subparsers = argument_parser.add_subparsers( + dest="command", + required=True, + metavar="{" + ",".join(SUBCOMMANDS) + "}", + ) + + prepare_parser = subparsers.add_parser( + "prepare", + help="prepare deterministic fixtures without starting a daemon", + ) + prepare_parser.add_argument("--binary", required=True) + prepare_parser.add_argument("--output", required=True) + prepare_parser.set_defaults(handler=prepare) + + capture_parser = subparsers.add_parser( + "capture", + help="capture one candidate into raw JSONL and a report", + ) + capture_parser.add_argument("--binary", required=True) + capture_parser.add_argument("--output", required=True) + capture_parser.add_argument("--prepared") + capture_parser.set_defaults(handler=capture) + + paired_parser = subparsers.add_parser( + "paired", + help="capture an ABBA baseline/treatment comparison", + ) + paired_parser.add_argument("--baseline", required=True) + paired_parser.add_argument("--treatment", required=True) + paired_parser.add_argument("--output", required=True) + paired_parser.add_argument("--prepared") + paired_parser.add_argument("--samples-per-variant", type=int, default=4) + paired_parser.set_defaults(handler=paired) + + compare_parser = subparsers.add_parser( + "compare", + help="compare compatible captured reports", + ) + compare_parser.add_argument("--baseline", required=True) + compare_parser.add_argument("--treatment", required=True) + compare_parser.add_argument("--output", required=True) + compare_parser.set_defaults(handler=compare) + + incident_parser = subparsers.add_parser( + "incident", + help="capture one wired final incident workload", + ) + incident_parser.add_argument( + "--binary", + help="explicit product binary for production-route incident capture", + ) + incident_parser.add_argument("--workload", required=True) + incident_parser.add_argument("--samples", type=int, default=10) + incident_parser.add_argument("--events", type=int, default=1_000) + incident_parser.add_argument("--authority-test", action="store_true") + incident_parser.add_argument("--output", required=True) + incident_parser.set_defaults(handler=capture_incident) + + incidents_parser = subparsers.add_parser( + "incidents", + help="write fail-closed final incident workload catalog", + ) + incidents_parser.add_argument("--output", required=True) + incidents_parser.set_defaults(handler=incidents) + + smoke_parser = subparsers.add_parser( + "smoke", + help="run a bounded capture against an explicit prebuilt binary", + ) + smoke_parser.add_argument("--binary", required=True) + smoke_parser.add_argument("--output", required=True) + smoke_parser.add_argument("--prepared") + smoke_parser.set_defaults(handler=capture) + register_graph_measurement_subcommands( + subparsers, + capture_name="graph-capture", + paired_name="graph-paired", + ) + return argument_parser + + +def main(argv: Sequence[str] | None = None) -> int: + arguments = parser().parse_args(argv) + try: + return int(arguments.handler(arguments)) + except (HarnessError, GraphMeasurementError, OSError) as exc: + print(f"error: {exc}", file=sys.stderr) + return 2 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/benchmark_data/runtime/scenarios.py b/benchmark_data/runtime/scenarios.py new file mode 100644 index 0000000000..a24053e03d --- /dev/null +++ b/benchmark_data/runtime/scenarios.py @@ -0,0 +1,576 @@ +"""Deterministic final-V2 runtime workload and journey catalog.""" + +from __future__ import annotations + +import hashlib +import json +import re +from collections.abc import Callable, Iterable +from dataclasses import dataclass +from enum import Enum +from typing import Any + +JsonObject = dict[str, Any] +ArgumentFactory = Callable[["WorkloadInputs"], JsonObject] +_STABLE_ID = re.compile(r"[a-z0-9][a-z0-9-]*\Z") +_DELIVERY_LABEL = re.compile( + r"(?:^|[^a-z])pr[-_]?\d+|milestone|stage[-_]?\d+", re.IGNORECASE +) + + +class Surface(str, Enum): + CLI = "cli" + MCP = "mcp" + HOOK = "hook" + HOST = "host" + + +class RuntimeState(str, Enum): + COLD_ADMISSION = "cold-admission" + FIRST = "first" + WARM = "warm" + REPEAT = "repeat" + NO_OP = "no-op" + CONTENTION = "contention" + RECOVERY = "recovery" + PERSISTENT_MCP = "persistent-mcp" + HOST_ACTIVATION = "host-activation" + HOST_RESTART = "host-restart" + + +class WorkloadKind(str, Enum): + EXACT = "exact" + LEXICAL = "lexical" + GRAPH = "graph" + SESSION = "session" + CONTEXT = "context" + QUERY = "query" + PAYLOAD = "payload" + CONCURRENCY = "concurrency" + + +class CapabilityStatus(str, Enum): + AVAILABLE = "available" + UNAVAILABLE = "unavailable" + UNSUPPORTED = "unsupported" + PARTIAL = "partial" + FAILED = "failed" + + +class DigestSemantics(str, Enum): + ORDERED_JSON = "ordered-json" + UNORDERED_JSON = "unordered-json" + + +class TimeoutPhase(str, Enum): + ADMISSION = "admission" + INITIALIZE = "initialize" + TOOL_LIST = "tools-list" + TOOL_CALL = "tools-call" + HOOK = "hook" + HOST_ACTIVATION = "host-activation" + HOST_RESTART = "host-restart" + DASHBOARD = "dashboard" + CHILD_IO = "child-io" + SHUTDOWN = "shutdown" + + +class DaemonSurvival(str, Enum): + REQUIRED = "required" + NOT_APPLICABLE = "not-applicable" + + +class CrateLane(str, Enum): + QUERY = "tracedecay-query" + CODE_INDEX = "tracedecay-code-index" + CAPTURE = "tracedecay-capture" + APPLICATION = "tracedecay-application" + HOOKS = "tracedecay-hooks" + API = "tracedecay-api" + RUSQLITE_RUNTIME = "tracedecay-rusqlite-runtime" + INTEGRATED = "tracedecay" + + +@dataclass(frozen=True) +class ShutdownEvidence: + total_seconds: int + abort_offset_seconds: int + + def __post_init__(self) -> None: + if self.total_seconds <= 0: + raise ValueError("total_seconds must be positive") + if not 0 <= self.abort_offset_seconds <= self.total_seconds: + raise ValueError("abort offset must be within total") + + +@dataclass(frozen=True) +class WorkloadInputs: + symbol: str = "tracedecay_context" + literal: str = "tracedecay::context" + node_id: str = "node-stable" + code_generation: str = "generation-stable" + phrase: str = "stable runtime phrase" + query: str = "stable runtime query" + session_query: str = "stable session sentinel" + provider: str = "codex" + session_id: str = "session-stable" + payload_size: int = 4_096 + + +@dataclass(frozen=True) +class CapabilityAssessment: + status: CapabilityStatus + missing: tuple[str, ...] = () + unsupported: tuple[str, ...] = () + partial: tuple[str, ...] = () + failed: tuple[str, ...] = () + + @property + def runnable(self) -> bool: + return self.status is CapabilityStatus.AVAILABLE + + +@dataclass(frozen=True) +class Workload: + id: str + journey_id: str + kind: WorkloadKind + tool: str + argument_factory: ArgumentFactory + supported_crate_lanes: tuple[CrateLane, ...] + digest_semantics: DigestSemantics = DigestSemantics.ORDERED_JSON + is_remote: bool = False + + def __post_init__(self) -> None: + validate_stable_id(self.id) + validate_stable_id(self.journey_id) + if not self.supported_crate_lanes: + raise ValueError("workload has no crate lane") + + def arguments(self, inputs: WorkloadInputs | None = None) -> JsonObject: + return self.argument_factory(inputs or WorkloadInputs()) + + def cli_argv(self, inputs: WorkloadInputs | None = None) -> tuple[str, ...]: + payload = json.dumps( + self.arguments(inputs), + ensure_ascii=False, + allow_nan=False, + separators=(",", ":"), + sort_keys=True, + ) + return ("tool", self.tool, "--args", payload) + + +@dataclass(frozen=True) +class Scenario: + id: str + journey_id: str + workload_id: str + crate_lane: CrateLane + surface: Surface + state: RuntimeState + concurrency: int + is_throughput: bool + required_capabilities: tuple[str, ...] + digest_semantics: DigestSemantics + expected_status: CapabilityStatus + timeout_phase: TimeoutPhase + daemon_survival: DaemonSurvival + is_remote: bool = False + evidence_id: str | None = None + shutdown_evidence: ShutdownEvidence | None = None + sample_count: int = 1 + measures_wall_time: bool = True + slo_gate: bool = False + accepts_empty_success: bool = False + + def __post_init__(self) -> None: + for identifier in (self.id, self.journey_id, self.workload_id): + validate_stable_id(identifier) + if self.evidence_id is not None: + validate_stable_id(self.evidence_id) + if self.concurrency <= 0: + raise ValueError("concurrency must be positive") + if self.sample_count != 1 or self.slo_gate: + raise ValueError("scenarios are n=1 evidence, not gates") + if self.accepts_empty_success: + raise ValueError("empty success is not truthful") + + @property + def test_identity(self) -> tuple[str, str, str, str]: + return (self.crate_lane.value, self.journey_id, self.workload_id, self.id) + + def sample_identity( + self, + *, + run_id: str, + variant: str, + machine_fingerprint: str, + round_index: int, + abba_position: int, + candidate_id: str = "final-v2", + capture_id: str = "capture-final-v2", + platform: str = "linux", + shard: str = "default", + storage_mode: str = "durable", + ) -> JsonObject: + state = { + RuntimeState.COLD_ADMISSION: "cold", + RuntimeState.FIRST: "cold", + RuntimeState.WARM: "warm", + RuntimeState.REPEAT: "warm", + RuntimeState.NO_OP: "no_op", + RuntimeState.CONTENTION: "contention", + RuntimeState.RECOVERY: "recovery", + RuntimeState.PERSISTENT_MCP: "persistent_mcp", + RuntimeState.HOST_ACTIVATION: "host_activation", + RuntimeState.HOST_RESTART: "host_restart", + }[self.state] + return { + "candidate_id": candidate_id, + "run_id": run_id, + "capture_id": capture_id, + "crate_id": self.crate_lane.value, + "journey_id": self.journey_id, + "workload_id": self.workload_id, + "variant": variant, + "machine_fingerprint": machine_fingerprint, + "platform": platform, + "shard": shard, + "storage_mode": storage_mode, + "state": state, + "temperature": ( + "cold" + if self.state in (RuntimeState.COLD_ADMISSION, RuntimeState.FIRST) + else "warm" + ), + "surface": self.surface.value, + "concurrency": self.concurrency, + "round_index": round_index, + "abba_position": abba_position, + } + + def normalization_dimensions( + self, *, platform: str, shard: str, storage_mode: str + ) -> JsonObject: + if not platform or not shard or not storage_mode: + raise ValueError("runtime normalization dimensions must not be empty") + return { + "platform": platform, + "shard": shard, + "storage_mode": storage_mode, + "concurrency": self.concurrency, + "cache_state": ( + "cold" if self.state is RuntimeState.COLD_ADMISSION else "warm" + ), + } + + def assess_capabilities( + self, + *, + available: Iterable[str], + unsupported: Iterable[str] = (), + partial: Iterable[str] = (), + failed: Iterable[str] = (), + ) -> CapabilityAssessment: + required = set(self.required_capabilities) + available_set = set(available) + unsupported_set = required.intersection(unsupported) + partial_set = required.intersection(partial) + failed_set = required.intersection(failed) + missing_set = required - available_set - unsupported_set + if failed_set: + status = CapabilityStatus.FAILED + elif unsupported_set: + status = CapabilityStatus.UNSUPPORTED + elif partial_set: + status = CapabilityStatus.PARTIAL + elif missing_set: + status = CapabilityStatus.UNAVAILABLE + else: + status = CapabilityStatus.AVAILABLE + return CapabilityAssessment( + status=status, + missing=tuple(sorted(missing_set)), + unsupported=tuple(sorted(unsupported_set)), + partial=tuple(sorted(partial_set)), + failed=tuple(sorted(failed_set)), + ) + + def assess_production_route( + self, + *, + committed: bool, + mounted: bool, + contract_only: bool = False, + failed: bool = False, + ) -> CapabilityAssessment: + route = "production-route-mounted" + if failed: + return CapabilityAssessment(CapabilityStatus.FAILED, failed=(route,)) + if contract_only or not committed or not mounted: + return CapabilityAssessment(CapabilityStatus.UNAVAILABLE, missing=(route,)) + return CapabilityAssessment(CapabilityStatus.AVAILABLE) + + +def validate_stable_id(identifier: str) -> str: + if ( + not isinstance(identifier, str) + or _STABLE_ID.fullmatch(identifier) is None + or _DELIVERY_LABEL.search(identifier) is not None + ): + raise ValueError(f"invalid stable runtime id: {identifier!r}") + return identifier + + +def _exact_symbol(i: WorkloadInputs) -> JsonObject: + return {"name": i.symbol, "limit": 20, "format": "json"} + + +def _exact_occurrence(i: WorkloadInputs) -> JsonObject: + return { + "literal": i.literal, + "scope": {"generation": i.code_generation}, + "meta": {"include_provenance": True}, + "format": "json", + } + + +def _lexical_grep(i: WorkloadInputs) -> JsonObject: + return {"pattern": i.literal, "fixed_strings": True, "format": "json"} + + +def _lexical_phrase(i: WorkloadInputs) -> JsonObject: + return {"phrases": [i.phrase], "generation": i.code_generation, "format": "json"} + + +def _node(i: WorkloadInputs) -> JsonObject: + return {"node_id": i.node_id, "format": "json"} + + +def _search(i: WorkloadInputs) -> JsonObject: + return {"query": i.query, "limit": 20, "format": "json"} + + +def _message(i: WorkloadInputs) -> JsonObject: + return { + "query": i.session_query, + "provider": i.provider, + "limit": 20, + "format": "json", + } + + +def _session(i: WorkloadInputs) -> JsonObject: + return {"pattern": i.session_query, "session_id": i.session_id, "format": "json"} + + +def _expand(i: WorkloadInputs) -> JsonObject: + return {"session_id": i.session_id, "query": i.session_query, "format": "json"} + + +def _context(i: WorkloadInputs) -> JsonObject: + return { + "task": i.query, + "keywords": [i.phrase], + "include_code": True, + "format": "json", + } + + +def _payload(i: WorkloadInputs) -> JsonObject: + return { + "task": i.query, + "keywords": ["x" * i.payload_size], + "include_code": True, + "format": "json", + } + + +def _hook(i: WorkloadInputs) -> JsonObject: + return {"provider": i.provider, "payload": {"query": i.query}, "format": "json"} + + +def _remote(i: WorkloadInputs) -> JsonObject: + return {"provider": i.provider, "session_id": i.session_id, "format": "json"} + + +QUERY = (CrateLane.QUERY, CrateLane.APPLICATION, CrateLane.INTEGRATED) +CODE = ( + CrateLane.CODE_INDEX, + CrateLane.QUERY, + CrateLane.APPLICATION, + CrateLane.INTEGRATED, +) +SESSION = ( + CrateLane.CAPTURE, + CrateLane.RUSQLITE_RUNTIME, + CrateLane.APPLICATION, + CrateLane.INTEGRATED, +) +API = ( + CrateLane.CODE_INDEX, + CrateLane.APPLICATION, + CrateLane.API, + CrateLane.INTEGRATED, +) + +WORKLOADS = ( + Workload("exact-symbol", "code-retrieval", WorkloadKind.EXACT, "tracedecay_find_exact_symbol", _exact_symbol, QUERY), + Workload("exact-occurrence", "code-retrieval", WorkloadKind.EXACT, "tracedecay_code_exact_occurrence", _exact_occurrence, CODE), + Workload("lexical-grep", "code-retrieval", WorkloadKind.LEXICAL, "tracedecay_grep", _lexical_grep, QUERY), + Workload("lexical-phrase", "code-retrieval", WorkloadKind.LEXICAL, "tracedecay_code_phrase_search", _lexical_phrase, CODE), + Workload("graph-callers", "graph-traversal", WorkloadKind.GRAPH, "tracedecay_callers", _node, QUERY), + Workload("graph-callees", "graph-traversal", WorkloadKind.GRAPH, "tracedecay_callees", _node, QUERY), + Workload("graph-impact", "graph-traversal", WorkloadKind.GRAPH, "tracedecay_impact", _node, QUERY), + Workload("query-search", "code-retrieval", WorkloadKind.QUERY, "tracedecay_search", _search, QUERY), + Workload("session-message", "session-retrieval", WorkloadKind.SESSION, "tracedecay_message_search", _message, SESSION), + Workload("session-grep", "session-retrieval", WorkloadKind.SESSION, "tracedecay_lcm_grep", _session, SESSION), + Workload("session-expand-query", "session-retrieval", WorkloadKind.SESSION, "tracedecay_lcm_expand_query", _expand, SESSION), + Workload("query-context", "context-assembly", WorkloadKind.CONTEXT, "tracedecay_context", _context, CODE), + Workload("payload-stress", "transport-dispatch", WorkloadKind.PAYLOAD, "tracedecay_context", _payload, API), + Workload("concurrency-burst", "transport-dispatch", WorkloadKind.CONCURRENCY, "tracedecay_search", _search, API, DigestSemantics.UNORDERED_JSON), + Workload("hook-delivery", "hook-delivery", WorkloadKind.PAYLOAD, "tracedecay_hook_dispatch", _hook, (CrateLane.HOOKS, CrateLane.APPLICATION, CrateLane.API, CrateLane.INTEGRATED)), + Workload("remote-capture", "remote-capture", WorkloadKind.SESSION, "tracedecay_remote_capture", _remote, (CrateLane.CAPTURE, CrateLane.APPLICATION, CrateLane.API, CrateLane.INTEGRATED), is_remote=True), + Workload("remote-recovery", "remote-recovery", WorkloadKind.SESSION, "tracedecay_remote_recovery", _remote, (CrateLane.CAPTURE, CrateLane.RUSQLITE_RUNTIME, CrateLane.APPLICATION, CrateLane.API, CrateLane.INTEGRATED), is_remote=True), +) + + +def _id( + workload: Workload, + lane: CrateLane, + surface: Surface, + state: RuntimeState, + concurrency: int, + suffix: str | None, +) -> str: + pieces = [ + lane.value, + workload.journey_id, + workload.id, + surface.value, + state.value, + f"c{concurrency}", + ] + if suffix: + pieces.append(suffix) + return validate_stable_id("-".join(pieces)) + + +def build_scenarios() -> tuple[Scenario, ...]: + result: list[Scenario] = [] + + def add( + workload: Workload, + lane: CrateLane, + surface: Surface, + state: RuntimeState, + *, + concurrency: int = 1, + throughput: bool = False, + expected: CapabilityStatus | None = None, + phase: TimeoutPhase = TimeoutPhase.TOOL_CALL, + survival: DaemonSurvival = DaemonSurvival.NOT_APPLICABLE, + evidence: str | None = None, + shutdown: ShutdownEvidence | None = None, + ) -> None: + capabilities = [workload.tool] + if workload.is_remote: + capabilities.append("production-route-mounted") + result.append( + Scenario( + _id(workload, lane, surface, state, concurrency, evidence), + workload.journey_id, + workload.id, + lane, + surface, + state, + concurrency, + throughput, + tuple(capabilities), + workload.digest_semantics, + expected + or ( + CapabilityStatus.UNAVAILABLE + if workload.is_remote + else CapabilityStatus.AVAILABLE + ), + phase, + survival, + workload.is_remote, + evidence, + shutdown, + ) + ) + + for workload in WORKLOADS: + for lane in workload.supported_crate_lanes: + add(workload, lane, Surface.CLI, RuntimeState.FIRST) + + exact = next(w for w in WORKLOADS if w.id == "exact-symbol") + for state, phase in ( + (RuntimeState.COLD_ADMISSION, TimeoutPhase.ADMISSION), + (RuntimeState.WARM, TimeoutPhase.TOOL_CALL), + (RuntimeState.REPEAT, TimeoutPhase.TOOL_CALL), + (RuntimeState.NO_OP, TimeoutPhase.TOOL_CALL), + (RuntimeState.CONTENTION, TimeoutPhase.TOOL_CALL), + (RuntimeState.RECOVERY, TimeoutPhase.ADMISSION), + ): + add(exact, CrateLane.INTEGRATED, Surface.CLI, state, phase=phase, survival=DaemonSurvival.REQUIRED) + add(exact, CrateLane.INTEGRATED, Surface.MCP, RuntimeState.PERSISTENT_MCP, survival=DaemonSurvival.REQUIRED) + + concurrent = next(w for w in WORKLOADS if w.id == "concurrency-burst") + for surface in (Surface.CLI, Surface.MCP): + for concurrency in (1, 4, 8): + add(concurrent, CrateLane.INTEGRATED, surface, RuntimeState.CONTENTION, concurrency=concurrency, throughput=True, survival=DaemonSurvival.REQUIRED) + + hook = next(w for w in WORKLOADS if w.id == "hook-delivery") + add(hook, CrateLane.HOOKS, Surface.HOOK, RuntimeState.WARM, phase=TimeoutPhase.HOOK, survival=DaemonSurvival.REQUIRED) + evidence_rows = ( + ("warming-daemon", RuntimeState.HOST_ACTIVATION, CapabilityStatus.PARTIAL, TimeoutPhase.HOST_ACTIVATION, None), + ("unresponsive-daemon", RuntimeState.HOST_RESTART, CapabilityStatus.UNAVAILABLE, TimeoutPhase.HOST_RESTART, None), + ("dashboard-malformed", RuntimeState.HOST_ACTIVATION, CapabilityStatus.FAILED, TimeoutPhase.DASHBOARD, None), + ("dashboard-204", RuntimeState.HOST_ACTIVATION, CapabilityStatus.UNAVAILABLE, TimeoutPhase.DASHBOARD, None), + ("dashboard-404", RuntimeState.HOST_ACTIVATION, CapabilityStatus.UNSUPPORTED, TimeoutPhase.DASHBOARD, None), + ("verbose-hanging-child", RuntimeState.HOST_RESTART, CapabilityStatus.FAILED, TimeoutPhase.CHILD_IO, None), + ("repeated-capture-ids", RuntimeState.HOST_ACTIVATION, CapabilityStatus.AVAILABLE, TimeoutPhase.HOST_ACTIVATION, None), + ("shutdown-89s", RuntimeState.HOST_RESTART, CapabilityStatus.FAILED, TimeoutPhase.SHUTDOWN, ShutdownEvidence(89, 81)), + ("shutdown-57s", RuntimeState.HOST_RESTART, CapabilityStatus.FAILED, TimeoutPhase.SHUTDOWN, ShutdownEvidence(57, 52)), + ) + for evidence, state, status, phase, shutdown in evidence_rows: + add(hook, CrateLane.INTEGRATED, Surface.HOST, state, expected=status, phase=phase, survival=DaemonSurvival.REQUIRED, evidence=evidence, shutdown=shutdown) + return tuple(result) + + +def _normalize(value: Any, unordered: bool) -> Any: + if isinstance(value, dict): + return { + key: _normalize(item, unordered) + for key, item in value.items() + if key != "duration_us" + } + if isinstance(value, list): + items = [_normalize(item, unordered) for item in value] + if unordered: + items.sort( + key=lambda item: json.dumps( + item, ensure_ascii=False, separators=(",", ":"), sort_keys=True + ) + ) + return items + return value + + +def stable_digest(value: Any, semantics: DigestSemantics) -> str: + normalized = _normalize(value, semantics is DigestSemantics.UNORDERED_JSON) + encoded = json.dumps( + normalized, + ensure_ascii=False, + allow_nan=False, + separators=(",", ":"), + sort_keys=True, + ).encode("utf-8") + return hashlib.sha256(encoded).hexdigest() + + +SCENARIOS = build_scenarios() diff --git a/benchmark_data/runtime/schema.py b/benchmark_data/runtime/schema.py new file mode 100644 index 0000000000..b09bbcd69a --- /dev/null +++ b/benchmark_data/runtime/schema.py @@ -0,0 +1,845 @@ +"""Versioned schemas and deterministic JSONL for runtime benchmark artifacts.""" + +from __future__ import annotations + +import hashlib +import json +import math +import re +from collections.abc import Callable, Iterable, Mapping +from dataclasses import dataclass +from os import PathLike +from pathlib import Path +from typing import Any + +from benchmark_data.runtime.incident_workloads import ( + IncidentWorkloadError, + validate_incident_observation, +) + + +SCHEMA_VERSION = 1 +OUTCOME_STATUSES = frozenset({"success", "error", "timeout"}) +AVAILABILITY_STATES = frozenset( + {"available", "unavailable", "unsupported", "partial", "failed"} +) +SURFACES = frozenset({"cli", "mcp", "hook", "host"}) +EVIDENCE_CLASSES = frozenset({"regression_sample", "distribution"}) +ACTIVATION_STATES = frozenset( + {"active", "pending", "inactive", "unknown", "not_applicable"} +) +RESTART_STATES = frozenset( + {"not_required", "required", "completed", "not_applicable"} +) +RUNTIME_STATES = frozenset( + { + "cold", + "warm", + "no_op", + "contention", + "recovery", + "persistent_mcp", + "host_activation", + "host_restart", + } +) +TEMPERATURES = frozenset({"cold", "warm"}) +_SHA256_RE = re.compile(r"[0-9a-f]{64}\Z") +_PR_STAGE_RE = re.compile(r"(?:^|[-_. ])pr[-_. ]?\d+(?:$|[-_. ])", re.IGNORECASE) +_SAMPLE_SECTIONS = ( + "schema_version", + "identity", + "evidence", + "availability", + "timing", + "size", + "lifecycle", + "observations", + "outcome", +) +_REPORT_SECTIONS = ( + "schema_version", + "identity", + "evidence", + "timing", + "size", + "availability", + "outcome", + "statistics", +) + +Document = dict[str, Any] +Validator = Callable[[Any], Document] + + +class SchemaValidationError(ValueError): + """A benchmark artifact does not satisfy its declared schema.""" + + +@dataclass(frozen=True) +class RuntimeArtifact: + """One validated sample or report through the canonical typed model.""" + + kind: str + document: Document + + @property + def identity(self) -> Document: + return self.document["identity"] + + @classmethod + def from_document(cls, document: Any) -> RuntimeArtifact: + if not isinstance(document, dict): + raise SchemaValidationError("runtime artifact must be an object") + has_lifecycle = "lifecycle" in document + has_statistics = "statistics" in document + if has_lifecycle == has_statistics: + raise SchemaValidationError( + "runtime artifact must be exactly one sample or report" + ) + if has_lifecycle: + return cls(kind="sample", document=validate_sample(document)) + return cls(kind="report", document=validate_report(document)) + + +def _generated_object_schema(title: str, sections: tuple[str, ...]) -> Document: + return { + "title": title, + "type": "object", + "additionalProperties": False, + "required": list(sections), + "properties": { + field: ( + {"const": SCHEMA_VERSION} + if field == "schema_version" + else {"type": "object"} + ) + for field in sections + }, + } + + +def generated_artifact_schema() -> Document: + """Generate the transport schema from the canonical artifact sections.""" + + return { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "tracedecay.runtime-artifact.v1", + "oneOf": [ + _generated_object_schema("runtime-sample", _SAMPLE_SECTIONS), + _generated_object_schema("runtime-report", _REPORT_SECTIONS), + ], + } + + +def _object( + value: Any, + path: str, + fields: Iterable[str], +) -> dict[str, Any]: + if not isinstance(value, dict): + raise SchemaValidationError(f"{path} must be an object") + expected = set(fields) + actual = set(value) + missing = sorted(expected - actual) + unexpected = sorted(actual - expected) + if missing: + raise SchemaValidationError(f"{path} is missing required fields: {', '.join(missing)}") + if unexpected: + raise SchemaValidationError(f"{path} has unexpected fields: {', '.join(unexpected)}") + return value + + +def _string(value: Any, path: str) -> str: + if not isinstance(value, str) or not value: + raise SchemaValidationError(f"{path} must be a non-empty string") + return value + + +def _optional_string(value: Any, path: str) -> str | None: + if value is None: + return None + return _string(value, path) + + +def _integer( + value: Any, + path: str, + *, + minimum: int = 0, + maximum: int | None = None, +) -> int: + if not isinstance(value, int) or isinstance(value, bool) or value < minimum: + if minimum == 0: + requirement = "a non-negative integer" + else: + requirement = f"an integer greater than or equal to {minimum}" + raise SchemaValidationError(f"{path} must be {requirement}") + if maximum is not None and value > maximum: + raise SchemaValidationError(f"{path} must be at most {maximum}") + return value + + +def _optional_integer(value: Any, path: str, *, minimum: int = 0) -> int | None: + if value is None: + return None + return _integer(value, path, minimum=minimum) + + +def _boolean(value: Any, path: str) -> bool: + if not isinstance(value, bool): + raise SchemaValidationError(f"{path} must be a boolean") + return value + + +def _optional_boolean(value: Any, path: str) -> bool | None: + if value is None: + return None + return _boolean(value, path) + + +def _number(value: Any, path: str) -> float | int: + if ( + isinstance(value, bool) + or not isinstance(value, (int, float)) + or not math.isfinite(value) + ): + raise SchemaValidationError(f"{path} must be a finite number") + return value + + +def _enum(value: Any, path: str, choices: frozenset[str]) -> str: + if value not in choices: + raise SchemaValidationError(f"{path} must be one of {sorted(choices)}") + return value + + +def _stable_identity(value: Any, path: str) -> str: + identity = _string(value, path) + if _PR_STAGE_RE.search(identity) is not None: + raise SchemaValidationError( + f"{path} must identify final crate or integrated runtime, not a PR-stage" + ) + return identity + + +def _digest(value: Any, path: str, *, optional: bool = False) -> str | None: + if value is None and optional: + return None + if not isinstance(value, str) or _SHA256_RE.fullmatch(value) is None: + raise SchemaValidationError(f"{path} must be a lowercase SHA-256 digest") + return value + + +def _validate_schema_version(document: Mapping[str, Any]) -> None: + version = document.get("schema_version") + if version != SCHEMA_VERSION or isinstance(version, bool): + raise SchemaValidationError( + f"schema_version must be {SCHEMA_VERSION}, got {version!r}" + ) + + +def _validate_json_value(value: Any, path: str) -> None: + if value is None or isinstance(value, (str, bool, int)): + return + if isinstance(value, float): + if not math.isfinite(value): + raise SchemaValidationError(f"{path} must contain only finite numbers") + return + if isinstance(value, list): + for index, item in enumerate(value): + _validate_json_value(item, f"{path}[{index}]") + return + if isinstance(value, dict): + for key, item in value.items(): + if not isinstance(key, str): + raise SchemaValidationError(f"{path} object keys must be strings") + if "milestone" in key.casefold(): + raise SchemaValidationError( + f"{path}.{key} contains forbidden milestone budget data" + ) + _validate_json_value(item, f"{path}.{key}") + return + raise SchemaValidationError(f"{path} contains unsupported value {type(value).__name__}") + + +def _validate_percentile( + value: Any, + path: str, + *, + sample_count: int, + minimum_samples: int, +) -> None: + percentile = _object( + value, + path, + ("available", "value", "minimum_samples"), + ) + available = _boolean(percentile["available"], f"{path}.available") + if percentile["minimum_samples"] != minimum_samples: + raise SchemaValidationError( + f"{path}.minimum_samples must be {minimum_samples}" + ) + observed = percentile["value"] + eligible = sample_count >= minimum_samples + if available != eligible: + raise SchemaValidationError( + f"{path} availability requires at least {minimum_samples} matching normalized samples" + ) + if available: + _number(observed, f"{path}.value") + elif observed is not None: + raise SchemaValidationError(f"{path}.value must be null when unavailable") + + +def validate_sample(document: Any) -> Document: + """Validate one raw ABBA sample and return the original object.""" + + sample = _object( + document, + "sample", + _SAMPLE_SECTIONS, + ) + _validate_schema_version(sample) + + identity = _object( + sample["identity"], + "sample.identity", + ( + "candidate_id", + "run_id", + "capture_id", + "crate_id", + "journey_id", + "workload_id", + "variant", + "machine_fingerprint", + "platform", + "shard", + "storage_mode", + "state", + "temperature", + "surface", + "concurrency", + "round_index", + "abba_position", + ), + ) + for field in ( + "candidate_id", + "run_id", + "capture_id", + "variant", + "machine_fingerprint", + "platform", + "shard", + "storage_mode", + ): + _string(identity[field], f"sample.identity.{field}") + for field in ("crate_id", "journey_id", "workload_id"): + _stable_identity(identity[field], f"sample.identity.{field}") + _enum(identity["state"], "sample.identity.state", RUNTIME_STATES) + _enum( + identity["temperature"], + "sample.identity.temperature", + TEMPERATURES, + ) + surface = _enum(identity["surface"], "sample.identity.surface", SURFACES) + _integer(identity["concurrency"], "sample.identity.concurrency", minimum=1) + _integer(identity["round_index"], "sample.identity.round_index") + _integer(identity["abba_position"], "sample.identity.abba_position", maximum=3) + + evidence = _object( + sample["evidence"], + "sample.evidence", + ("sample_count", "evidence_class"), + ) + sample_count = _integer( + evidence["sample_count"], "sample.evidence.sample_count", minimum=1 + ) + if sample_count != 1: + raise SchemaValidationError("sample.evidence.sample_count must be 1") + evidence_class = _enum( + evidence["evidence_class"], + "sample.evidence.evidence_class", + EVIDENCE_CLASSES, + ) + if evidence_class != "regression_sample": + raise SchemaValidationError( + "individual samples must use evidence_class 'regression_sample'" + ) + + availability = _object( + sample["availability"], + "sample.availability", + ("state", "detail"), + ) + availability_state = _enum( + availability["state"], + "sample.availability.state", + AVAILABILITY_STATES, + ) + availability_detail = _optional_string( + availability["detail"], "sample.availability.detail" + ) + if availability_state == "available" and availability_detail is not None: + raise SchemaValidationError( + "sample.availability.detail must be null when evidence is available" + ) + if availability_state != "available" and availability_detail is None: + raise SchemaValidationError( + "sample.availability.detail is required when evidence is not available" + ) + + timing = _object( + sample["timing"], + "sample.timing", + ( + "started_ns", + "elapsed_ns", + "cli_wall_ns", + "mcp_wall_ns", + "hook_wall_ns", + "host_wall_ns", + "handler_us", + "daemon_us", + "admission_us", + "stages_us", + "shutdown_total_ns", + "abort_offset_ns", + ), + ) + _integer(timing["started_ns"], "sample.timing.started_ns") + _optional_integer(timing["elapsed_ns"], "sample.timing.elapsed_ns") + wall_times = { + surface_name: _optional_integer( + timing[f"{surface_name}_wall_ns"], + f"sample.timing.{surface_name}_wall_ns", + ) + for surface_name in SURFACES + } + _optional_integer(timing["handler_us"], "sample.timing.handler_us") + _optional_integer(timing["daemon_us"], "sample.timing.daemon_us") + _optional_integer(timing["admission_us"], "sample.timing.admission_us") + stages_us = timing["stages_us"] + if not isinstance(stages_us, dict): + raise SchemaValidationError("sample.timing.stages_us must be an object") + for stage, elapsed_us in stages_us.items(): + _string(stage, "sample.timing.stages_us stage") + _integer(elapsed_us, f"sample.timing.stages_us.{stage}") + shutdown_total_ns = _optional_integer( + timing["shutdown_total_ns"], "sample.timing.shutdown_total_ns", minimum=1 + ) + abort_offset_ns = _optional_integer( + timing["abort_offset_ns"], "sample.timing.abort_offset_ns", minimum=1 + ) + if (shutdown_total_ns is None) != (abort_offset_ns is None): + raise SchemaValidationError( + "sample.timing.shutdown_total_ns and abort_offset_ns must be recorded together" + ) + if ( + shutdown_total_ns is not None + and abort_offset_ns is not None + and abort_offset_ns >= shutdown_total_ns + ): + raise SchemaValidationError( + "sample.timing.abort_offset_ns must precede shutdown_total_ns" + ) + + size = _object( + sample["size"], + "sample.size", + ("process_count", "request_bytes", "response_bytes", "content_bytes"), + ) + for field in ("process_count", "request_bytes", "response_bytes", "content_bytes"): + _optional_integer(size[field], f"sample.size.{field}") + + lifecycle = _object( + sample["lifecycle"], + "sample.lifecycle", + ( + "timeout_phase", + "activation_state", + "restart_state", + "daemon_survived", + ), + ) + timeout_phase = _optional_string( + lifecycle["timeout_phase"], "sample.lifecycle.timeout_phase" + ) + activation_state = _enum( + lifecycle["activation_state"], + "sample.lifecycle.activation_state", + ACTIVATION_STATES, + ) + _enum( + lifecycle["restart_state"], + "sample.lifecycle.restart_state", + RESTART_STATES, + ) + daemon_survived = _optional_boolean( + lifecycle["daemon_survived"], "sample.lifecycle.daemon_survived" + ) + + try: + validate_incident_observation(sample["observations"]) + except IncidentWorkloadError as error: + raise SchemaValidationError(f"sample.observations {error}") from error + + outcome = _object( + sample["outcome"], + "sample.outcome", + ( + "status", + "expected_digest", + "actual_digest", + "result_digest", + "error", + ), + ) + status = _enum(outcome["status"], "sample.outcome.status", OUTCOME_STATUSES) + _digest(outcome["expected_digest"], "sample.outcome.expected_digest") + actual_digest = _digest( + outcome["actual_digest"], + "sample.outcome.actual_digest", + optional=True, + ) + result_digest = _digest( + outcome["result_digest"], + "sample.outcome.result_digest", + optional=True, + ) + error = _optional_string(outcome["error"], "sample.outcome.error") + if status == "success": + if availability_state != "available": + raise SchemaValidationError( + f"availability state {availability_state!r} cannot have a successful outcome" + ) + if activation_state != "not_applicable" and not daemon_survived: + raise SchemaValidationError( + "sample.lifecycle.daemon_survived must be true for a successful outcome" + ) + if actual_digest is None or result_digest is None: + raise SchemaValidationError( + "sample.outcome actual_digest and result_digest are required for a successful outcome" + ) + if error is not None: + raise SchemaValidationError( + "sample.outcome.error must be null for a successful outcome" + ) + if timing["elapsed_ns"] is None or wall_times[surface] is None: + raise SchemaValidationError( + f"available {surface!r} success requires elapsed_ns and {surface}_wall_ns" + ) + missing_sizes = [ + field + for field in ("process_count", "request_bytes", "response_bytes", "content_bytes") + if size[field] is None + ] + if missing_sizes: + raise SchemaValidationError( + "successful outcome is missing size fields: " + ", ".join(missing_sizes) + ) + elif error is None: + raise SchemaValidationError( + f"sample.outcome.error is required for {status!r} outcomes" + ) + if status == "timeout" and timeout_phase is None: + raise SchemaValidationError( + "sample.lifecycle.timeout_phase is required for timeout outcomes" + ) + if status != "timeout" and timeout_phase is not None: + raise SchemaValidationError( + "sample.lifecycle.timeout_phase must be null unless outcome status is timeout" + ) + return sample + + +def validate_report(document: Any) -> Document: + """Validate an aggregate report while keeping raw samples external.""" + + report = _object( + document, + "report", + _REPORT_SECTIONS, + ) + _validate_schema_version(report) + + identity = _object( + report["identity"], + "report.identity", + ( + "report_id", + "candidate_id", + "run_id", + "capture_id", + "crate_id", + "journey_id", + "workload_id", + "variant", + "machine_fingerprint", + "platform", + "shard", + "storage_mode", + "state", + "temperature", + "surface", + "concurrency", + "samples_sha256", + ), + ) + for field in ( + "report_id", + "candidate_id", + "run_id", + "capture_id", + "variant", + "machine_fingerprint", + "platform", + "shard", + "storage_mode", + ): + _string(identity[field], f"report.identity.{field}") + for field in ("crate_id", "journey_id", "workload_id"): + _stable_identity(identity[field], f"report.identity.{field}") + _enum(identity["state"], "report.identity.state", RUNTIME_STATES) + _enum( + identity["temperature"], + "report.identity.temperature", + TEMPERATURES, + ) + _enum(identity["surface"], "report.identity.surface", SURFACES) + _integer(identity["concurrency"], "report.identity.concurrency", minimum=1) + _digest(identity["samples_sha256"], "report.identity.samples_sha256") + + evidence = _object( + report["evidence"], + "report.evidence", + ("sample_count", "evidence_class"), + ) + evidence_sample_count = _integer( + evidence["sample_count"], "report.evidence.sample_count", minimum=1 + ) + evidence_class = _enum( + evidence["evidence_class"], + "report.evidence.evidence_class", + EVIDENCE_CLASSES, + ) + expected_evidence_class = ( + "regression_sample" if evidence_sample_count == 1 else "distribution" + ) + if evidence_class != expected_evidence_class: + raise SchemaValidationError( + f"report.evidence.evidence_class must be {expected_evidence_class!r} " + f"for sample_count={evidence_sample_count}" + ) + + timing = _object( + report["timing"], + "report.timing", + ("started_ns", "ended_ns"), + ) + started_ns = _integer(timing["started_ns"], "report.timing.started_ns") + ended_ns = _integer(timing["ended_ns"], "report.timing.ended_ns") + if ended_ns < started_ns: + raise SchemaValidationError( + "report.timing.ended_ns must be greater than or equal to started_ns" + ) + + size = _object( + report["size"], + "report.size", + ( + "sample_count", + "process_count", + "request_bytes", + "response_bytes", + "content_bytes", + ), + ) + sample_count = _integer( + size["sample_count"], "report.size.sample_count", minimum=1 + ) + if sample_count != evidence_sample_count: + raise SchemaValidationError( + "report evidence and size sample_count fields must match" + ) + _integer(size["process_count"], "report.size.process_count") + _integer(size["request_bytes"], "report.size.request_bytes") + _integer(size["response_bytes"], "report.size.response_bytes") + _integer(size["content_bytes"], "report.size.content_bytes") + + availability = _object( + report["availability"], + "report.availability", + ( + "available_count", + "unavailable_count", + "unsupported_count", + "partial_count", + "failed_count", + ), + ) + availability_counts = [ + _integer(availability[field], f"report.availability.{field}") + for field in ( + "available_count", + "unavailable_count", + "unsupported_count", + "partial_count", + "failed_count", + ) + ] + if sum(availability_counts) != sample_count: + raise SchemaValidationError( + "report availability counts must equal report.size.sample_count" + ) + + outcome = _object( + report["outcome"], + "report.outcome", + ( + "success_count", + "error_count", + "timeout_count", + "digest_mismatch_count", + "daemon_death_count", + ), + ) + success_count = _integer( + outcome["success_count"], "report.outcome.success_count" + ) + error_count = _integer(outcome["error_count"], "report.outcome.error_count") + timeout_count = _integer( + outcome["timeout_count"], "report.outcome.timeout_count" + ) + digest_mismatch_count = _integer( + outcome["digest_mismatch_count"], + "report.outcome.digest_mismatch_count", + ) + daemon_death_count = _integer( + outcome["daemon_death_count"], + "report.outcome.daemon_death_count", + ) + if success_count + error_count != sample_count: + raise SchemaValidationError( + "report outcome counts must equal report.size.sample_count" + ) + if timeout_count > error_count: + raise SchemaValidationError( + "report.outcome.timeout_count cannot exceed error_count" + ) + if digest_mismatch_count > success_count: + raise SchemaValidationError( + "report.outcome.digest_mismatch_count cannot exceed success_count" + ) + if daemon_death_count > error_count: + raise SchemaValidationError( + "report.outcome.daemon_death_count cannot exceed error_count" + ) + if success_count > availability["available_count"]: + raise SchemaValidationError( + "successful outcomes cannot exceed available evidence" + ) + + if not isinstance(report["statistics"], dict): + raise SchemaValidationError("report.statistics must be an object") + _validate_json_value(report["statistics"], "report.statistics") + latency = _object( + report["statistics"].get("latency_ns"), + "report.statistics.latency_ns", + ("sample_count", "p50", "p95", "p99"), + ) + latency_sample_count = _integer( + latency["sample_count"], + "report.statistics.latency_ns.sample_count", + minimum=1, + ) + if latency_sample_count != sample_count: + raise SchemaValidationError( + "report.statistics.latency_ns.sample_count must match report sample_count" + ) + _number(latency["p50"], "report.statistics.latency_ns.p50") + _validate_percentile( + latency["p95"], + "report.statistics.latency_ns.p95", + sample_count=latency_sample_count, + minimum_samples=40, + ) + _validate_percentile( + latency["p99"], + "report.statistics.latency_ns.p99", + sample_count=latency_sample_count, + minimum_samples=100, + ) + return report + + +def canonical_json(document: Any) -> str: + """Return the canonical, deterministic JSON representation.""" + + try: + return json.dumps( + document, + ensure_ascii=False, + allow_nan=False, + sort_keys=True, + separators=(",", ":"), + ) + except (TypeError, ValueError) as exc: + raise SchemaValidationError(f"document is not canonical JSON: {exc}") from exc + + +def encode_jsonl( + records: Iterable[Any], + *, + validator: Validator = validate_sample, +) -> bytes: + """Validate and encode records as UTF-8 JSONL with a trailing newline.""" + + lines: list[str] = [] + for line_number, record in enumerate(records, start=1): + try: + validated = validator(record) + except SchemaValidationError as exc: + raise SchemaValidationError(f"line {line_number}: {exc}") from exc + lines.append(canonical_json(validated)) + return (("\n".join(lines) + "\n") if lines else "").encode("utf-8") + + +def write_jsonl( + path: str | PathLike[str], + records: Iterable[Any], + *, + validator: Validator = validate_sample, +) -> str: + """Write deterministic JSONL and return its SHA-256 digest.""" + + encoded = encode_jsonl(records, validator=validator) + Path(path).write_bytes(encoded) + return hashlib.sha256(encoded).hexdigest() + + +def read_jsonl( + path: str | PathLike[str], + *, + validator: Validator = validate_sample, +) -> list[Document]: + """Read strict JSONL, reporting malformed JSON or schema by line.""" + + records: list[Document] = [] + with Path(path).open("r", encoding="utf-8") as handle: + for line_number, line in enumerate(handle, start=1): + if not line.strip(): + raise SchemaValidationError(f"line {line_number}: blank JSONL line") + try: + document = json.loads(line) + except json.JSONDecodeError as exc: + raise SchemaValidationError( + f"line {line_number}: malformed JSON: {exc.msg}" + ) from exc + try: + records.append(validator(document)) + except SchemaValidationError as exc: + raise SchemaValidationError(f"line {line_number}: {exc}") from exc + return records diff --git a/benchmark_data/runtime/statistics.py b/benchmark_data/runtime/statistics.py new file mode 100644 index 0000000000..7964341fbe --- /dev/null +++ b/benchmark_data/runtime/statistics.py @@ -0,0 +1,283 @@ +"""Deterministic statistics for Cargo-free runtime evidence.""" + +from __future__ import annotations + +import math +import random +from collections.abc import Iterable, Mapping, Sequence +from typing import Any + + +OUTCOME_STATUSES = frozenset({"success", "error", "timeout"}) +NORMALIZATION_DIMENSIONS = ( + "crate_id", + "journey_id", + "workload_id", + "platform", + "shard", + "storage_mode", + "concurrency", + "temperature", +) +RETENTION_KINDS = frozenset({"runtime_sample", "junit_retention"}) + + +def _mean(values: Iterable[float | int]) -> float: + items = list(values) + if not items: + raise ValueError("mean requires at least one sample") + return float(sum(items) / len(items)) + + +def _finite_values(values: Iterable[float | int]) -> list[float | int]: + result = list(values) + for value in result: + if ( + isinstance(value, bool) + or not isinstance(value, (int, float)) + or not math.isfinite(value) + ): + raise ValueError("samples must be finite numbers") + return result + + +def nearest_rank( + values: Sequence[float | int], + percentile: float, +) -> float | int | None: + """Return a nearest-rank percentile, including max-valued small-N p99.""" + + if ( + isinstance(percentile, bool) + or not isinstance(percentile, (int, float)) + or not math.isfinite(percentile) + or percentile <= 0 + or percentile > 1 + ): + raise ValueError("percentile must be greater than zero and at most one") + ordered = sorted(_finite_values(values)) + if not ordered: + return None + rank = math.ceil(percentile * len(ordered)) + return ordered[rank - 1] + + +def summarize_distribution(values: Iterable[float | int]) -> dict[str, Any]: + """Summarize one finite distribution without inventing empty percentiles.""" + + samples = _finite_values(values) + if not samples: + return { + "sample_count": 0, + "min": None, + "p50": None, + "p95": None, + "p99": None, + "max": None, + "mean": None, + "percentile_method": "nearest_rank", + } + return { + "sample_count": len(samples), + "min": min(samples), + "p50": nearest_rank(samples, 0.50), + "p95": nearest_rank(samples, 0.95), + "p99": nearest_rank(samples, 0.99), + "max": max(samples), + "mean": _mean(samples), + "percentile_method": "nearest_rank", + } + + +def eligible_distribution(values: Sequence[int | float]) -> dict[str, Any]: + """Summarize a distribution with minimum-sample gates on percentiles.""" + + distribution = summarize_distribution(values) + + def eligible(field: str, minimum_samples: int) -> dict[str, Any]: + available = len(values) >= minimum_samples + return { + "available": available, + "value": distribution[field] if available else None, + "minimum_samples": minimum_samples, + } + + return { + "sample_count": distribution["sample_count"], + "min": distribution["min"], + "p50": eligible("p50", 2), + "p95": eligible("p95", 40), + "p99": eligible("p99", 100), + "max": distribution["max"], + "mean": distribution["mean"], + "percentile_method": distribution["percentile_method"], + } + + +def eligible_latency_percentiles(values: Sequence[int | float]) -> dict[str, Any]: + """Return only the gated p50/p95/p99 fields of ``eligible_distribution``.""" + + distribution = eligible_distribution(values) + return {field: distribution[field] for field in ("p50", "p95", "p99")} + + +def _normalization_identity(sample: Mapping[str, Any]) -> dict[str, Any]: + identity = sample.get("identity") + if not isinstance(identity, Mapping): + raise ValueError("retained sample identity must be an object") + missing = [field for field in NORMALIZATION_DIMENSIONS if field not in identity] + if missing: + raise ValueError( + "retained sample is missing normalized identity fields: " + + ", ".join(missing) + ) + normalized = {field: identity[field] for field in NORMALIZATION_DIMENSIONS} + for field, value in normalized.items(): + if field == "concurrency": + if isinstance(value, bool) or not isinstance(value, int) or value < 1: + raise ValueError("normalized identity concurrency must be positive") + elif not isinstance(value, str) or not value: + raise ValueError(f"normalized identity {field} must be a non-empty string") + if normalized["temperature"] not in {"cold", "warm"}: + raise ValueError("normalized identity temperature must be cold or warm") + return normalized + + +def _eligible_percentile( + values: Sequence[float | int], + percentile: float, + minimum_samples: int, +) -> dict[str, bool | int | float | None]: + available = len(values) >= minimum_samples + return { + "available": available, + "value": nearest_rank(values, percentile) if available else None, + "minimum_samples": minimum_samples, + } + + +def summarize_normalized_history( + retained_samples: Sequence[Mapping[str, Any]], +) -> dict[str, Any]: + """Summarize matching runtime history while excluding JUnit retention.""" + + if not retained_samples: + raise ValueError("normalized history requires at least one retained sample") + normalization = _normalization_identity(retained_samples[0]) + runtime_values: list[float | int] = [] + junit_retention_count = 0 + for sample in retained_samples: + if _normalization_identity(sample) != normalization: + raise ValueError("retained samples must share one normalized identity") + retention_kind = sample.get("retention_kind") + if retention_kind not in RETENTION_KINDS: + raise ValueError(f"unknown retention_kind: {retention_kind!r}") + latency = _finite_values([sample.get("latency_ns")])[0] + if retention_kind == "junit_retention": + junit_retention_count += 1 + else: + runtime_values.append(latency) + + if not runtime_values: + evidence_class = "unavailable" + elif len(runtime_values) == 1: + evidence_class = "regression_sample" + else: + evidence_class = "distribution" + return { + "normalization": normalization, + "sample_count": len(runtime_values), + "junit_retention_count": junit_retention_count, + "evidence_class": evidence_class, + "p50": nearest_rank(runtime_values, 0.50), + "p95": _eligible_percentile(runtime_values, 0.95, 40), + "p99": _eligible_percentile(runtime_values, 0.99, 100), + "percentile_method": "nearest_rank", + } + + +def bootstrap_confidence_interval( + values: Sequence[float | int], + *, + seed: int, + resamples: int = 10_000, + confidence: float = 0.95, +) -> tuple[float, float]: + """Return a deterministic percentile bootstrap interval for the mean.""" + + samples = _finite_values(values) + if not samples: + raise ValueError("bootstrap requires at least one sample") + if isinstance(resamples, bool) or not isinstance(resamples, int) or resamples <= 0: + raise ValueError("resamples must be a positive integer") + if ( + isinstance(confidence, bool) + or not isinstance(confidence, (int, float)) + or not math.isfinite(confidence) + or confidence <= 0 + or confidence >= 1 + ): + raise ValueError("confidence must be between zero and one") + + generator = random.Random(seed) + sample_count = len(samples) + means = [ + _mean( + samples[generator.randrange(sample_count)] for _ in range(sample_count) + ) + for _ in range(resamples) + ] + tail = (1.0 - confidence) / 2.0 + lower = nearest_rank(means, tail) + upper = nearest_rank(means, 1.0 - tail) + assert lower is not None and upper is not None + return float(lower), float(upper) + + +def summarize_rates(statuses: Iterable[str]) -> dict[str, int | float]: + """Summarize success, error, and timeout rates over attempted operations.""" + + observed = list(statuses) + unknown = sorted(set(observed) - OUTCOME_STATUSES) + if unknown: + raise ValueError(f"unknown outcome status: {', '.join(unknown)}") + attempt_count = len(observed) + success_count = observed.count("success") + timeout_count = observed.count("timeout") + error_count = attempt_count - success_count + denominator = float(attempt_count) + return { + "attempt_count": attempt_count, + "success_count": success_count, + "error_count": error_count, + "timeout_count": timeout_count, + "success_rate": success_count / denominator if attempt_count else 0.0, + "error_rate": error_count / denominator if attempt_count else 0.0, + "timeout_rate": timeout_count / denominator if attempt_count else 0.0, + } + + +def summarize_throughput( + *, + completed_count: int, + elapsed_ns: int, + total_bytes: int = 0, +) -> dict[str, int | float]: + """Compute operation and byte throughput from a positive wall duration.""" + + for name, value in ( + ("completed_count", completed_count), + ("total_bytes", total_bytes), + ): + if isinstance(value, bool) or not isinstance(value, int) or value < 0: + raise ValueError(f"{name} must be a non-negative integer") + if isinstance(elapsed_ns, bool) or not isinstance(elapsed_ns, int) or elapsed_ns <= 0: + raise ValueError("elapsed_ns must be a positive integer") + elapsed_seconds = elapsed_ns / 1_000_000_000 + return { + "elapsed_ns": elapsed_ns, + "completed_count": completed_count, + "total_bytes": total_bytes, + "operations_per_second": completed_count / elapsed_seconds, + "bytes_per_second": total_bytes / elapsed_seconds, + } diff --git a/benchmark_data/runtime/storage_workloads.py b/benchmark_data/runtime/storage_workloads.py new file mode 100644 index 0000000000..6c18423b3c --- /dev/null +++ b/benchmark_data/runtime/storage_workloads.py @@ -0,0 +1,686 @@ +"""Deterministic storage/index/query benchmark workload descriptions. + +These immutable values describe measurement fixtures. They are not product +contracts and do not assert that a runtime operation is available. +""" + +from __future__ import annotations + +import json +import re +from collections.abc import Callable, Iterable, Sequence +from dataclasses import dataclass +from enum import Enum +from typing import Any + + +BENCHMARK_AUTHORITY = "measurement_fixture_not_product_contract" +DECLARED_CRATE_LANES = ( + "tracedecay-domain", + "tracedecay-store", + "tracedecay-query", + "tracedecay-code-index", + "tracedecay-application", + "tracedecay-rusqlite-runtime", + "tracedecay", +) +_THROUGHPUT_CONCURRENCY = (1, 4, 8) +_FORBIDDEN_IDENTITY = re.compile( + r"(?:^|[-_])(pr[-_]?\d+|stage[-_]?\d+|milestone)(?:$|[-_])" +) + + +class Surface(str, Enum): + CLI = "cli" + MCP = "mcp" + + +class RuntimeState(str, Enum): + COLD = "cold" + ADMISSION = "admission" + FIRST = "first" + WARM = "warm" + REPEAT = "repeat" + PERSISTENT = "persistent" + NO_OP = "no-op" + CONTENTION = "contention" + RECOVERY = "recovery" + + +class ColdWarm(str, Enum): + COLD = "cold" + WARM = "warm" + + +class AvailabilityExpectation(str, Enum): + REQUIRED_AVAILABLE = "required-available" + MAY_BE_UNAVAILABLE = "may-be-unavailable" + MAY_BE_UNSUPPORTED = "may-be-unsupported" + + +class AvailabilityStatus(str, Enum): + AVAILABLE = "available" + UNAVAILABLE = "unavailable" + UNSUPPORTED = "unsupported" + + +class TimeoutPhase(str, Enum): + PROCESS_START = "process-start" + PROJECT_ADMISSION = "project-admission" + INDEX_ADMISSION = "index-admission" + QUERY = "query" + STORAGE = "storage" + LCM = "lcm" + COMPOSITE = "composite" + PAYLOAD = "payload" + RECOVERY = "recovery" + + +class ResultDigestPolicy(str, Enum): + ORDERED_JSON = "ordered-json" + UNORDERED_JSON = "unordered-json" + STATUS_AND_COUNTS = "status-and-counts" + + +class CapturePolicy(str, Enum): + N1_REGRESSION_ONLY = "n=1_regression_only" + DISTRIBUTION = "distribution" + + +class CatalogValidationError(ValueError): + """The workload catalog violates a deterministic benchmark contract.""" + + +@dataclass(frozen=True) +class PercentileEligibility: + matching_sample_count: int + p95_eligible: bool + p99_eligible: bool + junit_retained_sample_count: int + junit_retention_excluded: bool = True + + +def percentile_eligibility( + matching_sample_count: int, + *, + junit_retained_sample_count: int = 0, +) -> PercentileEligibility: + """Classify percentiles from matching measured samples, never JUnit history.""" + + for name, count in ( + ("matching_sample_count", matching_sample_count), + ("junit_retained_sample_count", junit_retained_sample_count), + ): + if not isinstance(count, int) or isinstance(count, bool) or count < 0: + raise ValueError(f"{name} must be a non-negative integer") + return PercentileEligibility( + matching_sample_count=matching_sample_count, + p95_eligible=matching_sample_count >= 40, + p99_eligible=matching_sample_count >= 100, + junit_retained_sample_count=junit_retained_sample_count, + ) + + +@dataclass(frozen=True) +class CapturePlan: + policy: CapturePolicy + measured_sample_count: int + label: str + distribution_evidence: bool + percentiles: PercentileEligibility + + +def build_capture_plan( + policy: CapturePolicy, + measured_sample_count: int | None = None, +) -> CapturePlan: + """Build truthful capture metadata without defining an SLO gate.""" + + if policy is CapturePolicy.N1_REGRESSION_ONLY: + if measured_sample_count not in (None, 1): + raise ValueError("n=1_regression_only requires measured_sample_count 1") + count = 1 + distribution = False + elif policy is CapturePolicy.DISTRIBUTION: + if measured_sample_count is None: + raise ValueError("distribution requires explicit measured_sample_count") + if ( + not isinstance(measured_sample_count, int) + or isinstance(measured_sample_count, bool) + or measured_sample_count <= 1 + ): + raise ValueError("distribution measured_sample_count must be greater than one") + count = measured_sample_count + distribution = True + else: + raise ValueError(f"unknown capture policy: {policy!r}") + return CapturePlan( + policy=policy, + measured_sample_count=count, + label=policy.value, + distribution_evidence=distribution, + percentiles=percentile_eligibility(count), + ) + + +N1_CAPTURE_PLAN = build_capture_plan(CapturePolicy.N1_REGRESSION_ONLY) + + +@dataclass(frozen=True) +class AbbaPairingMetadata: + execution_order: tuple[str, str, str, str] + pair_indices: tuple[tuple[int, int], tuple[int, int]] + retain_raw_samples: bool + + +ABBA_PAIRING = AbbaPairingMetadata( + execution_order=("A", "B", "B", "A"), + pair_indices=((0, 1), (3, 2)), + retain_raw_samples=True, +) + + +ArgumentFactory = Callable[[], dict[str, Any]] + + +def _argument_factory(arguments: dict[str, Any]) -> ArgumentFactory: + encoded = json.dumps(arguments, sort_keys=True, separators=(",", ":")) + + def build() -> dict[str, Any]: + value = json.loads(encoded) + if not isinstance(value, dict): + raise AssertionError("workload arguments must decode to an object") + return value + + return build + + +@dataclass(frozen=True) +class WorkloadDescriptor: + id: str + journey_id: str + operation: str + surface: Surface + runtime_state: RuntimeState + availability_expectation: AvailabilityExpectation + timeout_phase: TimeoutPhase + result_digest_policy: ResultDigestPolicy + throughput_meaningful: bool + concurrency: tuple[int, ...] + crate_tags: tuple[str, ...] + _arguments: ArgumentFactory + capture_plan: CapturePlan = N1_CAPTURE_PLAN + abba_pairing: AbbaPairingMetadata = ABBA_PAIRING + + def arguments(self) -> dict[str, Any]: + """Return a fresh deterministic argument object.""" + + return self._arguments() + + +def _workload( + id: str, + journey_id: str, + operation: str, + surface: Surface, + runtime_state: RuntimeState, + crate_tags: tuple[str, ...], + arguments: dict[str, Any], + *, + availability: AvailabilityExpectation = AvailabilityExpectation.REQUIRED_AVAILABLE, + timeout_phase: TimeoutPhase = TimeoutPhase.QUERY, + digest: ResultDigestPolicy = ResultDigestPolicy.ORDERED_JSON, + throughput: bool = False, +) -> WorkloadDescriptor: + return WorkloadDescriptor( + id=id, + journey_id=journey_id, + operation=operation, + surface=surface, + runtime_state=runtime_state, + availability_expectation=availability, + timeout_phase=timeout_phase, + result_digest_policy=digest, + throughput_meaningful=throughput, + concurrency=_THROUGHPUT_CONCURRENCY if throughput else (), + crate_tags=crate_tags, + _arguments=_argument_factory(arguments), + ) + + +_EXACT_LANES = ( + "tracedecay-domain", + "tracedecay-query", + "tracedecay-code-index", + "tracedecay-application", + "tracedecay", +) +_QUERY_LANES = ( + "tracedecay-query", + "tracedecay-code-index", + "tracedecay-application", + "tracedecay", +) +_STORAGE_LANES = ( + "tracedecay-store", + "tracedecay-rusqlite-runtime", + "tracedecay-application", + "tracedecay", +) +_SESSION_LANES = ( + "tracedecay-store", + "tracedecay-rusqlite-runtime", + "tracedecay-query", + "tracedecay-application", + "tracedecay", +) + + +WORKLOADS = ( + _workload( + "exact-symbol-cold", + "exact-symbol", + "tracedecay_find_exact_symbol", + Surface.CLI, + RuntimeState.COLD, + _EXACT_LANES, + {"name": "stable_symbol", "limit": 20, "format": "json"}, + timeout_phase=TimeoutPhase.PROCESS_START, + ), + _workload( + "exact-declaration-first", + "exact-declaration", + "tracedecay_code_declaration", + Surface.MCP, + RuntimeState.FIRST, + _EXACT_LANES, + {"occurrence_id": "occurrence-stable", "format": "json"}, + ), + _workload( + "exact-occurrence-warm", + "exact-occurrence", + "tracedecay_code_exact_occurrence", + Surface.MCP, + RuntimeState.WARM, + _EXACT_LANES, + { + "literal": "stable::literal", + "scope": {"generation": "generation-stable"}, + "format": "json", + }, + ), + _workload( + "lexical-grep-repeat", + "lexical-grep", + "tracedecay_grep", + Surface.CLI, + RuntimeState.REPEAT, + _QUERY_LANES, + {"pattern": "stable_literal", "fixed_strings": True, "format": "json"}, + ), + _workload( + "lexical-phrase-warm", + "lexical-phrase", + "tracedecay_code_phrase_search", + Surface.MCP, + RuntimeState.WARM, + _QUERY_LANES, + {"phrases": ["stable phrase"], "limit": 20, "format": "json"}, + ), + _workload( + "graph-callers-warm", + "graph-callers", + "tracedecay_callers", + Surface.MCP, + RuntimeState.WARM, + _QUERY_LANES, + {"node_id": "node-stable", "max_depth": 2, "format": "json"}, + ), + _workload( + "graph-callees-repeat", + "graph-callees", + "tracedecay_callees", + Surface.MCP, + RuntimeState.REPEAT, + _QUERY_LANES, + {"node_id": "node-stable", "max_depth": 2, "format": "json"}, + ), + _workload( + "graph-impact-persistent", + "graph-impact", + "tracedecay_impact", + Surface.MCP, + RuntimeState.PERSISTENT, + _QUERY_LANES, + {"node_id": "node-stable", "max_depth": 2, "format": "json"}, + digest=ResultDigestPolicy.UNORDERED_JSON, + ), + _workload( + "project-discovery-cold", + "project-discovery", + "tracedecay_active_project", + Surface.CLI, + RuntimeState.COLD, + _STORAGE_LANES, + {"format": "json"}, + timeout_phase=TimeoutPhase.PROCESS_START, + ), + _workload( + "project-open-admission", + "project-open", + "tracedecay_project_context", + Surface.MCP, + RuntimeState.ADMISSION, + _STORAGE_LANES, + {"project_path": "/fixture/project", "format": "json"}, + timeout_phase=TimeoutPhase.PROJECT_ADMISSION, + ), + _workload( + "index-admission-first", + "index-admission", + "tracedecay_code_symbol_search", + Surface.MCP, + RuntimeState.FIRST, + _QUERY_LANES, + {"query": "stable_symbol", "limit": 20, "format": "json"}, + timeout_phase=TimeoutPhase.INDEX_ADMISSION, + ), + _workload( + "session-search-persistent", + "storage-session-search", + "tracedecay_message_search", + Surface.MCP, + RuntimeState.PERSISTENT, + _SESSION_LANES, + {"query": "session sentinel", "provider": "codex", "limit": 20}, + timeout_phase=TimeoutPhase.STORAGE, + ), + _workload( + "lcm-grep-persistent", + "lcm-grep", + "tracedecay_lcm_grep", + Surface.MCP, + RuntimeState.PERSISTENT, + _SESSION_LANES, + {"query": "session sentinel", "session_id": "session-stable"}, + availability=AvailabilityExpectation.MAY_BE_UNAVAILABLE, + timeout_phase=TimeoutPhase.LCM, + ), + _workload( + "lcm-expand-warm", + "lcm-expand", + "tracedecay_lcm_expand", + Surface.MCP, + RuntimeState.WARM, + _SESSION_LANES, + {"node_id": "summary-stable", "session_id": "session-stable"}, + availability=AvailabilityExpectation.MAY_BE_UNSUPPORTED, + timeout_phase=TimeoutPhase.LCM, + ), + _workload( + "lcm-query-repeat", + "lcm-query", + "tracedecay_lcm_expand_query", + Surface.MCP, + RuntimeState.REPEAT, + _SESSION_LANES, + {"query": "stable query", "session_id": "session-stable"}, + availability=AvailabilityExpectation.MAY_BE_UNAVAILABLE, + timeout_phase=TimeoutPhase.LCM, + ), + _workload( + "context-composite-warm", + "context-composite", + "tracedecay_context", + Surface.MCP, + RuntimeState.WARM, + DECLARED_CRATE_LANES, + { + "task": "stable storage index query", + "keywords": ["storage", "index", "query"], + "include_code": True, + "format": "json", + }, + timeout_phase=TimeoutPhase.COMPOSITE, + digest=ResultDigestPolicy.UNORDERED_JSON, + ), + _workload( + "payload-stress-cold", + "payload-stress", + "tracedecay_context", + Surface.CLI, + RuntimeState.COLD, + DECLARED_CRATE_LANES, + {"task": "payload stress", "keywords": ["x" * 65536], "format": "json"}, + timeout_phase=TimeoutPhase.PAYLOAD, + ), + _workload( + "index-no-op-warm", + "index-no-op", + "tracedecay_code_symbol_search", + Surface.MCP, + RuntimeState.NO_OP, + _QUERY_LANES, + {"query": "definitely_absent_fixture_symbol", "limit": 1, "format": "json"}, + digest=ResultDigestPolicy.STATUS_AND_COUNTS, + ), + _workload( + "storage-contention-persistent", + "storage-contention", + "tracedecay_message_search", + Surface.MCP, + RuntimeState.CONTENTION, + _SESSION_LANES, + {"query": "contention sentinel", "provider": "codex", "limit": 20}, + timeout_phase=TimeoutPhase.STORAGE, + throughput=True, + ), + _workload( + "storage-recovery-warm", + "storage-recovery", + "tracedecay_storage_status", + Surface.CLI, + RuntimeState.RECOVERY, + ( + "tracedecay-store", + "tracedecay-code-index", + "tracedecay-application", + "tracedecay", + ), + {"format": "json"}, + timeout_phase=TimeoutPhase.RECOVERY, + digest=ResultDigestPolicy.STATUS_AND_COUNTS, + ), +) + + +@dataclass(frozen=True) +class AvailabilityAssessment: + status: AvailabilityStatus + operation: str + detail: str | None + + @property + def runnable(self) -> bool: + return self.status is AvailabilityStatus.AVAILABLE + + +def assess_availability( + workload: WorkloadDescriptor, + *, + available_operations: Iterable[str], + unsupported_operations: Iterable[str] = (), +) -> AvailabilityAssessment: + """Classify runtime capability without converting absence into success.""" + + available = frozenset(available_operations) + unsupported = frozenset(unsupported_operations) + if workload.operation in unsupported: + return AvailabilityAssessment( + AvailabilityStatus.UNSUPPORTED, + workload.operation, + f"{workload.operation} is explicitly unsupported", + ) + if workload.operation in available: + return AvailabilityAssessment( + AvailabilityStatus.AVAILABLE, + workload.operation, + None, + ) + return AvailabilityAssessment( + AvailabilityStatus.UNAVAILABLE, + workload.operation, + f"{workload.operation} is not available in this runtime", + ) + + +def workloads_for_crate( + crate_tag: str, + workloads: Sequence[WorkloadDescriptor] | None = None, +) -> tuple[WorkloadDescriptor, ...]: + catalog = WORKLOADS if workloads is None else tuple(workloads) + return tuple(item for item in catalog if crate_tag in item.crate_tags) + + +def group_workloads_by_crate( + crate_tags: Iterable[str] = DECLARED_CRATE_LANES, + workloads: Sequence[WorkloadDescriptor] | None = None, +) -> tuple[tuple[str, tuple[WorkloadDescriptor, ...]], ...]: + catalog = WORKLOADS if workloads is None else tuple(workloads) + return tuple( + (crate_tag, workloads_for_crate(crate_tag, catalog)) + for crate_tag in crate_tags + ) + + +@dataclass(frozen=True) +class NormalizationMetadata: + platform: str + shard: str + storage_mode: str + concurrency: int + cold_warm: ColdWarm + + +@dataclass(frozen=True) +class RuntimeTestIdentity: + id: str + crate_tag: str + journey_id: str + workload_id: str + normalization: NormalizationMetadata + + +def _cold_warm(state: RuntimeState) -> ColdWarm: + if state in {RuntimeState.COLD, RuntimeState.ADMISSION, RuntimeState.FIRST}: + return ColdWarm.COLD + return ColdWarm.WARM + + +def runtime_test_identities( + *, + platform: str, + shard: str, + storage_mode: str, + workloads: Sequence[WorkloadDescriptor] | None = None, +) -> tuple[RuntimeTestIdentity, ...]: + """Expand stable final-V2 workload IDs with explicit normalization data.""" + + for name, value in ( + ("platform", platform), + ("shard", shard), + ("storage_mode", storage_mode), + ): + if not isinstance(value, str) or not value: + raise ValueError(f"{name} must be a non-empty string") + catalog = validate_workloads(WORKLOADS if workloads is None else workloads) + identities: list[RuntimeTestIdentity] = [] + for crate_tag in DECLARED_CRATE_LANES: + for workload in workloads_for_crate(crate_tag, catalog): + concurrencies = workload.concurrency or (1,) + for concurrency in concurrencies: + identity = ( + f"v2::{crate_tag}::{workload.journey_id}::{workload.id}::" + f"{workload.surface.value}::{workload.runtime_state.value}::c{concurrency}" + ) + identities.append( + RuntimeTestIdentity( + id=identity, + crate_tag=crate_tag, + journey_id=workload.journey_id, + workload_id=workload.id, + normalization=NormalizationMetadata( + platform=platform, + shard=shard, + storage_mode=storage_mode, + concurrency=concurrency, + cold_warm=_cold_warm(workload.runtime_state), + ), + ) + ) + return tuple(identities) + + +def validate_workloads( + workloads: Sequence[WorkloadDescriptor] | None = None, + crate_lanes: Sequence[str] = DECLARED_CRATE_LANES, +) -> tuple[WorkloadDescriptor, ...]: + """Validate identities, lane coverage, arguments, and throughput metadata.""" + + catalog = WORKLOADS if workloads is None else tuple(workloads) + ids = [item.id for item in catalog] + duplicates = sorted({id for id in ids if ids.count(id) > 1}) + if duplicates: + raise CatalogValidationError( + "duplicate workload id: " + ", ".join(duplicates) + ) + declared = set(crate_lanes) + covered: set[str] = set() + for workload in catalog: + identities = (workload.id, workload.journey_id, *workload.crate_tags) + forbidden = next( + (identity for identity in identities if _FORBIDDEN_IDENTITY.search(identity)), + None, + ) + if forbidden is not None: + raise CatalogValidationError( + f"PR stage or milestone identity is forbidden: {forbidden}" + ) + if len(workload.crate_tags) != len(set(workload.crate_tags)): + raise CatalogValidationError(f"{workload.id} has duplicate crate tags") + unknown = set(workload.crate_tags) - declared + if unknown: + raise CatalogValidationError( + f"{workload.id} has undeclared crate tags: {sorted(unknown)}" + ) + covered.update(workload.crate_tags) + if workload.throughput_meaningful: + if workload.concurrency != _THROUGHPUT_CONCURRENCY: + raise CatalogValidationError( + f"{workload.id} throughput concurrency must be (1, 4, 8)" + ) + elif workload.concurrency: + raise CatalogValidationError( + f"{workload.id} declares concurrency without throughput" + ) + first = workload.arguments() + second = workload.arguments() + if first != second or first is second: + raise CatalogValidationError( + f"{workload.id} argument factory must be deterministic and fresh" + ) + try: + json.dumps(first, sort_keys=True, allow_nan=False) + except (TypeError, ValueError) as exc: + raise CatalogValidationError( + f"{workload.id} arguments are not deterministic JSON: {exc}" + ) from exc + missing = sorted(declared - covered) + if missing: + raise CatalogValidationError( + "declared crate lanes lack representative workloads: " + ", ".join(missing) + ) + return catalog + + +validate_workloads(WORKLOADS) diff --git a/benchmark_data/runtime/tests/test_adversarial.py b/benchmark_data/runtime/tests/test_adversarial.py new file mode 100644 index 0000000000..5c8615f225 --- /dev/null +++ b/benchmark_data/runtime/tests/test_adversarial.py @@ -0,0 +1,652 @@ +#!/usr/bin/env python3 +"""Adversarial black-box tests for the runtime performance harness CLI.""" + +from __future__ import annotations + +import json +import os +import shutil +import stat +import subprocess +import sys +import tempfile +import textwrap +import unittest +from pathlib import Path +from typing import Mapping, Sequence + + +ROOT = Path(__file__).resolve().parents[3] +RUNNER = ROOT / "benchmark_data" / "runtime" / "run.py" +WRAPPER = ROOT / "scripts" / "run-runtime-performance.sh" +DOCUMENTATION = ROOT / "docs" / "development" / "runtime-performance.md" +SUBCOMMANDS = ( + "prepare", + "capture", + "paired", + "compare", + "smoke", + "graph-capture", + "graph-paired", +) +OPERATOR_PROFILE_VARIABLES = ( + "TRACEDECAY_HOME", + "TRACEDECAY_PROFILE", + "TRACEDECAY_PROFILE_DIR", +) + +sys.path.insert(0, os.fspath(ROOT)) +from benchmark_data.runtime.graph_measurements import ( # noqa: E402 + EXECUTABLE_SNAPSHOT_SUPPORTED, +) + + +def run_command( + arguments: Sequence[os.PathLike[str] | str], + *, + environment: Mapping[str, str] | None = None, + cwd: Path = ROOT, +) -> subprocess.CompletedProcess[str]: + command = [os.fspath(argument) for argument in arguments] + return subprocess.run( + command, + cwd=cwd, + env=dict(environment) if environment is not None else None, + capture_output=True, + text=True, + check=False, + timeout=15, + ) + + +def make_executable(path: Path, body: str) -> None: + path.write_text(body, encoding="utf-8") + path.chmod(path.stat().st_mode | stat.S_IXUSR) + + +class RuntimePerformanceAdversarialTest(unittest.TestCase): + maxDiff = None + + def test_help_lists_every_supported_subcommand(self) -> None: + result = run_command((sys.executable, RUNNER, "--help")) + + self.assertEqual(result.returncode, 0, result.stderr) + for subcommand in SUBCOMMANDS: + self.assertIn(subcommand, result.stdout) + + def test_missing_binary_is_rejected_before_output_profile_creation(self) -> None: + with tempfile.TemporaryDirectory() as directory: + temporary = Path(directory) + output = temporary / "must not exist" / "capture.json" + missing_binary = temporary / "missing tracedecay" + + result = run_command( + ( + sys.executable, + RUNNER, + "capture", + "--binary", + missing_binary, + "--output", + output, + ) + ) + + self.assertNotEqual(result.returncode, 0) + self.assertFalse(output.parent.exists()) + self.assertIn("binary", result.stderr.lower()) + + def test_non_executable_binary_is_rejected_before_output_profile_creation( + self, + ) -> None: + with tempfile.TemporaryDirectory() as directory: + temporary = Path(directory) + output = temporary / "must not exist" / "capture.json" + binary = temporary / "not executable" + binary.write_text("#!/bin/sh\nexit 0\n", encoding="utf-8") + + result = run_command( + ( + sys.executable, + RUNNER, + "capture", + "--binary", + binary, + "--output", + output, + ) + ) + + self.assertNotEqual(result.returncode, 0) + self.assertFalse(output.parent.exists()) + self.assertIn("executable", result.stderr.lower()) + + def test_graph_capture_reports_invalid_executable_without_traceback(self) -> None: + with tempfile.TemporaryDirectory() as directory: + temporary = Path(directory) + binary = temporary / "invalid executable" + binary.write_text("not an executable format\n", encoding="utf-8") + binary.chmod(0o700) + output = temporary / "graph.json" + + result = run_command( + ( + sys.executable, + RUNNER, + "graph-capture", + "--criterion-binary", + f"invalid={binary}", + "--output", + output, + ) + ) + + self.assertEqual(result.returncode, 2, result.stderr) + self.assertFalse(output.exists()) + self.assertRegex( + result.stderr, + r"cannot (?:execute|launch) measurement binary|" + r"requires sealed-memory descriptor snapshots", + ) + self.assertNotIn("traceback", result.stderr.casefold()) + + def test_graph_capture_reports_unsupported_snapshot_platform_truthfully( + self, + ) -> None: + with tempfile.TemporaryDirectory() as directory: + temporary = Path(directory) + binary = temporary / "valid executable" + make_executable(binary, "#!/bin/sh\nexit 0\n") + result = run_command( + ( + sys.executable, + RUNNER, + "graph-capture", + "--criterion-binary", + f"valid={binary}", + "--output", + temporary / "graph.json", + ) + ) + + if EXECUTABLE_SNAPSHOT_SUPPORTED: + self.assertNotIn( + "requires sealed-memory descriptor snapshots", + result.stderr, + ) + else: + self.assertEqual(result.returncode, 2, result.stderr) + self.assertIn( + "requires sealed-memory descriptor snapshots", + result.stderr, + ) + self.assertNotIn("traceback", result.stderr.casefold()) + + def test_paired_rejects_identical_baseline_and_treatment_binaries(self) -> None: + with tempfile.TemporaryDirectory() as directory: + temporary = Path(directory) + binary = temporary / "same binary" + make_executable(binary, "#!/bin/sh\nexit 0\n") + output = temporary / "paired.json" + + result = run_command( + ( + sys.executable, + RUNNER, + "paired", + "--baseline", + binary, + "--treatment", + binary, + "--output", + output, + ) + ) + + self.assertNotEqual(result.returncode, 0) + self.assertFalse(output.exists()) + self.assertIn("same", result.stderr.lower()) + + def test_compare_rejects_malformed_report(self) -> None: + with tempfile.TemporaryDirectory() as directory: + temporary = Path(directory) + malformed = temporary / "malformed.json" + malformed.write_text("{not-json", encoding="utf-8") + treatment = temporary / "treatment.json" + treatment.write_text( + json.dumps({"schema_version": 1, "fixture_digest": "fixture-a"}), + encoding="utf-8", + ) + output = temporary / "comparison.json" + + result = run_command( + ( + sys.executable, + RUNNER, + "compare", + "--baseline", + malformed, + "--treatment", + treatment, + "--output", + output, + ) + ) + + self.assertNotEqual(result.returncode, 0) + self.assertFalse(output.exists()) + self.assertIn("json", result.stderr.lower()) + + def test_compare_rejects_mismatched_report_schema(self) -> None: + with tempfile.TemporaryDirectory() as directory: + temporary = Path(directory) + baseline = temporary / "baseline.json" + treatment = temporary / "treatment.json" + baseline.write_text( + json.dumps({"schema_version": 1, "fixture_digest": "fixture-a"}), + encoding="utf-8", + ) + treatment.write_text( + json.dumps({"schema_version": 2, "fixture_digest": "fixture-a"}), + encoding="utf-8", + ) + output = temporary / "comparison.json" + + result = run_command( + ( + sys.executable, + RUNNER, + "compare", + "--baseline", + baseline, + "--treatment", + treatment, + "--output", + output, + ) + ) + + self.assertNotEqual(result.returncode, 0) + self.assertFalse(output.exists()) + self.assertIn("schema", result.stderr.lower()) + + def test_compare_requires_final_v2_identity_and_measurements(self) -> None: + with tempfile.TemporaryDirectory() as directory: + temporary = Path(directory) + baseline = temporary / "baseline.json" + treatment = temporary / "treatment.json" + incomplete = {"schema_version": 1, "fixture_digest": "fixture-a"} + baseline.write_text(json.dumps(incomplete), encoding="utf-8") + treatment.write_text(json.dumps(incomplete), encoding="utf-8") + output = temporary / "comparison.json" + + result = run_command( + ( + sys.executable, + RUNNER, + "compare", + "--baseline", + baseline, + "--treatment", + treatment, + "--output", + output, + ) + ) + + self.assertNotEqual(result.returncode, 0) + self.assertFalse(output.exists()) + self.assertRegex( + result.stderr.lower(), + r"identity|crate_id|journey_id|workload_id|measurement", + ) + + def test_compare_rejects_pr_stage_and_milestone_budget_fields(self) -> None: + forbidden_fields = ( + ("pr_stage", "PR14"), + ("milestone_budget_ns", 1_000_000), + ) + for field, value in forbidden_fields: + with self.subTest(field=field), tempfile.TemporaryDirectory() as directory: + temporary = Path(directory) + baseline = temporary / "baseline.json" + treatment = temporary / "treatment.json" + report = { + "schema_version": 1, + "fixture_digest": "fixture-a", + field: value, + } + baseline.write_text(json.dumps(report), encoding="utf-8") + treatment.write_text(json.dumps(report), encoding="utf-8") + output = temporary / "comparison.json" + + result = run_command( + ( + sys.executable, + RUNNER, + "compare", + "--baseline", + baseline, + "--treatment", + treatment, + "--output", + output, + ) + ) + + self.assertNotEqual(result.returncode, 0) + self.assertFalse(output.exists()) + self.assertIn(field, result.stderr.lower()) + + def test_compare_rejects_unwired_remote_success(self) -> None: + with tempfile.TemporaryDirectory() as directory: + temporary = Path(directory) + baseline = temporary / "baseline.json" + treatment = temporary / "treatment.json" + unwired_success = { + "schema_version": 1, + "fixture_digest": "fixture-a", + "identity": { + "crate_id": "integrated-v2", + "journey_id": "remote-final-v2", + "workload_id": "remote-context", + }, + "production_route": { + "committed": False, + "mounted": False, + }, + "outcome": {"status": "success"}, + } + baseline.write_text(json.dumps(unwired_success), encoding="utf-8") + treatment.write_text(json.dumps(unwired_success), encoding="utf-8") + output = temporary / "comparison.json" + + result = run_command( + ( + sys.executable, + RUNNER, + "compare", + "--baseline", + baseline, + "--treatment", + treatment, + "--output", + output, + ) + ) + + self.assertNotEqual(result.returncode, 0) + self.assertFalse(output.exists()) + self.assertRegex( + result.stderr.lower(), + r"route|mounted|unwired|committed", + ) + + def test_documentation_covers_final_v2_runtime_lanes(self) -> None: + documentation = DOCUMENTATION.read_text(encoding="utf-8") + normalized = " ".join(documentation.casefold().split()) + required_phrases = ( + "final v2", + "per-crate", + "integrated", + "crate identity", + "journey identity", + "workload identity", + "cold", + "warm", + "no-op", + "contention", + "recovery", + "abba", + "raw samples", + "n=1", + "distribution", + "unavailable", + "cargo benchmarks", + "platform", + "shard", + "storage mode", + "concurrency", + "cold/warm", + "junit retention", + "percentile history", + "p95", + "40 matching samples", + "p99", + "100 matching samples", + "readiness", + "reaping", + "committed production route", + "contract-only unwired success", + ) + for phrase in required_phrases: + with self.subTest(phrase=phrase): + self.assertIn(phrase, normalized) + self.assertNotRegex(documentation, r"(?i)\bPR[\s_-]*\d+\b") + self.assertNotRegex( + documentation, + r"(?i)\bmilestone[\s_-]*(?:latency[\s_-]*)?budget", + ) + + def test_prepare_validation_never_launches_a_daemon(self) -> None: + with tempfile.TemporaryDirectory() as directory: + temporary = Path(directory) + invocations = temporary / "invocations.jsonl" + binary = temporary / "fake tracedecay" + make_executable( + binary, + textwrap.dedent( + """\ + #!/usr/bin/env python3 + import json + import os + import sys + from pathlib import Path + + with Path(os.environ["TRACEDECAY_TEST_INVOCATIONS"]).open( + "a", encoding="utf-8" + ) as stream: + stream.write(json.dumps(sys.argv[1:]) + "\\n") + """ + ), + ) + environment = os.environ.copy() + environment["TRACEDECAY_TEST_INVOCATIONS"] = os.fspath(invocations) + + result = run_command( + ( + sys.executable, + RUNNER, + "prepare", + "--binary", + binary, + "--output", + temporary / "prepared", + ), + environment=environment, + ) + + self.assertEqual(result.returncode, 0, result.stderr) + if invocations.exists(): + for line in invocations.read_text(encoding="utf-8").splitlines(): + arguments = json.loads(line) + self.assertNotIn("daemon", arguments) + + def test_prepare_uses_explicit_output_without_operator_profile_leakage( + self, + ) -> None: + with tempfile.TemporaryDirectory() as directory: + temporary = Path(directory) + operator_home = temporary / "operator home" + operator_home.mkdir() + sentinel = operator_home / "keep" + sentinel.write_text("untouched", encoding="utf-8") + binary = temporary / "fake tracedecay" + make_executable(binary, "#!/bin/sh\nexit 0\n") + output = temporary / "explicit output" + environment = os.environ.copy() + environment["HOME"] = os.fspath(operator_home) + for variable in OPERATOR_PROFILE_VARIABLES: + environment[variable] = os.fspath(operator_home / variable.lower()) + + result = run_command( + ( + sys.executable, + RUNNER, + "prepare", + "--binary", + binary, + "--output", + output, + ), + environment=environment, + ) + + self.assertEqual(result.returncode, 0, result.stderr) + self.assertTrue(output.exists()) + self.assertEqual( + sorted(path.name for path in operator_home.iterdir()), + [sentinel.name], + ) + self.assertEqual(sentinel.read_text(encoding="utf-8"), "untouched") + + def test_shell_wrapper_preserves_space_containing_arguments(self) -> None: + self.assertTrue(WRAPPER.is_file(), f"missing shell wrapper: {WRAPPER}") + + with tempfile.TemporaryDirectory(prefix="runtime wrapper ") as directory: + temporary_root = Path(directory) + scripts = temporary_root / "scripts" + runtime = temporary_root / "benchmark_data" / "runtime" + scripts.mkdir() + runtime.mkdir(parents=True) + copied_wrapper = scripts / WRAPPER.name + shutil.copy2(WRAPPER, copied_wrapper) + recorded = temporary_root / "recorded arguments.json" + (runtime / "run.py").write_text( + textwrap.dedent( + """\ + import json + import os + import sys + from pathlib import Path + + Path(os.environ["TRACEDECAY_TEST_RECORDED"]).write_text( + json.dumps(sys.argv[1:]), encoding="utf-8" + ) + """ + ), + encoding="utf-8", + ) + arguments = ( + "capture", + "--binary", + temporary_root / "binary with spaces", + "--output", + temporary_root / "output with spaces.json", + "literal * [still one argument]", + ) + environment = os.environ.copy() + environment["TRACEDECAY_TEST_RECORDED"] = os.fspath(recorded) + + result = run_command( + (copied_wrapper, *arguments), + environment=environment, + cwd=temporary_root, + ) + + self.assertEqual(result.returncode, 0, result.stderr) + self.assertEqual( + json.loads(recorded.read_text(encoding="utf-8")), + [os.fspath(argument) for argument in arguments], + ) + + def test_shell_wrapper_ignores_path_tools_and_operator_profile(self) -> None: + self.assertTrue(WRAPPER.is_file(), f"missing shell wrapper: {WRAPPER}") + + with tempfile.TemporaryDirectory(prefix="runtime wrapper ") as directory: + temporary_root = Path(directory) + scripts = temporary_root / "scripts" + runtime = temporary_root / "benchmark_data" / "runtime" + path_tools = temporary_root / "path tools" + scripts.mkdir() + runtime.mkdir(parents=True) + path_tools.mkdir() + copied_wrapper = scripts / WRAPPER.name + shutil.copy2(WRAPPER, copied_wrapper) + recorded = temporary_root / "recorded environment.json" + forbidden = temporary_root / "forbidden invocation" + (runtime / "run.py").write_text( + textwrap.dedent( + """\ + import json + import os + import sys + from pathlib import Path + + profile_variables = ( + "TRACEDECAY_HOME", + "TRACEDECAY_PROFILE", + "TRACEDECAY_PROFILE_DIR", + ) + Path(os.environ["TRACEDECAY_TEST_RECORDED"]).write_text( + json.dumps( + { + "arguments": sys.argv[1:], + "profiles": { + name: os.environ.get(name) + for name in profile_variables + }, + } + ), + encoding="utf-8", + ) + """ + ), + encoding="utf-8", + ) + forbidden_body = textwrap.dedent( + """\ + #!/bin/sh + printf '%s\n' "$0" >> "$TRACEDECAY_TEST_FORBIDDEN" + exit 99 + """ + ) + for name in ("cargo", "tracedecay"): + make_executable(path_tools / name, forbidden_body) + arguments = ( + "capture", + "--binary", + temporary_root / "explicit tracedecay", + "--output", + temporary_root / "capture.json", + ) + environment = os.environ.copy() + environment["PATH"] = ( + os.fspath(path_tools) + os.pathsep + environment.get("PATH", "") + ) + environment["TRACEDECAY_TEST_RECORDED"] = os.fspath(recorded) + environment["TRACEDECAY_TEST_FORBIDDEN"] = os.fspath(forbidden) + for variable in OPERATOR_PROFILE_VARIABLES: + environment[variable] = os.fspath(temporary_root / variable.lower()) + + result = run_command( + (copied_wrapper, *arguments), + environment=environment, + cwd=temporary_root, + ) + + self.assertEqual(result.returncode, 0, result.stderr) + self.assertFalse(forbidden.exists()) + observation = json.loads(recorded.read_text(encoding="utf-8")) + self.assertEqual( + observation["arguments"], + [os.fspath(argument) for argument in arguments], + ) + self.assertEqual( + observation["profiles"], + {variable: None for variable in OPERATOR_PROFILE_VARIABLES}, + ) + + +if __name__ == "__main__": + unittest.main() diff --git a/benchmark_data/runtime/tests/test_capture_dispatch.py b/benchmark_data/runtime/tests/test_capture_dispatch.py new file mode 100644 index 0000000000..c01254d119 --- /dev/null +++ b/benchmark_data/runtime/tests/test_capture_dispatch.py @@ -0,0 +1,615 @@ +#!/usr/bin/env python3 +"""Black-box capture dispatch tests for the runtime harness.""" + +from __future__ import annotations + +import hashlib +import json +import os +import stat +import subprocess +import sys +import tempfile +import textwrap +import unittest +from pathlib import Path + +from benchmark_data.runtime.schema import read_jsonl, validate_report + + +ROOT = Path(__file__).resolve().parents[3] +RUNNER = ROOT / "benchmark_data" / "runtime" / "run.py" + + +def make_fake_binary(path: Path, *, tool_exit: int = 0) -> None: + path.write_text( + textwrap.dedent( + f"""\ + #!/usr/bin/env python3 + import json + import os + import signal + import socket + import sys + import time + from pathlib import Path + + record = os.environ.get("TRACEDECAY_TEST_INVOCATIONS") + if record: + with Path(record).open("a", encoding="utf-8") as stream: + stream.write(json.dumps(sys.argv[1:]) + "\\n") + + if sys.argv[1:3] == ["daemon", "run"]: + socket_path = Path(sys.argv[sys.argv.index("--socket") + 1]) + socket_path.parent.mkdir(parents=True, exist_ok=True) + try: + socket_path.unlink() + except FileNotFoundError: + pass + server = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) + server.bind(str(socket_path)) + server.listen() + signal.signal(signal.SIGTERM, lambda *_: sys.exit(0)) + while True: + connection, _ = server.accept() + connection.close() + + if sys.argv[1:2] == ["--version"]: + print("tracedecay 0.0.0") + raise SystemExit(0) + + if sys.argv[1:2] == ["init"]: + raise SystemExit(0) + + if sys.argv[1:2] == ["tool"]: + if {tool_exit}: + print("forced tool failure", file=sys.stderr) + raise SystemExit({tool_exit}) + print(json.dumps({{ + "structuredContent": {{ + "symbols": [{{"name": "fixture_catalog"}}] + }}, + "_meta": {{"duration_us": 123}} + }}, sort_keys=True)) + raise SystemExit(0) + + if sys.argv[1:2] == ["hook-cursor-after-shell"]: + sys.stdin.buffer.read() + raise SystemExit(0) + + if sys.argv[1:3] == ["lsp", "bridge"]: + sys.stdin.buffer.read() + payload = json.dumps({{ + "jsonrpc": "2.0", + "method": "textDocument/publishDiagnostics", + "params": {{ + "uri": "file:///fixture/src/catalog.py", + "diagnostics": [], + "version": 1 + }} + }}, separators=(",", ":"), sort_keys=True).encode() + sys.stdout.buffer.write( + f"Content-Length: {{len(payload)}}\\r\\n\\r\\n".encode() + payload + ) + sys.stdout.buffer.flush() + raise SystemExit(0) + + raise SystemExit("unexpected command") + """ + ), + encoding="utf-8", + ) + path.chmod(path.stat().st_mode | stat.S_IXUSR) + + +def make_fake_cargo(path: Path) -> None: + path.write_text( + textwrap.dedent( + """\ + #!/usr/bin/env python3 + import json + import os + import sys + from pathlib import Path + + record = Path(os.environ["TRACEDECAY_TEST_CARGO_INVOCATIONS"]) + with record.open("a", encoding="utf-8") as stream: + stream.write(json.dumps(sys.argv[1:]) + "\\n") + + executable = os.environ["TRACEDECAY_TEST_AUTHORITY_BINARY"] + print(json.dumps({ + "reason": "compiler-artifact", + "target": { + "name": "diagnostic_publication_stress", + "kind": ["test"], + }, + "profile": {"test": True}, + "executable": executable, + })) + """ + ), + encoding="utf-8", + ) + path.chmod(path.stat().st_mode | stat.S_IXUSR) + + +def make_fake_authority_test_binary(path: Path) -> None: + path.write_text( + textwrap.dedent( + """\ + #!/usr/bin/env python3 + import json + import os + import sys + from pathlib import Path + + record = Path(os.environ["TRACEDECAY_TEST_AUTHORITY_INVOCATIONS"]) + with record.open("a", encoding="utf-8") as stream: + stream.write(json.dumps(sys.argv[1:]) + "\\n") + + if os.environ.get("TRACEDECAY_FAKE_ZERO_SELECTED") == "1": + print("running 0 tests") + print("test result: ok. 0 passed; 0 failed; 0 ignored") + else: + print("running 1 test") + print("test result: ok. 1 passed; 0 failed; 0 ignored") + """ + ), + encoding="utf-8", + ) + path.chmod(path.stat().st_mode | stat.S_IXUSR) + + +def run_runner( + *arguments: os.PathLike[str] | str, + environment: dict[str, str] | None = None, +) -> subprocess.CompletedProcess[str]: + return subprocess.run( + [sys.executable, os.fspath(RUNNER), *(os.fspath(value) for value in arguments)], + cwd=ROOT, + env=environment, + capture_output=True, + text=True, + check=False, + timeout=20, + ) + + +class CaptureDispatchTest(unittest.TestCase): + def test_capture_runs_owned_daemon_and_writes_valid_artifacts(self) -> None: + with tempfile.TemporaryDirectory(prefix="runtime-capture-test-") as directory: + root = Path(directory) + binary = root / "fake-tracedecay" + make_fake_binary(binary) + output = root / "artifacts" / "capture.json" + invocations = root / "invocations.jsonl" + environment = os.environ.copy() + environment["TRACEDECAY_TEST_INVOCATIONS"] = os.fspath(invocations) + + result = run_runner( + "capture", + "--binary", + binary, + "--output", + output, + environment=environment, + ) + + self.assertEqual(result.returncode, 0, result.stderr) + report = json.loads(output.read_text(encoding="utf-8")) + self.assertIs(validate_report(report), report) + samples = read_jsonl(output.with_suffix(".samples.jsonl")) + self.assertEqual(len(samples), 1) + self.assertEqual(samples[0]["outcome"]["status"], "success") + self.assertTrue(samples[0]["lifecycle"]["daemon_survived"]) + self.assertTrue(samples[0]["observations"]["process_tree_reaped"]) + self.assertIn("wal_bytes", samples[0]["observations"]) + receipt = json.loads( + output.with_suffix(".policy.json").read_text(encoding="utf-8") + ) + self.assertEqual(receipt["policy_id"], "runtime-acceptance-v1") + self.assertEqual( + receipt["artifact_sha256"], + hashlib.sha256(output.read_bytes()).hexdigest(), + ) + commands = [ + json.loads(line) + for line in invocations.read_text(encoding="utf-8").splitlines() + ] + self.assertTrue(any(command[:1] == ["init"] for command in commands)) + self.assertTrue(any(command[:2] == ["daemon", "run"] for command in commands)) + tool_command = next(command for command in commands if command[:1] == ["tool"]) + payload = json.loads(tool_command[tool_command.index("--args") + 1]) + self.assertEqual(payload["name"], "fixture_catalog") + + def test_capture_rejects_binary_that_does_not_match_prepared_fixture(self) -> None: + with tempfile.TemporaryDirectory(prefix="runtime-capture-test-") as directory: + root = Path(directory) + prepared_binary = root / "prepared-binary" + other_binary = root / "other-binary" + make_fake_binary(prepared_binary) + make_fake_binary(other_binary) + other_binary.write_text( + other_binary.read_text(encoding="utf-8") + "\n# different\n", + encoding="utf-8", + ) + prepared = root / "prepared" + prepare_result = run_runner( + "prepare", + "--binary", + prepared_binary, + "--output", + prepared, + ) + self.assertEqual(prepare_result.returncode, 0, prepare_result.stderr) + output = root / "capture.json" + + result = run_runner( + "capture", + "--binary", + other_binary, + "--prepared", + prepared, + "--output", + output, + ) + + self.assertNotEqual(result.returncode, 0) + self.assertIn("does not match", result.stderr) + self.assertFalse(output.exists()) + + def test_capture_records_command_failure_and_exits_nonzero(self) -> None: + with tempfile.TemporaryDirectory(prefix="runtime-capture-test-") as directory: + root = Path(directory) + binary = root / "failing-tracedecay" + make_fake_binary(binary, tool_exit=23) + output = root / "capture.json" + + result = run_runner( + "capture", + "--binary", + binary, + "--output", + output, + ) + + self.assertNotEqual(result.returncode, 0) + self.assertIn("tool command failed", result.stderr) + self.assertFalse(output.exists()) + + def test_paired_runs_same_input_abba_and_keeps_p95_pending(self) -> None: + with tempfile.TemporaryDirectory(prefix="runtime-capture-test-") as directory: + root = Path(directory) + baseline = root / "baseline-tracedecay" + treatment = root / "treatment-tracedecay" + make_fake_binary(baseline) + make_fake_binary(treatment) + treatment.write_text( + treatment.read_text(encoding="utf-8") + "\n# treatment\n", + encoding="utf-8", + ) + output = root / "paired.json" + + result = run_runner( + "paired", + "--baseline", + baseline, + "--treatment", + treatment, + "--samples-per-variant", + "2", + "--output", + output, + ) + + self.assertEqual(result.returncode, 0, result.stderr) + samples = read_jsonl(output.with_suffix(".samples.jsonl")) + self.assertEqual( + [sample["identity"]["variant"] for sample in samples], + ["baseline", "treatment", "treatment", "baseline"], + ) + self.assertEqual( + [sample["identity"]["abba_position"] for sample in samples], + [0, 1, 2, 3], + ) + report = json.loads(output.read_text(encoding="utf-8")) + self.assertEqual(report["fixture"]["same_input"], True) + self.assertEqual(report["variants"]["baseline"]["sample_count"], 2) + self.assertIsNotNone(report["variants"]["baseline"]["latency_ns"]["p50"]) + self.assertEqual( + report["variants"]["baseline"]["latency_ns"]["p95"], + { + "available": False, + "value": None, + "minimum_samples": 40, + }, + ) + self.assertEqual(report["comparison"]["paired"]["pair_count"], 2) + self.assertEqual( + len( + report["comparison"]["paired"][ + "log_ratio_confidence_interval" + ] + ), + 2, + ) + + def test_prepare_creates_complete_immutable_fixture_snapshot(self) -> None: + with tempfile.TemporaryDirectory(prefix="runtime-capture-test-") as directory: + root = Path(directory) + binary = root / "fake-tracedecay" + make_fake_binary(binary) + prepared = root / "prepared" + + result = run_runner( + "prepare", + "--binary", + binary, + "--output", + prepared, + ) + + self.assertEqual(result.returncode, 0, result.stderr) + self.assertTrue((prepared / "evidence" / "prepared.json").is_file()) + self.assertTrue((prepared / "home" / "workspace" / "runtime-fixture").is_dir()) + self.assertTrue((prepared / "bin" / "tracedecay").is_file()) + + def test_missing_daemon_incident_driver_records_typed_unavailability( + self, + ) -> None: + with tempfile.TemporaryDirectory(prefix="runtime-capture-test-") as directory: + root = Path(directory) + binary = root / "fake-tracedecay" + make_fake_binary(binary) + output = root / "missing-daemon.json" + + result = run_runner( + "incident", + "--binary", + binary, + "--workload", + "missing-daemon-after-shell", + "--samples", + "2", + "--output", + output, + ) + + self.assertEqual(result.returncode, 0, result.stderr) + samples = read_jsonl(output.with_suffix(".samples.jsonl")) + self.assertEqual(len(samples), 2) + self.assertTrue( + all(sample["availability"]["state"] == "unavailable" + for sample in samples) + ) + self.assertTrue( + all(sample["lifecycle"]["daemon_survived"] is None + for sample in samples) + ) + self.assertTrue( + all(sample["observations"]["process_tree_reaped"] + for sample in samples) + ) + self.assertTrue( + all( + sample["observations"]["process_startup_control_ns"] >= 0 + for sample in samples + ) + ) + self.assertTrue( + all( + sample["observations"]["hook_residual_ns"] + == max( + 0, + sample["observations"]["direct_hook_wall_ns"] + - sample["observations"]["process_startup_control_ns"] + ) + for sample in samples + ) + ) + self.assertTrue( + all( + sample["observations"]["lifecycle_wrapper_overhead_ns"] + == max( + 0, + sample["observations"]["missing_daemon_fail_fast_ns"] + - sample["observations"]["direct_hook_wall_ns"], + ) + for sample in samples + ) + ) + + def test_diagnostic_flood_driver_records_bounded_event_and_queue_counts( + self, + ) -> None: + with tempfile.TemporaryDirectory(prefix="runtime-capture-test-") as directory: + root = Path(directory) + binary = root / "fake-tracedecay" + make_fake_binary(binary) + output = root / "diagnostic-flood.json" + + result = run_runner( + "incident", + "--binary", + binary, + "--workload", + "diagnostic-dedup-batch-rate", + "--samples", + "1", + "--events", + "100", + "--output", + output, + ) + + self.assertEqual(result.returncode, 0, result.stderr) + samples = read_jsonl(output.with_suffix(".samples.jsonl")) + self.assertEqual(len(samples), 1) + observations = samples[0]["observations"] + self.assertEqual(observations["diagnostic_generated_count"], 100) + self.assertEqual(observations["diagnostic_deduplicated_count"], 99) + self.assertEqual(observations["diagnostic_batch_count"], 1) + self.assertEqual(observations["queue_depth"], 1) + self.assertTrue(observations["process_tree_reaped"]) + + def test_diagnostic_authority_capture_is_typed_and_process_reaped(self) -> None: + with tempfile.TemporaryDirectory(prefix="runtime-capture-test-") as directory: + root = Path(directory) + cargo = root / "cargo" + make_fake_cargo(cargo) + authority_binary = root / "diagnostic_publication_stress" + make_fake_authority_test_binary(authority_binary) + cargo_invocations = root / "cargo-invocations.jsonl" + authority_invocations = root / "authority-invocations.jsonl" + environment = dict(os.environ) + environment["PATH"] = f"{root}{os.pathsep}{environment['PATH']}" + environment["TRACEDECAY_TEST_CARGO_INVOCATIONS"] = str( + cargo_invocations + ) + environment["TRACEDECAY_TEST_AUTHORITY_BINARY"] = str(authority_binary) + environment["TRACEDECAY_TEST_AUTHORITY_INVOCATIONS"] = str( + authority_invocations + ) + output = root / "diagnostic-authority.json" + + result = run_runner( + "incident", + "--workload", + "diagnostic-dedup-batch-rate", + "--authority-test", + "--events", + "10000", + "--samples", + "2", + "--output", + output, + environment=environment, + ) + + self.assertEqual(result.returncode, 0, result.stderr) + report = json.loads(output.read_text()) + self.assertEqual( + report["authority"]["kind"], "prebuilt-integration-test-scenario" + ) + self.assertEqual( + report["authority"]["target"], "diagnostic_publication_stress" + ) + self.assertEqual( + report["authority"]["scenario"], + "publication_rate_and_queue_memory_stay_bounded_under_backpressure", + ) + self.assertEqual( + report["authority"]["anti_vacuity"], + "scripts/require-exact-test.sh", + ) + self.assertEqual( + report["authority"]["timing_scope"], + "test-executable-scenario-only", + ) + self.assertNotIn("candidate_binary_sha256", report["authority"]) + self.assertEqual(report["sample_count"], 2) + self.assertEqual(report["event_counts"]["attempted_total"], 20_000) + self.assertEqual(report["event_counts"]["emitted_total"], 2) + self.assertEqual(report["event_counts"]["queue_depth_max"], 1) + self.assertEqual(report["outcome"]["process_leak_count"], 0) + cargo_commands = [ + json.loads(line) + for line in cargo_invocations.read_text(encoding="utf-8").splitlines() + ] + self.assertEqual(len(cargo_commands), 1) + build_command = cargo_commands[0] + self.assertEqual(build_command[0], "test") + self.assertEqual( + build_command[build_command.index("--test") + 1], + "diagnostic_publication_stress", + ) + self.assertIn("--no-run", build_command) + self.assertIn("--message-format=json", build_command) + authority_commands = [ + json.loads(line) + for line in authority_invocations.read_text( + encoding="utf-8" + ).splitlines() + ] + self.assertEqual( + len(authority_commands), + 3, + "one anti-vacuity validation plus two measured samples", + ) + for command in authority_commands: + self.assertEqual( + command, + [ + "publication_rate_and_queue_memory_stay_bounded_under_backpressure", + "--exact", + "--test-threads=1", + ], + ) + self.assertNotIn( + "cargo", + command, + ) + self.assertNotIn( + "publication_rate_and_queue_memory_stay_bounded_under_backpressure", + build_command, + ) + + def test_diagnostic_authority_rejects_empty_libtest_selection(self) -> None: + with tempfile.TemporaryDirectory(prefix="runtime-capture-test-") as directory: + root = Path(directory) + make_fake_cargo(root / "cargo") + authority_binary = root / "diagnostic_publication_stress" + make_fake_authority_test_binary(authority_binary) + output = root / "diagnostic-authority.json" + environment = dict(os.environ) + environment["PATH"] = f"{root}{os.pathsep}{environment['PATH']}" + environment["TRACEDECAY_TEST_CARGO_INVOCATIONS"] = str( + root / "cargo-invocations.jsonl" + ) + environment["TRACEDECAY_TEST_AUTHORITY_BINARY"] = str(authority_binary) + authority_invocations = root / "authority-invocations.jsonl" + environment["TRACEDECAY_TEST_AUTHORITY_INVOCATIONS"] = str( + authority_invocations + ) + environment["TRACEDECAY_FAKE_ZERO_SELECTED"] = "1" + + result = run_runner( + "incident", + "--workload", + "diagnostic-dedup-batch-rate", + "--authority-test", + "--events", + "10000", + "--samples", + "1", + "--output", + output, + environment=environment, + ) + + self.assertNotEqual(result.returncode, 0) + self.assertIn( + "diagnostic publication stress scenario did not pass validation", + result.stderr, + ) + commands = [ + json.loads(line) + for line in authority_invocations.read_text( + encoding="utf-8" + ).splitlines() + ] + self.assertEqual( + commands, + [ + [ + "publication_rate_and_queue_memory_stay_bounded_under_backpressure", + "--exact", + "--test-threads=1", + ] + ], + ) + self.assertFalse(output.exists()) + + +if __name__ == "__main__": + unittest.main() diff --git a/benchmark_data/runtime/tests/test_comparison.py b/benchmark_data/runtime/tests/test_comparison.py new file mode 100644 index 0000000000..6c4b30f203 --- /dev/null +++ b/benchmark_data/runtime/tests/test_comparison.py @@ -0,0 +1,286 @@ +from __future__ import annotations + +import sys +import unittest +from pathlib import Path + + +ROOT = Path(__file__).resolve().parents[3] +sys.path.insert(0, str(ROOT)) + +from benchmark_data.runtime.comparison import ( # noqa: E402 + aggregate_hard_failures, + bootstrap_confidence_interval, + classify_change, + compare_abba, + latency_budget_findings, + pair_abba_rounds, + paired_log_ratios, +) + + +def comparison_identity(**overrides: object) -> dict: + identity = { + "baseline_candidate_id": "candidate-a", + "treatment_candidate_id": "candidate-b", + "run_id": "run-1", + "capture_id": "capture-1", + "crate_id": "tracedecay-application", + "journey_id": "indexed-query", + "workload_id": "exact-symbol", + "platform": "linux-x86_64", + "shard": "runtime-0", + "storage_mode": "sqlite", + "state": "warm", + "temperature": "warm", + "surface": "mcp", + "concurrency": 1, + } + identity.update(overrides) + return identity + + +def sample( + status: str = "success", + *, + expected_digest: str = "a" * 64, + actual_digest: str | None = "a" * 64, + error: str | None = None, + daemon_survived: bool = True, +) -> dict: + return { + "availability": {"state": "available", "detail": None}, + "lifecycle": {"daemon_survived": daemon_survived}, + "outcome": { + "status": status, + "expected_digest": expected_digest, + "actual_digest": actual_digest, + "result_digest": actual_digest, + "error": error, + } + } + + +class AbbaPairingTests(unittest.TestCase): + def test_abba_rounds_pair_adjacent_measurements_in_time(self) -> None: + rounds = [ + [("A", 100), ("B", 110), ("B", 90), ("A", 100)], + [("A", 200), ("B", 220), ("B", 180), ("A", 200)], + ] + + self.assertEqual( + pair_abba_rounds(rounds), + [(100.0, 110.0), (100.0, 90.0), (200.0, 220.0), (200.0, 180.0)], + ) + + def test_incomplete_or_out_of_order_rounds_are_rejected(self) -> None: + bad_rounds = ( + [("A", 1), ("B", 2), ("B", 3)], + [("A", 1), ("B", 2), ("A", 3), ("B", 4)], + ) + for round_ in bad_rounds: + with self.subTest(round_=round_): + with self.assertRaisesRegex(ValueError, "ABBA"): + pair_abba_rounds([round_]) + + def test_paired_log_ratios_reject_zero_values(self) -> None: + self.assertAlmostEqual( + paired_log_ratios([(100, 110), (100, 90)])[0], + 0.09531017980432493, + ) + with self.assertRaises(ValueError): + paired_log_ratios([(0, 1)]) + + +class BootstrapTests(unittest.TestCase): + def test_seeded_bootstrap_is_deterministic(self) -> None: + values = [-0.2, -0.1, 0.0, 0.1, 0.2] + + first = bootstrap_confidence_interval(values, seed=123, resamples=1_000) + second = bootstrap_confidence_interval(values, seed=123, resamples=1_000) + + self.assertEqual(first, second) + self.assertLessEqual(first[0], 0.0) + self.assertGreaterEqual(first[1], 0.0) + + +class DecisionTests(unittest.TestCase): + def test_practical_floor_and_relative_threshold_must_both_be_crossed(self) -> None: + self.assertEqual( + classify_change(100, 111, relative_threshold=0.05, practical_floor=20), + "no_material_change", + ) + self.assertEqual( + classify_change(100, 121, relative_threshold=0.05, practical_floor=20), + "regression", + ) + self.assertEqual( + classify_change(100, 79, relative_threshold=0.05, practical_floor=20), + "improvement", + ) + + def test_machine_mismatch_makes_comparison_descriptive(self) -> None: + result = compare_abba( + [[("A", 100), ("B", 130), ("B", 130), ("A", 100)]], + identity=comparison_identity(), + baseline_machine_fingerprint="machine-a", + treatment_machine_fingerprint="machine-b", + relative_threshold=0.10, + practical_floor=5, + resamples=100, + ) + + self.assertEqual(result["decision"], "descriptive_only") + self.assertTrue(result["informational"]) + self.assertFalse(result["machine_comparable"]) + self.assertEqual(result["paired"]["change"], "regression") + + def test_latency_regression_is_advisory_but_correctness_failure_is_hard(self) -> None: + rounds = [[("A", 100), ("B", 130), ("B", 130), ("A", 100)]] + advisory = compare_abba( + rounds, + identity=comparison_identity(), + baseline_machine_fingerprint="machine-a", + treatment_machine_fingerprint="machine-a", + relative_threshold=0.10, + practical_floor=5, + resamples=100, + ) + self.assertEqual(advisory["decision"], "descriptive_only") + self.assertEqual( + advisory["evidence"], + { + "sample_count": 1, + "evidence_class": "regression_sample", + }, + ) + self.assertEqual(advisory["hard_failures"], []) + self.assertEqual(advisory["identity"], comparison_identity()) + + hard = compare_abba( + rounds, + identity=comparison_identity(), + baseline_machine_fingerprint="machine-a", + treatment_machine_fingerprint="machine-a", + baseline_samples=[sample()], + treatment_samples=[sample(actual_digest="b" * 64)], + relative_threshold=0.10, + practical_floor=5, + resamples=100, + ) + self.assertEqual(hard["decision"], "fail") + self.assertTrue(hard["hard_failures"]) + + def test_n1_is_regression_evidence_without_slo_gate_metadata(self) -> None: + result = compare_abba( + [[("A", 100), ("B", 100), ("B", 100), ("A", 100)]], + identity=comparison_identity(), + baseline_machine_fingerprint="machine-a", + treatment_machine_fingerprint="machine-a", + resamples=100, + ) + + self.assertEqual(result["decision"], "descriptive_only") + self.assertEqual(result["evidence"]["evidence_class"], "regression_sample") + self.assertNotIn("slo_eligible", result["evidence"]) + self.assertNotIn("baseline_policy_met", result["evidence"]) + self.assertNotIn("accepted", result) + + def test_distribution_latency_findings_remain_descriptive_only(self) -> None: + result = compare_abba( + [ + [("A", 100), ("B", 130), ("B", 130), ("A", 100)], + [("A", 100), ("B", 130), ("B", 130), ("A", 100)], + ], + identity=comparison_identity(), + baseline_machine_fingerprint="machine-a", + treatment_machine_fingerprint="machine-a", + evidence_class="distribution", + relative_threshold=0.10, + practical_floor=5, + resamples=100, + ) + + self.assertEqual(result["evidence"]["sample_count"], 2) + self.assertEqual(result["evidence"]["evidence_class"], "distribution") + self.assertEqual(result["decision"], "descriptive_only") + self.assertNotIn("slo_eligible", result["evidence"]) + + def test_pr_stage_and_milestone_comparison_identities_are_rejected(self) -> None: + rounds = [[("A", 100), ("B", 100), ("B", 100), ("A", 100)]] + for field, value in ( + ("journey_id", "pr14-stage"), + ("workload_id", "pr15-milestone"), + ("scenario", "pr16"), + ("milestone_budget_ns", 1), + ): + with self.subTest(field=field): + with self.assertRaisesRegex(ValueError, "PR-stage|unexpected"): + compare_abba( + rounds, + identity=comparison_identity(**{field: value}), + baseline_machine_fingerprint="machine-a", + treatment_machine_fingerprint="machine-a", + resamples=100, + ) + + +class CorrectnessTests(unittest.TestCase): + def test_digest_errors_and_timeout_rate_regressions_are_hard_failures(self) -> None: + failures = aggregate_hard_failures( + [sample(), sample(), sample()], + [ + sample(actual_digest="b" * 64), + sample("error", actual_digest=None, error="unexpected"), + sample("timeout", actual_digest=None, error="deadline exceeded"), + ], + ) + + self.assertEqual( + {failure["code"] for failure in failures}, + { + "digest_mismatch", + "unexpected_error", + "error_rate_regression", + "timeout_rate_regression", + }, + ) + + def test_daemon_death_is_a_hard_failure_even_without_latency_regression(self) -> None: + failures = aggregate_hard_failures( + [sample()], + [ + sample( + "error", + actual_digest=None, + error="daemon exited", + daemon_survived=False, + ) + ], + ) + + self.assertIn("daemon_death", {failure["code"] for failure in failures}) + + def test_latency_budgets_are_advisory_findings(self) -> None: + findings = latency_budget_findings( + {"p50_ns": 90, "p99_ns": 150}, + {"p50_ns": 100, "p99_ns": 125}, + ) + + self.assertEqual( + findings, + [ + { + "metric": "p99_ns", + "observed": 150.0, + "budget": 125.0, + "severity": "advisory", + "code": "latency_budget_exceeded", + } + ], + ) + self.assertNotIn("milestone", str(findings).lower()) + + +if __name__ == "__main__": + unittest.main() diff --git a/benchmark_data/runtime/tests/test_fixtures.py b/benchmark_data/runtime/tests/test_fixtures.py new file mode 100644 index 0000000000..dafa7ac905 --- /dev/null +++ b/benchmark_data/runtime/tests/test_fixtures.py @@ -0,0 +1,455 @@ +"""Tests for deterministic runtime benchmark fixture preparation.""" + +from __future__ import annotations + +import json +import os +import subprocess +import sys +import tempfile +import unittest +from pathlib import Path + + +RUNTIME_ROOT = Path(__file__).resolve().parents[1] +sys.path.insert(0, str(RUNTIME_ROOT)) + +import fixtures # noqa: E402 + + +def write_prebuilt_binary(root: Path, *, executable: bool = True) -> Path: + binary = root / "prebuilt-tracedecay" + binary.write_text("#!/bin/sh\nexit 0\n", encoding="utf-8") + binary.chmod(0o755 if executable else 0o644) + return binary + + +class CheckedInFixtureTests(unittest.TestCase): + def test_fixture_contains_cross_file_symbols_and_native_provider_layouts(self) -> None: + root = fixtures.fixture_source_root() + + self.assertTrue((root / "project" / "src" / "catalog.py").is_file()) + self.assertTrue((root / "project" / "src" / "main.py").is_file()) + self.assertTrue((root / "project" / "src" / "graph.ts").is_file()) + self.assertTrue((root / "project" / "src" / "report.ts").is_file()) + + provider_files = fixtures.provider_fixture_files(root) + self.assertIn(".codex/sessions/", provider_files["codex"].as_posix()) + self.assertIn(".claude/projects/", provider_files["claude"].as_posix()) + self.assertIn( + ".cursor/projects/fixture-runtime-project/agent-transcripts/", + provider_files["cursor"].as_posix(), + ) + for path in provider_files.values(): + records = [ + json.loads(line) + for line in path.read_text(encoding="utf-8").splitlines() + if line + ] + self.assertGreaterEqual(len(records), 2) + + def test_fixture_metadata_marks_n1_samples_and_unambiguous_shutdown_times(self) -> None: + root = fixtures.fixture_source_root() + + metadata = json.loads((root / "metadata.json").read_text(encoding="utf-8")) + shutdown = json.loads( + (root / "measurements" / "shutdown.json").read_text(encoding="utf-8") + ) + + self.assertEqual(metadata["sample_count"], 1) + self.assertEqual(metadata["measurement_class"], "n=1 regression sample") + self.assertEqual( + [(sample["total_seconds"], sample["abort_offset_seconds"]) for sample in shutdown], + [(89, 81), (57, 52)], + ) + self.assertTrue( + all(sample["abort_offset_seconds"] < sample["total_seconds"] for sample in shutdown) + ) + + def test_fixture_metadata_targets_final_crates_journeys_and_runtime_states(self) -> None: + metadata = json.loads( + (fixtures.fixture_source_root() / "metadata.json").read_text( + encoding="utf-8" + ) + ) + + self.assertEqual( + set(metadata["crate_identities"]), + { + "tracedecay-api", + "tracedecay-application", + "tracedecay-capture", + "tracedecay-domain", + "tracedecay-hooks", + "tracedecay-policy", + "tracedecay-rusqlite-runtime", + "tracedecay-sdk", + "tracedecay-store", + "tracedecay-tool-catalog", + "integrated-v2", + }, + ) + self.assertEqual( + set(metadata["runtime_states"]), + {"cold", "warm", "no-op", "contention", "recovery"}, + ) + self.assertTrue( + { + "code-retrieval", + "session-retrieval", + "host-activation", + "host-restart", + "daemon-recovery", + }.issubset(metadata["journey_identities"]) + ) + self.assertTrue( + { + "exact-symbol", + "lexical-phrase", + "graph-callers", + "session-message-search", + "query-context", + "payload-stress", + "concurrent-query", + }.issubset(metadata["workload_identities"]) + ) + + def test_raw_samples_preserve_abba_order_and_truthful_availability(self) -> None: + raw_samples = fixtures.fixture_source_root() / "raw_samples" / "abba.jsonl" + records = [ + json.loads(line) + for line in raw_samples.read_text(encoding="utf-8").splitlines() + if line + ] + + self.assertEqual( + [record["identity"]["variant"] for record in records], + ["A", "B", "B", "A"], + ) + self.assertEqual( + [record["identity"]["abba_position"] for record in records], + [0, 1, 2, 3], + ) + self.assertTrue( + all(record["evidence"]["sample_count"] == 1 for record in records) + ) + self.assertTrue( + all( + record["evidence"]["evidence_class"] == "regression_sample" + for record in records + ) + ) + self.assertEqual( + {record["identity"]["workload_id"] for record in records}, + {"exact-symbol"}, + ) + self.assertTrue( + all( + record["availability"] == {"state": "available", "detail": None} + for record in records + ) + ) + + def test_fake_host_fixture_scripts_are_checked_in(self) -> None: + fake_hosts = fixtures.fixture_source_root() / "fake_hosts" + + self.assertTrue((fake_hosts / "dashboard_server.py").is_file()) + self.assertTrue((fake_hosts / "verbose_host.py").is_file()) + self.assertTrue((fake_hosts / "verbose_child.py").is_file()) + + +class PreparationTests(unittest.TestCase): + def test_preparation_copies_project_and_provider_data_into_isolated_home(self) -> None: + with tempfile.TemporaryDirectory(prefix="runtime-fixtures-test-") as directory: + run_root = Path(directory) + binary = write_prebuilt_binary(run_root) + + prepared = fixtures.prepare_fixture_snapshot( + run_root / "prepared", + prebuilt_binary=binary, + ) + + self.assertEqual(prepared.home, prepared.snapshot_root / "home") + self.assertEqual( + prepared.project, + prepared.home / "workspace" / "runtime-fixture", + ) + expected_provider_roots = fixtures.provider_roots(prepared.home) + self.assertEqual(prepared.provider_roots, expected_provider_roots) + self.assertTrue(prepared.prebuilt_binary.is_file()) + self.assertTrue(os.access(prepared.prebuilt_binary, os.X_OK)) + self.assertTrue((prepared.evidence_root / "metadata.json").is_file()) + self.assertTrue( + (prepared.evidence_root / "raw_samples" / "abba.jsonl").is_file() + ) + for path in prepared.provider_files.values(): + self.assertTrue(path.is_file(), path) + self.assertTrue(path.is_relative_to(prepared.home)) + for path in prepared.snapshot_root.rglob("*"): + self.assertFalse(path.is_symlink(), path) + + def test_prepared_evidence_records_stable_runtime_normalization(self) -> None: + with tempfile.TemporaryDirectory(prefix="runtime-fixtures-test-") as directory: + root = Path(directory) + binary = write_prebuilt_binary(root) + prepared = fixtures.prepare_fixture_snapshot( + root / "prepared", + prebuilt_binary=binary, + platform="linux-x86_64", + shard="code-retrieval-0", + storage_mode="isolated-sqlite", + concurrency=4, + runtime_state="cold", + temperature="cold", + ) + + evidence = json.loads( + prepared.prepared_evidence.read_text(encoding="utf-8") + ) + + self.assertEqual(evidence["sample_count"], 1) + self.assertEqual(evidence["measurement_class"], "n=1 regression sample") + self.assertEqual( + evidence["runtime_identity"], + { + "fixture_id": "runtime-v2-final", + "platform": "linux-x86_64", + "shard": "code-retrieval-0", + "storage_mode": "isolated-sqlite", + "concurrency": 4, + "runtime_state": "cold", + "temperature": "cold", + }, + ) + self.assertEqual(prepared.runtime_identity, evidence["runtime_identity"]) + + warm = fixtures.clone_prepared_profile( + prepared, + root / "warm", + runtime_state="warm", + temperature="warm", + ) + warm_evidence = json.loads( + warm.prepared_evidence.read_text(encoding="utf-8") + ) + self.assertEqual(warm.runtime_identity["runtime_state"], "warm") + self.assertEqual(warm.runtime_identity["temperature"], "warm") + self.assertEqual( + warm_evidence["runtime_identity"]["runtime_state"], + "warm", + ) + for field in ("platform", "shard", "storage_mode", "concurrency"): + self.assertEqual( + warm.runtime_identity[field], + prepared.runtime_identity[field], + ) + + def test_digests_and_git_history_are_deterministic(self) -> None: + with tempfile.TemporaryDirectory(prefix="runtime-fixtures-test-") as directory: + root = Path(directory) + binary = write_prebuilt_binary(root) + first = fixtures.prepare_fixture_snapshot( + root / "first", + prebuilt_binary=binary, + ) + second = fixtures.prepare_fixture_snapshot( + root / "second", + prebuilt_binary=binary, + ) + + self.assertEqual(first.fixture_digests, second.fixture_digests) + self.assertEqual(first.git_head, second.git_head) + self.assertRegex(first.fixture_digests["combined"], r"^[0-9a-f]{64}$") + + log_args = [ + "git", + "-C", + str(first.project), + "log", + "--format=%H%x00%an%x00%ae%x00%aI%x00%s", + ] + first_log = subprocess.run( + log_args, + check=True, + capture_output=True, + text=True, + ).stdout + second_log = subprocess.run( + [*log_args[:2], str(second.project), *log_args[3:]], + check=True, + capture_output=True, + text=True, + ).stdout + self.assertEqual(first_log, second_log) + self.assertEqual(len(first_log.splitlines()), 2) + self.assertTrue( + all( + "\x00TraceDecay Fixture\x00fixture@tracedecay.invalid\x00" + in line + for line in first_log.splitlines() + ) + ) + + local_author = subprocess.run( + ["git", "-C", str(first.project), "config", "--local", "--get", "user.name"], + check=False, + capture_output=True, + text=True, + ) + self.assertNotEqual(local_author.returncode, 0) + self.assertEqual(local_author.stdout, "") + + def test_clones_are_independent_and_do_not_mutate_snapshot(self) -> None: + with tempfile.TemporaryDirectory(prefix="runtime-fixtures-test-") as directory: + root = Path(directory) + binary = write_prebuilt_binary(root) + prepared = fixtures.prepare_fixture_snapshot( + root / "prepared", + prebuilt_binary=binary, + ) + first = fixtures.clone_prepared_profile(prepared, root / "cold-1") + second = fixtures.clone_prepared_profile(prepared, root / "cold-2") + + relative_source = Path("src/catalog.py") + original = (prepared.project / relative_source).read_text(encoding="utf-8") + (first.project / relative_source).write_text("mutated\n", encoding="utf-8") + first_codex = first.provider_files["codex"] + first_codex.write_text("{}\n", encoding="utf-8") + + self.assertEqual( + (prepared.project / relative_source).read_text(encoding="utf-8"), + original, + ) + self.assertEqual( + (second.project / relative_source).read_text(encoding="utf-8"), + original, + ) + self.assertNotEqual( + first_codex.read_text(encoding="utf-8"), + second.provider_files["codex"].read_text(encoding="utf-8"), + ) + self.assertNotEqual( + os.stat(first.project / relative_source).st_ino, + os.stat(second.project / relative_source).st_ino, + ) + + def test_clone_reuses_immutable_selected_binary_without_copying_bytes( + self, + ) -> None: + with tempfile.TemporaryDirectory(prefix="runtime-fixtures-test-") as directory: + root = Path(directory) + baseline = write_prebuilt_binary(root) + treatment = root / "treatment" + treatment.write_text("#!/bin/sh\nexit 0\n# treatment\n", encoding="utf-8") + treatment.chmod(0o755) + prepared = fixtures.prepare_fixture_snapshot( + root / "prepared", + prebuilt_binary=baseline, + ) + + clone = fixtures.clone_prepared_profile( + prepared, + root / "treatment-clone", + prebuilt_binary=treatment, + ) + + self.assertEqual(clone.prebuilt_binary.read_bytes(), treatment.read_bytes()) + self.assertEqual( + os.stat(clone.prebuilt_binary).st_ino, + os.stat(treatment).st_ino, + ) + + def test_preparation_requires_an_executable_prebuilt_binary(self) -> None: + with tempfile.TemporaryDirectory(prefix="runtime-fixtures-test-") as directory: + root = Path(directory) + + with self.assertRaisesRegex(fixtures.FixtureError, "prebuilt binary"): + fixtures.prepare_fixture_snapshot( + root / "missing", + prebuilt_binary=root / "absent", + ) + + non_executable = write_prebuilt_binary(root, executable=False) + with self.assertRaisesRegex(fixtures.FixtureError, "executable"): + fixtures.prepare_fixture_snapshot( + root / "non-executable", + prebuilt_binary=non_executable, + ) + + def test_environment_is_fully_isolated_from_operator_profile(self) -> None: + with tempfile.TemporaryDirectory(prefix="runtime-fixtures-test-") as directory: + root = Path(directory) + operator_home = root / "operator-home" + operator_home.mkdir() + (operator_home / "must-not-leak").write_text("private\n", encoding="utf-8") + binary = write_prebuilt_binary(root) + prepared = fixtures.prepare_fixture_snapshot( + root / "prepared", + prebuilt_binary=binary, + ) + base = { + "HOME": str(operator_home), + "USERPROFILE": str(operator_home), + "XDG_CONFIG_HOME": str(operator_home / ".config"), + "TRACEDECAY_DATA_DIR": str(operator_home / "data"), + "TRACEDECAY_GLOBAL_DB": str(operator_home / "global.db"), + "TRACEDECAY_DAEMON_SOCKET": str(operator_home / "daemon.sock"), + "TRACEDECAY_HOME": str(operator_home / "legacy-home"), + "TRACEDECAY_PROFILE": str(operator_home / "legacy-profile"), + "TRACEDECAY_PROFILE_DIR": str(operator_home / "legacy-profile-dir"), + "PATH": os.environ.get("PATH", ""), + } + + isolated = fixtures.isolated_environment(prepared, base=base) + + for key in fixtures.ISOLATED_ENVIRONMENT_KEYS: + value = Path(isolated[key]) + self.assertTrue(value.is_relative_to(prepared.snapshot_root), (key, value)) + self.assertNotIn(str(operator_home), isolated[key]) + for key in fixtures.REMOVED_OPERATOR_PROFILE_KEYS: + self.assertNotIn(key, isolated) + self.assertFalse((prepared.home / "must-not-leak").exists()) + self.assertEqual(isolated["PATH"], base["PATH"]) + + def test_clone_rebases_every_isolated_environment_path(self) -> None: + with tempfile.TemporaryDirectory(prefix="runtime-fixtures-test-") as directory: + root = Path(directory) + binary = write_prebuilt_binary(root) + prepared = fixtures.prepare_fixture_snapshot( + root / "prepared", + prebuilt_binary=binary, + ) + + clone = fixtures.clone_prepared_profile(prepared, root / "clone") + + for key in fixtures.ISOLATED_ENVIRONMENT_KEYS: + self.assertTrue( + Path(clone.environment[key]).is_relative_to(clone.snapshot_root), + key, + ) + self.assertNotIn(str(prepared.snapshot_root), clone.environment[key]) + + def test_preparation_rejects_symlinks_in_fixture_source(self) -> None: + with tempfile.TemporaryDirectory(prefix="runtime-fixtures-test-") as directory: + root = Path(directory) + source = root / "source" + fixtures.copy_fixture_source(fixtures.fixture_source_root(), source) + target = source / "outside" + target.write_text("outside\n", encoding="utf-8") + link = source / "project" / "linked" + try: + link.symlink_to(target) + except OSError: + self.skipTest("symlinks unavailable") + + binary = write_prebuilt_binary(root) + with self.assertRaisesRegex(fixtures.FixtureError, "symlink"): + fixtures.prepare_fixture_snapshot( + root / "run", + fixture_root=source, + prebuilt_binary=binary, + ) + + +if __name__ == "__main__": + unittest.main() diff --git a/benchmark_data/runtime/tests/test_graph_measurements.py b/benchmark_data/runtime/tests/test_graph_measurements.py new file mode 100644 index 0000000000..ec6911f7c4 --- /dev/null +++ b/benchmark_data/runtime/tests/test_graph_measurements.py @@ -0,0 +1,469 @@ +from __future__ import annotations + +import json +import os +import sys +import tempfile +import unittest +from pathlib import Path +from unittest import mock + + +ROOT = Path(__file__).resolve().parents[3] +sys.path.insert(0, str(ROOT)) + +from benchmark_data.runtime import graph_measurements # noqa: E402 +from benchmark_data.runtime.graph_measurements import ( # noqa: E402 + EXECUTABLE_SNAPSHOT_SUPPORTED, + GraphMeasurementError, + _copy_executable_snapshot, + _exact_tree_bytes, + _fixture_capture, + _open_current_snapshot, + _run_process, + require_matching_fixture, + summarize_criterion_capture, + summarize_fixture_receipt, + unavailable_fixture_measurements, +) + + +class CriterionCaptureTests(unittest.TestCase): + def test_raw_criterion_samples_feed_shared_percentile_statistics(self) -> None: + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + capture = root / "code_traversal" / "bounded_hops" / "new" + capture.mkdir(parents=True) + (capture / "benchmark.json").write_text( + json.dumps( + { + "full_id": "code_traversal/warm/bounded_hops/4", + "group_id": "code_traversal/warm", + "function_id": "bounded_hops", + "value_str": "4", + } + ), + encoding="utf-8", + ) + (capture / "sample.json").write_text( + json.dumps( + { + "sampling_mode": "Linear", + "iters": [1.0, 2.0, 4.0], + "times": [30.0, 40.0, 40.0], + } + ), + encoding="utf-8", + ) + + samples, benchmarks = summarize_criterion_capture( + root, + variant="candidate", + capture_id="capture-1", + binary_sha256="a" * 64, + round_index=0, + abba_position=1, + ) + + self.assertEqual( + [sample["elapsed_ns_per_iteration"] for sample in samples], + [30.0, 20.0, 10.0], + ) + latency = benchmarks["code_traversal/warm/bounded_hops/4"]["latency_ns"] + self.assertEqual(latency["p50"]["value"], 20.0) + self.assertFalse(latency["p95"]["available"]) + self.assertFalse(latency["p99"]["available"]) + + def test_malformed_criterion_arrays_are_rejected(self) -> None: + with tempfile.TemporaryDirectory() as directory: + capture = Path(directory) / "case" / "new" + capture.mkdir(parents=True) + (capture / "benchmark.json").write_text( + json.dumps({"full_id": "graph/read"}), + encoding="utf-8", + ) + (capture / "sample.json").write_text( + json.dumps({"iters": [1.0], "times": [1.0, 2.0]}), + encoding="utf-8", + ) + + with self.assertRaisesRegex(GraphMeasurementError, "same length"): + summarize_criterion_capture( + Path(directory), + variant="candidate", + capture_id="capture-1", + binary_sha256="a" * 64, + round_index=0, + abba_position=0, + ) + + +class FixtureReceiptTests(unittest.TestCase): + def test_missing_sealed_memory_snapshot_support_is_typed(self) -> None: + with tempfile.TemporaryDirectory() as directory: + source = Path(directory) / "fixture" + source.write_bytes(b"fixture") + source.chmod(0o700) + with mock.patch.object( + graph_measurements, + "EXECUTABLE_SNAPSHOT_SUPPORTED", + False, + ): + with self.assertRaisesRegex( + GraphMeasurementError, + "sealed-memory descriptor snapshots", + ): + _copy_executable_snapshot( + source, + Path(directory) / "private", + ) + + @unittest.skipUnless( + EXECUTABLE_SNAPSHOT_SUPPORTED, + "descriptor-bound executable snapshots are unavailable", + ) + def test_fixture_capture_binds_executed_snapshot_and_retained_store(self) -> None: + with tempfile.TemporaryDirectory() as directory: + temporary = Path(directory) + source = temporary / "fixture.py" + source.write_text( + """#!/usr/bin/env python3 +import json +import os +from pathlib import Path + +store = Path(os.environ["TRACEDECAY_GRAPH_MEASUREMENT_STORE"]) +receipt = Path(os.environ["TRACEDECAY_GRAPH_MEASUREMENT_RECEIPT"]) +(store / "graph.db").write_bytes(b"abc") +receipt.write_text(json.dumps({ + "schema_version": 1, + "fixture": {"id": "bound-fixture", "sha256": "c" * 64}, + "exact_store_bytes": 3, + "logical_write_bytes": 3, + "process_write_bytes": 3, + "reopen_elapsed_ns": [1], +}), encoding="utf-8") +""", + encoding="utf-8", + ) + source.chmod(0o700) + snapshot = _copy_executable_snapshot( + source, + temporary / "private" / "fixture", + ) + + measurement, process = _fixture_capture( + snapshot, + root=temporary / "capture" / "fixture", + timeout_seconds=10, + ) + + self.assertEqual(measurement["exact_store_bytes"]["value"], 3) + self.assertIsNotNone(process) + os.close(snapshot.file_fd) + + @unittest.skipUnless( + EXECUTABLE_SNAPSHOT_SUPPORTED, + "descriptor-bound executable snapshots are unavailable", + ) + def test_fixture_store_rejects_ancestor_substitution(self) -> None: + with tempfile.TemporaryDirectory() as directory: + temporary = Path(directory) + source = temporary / "ancestor-swap.py" + source.write_text( + """#!/usr/bin/env python3 +import json +import os +from pathlib import Path + +store = Path(os.environ["TRACEDECAY_GRAPH_MEASUREMENT_STORE"]) +receipt = Path(os.environ["TRACEDECAY_GRAPH_MEASUREMENT_RECEIPT"]) +root = store.parent +displaced = root.with_name(root.name + "-displaced") +external = root.with_name(root.name + "-external") +(external / "store").mkdir(parents=True) +(external / "store" / "external.db").write_bytes(b"external") +receipt_document = { + "schema_version": 1, + "fixture": {"id": "ancestor-swap", "sha256": "a" * 64}, + "exact_store_bytes": 8, + "logical_write_bytes": 1, + "process_write_bytes": 1, + "reopen_elapsed_ns": [1], +} +(external / receipt.name).write_text(json.dumps(receipt_document), encoding="utf-8") +root.rename(displaced) +root.symlink_to(external, target_is_directory=True) +""", + encoding="utf-8", + ) + source.chmod(0o700) + snapshot = _copy_executable_snapshot( + source, + temporary / "private" / "fixture", + ) + + with self.assertRaisesRegex( + GraphMeasurementError, + "root changed during execution", + ): + _fixture_capture( + snapshot, + root=temporary / "capture" / "fixture", + timeout_seconds=10, + ) + os.close(snapshot.file_fd) + + @unittest.skipUnless( + EXECUTABLE_SNAPSHOT_SUPPORTED, + "descriptor-bound executable snapshots are unavailable", + ) + def test_fixture_store_rejects_store_path_replacement(self) -> None: + with tempfile.TemporaryDirectory() as directory: + temporary = Path(directory) + source = temporary / "store-swap.py" + source.write_text( + """#!/usr/bin/env python3 +import json +import os +from pathlib import Path + +store = Path(os.environ["TRACEDECAY_GRAPH_MEASUREMENT_STORE"]) +receipt = Path(os.environ["TRACEDECAY_GRAPH_MEASUREMENT_RECEIPT"]) +store.rename(store.with_name("displaced-store")) +store.mkdir() +(store / "external.db").write_bytes(b"external") +receipt.write_text(json.dumps({ + "schema_version": 1, + "fixture": {"id": "store-swap", "sha256": "b" * 64}, + "exact_store_bytes": 8, + "logical_write_bytes": 1, + "process_write_bytes": 1, + "reopen_elapsed_ns": [1], +}), encoding="utf-8") +""", + encoding="utf-8", + ) + source.chmod(0o700) + snapshot = _copy_executable_snapshot( + source, + temporary / "private" / "fixture", + ) + + with self.assertRaisesRegex( + GraphMeasurementError, + "retained store path changed during execution", + ): + _fixture_capture( + snapshot, + root=temporary / "capture" / "fixture", + timeout_seconds=10, + ) + os.close(snapshot.file_fd) + + @unittest.skipUnless( + EXECUTABLE_SNAPSHOT_SUPPORTED, + "descriptor-bound executable snapshots are unavailable", + ) + def test_private_binary_replacement_is_rejected(self) -> None: + with tempfile.TemporaryDirectory() as directory: + temporary = Path(directory) + source = temporary / "source" + source.write_bytes(b"original") + source.chmod(0o700) + destination = temporary / "private" / "binary" + snapshot = _copy_executable_snapshot(source, destination) + os.close(snapshot.file_fd) + + with self.assertRaisesRegex(GraphMeasurementError, "duplicate sealed"): + _open_current_snapshot(snapshot) + + @unittest.skipUnless( + EXECUTABLE_SNAPSHOT_SUPPORTED, + "descriptor-bound executable snapshots are unavailable", + ) + def test_running_binary_cannot_replace_later_abba_snapshot(self) -> None: + with tempfile.TemporaryDirectory() as directory: + temporary = Path(directory) + source = temporary / "replace-self.py" + source.write_text( + """#!/usr/bin/env python3 +import sys +from pathlib import Path + +current = Path(sys.argv[1]) +replacement = current.with_name(current.name + ".replacement") +replacement.write_text("#!/bin/sh\\nexit 0\\n", encoding="utf-8") +replacement.chmod(0o500) +replacement.replace(current) +""", + encoding="utf-8", + ) + source.chmod(0o700) + snapshot = _copy_executable_snapshot( + source, + temporary / "private" / "fixture", + ) + + process = _run_process( + (os.fspath(source), os.fspath(source)), + executable=snapshot, + environment=os.environ, + log_path=temporary / "replacement.log", + timeout_seconds=10, + ) + + self.assertGreater(process["elapsed_ns"], 0) + verification_fd = _open_current_snapshot(snapshot) + os.close(verification_fd) + os.close(snapshot.file_fd) + + def test_retained_store_reports_missing_nofollow_support_as_typed_error( + self, + ) -> None: + with tempfile.TemporaryDirectory() as directory: + store = Path(directory) / "store" + store.mkdir() + with mock.patch.object( + graph_measurements, + "NOFOLLOW_TREE_MEASUREMENT_SUPPORTED", + False, + ): + with self.assertRaisesRegex( + GraphMeasurementError, + "no-follow filesystem support", + ): + _exact_tree_bytes(store) + + def test_retained_store_counts_nested_regular_files(self) -> None: + with tempfile.TemporaryDirectory() as directory: + store = Path(directory) / "store" + nested = store / "nested" + nested.mkdir(parents=True) + (store / "root.db").write_bytes(b"root") + (nested / "child.db").write_bytes(b"child") + + self.assertEqual(_exact_tree_bytes(store), 9) + + def test_retained_store_rejects_nested_external_symlink(self) -> None: + with tempfile.TemporaryDirectory() as directory: + temporary = Path(directory) + store = temporary / "store" + nested = store / "nested" + nested.mkdir(parents=True) + external = temporary / "external.db" + external.write_bytes(b"external retained bytes") + (nested / "borrowed.db").symlink_to(external) + + with self.assertRaisesRegex(GraphMeasurementError, "symbolic link"): + _exact_tree_bytes(store) + + @unittest.skipUnless(hasattr(os, "mkfifo"), "FIFO creation requires POSIX") + def test_retained_store_rejects_non_regular_entries(self) -> None: + with tempfile.TemporaryDirectory() as directory: + store = Path(directory) / "store" + store.mkdir() + os.mkfifo(store / "measurement.pipe") + + with self.assertRaisesRegex(GraphMeasurementError, "not a regular file"): + _exact_tree_bytes(store) + + def test_retained_store_rejects_file_replaced_during_measurement(self) -> None: + with tempfile.TemporaryDirectory() as directory: + temporary = Path(directory) + store = temporary / "store" + store.mkdir() + owned = store / "owned.db" + owned.write_bytes(b"owned") + external = temporary / "external.db" + external.write_bytes(b"external") + real_stat = graph_measurements.os.stat + target_stat_calls = 0 + + def replace_before_recheck( + path: str | bytes | int, + *args: object, + **kwargs: object, + ) -> object: + nonlocal target_stat_calls + if ( + path == owned.name + and kwargs.get("dir_fd") is not None + and kwargs.get("follow_symlinks") is False + ): + target_stat_calls += 1 + if target_stat_calls == 2: + owned.unlink() + owned.symlink_to(external) + return real_stat(path, *args, **kwargs) + + with mock.patch.object( + graph_measurements.os, + "stat", + side_effect=replace_before_recheck, + ): + with self.assertRaisesRegex(GraphMeasurementError, "changed"): + _exact_tree_bytes(store) + + self.assertEqual(target_stat_calls, 2) + + def test_fixture_receipt_preserves_exact_storage_and_reopen_evidence(self) -> None: + summary = summarize_fixture_receipt( + { + "schema_version": 1, + "fixture": {"id": "code-graph-4-hop", "sha256": "b" * 64}, + "exact_store_bytes": 12_345, + "logical_write_bytes": 1_000, + "process_write_bytes": 2_500, + "reopen_elapsed_ns": list(range(1, 101)), + } + ) + + self.assertEqual(summary["exact_store_bytes"]["value"], 12_345) + self.assertEqual( + summary["write_amplification"]["parts_per_million"], + 2_500_000, + ) + self.assertEqual(summary["reopen_time_ns"]["p50"]["value"], 50) + self.assertEqual(summary["reopen_time_ns"]["p95"]["value"], 95) + self.assertEqual(summary["reopen_time_ns"]["p99"]["value"], 99) + + def test_baseline_must_prove_the_same_fixture(self) -> None: + candidate = summarize_fixture_receipt( + { + "schema_version": 1, + "fixture": {"id": "same-name", "sha256": "c" * 64}, + "exact_store_bytes": 10, + "logical_write_bytes": 10, + "process_write_bytes": 10, + "reopen_elapsed_ns": [1], + } + ) + baseline = summarize_fixture_receipt( + { + "schema_version": 1, + "fixture": {"id": "same-name", "sha256": "d" * 64}, + "exact_store_bytes": 10, + "logical_write_bytes": 10, + "process_write_bytes": 10, + "reopen_elapsed_ns": [1], + } + ) + + with self.assertRaisesRegex(GraphMeasurementError, "same fixture"): + require_matching_fixture(baseline, candidate) + + def test_missing_fixture_binary_never_fabricates_storage_metrics(self) -> None: + unavailable = unavailable_fixture_measurements( + "no graph fixture measurement binary was supplied" + ) + + self.assertIsNone(unavailable["fixture"]) + self.assertFalse(unavailable["exact_store_bytes"]["available"]) + self.assertIsNone(unavailable["exact_store_bytes"]["value"]) + self.assertFalse(unavailable["write_amplification"]["available"]) + self.assertFalse(unavailable["reopen_time_ns"]["available"]) + + +if __name__ == "__main__": + unittest.main() diff --git a/benchmark_data/runtime/tests/test_host_workloads.py b/benchmark_data/runtime/tests/test_host_workloads.py new file mode 100644 index 0000000000..62adbfba92 --- /dev/null +++ b/benchmark_data/runtime/tests/test_host_workloads.py @@ -0,0 +1,401 @@ +#!/usr/bin/env python3 +"""Contract tests for stable host and SDK runtime workload descriptors.""" + +from __future__ import annotations + +import re +import unittest +from dataclasses import FrozenInstanceError, replace + +from benchmark_data.runtime.host_workloads import ( + ABBA_COMPARISON, + HOST_WORKLOADS, + NORMALIZATION_DIMENSIONS, + PERCENTILE_POLICY, + REQUIRED_CRATE_TAGS, + REVIEWED_SHUTDOWN_OBSERVATIONS, + ActivationState, + AvailabilityState, + BodyKind, + ChildProcessStyle, + DaemonState, + EvidenceClass, + HostKind, + Journey, + ProductionRoute, + RestartState, + SampleIdentity, + Temperature, + available_percentiles, + evidence_class_for_sample_count, + group_by_host, + select_workloads, + validate_catalog, + validate_remote_success, + validate_sample_identities, +) + + +class HostWorkloadCatalogTests(unittest.TestCase): + def test_catalog_is_immutable_unique_and_stably_ordered(self) -> None: + self.assertIsInstance(HOST_WORKLOADS, tuple) + self.assertEqual(validate_catalog(HOST_WORKLOADS), HOST_WORKLOADS) + self.assertEqual( + [workload.workload_id for workload in select_workloads()], + [workload.workload_id for workload in HOST_WORKLOADS], + ) + self.assertEqual( + len({workload.workload_id for workload in HOST_WORKLOADS}), + len(HOST_WORKLOADS), + ) + with self.assertRaises(FrozenInstanceError): + HOST_WORKLOADS[0].workload_id = "changed" # type: ignore[misc] + + def test_identities_never_encode_pr_stages_or_milestones(self) -> None: + forbidden = re.compile(r"\bpr[-_ ]?\d+\b|milestone|budget", re.IGNORECASE) + for workload in HOST_WORKLOADS: + with self.subTest(workload=workload.workload_id): + identity = " ".join( + ( + workload.workload_id, + workload.host.value, + workload.journey.value, + *workload.crate_tags, + *workload.crate_test_ids, + ) + ) + if workload.inputs.production_route is not None: + identity += " " + workload.inputs.production_route.route_id + self.assertIsNone(forbidden.search(identity)) + + def test_each_crate_lane_has_a_stable_runtime_test_id(self) -> None: + all_test_ids: list[str] = [] + for workload in HOST_WORKLOADS: + with self.subTest(workload=workload.workload_id): + self.assertEqual(len(workload.crate_test_ids), len(workload.crate_tags)) + self.assertEqual( + tuple( + test_id.split("::", maxsplit=3)[1] + for test_id in workload.crate_test_ids + ), + workload.crate_tags, + ) + self.assertTrue( + all(test_id.startswith("runtime::") for test_id in workload.crate_test_ids) + ) + all_test_ids.extend(workload.crate_test_ids) + self.assertEqual(len(all_test_ids), len(set(all_test_ids))) + + def test_every_required_crate_and_host_lane_is_covered(self) -> None: + covered_crates = { + crate_tag for workload in HOST_WORKLOADS for crate_tag in workload.crate_tags + } + self.assertEqual(covered_crates, set(REQUIRED_CRATE_TAGS)) + self.assertEqual({workload.host for workload in HOST_WORKLOADS}, set(HostKind)) + self.assertTrue( + { + Journey.COLD, + Journey.WARM, + Journey.NO_OP, + Journey.CONTENTION, + Journey.RECOVERY, + }.issubset({workload.journey for workload in HOST_WORKLOADS}) + ) + + def test_catalog_validation_rejects_duplicates_and_missing_crate_lanes(self) -> None: + duplicate = replace(HOST_WORKLOADS[1], workload_id=HOST_WORKLOADS[0].workload_id) + with self.assertRaisesRegex(ValueError, "duplicate workload_id"): + validate_catalog((HOST_WORKLOADS[0], duplicate)) + + without_capture = tuple( + workload + for workload in HOST_WORKLOADS + if "tracedecay-capture" not in workload.crate_tags + ) + with self.assertRaisesRegex(ValueError, "tracedecay-capture"): + validate_catalog(without_capture) + + def test_selection_and_grouping_preserve_catalog_order(self) -> None: + sdk = select_workloads(host=HostKind.SDK) + application = select_workloads(crate_tag="tracedecay-application") + both = select_workloads( + host=HostKind.SDK, + crate_tag="tracedecay-application", + ) + self.assertEqual( + both, + tuple(workload for workload in sdk if workload in application), + ) + + grouped = group_by_host() + self.assertEqual(tuple(grouped), tuple(HostKind)) + for host, workloads in grouped.items(): + self.assertEqual(workloads, select_workloads(host=host)) + + +class EvidenceContractTests(unittest.TestCase): + def test_all_observations_are_n1_regression_only_and_never_slo_gates(self) -> None: + for workload in HOST_WORKLOADS: + with self.subTest(workload=workload.workload_id): + evidence = workload.evidence + self.assertEqual(evidence.sample_count, 1) + self.assertIs(evidence.evidence_class, EvidenceClass.N1_REGRESSION_ONLY) + self.assertFalse(evidence.distribution_eligible) + self.assertTrue(evidence.wall_time.advisory) + self.assertFalse(evidence.wall_time.slo_gate) + + def test_distribution_classification_requires_more_than_one_sample(self) -> None: + self.assertIs( + evidence_class_for_sample_count(1), + EvidenceClass.N1_REGRESSION_ONLY, + ) + self.assertIs( + evidence_class_for_sample_count(2), + EvidenceClass.DISTRIBUTION, + ) + with self.assertRaisesRegex(ValueError, "positive"): + evidence_class_for_sample_count(0) + + def test_reviewed_shutdown_totals_and_abort_offsets_are_distinct(self) -> None: + self.assertEqual( + tuple( + (observation.total_seconds, observation.abort_offset_seconds) + for observation in REVIEWED_SHUTDOWN_OBSERVATIONS + ), + ((89, 81), (57, 52)), + ) + for observation in REVIEWED_SHUTDOWN_OBSERVATIONS: + self.assertGreater( + observation.total_seconds, + observation.abort_offset_seconds, + ) + self.assertEqual(observation.sample_count, 1) + self.assertIs( + observation.evidence_class, + EvidenceClass.N1_REGRESSION_ONLY, + ) + + def test_repeated_capture_ids_remain_separate_raw_samples(self) -> None: + samples = ( + SampleIdentity(sample_id="sample-a", capture_id="capture-repeat"), + SampleIdentity(sample_id="sample-b", capture_id="capture-repeat"), + ) + self.assertEqual(validate_sample_identities(samples), samples) + self.assertEqual(len(validate_sample_identities(samples)), 2) + + with self.assertRaisesRegex(ValueError, "duplicate sample_id"): + validate_sample_identities( + ( + samples[0], + SampleIdentity( + sample_id="sample-a", + capture_id="capture-other", + ), + ) + ) + + def test_availability_for_adversarial_inputs_is_truthful_and_typed(self) -> None: + by_id = {workload.workload_id: workload for workload in HOST_WORKLOADS} + expected = { + "runtime.dashboard.cold.warming-daemon": AvailabilityState.PARTIAL, + "runtime.cli.contention.unresponsive-daemon": AvailabilityState.UNAVAILABLE, + "runtime.dashboard.contention.malformed-response": AvailabilityState.FAILED, + "runtime.dashboard.contention.no-content-204": AvailabilityState.UNAVAILABLE, + "runtime.dashboard.contention.not-found-404": AvailabilityState.UNSUPPORTED, + } + for workload_id, availability in expected.items(): + with self.subTest(workload=workload_id): + self.assertIs( + by_id[workload_id].evidence.expected_availability, + availability, + ) + + def test_host_activation_and_restart_inputs_cover_each_agent_host(self) -> None: + for host in (HostKind.CURSOR, HostKind.CLAUDE, HostKind.CODEX): + workloads = select_workloads(host=host) + states = { + ( + workload.inputs.activation_state, + workload.inputs.restart_state, + ) + for workload in workloads + } + self.assertIn( + (ActivationState.PENDING, RestartState.NOT_REQUIRED), + states, + ) + self.assertIn( + (ActivationState.ACTIVE, RestartState.NOT_REQUIRED), + states, + ) + self.assertIn( + (ActivationState.ACTIVE, RestartState.REQUIRED), + states, + ) + + def test_sdk_child_contract_requires_concurrent_stream_drain_and_timeout_evidence( + self, + ) -> None: + by_id = {workload.workload_id: workload for workload in HOST_WORKLOADS} + verbose = by_id["runtime.sdk.warm.verbose-child"] + hanging = by_id["runtime.sdk.contention.hanging-child"] + + self.assertIs( + verbose.inputs.child_process.style, + ChildProcessStyle.VERBOSE, + ) + self.assertTrue(verbose.inputs.child_process.concurrent_stream_drain) + self.assertIs( + hanging.inputs.child_process.style, + ChildProcessStyle.HANGING, + ) + self.assertTrue(hanging.inputs.child_process.concurrent_stream_drain) + self.assertTrue(hanging.inputs.child_process.expected_to_hang) + self.assertTrue( + { + "stdout_bytes", + "stderr_bytes", + "process_count", + "daemon_survived", + "timeout_phase", + }.issubset(hanging.evidence.required_fields) + ) + + def test_dashboard_and_runtime_measurement_contracts_are_explicit(self) -> None: + by_id = {workload.workload_id: workload for workload in HOST_WORKLOADS} + self.assertIs( + by_id["runtime.dashboard.contention.malformed-response"].inputs.dashboard.body, + BodyKind.MALFORMED, + ) + self.assertEqual( + by_id["runtime.dashboard.contention.no-content-204"].inputs.dashboard.status_code, + 204, + ) + self.assertEqual( + by_id["runtime.dashboard.contention.not-found-404"].inputs.dashboard.status_code, + 404, + ) + + fields = { + field + for workload in HOST_WORKLOADS + for field in workload.evidence.required_fields + } + self.assertTrue( + { + "cli_wall_ns", + "mcp_wall_ns", + "hook_wall_ns", + "host_wall_ns", + "handler_us", + "request_bytes", + "response_bytes", + "content_bytes", + "process_count", + "daemon_survived", + "timeout_phase", + }.issubset(fields) + ) + mcp = select_workloads(host=HostKind.MCP) + self.assertTrue( + all( + workload.evidence.wall_time.includes_handler_middle_slice + for workload in mcp + ) + ) + + def test_daemon_states_cover_warming_unresponsive_and_survival(self) -> None: + daemon_states = {workload.inputs.daemon_state for workload in HOST_WORKLOADS} + self.assertTrue( + { + DaemonState.WARMING, + DaemonState.UNRESPONSIVE, + DaemonState.READY, + DaemonState.SURVIVED_TIMEOUT, + }.issubset(daemon_states) + ) + + def test_normalization_is_runtime_only_and_covers_required_dimensions(self) -> None: + self.assertEqual( + NORMALIZATION_DIMENSIONS, + ("platform", "shard", "storage_mode", "concurrency", "cold_warm"), + ) + self.assertTrue( + all(workload.normalization.runtime_only for workload in HOST_WORKLOADS) + ) + self.assertTrue( + all( + workload.normalization.dimensions == NORMALIZATION_DIMENSIONS + for workload in HOST_WORKLOADS + ) + ) + self.assertEqual( + {workload.normalization.cold_warm for workload in HOST_WORKLOADS}, + {Temperature.COLD, Temperature.WARM}, + ) + + def test_remote_final_v2_success_requires_a_mounted_committed_route(self) -> None: + remote_hosts = {HostKind.CURSOR, HostKind.CLAUDE, HostKind.CODEX, HostKind.SDK} + for workload in HOST_WORKLOADS: + if workload.host not in remote_hosts: + continue + with self.subTest(workload=workload.workload_id): + route = workload.inputs.production_route + self.assertIsNotNone(route) + self.assertTrue(route.committed) + self.assertTrue(route.mounted) + self.assertTrue(route.wired) + self.assertTrue(route.route_id.startswith("runtime.route.")) + validate_remote_success( + route, + workload.evidence.expected_availability, + ) + + invalid_routes = ( + ProductionRoute( + route_id="runtime.route.uncommitted", + committed=False, + mounted=True, + wired=True, + ), + ProductionRoute( + route_id="runtime.route.unmounted", + committed=True, + mounted=False, + wired=True, + ), + ProductionRoute( + route_id="runtime.route.contract-only", + committed=True, + mounted=True, + wired=False, + ), + ) + for route in invalid_routes: + with self.subTest(route=route.route_id): + with self.assertRaisesRegex(ValueError, "production route"): + validate_remote_success(route, AvailabilityState.AVAILABLE) + + def test_percentiles_require_matching_runtime_samples_not_junit_retention( + self, + ) -> None: + self.assertFalse(PERCENTILE_POLICY.junit_retention_is_percentile_history) + self.assertEqual(PERCENTILE_POLICY.p95_min_matching_samples, 40) + self.assertEqual(PERCENTILE_POLICY.p99_min_matching_samples, 100) + self.assertNotIn("p95", available_percentiles(39)) + self.assertIn("p95", available_percentiles(40)) + self.assertNotIn("p99", available_percentiles(99)) + self.assertIn("p99", available_percentiles(100)) + + def test_abba_metadata_preserves_raw_samples_without_a_gate(self) -> None: + self.assertEqual(ABBA_COMPARISON.order, ("A", "B", "B", "A")) + self.assertTrue(ABBA_COMPARISON.preserve_raw_samples) + self.assertEqual( + ABBA_COMPARISON.identity_fields, + ("workload_id", "host", "journey", "crate_tags"), + ) + self.assertFalse(ABBA_COMPARISON.slo_gate) + + +if __name__ == "__main__": + unittest.main() diff --git a/benchmark_data/runtime/tests/test_incident_workloads.py b/benchmark_data/runtime/tests/test_incident_workloads.py new file mode 100644 index 0000000000..ea9ce74d3d --- /dev/null +++ b/benchmark_data/runtime/tests/test_incident_workloads.py @@ -0,0 +1,185 @@ +#!/usr/bin/env python3 +"""Contracts for final runtime incident workloads.""" + +from __future__ import annotations + +import unittest + +from benchmark_data.runtime.incident_workloads import ( + INCIDENT_WORKLOADS, + IncidentWorkloadError, + incident_catalog_document, + validate_incident_observation, + validate_incident_workloads, +) + + +EXPECTED_WORKLOADS = { + "missing-daemon-after-shell", + "sustained-edit-commit-indexing", + "foreground-under-maintenance", + "diagnostic-dedup-batch-rate", + "daemon-steady-state-resources", + "renderer-consumer-event-count", +} + + +class IncidentWorkloadCatalogTest(unittest.TestCase): + def test_catalog_covers_every_final_incident(self) -> None: + catalog = validate_incident_workloads() + + self.assertEqual({workload.id for workload in catalog}, EXPECTED_WORKLOADS) + self.assertTrue(all(workload.sample_count == 1 for workload in catalog)) + self.assertTrue(all(not workload.slo_gate for workload in catalog)) + self.assertTrue( + all(workload.percentile_minimums == {"p95": 40, "p99": 100} + for workload in catalog) + ) + + def test_missing_daemon_requires_fail_fast_and_reaping_evidence(self) -> None: + workload = next( + item for item in INCIDENT_WORKLOADS + if item.id == "missing-daemon-after-shell" + ) + + self.assertEqual(workload.process_policy, "crash") + self.assertEqual( + set(workload.required_observations), + { + "missing_daemon_fail_fast_ns", + "process_startup_control_ns", + "direct_hook_wall_ns", + "hook_residual_ns", + "lifecycle_wrapper_overhead_ns", + "process_tree_reaped", + }, + ) + + def test_metric_workloads_require_reviewed_raw_observations(self) -> None: + required = { + item.id: set(item.required_observations) + for item in INCIDENT_WORKLOADS + } + + self.assertTrue( + { + "edit_count", + "commit_count", + "indexing_run_count", + "indexing_noop_count", + "indexing_coalesced_count", + "generation", + }.issubset(required["sustained-edit-commit-indexing"]) + ) + self.assertTrue( + { + "diagnostic_generated_count", + "diagnostic_deduplicated_count", + "diagnostic_batch_count", + }.issubset(required["diagnostic-dedup-batch-rate"]) + ) + self.assertTrue( + { + "daemon_cpu_time_ns", + "daemon_peak_rss_bytes", + "daemon_pss_bytes", + "wal_bytes", + "disk_read_bytes", + "disk_write_bytes", + "write_amplification_ppm", + "queue_depth", + "generation", + }.issubset(required["daemon-steady-state-resources"]) + ) + self.assertTrue( + { + "foreground_under_maintenance_ns", + "queue_enqueued_count", + "queue_shed_count", + "queue_cancelled_count", + "queue_retry_count", + }.issubset(required["foreground-under-maintenance"]) + ) + self.assertEqual( + required["renderer-consumer-event-count"], + {"renderer_event_count", "consumer_event_count"}, + ) + + def test_catalog_is_machine_readable_and_fail_closed_until_fixes_land( + self, + ) -> None: + document = incident_catalog_document() + + self.assertEqual( + document["percentile_eligibility"], + {"p95_minimum_samples": 40, "p99_minimum_samples": 100}, + ) + self.assertEqual(document["evidence_class"], "n=1_regression_only") + availability = { + item["id"]: item["availability"]["state"] + for item in document["workloads"] + } + self.assertEqual(availability["missing-daemon-after-shell"], "available") + self.assertEqual(availability["diagnostic-dedup-batch-rate"], "available") + self.assertTrue( + all( + state == "unavailable" + for workload, state in availability.items() + if workload + not in { + "missing-daemon-after-shell", + "diagnostic-dedup-batch-rate", + } + ) + ) + self.assertTrue( + all(item["slo_gate"] is False for item in document["workloads"]) + ) + + +class IncidentObservationValidationTest(unittest.TestCase): + def test_observation_invariants_preserve_truthful_counts(self) -> None: + observation = { + "edit_count": 20, + "commit_count": 5, + "indexing_run_count": 8, + "indexing_noop_count": 3, + "indexing_coalesced_count": 14, + "diagnostic_generated_count": 100, + "diagnostic_deduplicated_count": 30, + "diagnostic_batch_count": 10, + "daemon_cpu_time_ns": 50_000, + "daemon_peak_rss_bytes": 8_192, + "wal_bytes": 4_096, + "queue_depth": 2, + "generation": 7, + "renderer_event_count": 12, + "consumer_event_count": 12, + "missing_daemon_fail_fast_ns": 1_000_000, + "process_tree_reaped": True, + } + + self.assertIs(validate_incident_observation(observation), observation) + + def test_observation_rejects_impossible_dedup_and_consumer_counts(self) -> None: + with self.assertRaisesRegex(IncidentWorkloadError, "deduplicated"): + validate_incident_observation( + { + "diagnostic_generated_count": 1, + "diagnostic_deduplicated_count": 2, + } + ) + with self.assertRaisesRegex(IncidentWorkloadError, "consumer"): + validate_incident_observation( + {"renderer_event_count": 1, "consumer_event_count": 2} + ) + + def test_observation_rejects_unknown_or_negative_metrics(self) -> None: + with self.assertRaisesRegex(IncidentWorkloadError, "unknown"): + validate_incident_observation({"producer_threshold_ns": 10**18}) + with self.assertRaisesRegex(IncidentWorkloadError, "non-negative"): + validate_incident_observation({"wal_bytes": -1}) + + +if __name__ == "__main__": + unittest.main() diff --git a/benchmark_data/runtime/tests/test_lifecycle.py b/benchmark_data/runtime/tests/test_lifecycle.py new file mode 100644 index 0000000000..9ffdbe3398 --- /dev/null +++ b/benchmark_data/runtime/tests/test_lifecycle.py @@ -0,0 +1,392 @@ +"""Tests for hermetic runtime process lifecycle and evidence capture.""" + +from __future__ import annotations + +import json +import os +import signal +import socket +import sys +import tempfile +import unittest +from pathlib import Path + + +RUNTIME_ROOT = Path(__file__).resolve().parents[1] +sys.path.insert(0, str(RUNTIME_ROOT)) + +import lifecycle # noqa: E402 + + +def fake_host(name: str) -> Path: + return RUNTIME_ROOT / "fixtures" / "fake_hosts" / name + + +def reserve_port() -> int: + with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as listener: + listener.bind(("127.0.0.1", 0)) + return int(listener.getsockname()[1]) + + +def dashboard_command(mode: str, port: int, *extra: str) -> list[str]: + return [ + sys.executable, + str(fake_host("dashboard_server.py")), + "--mode", + mode, + "--port", + str(port), + *extra, + ] + + +class DashboardLifecycleTests(unittest.TestCase): + def test_warming_daemon_becomes_ready_and_survives_host_run(self) -> None: + with tempfile.TemporaryDirectory(prefix="runtime-lifecycle-test-") as directory: + root = Path(directory) + port = reserve_port() + url = f"http://127.0.0.1:{port}/dashboard" + daemon = lifecycle.OwnedDaemon( + dashboard_command("warming", port, "--warmup-requests", "2"), + env=os.environ, + log_dir=root / "daemon-logs", + readiness=lambda: lifecycle.probe_dashboard_once( + url, + request_timeout=0.05, + ), + readiness_timeout=2.0, + poll_interval=0.01, + termination_grace=0.1, + ) + + with daemon: + self.assertEqual(daemon.evidence.activation_state, "active") + self.assertEqual(daemon.evidence.restart_state, "not_required") + self.assertEqual(daemon.evidence.availability_state, "available") + self.assertEqual(daemon.evidence.availability_detail, None) + self.assertIn("partial", daemon.evidence.readiness_availability_history) + self.assertEqual(daemon.evidence.timeout_phase, None) + self.assertEqual(daemon.evidence.process_count, 1) + with self.assertRaisesRegex(lifecycle.LifecycleError, "already started"): + daemon.start() + + result = lifecycle.run_host( + [ + sys.executable, + str(fake_host("verbose_host.py")), + "--capture-id", + "capture-fixed", + "--repeat-capture-id", + "2", + "--activated", + ], + env=os.environ, + log_dir=root / "host-logs", + input_payload=b'{"request":"fixture"}\n', + timeout=1.0, + termination_grace=0.1, + daemon=daemon, + ) + + self.assertTrue(result.evidence.daemon_survived) + self.assertEqual(result.evidence.activation_state, "active") + self.assertEqual(result.evidence.restart_state, "not_required") + self.assertEqual(result.evidence.availability_state, "available") + self.assertEqual(result.evidence.availability_detail, None) + self.assertEqual(result.evidence.capture_id, "capture-fixed") + self.assertEqual(result.evidence.capture_id_occurrences, 2) + self.assertEqual( + result.evidence.request_payload_bytes, + len(b'{"request":"fixture"}\n'), + ) + self.assertEqual(result.evidence.response_payload_bytes, len(result.stdout)) + self.assertGreater(result.evidence.end_to_end_host_wall_seconds, 0.0) + self.assertGreater(result.evidence.end_to_end_hook_wall_seconds, 0.0) + self.assertEqual(result.evidence.sample_count, 1) + self.assertEqual( + result.evidence.measurement_class, + "n=1 regression sample", + ) + + self.assertEqual(daemon.evidence.process_count_after_cleanup, 0) + self.assertTrue(daemon.evidence.term_sent) + + def test_unresponsive_daemon_times_out_during_response_and_is_cleaned_up(self) -> None: + with tempfile.TemporaryDirectory(prefix="runtime-lifecycle-test-") as directory: + root = Path(directory) + port = reserve_port() + url = f"http://127.0.0.1:{port}/dashboard" + daemon = lifecycle.OwnedDaemon( + dashboard_command("unresponsive", port, "--delay", "5"), + env=os.environ, + log_dir=root / "daemon-logs", + readiness=lambda: lifecycle.probe_dashboard_once( + url, + request_timeout=0.03, + ), + readiness_timeout=0.25, + poll_interval=0.01, + termination_grace=0.05, + ) + + with self.assertRaises(lifecycle.ReadinessTimeout) as raised: + daemon.start() + + self.assertEqual(raised.exception.evidence.timeout_phase, "dashboard_response") + self.assertEqual(raised.exception.evidence.availability_state, "unavailable") + self.assertIsNotNone(raised.exception.evidence.availability_detail) + self.assertEqual(raised.exception.evidence.process_count_after_cleanup, 0) + self.assertTrue(raised.exception.evidence.term_sent) + + def test_dashboard_http_variants_remain_typed_failures(self) -> None: + variants = { + "malformed": ("dashboard_malformed", 200, "failed"), + "no-content": ("dashboard_empty", 204, "unavailable"), + "not-found": ("dashboard_http_404", 404, "unsupported"), + } + for mode, (expected_phase, expected_status, availability_state) in variants.items(): + with self.subTest(mode=mode): + with tempfile.TemporaryDirectory( + prefix="runtime-lifecycle-test-" + ) as directory: + root = Path(directory) + port = reserve_port() + url = f"http://127.0.0.1:{port}/dashboard" + daemon = lifecycle.OwnedDaemon( + dashboard_command(mode, port), + env=os.environ, + log_dir=root / "daemon-logs", + readiness=lambda: lifecycle.probe_dashboard_once( + url, + request_timeout=0.05, + ), + readiness_timeout=0.2, + poll_interval=0.01, + termination_grace=0.05, + ) + + with self.assertRaises(lifecycle.ReadinessTimeout) as raised: + daemon.start() + + evidence = raised.exception.evidence + self.assertEqual(evidence.timeout_phase, expected_phase) + self.assertEqual(evidence.dashboard_status_code, expected_status) + self.assertEqual(evidence.activation_state, "unknown") + self.assertEqual(evidence.availability_state, availability_state) + self.assertIsNotNone(evidence.availability_detail) + self.assertEqual(evidence.process_count_after_cleanup, 0) + + +class HostLifecycleTests(unittest.TestCase): + def test_missing_daemon_after_shell_fails_without_timeout_and_reaps_tree( + self, + ) -> None: + with tempfile.TemporaryDirectory(prefix="runtime-lifecycle-test-") as directory: + root = Path(directory) + result = lifecycle.run_host( + [ + sys.executable, + str(fake_host("after_shell_missing_daemon.py")), + ], + env=os.environ, + log_dir=root / "host-logs", + timeout=2.0, + termination_grace=0.05, + check=False, + ) + try: + self.assertEqual(result.evidence.exit_code, 72) + self.assertEqual(result.evidence.timeout_phase, None) + self.assertEqual(result.evidence.availability_state, "failed") + self.assertTrue(result.evidence.term_sent) + self.assertTrue(result.evidence.kill_sent) + self.assertEqual(result.evidence.process_count_after_cleanup, 0) + self.assertEqual( + lifecycle.process_group_process_count(result.process_group_id), + 0, + ) + finally: + try: + os.killpg(result.process_group_id, signal.SIGKILL) + except ProcessLookupError: + pass + + def test_verbose_hanging_child_is_drained_then_term_killed(self) -> None: + with tempfile.TemporaryDirectory(prefix="runtime-lifecycle-test-") as directory: + root = Path(directory) + + result = lifecycle.run_host( + [ + sys.executable, + str(fake_host("verbose_host.py")), + "--spawn-child", + "--child-lines", + "1500", + "--child-hang-seconds", + "5", + "--child-ignore-term", + ], + env=os.environ, + log_dir=root / "host-logs", + timeout=0.2, + termination_grace=0.05, + check=False, + ) + + self.assertEqual(result.evidence.timeout_phase, "child_io") + self.assertEqual(result.evidence.availability_state, "failed") + self.assertIsNotNone(result.evidence.availability_detail) + self.assertTrue(result.evidence.term_sent) + self.assertTrue(result.evidence.kill_sent) + self.assertGreater(result.evidence.stdout_bytes, 32_000) + self.assertGreater(result.evidence.stderr_bytes, 32_000) + self.assertEqual( + lifecycle.process_group_process_count(result.process_group_id), + 0, + ) + self.assertEqual( + result.evidence.stdout_bytes, + result.stdout_log.stat().st_size, + ) + self.assertEqual( + result.evidence.stderr_bytes, + result.stderr_log.stat().st_size, + ) + + def test_nonzero_host_error_carries_evidence_after_cleanup(self) -> None: + with tempfile.TemporaryDirectory(prefix="runtime-lifecycle-test-") as directory: + root = Path(directory) + + with self.assertRaises(lifecycle.HostProcessError) as raised: + lifecycle.run_host( + [ + sys.executable, + str(fake_host("verbose_host.py")), + "--capture-id", + "capture-error", + "--exit-code", + "7", + ], + env=os.environ, + log_dir=root / "host-logs", + timeout=1.0, + termination_grace=0.05, + ) + + result = raised.exception.result + self.assertEqual(result.evidence.exit_code, 7) + self.assertEqual(result.evidence.capture_id, "capture-error") + self.assertEqual(result.evidence.availability_state, "failed") + self.assertEqual( + lifecycle.process_group_process_count(result.process_group_id), + 0, + ) + + def test_repeated_capture_ids_are_accepted_but_conflicts_are_rejected(self) -> None: + with tempfile.TemporaryDirectory(prefix="runtime-lifecycle-test-") as directory: + root = Path(directory) + repeated = lifecycle.run_host( + [ + sys.executable, + str(fake_host("verbose_host.py")), + "--capture-id", + "capture-repeat", + "--repeat-capture-id", + "4", + "--restart-required", + ], + env=os.environ, + log_dir=root / "repeated", + timeout=1.0, + termination_grace=0.05, + ) + + self.assertEqual(repeated.evidence.capture_id, "capture-repeat") + self.assertEqual(repeated.evidence.capture_id_occurrences, 4) + self.assertEqual(repeated.evidence.restart_state, "required") + self.assertEqual(repeated.evidence.availability_state, "available") + + with self.assertRaises(lifecycle.HostProcessError) as raised: + lifecycle.run_host( + [ + sys.executable, + str(fake_host("verbose_host.py")), + "--capture-id", + "capture-first", + "--conflicting-capture-id", + "capture-second", + ], + env=os.environ, + log_dir=root / "conflicting", + timeout=1.0, + termination_grace=0.05, + ) + + self.assertIn("conflicting capture IDs", str(raised.exception)) + + def test_signal_path_stops_the_owned_daemon_group(self) -> None: + with tempfile.TemporaryDirectory(prefix="runtime-lifecycle-test-") as directory: + root = Path(directory) + port = reserve_port() + url = f"http://127.0.0.1:{port}/dashboard" + daemon = lifecycle.OwnedDaemon( + dashboard_command("ok", port), + env=os.environ, + log_dir=root / "daemon-logs", + readiness=lambda: lifecycle.probe_dashboard_once( + url, + request_timeout=0.05, + ), + readiness_timeout=1.0, + poll_interval=0.01, + termination_grace=0.05, + ) + daemon.start() + process_group_id = daemon.process_group_id + + with self.assertRaises(lifecycle.LifecycleInterrupted) as raised: + daemon.handle_signal(signal.SIGINT, None) + + self.assertEqual(raised.exception.signum, signal.SIGINT) + self.assertEqual( + lifecycle.process_group_process_count(process_group_id), + 0, + ) + self.assertEqual(daemon.evidence.process_count_after_cleanup, 0) + + +class RunWorkspaceTests(unittest.TestCase): + def test_workspace_cleanup_and_preserve_on_failure_are_explicit(self) -> None: + with tempfile.TemporaryDirectory(prefix="runtime-lifecycle-test-") as directory: + root = Path(directory) + normal = lifecycle.RunWorkspace(root, preserve_on_failure=False) + with normal: + normal_path = normal.path + (normal.path / "evidence.json").write_text("{}\n", encoding="utf-8") + self.assertFalse(normal_path.exists()) + + failed = lifecycle.RunWorkspace(root, preserve_on_failure=False) + with self.assertRaisesRegex(RuntimeError, "failed"): + with failed: + failed_path = failed.path + raise RuntimeError("failed") + self.assertFalse(failed_path.exists()) + + preserved = lifecycle.RunWorkspace(root, preserve_on_failure=True) + with self.assertRaisesRegex(RuntimeError, "preserve"): + with preserved: + preserved_path = preserved.path + (preserved.path / "evidence.json").write_text( + json.dumps({"sample_count": 1}) + "\n", + encoding="utf-8", + ) + raise RuntimeError("preserve") + self.assertTrue(preserved_path.is_dir()) + self.assertEqual( + json.loads((preserved_path / "evidence.json").read_text(encoding="utf-8")), + {"sample_count": 1}, + ) + + +if __name__ == "__main__": + unittest.main() diff --git a/benchmark_data/runtime/tests/test_mcp_client.py b/benchmark_data/runtime/tests/test_mcp_client.py new file mode 100644 index 0000000000..c79044901e --- /dev/null +++ b/benchmark_data/runtime/tests/test_mcp_client.py @@ -0,0 +1,435 @@ +#!/usr/bin/env python3 +"""Unit tests for the line-oriented MCP benchmark client.""" + +from __future__ import annotations + +import json +import os +import signal +import subprocess +import sys +import tempfile +import textwrap +import time +import unittest +from concurrent.futures import ThreadPoolExecutor +from pathlib import Path +from unittest import mock + +from benchmark_data.runtime.mcp_client import ( + MCPClient, + MCPProtocolError, + MCPTimeoutError, + MCPToolError, + JSONRPCError, +) + + +FAKE_SERVER = r""" +import json +import os +import signal +import subprocess +import sys +import threading +import time + +if sys.argv[-2:] != ["serve", "--timings"]: + raise SystemExit(f"unexpected arguments: {sys.argv!r}") + +write_lock = threading.Lock() +initialized = threading.Event() +owned_children = [] + + +def reap_owned_children(_signum, _frame): + for child in owned_children: + if child.poll() is None: + child.kill() + child.wait() + raise SystemExit(0) + + +signal.signal(signal.SIGTERM, reap_owned_children) + + +def send(message): + payload = json.dumps( + message, + ensure_ascii=False, + separators=(",", ":"), + sort_keys=True, + ).encode("utf-8") + with write_lock: + sys.stdout.buffer.write(payload + b"\n") + sys.stdout.buffer.flush() + + +def handle_call(request): + request_id = request["id"] + params = request["params"] + name = params["name"] + arguments = params.get("arguments", {}) + + if name == "timeout": + return + if name == "delayed": + time.sleep(arguments["delay"]) + if name == "notify_then_echo": + send( + { + "jsonrpc": "2.0", + "method": "notifications/progress", + "params": {"token": arguments["token"]}, + } + ) + if name == "malformed": + with write_lock: + sys.stdout.buffer.write(b"{not-json}\n") + sys.stdout.buffer.flush() + return + if name == "rpc_error": + send( + { + "jsonrpc": "2.0", + "id": request_id, + "error": { + "code": -32042, + "message": "fake rpc failure", + "data": {"retryable": False}, + }, + } + ) + return + if name == "tool_error": + send( + { + "jsonrpc": "2.0", + "id": request_id, + "result": { + "isError": True, + "content": [{"type": "text", "text": "fake tool failure"}], + "_meta": {"duration_us": 17}, + }, + } + ) + return + if name == "stderr_flood": + sys.stderr.buffer.write(b"x" * (512 * 1024)) + sys.stderr.buffer.flush() + if name == "spawn_stubborn_tree": + child = subprocess.Popen( + [ + sys.executable, + "-c", + ( + "import signal,time;" + "signal.signal(signal.SIGTERM,signal.SIG_IGN);" + "time.sleep(60)" + ), + ] + ) + owned_children.append(child) + value = {"parent_pid": os.getpid(), "child_pid": child.pid} + elif name == "pid": + value = os.getpid() + else: + value = arguments.get("value", arguments) + + send( + { + "jsonrpc": "2.0", + "id": request_id, + "result": { + "content": [{"type": "text", "text": json.dumps(value)}], + "structuredContent": {"value": value}, + "_meta": {"duration_us": 321}, + }, + } + ) + + +for raw_line in sys.stdin.buffer: + request = json.loads(raw_line) + method = request.get("method") + if method == "initialize": + if os.environ.get("FAKE_INITIALIZE_HANG") == "1": + time.sleep(60) + send( + { + "jsonrpc": "2.0", + "id": request["id"], + "result": { + "protocolVersion": request["params"]["protocolVersion"], + "capabilities": {"tools": {}}, + "serverInfo": {"name": "fake-tracedecay", "version": "1"}, + }, + } + ) + elif method == "notifications/initialized": + initialized.set() + elif method == "tools/list": + if not initialized.wait(1): + send( + { + "jsonrpc": "2.0", + "id": request["id"], + "error": {"code": -32000, "message": "not initialized"}, + } + ) + else: + send( + { + "jsonrpc": "2.0", + "id": request["id"], + "result": { + "tools": [ + { + "name": "echo", + "description": "fake echo", + "inputSchema": {"type": "object"}, + } + ] + }, + } + ) + elif method == "tools/call": + threading.Thread(target=handle_call, args=(request,), daemon=True).start() +""" + + +class MCPClientTest(unittest.TestCase): + def setUp(self) -> None: + self._temporary_directory = tempfile.TemporaryDirectory() + self.addCleanup(self._temporary_directory.cleanup) + self.server_path = Path(self._temporary_directory.name) / "fake_server.py" + self.server_path.write_text(textwrap.dedent(FAKE_SERVER), encoding="utf-8") + + def client(self, **overrides: object) -> MCPClient: + options: dict[str, object] = { + "timeout": 0.5, + "terminate_timeout": 0.1, + "kill_timeout": 0.5, + } + options.update(overrides) + return MCPClient((sys.executable, str(self.server_path)), **options) + + def assert_process_gone(self, pid: int) -> None: + deadline = time.monotonic() + 1 + while time.monotonic() < deadline: + try: + os.kill(pid, 0) + except ProcessLookupError: + return + time.sleep(0.01) + self.fail(f"process {pid} is still alive") + + def test_start_performs_handshake_and_lists_tools(self) -> None: + with self.client() as client: + response = client.list_tools() + + self.assertEqual(response.result["tools"][0]["name"], "echo") + self.assertEqual( + client.initialize_result["serverInfo"]["name"], + "fake-tracedecay", + ) + self.assertEqual( + client.command[-2:], + ("serve", "--timings"), + ) + + def test_initialize_timeout_is_attributed_and_process_is_reaped(self) -> None: + client = self.client( + timeout=0.05, + env={"FAKE_INITIALIZE_HANG": "1"}, + ) + + with self.assertRaises(MCPTimeoutError) as raised: + client.start() + + self.assertEqual(raised.exception.phase, "initialize") + self.assertFalse(client.process_alive) + self.assertEqual(client.process_start_count, 1) + + def test_out_of_order_responses_match_request_ids(self) -> None: + with self.client(timeout=1) as client: + with ThreadPoolExecutor(max_workers=2) as executor: + slow = executor.submit( + client.call_tool, + "delayed", + {"delay": 0.15, "value": "slow"}, + ) + fast = executor.submit( + client.call_tool, + "delayed", + {"delay": 0.01, "value": "fast"}, + ) + + self.assertEqual( + slow.result().result["structuredContent"]["value"], + "slow", + ) + self.assertEqual( + fast.result().result["structuredContent"]["value"], + "fast", + ) + + def test_notifications_are_queued_without_stealing_response(self) -> None: + with self.client() as client: + response = client.call_tool( + "notify_then_echo", + {"token": "progress-1", "value": "done"}, + ) + notification = client.next_notification(timeout=0.2) + + self.assertEqual(response.result["structuredContent"]["value"], "done") + self.assertEqual(notification.method, "notifications/progress") + self.assertEqual(notification.params, {"token": "progress-1"}) + + def test_malformed_line_fails_the_pending_request(self) -> None: + with self.client() as client: + with self.assertRaisesRegex(MCPProtocolError, "invalid JSON"): + client.call_tool("malformed") + + self.assertTrue(client.process_alive) + recovered = client.call_tool("echo", {"value": "recovered"}) + self.assertEqual( + recovered.result["structuredContent"]["value"], + "recovered", + ) + + def test_request_timeout_is_bounded(self) -> None: + with self.client() as client: + started = time.monotonic() + with self.assertRaises(MCPTimeoutError) as raised: + client.call_tool("timeout", timeout=0.05) + + self.assertLess(time.monotonic() - started, 0.4) + self.assertEqual(raised.exception.phase, "tools/call") + self.assertTrue(client.process_alive) + self.assertEqual(client.process_start_count, 1) + recovered = client.call_tool("echo", {"value": "still-alive"}) + self.assertEqual( + recovered.result["structuredContent"]["value"], + "still-alive", + ) + + def test_json_rpc_error_preserves_error_details(self) -> None: + with self.client() as client: + with self.assertRaises(JSONRPCError) as raised: + client.call_tool("rpc_error") + + self.assertEqual(raised.exception.code, -32042) + self.assertEqual(raised.exception.data, {"retryable": False}) + + def test_tool_error_is_not_reported_as_an_empty_success(self) -> None: + with self.client() as client: + with self.assertRaises(MCPToolError) as raised: + client.call_tool("tool_error") + + self.assertEqual(raised.exception.result["_meta"]["duration_us"], 17) + self.assertIn("fake tool failure", str(raised.exception)) + + def test_handler_timing_and_utf8_payload_sizes_are_extracted(self) -> None: + with self.client() as client: + response = client.call_tool("echo", {"value": "μ"}) + + expected_request = { + "jsonrpc": "2.0", + "id": response.request_id, + "method": "tools/call", + "params": {"name": "echo", "arguments": {"value": "μ"}}, + } + expected_response = { + "jsonrpc": "2.0", + "id": response.request_id, + "result": response.result, + } + compact = {"ensure_ascii": False, "separators": (",", ":"), "sort_keys": True} + self.assertEqual(response.handler_duration_us, 321) + self.assertEqual( + response.request_bytes, + len(json.dumps(expected_request, **compact).encode("utf-8")), + ) + self.assertEqual( + response.response_bytes, + len(json.dumps(expected_response, **compact).encode("utf-8")), + ) + self.assertEqual( + response.payload_bytes, + response.request_bytes + response.response_bytes, + ) + self.assertEqual( + response.content_bytes, + sum( + len(item["text"].encode("utf-8")) + for item in response.result["content"] + ), + ) + self.assertEqual(response.handler_duration_ns, 321_000) + self.assertGreater(response.wall_duration_ns, 0) + + def test_persistent_process_is_reused(self) -> None: + with self.client() as client: + first = client.call_tool("pid").result["structuredContent"]["value"] + second = client.call_tool("pid").result["structuredContent"]["value"] + + self.assertEqual(first, second) + self.assertEqual(first, client.pid) + self.assertEqual(client.process_start_count, 1) + self.assertTrue(client.process_alive) + + def test_explicit_binary_command_is_spawned_without_a_shell(self) -> None: + with mock.patch( + "benchmark_data.runtime.mcp_client.subprocess.Popen", + wraps=subprocess.Popen, + ) as popen: + with self.client() as client: + client.call_tool("echo") + + self.assertEqual(popen.call_count, 1) + self.assertIs(popen.call_args.kwargs["shell"], False) + self.assertEqual( + tuple(popen.call_args.args[0])[-2:], + ("serve", "--timings"), + ) + + def test_string_command_is_rejected_instead_of_shell_parsed(self) -> None: + with self.assertRaisesRegex(TypeError, "sequence"): + MCPClient(sys.executable) + + def test_concurrent_calls_share_one_process(self) -> None: + with self.client(timeout=1) as client: + with ThreadPoolExecutor(max_workers=8) as executor: + futures = [ + executor.submit(client.call_tool, "echo", {"value": index}) + for index in range(8) + ] + + self.assertEqual( + [future.result().result["structuredContent"]["value"] for future in futures], + list(range(8)), + ) + + def test_stderr_is_drained_without_blocking_stdout(self) -> None: + with self.client(timeout=1) as client: + response = client.call_tool("stderr_flood", {"value": "ok"}) + + self.assertEqual(response.result["structuredContent"]["value"], "ok") + self.assertGreater(client.stderr_bytes, 0) + + @unittest.skipUnless(hasattr(os, "killpg"), "requires POSIX process groups") + def test_context_manager_kills_stubborn_process_group(self) -> None: + with self.client() as client: + value = client.call_tool("spawn_stubborn_tree").result["structuredContent"][ + "value" + ] + parent_pid = value["parent_pid"] + child_pid = value["child_pid"] + + self.assert_process_gone(parent_pid) + self.assert_process_gone(child_pid) + + +if __name__ == "__main__": + unittest.main() diff --git a/benchmark_data/runtime/tests/test_policy.py b/benchmark_data/runtime/tests/test_policy.py new file mode 100644 index 0000000000..25815765ed --- /dev/null +++ b/benchmark_data/runtime/tests/test_policy.py @@ -0,0 +1,123 @@ +from __future__ import annotations + +import hashlib +import json +import tempfile +import unittest +from pathlib import Path + +from benchmark_data.runtime.policy import ( + PolicyViolation, + evaluate_artifact, + load_acceptance_policy, + load_journey_policy, + make_policy_receipt, +) + + +ROOT = Path(__file__).resolve().parents[1] +POLICY_PATH = ROOT / "policies" / "acceptance-v1.json" +JOURNEY_POLICY_PATH = ROOT / "policies" / "journey-margins-v1.json" + + +class AcceptancePolicyTests(unittest.TestCase): + def test_policy_is_independently_versioned_and_hashed_into_receipt(self) -> None: + policy = load_acceptance_policy(POLICY_PATH) + receipt = make_policy_receipt(policy, artifact_sha256="a" * 64) + + self.assertEqual(policy.policy_id, "runtime-acceptance-v1") + self.assertEqual(policy.policy_version, 1) + self.assertEqual( + receipt["policy_sha256"], + hashlib.sha256(POLICY_PATH.read_bytes()).hexdigest(), + ) + self.assertEqual(receipt["artifact_sha256"], "a" * 64) + self.assertEqual(receipt["policy_id"], policy.policy_id) + + def test_producer_cannot_relax_acceptance_policy(self) -> None: + policy = load_acceptance_policy(POLICY_PATH) + producer_artifact = { + "schema_version": 1, + "sample_count": 1, + "measurements": [{"elapsed_ns": 1}], + "acceptance_thresholds": { + "p95_minimum_matching_samples": 1, + "p99_minimum_matching_samples": 1, + "latency_ns": 10**18, + }, + } + + with self.assertRaisesRegex(PolicyViolation, "producer-authored"): + evaluate_artifact(producer_artifact, policy) + + def test_percentile_eligibility_comes_only_from_policy(self) -> None: + policy = load_acceptance_policy(POLICY_PATH) + + below_p95 = evaluate_artifact( + {"schema_version": 1, "sample_count": 39, "measurements": []}, + policy, + ) + p95_only = evaluate_artifact( + {"schema_version": 1, "sample_count": 40, "measurements": []}, + policy, + ) + p99 = evaluate_artifact( + {"schema_version": 1, "sample_count": 100, "measurements": []}, + policy, + ) + + self.assertFalse(below_p95["p95_eligible"]) + self.assertFalse(below_p95["p99_eligible"]) + self.assertTrue(p95_only["p95_eligible"]) + self.assertFalse(p95_only["p99_eligible"]) + self.assertTrue(p99["p95_eligible"]) + self.assertTrue(p99["p99_eligible"]) + self.assertEqual(policy.latency_mode, "advisory") + + def test_policy_file_is_canonical_json(self) -> None: + document = json.loads(POLICY_PATH.read_text(encoding="utf-8")) + expected = json.dumps( + document, + ensure_ascii=False, + sort_keys=True, + separators=(",", ":"), + ) + "\n" + self.assertEqual(POLICY_PATH.read_text(encoding="utf-8"), expected) + + def test_journey_margins_are_independent_and_frozen(self) -> None: + policy = load_journey_policy(JOURNEY_POLICY_PATH) + + self.assertEqual(policy.policy_id, "runtime-journey-margins-v1") + self.assertEqual(policy.p95_minimum_matching_samples, 40) + self.assertEqual( + set(policy.journeys), + { + "cli", + "mcp", + "query", + "dashboard", + "host", + "storage", + "daemon-steady-state", + "foreground-under-maintenance", + }, + ) + self.assertEqual( + policy.sha256, + hashlib.sha256(JOURNEY_POLICY_PATH.read_bytes()).hexdigest(), + ) + + changed = json.loads(JOURNEY_POLICY_PATH.read_text(encoding="utf-8")) + changed["journeys"]["query"]["p95_regression_margin_pct"] = 10**18 + with tempfile.TemporaryDirectory(prefix="runtime-policy-test-") as directory: + path = Path(directory) / "relaxed.json" + path.write_text( + json.dumps(changed, sort_keys=True, separators=(",", ":")) + "\n", + encoding="utf-8", + ) + with self.assertRaisesRegex(PolicyViolation, "modified"): + load_journey_policy(path) + + +if __name__ == "__main__": + unittest.main() diff --git a/benchmark_data/runtime/tests/test_scenarios.py b/benchmark_data/runtime/tests/test_scenarios.py new file mode 100644 index 0000000000..6a48b134f1 --- /dev/null +++ b/benchmark_data/runtime/tests/test_scenarios.py @@ -0,0 +1,535 @@ +#!/usr/bin/env python3 +"""Contract tests for deterministic runtime scenario definitions.""" + +from __future__ import annotations + +import json +import re +import unittest +from dataclasses import fields + +from benchmark_data.runtime.schema import SCHEMA_VERSION, validate_sample +from benchmark_data.runtime.scenarios import ( + SCENARIOS, + WORKLOADS, + CapabilityStatus, + CrateLane, + DaemonSurvival, + DigestSemantics, + RuntimeState, + ShutdownEvidence, + Surface, + TimeoutPhase, + WorkloadInputs, + WorkloadKind, + build_scenarios, + stable_digest, + validate_stable_id, +) + + +class ScenarioCatalogTest(unittest.TestCase): + def test_workloads_cover_every_required_query_family_and_tool(self) -> None: + tools = {workload.tool for workload in WORKLOADS} + kinds = {workload.kind for workload in WORKLOADS} + + self.assertEqual( + kinds, + { + WorkloadKind.EXACT, + WorkloadKind.LEXICAL, + WorkloadKind.GRAPH, + WorkloadKind.SESSION, + WorkloadKind.CONTEXT, + WorkloadKind.QUERY, + WorkloadKind.PAYLOAD, + WorkloadKind.CONCURRENCY, + }, + ) + self.assertTrue( + { + "tracedecay_find_exact_symbol", + "tracedecay_code_exact_occurrence", + "tracedecay_grep", + "tracedecay_code_phrase_search", + "tracedecay_callers", + "tracedecay_callees", + "tracedecay_impact", + "tracedecay_search", + "tracedecay_message_search", + "tracedecay_lcm_grep", + "tracedecay_lcm_expand_query", + "tracedecay_context", + }.issubset(tools) + ) + + def test_scenarios_cover_surfaces_states_and_throughput_levels(self) -> None: + self.assertEqual({scenario.surface for scenario in SCENARIOS}, set(Surface)) + self.assertEqual({scenario.state for scenario in SCENARIOS}, set(RuntimeState)) + self.assertEqual( + { + scenario.concurrency + for scenario in SCENARIOS + if scenario.is_throughput + }, + {1, 4, 8}, + ) + self.assertEqual( + { + scenario.surface + for scenario in SCENARIOS + if scenario.is_throughput + }, + {Surface.CLI, Surface.MCP}, + ) + self.assertTrue( + all( + scenario.surface is Surface.MCP + for scenario in SCENARIOS + if scenario.state is RuntimeState.PERSISTENT_MCP + ) + ) + + def test_final_runtime_states_include_noop_contention_and_recovery(self) -> None: + self.assertTrue( + { + RuntimeState.COLD_ADMISSION, + RuntimeState.WARM, + RuntimeState.NO_OP, + RuntimeState.CONTENTION, + RuntimeState.RECOVERY, + }.issubset({scenario.state for scenario in SCENARIOS}) + ) + + def test_catalog_is_reproducible_and_has_unique_ids(self) -> None: + rebuilt = build_scenarios() + + self.assertEqual(rebuilt, SCENARIOS) + self.assertEqual( + len({scenario.id for scenario in SCENARIOS}), + len(SCENARIOS), + ) + + def test_argument_factories_match_required_stable_shapes(self) -> None: + inputs = WorkloadInputs( + symbol="stable_symbol", + literal="stable::literal", + node_id="node-123", + code_generation="generation-456", + phrase="stable phrase", + query="stable query", + session_query="session sentinel", + provider="codex", + session_id="session-789", + payload_size=32, + ) + by_id = {workload.id: workload for workload in WORKLOADS} + + self.assertEqual( + by_id["exact-symbol"].arguments(inputs), + {"name": "stable_symbol", "limit": 20, "format": "json"}, + ) + self.assertEqual( + set(by_id["exact-occurrence"].arguments(inputs)), + {"literal", "scope", "meta", "format"}, + ) + self.assertEqual( + by_id["exact-occurrence"].arguments(inputs)["scope"]["generation"], + "generation-456", + ) + self.assertEqual( + by_id["lexical-phrase"].arguments(inputs)["phrases"], + ["stable phrase"], + ) + self.assertEqual( + by_id["graph-callers"].arguments(inputs)["node_id"], + "node-123", + ) + self.assertEqual( + by_id["session-expand-query"].arguments(inputs)["session_id"], + "session-789", + ) + self.assertEqual( + len(by_id["payload-stress"].arguments(inputs)["keywords"][0]), + 32, + ) + + def test_argument_factories_return_fresh_values(self) -> None: + workload = next(item for item in WORKLOADS if item.id == "query-context") + + first = workload.arguments() + first["keywords"].append("mutation") + second = workload.arguments() + + self.assertNotIn("mutation", second["keywords"]) + + def test_cli_argv_is_canonical_and_does_not_require_a_shell(self) -> None: + workload = next(item for item in WORKLOADS if item.id == "exact-symbol") + + argv = workload.cli_argv() + + self.assertEqual(argv[:3], ("tool", workload.tool, "--args")) + self.assertEqual( + json.loads(argv[3]), + workload.arguments(), + ) + self.assertNotIn("sh", argv) + + def test_capability_assessment_distinguishes_unavailable_and_unsupported(self) -> None: + scenario = next( + item for item in SCENARIOS if item.workload_id == "session-expand-query" + ) + required = set(scenario.required_capabilities) + tool = "tracedecay_lcm_expand_query" + + unavailable = scenario.assess_capabilities(available=required - {tool}) + unsupported = scenario.assess_capabilities( + available=required - {tool}, + unsupported={tool}, + ) + available = scenario.assess_capabilities(available=required) + + self.assertEqual(unavailable.status, CapabilityStatus.UNAVAILABLE) + self.assertEqual(unavailable.missing, (tool,)) + self.assertEqual(unsupported.status, CapabilityStatus.UNSUPPORTED) + self.assertEqual(unsupported.unsupported, (tool,)) + self.assertEqual(available.status, CapabilityStatus.AVAILABLE) + self.assertTrue(available.runnable) + + def test_capability_assessment_preserves_partial_and_failed_states(self) -> None: + scenario = next( + item for item in SCENARIOS if item.workload_id == "session-expand-query" + ) + required = set(scenario.required_capabilities) + tool = "tracedecay_lcm_expand_query" + + partial = scenario.assess_capabilities( + available=required, + partial={tool}, + ) + failed = scenario.assess_capabilities( + available=required, + failed={tool}, + ) + + self.assertEqual(partial.status, CapabilityStatus.PARTIAL) + self.assertEqual(partial.partial, (tool,)) + self.assertFalse(partial.runnable) + self.assertEqual(failed.status, CapabilityStatus.FAILED) + self.assertEqual(failed.failed, (tool,)) + self.assertFalse(failed.runnable) + + def test_stable_digests_ignore_timing_but_respect_order_semantics(self) -> None: + first = { + "results": [{"id": "a"}, {"id": "b"}], + "_meta": {"duration_us": 1}, + } + reordered = { + "_meta": {"duration_us": 99}, + "results": [{"id": "b"}, {"id": "a"}], + } + + self.assertNotEqual( + stable_digest(first, DigestSemantics.ORDERED_JSON), + stable_digest(reordered, DigestSemantics.ORDERED_JSON), + ) + self.assertEqual( + stable_digest(first, DigestSemantics.UNORDERED_JSON), + stable_digest(reordered, DigestSemantics.UNORDERED_JSON), + ) + + def test_every_scenario_declares_digest_and_capability_semantics(self) -> None: + workload_by_id = {workload.id: workload for workload in WORKLOADS} + + for scenario in SCENARIOS: + with self.subTest(scenario=scenario.id): + workload = workload_by_id[scenario.workload_id] + self.assertIsInstance(scenario.digest_semantics, DigestSemantics) + self.assertIn(workload.tool, scenario.required_capabilities) + self.assertGreaterEqual(len(scenario.required_capabilities), 1) + + def test_workloads_name_final_crate_lanes_and_scenarios_stay_in_lane(self) -> None: + expected_lanes = { + "tracedecay-query", + "tracedecay-code-index", + "tracedecay-capture", + "tracedecay-application", + "tracedecay-hooks", + "tracedecay-api", + "tracedecay-rusqlite-runtime", + "tracedecay", + } + self.assertEqual({lane.value for lane in CrateLane}, expected_lanes) + self.assertEqual( + { + lane + for workload in WORKLOADS + for lane in workload.supported_crate_lanes + }, + set(CrateLane), + ) + workload_by_id = {workload.id: workload for workload in WORKLOADS} + for scenario in SCENARIOS: + with self.subTest(scenario=scenario.id): + workload = workload_by_id[scenario.workload_id] + self.assertIn( + scenario.crate_lane, + workload.supported_crate_lanes, + ) + self.assertTrue(scenario.journey_id) + + def test_ids_reject_delivery_stage_and_milestone_vocabulary(self) -> None: + serialized_catalog = json.dumps( + { + "workloads": [ + { + "id": workload.id, + "journey_id": workload.journey_id, + "lanes": [ + lane.value for lane in workload.supported_crate_lanes + ], + } + for workload in WORKLOADS + ], + "scenarios": [ + { + "id": scenario.id, + "journey_id": scenario.journey_id, + "workload_id": scenario.workload_id, + "crate_lane": scenario.crate_lane.value, + } + for scenario in SCENARIOS + ], + }, + sort_keys=True, + ) + + self.assertIsNone( + re.search(r"(?:^|[^a-z])pr[-_]?\d+|milestone|stage[-_]?\d+", serialized_catalog) + ) + for rejected in ("pr14-runtime", "PR-19", "milestone-3", "stage-12"): + with self.subTest(rejected=rejected): + with self.assertRaises(ValueError): + validate_stable_id(rejected) + self.assertNotIn("budget", {field.name for field in fields(type(SCENARIOS[0]))}) + + def test_abba_sample_identity_is_raw_sample_schema_compatible(self) -> None: + scenario = SCENARIOS[0] + identity = scenario.sample_identity( + run_id="run-final-v2", + variant="baseline", + machine_fingerprint="machine-stable", + round_index=4, + abba_position=3, + ) + digest = "0" * 64 + sample = { + "schema_version": SCHEMA_VERSION, + "identity": identity, + "evidence": { + "sample_count": 1, + "evidence_class": "regression_sample", + }, + "availability": {"state": "available", "detail": None}, + "timing": { + "started_ns": 10, + "elapsed_ns": 20, + "cli_wall_ns": 20, + "mcp_wall_ns": None, + "hook_wall_ns": None, + "host_wall_ns": None, + "handler_us": None, + "daemon_us": None, + "admission_us": None, + "stages_us": {}, + "shutdown_total_ns": None, + "abort_offset_ns": None, + }, + "size": { + "process_count": 1, + "request_bytes": 30, + "response_bytes": 40, + "content_bytes": 10, + }, + "lifecycle": { + "timeout_phase": None, + "activation_state": "not_applicable", + "restart_state": "not_applicable", + "daemon_survived": True, + }, + "observations": {}, + "outcome": { + "status": "success", + "expected_digest": digest, + "actual_digest": digest, + "result_digest": digest, + "error": None, + }, + } + + self.assertIs(validate_sample(sample), sample) + self.assertEqual(identity["crate_id"], scenario.crate_lane.value) + self.assertEqual(identity["journey_id"], scenario.journey_id) + self.assertEqual(identity["workload_id"], scenario.workload_id) + self.assertEqual(identity["round_index"], 4) + self.assertEqual(identity["abba_position"], 3) + + def test_runtime_normalization_dimensions_are_explicit_and_only_runtime(self) -> None: + cold = next( + scenario + for scenario in SCENARIOS + if scenario.state is RuntimeState.COLD_ADMISSION + ) + warm = next( + scenario for scenario in SCENARIOS if scenario.state is RuntimeState.WARM + ) + + self.assertEqual( + cold.normalization_dimensions( + platform="linux-x86_64", + shard="shard-a", + storage_mode="durable", + ), + { + "platform": "linux-x86_64", + "shard": "shard-a", + "storage_mode": "durable", + "concurrency": cold.concurrency, + "cache_state": "cold", + }, + ) + self.assertEqual( + warm.normalization_dimensions( + platform="linux-x86_64", + shard="shard-a", + storage_mode="durable", + )["cache_state"], + "warm", + ) + self.assertEqual( + cold.test_identity, + (cold.crate_lane.value, cold.journey_id, cold.workload_id, cold.id), + ) + + def test_remote_journeys_require_committed_mounted_production_routes(self) -> None: + remote = next(scenario for scenario in SCENARIOS if scenario.is_remote) + + contract_only = remote.assess_production_route( + committed=False, + mounted=False, + contract_only=True, + ) + unwired = remote.assess_production_route( + committed=True, + mounted=False, + ) + failed = remote.assess_production_route( + committed=True, + mounted=True, + failed=True, + ) + mounted = remote.assess_production_route( + committed=True, + mounted=True, + ) + + self.assertEqual(contract_only.status, CapabilityStatus.UNAVAILABLE) + self.assertFalse(contract_only.runnable) + self.assertEqual(unwired.status, CapabilityStatus.UNAVAILABLE) + self.assertFalse(unwired.runnable) + self.assertEqual(failed.status, CapabilityStatus.FAILED) + self.assertFalse(failed.runnable) + self.assertEqual(mounted.status, CapabilityStatus.AVAILABLE) + self.assertTrue(mounted.runnable) + + def test_every_scenario_is_n1_wall_time_regression_evidence_not_an_slo(self) -> None: + for scenario in SCENARIOS: + with self.subTest(scenario=scenario.id): + self.assertEqual(scenario.sample_count, 1) + self.assertTrue(scenario.measures_wall_time) + self.assertFalse(scenario.slo_gate) + self.assertFalse(scenario.accepts_empty_success) + self.assertIsInstance(scenario.timeout_phase, TimeoutPhase) + self.assertIsInstance(scenario.daemon_survival, DaemonSurvival) + + def test_host_evidence_scenarios_preserve_typed_outcomes_and_states(self) -> None: + evidence = { + scenario.evidence_id: scenario + for scenario in SCENARIOS + if scenario.evidence_id is not None + } + + self.assertTrue( + { + "warming-daemon", + "unresponsive-daemon", + "dashboard-malformed", + "dashboard-204", + "dashboard-404", + "verbose-hanging-child", + "repeated-capture-ids", + }.issubset(evidence) + ) + self.assertEqual( + evidence["warming-daemon"].expected_status, + CapabilityStatus.PARTIAL, + ) + self.assertEqual( + evidence["unresponsive-daemon"].expected_status, + CapabilityStatus.UNAVAILABLE, + ) + self.assertEqual( + evidence["dashboard-malformed"].expected_status, + CapabilityStatus.FAILED, + ) + self.assertEqual( + evidence["dashboard-204"].expected_status, + CapabilityStatus.UNAVAILABLE, + ) + self.assertEqual( + evidence["dashboard-404"].expected_status, + CapabilityStatus.UNSUPPORTED, + ) + self.assertEqual( + evidence["verbose-hanging-child"].timeout_phase, + TimeoutPhase.CHILD_IO, + ) + self.assertEqual( + evidence["repeated-capture-ids"].expected_status, + CapabilityStatus.AVAILABLE, + ) + self.assertEqual( + {scenario.state for scenario in evidence.values()}, + {RuntimeState.HOST_ACTIVATION, RuntimeState.HOST_RESTART}, + ) + self.assertTrue( + all( + scenario.daemon_survival is DaemonSurvival.REQUIRED + for scenario in evidence.values() + ) + ) + + def test_shutdown_evidence_keeps_total_and_abort_offsets_distinct(self) -> None: + shutdown = { + scenario.shutdown_evidence + for scenario in SCENARIOS + if scenario.shutdown_evidence is not None + } + + self.assertEqual( + shutdown, + { + ShutdownEvidence(total_seconds=89, abort_offset_seconds=81), + ShutdownEvidence(total_seconds=57, abort_offset_seconds=52), + }, + ) + + def test_catalog_exposes_every_typed_expected_state(self) -> None: + self.assertEqual( + {scenario.expected_status for scenario in SCENARIOS}, + set(CapabilityStatus), + ) + + +if __name__ == "__main__": + unittest.main() diff --git a/benchmark_data/runtime/tests/test_schema.py b/benchmark_data/runtime/tests/test_schema.py new file mode 100644 index 0000000000..c908cd401e --- /dev/null +++ b/benchmark_data/runtime/tests/test_schema.py @@ -0,0 +1,557 @@ +from __future__ import annotations + +import json +import sys +import tempfile +import unittest +from pathlib import Path + + +ROOT = Path(__file__).resolve().parents[3] +sys.path.insert(0, str(ROOT)) + +from benchmark_data.runtime.schema import ( # noqa: E402 + SCHEMA_VERSION, + RuntimeArtifact, + SchemaValidationError, + generated_artifact_schema, + read_jsonl, + validate_report, + validate_sample, + write_jsonl, +) + + +CRATE_LANES = ( + "tracedecay-api", + "tracedecay-application", + "tracedecay-capture", + "tracedecay-domain", + "tracedecay-hooks", + "tracedecay-policy", + "tracedecay-rusqlite-runtime", + "tracedecay-sdk", + "tracedecay-store", + "tracedecay-tool-catalog", + "integrated-v2", +) + + +def valid_sample(**overrides: object) -> dict: + sample = { + "schema_version": SCHEMA_VERSION, + "identity": { + "candidate_id": "candidate-1", + "run_id": "run-1", + "capture_id": "capture-1", + "crate_id": "tracedecay-application", + "journey_id": "indexed-query", + "workload_id": "exact-symbol", + "variant": "baseline", + "machine_fingerprint": "machine-a", + "platform": "linux-x86_64", + "shard": "runtime-0", + "storage_mode": "sqlite", + "state": "warm", + "temperature": "warm", + "surface": "mcp", + "concurrency": 1, + "round_index": 0, + "abba_position": 0, + }, + "evidence": { + "sample_count": 1, + "evidence_class": "regression_sample", + }, + "availability": {"state": "available", "detail": None}, + "timing": { + "started_ns": 10, + "elapsed_ns": 20, + "cli_wall_ns": None, + "mcp_wall_ns": 20, + "hook_wall_ns": None, + "host_wall_ns": None, + "handler_us": 7, + "daemon_us": 3, + "admission_us": 2, + "stages_us": {"dispatch": 1}, + "shutdown_total_ns": None, + "abort_offset_ns": None, + }, + "size": { + "process_count": 1, + "request_bytes": 3, + "response_bytes": 5, + "content_bytes": 4, + }, + "lifecycle": { + "timeout_phase": None, + "activation_state": "active", + "restart_state": "not_required", + "daemon_survived": True, + }, + "observations": {}, + "outcome": { + "status": "success", + "expected_digest": "a" * 64, + "actual_digest": "a" * 64, + "result_digest": "a" * 64, + "error": None, + }, + } + sample.update(overrides) + return sample + + +def valid_report() -> dict: + return { + "schema_version": SCHEMA_VERSION, + "identity": { + "report_id": "report-1", + "candidate_id": "candidate-1", + "run_id": "run-1", + "capture_id": "capture-1", + "crate_id": "tracedecay-application", + "journey_id": "indexed-query", + "workload_id": "exact-symbol", + "variant": "baseline", + "machine_fingerprint": "machine-a", + "platform": "linux-x86_64", + "shard": "runtime-0", + "storage_mode": "sqlite", + "state": "warm", + "temperature": "warm", + "surface": "mcp", + "concurrency": 1, + "samples_sha256": "b" * 64, + }, + "evidence": { + "sample_count": 1, + "evidence_class": "regression_sample", + }, + "timing": {"started_ns": 10, "ended_ns": 30}, + "size": { + "sample_count": 1, + "process_count": 1, + "request_bytes": 3, + "response_bytes": 5, + "content_bytes": 4, + }, + "availability": { + "available_count": 1, + "unavailable_count": 0, + "unsupported_count": 0, + "partial_count": 0, + "failed_count": 0, + }, + "outcome": { + "success_count": 1, + "error_count": 0, + "timeout_count": 0, + "digest_mismatch_count": 0, + "daemon_death_count": 0, + }, + "statistics": { + "latency_ns": { + "sample_count": 1, + "p50": 20, + "p95": { + "available": False, + "value": None, + "minimum_samples": 40, + }, + "p99": { + "available": False, + "value": None, + "minimum_samples": 100, + }, + } + }, + } + + +class SampleSchemaTests(unittest.TestCase): + def test_valid_sample_is_returned_unchanged(self) -> None: + sample = valid_sample() + + self.assertIs(validate_sample(sample), sample) + + def test_missing_required_section_is_rejected(self) -> None: + sample = valid_sample() + del sample["timing"] + + with self.assertRaisesRegex(SchemaValidationError, "timing"): + validate_sample(sample) + + def test_unknown_fields_and_wrong_schema_version_are_rejected(self) -> None: + sample = valid_sample(unexpected=True) + with self.assertRaisesRegex(SchemaValidationError, "unexpected"): + validate_sample(sample) + + sample = valid_sample(schema_version=SCHEMA_VERSION + 1) + with self.assertRaisesRegex(SchemaValidationError, "schema_version"): + validate_sample(sample) + + def test_outcome_consistency_is_enforced(self) -> None: + sample = valid_sample() + sample["outcome"]["status"] = "error" + + with self.assertRaisesRegex(SchemaValidationError, "error"): + validate_sample(sample) + + def test_reviewed_runtime_evidence_fields_are_required(self) -> None: + sample = valid_sample() + + self.assertIs(validate_sample(sample), sample) + self.assertEqual(sample["identity"]["surface"], "mcp") + self.assertEqual(sample["timing"]["mcp_wall_ns"], 20) + self.assertEqual(sample["timing"]["handler_us"], 7) + self.assertEqual(sample["size"]["process_count"], 1) + self.assertEqual(sample["outcome"]["result_digest"], "a" * 64) + + del sample["identity"]["capture_id"] + with self.assertRaisesRegex(SchemaValidationError, "capture_id"): + validate_sample(sample) + + def test_incident_observations_are_preserved_in_raw_samples(self) -> None: + sample = valid_sample( + observations={ + "daemon_cpu_time_ns": 10, + "daemon_peak_rss_bytes": 20, + "wal_bytes": 30, + "queue_depth": 2, + "generation": 4, + } + ) + + self.assertIs(validate_sample(sample), sample) + self.assertEqual(sample["observations"]["wal_bytes"], 30) + + def test_impossible_incident_observations_fail_closed(self) -> None: + sample = valid_sample( + observations={ + "renderer_event_count": 1, + "consumer_event_count": 2, + } + ) + + with self.assertRaisesRegex(SchemaValidationError, "consumer"): + validate_sample(sample) + + def test_unavailable_incident_can_record_no_daemon_to_survive(self) -> None: + sample = valid_sample() + sample["availability"] = { + "state": "unavailable", + "detail": "daemon socket is absent", + } + sample["lifecycle"]["daemon_survived"] = None + sample["outcome"] = { + "status": "error", + "expected_digest": "a" * 64, + "actual_digest": "a" * 64, + "result_digest": "a" * 64, + "error": "expected daemon unavailable", + } + + self.assertIs(validate_sample(sample), sample) + + def test_success_without_daemon_requires_not_applicable_activation(self) -> None: + sample = valid_sample() + sample["lifecycle"] = { + "timeout_phase": None, + "activation_state": "not_applicable", + "restart_state": "not_applicable", + "daemon_survived": None, + } + + self.assertIs(validate_sample(sample), sample) + + def test_stable_workload_identity_supports_every_crate_lane_and_state(self) -> None: + for crate_id in CRATE_LANES: + with self.subTest(crate_id=crate_id): + sample = valid_sample() + sample["identity"]["crate_id"] = crate_id + self.assertIs(validate_sample(sample), sample) + + for state in ("cold", "warm", "no_op", "contention", "recovery"): + with self.subTest(state=state): + sample = valid_sample() + sample["identity"]["state"] = state + sample["identity"]["temperature"] = ( + "cold" if state == "cold" else "warm" + ) + self.assertIs(validate_sample(sample), sample) + + def test_runtime_normalization_dimensions_are_required_and_typed(self) -> None: + dimensions = { + "platform": "linux-x86_64", + "shard": "runtime-0", + "storage_mode": "sqlite", + "concurrency": 1, + "temperature": "warm", + } + sample = valid_sample() + self.assertEqual( + {field: sample["identity"][field] for field in dimensions}, + dimensions, + ) + + for field in dimensions: + with self.subTest(field=field): + missing = valid_sample() + del missing["identity"][field] + with self.assertRaisesRegex(SchemaValidationError, field): + validate_sample(missing) + + sample["identity"]["temperature"] = "hot" + with self.assertRaisesRegex(SchemaValidationError, "temperature"): + validate_sample(sample) + + def test_pr_stage_identity_and_milestone_budget_data_are_rejected(self) -> None: + for field in ("crate_id", "journey_id", "workload_id"): + with self.subTest(field=field): + sample = valid_sample() + sample["identity"][field] = "pr14-stage" + with self.assertRaisesRegex(SchemaValidationError, "PR-stage"): + validate_sample(sample) + + sample = valid_sample() + sample["identity"]["scenario"] = "pr14" + with self.assertRaisesRegex(SchemaValidationError, "scenario"): + validate_sample(sample) + + def test_unavailable_evidence_is_typed_and_never_successful_zero(self) -> None: + for availability_state in ("unavailable", "unsupported", "partial", "failed"): + with self.subTest(availability_state=availability_state): + sample = valid_sample() + sample["availability"] = { + "state": availability_state, + "detail": f"{availability_state} evidence", + } + sample["timing"].update( + { + "elapsed_ns": None, + "mcp_wall_ns": None, + "handler_us": None, + "daemon_us": None, + "admission_us": None, + "stages_us": {}, + } + ) + sample["size"].update( + { + "process_count": None, + "request_bytes": None, + "response_bytes": None, + "content_bytes": None, + } + ) + sample["outcome"].update( + { + "status": "error", + "actual_digest": None, + "result_digest": None, + "error": f"{availability_state} evidence", + } + ) + self.assertIs(validate_sample(sample), sample) + + sample["outcome"].update( + { + "status": "success", + "actual_digest": "a" * 64, + "result_digest": "a" * 64, + "error": None, + } + ) + sample["timing"]["elapsed_ns"] = 0 + sample["timing"]["mcp_wall_ns"] = 0 + sample["size"].update( + { + "process_count": 0, + "request_bytes": 0, + "response_bytes": 0, + "content_bytes": 0, + } + ) + with self.assertRaisesRegex( + SchemaValidationError, "cannot have a successful outcome" + ): + validate_sample(sample) + + def test_timeout_phase_and_daemon_survival_are_truthful(self) -> None: + timeout = valid_sample() + timeout["lifecycle"]["timeout_phase"] = "response" + timeout["outcome"].update( + { + "status": "timeout", + "actual_digest": None, + "result_digest": None, + "error": "deadline exceeded", + } + ) + self.assertIs(validate_sample(timeout), timeout) + + timeout["lifecycle"]["timeout_phase"] = None + with self.assertRaisesRegex(SchemaValidationError, "timeout_phase"): + validate_sample(timeout) + + daemon_death = valid_sample() + daemon_death["lifecycle"]["daemon_survived"] = False + with self.assertRaisesRegex(SchemaValidationError, "daemon_survived"): + validate_sample(daemon_death) + + def test_shutdown_total_and_abort_offset_remain_distinct(self) -> None: + for total_seconds, abort_seconds in ((89, 81), (57, 52)): + with self.subTest(total_seconds=total_seconds): + sample = valid_sample() + sample["timing"].update( + { + "elapsed_ns": total_seconds * 1_000_000_000, + "mcp_wall_ns": total_seconds * 1_000_000_000, + "shutdown_total_ns": total_seconds * 1_000_000_000, + "abort_offset_ns": abort_seconds * 1_000_000_000, + } + ) + + validated = validate_sample(sample) + + self.assertEqual( + validated["timing"]["shutdown_total_ns"], + total_seconds * 1_000_000_000, + ) + self.assertEqual( + validated["timing"]["abort_offset_ns"], + abort_seconds * 1_000_000_000, + ) + self.assertGreater( + validated["timing"]["shutdown_total_ns"], + validated["timing"]["abort_offset_ns"], + ) + + sample["timing"]["abort_offset_ns"] = sample["timing"]["shutdown_total_ns"] + with self.assertRaisesRegex(SchemaValidationError, "abort_offset_ns"): + validate_sample(sample) + + +class ReportSchemaTests(unittest.TestCase): + def test_valid_report_is_returned_unchanged(self) -> None: + report = valid_report() + + self.assertIs(validate_report(report), report) + + def test_report_count_and_timing_invariants_are_enforced(self) -> None: + report = valid_report() + report["outcome"]["error_count"] = 1 + with self.assertRaisesRegex(SchemaValidationError, "counts"): + validate_report(report) + + report = valid_report() + report["timing"]["ended_ns"] = 9 + with self.assertRaisesRegex(SchemaValidationError, "ended_ns"): + validate_report(report) + + def test_n1_regression_evidence_rejects_slo_gate_metadata(self) -> None: + report = valid_report() + report["evidence"]["baseline_policy_met"] = True + report["evidence"]["slo_eligible"] = True + + with self.assertRaisesRegex(SchemaValidationError, "unexpected"): + validate_report(report) + + def test_percentile_history_eligibility_is_explicit(self) -> None: + report = valid_report() + report["statistics"]["latency_ns"]["p99"] = { + "available": True, + "value": 20, + "minimum_samples": 100, + } + + with self.assertRaisesRegex(SchemaValidationError, "p99"): + validate_report(report) + + def test_availability_and_daemon_counts_are_consistent(self) -> None: + report = valid_report() + report["availability"]["available_count"] = 0 + report["availability"]["unavailable_count"] = 1 + report["outcome"]["success_count"] = 0 + report["outcome"]["error_count"] = 1 + self.assertIs(validate_report(report), report) + + report["outcome"]["daemon_death_count"] = 2 + with self.assertRaisesRegex(SchemaValidationError, "daemon_death_count"): + validate_report(report) + + def test_report_rejects_milestone_budget_statistics(self) -> None: + report = valid_report() + report["statistics"]["milestone_budget_ns"] = 1 + + with self.assertRaisesRegex(SchemaValidationError, "milestone"): + validate_report(report) + + +class JsonLinesTests(unittest.TestCase): + def test_jsonl_output_is_canonical_and_deterministic(self) -> None: + sample = valid_sample() + expected = json.dumps( + sample, + ensure_ascii=False, + allow_nan=False, + sort_keys=True, + separators=(",", ":"), + ) + "\n" + with tempfile.TemporaryDirectory() as directory: + first = Path(directory) / "first.jsonl" + second = Path(directory) / "second.jsonl" + + write_jsonl(first, [sample]) + write_jsonl(second, [sample]) + + self.assertEqual(first.read_bytes(), second.read_bytes()) + self.assertEqual(first.read_text(encoding="utf-8"), expected) + self.assertEqual(read_jsonl(first), [sample]) + + def test_malformed_json_and_invalid_schema_name_the_line(self) -> None: + with tempfile.TemporaryDirectory() as directory: + path = Path(directory) / "samples.jsonl" + path.write_text('{"broken":\n', encoding="utf-8") + with self.assertRaisesRegex(SchemaValidationError, r"line 1"): + read_jsonl(path) + + path.write_text('{"schema_version":1}\n', encoding="utf-8") + with self.assertRaisesRegex(SchemaValidationError, r"line 1"): + read_jsonl(path) + + def test_blank_jsonl_lines_are_rejected(self) -> None: + with tempfile.TemporaryDirectory() as directory: + path = Path(directory) / "samples.jsonl" + path.write_text("\n", encoding="utf-8") + + with self.assertRaisesRegex(SchemaValidationError, "blank"): + read_jsonl(path) + + +class GeneratedArtifactModelTests(unittest.TestCase): + def test_one_typed_model_validates_samples_and_reports(self) -> None: + sample = RuntimeArtifact.from_document(valid_sample()) + report = RuntimeArtifact.from_document(valid_report()) + + self.assertEqual(sample.kind, "sample") + self.assertEqual(report.kind, "report") + self.assertEqual(sample.identity["workload_id"], "exact-symbol") + self.assertEqual(report.identity["crate_id"], "tracedecay-application") + + def test_generated_schema_uses_canonical_model_sections(self) -> None: + schema = generated_artifact_schema() + + self.assertEqual(schema["$id"], "tracedecay.runtime-artifact.v1") + self.assertEqual(schema["oneOf"][0]["title"], "runtime-sample") + self.assertEqual(schema["oneOf"][1]["title"], "runtime-report") + self.assertIn("lifecycle", schema["oneOf"][0]["required"]) + self.assertNotIn("statistics", schema["oneOf"][0]["required"]) + self.assertIn("statistics", schema["oneOf"][1]["required"]) + self.assertNotIn("lifecycle", schema["oneOf"][1]["required"]) + + +if __name__ == "__main__": + unittest.main() diff --git a/benchmark_data/runtime/tests/test_statistics.py b/benchmark_data/runtime/tests/test_statistics.py new file mode 100644 index 0000000000..ab1b17a1d1 --- /dev/null +++ b/benchmark_data/runtime/tests/test_statistics.py @@ -0,0 +1,225 @@ +from __future__ import annotations + +import sys +import unittest +from pathlib import Path + + +ROOT = Path(__file__).resolve().parents[3] +sys.path.insert(0, str(ROOT)) + +from benchmark_data.runtime.statistics import ( # noqa: E402 + bootstrap_confidence_interval, + nearest_rank, + summarize_distribution, + summarize_normalized_history, + summarize_rates, + summarize_throughput, +) + + +def retained_sample( + latency_ns: int, + *, + retention_kind: str = "runtime_sample", + **identity_overrides: object, +) -> dict: + identity = { + "crate_id": "tracedecay-store", + "journey_id": "durable-read", + "workload_id": "lookup", + "platform": "linux-x86_64", + "shard": "runtime-0", + "storage_mode": "sqlite", + "concurrency": 1, + "temperature": "warm", + } + identity.update(identity_overrides) + return { + "identity": identity, + "retention_kind": retention_kind, + "latency_ns": latency_ns, + } + + +class PercentileTests(unittest.TestCase): + def test_small_sample_p99_is_maximum(self) -> None: + self.assertEqual(nearest_rank([30, 10, 20], 0.99), 30) + self.assertEqual(nearest_rank([30, 10, 20], 0.50), 20) + + summary = summarize_distribution([30, 10, 20]) + self.assertEqual(summary["p50"], 20) + self.assertEqual(summary["p95"], 30) + self.assertEqual(summary["p99"], 30) + self.assertEqual(summary["percentile_method"], "nearest_rank") + + def test_empty_distribution_has_null_percentiles(self) -> None: + self.assertIsNone(nearest_rank([], 0.99)) + self.assertEqual( + summarize_distribution([]), + { + "sample_count": 0, + "min": None, + "p50": None, + "p95": None, + "p99": None, + "max": None, + "mean": None, + "percentile_method": "nearest_rank", + }, + ) + + def test_invalid_percentiles_and_non_finite_samples_are_rejected(self) -> None: + for percentile in (0, -0.1, 1.1): + with self.subTest(percentile=percentile): + with self.assertRaises(ValueError): + nearest_rank([1], percentile) + + with self.assertRaises(ValueError): + summarize_distribution([1, float("nan")]) + + +class RetainedHistoryTests(unittest.TestCase): + def test_normalization_includes_runtime_identity_and_junit_dimensions(self) -> None: + summary = summarize_normalized_history([retained_sample(10)]) + + self.assertEqual( + summary["normalization"], + retained_sample(10)["identity"], + ) + self.assertEqual(summary["sample_count"], 1) + self.assertEqual(summary["evidence_class"], "regression_sample") + self.assertFalse(summary["p95"]["available"]) + self.assertFalse(summary["p99"]["available"]) + + def test_p95_requires_40_and_p99_requires_100_matching_samples(self) -> None: + below_p95 = summarize_normalized_history( + [retained_sample(value) for value in range(1, 40)] + ) + at_p95 = summarize_normalized_history( + [retained_sample(value) for value in range(1, 41)] + ) + below_p99 = summarize_normalized_history( + [retained_sample(value) for value in range(1, 100)] + ) + at_p99 = summarize_normalized_history( + [retained_sample(value) for value in range(1, 101)] + ) + + self.assertEqual( + below_p95["p95"], + {"available": False, "value": None, "minimum_samples": 40}, + ) + self.assertEqual( + at_p95["p95"], + {"available": True, "value": 38, "minimum_samples": 40}, + ) + self.assertEqual( + below_p99["p99"], + {"available": False, "value": None, "minimum_samples": 100}, + ) + self.assertEqual( + at_p99["p99"], + {"available": True, "value": 99, "minimum_samples": 100}, + ) + + def test_junit_retention_is_not_percentile_history(self) -> None: + retained = summarize_normalized_history( + [ + retained_sample(value, retention_kind="junit_retention") + for value in range(1, 101) + ] + ) + + self.assertEqual(retained["sample_count"], 0) + self.assertEqual(retained["junit_retention_count"], 100) + self.assertEqual(retained["evidence_class"], "unavailable") + self.assertFalse(retained["p95"]["available"]) + self.assertFalse(retained["p99"]["available"]) + + def test_mixed_normalization_dimensions_are_rejected(self) -> None: + with self.assertRaisesRegex(ValueError, "normalized identity"): + summarize_normalized_history( + [ + retained_sample(10, platform="linux-x86_64"), + retained_sample(11, platform="macos-arm64"), + ] + ) + + +class BootstrapTests(unittest.TestCase): + def test_seeded_bootstrap_confidence_interval_is_deterministic(self) -> None: + values = [-0.2, -0.1, 0.0, 0.1, 0.2] + + first = bootstrap_confidence_interval(values, seed=123, resamples=1_000) + second = bootstrap_confidence_interval(values, seed=123, resamples=1_000) + + self.assertEqual(first, second) + self.assertLessEqual(first[0], 0.0) + self.assertGreaterEqual(first[1], 0.0) + + def test_single_sample_bootstrap_preserves_regression_evidence(self) -> None: + self.assertEqual( + bootstrap_confidence_interval([0.25], seed=7, resamples=100), + (0.25, 0.25), + ) + + def test_bootstrap_rejects_missing_or_invalid_inputs(self) -> None: + with self.assertRaises(ValueError): + bootstrap_confidence_interval([], seed=1) + with self.assertRaises(ValueError): + bootstrap_confidence_interval([1.0, float("inf")], seed=1) + with self.assertRaises(ValueError): + bootstrap_confidence_interval([1.0], seed=1, resamples=0) + with self.assertRaises(ValueError): + bootstrap_confidence_interval([1.0], seed=1, confidence=1.0) + + +class RateTests(unittest.TestCase): + def test_rates_count_timeouts_as_errors_and_as_timeouts(self) -> None: + summary = summarize_rates(["success", "error", "timeout", "success"]) + + self.assertEqual(summary["attempt_count"], 4) + self.assertEqual(summary["success_count"], 2) + self.assertEqual(summary["error_count"], 2) + self.assertEqual(summary["timeout_count"], 1) + self.assertEqual(summary["success_rate"], 0.5) + self.assertEqual(summary["error_rate"], 0.5) + self.assertEqual(summary["timeout_rate"], 0.25) + + def test_empty_rates_are_zero_not_nan(self) -> None: + summary = summarize_rates([]) + + self.assertEqual(summary["attempt_count"], 0) + self.assertEqual(summary["success_rate"], 0.0) + self.assertEqual(summary["error_rate"], 0.0) + self.assertEqual(summary["timeout_rate"], 0.0) + + def test_unknown_status_is_rejected(self) -> None: + with self.assertRaises(ValueError): + summarize_rates(["success", "unavailable"]) + + +class ThroughputTests(unittest.TestCase): + def test_throughput_uses_elapsed_nanoseconds(self) -> None: + self.assertEqual( + summarize_throughput(completed_count=4, elapsed_ns=2_000_000_000, total_bytes=100), + { + "elapsed_ns": 2_000_000_000, + "completed_count": 4, + "total_bytes": 100, + "operations_per_second": 2.0, + "bytes_per_second": 50.0, + }, + ) + + def test_non_positive_elapsed_time_is_rejected(self) -> None: + with self.assertRaises(ValueError): + summarize_throughput(completed_count=1, elapsed_ns=0) + + with self.assertRaises(ValueError): + summarize_throughput(completed_count=-1, elapsed_ns=1) + + +if __name__ == "__main__": + unittest.main() diff --git a/benchmark_data/runtime/tests/test_storage_workloads.py b/benchmark_data/runtime/tests/test_storage_workloads.py new file mode 100644 index 0000000000..96ee8cea61 --- /dev/null +++ b/benchmark_data/runtime/tests/test_storage_workloads.py @@ -0,0 +1,297 @@ +#!/usr/bin/env python3 +"""Contract tests for storage, index, and query runtime workloads.""" + +from __future__ import annotations + +import dataclasses +import re +import unittest + +from benchmark_data.runtime.storage_workloads import ( + ABBA_PAIRING, + BENCHMARK_AUTHORITY, + DECLARED_CRATE_LANES, + WORKLOADS, + AvailabilityExpectation, + AvailabilityStatus, + CapturePolicy, + CatalogValidationError, + ColdWarm, + NormalizationMetadata, + RuntimeState, + Surface, + assess_availability, + build_capture_plan, + group_workloads_by_crate, + percentile_eligibility, + runtime_test_identities, + validate_workloads, + workloads_for_crate, +) + + +REQUIRED_CRATE_LANES = { + "tracedecay-domain", + "tracedecay-store", + "tracedecay-query", + "tracedecay-code-index", + "tracedecay-application", + "tracedecay-rusqlite-runtime", + "tracedecay", +} + + +class StorageWorkloadCatalogTest(unittest.TestCase): + def test_catalog_covers_final_storage_index_and_query_journeys(self) -> None: + operations = {workload.operation for workload in WORKLOADS} + + self.assertTrue( + { + "tracedecay_find_exact_symbol", + "tracedecay_code_declaration", + "tracedecay_code_exact_occurrence", + "tracedecay_grep", + "tracedecay_code_phrase_search", + "tracedecay_callers", + "tracedecay_callees", + "tracedecay_impact", + "tracedecay_active_project", + "tracedecay_project_context", + "tracedecay_code_symbol_search", + "tracedecay_message_search", + "tracedecay_lcm_grep", + "tracedecay_lcm_expand", + "tracedecay_lcm_expand_query", + "tracedecay_context", + }.issubset(operations) + ) + self.assertTrue(any(item.journey_id == "payload-stress" for item in WORKLOADS)) + self.assertTrue(any(item.journey_id == "storage-contention" for item in WORKLOADS)) + + def test_every_declared_crate_lane_has_representative_workloads(self) -> None: + self.assertEqual(set(DECLARED_CRATE_LANES), REQUIRED_CRATE_LANES) + validate_workloads() + + for crate_tag in DECLARED_CRATE_LANES: + with self.subTest(crate_tag=crate_tag): + selected = workloads_for_crate(crate_tag) + self.assertTrue(selected) + self.assertTrue(all(crate_tag in item.crate_tags for item in selected)) + + def test_selection_and_grouping_preserve_catalog_order(self) -> None: + rebuilt = group_workloads_by_crate(reversed(DECLARED_CRATE_LANES)) + + self.assertEqual( + tuple(crate_tag for crate_tag, _ in rebuilt), + tuple(reversed(DECLARED_CRATE_LANES)), + ) + for crate_tag, selected in rebuilt: + self.assertEqual(selected, workloads_for_crate(crate_tag)) + self.assertEqual( + [item.id for item in selected], + [item.id for item in WORKLOADS if crate_tag in item.crate_tags], + ) + + def test_catalog_order_is_deterministic_and_ids_are_unique(self) -> None: + first = tuple(item.id for item in WORKLOADS) + second = tuple(item.id for item in WORKLOADS) + + self.assertEqual(first, second) + self.assertEqual(len(first), len(set(first))) + self.assertEqual(WORKLOADS, validate_workloads(WORKLOADS)) + + def test_descriptors_are_immutable_and_arguments_are_fresh(self) -> None: + workload = next(item for item in WORKLOADS if item.id == "context-composite-warm") + + with self.assertRaises(dataclasses.FrozenInstanceError): + workload.id = "changed" # type: ignore[misc] + + first = workload.arguments() + first["keywords"].append("mutation") + second = workload.arguments() + self.assertNotIn("mutation", second["keywords"]) + self.assertEqual(second, workload.arguments()) + + def test_all_runtime_states_and_typed_metadata_are_explicit(self) -> None: + self.assertTrue( + { + RuntimeState.COLD, + RuntimeState.ADMISSION, + RuntimeState.FIRST, + RuntimeState.WARM, + RuntimeState.REPEAT, + RuntimeState.PERSISTENT, + RuntimeState.NO_OP, + RuntimeState.CONTENTION, + RuntimeState.RECOVERY, + }.issubset({item.runtime_state for item in WORKLOADS}) + ) + for workload in WORKLOADS: + with self.subTest(workload=workload.id): + self.assertIsInstance(workload.surface, Surface) + self.assertIsInstance( + workload.availability_expectation, + AvailabilityExpectation, + ) + self.assertTrue(workload.timeout_phase) + self.assertTrue(workload.result_digest_policy) + self.assertTrue(workload.crate_tags) + self.assertFalse(hasattr(workload, "slo_gate")) + self.assertFalse(hasattr(workload, "budget_ms")) + self.assertFalse(hasattr(workload, "milestone_budget")) + + def test_throughput_workloads_declare_concurrency_1_4_8(self) -> None: + throughput = [item for item in WORKLOADS if item.throughput_meaningful] + + self.assertTrue(throughput) + self.assertTrue(all(item.concurrency == (1, 4, 8) for item in throughput)) + self.assertTrue( + all(not item.concurrency for item in WORKLOADS if not item.throughput_meaningful) + ) + + def test_capture_policy_distinguishes_n1_from_distribution(self) -> None: + n1 = build_capture_plan(CapturePolicy.N1_REGRESSION_ONLY) + + self.assertEqual(n1.measured_sample_count, 1) + self.assertEqual(n1.label, "n=1_regression_only") + self.assertFalse(n1.distribution_evidence) + with self.assertRaisesRegex(ValueError, "explicit measured_sample_count"): + build_capture_plan(CapturePolicy.DISTRIBUTION) + with self.assertRaisesRegex(ValueError, "greater than one"): + build_capture_plan(CapturePolicy.DISTRIBUTION, measured_sample_count=1) + + distribution = build_capture_plan( + CapturePolicy.DISTRIBUTION, + measured_sample_count=7, + ) + self.assertEqual(distribution.measured_sample_count, 7) + self.assertTrue(distribution.distribution_evidence) + self.assertTrue( + all( + workload.capture_plan.label == "n=1_regression_only" + for workload in WORKLOADS + ) + ) + + def test_percentile_eligibility_uses_matching_samples_only(self) -> None: + n1 = percentile_eligibility(1, junit_retained_sample_count=500) + p95 = percentile_eligibility(40) + below_p99 = percentile_eligibility(99) + p99 = percentile_eligibility(100) + + self.assertFalse(n1.p95_eligible) + self.assertFalse(n1.p99_eligible) + self.assertTrue(n1.junit_retention_excluded) + self.assertTrue(p95.p95_eligible) + self.assertFalse(p95.p99_eligible) + self.assertTrue(below_p99.p95_eligible) + self.assertFalse(below_p99.p99_eligible) + self.assertTrue(p99.p95_eligible) + self.assertTrue(p99.p99_eligible) + + def test_runtime_test_identities_are_stable_per_crate_and_normalized(self) -> None: + first = runtime_test_identities( + platform="linux-x86_64", + shard="storage-index-query", + storage_mode="isolated-fixture", + ) + second = runtime_test_identities( + platform="linux-x86_64", + shard="storage-index-query", + storage_mode="isolated-fixture", + ) + + self.assertEqual(first, second) + self.assertEqual(len({item.id for item in first}), len(first)) + self.assertEqual({item.crate_tag for item in first}, REQUIRED_CRATE_LANES) + for identity in first: + with self.subTest(identity=identity.id): + self.assertIn(identity.workload_id, identity.id) + self.assertIn(identity.journey_id, identity.id) + self.assertIsInstance(identity.normalization, NormalizationMetadata) + self.assertEqual(identity.normalization.platform, "linux-x86_64") + self.assertEqual(identity.normalization.shard, "storage-index-query") + self.assertEqual(identity.normalization.storage_mode, "isolated-fixture") + self.assertIn(identity.normalization.concurrency, (1, 4, 8)) + self.assertIsInstance(identity.normalization.cold_warm, ColdWarm) + + def test_capture_plans_expose_percentile_eligibility_without_slo_claims(self) -> None: + n1 = build_capture_plan(CapturePolicy.N1_REGRESSION_ONLY) + p95 = build_capture_plan(CapturePolicy.DISTRIBUTION, measured_sample_count=40) + p99 = build_capture_plan(CapturePolicy.DISTRIBUTION, measured_sample_count=100) + + self.assertFalse(n1.percentiles.p95_eligible) + self.assertFalse(n1.percentiles.p99_eligible) + self.assertTrue(p95.percentiles.p95_eligible) + self.assertFalse(p95.percentiles.p99_eligible) + self.assertTrue(p99.percentiles.p99_eligible) + self.assertFalse(hasattr(n1, "slo_gate")) + + def test_abba_metadata_preserves_raw_samples_without_statistics(self) -> None: + self.assertEqual(ABBA_PAIRING.execution_order, ("A", "B", "B", "A")) + self.assertEqual(ABBA_PAIRING.pair_indices, ((0, 1), (3, 2))) + self.assertTrue(ABBA_PAIRING.retain_raw_samples) + self.assertFalse(hasattr(ABBA_PAIRING, "p_value")) + self.assertFalse(hasattr(ABBA_PAIRING, "confidence_interval")) + + def test_availability_is_truthful_for_missing_and_unsupported_operations(self) -> None: + workload = next(item for item in WORKLOADS if item.id == "lcm-expand-warm") + + unavailable = assess_availability(workload, available_operations=()) + unsupported = assess_availability( + workload, + available_operations=(), + unsupported_operations=(workload.operation,), + ) + available = assess_availability( + workload, + available_operations=(workload.operation,), + ) + + self.assertEqual(unavailable.status, AvailabilityStatus.UNAVAILABLE) + self.assertFalse(unavailable.runnable) + self.assertEqual(unsupported.status, AvailabilityStatus.UNSUPPORTED) + self.assertFalse(unsupported.runnable) + self.assertEqual(available.status, AvailabilityStatus.AVAILABLE) + self.assertTrue(available.runnable) + self.assertTrue(unavailable.detail) + self.assertTrue(unsupported.detail) + self.assertIsNone(available.detail) + + def test_final_identities_never_encode_pr_stages_or_milestones(self) -> None: + forbidden = re.compile(r"(?:^|[-_])(pr[-_]?\d+|stage[-_]?\d+|milestone)(?:$|[-_])") + + self.assertEqual(BENCHMARK_AUTHORITY, "measurement_fixture_not_product_contract") + for workload in WORKLOADS: + with self.subTest(workload=workload.id): + identities = (workload.id, workload.journey_id, *workload.crate_tags) + self.assertTrue(all(forbidden.search(value) is None for value in identities)) + + def test_validation_rejects_duplicate_ids_missing_lanes_and_bad_throughput(self) -> None: + duplicate = WORKLOADS + (WORKLOADS[0],) + with self.assertRaisesRegex(CatalogValidationError, "duplicate workload id"): + validate_workloads(duplicate) + + without_root = tuple( + dataclasses.replace( + item, + crate_tags=tuple(tag for tag in item.crate_tags if tag != "tracedecay"), + ) + for item in WORKLOADS + ) + with self.assertRaisesRegex(CatalogValidationError, "tracedecay"): + validate_workloads(without_root) + + throughput = next(item for item in WORKLOADS if item.throughput_meaningful) + malformed = tuple( + dataclasses.replace(item, concurrency=()) + if item.id == throughput.id + else item + for item in WORKLOADS + ) + with self.assertRaisesRegex(CatalogValidationError, "concurrency"): + validate_workloads(malformed) + + +if __name__ == "__main__": + unittest.main() diff --git a/benchmark_data/search-quality/query-fallback-report-v1.json b/benchmark_data/search-quality/query-fallback-report-v1.json new file mode 100644 index 0000000000..d5a42f32cc --- /dev/null +++ b/benchmark_data/search-quality/query-fallback-report-v1.json @@ -0,0 +1 @@ +{"command":"compare","status":"pass","workload_digest":"sha256:a8e1def7179a2aa8f490676724514b4284aaf727f7f9e501eda3b3e6554b1347","corpus_digest":"sha256:9dd803cafee88b675c868d399310ecf171884c65a3dffa1994207d47fa4580e9","fixture_source_repository_commit":"8312618fee8109b16be09e65f45118b4e550fa14","fixture_source_repository_tree":"587aed48f162f74765da3a35fc41850523ea377d","profiles":[{"profile_id":"query-fallback","partition":"train","query_count":14,"failed_queries":0,"fallback_stable":true,"fallback_matches_expected":true,"cancellation_bounded":true,"offline":true,"resource_status":"pass","optional_stages":{"semantic":"not_requested","rerank":"not_requested"},"quality":{"relevant_query_count":11,"recall_at_10":{"numerator":11,"denominator":11,"ppm":1000000},"precision_at_10":{"numerator":20,"denominator":57,"ppm":350877},"mean_reciprocal_rank_ppm":765151,"ndcg_at_10_ppm":823782,"duplicate_rate":{"numerator":0,"denominator":62,"ppm":0},"protected_recall_at_10":{"numerator":8,"denominator":8,"ppm":1000000},"strata":[{"stratum":"config_key","protected":true,"query_count":1,"relevant_query_count":1,"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"mean_reciprocal_rank_ppm":1000000,"ndcg_at_10_ppm":1000000,"duplicate_rate":{"numerator":0,"denominator":1,"ppm":0}},{"stratum":"exact_error","protected":true,"query_count":1,"relevant_query_count":1,"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":1,"denominator":8,"ppm":125000},"mean_reciprocal_rank_ppm":500000,"ndcg_at_10_ppm":630930,"duplicate_rate":{"numerator":0,"denominator":8,"ppm":0}},{"stratum":"exact_flag","protected":true,"query_count":1,"relevant_query_count":1,"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"mean_reciprocal_rank_ppm":1000000,"ndcg_at_10_ppm":1000000,"duplicate_rate":{"numerator":0,"denominator":1,"ppm":0}},{"stratum":"exact_path","protected":true,"query_count":1,"relevant_query_count":1,"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":10,"denominator":10,"ppm":1000000},"mean_reciprocal_rank_ppm":1000000,"ndcg_at_10_ppm":1000000,"duplicate_rate":{"numerator":0,"denominator":15,"ppm":0}},{"stratum":"exact_symbol","protected":true,"query_count":2,"relevant_query_count":2,"recall_at_10":{"numerator":2,"denominator":2,"ppm":1000000},"precision_at_10":{"numerator":2,"denominator":9,"ppm":222222},"mean_reciprocal_rank_ppm":666666,"ndcg_at_10_ppm":750000,"duplicate_rate":{"numerator":0,"denominator":9,"ppm":0}},{"stratum":"generated_vendor_noise","protected":false,"query_count":1,"relevant_query_count":0,"recall_at_10":{"numerator":0,"denominator":0,"ppm":0},"precision_at_10":{"numerator":0,"denominator":0,"ppm":0},"mean_reciprocal_rank_ppm":0,"ndcg_at_10_ppm":0,"duplicate_rate":{"numerator":0,"denominator":0,"ppm":0}},{"stratum":"incremental_edit","protected":false,"query_count":1,"relevant_query_count":1,"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":1,"denominator":6,"ppm":166666},"mean_reciprocal_rank_ppm":1000000,"ndcg_at_10_ppm":1000000,"duplicate_rate":{"numerator":0,"denominator":6,"ppm":0}},{"stratum":"natural_language","protected":false,"query_count":1,"relevant_query_count":1,"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":1,"denominator":6,"ppm":166666},"mean_reciprocal_rank_ppm":333333,"ndcg_at_10_ppm":500000,"duplicate_rate":{"numerator":0,"denominator":6,"ppm":0}},{"stratum":"no_answer","protected":false,"query_count":3,"relevant_query_count":0,"recall_at_10":{"numerator":0,"denominator":0,"ppm":0},"precision_at_10":{"numerator":0,"denominator":0,"ppm":0},"mean_reciprocal_rank_ppm":0,"ndcg_at_10_ppm":0,"duplicate_rate":{"numerator":0,"denominator":0,"ppm":0}},{"stratum":"qualified_name","protected":true,"query_count":1,"relevant_query_count":1,"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":1,"denominator":4,"ppm":250000},"mean_reciprocal_rank_ppm":333333,"ndcg_at_10_ppm":500000,"duplicate_rate":{"numerator":0,"denominator":4,"ppm":0}},{"stratum":"quoted_phrase","protected":true,"query_count":1,"relevant_query_count":1,"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":1,"denominator":7,"ppm":142857},"mean_reciprocal_rank_ppm":1000000,"ndcg_at_10_ppm":1000000,"duplicate_rate":{"numerator":0,"denominator":7,"ppm":0}},{"stratum":"same_name_cross_scope","protected":false,"query_count":1,"relevant_query_count":1,"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":1,"denominator":8,"ppm":125000},"mean_reciprocal_rank_ppm":250000,"ndcg_at_10_ppm":430677,"duplicate_rate":{"numerator":0,"denominator":8,"ppm":0}},{"stratum":"tool_name","protected":true,"query_count":1,"relevant_query_count":1,"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"mean_reciprocal_rank_ppm":1000000,"ndcg_at_10_ppm":1000000,"duplicate_rate":{"numerator":0,"denominator":1,"ppm":0}},{"stratum":"unsupported_language","protected":false,"query_count":1,"relevant_query_count":0,"recall_at_10":{"numerator":0,"denominator":0,"ppm":0},"precision_at_10":{"numerator":0,"denominator":0,"ppm":0},"mean_reciprocal_rank_ppm":0,"ndcg_at_10_ppm":0,"duplicate_rate":{"numerator":0,"denominator":0,"ppm":0}}],"worst_stratum":{"stratum":"same_name_cross_scope","protected":false,"relevant_query_count":1,"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"mean_reciprocal_rank_ppm":250000,"ndcg_at_10_ppm":430677}},"status":"pass","queries":[{"query_id":"train-001","strata":["exact_symbol"],"protected":true,"first_useful_rank":1,"returned_candidates":5,"wrong_scope_hits":0,"forbidden_hits":0,"expected_no_result":false,"quality":{"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":1,"denominator":5,"ppm":200000},"reciprocal_rank_ppm":1000000,"ndcg_at_10_ppm":1000000,"duplicate_rate":{"numerator":0,"denominator":5,"ppm":0}},"status":"pass"},{"query_id":"train-002","strata":["qualified_name","exact_symbol"],"protected":true,"first_useful_rank":3,"returned_candidates":4,"wrong_scope_hits":0,"forbidden_hits":0,"expected_no_result":false,"quality":{"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":1,"denominator":4,"ppm":250000},"reciprocal_rank_ppm":333333,"ndcg_at_10_ppm":500000,"duplicate_rate":{"numerator":0,"denominator":4,"ppm":0}},"status":"pass"},{"query_id":"train-003","strata":["exact_path"],"protected":true,"first_useful_rank":1,"returned_candidates":15,"wrong_scope_hits":0,"forbidden_hits":0,"expected_no_result":false,"quality":{"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":10,"denominator":10,"ppm":1000000},"reciprocal_rank_ppm":1000000,"ndcg_at_10_ppm":1000000,"duplicate_rate":{"numerator":0,"denominator":15,"ppm":0}},"status":"pass"},{"query_id":"train-004","strata":["exact_error"],"protected":true,"first_useful_rank":2,"returned_candidates":8,"wrong_scope_hits":0,"forbidden_hits":0,"expected_no_result":false,"quality":{"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":1,"denominator":8,"ppm":125000},"reciprocal_rank_ppm":500000,"ndcg_at_10_ppm":630930,"duplicate_rate":{"numerator":0,"denominator":8,"ppm":0}},"status":"pass"},{"query_id":"train-005","strata":["config_key"],"protected":true,"first_useful_rank":1,"returned_candidates":1,"wrong_scope_hits":0,"forbidden_hits":0,"expected_no_result":false,"quality":{"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"reciprocal_rank_ppm":1000000,"ndcg_at_10_ppm":1000000,"duplicate_rate":{"numerator":0,"denominator":1,"ppm":0}},"status":"pass"},{"query_id":"train-006","strata":["exact_flag"],"protected":true,"first_useful_rank":1,"returned_candidates":1,"wrong_scope_hits":0,"forbidden_hits":0,"expected_no_result":false,"quality":{"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"reciprocal_rank_ppm":1000000,"ndcg_at_10_ppm":1000000,"duplicate_rate":{"numerator":0,"denominator":1,"ppm":0}},"status":"pass"},{"query_id":"train-007","strata":["natural_language"],"protected":false,"first_useful_rank":3,"returned_candidates":6,"wrong_scope_hits":0,"forbidden_hits":0,"expected_no_result":false,"quality":{"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":1,"denominator":6,"ppm":166666},"reciprocal_rank_ppm":333333,"ndcg_at_10_ppm":500000,"duplicate_rate":{"numerator":0,"denominator":6,"ppm":0}},"status":"pass"},{"query_id":"train-008","strata":["same_name_cross_scope"],"protected":false,"first_useful_rank":4,"returned_candidates":8,"wrong_scope_hits":0,"forbidden_hits":0,"expected_no_result":false,"quality":{"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":1,"denominator":8,"ppm":125000},"reciprocal_rank_ppm":250000,"ndcg_at_10_ppm":430677,"duplicate_rate":{"numerator":0,"denominator":8,"ppm":0}},"status":"pass"},{"query_id":"train-009","strata":["no_answer"],"protected":false,"first_useful_rank":null,"returned_candidates":0,"wrong_scope_hits":0,"forbidden_hits":0,"expected_no_result":true,"quality":{"recall_at_10":{"numerator":0,"denominator":0,"ppm":0},"precision_at_10":{"numerator":0,"denominator":0,"ppm":0},"reciprocal_rank_ppm":0,"ndcg_at_10_ppm":0,"duplicate_rate":{"numerator":0,"denominator":0,"ppm":0}},"status":"pass"},{"query_id":"train-010","strata":["generated_vendor_noise","no_answer"],"protected":false,"first_useful_rank":null,"returned_candidates":0,"wrong_scope_hits":0,"forbidden_hits":0,"expected_no_result":true,"quality":{"recall_at_10":{"numerator":0,"denominator":0,"ppm":0},"precision_at_10":{"numerator":0,"denominator":0,"ppm":0},"reciprocal_rank_ppm":0,"ndcg_at_10_ppm":0,"duplicate_rate":{"numerator":0,"denominator":0,"ppm":0}},"status":"pass"},{"query_id":"train-011","strata":["unsupported_language","no_answer"],"protected":false,"first_useful_rank":null,"returned_candidates":0,"wrong_scope_hits":0,"forbidden_hits":0,"expected_no_result":true,"quality":{"recall_at_10":{"numerator":0,"denominator":0,"ppm":0},"precision_at_10":{"numerator":0,"denominator":0,"ppm":0},"reciprocal_rank_ppm":0,"ndcg_at_10_ppm":0,"duplicate_rate":{"numerator":0,"denominator":0,"ppm":0}},"status":"pass"},{"query_id":"train-012","strata":["incremental_edit"],"protected":false,"first_useful_rank":1,"returned_candidates":6,"wrong_scope_hits":0,"forbidden_hits":0,"expected_no_result":false,"quality":{"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":1,"denominator":6,"ppm":166666},"reciprocal_rank_ppm":1000000,"ndcg_at_10_ppm":1000000,"duplicate_rate":{"numerator":0,"denominator":6,"ppm":0}},"status":"pass"},{"query_id":"train-013","strata":["quoted_phrase"],"protected":true,"first_useful_rank":1,"returned_candidates":7,"wrong_scope_hits":0,"forbidden_hits":0,"expected_no_result":false,"quality":{"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":1,"denominator":7,"ppm":142857},"reciprocal_rank_ppm":1000000,"ndcg_at_10_ppm":1000000,"duplicate_rate":{"numerator":0,"denominator":7,"ppm":0}},"status":"pass"},{"query_id":"train-014","strata":["tool_name"],"protected":true,"first_useful_rank":1,"returned_candidates":1,"wrong_scope_hits":0,"forbidden_hits":0,"expected_no_result":false,"quality":{"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"reciprocal_rank_ppm":1000000,"ndcg_at_10_ppm":1000000,"duplicate_rate":{"numerator":0,"denominator":1,"ppm":0}},"status":"pass"}]},{"profile_id":"query-fallback","partition":"validation","query_count":14,"failed_queries":0,"fallback_stable":true,"fallback_matches_expected":true,"cancellation_bounded":true,"offline":true,"resource_status":"pass","optional_stages":{"semantic":"not_requested","rerank":"not_requested"},"quality":{"relevant_query_count":11,"recall_at_10":{"numerator":12,"denominator":13,"ppm":923076},"precision_at_10":{"numerator":26,"denominator":51,"ppm":509803},"mean_reciprocal_rank_ppm":909090,"ndcg_at_10_ppm":932896,"duplicate_rate":{"numerator":0,"denominator":58,"ppm":0},"protected_recall_at_10":{"numerator":7,"denominator":7,"ppm":1000000},"strata":[{"stratum":"commit_identifier","protected":true,"query_count":1,"relevant_query_count":1,"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":1,"denominator":3,"ppm":333333},"mean_reciprocal_rank_ppm":1000000,"ndcg_at_10_ppm":1000000,"duplicate_rate":{"numerator":0,"denominator":3,"ppm":0}},{"stratum":"config_key","protected":true,"query_count":1,"relevant_query_count":1,"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"mean_reciprocal_rank_ppm":1000000,"ndcg_at_10_ppm":1000000,"duplicate_rate":{"numerator":0,"denominator":1,"ppm":0}},{"stratum":"exact_error","protected":true,"query_count":1,"relevant_query_count":1,"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":1,"denominator":8,"ppm":125000},"mean_reciprocal_rank_ppm":500000,"ndcg_at_10_ppm":630930,"duplicate_rate":{"numerator":0,"denominator":8,"ppm":0}},{"stratum":"exact_flag","protected":true,"query_count":1,"relevant_query_count":1,"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"mean_reciprocal_rank_ppm":1000000,"ndcg_at_10_ppm":1000000,"duplicate_rate":{"numerator":0,"denominator":1,"ppm":0}},{"stratum":"exact_path","protected":true,"query_count":1,"relevant_query_count":1,"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":10,"denominator":10,"ppm":1000000},"mean_reciprocal_rank_ppm":1000000,"ndcg_at_10_ppm":1000000,"duplicate_rate":{"numerator":0,"denominator":17,"ppm":0}},{"stratum":"exact_symbol","protected":true,"query_count":1,"relevant_query_count":1,"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":2,"denominator":6,"ppm":333333},"mean_reciprocal_rank_ppm":1000000,"ndcg_at_10_ppm":1000000,"duplicate_rate":{"numerator":0,"denominator":6,"ppm":0}},{"stratum":"generated_vendor_noise","protected":false,"query_count":1,"relevant_query_count":0,"recall_at_10":{"numerator":0,"denominator":0,"ppm":0},"precision_at_10":{"numerator":0,"denominator":0,"ppm":0},"mean_reciprocal_rank_ppm":0,"ndcg_at_10_ppm":0,"duplicate_rate":{"numerator":0,"denominator":0,"ppm":0}},{"stratum":"incremental_delete","protected":false,"query_count":1,"relevant_query_count":1,"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"mean_reciprocal_rank_ppm":1000000,"ndcg_at_10_ppm":1000000,"duplicate_rate":{"numerator":0,"denominator":1,"ppm":0}},{"stratum":"incremental_rename","protected":false,"query_count":1,"relevant_query_count":1,"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"mean_reciprocal_rank_ppm":1000000,"ndcg_at_10_ppm":1000000,"duplicate_rate":{"numerator":0,"denominator":1,"ppm":0}},{"stratum":"natural_language","protected":false,"query_count":2,"relevant_query_count":2,"recall_at_10":{"numerator":3,"denominator":4,"ppm":750000},"precision_at_10":{"numerator":7,"denominator":14,"ppm":500000},"mean_reciprocal_rank_ppm":1000000,"ndcg_at_10_ppm":1000000,"duplicate_rate":{"numerator":0,"denominator":14,"ppm":0}},{"stratum":"no_answer","protected":false,"query_count":2,"relevant_query_count":0,"recall_at_10":{"numerator":0,"denominator":0,"ppm":0},"precision_at_10":{"numerator":0,"denominator":0,"ppm":0},"mean_reciprocal_rank_ppm":0,"ndcg_at_10_ppm":0,"duplicate_rate":{"numerator":0,"denominator":0,"ppm":0}},{"stratum":"privacy_canary","protected":false,"query_count":1,"relevant_query_count":0,"recall_at_10":{"numerator":0,"denominator":0,"ppm":0},"precision_at_10":{"numerator":0,"denominator":0,"ppm":0},"mean_reciprocal_rank_ppm":0,"ndcg_at_10_ppm":0,"duplicate_rate":{"numerator":0,"denominator":0,"ppm":0}},{"stratum":"qualified_name","protected":true,"query_count":1,"relevant_query_count":1,"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":1,"denominator":4,"ppm":250000},"mean_reciprocal_rank_ppm":500000,"ndcg_at_10_ppm":630930,"duplicate_rate":{"numerator":0,"denominator":4,"ppm":0}},{"stratum":"renamed_moved_symbol","protected":false,"query_count":1,"relevant_query_count":1,"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"mean_reciprocal_rank_ppm":1000000,"ndcg_at_10_ppm":1000000,"duplicate_rate":{"numerator":0,"denominator":1,"ppm":0}},{"stratum":"same_name_cross_scope","protected":false,"query_count":1,"relevant_query_count":1,"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":1,"denominator":3,"ppm":333333},"mean_reciprocal_rank_ppm":1000000,"ndcg_at_10_ppm":1000000,"duplicate_rate":{"numerator":0,"denominator":3,"ppm":0}},{"stratum":"wrong_scope","protected":false,"query_count":1,"relevant_query_count":0,"recall_at_10":{"numerator":0,"denominator":0,"ppm":0},"precision_at_10":{"numerator":0,"denominator":0,"ppm":0},"mean_reciprocal_rank_ppm":0,"ndcg_at_10_ppm":0,"duplicate_rate":{"numerator":0,"denominator":0,"ppm":0}}],"worst_stratum":{"stratum":"natural_language","protected":false,"relevant_query_count":2,"recall_at_10":{"numerator":3,"denominator":4,"ppm":750000},"mean_reciprocal_rank_ppm":1000000,"ndcg_at_10_ppm":1000000}},"status":"pass","queries":[{"query_id":"validation-001","strata":["exact_symbol"],"protected":true,"first_useful_rank":1,"returned_candidates":6,"wrong_scope_hits":0,"forbidden_hits":0,"expected_no_result":false,"quality":{"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":2,"denominator":6,"ppm":333333},"reciprocal_rank_ppm":1000000,"ndcg_at_10_ppm":1000000,"duplicate_rate":{"numerator":0,"denominator":6,"ppm":0}},"status":"pass"},{"query_id":"validation-002","strata":["qualified_name"],"protected":true,"first_useful_rank":2,"returned_candidates":4,"wrong_scope_hits":0,"forbidden_hits":0,"expected_no_result":false,"quality":{"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":1,"denominator":4,"ppm":250000},"reciprocal_rank_ppm":500000,"ndcg_at_10_ppm":630930,"duplicate_rate":{"numerator":0,"denominator":4,"ppm":0}},"status":"pass"},{"query_id":"validation-003","strata":["exact_path"],"protected":true,"first_useful_rank":1,"returned_candidates":17,"wrong_scope_hits":0,"forbidden_hits":0,"expected_no_result":false,"quality":{"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":10,"denominator":10,"ppm":1000000},"reciprocal_rank_ppm":1000000,"ndcg_at_10_ppm":1000000,"duplicate_rate":{"numerator":0,"denominator":17,"ppm":0}},"status":"pass"},{"query_id":"validation-004","strata":["config_key"],"protected":true,"first_useful_rank":1,"returned_candidates":1,"wrong_scope_hits":0,"forbidden_hits":0,"expected_no_result":false,"quality":{"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"reciprocal_rank_ppm":1000000,"ndcg_at_10_ppm":1000000,"duplicate_rate":{"numerator":0,"denominator":1,"ppm":0}},"status":"pass"},{"query_id":"validation-005","strata":["exact_flag"],"protected":true,"first_useful_rank":1,"returned_candidates":1,"wrong_scope_hits":0,"forbidden_hits":0,"expected_no_result":false,"quality":{"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"reciprocal_rank_ppm":1000000,"ndcg_at_10_ppm":1000000,"duplicate_rate":{"numerator":0,"denominator":1,"ppm":0}},"status":"pass"},{"query_id":"validation-006","strata":["natural_language"],"protected":false,"first_useful_rank":1,"returned_candidates":10,"wrong_scope_hits":0,"forbidden_hits":0,"expected_no_result":false,"quality":{"recall_at_10":{"numerator":2,"denominator":3,"ppm":666666},"precision_at_10":{"numerator":6,"denominator":10,"ppm":600000},"reciprocal_rank_ppm":1000000,"ndcg_at_10_ppm":1000000,"duplicate_rate":{"numerator":0,"denominator":10,"ppm":0}},"status":"pass"},{"query_id":"validation-007","strata":["same_name_cross_scope"],"protected":false,"first_useful_rank":1,"returned_candidates":3,"wrong_scope_hits":0,"forbidden_hits":0,"expected_no_result":false,"quality":{"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":1,"denominator":3,"ppm":333333},"reciprocal_rank_ppm":1000000,"ndcg_at_10_ppm":1000000,"duplicate_rate":{"numerator":0,"denominator":3,"ppm":0}},"status":"pass"},{"query_id":"validation-008","strata":["no_answer"],"protected":false,"first_useful_rank":null,"returned_candidates":0,"wrong_scope_hits":0,"forbidden_hits":0,"expected_no_result":true,"quality":{"recall_at_10":{"numerator":0,"denominator":0,"ppm":0},"precision_at_10":{"numerator":0,"denominator":0,"ppm":0},"reciprocal_rank_ppm":0,"ndcg_at_10_ppm":0,"duplicate_rate":{"numerator":0,"denominator":0,"ppm":0}},"status":"pass"},{"query_id":"validation-009","strata":["wrong_scope","privacy_canary","no_answer"],"protected":false,"first_useful_rank":null,"returned_candidates":0,"wrong_scope_hits":0,"forbidden_hits":0,"expected_no_result":true,"quality":{"recall_at_10":{"numerator":0,"denominator":0,"ppm":0},"precision_at_10":{"numerator":0,"denominator":0,"ppm":0},"reciprocal_rank_ppm":0,"ndcg_at_10_ppm":0,"duplicate_rate":{"numerator":0,"denominator":0,"ppm":0}},"status":"pass"},{"query_id":"validation-010","strata":["renamed_moved_symbol","incremental_delete","incremental_rename"],"protected":false,"first_useful_rank":1,"returned_candidates":1,"wrong_scope_hits":0,"forbidden_hits":0,"expected_no_result":false,"quality":{"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"reciprocal_rank_ppm":1000000,"ndcg_at_10_ppm":1000000,"duplicate_rate":{"numerator":0,"denominator":1,"ppm":0}},"status":"pass"},{"query_id":"validation-011","strata":["generated_vendor_noise"],"protected":false,"first_useful_rank":null,"returned_candidates":0,"wrong_scope_hits":0,"forbidden_hits":0,"expected_no_result":true,"quality":{"recall_at_10":{"numerator":0,"denominator":0,"ppm":0},"precision_at_10":{"numerator":0,"denominator":0,"ppm":0},"reciprocal_rank_ppm":0,"ndcg_at_10_ppm":0,"duplicate_rate":{"numerator":0,"denominator":0,"ppm":0}},"status":"pass"},{"query_id":"validation-012","strata":["natural_language"],"protected":false,"first_useful_rank":1,"returned_candidates":4,"wrong_scope_hits":0,"forbidden_hits":0,"expected_no_result":false,"quality":{"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":1,"denominator":4,"ppm":250000},"reciprocal_rank_ppm":1000000,"ndcg_at_10_ppm":1000000,"duplicate_rate":{"numerator":0,"denominator":4,"ppm":0}},"status":"pass"},{"query_id":"validation-013","strata":["commit_identifier"],"protected":true,"first_useful_rank":1,"returned_candidates":3,"wrong_scope_hits":0,"forbidden_hits":0,"expected_no_result":false,"quality":{"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":1,"denominator":3,"ppm":333333},"reciprocal_rank_ppm":1000000,"ndcg_at_10_ppm":1000000,"duplicate_rate":{"numerator":0,"denominator":3,"ppm":0}},"status":"pass"},{"query_id":"validation-014","strata":["exact_error"],"protected":true,"first_useful_rank":2,"returned_candidates":8,"wrong_scope_hits":0,"forbidden_hits":0,"expected_no_result":false,"quality":{"recall_at_10":{"numerator":1,"denominator":1,"ppm":1000000},"precision_at_10":{"numerator":1,"denominator":8,"ppm":125000},"reciprocal_rank_ppm":500000,"ndcg_at_10_ppm":630930,"duplicate_rate":{"numerator":0,"denominator":8,"ppm":0}},"status":"pass"}]}]} diff --git a/benchmark_data/session-temporal/README.md b/benchmark_data/session-temporal/README.md new file mode 100644 index 0000000000..72ae7996c3 --- /dev/null +++ b/benchmark_data/session-temporal/README.md @@ -0,0 +1,61 @@ +# Session-temporal benchmark + +> **Historical evidence only.** Preserve the authentic provider fixtures, +> sanitization provenance, and measurements in this directory. Current +> requirements come only from the `docs/plans/tracedecay-v2/` hierarchy; exact +> commands, test names/counts, snapshots, receipts, attestations, PR packets, +> and gates below are not rebuild instructions. Validate current behavior directly. + +Linux/macOS diagnostic harness for session-temporal retrieval latency phases. +This directory records descriptive sample quantiles and directly executed +behavioral test outcomes only. It is not an acceptance snapshot, receipt, +manifest, or gate. + +## Fixtures + +Provider-native Codex captures reused from +`tests/fixtures/provider_normalization/codex/`: + +- `session_meta.input.json` and `agent_message.input.json` + +Runtime sanitizer provenance for those fixtures is in +[`fixtures/codex-sanitization-receipt.json`](fixtures/codex-sanitization-receipt.json) +(observation sanitization provenance only). Do not substitute golden lookalikes. + +## Artifacts + +| Path | Role | +|---|---| +| [workload-v1.json](workload-v1.json) | Versioned workload/config pin | +| [evidence-index.json](evidence-index.json) | Points to current provisional evidence only after a clean refresh; retains stale captures separately | +| [result-provisional.json](result-provisional.json) | Historical single-session Linux capture; not evidence for the root-wide harness | +| `result-current.json` | Created only by a clean `--refresh-contract` run for the active harness | + +## Commands + +```bash +scripts/run-session-temporal-benchmark.sh --dry-run +scripts/run-session-temporal-benchmark.sh --run # diagnostic on Linux or macOS +scripts/run-session-temporal-benchmark.sh --refresh-contract # Linux only +cargo bench --bench session_temporal --all-features -- --run +``` + +Dry-run is Cargo-free. `--run` isolates `HOME` and `TRACEDECAY_DATA_DIR` and +measures: `rebuild_activate`, `exact_replay`, `compact_rank`, and `late_hydrate`. +`--run` prints diagnostic samples but never changes checked-in evidence. +`--refresh-contract` is Linux-only and the only publishing path: it requires a +clean source commit, performs that same real measurement without accepting +caller-supplied values, and publishes the workload and result as one +hash-checked pair before pointing the evidence index at it. The refreshed +provenance records the source commit and mode, warmups, measured repetitions, +and record counts. + +## Observed focused tests + +Recorded only when executed in the same capture window: + +```bash +cargo test --test session_suite --all-features temporal_derived_evidence:: -- --test-threads=1 +``` + +Quantiles are descriptive nearest-rank sample labels, not inferential claims. diff --git a/benchmark_data/session-temporal/evidence-index.json b/benchmark_data/session-temporal/evidence-index.json new file mode 100644 index 0000000000..8c2f8cac33 --- /dev/null +++ b/benchmark_data/session-temporal/evidence-index.json @@ -0,0 +1,9 @@ +{ + "schema_version": 2, + "current_acceptance": null, + "blocked": null, + "provisional": null, + "historical_stale": [ + "result-provisional.json" + ] +} diff --git a/benchmark_data/session-temporal/fixtures/codex-sanitization-receipt.json b/benchmark_data/session-temporal/fixtures/codex-sanitization-receipt.json new file mode 100644 index 0000000000..d9d82ae0b4 --- /dev/null +++ b/benchmark_data/session-temporal/fixtures/codex-sanitization-receipt.json @@ -0,0 +1,31 @@ +{ + "schema": "session-temporal-fixture-sanitization-receipt-v1", + "provider": "codex", + "independently_sourced": true, + "introduction_commit": "c293df93ce063885580ea7145cc81e6dbdc8e9ec", + "source_kind": "provider_native_checked_in_capture", + "format": "checked_in_native_bounded_copy_v1", + "documentation": "tests/fixtures/provider_normalization/codex/README.md", + "production_acceptance_reuse": { + "workload": "benchmark_data/claude-observation/workload-v1.json", + "harness_path": "codex_production_observation_pipeline_v1", + "notes": "session_meta and agent_message inputs are the same provider-native captures already exercised by the claude-observation production pipeline baseline" + }, + "files": [ + { + "path": "tests/fixtures/provider_normalization/codex/session_meta.input.json", + "role": "rollout_session_meta", + "sha256": "125540c90d77740256c4b2a31c029b5ddb25e037b9c20f053007339533b48832" + }, + { + "path": "tests/fixtures/provider_normalization/codex/agent_message.input.json", + "role": "rollout_agent_message", + "sha256": "98c62c375f7f1d9f6552ab0591007e0063165b44b767c472644ad4e66eace6cf" + }, + { + "path": "tests/fixtures/provider_normalization/codex/README.md", + "role": "provenance_documentation", + "sha256": "848cc877145a60c95a093cac1d19f51fc54ba68ce00bdcca60c3649699446b80" + } + ] +} \ No newline at end of file diff --git a/benchmark_data/session-temporal/result-provisional.json b/benchmark_data/session-temporal/result-provisional.json new file mode 100644 index 0000000000..7320c0195d --- /dev/null +++ b/benchmark_data/session-temporal/result-provisional.json @@ -0,0 +1,232 @@ +{ + "acceptance_eligible": false, + "capture_status": "provisional", + "evidence_status": "historical_stale", + "claims": { + "database_query_latency": { + "reason": "descriptive nearest-rank sample quantiles only; not inferential", + "status": "provisional" + }, + "performance_acceptance": { + "reason": "samples recorded; descriptive latency only, not an acceptance decision", + "status": "provisional" + } + }, + "measurement": { + "inferential_claim": false, + "measured_record_count": 30, + "measured_repetitions": 30, + "phases": [ + { + "maximum_ns": 26465627, + "p50_ns": 19725949, + "p95_label": "descriptive nearest-rank sample p95", + "p95_ns": 23255045, + "p99_label": "descriptive nearest-rank sample p99 (sample maximum when n=30)", + "p99_ns": 26465627, + "phase": "rebuild_activate", + "raw_latency_ns": [ + 17930094, + 17966216, + 18082077, + 18173598, + 18248300, + 18405821, + 18487302, + 18752836, + 18873508, + 18927059, + 19490906, + 19549537, + 19583038, + 19601508, + 19725949, + 19969583, + 20059314, + 20066864, + 20116094, + 20331727, + 20358158, + 20533520, + 20577271, + 21161708, + 21352211, + 21393952, + 22088081, + 22181702, + 23255045, + 26465627 + ], + "sample_count": 30 + }, + { + "maximum_ns": 633098, + "p50_ns": 422916, + "p95_label": "descriptive nearest-rank sample p95", + "p95_ns": 614868, + "p99_label": "descriptive nearest-rank sample p99 (sample maximum when n=30)", + "p99_ns": 633098, + "phase": "exact_replay", + "raw_latency_ns": [ + 318324, + 338245, + 351365, + 367504, + 377645, + 382316, + 392265, + 393185, + 398066, + 401587, + 405666, + 412876, + 414016, + 419186, + 422916, + 423205, + 429916, + 438696, + 443756, + 450146, + 450937, + 461996, + 462085, + 470908, + 486386, + 508266, + 528657, + 546948, + 614868, + 633098 + ], + "sample_count": 30 + }, + { + "maximum_ns": 24908846, + "p50_ns": 8960708, + "p95_label": "descriptive nearest-rank sample p95", + "p95_ns": 15845118, + "p99_label": "descriptive nearest-rank sample p99 (sample maximum when n=30)", + "p99_ns": 24908846, + "phase": "compact_rank", + "raw_latency_ns": [ + 8389061, + 8417021, + 8442532, + 8519383, + 8539742, + 8563962, + 8598533, + 8711364, + 8759535, + 8767045, + 8808106, + 8893858, + 8904337, + 8913757, + 8960708, + 9043959, + 9139080, + 9196069, + 9225511, + 9232710, + 9414684, + 9416984, + 9598277, + 10241325, + 11240347, + 11317349, + 11674403, + 12407023, + 15845118, + 24908846 + ], + "sample_count": 30 + }, + { + "maximum_ns": 10648640, + "p50_ns": 8576192, + "p95_label": "descriptive nearest-rank sample p95", + "p95_ns": 10166502, + "p99_label": "descriptive nearest-rank sample p99 (sample maximum when n=30)", + "p99_ns": 10648640, + "phase": "late_hydrate", + "raw_latency_ns": [ + 8027026, + 8161728, + 8170507, + 8171438, + 8183947, + 8270218, + 8324820, + 8325881, + 8335800, + 8450331, + 8489672, + 8541472, + 8545813, + 8562364, + 8576192, + 8583072, + 8634434, + 8736444, + 8786656, + 8855066, + 8858145, + 8955496, + 9020808, + 9029538, + 9158221, + 9184350, + 9383582, + 9505705, + 10166502, + 10648640 + ], + "sample_count": 30 + } + ], + "records_per_repetition": 1, + "warmup_repetitions": 3 + }, + "provisional_reason": "linux_measurement_capture", + "stale_reason": "measured before the root-wide session relation hydration harness replaced the deleted single-session source path; a clean Linux refresh is required for current evidence", + "runtime": { + "arch": "x86_64", + "operating_system": "linux" + }, + "schema_version": 2, + "source_identity": { + "binary": "/fast/projects/tracedecay/.worktrees/pr8-contract-HIK/target/release/deps/session_temporal-ec178df33da1d57c", + "commit": "1a03fcdff61ac76e94e8cbbc0d49f51b023876e9", + "harness": "src/sessions/session_temporal_benchmark.rs", + "harness_sha256": "15847bc65f4abec41a65961e053657c33ad017b4cab565a3cb3c0a1fa7060c10", + "native_fixtures": [ + { + "path": "tests/fixtures/provider_normalization/codex/session_meta.input.json", + "sha256": "125540c90d77740256c4b2a31c029b5ddb25e037b9c20f053007339533b48832" + }, + { + "path": "tests/fixtures/provider_normalization/codex/agent_message.input.json", + "sha256": "98c62c375f7f1d9f6552ab0591007e0063165b44b767c472644ad4e66eace6cf" + } + ], + "profile": { + "cargo_profile": "bench", + "debug": false, + "debug_assertions": false, + "incremental": false, + "opt_level": 3, + "overflow_checks": false + }, + "runner": "scripts/run-session-temporal-benchmark.sh", + "runner_sha256": "1f66c6dd38610c8980c0837cf32044bad111714b8bec60a03893d4d93191335c", + "sanitization_receipt": "benchmarks/session-temporal/fixtures/codex-sanitization-receipt.json", + "sanitization_receipt_sha256": "f85558c318a9e8162a2ca15857b10e27f91bf71f055f7c4782b78da04ea8fbd6", + "workload_manifest": "benchmarks/session-temporal/workload-v1.json", + "workload_manifest_sha256": "4c1b16e1bf9a3b88b7a659e5005f6a38e8203681e61a08d154dc99e852a9cfcc" + }, + "workload_id": "session-temporal-v1", + "workload_manifest": "benchmarks/session-temporal/workload-v1.json", + "workload_manifest_sha256": "4c1b16e1bf9a3b88b7a659e5005f6a38e8203681e61a08d154dc99e852a9cfcc" +} diff --git a/benchmark_data/session-temporal/workload-v1.json b/benchmark_data/session-temporal/workload-v1.json new file mode 100644 index 0000000000..6534626c02 --- /dev/null +++ b/benchmark_data/session-temporal/workload-v1.json @@ -0,0 +1,132 @@ +{ + "command": "scripts/run-session-temporal-benchmark.sh --run", + "file_inventory": [ + { + "path": "benches/session_temporal.rs", + "sha256": "e5c8477b50da6eb7e9ab05dac2c4ab9dc7147cf23ccab57d93860805de988e92" + }, + { + "path": "src/session_temporal_benchmark.rs", + "sha256": "1d8d5d573c346b981c4df9007d9f203311571a448f528f6a3084b45c56082db3" + }, + { + "path": "src/session_temporal_benchmark/root_relation_fixture.rs", + "sha256": "0a425aaabe0fe0f89795453aba3603a182b0e2ae9d098fd0ca53a4615c9709fb" + }, + { + "path": "scripts/run-session-temporal-benchmark.sh", + "sha256": "a3a9fe3a17e63d601ec91bcfc875de6539007de6e9f3042f7f4ff7ab39c13888" + }, + { + "path": "benchmark_data/session-temporal/fixtures/codex-sanitization-receipt.json", + "sha256": "70c352258bcf78bd84c0955a784bb1cc89107ed95145d7f6f984f725fd8c65fd" + }, + { + "path": "tests/fixtures/provider_normalization/codex/session_meta.input.json", + "sha256": "125540c90d77740256c4b2a31c029b5ddb25e037b9c20f053007339533b48832" + }, + { + "path": "tests/fixtures/provider_normalization/codex/agent_message.input.json", + "sha256": "98c62c375f7f1d9f6552ab0591007e0063165b44b767c472644ad4e66eace6cf" + }, + { + "path": "tests/fixtures/provider_normalization/codex/README.md", + "sha256": "848cc877145a60c95a093cac1d19f51fc54ba68ce00bdcca60c3649699446b80" + }, + { + "path": "benchmark_data/session-temporal/README.md", + "sha256": "d59a05426a926268b34641c5e0e1269f1fb91b89a150a917f3be0a6eb7b5547c" + } + ], + "fixture_evidence": { + "files": [ + { + "path": "tests/fixtures/provider_normalization/codex/session_meta.input.json", + "sha256": "125540c90d77740256c4b2a31c029b5ddb25e037b9c20f053007339533b48832" + }, + { + "path": "tests/fixtures/provider_normalization/codex/agent_message.input.json", + "sha256": "98c62c375f7f1d9f6552ab0591007e0063165b44b767c472644ad4e66eace6cf" + } + ], + "format": "checked_in_native_bounded_copy_v1", + "independently_sourced": true, + "introduction_commit": "c293df93ce063885580ea7145cc81e6dbdc8e9ec", + "provider": "codex", + "sanitization_receipt": "benchmark_data/session-temporal/fixtures/codex-sanitization-receipt.json", + "status": "accepted_for_harness" + }, + "implementation": { + "path": "src/session_temporal_benchmark.rs", + "sha256": "1d8d5d573c346b981c4df9007d9f203311571a448f528f6a3084b45c56082db3" + }, + "measurement_contract": { + "measured_repetitions": 30, + "phases": [ + { + "path": "SessionRefreshService::begin_or_join + CanonicalSessionTemporalProjector materialize/persist + complete", + "phase": "rebuild_activate" + }, + { + "path": "idempotent SessionRefreshCompletionRequestV1 replay", + "phase": "exact_replay" + }, + { + "path": "SessionRetrievalService::retrieve LogicalMessage", + "phase": "compact_rank" + }, + { + "path": "SessionRetrievalService::retrieve root-wide Occurrence hydration", + "phase": "late_hydrate" + } + ], + "request_budgets": { + "max_context_bytes": 67108864, + "max_results": 64, + "max_work_units": 100000, + "reason": "the 64-participant root-wide production journey exceeds the former 10000-unit ceiling; this bounded limit matches the production retrieval ceiling" + }, + "warmup_repetitions": 3 + }, + "production_path": { + "available_to_benchmark_target": true, + "reason": "harness admits provider-native Codex inputs, drains the canonical GlobalDb observation projector, refreshes every authorized root participant, then proves root-wide relation hydration through the public retrieval adapter", + "required": [ + "HostAdmissionFacade::drain_projection_queue with the canonical GlobalDb observation projector", + "CanonicalSessionTemporalProjector via GlobalDb::materialize_session_temporal_refresh_batch_result", + "SessionRefreshService with GlobalDbSessionTemporalStore", + "SessionRetrievalService with GlobalDbSessionTemporalExecution and AllSessionsInAuthorizedRoot hydration" + ] + }, + "profile": { + "cargo_profile": "bench", + "debug": false, + "debug_assertions": false, + "incremental": false, + "manifest_path": "Cargo.toml", + "manifest_sha256": "a3a167f00b94dd789c198056de4946d3f12bb20ea0dccdaabe517ae90d3dc693", + "opt_level": 3, + "overflow_checks": false + }, + "runner": { + "path": "scripts/run-session-temporal-benchmark.sh", + "sha256": "a3a9fe3a17e63d601ec91bcfc875de6539007de6e9f3042f7f4ff7ab39c13888" + }, + "schema_version": 2, + "statistics": { + "inferential_claim": false, + "p95_label": "descriptive nearest-rank sample p95", + "p99_label": "descriptive nearest-rank sample p99 (sample maximum when n=30)", + "status": "descriptive_sample_quantiles" + }, + "status": "harness_ready", + "storage_isolation": { + "required_environment": [ + "HOME", + "TRACEDECAY_DATA_DIR" + ], + "required_ownership": "benchmark-owned temporary storage with RAII cleanup", + "status": "enforced_by_harness_and_runner" + }, + "workload_id": "session-temporal-v1" +} diff --git a/benchmark_data/transport-boundary/README.md b/benchmark_data/transport-boundary/README.md new file mode 100644 index 0000000000..7ed2e027cc --- /dev/null +++ b/benchmark_data/transport-boundary/README.md @@ -0,0 +1,34 @@ +# Transport-boundary direct test fixture + +> **Historical evidence only.** Preserve the real fixture and provenance in +> this directory. Current requirements come only from the +> `docs/plans/tracedecay-v2/` hierarchy; exact commands, test names/counts, +> snapshots, receipts, attestations, PR packets, and gate fields below are not +> rebuild instructions. Validate current transport behavior directly. + +This directory supplies a checked-in real fixture to the direct product test +for the callable application transport boundary. It is not an acceptance packet, +snapshot, gate manifest, or separate evidence authority. Product acceptance +comes from direct tests and normal CI, with pending work reported as pending. + +`goldens/application-surface-parity.json` is consumed by +`tests/api_application_parity.rs`. Together they require: + +- identical request/result contracts and binding identities for Git preview, + Git apply, feedback diagnostics, feedback get, feedback expand, and feedback + list across CLI, MCP, and HTTP dispatch; +- all four feedback reads to reach a callable owner and conceal an unknown + request handle as `not_found_or_not_authorized`, never `unavailable`; +- HTTP and SSE to project the same canonical feedback payload; and +- concealed HTTP problems to omit binding identity. + +The compile workload remains executable, but its measurement is explicitly +pending execution. Static validation does not run Cargo: + +```sh +python3 benchmark_data/pr11-application-boundary/validate_compile_baseline.py \ + benchmark_data/transport-boundary/compile-baseline.json +``` + +An authorized measurement run may pass `--run`; the runner prints a candidate +and never rewrites the checked-in baseline. diff --git a/benchmark_data/transport-boundary/compile-baseline.json b/benchmark_data/transport-boundary/compile-baseline.json new file mode 100644 index 0000000000..ef76485884 --- /dev/null +++ b/benchmark_data/transport-boundary/compile-baseline.json @@ -0,0 +1,26 @@ +{ + "schema_version": 1, + "workload_id": "transport-boundary-compile-v1", + "packages": [ + "tracedecay-api", + "tracedecay" + ], + "command": [ + "cargo", + "check", + "-p", + "tracedecay-api", + "-p", + "tracedecay", + "--lib", + "--all-features" + ], + "measurement": { + "status": "unavailable", + "execution_state": "pending_execution", + "elapsed_ms": null, + "recorded_at": null, + "reason": "Pending an authorized execution of the declared all-feature compile workload." + }, + "assertion": "CLI, MCP, HTTP, and SSE adapters preserve canonical application contracts while store, query, policy, and mutation authority remain behind application ports." +} \ No newline at end of file diff --git a/benchmark_data/transport-boundary/goldens/application-surface-parity.json b/benchmark_data/transport-boundary/goldens/application-surface-parity.json new file mode 100644 index 0000000000..ee00b2a6de --- /dev/null +++ b/benchmark_data/transport-boundary/goldens/application-surface-parity.json @@ -0,0 +1,468 @@ +{ + "schema_version": 1, + "operations": { + "git_preview": { + "request_schema": "schema.application.git.preview.request", + "result_schema": "schema.application.git.preview.result", + "bindings": { + "cli": "binding.cli.git_preview.v1", + "mcp": "binding.mcp.git_preview.v1" + } + }, + "git_apply": { + "request_schema": "schema.application.git.apply.request", + "result_schema": "schema.application.git.apply.result", + "bindings": { + "cli": "binding.cli.git_apply.v1", + "mcp": "binding.mcp.git_apply.v1" + } + }, + "feedback_diagnostics": { + "request_handle": "rh_missing-application-parity", + "request_schema": "schema.application.feedback.diagnostics.request", + "result_schema": "schema.application.feedback.diagnostics.result", + "bindings": { + "cli": "binding.cli.feedback_diagnostics.v1", + "mcp": "binding.mcp.feedback_diagnostics.v1", + "http": "binding.http.feedback_diagnostics.v1" + } + }, + "feedback_get": { + "request_handle": "rh_missing-application-parity", + "request_schema": "schema.application.feedback.get.request", + "result_schema": "schema.application.feedback.get.result", + "bindings": { + "cli": "binding.cli.feedback_get.v1", + "mcp": "binding.mcp.feedback_get.v1", + "http": "binding.http.feedback_get.v1" + } + }, + "feedback_expand": { + "request_handle": "rh_missing-application-parity", + "request_schema": "schema.application.feedback.expand.request", + "result_schema": "schema.application.feedback.expand.result", + "bindings": { + "cli": "binding.cli.feedback_expand.v1", + "mcp": "binding.mcp.feedback_expand.v1", + "http": "binding.http.feedback_expand.v1" + } + }, + "feedback_list": { + "request_handle": "rh_missing-application-parity", + "request_schema": "schema.application.feedback.list.request", + "result_schema": "schema.application.feedback.list.result", + "bindings": { + "cli": "binding.cli.feedback_list.v1", + "mcp": "binding.mcp.feedback_list.v1", + "http": "binding.http.feedback_list.v1" + } + }, + "feedback_impact": { + "request": { + "node_id": "node.application-parity.fixture" + }, + "request_schema": "schema.application.feedback.impact.request", + "result_schema": "schema.application.feedback.impact.result", + "bindings": { + "cli": "binding.cli.feedback_impact.v1", + "mcp": "binding.mcp.feedback_impact.v1", + "http": "binding.http.feedback_impact.v1" + } + }, + "affected_tests": { + "request": { + "files": [ + "src/lib.rs" + ] + }, + "request_schema": "schema.application.feedback.affected-tests.request", + "result_schema": "schema.application.feedback.affected-tests.result", + "bindings": { + "cli": "binding.cli.affected_tests.v1", + "mcp": "binding.mcp.affected_tests.v1", + "http": "binding.http.affected_tests.v1" + } + }, + "test_results": { + "request": {}, + "request_schema": "schema.application.feedback.test-results.request", + "result_schema": "schema.application.feedback.test-results.result", + "bindings": { + "cli": "binding.cli.test_results.v1", + "mcp": "binding.mcp.test_results.v1", + "http": "binding.http.test_results.v1" + } + }, + "code_callees": { + "bindings": { + "cli": "binding.cli.code_callees.v1", + "http": "binding.http.code_callees.v1", + "mcp": "binding.mcp.code_callees.v1" + }, + "request": { + "maximum_depth": 3, + "meta": { + "order": "source_position", + "projection": "evidence" + }, + "node_id": "node.application-parity", + "resolve_trait_dispatch": true, + "scope": { + "generation": "generation.application-parity", + "path_prefix": "src" + } + }, + "request_schema": "schema.application.code-query.callees.request", + "result_schema": "schema.application.code-query.callees.result" + }, + "code_callers": { + "bindings": { + "cli": "binding.cli.code_callers.v1", + "http": "binding.http.code_callers.v1", + "mcp": "binding.mcp.code_callers.v1" + }, + "request": { + "maximum_depth": 3, + "meta": { + "order": "source_position", + "projection": "evidence" + }, + "node_id": "node.application-parity", + "resolve_trait_dispatch": true, + "scope": { + "path_prefix": "src" + } + }, + "request_schema": "schema.application.primitive.code-callers.request", + "result_schema": "schema.application.primitive.code-callers.result" + }, + "code_declaration": { + "bindings": { + "cli": "binding.cli.code_declaration.v1", + "http": "binding.http.code_declaration.v1", + "mcp": "binding.mcp.code_declaration.v1" + }, + "request": { + "meta": { + "order": "source_position", + "projection": "evidence" + }, + "node_id": "symbol.application-parity", + "scope": { + "generation": "generation.application-parity", + "path_prefix": "src" + } + }, + "request_schema": "schema.application.code-query.declaration.request", + "result_schema": "schema.application.code-query.declaration.result" + }, + "code_definition": { + "bindings": { + "cli": "binding.cli.code_definition.v1", + "http": "binding.http.code_definition.v1", + "mcp": "binding.mcp.code_definition.v1" + }, + "request": { + "meta": { + "order": "source_position", + "projection": "evidence" + }, + "node_id": "symbol.application-parity", + "scope": { + "generation": "generation.application-parity", + "path_prefix": "src" + } + }, + "request_schema": "schema.application.code-query.definition.request", + "result_schema": "schema.application.code-query.definition.result" + }, + "code_exact_occurrence": { + "bindings": { + "cli": "binding.cli.code_exact_occurrence.v1", + "http": "binding.http.code_exact_occurrence.v1", + "mcp": "binding.mcp.code_exact_occurrence.v1" + }, + "request": { + "kind": "whole_symbol", + "literal": "ApplicationSurfaceOperation", + "meta": { + "order": "source_position", + "projection": "evidence" + }, + "scope": { + "generation": "generation.application-parity", + "path_prefix": "src" + } + }, + "request_schema": "schema.application.code-query.exact-occurrence.request", + "result_schema": "schema.application.code-query.exact-occurrence.result" + }, + "code_facets": { + "bindings": { + "cli": "binding.cli.code_facets.v1", + "http": "binding.http.code_facets.v1", + "mcp": "binding.mcp.code_facets.v1" + }, + "request": { + "dimension": "language", + "meta": { + "order": "source_position", + "projection": "evidence" + }, + "scope": { + "generation": "generation.application-parity", + "path_prefix": "src" + } + }, + "request_schema": "schema.application.code-query.facets.request", + "result_schema": "schema.application.code-query.facets.result" + }, + "code_implementations": { + "bindings": { + "cli": "binding.cli.code_implementations.v1", + "http": "binding.http.code_implementations.v1", + "mcp": "binding.mcp.code_implementations.v1" + }, + "request": { + "meta": { + "order": "source_position", + "projection": "evidence" + }, + "scope": { + "path_prefix": "src" + }, + "selector": { + "name": "HttpApplicationOwners", + "selector": "trait" + } + }, + "request_schema": "schema.application.primitive.code-implementations.request", + "result_schema": "schema.application.primitive.code-implementations.result" + }, + "code_phrase_search": { + "bindings": { + "cli": "binding.cli.code_phrase_search.v1", + "http": "binding.http.code_phrase_search.v1", + "mcp": "binding.mcp.code_phrase_search.v1" + }, + "request": { + "field_filters": [ + { + "field": "path", + "include": true + } + ], + "fuzzy_budget": 7, + "meta": { + "order": "source_position", + "projection": "evidence" + }, + "phrases": [ + "callable application", + "surface" + ], + "query": "callable application surface", + "scope": { + "generation": "generation.application-parity", + "path_prefix": "src" + } + }, + "request_schema": "schema.application.code-query.phrase-search.request", + "result_schema": "schema.application.code-query.phrase-search.result" + }, + "code_references": { + "bindings": { + "cli": "binding.cli.code_references.v1", + "http": "binding.http.code_references.v1", + "mcp": "binding.mcp.code_references.v1" + }, + "request": { + "meta": { + "order": "source_position", + "projection": "evidence" + }, + "node_id": "symbol.application-parity", + "scope": { + "generation": "generation.application-parity", + "path_prefix": "src" + } + }, + "request_schema": "schema.application.code-query.references.request", + "result_schema": "schema.application.code-query.references.result" + }, + "code_signature_search": { + "bindings": { + "cli": "binding.cli.code_signature_search.v1", + "http": "binding.http.code_signature_search.v1", + "mcp": "binding.mcp.code_signature_search.v1" + }, + "request": { + "is_async": true, + "meta": { + "order": "source_position", + "projection": "evidence" + }, + "params": [ + "RequestContext" + ], + "returns": "ApplicationResult", + "scope": { + "path_prefix": "src" + } + }, + "request_schema": "schema.application.primitive.code-signature-search.request", + "result_schema": "schema.application.primitive.code-signature-search.result" + }, + "code_symbol_search": { + "bindings": { + "cli": "binding.cli.code_symbol_search.v1", + "http": "binding.http.code_symbol_search.v1", + "mcp": "binding.mcp.code_symbol_search.v1" + }, + "request": { + "lazy_index_ignored_dependencies": false, + "meta": { + "order": "source_position", + "projection": "evidence" + }, + "query": "ApplicationSurfaceOperation", + "scope": { + "path_prefix": "src" + } + }, + "request_schema": "schema.application.symbol-search.request", + "result_schema": "schema.application.symbol-search.result" + }, + "code_timeline": { + "bindings": { + "cli": "binding.cli.code_timeline.v1", + "http": "binding.http.code_timeline.v1", + "mcp": "binding.mcp.code_timeline.v1" + }, + "request": { + "meta": { + "order": "source_position", + "projection": "evidence" + }, + "scope": { + "generation": "generation.application-parity", + "path_prefix": "src" + } + }, + "request_schema": "schema.application.code-query.timeline.request", + "result_schema": "schema.application.code-query.timeline.result" + }, + "code_type_definition": { + "bindings": { + "cli": "binding.cli.code_type_definition.v1", + "http": "binding.http.code_type_definition.v1", + "mcp": "binding.mcp.code_type_definition.v1" + }, + "request": { + "meta": { + "order": "source_position", + "projection": "evidence" + }, + "node_id": "symbol.application-parity", + "scope": { + "generation": "generation.application-parity", + "path_prefix": "src" + } + }, + "request_schema": "schema.application.code-query.type-definition.request", + "result_schema": "schema.application.code-query.type-definition.result" + }, + "code_type_hierarchy": { + "bindings": { + "cli": "binding.cli.code_type_hierarchy.v1", + "http": "binding.http.code_type_hierarchy.v1", + "mcp": "binding.mcp.code_type_hierarchy.v1" + }, + "request": { + "maximum_depth": 3, + "meta": { + "order": "source_position", + "projection": "evidence" + }, + "node_id": "node.application-parity", + "scope": { + "path_prefix": "src" + } + }, + "request_schema": "schema.application.primitive.code-type-hierarchy.request", + "result_schema": "schema.application.primitive.code-type-hierarchy.result" + } + }, + "http_sse": { + "http_binding": "binding.http.feedback_list.v1", + "result_schema": "schema.application.feedback.list.result", + "sequence": 7, + "item": { + "finding_id": "feedback-finding.application-parity.fixture", + "summary": "Canonical feedback evidence remains transport-neutral" + } + }, + "authorization_concealment": { + "problem_kind": "not_found_or_not_authorized", + "binding_identity": "omitted", + "unknown_handle_behavior": "same_as_unauthorized" + }, + "unpinned_operations": [ + "git_status", + "git_diff", + "git_history", + "git_blame", + "git_hunks", + "stack_snapshot", + "github_stack_signal_expand", + "preflight_native_integration", + "approve_native_integration", + "apply_native_integration", + "native_integration_status", + "cancel_native_integration", + "worktree_inventory", + "worktree_cleanup_inspect", + "worktree_cleanup_confirm", + "worktree_cleanup_remove", + "worktree_cleanup_reconcile", + "feedback_advisory_cycle", + "session_lookup", + "qualified_name", + "call_chain", + "file_dependents", + "source_lines", + "source_body", + "source_outline", + "module_api", + "file_metadata", + "health_read", + "health_delta", + "storage_status", + "diagnostics_read", + "observatory_read", + "configuration_list", + "configuration_explain", + "configuration_get", + "configuration_set", + "configuration_unset", + "configuration_batch", + "configuration_write_credential", + "configuration_observed_state", + "configuration_protected_preview", + "configuration_protected_apply", + "configuration_rollback_preview", + "configuration_rollback_apply", + "configuration_audit", + "context_scout_status", + "context_scout_recent", + "context_scout_explain", + "context_scout_capability", + "context_scout_budget", + "context_scout_pause", + "context_scout_resume", + "context_scout_cancel", + "context_scout_claim", + "context_scout_delivery", + "context_scout_feedback" + ] +} diff --git a/benchmark_data/tsbench/README.md b/benchmark_data/tsbench/README.md new file mode 100644 index 0000000000..593207f5a4 --- /dev/null +++ b/benchmark_data/tsbench/README.md @@ -0,0 +1,72 @@ +# tsbench — tracedecay run + +Adapts [`Mibayy/tsbench`](https://github.com/Mibayy/tsbench) (the 96-task +agent benchmark token-savior uses to publish its 97.9% score) to drive +tracedecay instead of token-savior, then reports the result. + +Headline: **184 / 192 (95.8%)** on the first untuned run. Full breakdown in +[`SUMMARY.md`](SUMMARY.md). See also +[`docs/TRACEDECAY-VS-TOKENSAVIOR.md`](../../docs/TRACEDECAY-VS-TOKENSAVIOR.md) §4. + +## Reproduce + +```bash +# 1. Clone tsbench +git clone --depth=1 https://github.com/Mibayy/tsbench /tmp/tsbench +cd /tmp/tsbench + +# 2. Apply the tracedecay fork patch +patch -p0 < /path/to/tracedecay/benchmark_data/tsbench/bench_tracedecay.patch +# -> produces bench_tracedecay.py alongside the original bench.py + +# 3. Index the synthetic project with tracedecay +tracedecay init . + +# 4. Run all 96 tasks +TRACEDECAY_BIN=$(which tracedecay) TSBENCH_BARE=0 \ + python3 bench_tracedecay.py --tasks all --run B + +# 5. Per-task JSON appears in ./results-tracedecay/raw/ +# Aggregate stats with: +python3 - <<'PY' +import json, pathlib +files = sorted(pathlib.Path("results-tracedecay/raw").glob("TASK-*-run-B.json")) +score = sum(json.loads(f.read_text())["score"] for f in files) +print(f"{score}/{2*len(files)} = {score/(2*len(files))*100:.1f}%") +PY +``` + +## What the patch changes (vs. upstream `bench.py`) + +- **MCP config** — launches `tracedecay serve -p --timings` instead of + `token_savior.server` over Python stdio. +- **System prompt** — rewrites `SYSTEM_PROMPT_TS` to map each token-savior + tool to its tracedecay equivalent (`find_symbol` → + `tracedecay_find_exact_symbol`, `get_function_source` → `tracedecay_body`, + `get_full_context` → `tracedecay_context`, etc.). Where no tracedecay + equivalent exists (`add_field_to_model`, `move_symbol`, + `analyze_config`, `analyze_docker`), the prompt explicitly allows + `Read` / `Edit` fallback. +- **`--disallowedTools`** — relaxed from + `["Read","Grep","Glob","Agent"]` to `["Agent"]` only, since the four + fallback task categories need text-level tools. +- **Tool-prefix matcher** — `ts_prefixes = ("mcp__tracedecay__",)`. +- **Results path** — `results-tracedecay/raw/` (so a tracedecay run doesn't + overwrite token-savior's `results/raw/`). +- **Seed-session filename** — `.bench-tracedecay-session-id`. +- **`CLAUDE_PROJECT_ROOT`** env var — set to `ROOT` (the local repo) instead + of the hard-coded `/root/projects/tsbench`. + +## Environment + +- `TRACEDECAY_BIN` — path to the tracedecay binary. Defaults to the release + build in the canonical checkout location. +- `TSBENCH_BARE` — set to `0` on macOS / Max OAuth (default is `1`, but + `--bare` mode broke OAuth in our environment). On Linux + API key, leave + default. +- `TSBENCH_MODEL` — defaults to `claude-opus-4-7`. + +## License + +The original `bench.py` is MIT (`Mibayy/tsbench`). The patch in this +directory is contributed back under the same terms. diff --git a/benchmark_data/tsbench/bench_tracedecay.patch b/benchmark_data/tsbench/bench_tracedecay.patch new file mode 100644 index 0000000000..5faa657fb1 --- /dev/null +++ b/benchmark_data/tsbench/bench_tracedecay.patch @@ -0,0 +1,228 @@ +--- bench.py 2026-05-25 13:32:43 ++++ bench_tracedecay.py 2026-05-25 14:16:23 +@@ -28,42 +28,40 @@ + if not CLAUDE_CWD.exists(): + CLAUDE_CWD.symlink_to(ROOT) + TASKS_DIR = ROOT / "tasks" +-RESULTS_DIR = ROOT / "results" ++RESULTS_DIR = ROOT / "results-tracedecay" + RAW_DIR = RESULTS_DIR / "raw" + GT_PATH = ROOT / "GROUND_TRUTH.json" + + TIMEOUT_SECONDS = 300 + MAX_TURNS = 30 + +-WARMUP_PROMPT_B = "List available token-savior tools and switch to project tsbench." ++WARMUP_PROMPT_B = "List available tracedecay tools and confirm the project is indexed." + WARMUP_PROMPT_A = "Hello. Reply with the literal text 'ready' and nothing else." + +-SYSTEM_PROMPT_TS = """You are ONLY allowed to use mcp__token-savior__* tools for any code navigation and editing. Calling Read, Grep, Glob, Edit, Write, Bash, or Agent (sub-agent delegation) for code files is a hard violation. NEVER spawn a sub-agent via Agent — do all edits directly in the main session. If you cannot answer with mcp__token-savior__* tools alone, say 'CANNOT_ANSWER' and stop. ++SYSTEM_PROMPT_TS = """You PREFER `mcp__tracedecay__*` tools for code navigation and editing. NEVER spawn a sub-agent via Agent — do all work in the main session. Read / Grep / Glob / Edit / Write / Bash are ALLOWED only as a fallback when no tracedecay tool covers the task (env-var orphan audits in `.env*` files, Dockerfile inspection, add-field-to-model on `.prisma`/`.ts`, multi-file symbol moves). For everything else, use `mcp__tracedecay__*`. + +-Active project: "tsbench" (preset — no switch_project needed). Do NOT call memory_search or memory_save. ++Active project: "tsbench" (indexed in-place — no init needed). Do NOT call any memory/recording tools (`tracedecay_fact_store`, `tracedecay_fact_feedback`, `tracedecay_memory_status`, `tracedecay_session_start`, `tracedecay_session_end`). + + CORE +-- Locate: find_symbol(name, level=2). One call. +-- Read: get_function_source(name) or get_class_source(name). One call. +-- Whole context (loc + source + callers + deps): get_full_context(name, depth=1). +-- Edit code (.py/.ts/.tsx/.js/.jsx): replace_symbol_source or insert_near_symbol. NEVER Edit/Write on code files (Edit/Write OK on .env/.yml/.md/.json). +-- Add a model field (.prisma/.py/.ts): add_field_to_model. NEVER insert_near_symbol on .prisma. +-- Move a symbol with import fixup: move_symbol(name, target_file). +-- Detect cycles: find_import_cycles. Do not infer manually. +-- Detect duplicates: find_semantic_duplicates(max_groups=30) and enumerate ALL pairs (file + symbol). +-- Diff between refs/branches: detect_breaking_changes(ref="v1") — NOT get_changed_symbols (worktree noise). +-- Call chain between two symbols: get_call_chain(source, target). +-- Files importing X: get_file_dependents("file.py"). +-- Orphan env vars: analyze_config(checks=["orphans"]). +-- Dead code: find_dead_code — take the first N candidates from output (already sorted by cleanup-marker). +-- Docker audit: analyze_docker — read GROUND_TRUTH.json and prefix each issue with its DOCKER-XXX/INFRA-XXX ID. +-- After empty find_symbol: try search_codebase. After empty search_codebase: Read/Grep are allowed for non-indexed files (.prisma, .sql, .graphql, .proto). ++- Locate (exact name): `tracedecay_find_exact_symbol(name)`. One call. O(log n) index probe. ++- Locate (ranked, fuzzy): `tracedecay_search(query, limit)`. Use when you don't know the exact name. ++- Read source of a function/class/struct/etc: `tracedecay_body(symbol, limit=1)`. One call. Returns the full body text. ++- Whole-task context (loc + related code): `tracedecay_context(task="")`. Use this when the prompt is open-ended. ++- Edit a function/method/class body: `tracedecay_replace_symbol(symbol, new_source)`. The new_source MUST include the symbol's own declaration line (e.g. `def foo(...):`). Reindex is automatic. ++- Insert near a symbol: `tracedecay_insert_at_symbol(symbol, content, position="before"|"after")`. For non-symbol locations use `tracedecay_insert_at(path, anchor, content)`. ++- Add a field to a Prisma model or TS interface/type: NO direct tracedecay tool — use `Edit` or `tracedecay_str_replace(path, old_str, new_str)`. Re-run after to verify the edit landed. ++- Move a symbol across files: NO direct tracedecay tool — combine `tracedecay_body` (read), `tracedecay_str_replace` (delete from source file + paste in target file), and `Edit` for import-site fixups. ++- Detect cycles: `tracedecay_circular`. Do not infer manually. ++- Detect duplicates: `tracedecay_similar(name|file)`. Enumerate the pairs returned. The MCP tool surfaces semantic neighbors, not strict duplicates — interpret accordingly. ++- Diff between refs/branches: `tracedecay_branch_diff(base, head)` for tracked branches, or `tracedecay_changelog` for commit-based diffs. ++- Call chain between two symbols: resolve both with `tracedecay_find_exact_symbol`, then `tracedecay_call_chain(from_id, to_id)`. ++- Callers/callees of a symbol: `tracedecay_callers(node_id)` / `tracedecay_callees(node_id)` after resolving via `tracedecay_find_exact_symbol`. ++- Files importing X: `tracedecay_file_dependents(file)`. ++- Impact radius (transitive dependents): `tracedecay_impact(node_id)`. ++- Dead code: `tracedecay_dead_code`. ++- Orphan env vars / Dockerfile audits: tracedecay does NOT analyse these — use `Read` on `.env*` and `Dockerfile`, then judgment. Cite IDs from `GROUND_TRUTH.json` (`SECRET-*`, `ORPHAN-*`, `UNDECL-*`, `DOCKER-*`, `INFRA-*`). ++- After empty `tracedecay_find_exact_symbol`: fall back to `tracedecay_search`. After empty `tracedecay_search`: `Read`/`Grep` are allowed for non-indexed files (`.prisma`, `.sql`, `.graphql`, `.proto`, `.env*`, `Dockerfile`). + +-BATCH MODE — pass `names=[...]` (max 10) instead of multiple sequential calls: +- get_function_source(names=["a", "b", "c"]) +- find_symbol(names=["x", "y"], level=2) +- get_full_context(names=["x", "y"]) +- + LIMITS + - Max 5 tool calls per simple task; 4 for explain/trace/describe tasks. + - For impact/dependency/cycle/duplicate/breaking-change answers: ENUMERATE every file/symbol/ID, never summarize. +@@ -71,8 +69,8 @@ + - For changelog/version-diff prompts: cross-check detect_breaking_changes against any project-level CHANGELOG/MIGRATION/breaking_changes.py file and cite each BREAK-XXX with its snake_case kind token (rename_function, signature_change, remove_function, route_removed, default_change, type_change, add_function). + - Stub/missing endpoint: NEVER answer just CANNOT_ANSWER — produce a structured walkthrough (router → service → repository) citing file:line, append "(implementation is stub)". + - Implement-task / code_generation: write the FULL code block in your response. ALWAYS include `import` statements at the top of the block (e.g. `import re`, `import os`) AND mention the target file path explicitly in your response (e.g. a heading `### packages/utils/foo.py` before the code block, or in the prose). The judge looks for both. +-- Rename-task: use `replace_symbol_source` on the function definition + `search_codebase` for callers in the same module/package. NEVER touch same-named symbols in OTHER modules. NEVER delegate to Agent. +-- Add-field task (.prisma + .ts/.py): use `add_field_to_model` directly on each file. ONE call per file. Do NOT delegate to Agent. ++- Rename-task: use `tracedecay_replace_symbol` on the function definition + `tracedecay_callers` (or `tracedecay_search`) to enumerate caller sites for `tracedecay_str_replace` rewrites. NEVER touch same-named symbols in OTHER modules. NEVER delegate to Agent. ++- Add-field task (`.prisma` + `.ts`/`.py`): use `Edit` or `tracedecay_str_replace` to splice the new field inside the model/interface block. ONE edit per file. Do NOT delegate to Agent. + + CONCISION (CRITICAL): Réponds en moins de 500 tokens output sauf si le prompt demande explicitement du code long. Pas de préambule ("Voici", "Je vais", "Bien sûr"). Pas de récap final. Pas de répétition. Énumère les faits demandés sans paraphrase. Pour les implementations, le code parle — n'ajoute pas de commentaires explicatifs ni de bullet-list "ce que j'ai fait". + +@@ -100,32 +98,19 @@ + # under results/archive-run-C-final-20260420/. Kept code path removed; + # --run C is now refused at CLI level. If hybrid work resumes, revisit here. + +-# MCP config for Run B: token-savior only, with tsbench in WORKSPACE_ROOTS. +-# Honors TS_PROFILE env var ("tiny"|"tiny_plus"|"ultra"|"lean"|"core"|"full") +-# so the benchmark can A/B different manifest-size profiles. Default tiny_plus +-# (12 tools, ~2 KT) — Pareto-optimal on tsbench-26/04 (97.4 % score, -42 % +-# active vs lean dégradé). TS_CAPTURE_DISABLED=1 prevents the agent from +-# burning tokens re-fetching sandboxed outputs (TASK-039 saw +40k cache +-# creation on lean dégradé due to capture_get round-trips). +-_TS_MCP_ENV = { +- "WORKSPACE_ROOTS": "/root/projects/tsbench", +- "TOKEN_SAVIOR_CLIENT": "claude-code", +- "EXCLUDE_EXTRA": "**/.next/**:**/node_modules/**:**/dist/**:**/.git/**:**/coverage/**:**/__pycache__/**", +- "TS_CAPTURE_DISABLED": "1", +- # Thin schemas : retire description sub-properties des inputSchema (-44% +- # manifest tokens sur tiny_plus, mesure 18/05). Le model utilise quand +- # meme correctement les tools car la description top-level reste. +- "TS_THIN_SCHEMAS": "1", +-} +-_TS_MCP_ENV["TOKEN_SAVIOR_PROFILE"] = os.environ.get("TS_PROFILE", "tiny_plus") +- ++# MCP config for Run B: tracedecay only. The tracedecay binary path is honored ++# via TRACEDECAY_BIN env var; defaults to the release build of the local ++# checkout. The serve subprocess gets `--timings` so per-call handler latency ++# is recorded in `_meta.duration_us` for later analysis. ++_TRACEDECAY_BIN = os.environ.get( ++ "TRACEDECAY_BIN", "/Users/enzol/Code/tracedecay/target/release/tracedecay" ++) + TS_MCP_CONFIG = { + "mcpServers": { +- "token-savior-recall": { ++ "tracedecay": { + "type": "stdio", +- "command": "/root/.local/token-savior-venv/bin/python", +- "args": ["-m", "token_savior.server"], +- "env": _TS_MCP_ENV, ++ "command": _TRACEDECAY_BIN, ++ "args": ["serve", "-p", str(ROOT), "--timings"], + } + } + } +@@ -210,7 +195,7 @@ + + # Seed-and-fork session strategy. Session ID is per-bench-run, cached on + # disk so concurrent harness invocations on the same run share it. +- seed_path = ROOT / ".bench-session-id" ++ seed_path = ROOT / ".bench-tracedecay-session-id" + seed_uuid: str | None = None + if seed_path.exists(): + try: +@@ -245,7 +230,11 @@ + # rename/add-field edit tasks by spawning an Agent sub-agent that + # lacked MCP context, then returning CANNOT_ANSWER (TASK-011, 012). + # Forcing them to use the direct edit primitives lifts those tasks. +- base_disallowed = ["Read", "Grep", "Glob", "Agent"] ++ # TraceDecay variant: allow Read / Grep / Glob since tracedecay has ++ # no analyze_config / analyze_docker / add_field_to_model tools and ++ # those tasks require text-level fallback. Still ban Agent so the ++ # model can't dodge edit tasks via sub-agent delegation. ++ base_disallowed = ["Agent"] + if extra_disallowed: + base_disallowed = list(dict.fromkeys(base_disallowed + extra_disallowed)) + cmd += ["--disallowedTools", ",".join(base_disallowed)] +@@ -265,7 +254,7 @@ + # makes Claude terse/CANNOT_ANSWER too early. + env["TS_MEMORY_DISABLE"] = "1" + if run == "B": +- env["CLAUDE_PROJECT_ROOT"] = "/root/projects/tsbench" ++ env["CLAUDE_PROJECT_ROOT"] = str(ROOT) + + start = time.time() + timed_lines: list[tuple[float, str]] = [] +@@ -442,7 +431,7 @@ + if ev.get("is_error"): + error = ev.get("subtype") or "api_error" + +- ts_prefixes = ("mcp__token-savior__", "mcp__token-savior-recall__") ++ ts_prefixes = ("mcp__tracedecay__",) + + def _is_ts(name): + return isinstance(name, str) and any(name.startswith(p) for p in ts_prefixes) +@@ -546,7 +535,9 @@ + + + def _is_ts_tool(name: str) -> bool: +- return bool(name) and (name.startswith("mcp__token-savior") or name.startswith("token-savior")) ++ return bool(name) and ( ++ name.startswith("mcp__tracedecay__") or name.startswith("tracedecay_") ++ ) + + + +@@ -1006,7 +997,7 @@ + start of every prewarm so a stale uuid (claude session expired) can't + cause --resume failures. + """ +- seed_path = ROOT / ".bench-session-id" ++ seed_path = ROOT / ".bench-tracedecay-session-id" + if seed_path.exists(): + try: + seed_path.unlink() +@@ -1030,7 +1021,7 @@ + RESULTS_DIR.mkdir(parents=True, exist_ok=True) + path.write_text(json.dumps(record, indent=2) + "\n") + tb = " ".join( +- f"{k.replace('mcp__token-savior__','ts:')}×{v}" ++ f"{k.replace('mcp__tracedecay__','ts:')}×{v}" + for k, v in record["tool_calls_breakdown"].items() + ) + err = f" ERROR={record['error']}" if record.get("error") else "" +@@ -1111,7 +1102,7 @@ + sequentially, prewarm_run_b will overwrite this seed before run B + starts — which is fine: each run pays its own warmup cost once. + """ +- seed_path = ROOT / ".bench-session-id" ++ seed_path = ROOT / ".bench-tracedecay-session-id" + if seed_path.exists(): + try: + seed_path.unlink() +@@ -1172,7 +1163,7 @@ + "task_id": task_id, + "run": run, + "agent": agent, +- "baseline": {"A": "plain", "B": "token-savior"}.get(run, "plain"), ++ "baseline": {"A": "plain", "B": "tracedecay"}.get(run, "plain"), + **metrics, + "score": score, + "max_score": max_score, +@@ -1182,7 +1173,7 @@ + RAW_DIR.mkdir(parents=True, exist_ok=True) + out_path.write_text(json.dumps(record, indent=2) + "\n") + +- tb = " ".join(f"{k.replace('mcp__token-savior__','ts:')}×{v}" for k, v in record["tool_calls_breakdown"].items()) ++ tb = " ".join(f"{k.replace('mcp__tracedecay__','ts:')}×{v}" for k, v in record["tool_calls_breakdown"].items()) + err = f" ERROR={record['error']}" if record.get("error") else "" + print( + f"[{task_id} | Run {run} | {agent}] done — {record['wall_time_seconds']}s | " +@@ -1383,8 +1374,8 @@ + for name, n in top_a[:5]: + lines.append(f"- `{name}` : {n}") + total_b = sum(n for _, n in top_b) or 1 +- ts_b = sum(n for name, n in top_b if name.startswith("mcp__token-savior__")) +- lines.append(f"\n**Run B (token-savior)** — top 5 (TS/total = {ts_b}/{total_b} = {ts_b/total_b*100:.0f}%) :") ++ ts_b = sum(n for name, n in top_b if name.startswith("mcp__tracedecay__")) ++ lines.append(f"\n**Run B (tracedecay)** — top 5 (TS/total = {ts_b}/{total_b} = {ts_b/total_b*100:.0f}%) :") + for name, n in top_b[:5]: + lines.append(f"- `{name}` : {n}") + diff --git a/dashboard/codegen/schemas/dashboard-contracts.schema.json b/dashboard/codegen/schemas/dashboard-contracts.schema.json new file mode 100644 index 0000000000..3592aa3151 --- /dev/null +++ b/dashboard/codegen/schemas/dashboard-contracts.schema.json @@ -0,0 +1,29525 @@ +{ + "$defs": { + "AcceptWorkTaskRequestV1": { + "additionalProperties": false, + "properties": { + "evidence_by_criterion": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "mutation": { + "$ref": "#/$defs/WorkProductMutationIdentityV1" + }, + "selection": { + "$ref": "#/$defs/WorkProductSelectionScopeV1" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + } + }, + "required": [ + "selection", + "task_id", + "evidence_by_criterion", + "mutation" + ], + "type": "object" + }, + "ActorId": { + "description": "Strongly typed canonical identity: `ActorId`.", + "type": "string" + }, + "AddWorkTaskRequestV1": { + "additionalProperties": false, + "properties": { + "item": { + "$ref": "#/$defs/WorkItemV1" + }, + "mutation": { + "$ref": "#/$defs/WorkProductMutationIdentityV1" + }, + "selection": { + "$ref": "#/$defs/WorkProductSelectionScopeV1" + } + }, + "required": [ + "selection", + "item", + "mutation" + ], + "type": "object" + }, + "AdjudicateWorkLeakCommandV1": { + "additionalProperties": false, + "properties": { + "adjudication_id": { + "type": "string" + }, + "attempt": { + "$ref": "#/$defs/WorkAttemptIdentityV1" + }, + "command_id": { + "$ref": "#/$defs/WorkCommandId" + }, + "detection_horizon_micros": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "expected_revision": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "adjudication_id", + "expected_revision", + "attempt", + "detection_horizon_micros", + "command_id" + ], + "title": "AdjudicateWorkLeakCommandV1", + "type": "object" + }, + "AdmitWorkExecutionRequestV1": { + "additionalProperties": false, + "properties": { + "based_on_version": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "mutation": { + "$ref": "#/$defs/WorkProductMutationIdentityV1" + }, + "selection": { + "$ref": "#/$defs/WorkProductSelectionScopeV1" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + } + }, + "required": [ + "selection", + "task_id", + "based_on_version", + "mutation" + ], + "type": "object" + }, + "AdmitWorkPlacementCommand": { + "additionalProperties": false, + "properties": { + "occurred_at": { + "$ref": "#/$defs/UtcMicros" + }, + "retention_eligible_at": { + "anyOf": [ + { + "$ref": "#/$defs/UtcMicros" + }, + { + "type": "null" + } + ], + "default": null, + "description": "When retention makes this placement eligible for a fresh cleanup\npreflight. Eligibility is not delete authority." + }, + "run_id": { + "$ref": "#/$defs/RunId" + }, + "target": { + "$ref": "#/$defs/WorkPlacementTargetV1" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + } + }, + "required": [ + "task_id", + "run_id", + "target", + "retention_eligible_at", + "occurred_at" + ], + "title": "AdmitWorkPlacementCommand", + "type": "object" + }, + "AdmitWorkSynthesisCommand": { + "additionalProperties": false, + "description": "Admits one synthesis attempt over an ordered set of sibling sources.", + "properties": { + "output_name": { + "$ref": "#/$defs/WorkflowOutputName", + "description": "The fan-out output the synthesis belongs to, carried into the draft\nthe workflow completion path verifies." + }, + "sources": { + "description": "The ordered sibling sources the synthesis consumes.", + "items": { + "$ref": "#/$defs/WorkAttemptIdentityV1" + }, + "type": "array" + }, + "start": { + "$ref": "#/$defs/StartWorkAttemptCommand", + "description": "The synthesis attempt's own admission facts; it is started through\nthe same admission machinery as any other attempt." + } + }, + "required": [ + "start", + "output_name", + "sources" + ], + "type": "object" + }, + "AnalyticsAgentUsageV1": { + "properties": { + "agent": { + "type": "string" + }, + "sessions": { + "format": "int64", + "type": "integer" + } + }, + "required": [ + "agent", + "sessions" + ], + "type": "object" + }, + "AnalyticsAgentsPayloadV1": { + "properties": { + "available": { + "type": "boolean" + }, + "by_agent": { + "items": { + "$ref": "#/$defs/AnalyticsAgentUsageV1" + }, + "type": "array" + }, + "source": { + "type": "string" + } + }, + "required": [ + "available", + "source", + "by_agent" + ], + "type": "object" + }, + "AnalyticsDiagnosticsPayloadV1": { + "properties": { + "available": { + "type": "boolean" + }, + "by_event_kind": { + "items": { + "$ref": "#/$defs/AnalyticsEventKindCountV1" + }, + "type": "array" + }, + "by_hook": { + "items": { + "$ref": "#/$defs/AnalyticsHookNameCountV1" + }, + "type": "array" + }, + "by_mcp_tool": { + "items": { + "$ref": "#/$defs/AnalyticsToolCountV1" + }, + "type": "array" + }, + "by_outcome": { + "items": { + "$ref": "#/$defs/AnalyticsOutcomeCountV1" + }, + "type": "array" + }, + "by_prompt_category": { + "items": { + "$ref": "#/$defs/AnalyticsPromptCategoryCountV1" + }, + "type": "array" + }, + "by_tool": { + "items": { + "$ref": "#/$defs/AnalyticsToolCountV1" + }, + "type": "array" + }, + "by_tool_category": { + "items": { + "$ref": "#/$defs/AnalyticsToolCategoryCountV1" + }, + "type": "array" + }, + "event_count": { + "format": "int64", + "type": "integer" + }, + "events_per_hour": { + "default": null, + "format": "double", + "type": [ + "number", + "null" + ] + }, + "hint_efficacy": { + "$ref": "#/$defs/AnalyticsHintEfficacyV1" + }, + "hook_call_count": { + "format": "int64", + "type": "integer" + }, + "hook_readiness": { + "description": "Daemon-owned hook readiness projection. The projection stamps its own\n`schema_version`; the diagnostics read carries it verbatim." + }, + "hook_sources": { + "description": "Provenance rows for the hook-analytics source files backing the\nhook rollups. Free-form provenance, not a versioned sub-contract.", + "items": true, + "type": "array" + }, + "hook_window": { + "$ref": "#/$defs/AnalyticsHookWindowV1" + }, + "mcp_tool_call_count": { + "format": "int64", + "type": "integer" + }, + "message_count": { + "format": "int64", + "type": "integer" + }, + "ratios": { + "$ref": "#/$defs/AnalyticsDiagnosticsRatiosV1" + }, + "recent_events": { + "items": { + "$ref": "#/$defs/AnalyticsRecentEventV1" + }, + "type": "array" + }, + "recent_hooks": { + "items": { + "$ref": "#/$defs/AnalyticsRecentHookV1" + }, + "type": "array" + }, + "source": { + "type": "string" + }, + "tool_call_count": { + "format": "int64", + "type": "integer" + }, + "tracedecay_call_count": { + "format": "int64", + "type": "integer" + } + }, + "required": [ + "available", + "source", + "message_count", + "event_count", + "tool_call_count", + "mcp_tool_call_count", + "tracedecay_call_count", + "hook_call_count", + "hook_sources", + "hook_readiness", + "events_per_hour", + "ratios", + "by_event_kind", + "by_tool", + "by_mcp_tool", + "by_tool_category", + "by_outcome", + "by_hook", + "by_prompt_category", + "hint_efficacy", + "hook_window", + "recent_events", + "recent_hooks" + ], + "type": "object" + }, + "AnalyticsDiagnosticsRatiosV1": { + "properties": { + "events_per_message": { + "format": "double", + "type": "number" + }, + "hook_calls_per_message": { + "format": "double", + "type": "number" + }, + "mcp_tool_calls_per_message": { + "format": "double", + "type": "number" + }, + "tool_calls_per_message": { + "format": "double", + "type": "number" + } + }, + "required": [ + "events_per_message", + "tool_calls_per_message", + "mcp_tool_calls_per_message", + "hook_calls_per_message" + ], + "type": "object" + }, + "AnalyticsEventKindCountV1": { + "properties": { + "count": { + "format": "int64", + "type": "integer" + }, + "event_kind": { + "type": "string" + } + }, + "required": [ + "event_kind", + "count" + ], + "type": "object" + }, + "AnalyticsHintCategoryV1": { + "properties": { + "category": { + "type": "string" + }, + "emitted": { + "format": "int64", + "type": "integer" + }, + "followed": { + "format": "int64", + "type": "integer" + }, + "ignored": { + "format": "int64", + "type": "integer" + }, + "suppressed": { + "format": "int64", + "type": "integer" + } + }, + "required": [ + "category", + "emitted", + "followed", + "ignored", + "suppressed" + ], + "type": "object" + }, + "AnalyticsHintEfficacyCategoryV1": { + "properties": { + "acted": { + "format": "int64", + "type": "integer" + }, + "category": { + "type": "string" + }, + "emitted": { + "format": "int64", + "type": "integer" + }, + "ignored": { + "format": "int64", + "type": "integer" + }, + "unresolved": { + "format": "int64", + "type": "integer" + } + }, + "required": [ + "category", + "emitted", + "acted", + "ignored", + "unresolved" + ], + "type": "object" + }, + "AnalyticsHintEfficacyTotalsV1": { + "properties": { + "acted": { + "format": "int64", + "type": "integer" + }, + "emitted": { + "format": "int64", + "type": "integer" + }, + "ignored": { + "format": "int64", + "type": "integer" + }, + "unresolved": { + "format": "int64", + "type": "integer" + } + }, + "required": [ + "emitted", + "acted", + "ignored", + "unresolved" + ], + "type": "object" + }, + "AnalyticsHintEfficacyV1": { + "properties": { + "available": { + "type": "boolean" + }, + "by_category": { + "items": { + "$ref": "#/$defs/AnalyticsHintEfficacyCategoryV1" + }, + "type": "array" + }, + "source": { + "type": "string" + }, + "totals": { + "$ref": "#/$defs/AnalyticsHintEfficacyTotalsV1" + } + }, + "required": [ + "available", + "source", + "totals", + "by_category" + ], + "type": "object" + }, + "AnalyticsHintsPayloadV1": { + "properties": { + "available": { + "type": "boolean" + }, + "by_category": { + "items": { + "$ref": "#/$defs/AnalyticsHintCategoryV1" + }, + "type": "array" + }, + "error": { + "default": null, + "type": [ + "string", + "null" + ] + }, + "source": { + "type": "string" + } + }, + "required": [ + "available", + "source", + "error", + "by_category" + ], + "type": "object" + }, + "AnalyticsHookNameCountV1": { + "properties": { + "count": { + "format": "int64", + "type": "integer" + }, + "hook_name": { + "type": "string" + } + }, + "required": [ + "hook_name", + "count" + ], + "type": "object" + }, + "AnalyticsHookWindowV1": { + "properties": { + "newest_ts_unix_ms": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "oldest_ts_unix_ms": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "rows_included": { + "format": "int64", + "type": "integer" + }, + "rows_scanned": { + "format": "int64", + "type": "integer" + }, + "total_rows_known": { + "type": "boolean" + }, + "truncated": { + "type": "boolean" + }, + "window_rows": { + "format": "int64", + "type": "integer" + } + }, + "required": [ + "window_rows", + "rows_scanned", + "rows_included", + "truncated", + "total_rows_known", + "oldest_ts_unix_ms", + "newest_ts_unix_ms" + ], + "type": "object" + }, + "AnalyticsModeReadModelV1": { + "properties": { + "coverage": { + "$ref": "#/$defs/MetricCoverageV1" + }, + "current": { + "anyOf": [ + { + "$ref": "#/$defs/AnalyticsModeV1" + }, + { + "type": "null" + } + ] + }, + "transition_watermark": { + "type": [ + "string", + "null" + ] + }, + "unavailable_reason": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "current", + "transition_watermark", + "coverage", + "unavailable_reason" + ], + "type": "object" + }, + "AnalyticsModeV1": { + "enum": [ + "off", + "local_only", + "aggregate_share" + ], + "type": "string" + }, + "AnalyticsOutcomeCountV1": { + "properties": { + "count": { + "format": "int64", + "type": "integer" + }, + "outcome": { + "type": "string" + } + }, + "required": [ + "outcome", + "count" + ], + "type": "object" + }, + "AnalyticsOverviewPayloadV1": { + "properties": { + "agents": { + "$ref": "#/$defs/AnalyticsAgentsPayloadV1" + }, + "available": { + "type": "boolean" + }, + "db": { + "type": "string" + }, + "diagnostics": { + "$ref": "#/$defs/AnalyticsDiagnosticsPayloadV1" + }, + "hints": { + "$ref": "#/$defs/AnalyticsHintsPayloadV1" + }, + "observatory": { + "anyOf": [ + { + "$ref": "#/$defs/ObservatoryReadModelV1" + }, + { + "type": "null" + } + ] + }, + "scope": { + "type": "string" + }, + "underused_tool_families": { + "items": { + "$ref": "#/$defs/AnalyticsUnderusedFamilyV1" + }, + "type": "array" + }, + "usage": { + "$ref": "#/$defs/AnalyticsUsageSummaryV1" + } + }, + "required": [ + "available", + "db", + "scope", + "hints", + "usage", + "agents", + "diagnostics", + "underused_tool_families", + "observatory" + ], + "type": "object" + }, + "AnalyticsPromptCategoryCountV1": { + "properties": { + "count": { + "format": "int64", + "type": "integer" + }, + "prompt_category": { + "type": "string" + } + }, + "required": [ + "prompt_category", + "count" + ], + "type": "object" + }, + "AnalyticsRecentEventV1": { + "properties": { + "event_kind": { + "type": "string" + }, + "hook_name": { + "type": "string" + }, + "outcome": { + "type": "string" + }, + "timestamp": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "tool_name": { + "type": "string" + } + }, + "required": [ + "timestamp", + "event_kind", + "hook_name", + "tool_name", + "outcome" + ], + "type": "object" + }, + "AnalyticsRecentHookV1": { + "properties": { + "agent": { + "type": "string" + }, + "hook_name": { + "type": "string" + }, + "prompt_category": { + "type": "string" + }, + "session_id": { + "type": "string" + }, + "tool_name": { + "type": "string" + }, + "ts_unix_ms": { + "format": "int64", + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "ts_unix_ms", + "agent", + "hook_name", + "session_id", + "tool_name", + "prompt_category" + ], + "type": "object" + }, + "AnalyticsSubagentLinkV1": { + "description": "How a session is attached to the delegation tree above it.\n\nThe distinction is load-bearing. A session with no parent and a session\nwhose parent the store does not hold both draw at the left margin, but only\nthe first one is actually a root: the second is a tree whose top was never\ningested, and captioning it as a root would assert a delegation boundary\nthat was never observed.", + "oneOf": [ + { + "const": "root", + "description": "The session records no parent — a genuine top of a delegation tree.", + "type": "string" + }, + { + "const": "linked", + "description": "The parent named by the session is present in this reading.", + "type": "string" + }, + { + "const": "missing_parent", + "description": "The session names a parent the session store does not hold, so its\ndepth is measured from a cut edge rather than from a real root.", + "type": "string" + }, + { + "const": "cycle", + "description": "The parent chain closes on itself. Never reachable from a root, so it\nis surfaced at the margin rather than silently dropped.", + "type": "string" + } + ] + }, + "AnalyticsSubagentNodeV1": { + "description": "One session in the subagent delegation tree.", + "properties": { + "agent": { + "description": "The managed-agent label when the session carries one, else the raw\n`agent_id`. `None` is an unlabeled session, not an unnamed agent.", + "type": [ + "string", + "null" + ] + }, + "depth": { + "description": "Distance from this node's tree top. Roots are 0.", + "format": "int64", + "type": "integer" + }, + "descendants": { + "description": "Sessions below this one, transitively, excluding itself.", + "format": "int64", + "type": "integer" + }, + "ended_at": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "is_subagent": { + "type": "boolean" + }, + "link": { + "$ref": "#/$defs/AnalyticsSubagentLinkV1" + }, + "parent_session_id": { + "type": [ + "string", + "null" + ] + }, + "parent_tool_use_id": { + "description": "The tool invocation that spawned this session, when the provider\nrecorded one. It is what makes a delegation edge attributable to a\nspecific call rather than merely to a parent.", + "type": [ + "string", + "null" + ] + }, + "provider": { + "type": "string" + }, + "session_id": { + "type": "string" + }, + "started_at": { + "description": "Unix SECONDS, as the session store records them — capture parses\nprovider stamps with `parse_rfc3339_timestamp`, which yields seconds,\nand normalizes millisecond inputs down to seconds before storing. This\nis not the microsecond convention the Work contracts use, and reading\nit as micros would place every session in 1970.", + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "title": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "provider", + "session_id", + "parent_session_id", + "agent", + "title", + "started_at", + "ended_at", + "is_subagent", + "parent_tool_use_id", + "depth", + "descendants", + "link" + ], + "type": "object" + }, + "AnalyticsSubagentTreePayloadV1": { + "description": "The subagent tree: parent/child session edges, not a per-agent rollup.\n\n`nodes` is a pre-order flattening — every node appears after its own parent\nand before that parent's later siblings — so a reader can draw the tree from\n`depth` alone without reassembling edges client-side.", + "properties": { + "available": { + "type": "boolean" + }, + "cycle_count": { + "description": "Sessions whose parent chain closes on itself.", + "format": "int64", + "type": "integer" + }, + "edge_count": { + "description": "Parent/child edges actually resolved within this reading.", + "format": "int64", + "type": "integer" + }, + "error": { + "default": null, + "type": [ + "string", + "null" + ] + }, + "max_depth": { + "description": "Deepest `depth` present, so a caption can state the tree's reach\ninstead of implying one from the drawn rows.", + "format": "int64", + "type": "integer" + }, + "missing_parent_count": { + "description": "Sessions naming a parent this reading does not hold.", + "format": "int64", + "type": "integer" + }, + "nodes": { + "items": { + "$ref": "#/$defs/AnalyticsSubagentNodeV1" + }, + "type": "array" + }, + "root_count": { + "description": "Nodes whose `link` is `root`.", + "format": "int64", + "type": "integer" + }, + "sessions_read": { + "description": "Sessions read for this project before any tree was built. The only\nhonest denominator for the counts below.", + "format": "int64", + "type": "integer" + }, + "source": { + "type": "string" + }, + "truncated": { + "description": "True when the scan ceiling was reached, so edges may be cut and the\ncounts above describe a prefix of the store rather than all of it.", + "type": "boolean" + } + }, + "required": [ + "available", + "source", + "error", + "nodes", + "sessions_read", + "root_count", + "edge_count", + "max_depth", + "missing_parent_count", + "cycle_count", + "truncated" + ], + "type": "object" + }, + "AnalyticsToolCategoryCountV1": { + "properties": { + "count": { + "format": "int64", + "type": "integer" + }, + "tool_category": { + "type": "string" + } + }, + "required": [ + "tool_category", + "count" + ], + "type": "object" + }, + "AnalyticsToolCountV1": { + "properties": { + "count": { + "format": "int64", + "type": "integer" + }, + "tool_name": { + "type": "string" + } + }, + "required": [ + "tool_name", + "count" + ], + "type": "object" + }, + "AnalyticsUnderusedFamilyV1": { + "properties": { + "family": { + "type": "string" + }, + "missed_events": { + "format": "int64", + "type": "integer" + }, + "relevant_events": { + "format": "int64", + "type": "integer" + }, + "underused": { + "type": "boolean" + }, + "usage_events": { + "format": "int64", + "type": "integer" + } + }, + "required": [ + "family", + "relevant_events", + "usage_events", + "missed_events", + "underused" + ], + "type": "object" + }, + "AnalyticsUnderusedPayloadV1": { + "properties": { + "available": { + "type": "boolean" + }, + "db": { + "type": "string" + }, + "families": { + "items": { + "$ref": "#/$defs/AnalyticsUnderusedFamilyV1" + }, + "type": "array" + } + }, + "required": [ + "available", + "db", + "families" + ], + "type": "object" + }, + "AnalyticsUsageCategoryV1": { + "properties": { + "category": { + "type": "string" + }, + "events": { + "format": "int64", + "type": "integer" + }, + "kind": { + "type": "string" + } + }, + "required": [ + "kind", + "category", + "events" + ], + "type": "object" + }, + "AnalyticsUsageSummaryV1": { + "properties": { + "available": { + "type": "boolean" + }, + "by_category": { + "items": { + "$ref": "#/$defs/AnalyticsUsageCategoryV1" + }, + "type": "array" + }, + "event_count": { + "default": null, + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "message_count": { + "format": "int64", + "type": "integer" + }, + "source": { + "default": null, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "available", + "source", + "message_count", + "event_count", + "by_category" + ], + "type": "object" + }, + "ApplicationExecutionFailureClassV1": { + "description": "Stable non-retryable class for an admitted execution failure.", + "enum": [ + "denied", + "malformed_output", + "permanent" + ], + "type": "string" + }, + "ApplicationProblemEnvelope": { + "additionalProperties": false, + "description": "Stable application failure envelope. Partial effects and reset-required\nstates are admitted terminals; partial effects carry their committed\nreceipt directly while reset-required states carry an explicit action.", + "properties": { + "contract": { + "$ref": "#/$defs/ResultContractRef" + }, + "problem": { + "$ref": "#/$defs/ApplicationProblemRecord" + }, + "request_id": { + "type": "string" + } + }, + "required": [ + "contract", + "request_id", + "problem" + ], + "type": "object" + }, + "ApplicationProblemKind": { + "description": "Stable problem-code taxonomy for request failures and admitted terminals.", + "enum": [ + "invalid_request", + "not_found_or_not_authorized", + "conflict", + "partial_effect", + "stale", + "unsupported", + "unavailable", + "execution_failed", + "reset_required", + "saturated", + "cancelled", + "timed_out" + ], + "type": "string" + }, + "ApplicationProblemRecord": { + "additionalProperties": false, + "description": "Stable application problem record shared verbatim by every adapter.", + "properties": { + "cancellation_stage": { + "$ref": "#/$defs/RequiredNullable2" + }, + "code": { + "type": "string" + }, + "committed_receipt": { + "$ref": "#/$defs/RequiredNullable", + "description": "A committed effect is present only for an admitted partial effect.\nThe nullable field is always serialized: omitting it would create a\ncompatibility/default path that could hide a missing receipt." + }, + "coverage": { + "anyOf": [ + { + "$ref": "#/$defs/EvidenceCoverage" + }, + { + "type": "null" + } + ] + }, + "details": { + "items": { + "$ref": "#/$defs/SafeDiagnostic" + }, + "type": "array" + }, + "diagnostic": { + "anyOf": [ + { + "$ref": "#/$defs/SafeDiagnostic" + }, + { + "type": "null" + } + ] + }, + "execution_failure_classification": { + "$ref": "#/$defs/RequiredNullable4" + }, + "kind": { + "$ref": "#/$defs/ApplicationProblemKind" + }, + "legal_actions": { + "items": { + "$ref": "#/$defs/LegalAction" + }, + "type": "array" + }, + "message": { + "type": "string" + }, + "owning_layer": { + "$ref": "#/$defs/ProblemOwningLayer" + }, + "request_id": { + "type": "string" + }, + "retry": { + "$ref": "#/$defs/RetryDirective" + }, + "retry_after_millis": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "retry_scope": { + "anyOf": [ + { + "$ref": "#/$defs/RetryScope" + }, + { + "type": "null" + } + ] + }, + "retryable": { + "type": "boolean" + }, + "revision": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "terminality": { + "$ref": "#/$defs/ProblemTerminality" + }, + "trace_id": { + "type": "string" + }, + "unavailable_classification": { + "$ref": "#/$defs/RequiredNullable3" + } + }, + "required": [ + "revision", + "kind", + "code", + "message", + "diagnostic", + "committed_receipt", + "owning_layer", + "terminality", + "retryable", + "retry", + "retry_scope", + "retry_after_millis", + "cancellation_stage", + "unavailable_classification", + "execution_failure_classification", + "request_id", + "trace_id", + "details", + "legal_actions", + "coverage" + ], + "type": "object" + }, + "ApplicationUnavailableClassV1": { + "description": "Stable reason an application authority is unavailable.", + "enum": [ + "authority", + "backend_unavailable", + "backend_disconnected", + "backend_retryable" + ], + "type": "string" + }, + "ApplyWorkRelationReplanRequestV1": { + "additionalProperties": false, + "properties": { + "mutation": { + "$ref": "#/$defs/WorkProductMutationIdentityV1" + }, + "proposal_id": { + "$ref": "#/$defs/ProposalId" + }, + "selection": { + "$ref": "#/$defs/WorkProductSelectionScopeV1" + } + }, + "required": [ + "selection", + "proposal_id", + "mutation" + ], + "type": "object" + }, + "AttemptId": { + "description": "Strongly typed canonical identity: `AttemptId`.", + "type": "string" + }, + "AuthorizedRoot": { + "additionalProperties": false, + "description": "One exact application scope paired with its registered physical locator.\n\nThe scope remains the identity authority. The locator is retained only so\na later read or restart can reopen the exact registered root without an\nactive-graph or CWD fallback.", + "properties": { + "locator": { + "anyOf": [ + { + "$ref": "#/$defs/RegisteredRootLocatorV1" + }, + { + "type": "null" + } + ] + }, + "scope": { + "$ref": "#/$defs/ResolvedScope" + } + }, + "required": [ + "scope", + "locator" + ], + "type": "object" + }, + "AuthorizedScopeSet": { + "additionalProperties": false, + "description": "Immutable canonical set of exact roots admitted by their existing request\ncontexts. A registered locator participates only as frozen reopening\nevidence; its paired [`ResolvedScope`] remains the root identity authority.", + "properties": { + "actor_id": { + "$ref": "#/$defs/ActorId" + }, + "digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "revision": { + "$ref": "#/$defs/ScopeSetRevision" + }, + "roots": { + "items": { + "$ref": "#/$defs/AuthorizedRoot" + }, + "type": "array" + }, + "scope_set_id": { + "$ref": "#/$defs/ScopeSetId" + } + }, + "required": [ + "scope_set_id", + "revision", + "actor_id", + "roots", + "digest" + ], + "type": "object" + }, + "AuthorizedWorkProductScopeV1": { + "additionalProperties": false, + "description": "Owner identity resolved by the registered profile authority. It is never\naccepted from a Work request.", + "properties": { + "owner_brain_id": { + "$ref": "#/$defs/BrainId" + }, + "owner_profile_id": { + "$ref": "#/$defs/UserProfileId" + }, + "selection": { + "$ref": "#/$defs/WorkProductSelectionScopeV1" + } + }, + "required": [ + "owner_brain_id", + "owner_profile_id", + "selection" + ], + "type": "object" + }, + "AutomaticWorktreeGcV1": { + "oneOf": [ + { + "properties": { + "kind": { + "const": "disabled", + "type": "string" + } + }, + "required": [ + "kind" + ], + "type": "object" + }, + { + "properties": { + "kind": { + "const": "eligible_only", + "type": "string" + }, + "maximum_per_run": { + "format": "uint16", + "maximum": 65535, + "minimum": 1, + "type": "integer" + }, + "minimum_idle_seconds": { + "format": "uint64", + "minimum": 1, + "type": "integer" + } + }, + "required": [ + "kind", + "minimum_idle_seconds", + "maximum_per_run" + ], + "type": "object" + } + ] + }, + "AutomationCommittedReceiptV1": { + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "kind": { + "const": "curation", + "type": "string" + }, + "receipt": { + "$ref": "#/$defs/MemoryAutomationCurationReceiptV1" + } + }, + "required": [ + "kind", + "receipt" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "kind": { + "const": "automatic_fact", + "type": "string" + }, + "receipt": { + "$ref": "#/$defs/MemoryAutomationFactReceiptV1" + } + }, + "required": [ + "kind", + "receipt" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "kind": { + "const": "skill_writing", + "type": "string" + }, + "receipt": { + "$ref": "#/$defs/AutomationExternalEffectReceiptV1" + } + }, + "required": [ + "kind", + "receipt" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "kind": { + "const": "user_job_delivery", + "type": "string" + }, + "receipt": { + "$ref": "#/$defs/AutomationExternalEffectReceiptV1" + } + }, + "required": [ + "kind", + "receipt" + ], + "type": "object" + } + ] + }, + "AutomationExternalEffectReceiptV1": { + "additionalProperties": false, + "description": "Payload-free identity of one committed non-memory automation effect.", + "properties": { + "manifest_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "run_id": { + "$ref": "#/$defs/RunId" + }, + "task_key": { + "type": "string" + } + }, + "required": [ + "run_id", + "task_key", + "manifest_digest" + ], + "type": "object" + }, + "AutomationRunProblemV1": { + "additionalProperties": false, + "description": "Canonical admitted problem for one automation run.\n\nThe generic application receipt binds the outer operation. The ordered\nreceipts retain the exact canonical memory effects needed to reconcile a\npartial terminal without inventing an endpoint-specific payload.", + "properties": { + "committed_outer_result": { + "anyOf": [ + { + "$ref": "#/$defs/AutomationRunResultV1" + }, + { + "type": "null" + } + ] + }, + "committed_receipts": { + "items": { + "$ref": "#/$defs/AutomationCommittedReceiptV1" + }, + "type": "array" + }, + "problem": { + "$ref": "#/$defs/ApplicationProblemEnvelope" + }, + "request_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "run_id": { + "$ref": "#/$defs/RunId" + }, + "scope": { + "$ref": "#/$defs/ResolvedScope" + }, + "task": { + "$ref": "#/$defs/AutomationTaskV1" + } + }, + "required": [ + "run_id", + "task", + "request_digest", + "scope", + "problem", + "committed_receipts" + ], + "type": "object" + }, + "AutomationRunResultV1": { + "additionalProperties": false, + "description": "Durable terminal payload for one admitted automation run.\n\nAn empty receipt list is valid for completed or skipped zero-effect runs.\nPartial effects are represented only by an application problem carrying a\nnon-empty committed effect receipt.", + "properties": { + "committed_receipts": { + "items": { + "$ref": "#/$defs/AutomationCommittedReceiptV1" + }, + "type": "array" + }, + "request_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "run_id": { + "$ref": "#/$defs/RunId" + }, + "task": { + "$ref": "#/$defs/AutomationTaskV1" + }, + "terminal": { + "$ref": "#/$defs/AutomationRunTerminalV1" + } + }, + "required": [ + "run_id", + "task", + "request_digest", + "terminal", + "committed_receipts" + ], + "type": "object" + }, + "AutomationRunSummaryV1": { + "additionalProperties": false, + "properties": { + "accepted_count": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "rejected_count": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "reviewed_count": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "skipped_count": { + "format": "uint64", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "reviewed_count", + "accepted_count", + "rejected_count", + "skipped_count" + ], + "type": "object" + }, + "AutomationRunTerminalV1": { + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "status": { + "const": "completed", + "type": "string" + }, + "summary": { + "$ref": "#/$defs/AutomationRunSummaryV1" + } + }, + "required": [ + "status", + "summary" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "reason": { + "$ref": "#/$defs/AutomationSkipReasonV1" + }, + "status": { + "const": "skipped", + "type": "string" + }, + "summary": { + "$ref": "#/$defs/AutomationRunSummaryV1" + } + }, + "required": [ + "status", + "reason", + "summary" + ], + "type": "object" + } + ] + }, + "AutomationSchedulerStatusV1": { + "additionalProperties": false, + "description": "The scheduler reading served by `status`, `pause`, and `resume`.\n\nAutomation is autonomous: the status has no pending-review counters. The\nlast run record carries the validation, repair, application, quarantine,\nand deployment receipts that describe what actually happened.", + "properties": { + "configuration_revision_id": { + "type": "string" + }, + "control_path": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "last_session_activity": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "now": { + "format": "int64", + "type": "integer" + }, + "paused": { + "type": "boolean" + }, + "scheduler_tick_secs": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "status": { + "description": "`paused`, `automation_disabled`, `delegated_host`, `backend_disabled`,\nor `configured`.", + "type": "string" + }, + "tasks": { + "items": { + "$ref": "#/$defs/AutomationTaskStatusV1" + }, + "type": "array" + } + }, + "required": [ + "status", + "paused", + "enabled", + "scheduler_tick_secs", + "now", + "last_session_activity", + "configuration_revision_id", + "control_path", + "tasks" + ], + "type": "object" + }, + "AutomationSettingsPayloadV1": { + "properties": { + "availability": { + "$ref": "#/$defs/SettingsAvailabilityV1" + }, + "backend": { + "type": [ + "string", + "null" + ] + }, + "config_endpoint": { + "type": "string" + }, + "configuration_revision_id": { + "type": [ + "string", + "null" + ] + }, + "enabled": { + "type": [ + "boolean", + "null" + ] + }, + "host_mode": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "config_endpoint", + "availability" + ], + "type": "object" + }, + "AutomationSkipReasonV1": { + "enum": [ + "automation_disabled", + "memory_curator_disabled", + "session_reflector_disabled", + "skill_writer_disabled", + "combined_review_disabled", + "user_job_disabled", + "job_commands_disabled", + "delegated_host_mode", + "backend_disabled", + "scheduler_lock_active", + "task_not_schedulable", + "scheduler_schedule_invalid", + "scheduler_schedule_manual", + "scheduler_idle_window_active", + "scheduler_non_retryable_failure", + "scheduler_cooldown_active", + "scheduler_interval_not_elapsed", + "scheduler_cron_not_due", + "no_new_session_activity", + "similarity_authority_unavailable", + "partial_coverage_no_candidates", + "nothing_to_review", + "session_evidence_filter_unavailable", + "session_evidence_retrieval_unavailable", + "session_evidence_unavailable", + "session_evidence_partial", + "session_evidence_stale", + "session_evidence_denied", + "session_evidence_locked", + "session_evidence_reset_required", + "session_cursor_manifest_limit_exceeded", + "session_evidence_budget_exhausted", + "session_evidence_budget_suppressed", + "session_evidence_timed_out", + "session_evidence_cancelled", + "no_session_evidence", + "shipped_fact_proposal_history_retired" + ], + "type": "string" + }, + "AutomationTaskStatusV1": { + "properties": { + "due": { + "type": "boolean" + }, + "last_scheduler_run": { + "description": "The most recent scheduler-triggered ledger record. Its run artifacts\nremain the canonical detailed receipt surface." + }, + "skip_reason": { + "type": [ + "string", + "null" + ] + }, + "task": { + "type": "string" + } + }, + "required": [ + "task", + "due", + "skip_reason", + "last_scheduler_run" + ], + "type": "object" + }, + "AutomationTaskV1": { + "description": "Automation capability selected after one registered application admission.", + "enum": [ + "memory_curator", + "session_reflector", + "skill_writer", + "combined_review", + "user_job" + ], + "type": "string" + }, + "BrainId": { + "description": "Strongly typed canonical identity: `BrainId`.", + "type": "string" + }, + "BranchCollisionPolicyV1": { + "oneOf": [ + { + "properties": { + "kind": { + "const": "reject", + "type": "string" + } + }, + "required": [ + "kind" + ], + "type": "object" + }, + { + "properties": { + "kind": { + "const": "append_monotonic_ordinal", + "type": "string" + }, + "maximum_attempts": { + "format": "uint16", + "maximum": 65535, + "minimum": 1, + "type": "integer" + } + }, + "required": [ + "kind", + "maximum_attempts" + ], + "type": "object" + } + ] + }, + "BranchNameComponentV1": { + "oneOf": [ + { + "properties": { + "bytes": { + "format": "uint8", + "maximum": 255, + "minimum": 1, + "type": "integer" + }, + "kind": { + "const": "task_id_digest_prefix", + "type": "string" + } + }, + "required": [ + "kind", + "bytes" + ], + "type": "object" + }, + { + "properties": { + "kind": { + "const": "repository_slug", + "type": "string" + } + }, + "required": [ + "kind" + ], + "type": "object" + }, + { + "properties": { + "kind": { + "const": "work_class", + "type": "string" + } + }, + "required": [ + "kind" + ], + "type": "object" + }, + { + "properties": { + "kind": { + "const": "monotonic_collision_ordinal", + "type": "string" + } + }, + "required": [ + "kind" + ], + "type": "object" + } + ] + }, + "BranchNameSeparatorV1": { + "enum": [ + "hyphen", + "underscore", + "slash" + ], + "type": "string" + }, + "BranchNamingPolicyV1": { + "additionalProperties": false, + "properties": { + "collision": { + "$ref": "#/$defs/BranchCollisionPolicyV1" + }, + "components": { + "items": { + "$ref": "#/$defs/BranchNameComponentV1" + }, + "type": "array" + }, + "maximum_bytes": { + "format": "uint16", + "maximum": 65535, + "minimum": 1, + "type": "integer" + }, + "prefix": { + "$ref": "#/$defs/CanonicalGitRefPrefix" + }, + "separator": { + "$ref": "#/$defs/BranchNameSeparatorV1" + } + }, + "required": [ + "prefix", + "components", + "separator", + "maximum_bytes", + "collision" + ], + "type": "object" + }, + "BranchTopologyKindV1": { + "enum": [ + "no_branches", + "unbranched", + "independent_branches", + "local_stack" + ], + "type": "string" + }, + "BranchTopologyPolicyV1": { + "additionalProperties": false, + "properties": { + "allowed": { + "items": { + "$ref": "#/$defs/BranchTopologyKindV1" + }, + "type": "array", + "uniqueItems": true + } + }, + "required": [ + "allowed" + ], + "type": "object" + }, + "CallChainMeasurementV1": { + "properties": { + "complete": { + "type": "boolean" + }, + "directed": { + "type": "boolean" + }, + "edge_kind": { + "type": "string" + }, + "found": { + "type": "boolean" + }, + "from_node_id": { + "type": "string" + }, + "hop_count": { + "format": "uint", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "max_depth": { + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "selection": { + "type": "string" + }, + "steps": { + "items": { + "$ref": "#/$defs/CallChainStepV1" + }, + "type": "array" + }, + "to_node_id": { + "type": "string" + } + }, + "required": [ + "from_node_id", + "to_node_id", + "max_depth", + "directed", + "edge_kind", + "selection", + "complete", + "found", + "hop_count", + "steps" + ], + "type": "object" + }, + "CallChainStepV1": { + "properties": { + "incoming_edge": { + "anyOf": [ + { + "$ref": "#/$defs/IncomingCallEdgeV1" + }, + { + "type": "null" + } + ] + }, + "node": { + "$ref": "#/$defs/NodeRefV1" + } + }, + "required": [ + "node", + "incoming_edge" + ], + "type": "object" + }, + "CancelWorkAttemptCommand": { + "additionalProperties": false, + "properties": { + "attempt_id": { + "$ref": "#/$defs/AttemptId" + }, + "occurred_at": { + "$ref": "#/$defs/UtcMicros" + }, + "request_id": { + "$ref": "#/$defs/WorkCancellationRequestId" + }, + "run_id": { + "$ref": "#/$defs/RunId" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + } + }, + "required": [ + "task_id", + "run_id", + "attempt_id", + "request_id", + "occurred_at" + ], + "type": "object" + }, + "CancellationStage": { + "description": "Exact stage at which cancellation or deadline state was observed.", + "enum": [ + "before_admission", + "before_read", + "during_read", + "before_effect", + "effect_in_flight", + "reconciling", + "after_commit" + ], + "type": "string" + }, + "CanonicalGitRefNameV1": { + "description": "A validated full native Git ref name, such as `refs/heads/main`.", + "type": "string" + }, + "CanonicalGitRefPrefix": { + "description": "A validated ref/branch prefix. Branch naming accepts a short branch prefix\n(for example `tracedecay/`) while protected-ref selectors use full\n`refs/.../` prefixes.", + "type": "string" + }, + "CapabilityId": { + "description": "Strongly typed canonical identity: `CapabilityId`.", + "type": "string" + }, + "CatalogGenerationId": { + "description": "Strongly typed canonical identity: `CatalogGenerationId`.", + "type": "string" + }, + "CodeIndexBuildBlockedReasonV1": { + "description": "A typed reason an otherwise active generation cannot make durable progress.", + "enum": [ + "resident_memory", + "source_unavailable", + "artifact_store_unavailable", + "retry_backoff" + ], + "type": "string" + }, + "CodeIndexBuildPhaseV1": { + "description": "The durable build phase whose committed boundary the dashboard is reading.\n\nA phase is not inferred from scheduler state. The mounted registry publishes\nthe exact phase that owns the active generation.", + "enum": [ + "source_scan", + "relational_preparation", + "bulk_commit", + "index_build", + "verification", + "ready" + ], + "type": "string" + }, + "CodeIndexBuildProgressV1": { + "description": "The latest committed progress boundary for one active code-index generation.\n\nEvery count is scoped to `generation_id`. The snapshot never includes a\nstaged page: work is reported only after the batch that owns it commits.", + "properties": { + "blocked_reason": { + "anyOf": [ + { + "$ref": "#/$defs/CodeIndexBuildBlockedReasonV1" + }, + { + "type": "null" + } + ], + "description": "Reason the active generation cannot currently advance, when known." + }, + "committed_chunks": { + "description": "Search chunks committed to the artifact database.", + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "committed_imports": { + "description": "Import evidence rows committed to the artifact database.", + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "committed_pages": { + "description": "Source pages committed to the artifact database.", + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "committed_payload_bytes": { + "description": "Payload bytes committed to the artifact database.", + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "completed_files": { + "description": "Authenticated sealed-source file boundary completed by committed work.", + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "completed_lexical_bytes": { + "description": "Authenticated sealed lexical-byte boundary completed by committed work.", + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "current_batch_pages": { + "description": "Source pages in the batch currently being processed.", + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "current_batch_payload_bytes": { + "description": "Sealed payload bytes in the batch currently being processed.", + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "daemon_incarnation": { + "description": "Durable daemon-authority epoch that produced this snapshot.\n\nThis orders snapshots across daemon restarts without relying on wall\nclock time.", + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "elapsed_micros": { + "description": "Monotonic elapsed time for this process's active generation build.", + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "estimated_remaining_seconds": { + "description": "Estimated remaining build duration, absent without a truthful rate.", + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "files_per_second": { + "description": "Rolling committed-file throughput, absent until it is established.", + "format": "double", + "type": [ + "number", + "null" + ] + }, + "generation_id": { + "description": "Exact generation receiving the committed build work.", + "type": "string" + }, + "last_commit_latency_micros": { + "description": "Duration of the last committed SQLite batch, when one exists.", + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "last_progress_micros": { + "description": "Unix-epoch timestamp of the last durable progress publication.", + "format": "int64", + "type": "integer" + }, + "lexical_bytes_per_second": { + "description": "Rolling committed lexical-byte throughput, absent until it is established.", + "format": "double", + "type": [ + "number", + "null" + ] + }, + "phase": { + "$ref": "#/$defs/CodeIndexBuildPhaseV1", + "description": "Durable pipeline phase that published this snapshot." + }, + "producer_incarnation": { + "description": "Registry-minted scheduler incarnation within one daemon.\n\nA worktree retirement/remount creates a new value. `progress_epoch` is\ncomparable only when both incarnation fields match.", + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "progress_epoch": { + "description": "Monotonic publication epoch for replacing delayed progress reads.", + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "sealed_source_digest": { + "description": "Identity of the sealed source whose authenticated bounds define progress.", + "type": "string" + }, + "total_files": { + "description": "Authenticated sealed-source file bound for this generation.", + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "total_lexical_bytes": { + "description": "Authenticated sealed lexical-byte bound for this generation.", + "format": "uint64", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "generation_id", + "daemon_incarnation", + "producer_incarnation", + "progress_epoch", + "sealed_source_digest", + "phase", + "committed_pages", + "committed_chunks", + "committed_imports", + "committed_payload_bytes", + "completed_files", + "total_files", + "completed_lexical_bytes", + "total_lexical_bytes", + "current_batch_pages", + "current_batch_payload_bytes", + "elapsed_micros", + "last_commit_latency_micros", + "files_per_second", + "lexical_bytes_per_second", + "estimated_remaining_seconds", + "last_progress_micros", + "blocked_reason" + ], + "type": "object" + }, + "CodeIndexFreshnessPayloadV1": { + "properties": { + "note": { + "type": "string" + }, + "worktrees": { + "items": { + "$ref": "#/$defs/CodeIndexWorktreeFreshnessV1" + }, + "type": "array" + } + }, + "required": [ + "worktrees", + "note" + ], + "type": "object" + }, + "CodeIndexWorkerLimitingReasonV1": { + "enum": [ + "automatic_all_cores", + "automatic_half_cores", + "resident_memory", + "configured_exact", + "environment_override" + ], + "type": "string" + }, + "CodeIndexWorkerSelectionV1": { + "description": "Profile-level worker-count intent for the process-wide code-index pool.\n`Automatic` delegates the concrete count to runtime resource admission;\n`Exact` persists an operator-requested positive worker count.", + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "mode": { + "const": "automatic", + "type": "string" + } + }, + "required": [ + "mode" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "mode": { + "const": "exact", + "type": "string" + }, + "workers": { + "format": "uint16", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "mode", + "workers" + ], + "type": "object" + } + ] + }, + "CodeIndexWorkerSettingsPatch": { + "additionalProperties": false, + "description": "Dedicated profile-session worker patch. Its CAS token is never a project\nconfiguration revision, so it cannot be mixed with [`UserSettingsPatch`].", + "properties": { + "code_index_workers": { + "$ref": "#/$defs/CodeIndexWorkerSelectionV1" + }, + "expected_revision_id": { + "type": "string" + }, + "idempotency_key": { + "type": "string" + } + }, + "required": [ + "expected_revision_id", + "idempotency_key", + "code_index_workers" + ], + "type": "object" + }, + "CodeIndexWorkerStatusV1": { + "additionalProperties": false, + "properties": { + "available_logical_cpus": { + "format": "uint16", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "configured": { + "$ref": "#/$defs/CodeIndexWorkerSelectionV1" + }, + "effective_workers": { + "format": "uint16", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "environment_override_workers": { + "format": "uint16", + "maximum": 65535, + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "limiting_reason": { + "$ref": "#/$defs/CodeIndexWorkerLimitingReasonV1" + }, + "memory_safe_workers": { + "format": "uint16", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "configured", + "environment_override_workers", + "effective_workers", + "available_logical_cpus", + "memory_safe_workers", + "limiting_reason" + ], + "type": "object" + }, + "CodeIndexWorktreeFreshnessV1": { + "description": "Freshness/generation state for one mounted worktree.\n\n`Deserialize` is part of the wire contract: the CLI status command decodes\nexactly this type back out of the daemon's `tracedecay_status` response,\nkeeping one authority for the freshness shape.", + "properties": { + "coverage": { + "description": "Whether this read covers the complete mounted scheduler state.", + "type": "string" + }, + "hook_hint_count": { + "description": "Pending hook-hint count, when cheaply available.", + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "last_reconcile_micros": { + "description": "Last reconcile observation time (microseconds since the Unix epoch).", + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "latest_generation_id": { + "description": "Latest sealed generation identity, when a complete generation exists.", + "type": [ + "string", + "null" + ] + }, + "progress": { + "anyOf": [ + { + "$ref": "#/$defs/CodeIndexBuildProgressV1" + }, + { + "type": "null" + } + ], + "description": "Latest committed progress for the active generation, if one is mounted." + }, + "repository_id": { + "description": "Stable repository identity resolved by the scheduler.", + "type": [ + "string", + "null" + ] + }, + "sealed_at_micros": { + "description": "Time the complete generation was durably sealed.", + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "snapshot_content_identity": { + "description": "Content identity of the complete source snapshot.", + "type": [ + "string", + "null" + ] + }, + "source_reference": { + "description": "Exact source reference captured by the sealed generation.", + "type": [ + "string", + "null" + ] + }, + "source_revision": { + "description": "Exact source revision captured by the sealed generation.", + "type": [ + "string", + "null" + ] + }, + "staleness_state": { + "description": "Staleness-ladder state from the last scheduler execution. `fresh` means\nthe scheduler most recently observed a fresh source; the status read\ndoes not probe the worktree to revalidate that observation.", + "type": [ + "string", + "null" + ] + }, + "worktree_id": { + "description": "Stable worktree identity resolved by the scheduler.", + "type": [ + "string", + "null" + ] + }, + "worktree_root": { + "description": "Display path of the mounted worktree root.", + "type": "string" + } + }, + "required": [ + "worktree_root", + "repository_id", + "worktree_id", + "source_reference", + "source_revision", + "latest_generation_id", + "snapshot_content_identity", + "sealed_at_micros", + "last_reconcile_micros", + "staleness_state", + "hook_hint_count", + "coverage", + "progress" + ], + "type": "object" + }, + "CommitId": { + "description": "Strongly typed canonical identity: `CommitId`.", + "type": "string" + }, + "ComparisonDispositionV1": { + "enum": [ + "promote", + "reject", + "insufficient_evidence" + ], + "type": "string" + }, + "ComponentVersion": { + "description": "Strongly typed canonical identity: `ComponentVersion`.", + "type": "string" + }, + "ConfigurationRevisionId": { + "description": "Strongly typed canonical identity: `ConfigurationRevisionId`.", + "type": "string" + }, + "ConfigurationSnapshotId": { + "description": "Strongly typed canonical identity: `ConfigurationSnapshotId`.", + "type": "string" + }, + "CostsReadModelV1": { + "properties": { + "authorized_scope_ref": { + "type": "string" + }, + "current": { + "type": "boolean" + }, + "estimated_cost": { + "items": { + "$ref": "#/$defs/MetricValueV1" + }, + "type": "array" + }, + "horizon": { + "$ref": "#/$defs/ObservabilityHorizonV1" + }, + "latency": { + "description": "Provider-backed operation latency, projected from the same retained\nPlan 26 operation-resource events as Observatory. Each entry keeps\nprovider/model identity explicit; `None` is a real uncorrelated state,\nnever a client-side guess.", + "items": { + "$ref": "#/$defs/ProviderLatencyReadModelV1" + }, + "type": "array" + }, + "observed_at_micros": { + "format": "int64", + "type": "integer" + }, + "pricing_revision": { + "type": [ + "string", + "null" + ] + }, + "usage": { + "items": { + "$ref": "#/$defs/MetricValueV1" + }, + "type": "array" + }, + "watermark": { + "type": "string" + } + }, + "required": [ + "authorized_scope_ref", + "horizon", + "watermark", + "observed_at_micros", + "current", + "usage", + "estimated_cost", + "latency", + "pricing_revision" + ], + "type": "object" + }, + "CoverageCompleteness": { + "description": "Completeness is explicit; unknown never renders as clean.", + "enum": [ + "complete", + "partial", + "unknown" + ], + "type": "string" + }, + "CoverageDomainState": { + "additionalProperties": false, + "properties": { + "completeness": { + "$ref": "#/$defs/CoverageCompleteness" + }, + "domain": { + "$ref": "#/$defs/EvidenceDomain" + } + }, + "required": [ + "domain", + "completeness" + ], + "type": "object" + }, + "CoverageStateV1": { + "enum": [ + "known", + "partial", + "stale", + "unknown", + "sampled", + "capped" + ], + "type": "string" + }, + "CoveringTestV1": { + "properties": { + "file_path": { + "type": "string" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "qualification": { + "type": "string" + }, + "start_line": { + "format": "uint32", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "id", + "name", + "file_path", + "start_line", + "qualification" + ], + "type": "object" + }, + "CreateWorkProductRequestV1": { + "additionalProperties": false, + "properties": { + "initial_graph": { + "$ref": "#/$defs/WorkProductGraphV1" + }, + "mutation": { + "$ref": "#/$defs/WorkProductMutationIdentityV1" + }, + "selection": { + "$ref": "#/$defs/WorkProductSelectionScopeV1" + } + }, + "required": [ + "selection", + "initial_graph", + "mutation" + ], + "type": "object" + }, + "CreateWorkTaskRequestV1": { + "additionalProperties": false, + "properties": { + "initiative": { + "$ref": "#/$defs/WorkInitiativeV1" + }, + "item": { + "$ref": "#/$defs/WorkItemV1" + }, + "milestone": { + "$ref": "#/$defs/WorkMilestoneV1" + }, + "mutation": { + "$ref": "#/$defs/WorkProductMutationIdentityV1" + }, + "plan": { + "$ref": "#/$defs/WorkPlanV1" + }, + "selection": { + "$ref": "#/$defs/WorkProductSelectionScopeV1" + } + }, + "required": [ + "selection", + "initiative", + "plan", + "milestone", + "item", + "mutation" + ], + "type": "object" + }, + "CredentialReferenceId": { + "description": "Strongly typed canonical identity: `CredentialReferenceId`.", + "type": "string" + }, + "CrossMergeModeV1": { + "enum": [ + "disabled", + "manual_receipt_only", + "fast_forward_only", + "merge_commit", + "cherry_pick_exact_commits" + ], + "type": "string" + }, + "CrossMergePolicyV1": { + "additionalProperties": false, + "properties": { + "allow_cross_repository": { + "type": "boolean" + }, + "allowed_modes": { + "items": { + "$ref": "#/$defs/CrossMergeModeV1" + }, + "type": "array", + "uniqueItems": true + }, + "default_mode": { + "$ref": "#/$defs/CrossMergeModeV1" + } + }, + "required": [ + "allowed_modes", + "default_mode", + "allow_cross_repository" + ], + "type": "object" + }, + "DashboardAuthorizationV1": { + "description": "Authorization outcome for the read. On the loopback single-user dashboard a\nlegal local read is [`Self::Authorized`]; the other variants are retained so\nthe contract can express `unauthorized` (identity absent/expired), `denied`\n(known identity lacks permission), and `redacted` reads without a schema\nchange.", + "oneOf": [ + { + "properties": { + "outcome": { + "const": "authorized", + "type": "string" + } + }, + "required": [ + "outcome" + ], + "type": "object" + }, + { + "properties": { + "outcome": { + "const": "unauthorized", + "type": "string" + } + }, + "required": [ + "outcome" + ], + "type": "object" + }, + { + "properties": { + "outcome": { + "const": "denied", + "type": "string" + } + }, + "required": [ + "outcome" + ], + "type": "object" + }, + { + "properties": { + "outcome": { + "const": "redacted", + "type": "string" + } + }, + "required": [ + "outcome" + ], + "type": "object" + } + ] + }, + "DashboardCoverageCompletenessV1": { + "description": "Coverage completeness axis. `Unsupported` distinguishes \"the source that\nwould establish coverage is not wired\" from `Unknown` (\"coverage could not\nbe determined\").", + "enum": [ + "complete", + "partial", + "unknown", + "unsupported" + ], + "type": "string" + }, + "DashboardCoverageV1": { + "description": "Coverage statement. Counts are optional; an unknown denominator is `None`,\nnever a fabricated `0`/`100%`. The completeness axis is authoritative — the\nfrontend never derives `complete` from a `matched == eligible` coincidence.", + "properties": { + "completeness": { + "$ref": "#/$defs/DashboardCoverageCompletenessV1" + }, + "denominator": { + "description": "Denominator for a percentage. `None` means the denominator is unknown, so\nthe frontend must not render a meter or a percentage.", + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "eligible": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "examined": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "excluded": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "matched": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "omission_reasons": { + "items": { + "type": "string" + }, + "type": "array" + }, + "omitted": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "unit": { + "type": [ + "string", + "null" + ] + }, + "unknown": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "completeness", + "eligible", + "examined", + "matched", + "excluded", + "omitted", + "unknown", + "denominator", + "unit", + "omission_reasons" + ], + "type": "object" + }, + "DashboardDomainStateV1": { + "description": "The normative dashboard domain-state union.\n\nThe first sixteen variants are the plan's exact `DashboardDomainState`\ndiscriminated union. [`Self::Unsupported`] is the backend-gap binding\nstate: the read model's HTTP surface exists, but its live producer/source is\nnot yet wired server-side. It is never healthy or empty — the frontend\nrenders a distinct \"not yet available\" state — and it is deliberately\nseparate from [`Self::UnsupportedSchema`] (an undecodable schema/variant).", + "oneOf": [ + { + "enum": [ + "loading", + "complete_zero_findings", + "ready", + "partial", + "stale", + "locked", + "denied", + "unauthorized", + "redacted", + "conflicting", + "offline", + "unknown", + "cancelled", + "timed_out", + "error", + "unsupported_schema" + ], + "type": "string" + }, + { + "const": "unsupported", + "description": "The read model exists but its live producer/source is not yet wired\nserver-side (plan §\"Known backend gaps\"). Distinct from every \"healthy\"\nor \"empty\" state.", + "type": "string" + } + ] + }, + "DashboardEnvelopeV1": { + "description": "The normative read-model envelope. Every V2 read-model route returns exactly\nthis shape; only `payload` varies by route.", + "properties": { + "authorization": { + "$ref": "#/$defs/DashboardAuthorizationV1" + }, + "coverage": { + "$ref": "#/$defs/DashboardCoverageV1" + }, + "domain_state": { + "$ref": "#/$defs/DashboardDomainStateV1" + }, + "freshness": { + "$ref": "#/$defs/DashboardFreshnessV1" + }, + "legal_actions": { + "items": { + "$ref": "#/$defs/DashboardLegalActionRefV1" + }, + "type": "array" + }, + "payload": { + "$ref": "#/$defs/DashboardPayloadMarkerV1" + }, + "schema_revision": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "scope": { + "$ref": "#/$defs/DashboardScopeV1" + }, + "source_watermark": { + "anyOf": [ + { + "$ref": "#/$defs/DashboardWatermarkV1" + }, + { + "type": "null" + } + ] + }, + "time": { + "$ref": "#/$defs/DashboardTimeV1" + }, + "version": { + "$ref": "#/$defs/DashboardVersionV1" + } + }, + "required": [ + "schema_revision", + "scope", + "version", + "time", + "source_watermark", + "authorization", + "coverage", + "freshness", + "domain_state", + "legal_actions", + "payload" + ], + "type": "object" + }, + "DashboardEnvelopeV110": { + "description": "The normative read-model envelope. Every V2 read-model route returns exactly\nthis shape; only `payload` varies by route.", + "properties": { + "authorization": { + "$ref": "#/$defs/DashboardAuthorizationV1" + }, + "coverage": { + "$ref": "#/$defs/DashboardCoverageV1" + }, + "domain_state": { + "$ref": "#/$defs/DashboardDomainStateV1" + }, + "freshness": { + "$ref": "#/$defs/DashboardFreshnessV1" + }, + "legal_actions": { + "items": { + "$ref": "#/$defs/DashboardLegalActionRefV1" + }, + "type": "array" + }, + "payload": { + "anyOf": [ + { + "$ref": "#/$defs/GraphSubgraphPayloadV1" + }, + { + "type": "null" + } + ] + }, + "schema_revision": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "scope": { + "$ref": "#/$defs/DashboardScopeV1" + }, + "source_watermark": { + "anyOf": [ + { + "$ref": "#/$defs/DashboardWatermarkV1" + }, + { + "type": "null" + } + ] + }, + "time": { + "$ref": "#/$defs/DashboardTimeV1" + }, + "version": { + "$ref": "#/$defs/DashboardVersionV1" + } + }, + "required": [ + "schema_revision", + "scope", + "version", + "time", + "source_watermark", + "authorization", + "coverage", + "freshness", + "domain_state", + "legal_actions", + "payload" + ], + "type": "object" + }, + "DashboardEnvelopeV111": { + "description": "The normative read-model envelope. Every V2 read-model route returns exactly\nthis shape; only `payload` varies by route.", + "properties": { + "authorization": { + "$ref": "#/$defs/DashboardAuthorizationV1" + }, + "coverage": { + "$ref": "#/$defs/DashboardCoverageV1" + }, + "domain_state": { + "$ref": "#/$defs/DashboardDomainStateV1" + }, + "freshness": { + "$ref": "#/$defs/DashboardFreshnessV1" + }, + "legal_actions": { + "items": { + "$ref": "#/$defs/DashboardLegalActionRefV1" + }, + "type": "array" + }, + "payload": { + "anyOf": [ + { + "$ref": "#/$defs/GraphPathPayloadV1" + }, + { + "type": "null" + } + ] + }, + "schema_revision": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "scope": { + "$ref": "#/$defs/DashboardScopeV1" + }, + "source_watermark": { + "anyOf": [ + { + "$ref": "#/$defs/DashboardWatermarkV1" + }, + { + "type": "null" + } + ] + }, + "time": { + "$ref": "#/$defs/DashboardTimeV1" + }, + "version": { + "$ref": "#/$defs/DashboardVersionV1" + } + }, + "required": [ + "schema_revision", + "scope", + "version", + "time", + "source_watermark", + "authorization", + "coverage", + "freshness", + "domain_state", + "legal_actions", + "payload" + ], + "type": "object" + }, + "DashboardEnvelopeV112": { + "description": "The normative read-model envelope. Every V2 read-model route returns exactly\nthis shape; only `payload` varies by route.", + "properties": { + "authorization": { + "$ref": "#/$defs/DashboardAuthorizationV1" + }, + "coverage": { + "$ref": "#/$defs/DashboardCoverageV1" + }, + "domain_state": { + "$ref": "#/$defs/DashboardDomainStateV1" + }, + "freshness": { + "$ref": "#/$defs/DashboardFreshnessV1" + }, + "legal_actions": { + "items": { + "$ref": "#/$defs/DashboardLegalActionRefV1" + }, + "type": "array" + }, + "payload": { + "anyOf": [ + { + "$ref": "#/$defs/MemoryOverviewPayloadV1" + }, + { + "type": "null" + } + ] + }, + "schema_revision": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "scope": { + "$ref": "#/$defs/DashboardScopeV1" + }, + "source_watermark": { + "anyOf": [ + { + "$ref": "#/$defs/DashboardWatermarkV1" + }, + { + "type": "null" + } + ] + }, + "time": { + "$ref": "#/$defs/DashboardTimeV1" + }, + "version": { + "$ref": "#/$defs/DashboardVersionV1" + } + }, + "required": [ + "schema_revision", + "scope", + "version", + "time", + "source_watermark", + "authorization", + "coverage", + "freshness", + "domain_state", + "legal_actions", + "payload" + ], + "type": "object" + }, + "DashboardEnvelopeV113": { + "description": "The normative read-model envelope. Every V2 read-model route returns exactly\nthis shape; only `payload` varies by route.", + "properties": { + "authorization": { + "$ref": "#/$defs/DashboardAuthorizationV1" + }, + "coverage": { + "$ref": "#/$defs/DashboardCoverageV1" + }, + "domain_state": { + "$ref": "#/$defs/DashboardDomainStateV1" + }, + "freshness": { + "$ref": "#/$defs/DashboardFreshnessV1" + }, + "legal_actions": { + "items": { + "$ref": "#/$defs/DashboardLegalActionRefV1" + }, + "type": "array" + }, + "payload": { + "anyOf": [ + { + "$ref": "#/$defs/MemoryStatusPayloadV1" + }, + { + "type": "null" + } + ] + }, + "schema_revision": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "scope": { + "$ref": "#/$defs/DashboardScopeV1" + }, + "source_watermark": { + "anyOf": [ + { + "$ref": "#/$defs/DashboardWatermarkV1" + }, + { + "type": "null" + } + ] + }, + "time": { + "$ref": "#/$defs/DashboardTimeV1" + }, + "version": { + "$ref": "#/$defs/DashboardVersionV1" + } + }, + "required": [ + "schema_revision", + "scope", + "version", + "time", + "source_watermark", + "authorization", + "coverage", + "freshness", + "domain_state", + "legal_actions", + "payload" + ], + "type": "object" + }, + "DashboardEnvelopeV114": { + "description": "The normative read-model envelope. Every V2 read-model route returns exactly\nthis shape; only `payload` varies by route.", + "properties": { + "authorization": { + "$ref": "#/$defs/DashboardAuthorizationV1" + }, + "coverage": { + "$ref": "#/$defs/DashboardCoverageV1" + }, + "domain_state": { + "$ref": "#/$defs/DashboardDomainStateV1" + }, + "freshness": { + "$ref": "#/$defs/DashboardFreshnessV1" + }, + "legal_actions": { + "items": { + "$ref": "#/$defs/DashboardLegalActionRefV1" + }, + "type": "array" + }, + "payload": { + "anyOf": [ + { + "$ref": "#/$defs/MemoryFactDetailPayloadV1" + }, + { + "type": "null" + } + ] + }, + "schema_revision": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "scope": { + "$ref": "#/$defs/DashboardScopeV1" + }, + "source_watermark": { + "anyOf": [ + { + "$ref": "#/$defs/DashboardWatermarkV1" + }, + { + "type": "null" + } + ] + }, + "time": { + "$ref": "#/$defs/DashboardTimeV1" + }, + "version": { + "$ref": "#/$defs/DashboardVersionV1" + } + }, + "required": [ + "schema_revision", + "scope", + "version", + "time", + "source_watermark", + "authorization", + "coverage", + "freshness", + "domain_state", + "legal_actions", + "payload" + ], + "type": "object" + }, + "DashboardEnvelopeV115": { + "description": "The normative read-model envelope. Every V2 read-model route returns exactly\nthis shape; only `payload` varies by route.", + "properties": { + "authorization": { + "$ref": "#/$defs/DashboardAuthorizationV1" + }, + "coverage": { + "$ref": "#/$defs/DashboardCoverageV1" + }, + "domain_state": { + "$ref": "#/$defs/DashboardDomainStateV1" + }, + "freshness": { + "$ref": "#/$defs/DashboardFreshnessV1" + }, + "legal_actions": { + "items": { + "$ref": "#/$defs/DashboardLegalActionRefV1" + }, + "type": "array" + }, + "payload": { + "anyOf": [ + { + "$ref": "#/$defs/AnalyticsOverviewPayloadV1" + }, + { + "type": "null" + } + ] + }, + "schema_revision": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "scope": { + "$ref": "#/$defs/DashboardScopeV1" + }, + "source_watermark": { + "anyOf": [ + { + "$ref": "#/$defs/DashboardWatermarkV1" + }, + { + "type": "null" + } + ] + }, + "time": { + "$ref": "#/$defs/DashboardTimeV1" + }, + "version": { + "$ref": "#/$defs/DashboardVersionV1" + } + }, + "required": [ + "schema_revision", + "scope", + "version", + "time", + "source_watermark", + "authorization", + "coverage", + "freshness", + "domain_state", + "legal_actions", + "payload" + ], + "type": "object" + }, + "DashboardEnvelopeV116": { + "description": "The normative read-model envelope. Every V2 read-model route returns exactly\nthis shape; only `payload` varies by route.", + "properties": { + "authorization": { + "$ref": "#/$defs/DashboardAuthorizationV1" + }, + "coverage": { + "$ref": "#/$defs/DashboardCoverageV1" + }, + "domain_state": { + "$ref": "#/$defs/DashboardDomainStateV1" + }, + "freshness": { + "$ref": "#/$defs/DashboardFreshnessV1" + }, + "legal_actions": { + "items": { + "$ref": "#/$defs/DashboardLegalActionRefV1" + }, + "type": "array" + }, + "payload": { + "anyOf": [ + { + "$ref": "#/$defs/AnalyticsUsageSummaryV1" + }, + { + "type": "null" + } + ] + }, + "schema_revision": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "scope": { + "$ref": "#/$defs/DashboardScopeV1" + }, + "source_watermark": { + "anyOf": [ + { + "$ref": "#/$defs/DashboardWatermarkV1" + }, + { + "type": "null" + } + ] + }, + "time": { + "$ref": "#/$defs/DashboardTimeV1" + }, + "version": { + "$ref": "#/$defs/DashboardVersionV1" + } + }, + "required": [ + "schema_revision", + "scope", + "version", + "time", + "source_watermark", + "authorization", + "coverage", + "freshness", + "domain_state", + "legal_actions", + "payload" + ], + "type": "object" + }, + "DashboardEnvelopeV117": { + "description": "The normative read-model envelope. Every V2 read-model route returns exactly\nthis shape; only `payload` varies by route.", + "properties": { + "authorization": { + "$ref": "#/$defs/DashboardAuthorizationV1" + }, + "coverage": { + "$ref": "#/$defs/DashboardCoverageV1" + }, + "domain_state": { + "$ref": "#/$defs/DashboardDomainStateV1" + }, + "freshness": { + "$ref": "#/$defs/DashboardFreshnessV1" + }, + "legal_actions": { + "items": { + "$ref": "#/$defs/DashboardLegalActionRefV1" + }, + "type": "array" + }, + "payload": { + "anyOf": [ + { + "$ref": "#/$defs/AnalyticsAgentsPayloadV1" + }, + { + "type": "null" + } + ] + }, + "schema_revision": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "scope": { + "$ref": "#/$defs/DashboardScopeV1" + }, + "source_watermark": { + "anyOf": [ + { + "$ref": "#/$defs/DashboardWatermarkV1" + }, + { + "type": "null" + } + ] + }, + "time": { + "$ref": "#/$defs/DashboardTimeV1" + }, + "version": { + "$ref": "#/$defs/DashboardVersionV1" + } + }, + "required": [ + "schema_revision", + "scope", + "version", + "time", + "source_watermark", + "authorization", + "coverage", + "freshness", + "domain_state", + "legal_actions", + "payload" + ], + "type": "object" + }, + "DashboardEnvelopeV118": { + "description": "The normative read-model envelope. Every V2 read-model route returns exactly\nthis shape; only `payload` varies by route.", + "properties": { + "authorization": { + "$ref": "#/$defs/DashboardAuthorizationV1" + }, + "coverage": { + "$ref": "#/$defs/DashboardCoverageV1" + }, + "domain_state": { + "$ref": "#/$defs/DashboardDomainStateV1" + }, + "freshness": { + "$ref": "#/$defs/DashboardFreshnessV1" + }, + "legal_actions": { + "items": { + "$ref": "#/$defs/DashboardLegalActionRefV1" + }, + "type": "array" + }, + "payload": { + "anyOf": [ + { + "$ref": "#/$defs/AnalyticsSubagentTreePayloadV1" + }, + { + "type": "null" + } + ] + }, + "schema_revision": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "scope": { + "$ref": "#/$defs/DashboardScopeV1" + }, + "source_watermark": { + "anyOf": [ + { + "$ref": "#/$defs/DashboardWatermarkV1" + }, + { + "type": "null" + } + ] + }, + "time": { + "$ref": "#/$defs/DashboardTimeV1" + }, + "version": { + "$ref": "#/$defs/DashboardVersionV1" + } + }, + "required": [ + "schema_revision", + "scope", + "version", + "time", + "source_watermark", + "authorization", + "coverage", + "freshness", + "domain_state", + "legal_actions", + "payload" + ], + "type": "object" + }, + "DashboardEnvelopeV119": { + "description": "The normative read-model envelope. Every V2 read-model route returns exactly\nthis shape; only `payload` varies by route.", + "properties": { + "authorization": { + "$ref": "#/$defs/DashboardAuthorizationV1" + }, + "coverage": { + "$ref": "#/$defs/DashboardCoverageV1" + }, + "domain_state": { + "$ref": "#/$defs/DashboardDomainStateV1" + }, + "freshness": { + "$ref": "#/$defs/DashboardFreshnessV1" + }, + "legal_actions": { + "items": { + "$ref": "#/$defs/DashboardLegalActionRefV1" + }, + "type": "array" + }, + "payload": { + "anyOf": [ + { + "$ref": "#/$defs/AnalyticsHintsPayloadV1" + }, + { + "type": "null" + } + ] + }, + "schema_revision": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "scope": { + "$ref": "#/$defs/DashboardScopeV1" + }, + "source_watermark": { + "anyOf": [ + { + "$ref": "#/$defs/DashboardWatermarkV1" + }, + { + "type": "null" + } + ] + }, + "time": { + "$ref": "#/$defs/DashboardTimeV1" + }, + "version": { + "$ref": "#/$defs/DashboardVersionV1" + } + }, + "required": [ + "schema_revision", + "scope", + "version", + "time", + "source_watermark", + "authorization", + "coverage", + "freshness", + "domain_state", + "legal_actions", + "payload" + ], + "type": "object" + }, + "DashboardEnvelopeV12": { + "description": "The normative read-model envelope. Every V2 read-model route returns exactly\nthis shape; only `payload` varies by route.", + "properties": { + "authorization": { + "$ref": "#/$defs/DashboardAuthorizationV1" + }, + "coverage": { + "$ref": "#/$defs/DashboardCoverageV1" + }, + "domain_state": { + "$ref": "#/$defs/DashboardDomainStateV1" + }, + "freshness": { + "$ref": "#/$defs/DashboardFreshnessV1" + }, + "legal_actions": { + "items": { + "$ref": "#/$defs/DashboardLegalActionRefV1" + }, + "type": "array" + }, + "payload": { + "anyOf": [ + { + "$ref": "#/$defs/ExplorerSessionSizeV1" + }, + { + "type": "null" + } + ] + }, + "schema_revision": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "scope": { + "$ref": "#/$defs/DashboardScopeV1" + }, + "source_watermark": { + "anyOf": [ + { + "$ref": "#/$defs/DashboardWatermarkV1" + }, + { + "type": "null" + } + ] + }, + "time": { + "$ref": "#/$defs/DashboardTimeV1" + }, + "version": { + "$ref": "#/$defs/DashboardVersionV1" + } + }, + "required": [ + "schema_revision", + "scope", + "version", + "time", + "source_watermark", + "authorization", + "coverage", + "freshness", + "domain_state", + "legal_actions", + "payload" + ], + "type": "object" + }, + "DashboardEnvelopeV120": { + "description": "The normative read-model envelope. Every V2 read-model route returns exactly\nthis shape; only `payload` varies by route.", + "properties": { + "authorization": { + "$ref": "#/$defs/DashboardAuthorizationV1" + }, + "coverage": { + "$ref": "#/$defs/DashboardCoverageV1" + }, + "domain_state": { + "$ref": "#/$defs/DashboardDomainStateV1" + }, + "freshness": { + "$ref": "#/$defs/DashboardFreshnessV1" + }, + "legal_actions": { + "items": { + "$ref": "#/$defs/DashboardLegalActionRefV1" + }, + "type": "array" + }, + "payload": { + "anyOf": [ + { + "$ref": "#/$defs/AnalyticsUnderusedPayloadV1" + }, + { + "type": "null" + } + ] + }, + "schema_revision": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "scope": { + "$ref": "#/$defs/DashboardScopeV1" + }, + "source_watermark": { + "anyOf": [ + { + "$ref": "#/$defs/DashboardWatermarkV1" + }, + { + "type": "null" + } + ] + }, + "time": { + "$ref": "#/$defs/DashboardTimeV1" + }, + "version": { + "$ref": "#/$defs/DashboardVersionV1" + } + }, + "required": [ + "schema_revision", + "scope", + "version", + "time", + "source_watermark", + "authorization", + "coverage", + "freshness", + "domain_state", + "legal_actions", + "payload" + ], + "type": "object" + }, + "DashboardEnvelopeV121": { + "description": "The normative read-model envelope. Every V2 read-model route returns exactly\nthis shape; only `payload` varies by route.", + "properties": { + "authorization": { + "$ref": "#/$defs/DashboardAuthorizationV1" + }, + "coverage": { + "$ref": "#/$defs/DashboardCoverageV1" + }, + "domain_state": { + "$ref": "#/$defs/DashboardDomainStateV1" + }, + "freshness": { + "$ref": "#/$defs/DashboardFreshnessV1" + }, + "legal_actions": { + "items": { + "$ref": "#/$defs/DashboardLegalActionRefV1" + }, + "type": "array" + }, + "payload": { + "anyOf": [ + { + "$ref": "#/$defs/AnalyticsDiagnosticsPayloadV1" + }, + { + "type": "null" + } + ] + }, + "schema_revision": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "scope": { + "$ref": "#/$defs/DashboardScopeV1" + }, + "source_watermark": { + "anyOf": [ + { + "$ref": "#/$defs/DashboardWatermarkV1" + }, + { + "type": "null" + } + ] + }, + "time": { + "$ref": "#/$defs/DashboardTimeV1" + }, + "version": { + "$ref": "#/$defs/DashboardVersionV1" + } + }, + "required": [ + "schema_revision", + "scope", + "version", + "time", + "source_watermark", + "authorization", + "coverage", + "freshness", + "domain_state", + "legal_actions", + "payload" + ], + "type": "object" + }, + "DashboardEnvelopeV122": { + "description": "The normative read-model envelope. Every V2 read-model route returns exactly\nthis shape; only `payload` varies by route.", + "properties": { + "authorization": { + "$ref": "#/$defs/DashboardAuthorizationV1" + }, + "coverage": { + "$ref": "#/$defs/DashboardCoverageV1" + }, + "domain_state": { + "$ref": "#/$defs/DashboardDomainStateV1" + }, + "freshness": { + "$ref": "#/$defs/DashboardFreshnessV1" + }, + "legal_actions": { + "items": { + "$ref": "#/$defs/DashboardLegalActionRefV1" + }, + "type": "array" + }, + "payload": { + "anyOf": [ + { + "$ref": "#/$defs/SavingsOverviewPayloadV1" + }, + { + "type": "null" + } + ] + }, + "schema_revision": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "scope": { + "$ref": "#/$defs/DashboardScopeV1" + }, + "source_watermark": { + "anyOf": [ + { + "$ref": "#/$defs/DashboardWatermarkV1" + }, + { + "type": "null" + } + ] + }, + "time": { + "$ref": "#/$defs/DashboardTimeV1" + }, + "version": { + "$ref": "#/$defs/DashboardVersionV1" + } + }, + "required": [ + "schema_revision", + "scope", + "version", + "time", + "source_watermark", + "authorization", + "coverage", + "freshness", + "domain_state", + "legal_actions", + "payload" + ], + "type": "object" + }, + "DashboardEnvelopeV123": { + "description": "The normative read-model envelope. Every V2 read-model route returns exactly\nthis shape; only `payload` varies by route.", + "properties": { + "authorization": { + "$ref": "#/$defs/DashboardAuthorizationV1" + }, + "coverage": { + "$ref": "#/$defs/DashboardCoverageV1" + }, + "domain_state": { + "$ref": "#/$defs/DashboardDomainStateV1" + }, + "freshness": { + "$ref": "#/$defs/DashboardFreshnessV1" + }, + "legal_actions": { + "items": { + "$ref": "#/$defs/DashboardLegalActionRefV1" + }, + "type": "array" + }, + "payload": { + "anyOf": [ + { + "$ref": "#/$defs/LcmSessionPayloadV1" + }, + { + "type": "null" + } + ] + }, + "schema_revision": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "scope": { + "$ref": "#/$defs/DashboardScopeV1" + }, + "source_watermark": { + "anyOf": [ + { + "$ref": "#/$defs/DashboardWatermarkV1" + }, + { + "type": "null" + } + ] + }, + "time": { + "$ref": "#/$defs/DashboardTimeV1" + }, + "version": { + "$ref": "#/$defs/DashboardVersionV1" + } + }, + "required": [ + "schema_revision", + "scope", + "version", + "time", + "source_watermark", + "authorization", + "coverage", + "freshness", + "domain_state", + "legal_actions", + "payload" + ], + "type": "object" + }, + "DashboardEnvelopeV124": { + "description": "The normative read-model envelope. Every V2 read-model route returns exactly\nthis shape; only `payload` varies by route.", + "properties": { + "authorization": { + "$ref": "#/$defs/DashboardAuthorizationV1" + }, + "coverage": { + "$ref": "#/$defs/DashboardCoverageV1" + }, + "domain_state": { + "$ref": "#/$defs/DashboardDomainStateV1" + }, + "freshness": { + "$ref": "#/$defs/DashboardFreshnessV1" + }, + "legal_actions": { + "items": { + "$ref": "#/$defs/DashboardLegalActionRefV1" + }, + "type": "array" + }, + "payload": { + "anyOf": [ + { + "$ref": "#/$defs/LcmTimelinePayloadV1" + }, + { + "type": "null" + } + ] + }, + "schema_revision": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "scope": { + "$ref": "#/$defs/DashboardScopeV1" + }, + "source_watermark": { + "anyOf": [ + { + "$ref": "#/$defs/DashboardWatermarkV1" + }, + { + "type": "null" + } + ] + }, + "time": { + "$ref": "#/$defs/DashboardTimeV1" + }, + "version": { + "$ref": "#/$defs/DashboardVersionV1" + } + }, + "required": [ + "schema_revision", + "scope", + "version", + "time", + "source_watermark", + "authorization", + "coverage", + "freshness", + "domain_state", + "legal_actions", + "payload" + ], + "type": "object" + }, + "DashboardEnvelopeV125": { + "description": "The normative read-model envelope. Every V2 read-model route returns exactly\nthis shape; only `payload` varies by route.", + "properties": { + "authorization": { + "$ref": "#/$defs/DashboardAuthorizationV1" + }, + "coverage": { + "$ref": "#/$defs/DashboardCoverageV1" + }, + "domain_state": { + "$ref": "#/$defs/DashboardDomainStateV1" + }, + "freshness": { + "$ref": "#/$defs/DashboardFreshnessV1" + }, + "legal_actions": { + "items": { + "$ref": "#/$defs/DashboardLegalActionRefV1" + }, + "type": "array" + }, + "payload": { + "anyOf": [ + { + "$ref": "#/$defs/LcmOverviewPayloadV1" + }, + { + "type": "null" + } + ] + }, + "schema_revision": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "scope": { + "$ref": "#/$defs/DashboardScopeV1" + }, + "source_watermark": { + "anyOf": [ + { + "$ref": "#/$defs/DashboardWatermarkV1" + }, + { + "type": "null" + } + ] + }, + "time": { + "$ref": "#/$defs/DashboardTimeV1" + }, + "version": { + "$ref": "#/$defs/DashboardVersionV1" + } + }, + "required": [ + "schema_revision", + "scope", + "version", + "time", + "source_watermark", + "authorization", + "coverage", + "freshness", + "domain_state", + "legal_actions", + "payload" + ], + "type": "object" + }, + "DashboardEnvelopeV126": { + "description": "The normative read-model envelope. Every V2 read-model route returns exactly\nthis shape; only `payload` varies by route.", + "properties": { + "authorization": { + "$ref": "#/$defs/DashboardAuthorizationV1" + }, + "coverage": { + "$ref": "#/$defs/DashboardCoverageV1" + }, + "domain_state": { + "$ref": "#/$defs/DashboardDomainStateV1" + }, + "freshness": { + "$ref": "#/$defs/DashboardFreshnessV1" + }, + "legal_actions": { + "items": { + "$ref": "#/$defs/DashboardLegalActionRefV1" + }, + "type": "array" + }, + "payload": { + "anyOf": [ + { + "$ref": "#/$defs/LcmSearchPayloadV1" + }, + { + "type": "null" + } + ] + }, + "schema_revision": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "scope": { + "$ref": "#/$defs/DashboardScopeV1" + }, + "source_watermark": { + "anyOf": [ + { + "$ref": "#/$defs/DashboardWatermarkV1" + }, + { + "type": "null" + } + ] + }, + "time": { + "$ref": "#/$defs/DashboardTimeV1" + }, + "version": { + "$ref": "#/$defs/DashboardVersionV1" + } + }, + "required": [ + "schema_revision", + "scope", + "version", + "time", + "source_watermark", + "authorization", + "coverage", + "freshness", + "domain_state", + "legal_actions", + "payload" + ], + "type": "object" + }, + "DashboardEnvelopeV127": { + "description": "The normative read-model envelope. Every V2 read-model route returns exactly\nthis shape; only `payload` varies by route.", + "properties": { + "authorization": { + "$ref": "#/$defs/DashboardAuthorizationV1" + }, + "coverage": { + "$ref": "#/$defs/DashboardCoverageV1" + }, + "domain_state": { + "$ref": "#/$defs/DashboardDomainStateV1" + }, + "freshness": { + "$ref": "#/$defs/DashboardFreshnessV1" + }, + "legal_actions": { + "items": { + "$ref": "#/$defs/DashboardLegalActionRefV1" + }, + "type": "array" + }, + "payload": { + "$ref": "#/$defs/FeedbackObservationReadModelV1" + }, + "schema_revision": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "scope": { + "$ref": "#/$defs/DashboardScopeV1" + }, + "source_watermark": { + "anyOf": [ + { + "$ref": "#/$defs/DashboardWatermarkV1" + }, + { + "type": "null" + } + ] + }, + "time": { + "$ref": "#/$defs/DashboardTimeV1" + }, + "version": { + "$ref": "#/$defs/DashboardVersionV1" + } + }, + "required": [ + "schema_revision", + "scope", + "version", + "time", + "source_watermark", + "authorization", + "coverage", + "freshness", + "domain_state", + "legal_actions", + "payload" + ], + "type": "object" + }, + "DashboardEnvelopeV13": { + "description": "The normative read-model envelope. Every V2 read-model route returns exactly\nthis shape; only `payload` varies by route.", + "properties": { + "authorization": { + "$ref": "#/$defs/DashboardAuthorizationV1" + }, + "coverage": { + "$ref": "#/$defs/DashboardCoverageV1" + }, + "domain_state": { + "$ref": "#/$defs/DashboardDomainStateV1" + }, + "freshness": { + "$ref": "#/$defs/DashboardFreshnessV1" + }, + "legal_actions": { + "items": { + "$ref": "#/$defs/DashboardLegalActionRefV1" + }, + "type": "array" + }, + "payload": { + "anyOf": [ + { + "$ref": "#/$defs/ExplorerReadContextV1" + }, + { + "type": "null" + } + ] + }, + "schema_revision": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "scope": { + "$ref": "#/$defs/DashboardScopeV1" + }, + "source_watermark": { + "anyOf": [ + { + "$ref": "#/$defs/DashboardWatermarkV1" + }, + { + "type": "null" + } + ] + }, + "time": { + "$ref": "#/$defs/DashboardTimeV1" + }, + "version": { + "$ref": "#/$defs/DashboardVersionV1" + } + }, + "required": [ + "schema_revision", + "scope", + "version", + "time", + "source_watermark", + "authorization", + "coverage", + "freshness", + "domain_state", + "legal_actions", + "payload" + ], + "type": "object" + }, + "DashboardEnvelopeV14": { + "description": "The normative read-model envelope. Every V2 read-model route returns exactly\nthis shape; only `payload` varies by route.", + "properties": { + "authorization": { + "$ref": "#/$defs/DashboardAuthorizationV1" + }, + "coverage": { + "$ref": "#/$defs/DashboardCoverageV1" + }, + "domain_state": { + "$ref": "#/$defs/DashboardDomainStateV1" + }, + "freshness": { + "$ref": "#/$defs/DashboardFreshnessV1" + }, + "legal_actions": { + "items": { + "$ref": "#/$defs/DashboardLegalActionRefV1" + }, + "type": "array" + }, + "payload": { + "$ref": "#/$defs/ProjectsPayloadV1" + }, + "schema_revision": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "scope": { + "$ref": "#/$defs/DashboardScopeV1" + }, + "source_watermark": { + "anyOf": [ + { + "$ref": "#/$defs/DashboardWatermarkV1" + }, + { + "type": "null" + } + ] + }, + "time": { + "$ref": "#/$defs/DashboardTimeV1" + }, + "version": { + "$ref": "#/$defs/DashboardVersionV1" + } + }, + "required": [ + "schema_revision", + "scope", + "version", + "time", + "source_watermark", + "authorization", + "coverage", + "freshness", + "domain_state", + "legal_actions", + "payload" + ], + "type": "object" + }, + "DashboardEnvelopeV15": { + "description": "The normative read-model envelope. Every V2 read-model route returns exactly\nthis shape; only `payload` varies by route.", + "properties": { + "authorization": { + "$ref": "#/$defs/DashboardAuthorizationV1" + }, + "coverage": { + "$ref": "#/$defs/DashboardCoverageV1" + }, + "domain_state": { + "$ref": "#/$defs/DashboardDomainStateV1" + }, + "freshness": { + "$ref": "#/$defs/DashboardFreshnessV1" + }, + "legal_actions": { + "items": { + "$ref": "#/$defs/DashboardLegalActionRefV1" + }, + "type": "array" + }, + "payload": { + "$ref": "#/$defs/ProjectContextPayloadV1" + }, + "schema_revision": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "scope": { + "$ref": "#/$defs/DashboardScopeV1" + }, + "source_watermark": { + "anyOf": [ + { + "$ref": "#/$defs/DashboardWatermarkV1" + }, + { + "type": "null" + } + ] + }, + "time": { + "$ref": "#/$defs/DashboardTimeV1" + }, + "version": { + "$ref": "#/$defs/DashboardVersionV1" + } + }, + "required": [ + "schema_revision", + "scope", + "version", + "time", + "source_watermark", + "authorization", + "coverage", + "freshness", + "domain_state", + "legal_actions", + "payload" + ], + "type": "object" + }, + "DashboardEnvelopeV16": { + "description": "The normative read-model envelope. Every V2 read-model route returns exactly\nthis shape; only `payload` varies by route.", + "properties": { + "authorization": { + "$ref": "#/$defs/DashboardAuthorizationV1" + }, + "coverage": { + "$ref": "#/$defs/DashboardCoverageV1" + }, + "domain_state": { + "$ref": "#/$defs/DashboardDomainStateV1" + }, + "freshness": { + "$ref": "#/$defs/DashboardFreshnessV1" + }, + "legal_actions": { + "items": { + "$ref": "#/$defs/DashboardLegalActionRefV1" + }, + "type": "array" + }, + "payload": { + "anyOf": [ + { + "$ref": "#/$defs/GraphOverviewPayloadV1" + }, + { + "type": "null" + } + ] + }, + "schema_revision": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "scope": { + "$ref": "#/$defs/DashboardScopeV1" + }, + "source_watermark": { + "anyOf": [ + { + "$ref": "#/$defs/DashboardWatermarkV1" + }, + { + "type": "null" + } + ] + }, + "time": { + "$ref": "#/$defs/DashboardTimeV1" + }, + "version": { + "$ref": "#/$defs/DashboardVersionV1" + } + }, + "required": [ + "schema_revision", + "scope", + "version", + "time", + "source_watermark", + "authorization", + "coverage", + "freshness", + "domain_state", + "legal_actions", + "payload" + ], + "type": "object" + }, + "DashboardEnvelopeV17": { + "description": "The normative read-model envelope. Every V2 read-model route returns exactly\nthis shape; only `payload` varies by route.", + "properties": { + "authorization": { + "$ref": "#/$defs/DashboardAuthorizationV1" + }, + "coverage": { + "$ref": "#/$defs/DashboardCoverageV1" + }, + "domain_state": { + "$ref": "#/$defs/DashboardDomainStateV1" + }, + "freshness": { + "$ref": "#/$defs/DashboardFreshnessV1" + }, + "legal_actions": { + "items": { + "$ref": "#/$defs/DashboardLegalActionRefV1" + }, + "type": "array" + }, + "payload": { + "anyOf": [ + { + "$ref": "#/$defs/GraphSearchPayloadV1" + }, + { + "type": "null" + } + ] + }, + "schema_revision": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "scope": { + "$ref": "#/$defs/DashboardScopeV1" + }, + "source_watermark": { + "anyOf": [ + { + "$ref": "#/$defs/DashboardWatermarkV1" + }, + { + "type": "null" + } + ] + }, + "time": { + "$ref": "#/$defs/DashboardTimeV1" + }, + "version": { + "$ref": "#/$defs/DashboardVersionV1" + } + }, + "required": [ + "schema_revision", + "scope", + "version", + "time", + "source_watermark", + "authorization", + "coverage", + "freshness", + "domain_state", + "legal_actions", + "payload" + ], + "type": "object" + }, + "DashboardEnvelopeV18": { + "description": "The normative read-model envelope. Every V2 read-model route returns exactly\nthis shape; only `payload` varies by route.", + "properties": { + "authorization": { + "$ref": "#/$defs/DashboardAuthorizationV1" + }, + "coverage": { + "$ref": "#/$defs/DashboardCoverageV1" + }, + "domain_state": { + "$ref": "#/$defs/DashboardDomainStateV1" + }, + "freshness": { + "$ref": "#/$defs/DashboardFreshnessV1" + }, + "legal_actions": { + "items": { + "$ref": "#/$defs/DashboardLegalActionRefV1" + }, + "type": "array" + }, + "payload": { + "anyOf": [ + { + "$ref": "#/$defs/GraphNodePayloadV1" + }, + { + "type": "null" + } + ] + }, + "schema_revision": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "scope": { + "$ref": "#/$defs/DashboardScopeV1" + }, + "source_watermark": { + "anyOf": [ + { + "$ref": "#/$defs/DashboardWatermarkV1" + }, + { + "type": "null" + } + ] + }, + "time": { + "$ref": "#/$defs/DashboardTimeV1" + }, + "version": { + "$ref": "#/$defs/DashboardVersionV1" + } + }, + "required": [ + "schema_revision", + "scope", + "version", + "time", + "source_watermark", + "authorization", + "coverage", + "freshness", + "domain_state", + "legal_actions", + "payload" + ], + "type": "object" + }, + "DashboardEnvelopeV19": { + "description": "The normative read-model envelope. Every V2 read-model route returns exactly\nthis shape; only `payload` varies by route.", + "properties": { + "authorization": { + "$ref": "#/$defs/DashboardAuthorizationV1" + }, + "coverage": { + "$ref": "#/$defs/DashboardCoverageV1" + }, + "domain_state": { + "$ref": "#/$defs/DashboardDomainStateV1" + }, + "freshness": { + "$ref": "#/$defs/DashboardFreshnessV1" + }, + "legal_actions": { + "items": { + "$ref": "#/$defs/DashboardLegalActionRefV1" + }, + "type": "array" + }, + "payload": { + "anyOf": [ + { + "$ref": "#/$defs/GraphNeighborsPayloadV1" + }, + { + "type": "null" + } + ] + }, + "schema_revision": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "scope": { + "$ref": "#/$defs/DashboardScopeV1" + }, + "source_watermark": { + "anyOf": [ + { + "$ref": "#/$defs/DashboardWatermarkV1" + }, + { + "type": "null" + } + ] + }, + "time": { + "$ref": "#/$defs/DashboardTimeV1" + }, + "version": { + "$ref": "#/$defs/DashboardVersionV1" + } + }, + "required": [ + "schema_revision", + "scope", + "version", + "time", + "source_watermark", + "authorization", + "coverage", + "freshness", + "domain_state", + "legal_actions", + "payload" + ], + "type": "object" + }, + "DashboardFreshnessStateV1": { + "description": "Freshness of the observed state relative to its live source watermark.\n`Absent` (no source produced anything) and `Unsupported` (no source wired)\nare distinct from `Stale` (behind the watermark) and `Unknown`.", + "enum": [ + "fresh", + "stale", + "unknown", + "absent", + "unsupported" + ], + "type": "string" + }, + "DashboardFreshnessV1": { + "description": "Freshness statement plus the optional observation stamp/watermark it was\njudged against.", + "properties": { + "observed_at_micros": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "state": { + "$ref": "#/$defs/DashboardFreshnessStateV1" + }, + "watermark": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "state", + "observed_at_micros", + "watermark" + ], + "type": "object" + }, + "DashboardLegalActionKindV1": { + "description": "The legal-action reference kinds a read model may attach. This mirrors the\nplan's action vocabulary reduced to the read surface: the dashboard only\nrenders these references and submits them through the owning application\noperation; it never constructs an effect inline.", + "enum": [ + "inspect", + "expand_evidence", + "refresh", + "request_dry_run", + "request_apply", + "request_cancel" + ], + "type": "string" + }, + "DashboardLegalActionRefV1": { + "description": "A reference to one owner-supplied legal action. `operation` names the owning\napplication operation; the dashboard never embeds argv, a path, or an inline\neffect.", + "properties": { + "kind": { + "$ref": "#/$defs/DashboardLegalActionKindV1" + }, + "operation": { + "type": "string" + } + }, + "required": [ + "kind", + "operation" + ], + "type": "object" + }, + "DashboardPayloadMarkerV1": { + "type": "null" + }, + "DashboardScopeV1": { + "description": "Exact scope the envelope was resolved for. A deep link/query never falls\nback to a title, path, or latest version to recover scope.", + "properties": { + "project_id": { + "description": "Registered project id, when the store is profile-backed.", + "type": [ + "string", + "null" + ] + }, + "storage_mode": { + "description": "Resolved storage mode label (`project_local` / `profile_sharded`).", + "type": "string" + }, + "store_root": { + "description": "Resolved active project store root (display path).", + "type": "string" + } + }, + "required": [ + "project_id", + "storage_mode", + "store_root" + ], + "type": "object" + }, + "DashboardTimeV1": { + "description": "Valid time and observation time, kept separate. `observation_time` is when\nthe daemon observed the state; `valid_time` is when the state was true in the\nmodelled domain (absent when a read model has no distinct valid time).", + "properties": { + "observation_time_micros": { + "description": "Observation time in microseconds since the Unix epoch. Always present.", + "format": "int64", + "type": "integer" + }, + "valid_time_micros": { + "description": "Domain valid time in microseconds since the Unix epoch, when distinct.", + "format": "int64", + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "valid_time_micros", + "observation_time_micros" + ], + "type": "object" + }, + "DashboardVersionV1": { + "description": "Entity and graph version identities pinned by the envelope. Both are\noptional: a read model with no versioned graph state leaves them absent\nrather than inventing `0`/`latest`.", + "properties": { + "entity_version": { + "type": [ + "string", + "null" + ] + }, + "graph_version": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "entity_version", + "graph_version" + ], + "type": "object" + }, + "DashboardWatermarkV1": { + "description": "Opaque monotone source watermark. The frontend compares watermarks for\nstaleness but never parses their internal structure.", + "properties": { + "source": { + "description": "Which source the watermark belongs to.", + "type": "string" + }, + "watermark": { + "description": "Opaque monotone token.", + "type": "string" + } + }, + "required": [ + "source", + "watermark" + ], + "type": "object" + }, + "DecideWorkProposalRequestV1": { + "additionalProperties": false, + "properties": { + "disposition": { + "$ref": "#/$defs/WorkProposalDispositionV12" + }, + "mutation": { + "$ref": "#/$defs/WorkProductMutationIdentityV1" + }, + "proposal": { + "$ref": "#/$defs/WorkProposalV1" + }, + "selection": { + "$ref": "#/$defs/WorkProductSelectionScopeV1" + } + }, + "required": [ + "selection", + "proposal", + "disposition", + "mutation" + ], + "type": "object" + }, + "DecideWorkRelationReplanRequestV1": { + "additionalProperties": false, + "properties": { + "disposition": { + "$ref": "#/$defs/WorkProposalDispositionV12" + }, + "mutation": { + "$ref": "#/$defs/WorkProductMutationIdentityV1" + }, + "proposal": { + "$ref": "#/$defs/WorkRelationReplanProposalV1" + }, + "selection": { + "$ref": "#/$defs/WorkProductSelectionScopeV1" + } + }, + "required": [ + "selection", + "proposal", + "disposition", + "mutation" + ], + "type": "object" + }, + "DeliveryCiAnnotationLevelV1": { + "enum": [ + "notice", + "warning", + "failure" + ], + "type": "string" + }, + "DeliveryCiAnnotationV1": { + "properties": { + "end_line": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "level": { + "$ref": "#/$defs/DeliveryCiAnnotationLevelV1" + }, + "path": { + "type": "string" + }, + "start_line": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "title": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "path", + "start_line", + "end_line", + "level", + "title" + ], + "type": "object" + }, + "DeliveryCiCheckV1": { + "properties": { + "annotation_count": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "annotations": { + "description": "Bounded retained annotation summaries beside the provider's total\n`annotation_count`.", + "items": { + "$ref": "#/$defs/DeliveryCiAnnotationV1" + }, + "type": "array" + }, + "check_conclusion": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryCiConclusionV1" + }, + { + "type": "null" + } + ] + }, + "check_status": { + "$ref": "#/$defs/DeliveryCiStatusV1" + }, + "failed_step": { + "type": [ + "string", + "null" + ] + }, + "failure_kind": { + "$ref": "#/$defs/DeliveryCiFailureKindV1" + }, + "id": { + "type": "string" + }, + "job_conclusion": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryCiConclusionV1" + }, + { + "type": "null" + } + ] + }, + "job_status": { + "$ref": "#/$defs/DeliveryCiStatusV1" + }, + "label": { + "type": "string" + }, + "observation_id": { + "type": "string" + }, + "observed_at_micros": { + "format": "int64", + "type": "integer" + }, + "provider_head_commit": { + "type": "string" + }, + "run": { + "$ref": "#/$defs/DeliveryCiRunIdentityV1" + }, + "workflow_conclusion": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryCiConclusionV1" + }, + { + "type": "null" + } + ] + }, + "workflow_path": { + "type": "string" + }, + "workflow_status": { + "$ref": "#/$defs/DeliveryCiStatusV1" + } + }, + "required": [ + "id", + "label", + "observation_id", + "run", + "workflow_path", + "workflow_status", + "workflow_conclusion", + "job_status", + "job_conclusion", + "check_status", + "check_conclusion", + "failed_step", + "annotations", + "annotation_count", + "provider_head_commit", + "failure_kind", + "observed_at_micros" + ], + "type": "object" + }, + "DeliveryCiConclusionV1": { + "enum": [ + "action_required", + "cancelled", + "failure", + "neutral", + "skipped", + "success", + "timed_out" + ], + "type": "string" + }, + "DeliveryCiFailureKindV1": { + "enum": [ + "test_failure", + "compile_failure", + "lint_failure", + "infrastructure_failure", + "unknown" + ], + "type": "string" + }, + "DeliveryCiRunIdentityV1": { + "properties": { + "attempt_id": { + "type": "string" + }, + "check_run_id": { + "type": "string" + }, + "check_suite_id": { + "type": "string" + }, + "job_id": { + "type": "string" + }, + "run_id": { + "type": "string" + }, + "workflow_id": { + "type": "string" + } + }, + "required": [ + "workflow_id", + "job_id", + "check_suite_id", + "check_run_id", + "run_id", + "attempt_id" + ], + "type": "object" + }, + "DeliveryCiStatusV1": { + "enum": [ + "pending", + "queued", + "in_progress", + "completed", + "failed", + "waiting" + ], + "type": "string" + }, + "DeliveryCiTimelineV1": { + "properties": { + "expected_head_commit": { + "type": "string" + }, + "items": { + "items": { + "$ref": "#/$defs/DeliveryCiCheckV1" + }, + "type": "array" + }, + "retained_head_commit": { + "type": "string" + }, + "total_retained": { + "description": "Retained checks in the source inventory, shown or not.", + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "truncated": { + "type": "boolean" + } + }, + "required": [ + "retained_head_commit", + "expected_head_commit", + "items", + "total_retained", + "truncated" + ], + "type": "object" + }, + "DeliveryCommitTimelineV1": { + "properties": { + "items": { + "items": { + "$ref": "#/$defs/DeliveryCommitV1" + }, + "type": "array" + }, + "truncated": { + "type": "boolean" + } + }, + "required": [ + "items", + "truncated" + ], + "type": "object" + }, + "DeliveryCommitV1": { + "properties": { + "author_at_micros": { + "format": "int64", + "type": "integer" + }, + "author_email": { + "type": "string" + }, + "author_name": { + "type": "string" + }, + "commit": { + "type": "string" + }, + "committer_at_micros": { + "format": "int64", + "type": "integer" + }, + "subject": { + "type": "string" + } + }, + "required": [ + "commit", + "subject", + "author_name", + "author_email", + "author_at_micros", + "committer_at_micros" + ], + "type": "object" + }, + "DeliveryFailureLocalizationTimelineV1": { + "properties": { + "items": { + "items": { + "$ref": "#/$defs/DeliveryFailureLocalizationV1" + }, + "type": "array" + }, + "truncated": { + "type": "boolean" + } + }, + "required": [ + "items", + "truncated" + ], + "type": "object" + }, + "DeliveryFailureLocalizationV1": { + "properties": { + "id": { + "type": "string" + }, + "label": { + "type": "string" + } + }, + "required": [ + "id", + "label" + ], + "type": "object" + }, + "DeliveryGenerationComparisonV1": { + "enum": [ + "current", + "mismatch" + ], + "type": "string" + }, + "DeliveryGenerationFreshnessV1": { + "properties": { + "comparison": { + "$ref": "#/$defs/DeliveryGenerationComparisonV1" + }, + "head_commit": { + "type": "string" + }, + "indexed_commit": { + "type": "string" + } + }, + "required": [ + "comparison", + "head_commit", + "indexed_commit" + ], + "type": "object" + }, + "DeliveryGitHeadV1": { + "oneOf": [ + { + "properties": { + "branch": { + "type": "string" + }, + "commit": { + "type": "string" + }, + "state": { + "const": "attached", + "type": "string" + } + }, + "required": [ + "state", + "branch", + "commit" + ], + "type": "object" + }, + { + "properties": { + "commit": { + "type": "string" + }, + "state": { + "const": "detached", + "type": "string" + } + }, + "required": [ + "state", + "commit" + ], + "type": "object" + }, + { + "properties": { + "branch": { + "type": "string" + }, + "state": { + "const": "unborn", + "type": "string" + } + }, + "required": [ + "state", + "branch" + ], + "type": "object" + } + ] + }, + "DeliveryGitHubCoverageV1": { + "enum": [ + "complete", + "partial", + "unavailable", + "denied", + "stale" + ], + "type": "string" + }, + "DeliveryGitHubOperationSnapshotV1": { + "properties": { + "coverage": { + "$ref": "#/$defs/DeliveryGitHubCoverageV1" + }, + "fetched_at_micros": { + "format": "int64", + "type": "integer" + }, + "merge_base_commit_id": { + "type": "string" + }, + "outcome": { + "$ref": "#/$defs/DeliveryGitHubOutcomeV1" + }, + "provider_base_commit_id": { + "type": "string" + }, + "provider_head_commit_id": { + "type": "string" + } + }, + "required": [ + "provider_base_commit_id", + "provider_head_commit_id", + "merge_base_commit_id", + "outcome", + "coverage", + "fetched_at_micros" + ], + "type": "object" + }, + "DeliveryGitHubOutcomeV1": { + "enum": [ + "complete", + "partial", + "unavailable", + "denied", + "rate_limited", + "stale", + "failed" + ], + "type": "string" + }, + "DeliveryGitHubReadOperationV1": { + "enum": [ + "pull_request", + "reviews", + "review_comments", + "review_threads" + ], + "type": "string" + }, + "DeliveryGitStatusV1": { + "properties": { + "changed_paths": { + "items": { + "type": "string" + }, + "type": "array" + }, + "conflicted": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "head": { + "$ref": "#/$defs/DeliveryGitHeadV1" + }, + "ignored": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "operation": { + "type": "string" + }, + "repository": { + "type": "string" + }, + "schema_version": { + "type": "string" + }, + "staged": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "unstaged": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "untracked": { + "format": "uint32", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "repository", + "head", + "operation", + "staged", + "unstaged", + "conflicted", + "untracked", + "ignored", + "changed_paths", + "schema_version" + ], + "type": "object" + }, + "DeliveryOverviewV1": { + "properties": { + "changes": { + "$ref": "#/$defs/DeliveryProjectionV1" + }, + "ci_checks": { + "$ref": "#/$defs/DeliveryProjectionV15" + }, + "commits": { + "$ref": "#/$defs/DeliveryProjectionV12" + }, + "failure_localization": { + "$ref": "#/$defs/DeliveryProjectionV16" + }, + "generation_freshness": { + "$ref": "#/$defs/DeliveryProjectionV18" + }, + "pull_requests": { + "$ref": "#/$defs/DeliveryProjectionV13" + }, + "releases": { + "$ref": "#/$defs/DeliveryProjectionV17" + }, + "review_comments": { + "$ref": "#/$defs/DeliveryProjectionV14" + } + }, + "required": [ + "changes", + "commits", + "pull_requests", + "review_comments", + "ci_checks", + "failure_localization", + "releases", + "generation_freshness" + ], + "type": "object" + }, + "DeliveryProjectionV1": { + "oneOf": [ + { + "properties": { + "state": { + "const": "ready", + "type": "string" + }, + "value": { + "$ref": "#/$defs/DeliveryGitStatusV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "partial", + "type": "string" + }, + "value": { + "$ref": "#/$defs/DeliveryGitStatusV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "stale", + "type": "string" + }, + "value": { + "$ref": "#/$defs/DeliveryGitStatusV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "checkpoint": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryRateLimitCheckpointV1" + }, + { + "type": "null" + } + ] + }, + "retry_at_micros": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "state": { + "const": "rate_limited", + "type": "string" + }, + "value": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryGitStatusV1" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "state", + "value", + "checkpoint", + "retry_at_micros" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "failed", + "type": "string" + }, + "value": { + "$ref": "#/$defs/DeliveryGitStatusV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "denied", + "type": "string" + }, + "value": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryGitStatusV1" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "reason": { + "type": "string" + }, + "required_authority": { + "type": "string" + }, + "state": { + "const": "not_published", + "type": "string" + } + }, + "required": [ + "state", + "required_authority", + "reason" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "empty_measured", + "type": "string" + }, + "value": { + "$ref": "#/$defs/DeliveryGitStatusV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "reason": { + "type": "string" + }, + "required_authority": { + "type": "string" + }, + "state": { + "const": "unavailable", + "type": "string" + }, + "value": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryGitStatusV1" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "state", + "required_authority", + "reason", + "value" + ], + "type": "object" + } + ] + }, + "DeliveryProjectionV12": { + "oneOf": [ + { + "properties": { + "state": { + "const": "ready", + "type": "string" + }, + "value": { + "$ref": "#/$defs/DeliveryCommitTimelineV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "partial", + "type": "string" + }, + "value": { + "$ref": "#/$defs/DeliveryCommitTimelineV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "stale", + "type": "string" + }, + "value": { + "$ref": "#/$defs/DeliveryCommitTimelineV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "checkpoint": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryRateLimitCheckpointV1" + }, + { + "type": "null" + } + ] + }, + "retry_at_micros": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "state": { + "const": "rate_limited", + "type": "string" + }, + "value": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryCommitTimelineV1" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "state", + "value", + "checkpoint", + "retry_at_micros" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "failed", + "type": "string" + }, + "value": { + "$ref": "#/$defs/DeliveryCommitTimelineV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "denied", + "type": "string" + }, + "value": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryCommitTimelineV1" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "reason": { + "type": "string" + }, + "required_authority": { + "type": "string" + }, + "state": { + "const": "not_published", + "type": "string" + } + }, + "required": [ + "state", + "required_authority", + "reason" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "empty_measured", + "type": "string" + }, + "value": { + "$ref": "#/$defs/DeliveryCommitTimelineV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "reason": { + "type": "string" + }, + "required_authority": { + "type": "string" + }, + "state": { + "const": "unavailable", + "type": "string" + }, + "value": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryCommitTimelineV1" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "state", + "required_authority", + "reason", + "value" + ], + "type": "object" + } + ] + }, + "DeliveryProjectionV13": { + "oneOf": [ + { + "properties": { + "state": { + "const": "ready", + "type": "string" + }, + "value": { + "$ref": "#/$defs/DeliveryPullRequestTimelineV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "partial", + "type": "string" + }, + "value": { + "$ref": "#/$defs/DeliveryPullRequestTimelineV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "stale", + "type": "string" + }, + "value": { + "$ref": "#/$defs/DeliveryPullRequestTimelineV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "checkpoint": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryRateLimitCheckpointV1" + }, + { + "type": "null" + } + ] + }, + "retry_at_micros": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "state": { + "const": "rate_limited", + "type": "string" + }, + "value": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryPullRequestTimelineV1" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "state", + "value", + "checkpoint", + "retry_at_micros" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "failed", + "type": "string" + }, + "value": { + "$ref": "#/$defs/DeliveryPullRequestTimelineV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "denied", + "type": "string" + }, + "value": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryPullRequestTimelineV1" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "reason": { + "type": "string" + }, + "required_authority": { + "type": "string" + }, + "state": { + "const": "not_published", + "type": "string" + } + }, + "required": [ + "state", + "required_authority", + "reason" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "empty_measured", + "type": "string" + }, + "value": { + "$ref": "#/$defs/DeliveryPullRequestTimelineV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "reason": { + "type": "string" + }, + "required_authority": { + "type": "string" + }, + "state": { + "const": "unavailable", + "type": "string" + }, + "value": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryPullRequestTimelineV1" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "state", + "required_authority", + "reason", + "value" + ], + "type": "object" + } + ] + }, + "DeliveryProjectionV14": { + "oneOf": [ + { + "properties": { + "state": { + "const": "ready", + "type": "string" + }, + "value": { + "$ref": "#/$defs/DeliveryReviewTimelineV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "partial", + "type": "string" + }, + "value": { + "$ref": "#/$defs/DeliveryReviewTimelineV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "stale", + "type": "string" + }, + "value": { + "$ref": "#/$defs/DeliveryReviewTimelineV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "checkpoint": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryRateLimitCheckpointV1" + }, + { + "type": "null" + } + ] + }, + "retry_at_micros": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "state": { + "const": "rate_limited", + "type": "string" + }, + "value": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryReviewTimelineV1" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "state", + "value", + "checkpoint", + "retry_at_micros" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "failed", + "type": "string" + }, + "value": { + "$ref": "#/$defs/DeliveryReviewTimelineV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "denied", + "type": "string" + }, + "value": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryReviewTimelineV1" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "reason": { + "type": "string" + }, + "required_authority": { + "type": "string" + }, + "state": { + "const": "not_published", + "type": "string" + } + }, + "required": [ + "state", + "required_authority", + "reason" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "empty_measured", + "type": "string" + }, + "value": { + "$ref": "#/$defs/DeliveryReviewTimelineV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "reason": { + "type": "string" + }, + "required_authority": { + "type": "string" + }, + "state": { + "const": "unavailable", + "type": "string" + }, + "value": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryReviewTimelineV1" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "state", + "required_authority", + "reason", + "value" + ], + "type": "object" + } + ] + }, + "DeliveryProjectionV15": { + "oneOf": [ + { + "properties": { + "state": { + "const": "ready", + "type": "string" + }, + "value": { + "$ref": "#/$defs/DeliveryCiTimelineV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "partial", + "type": "string" + }, + "value": { + "$ref": "#/$defs/DeliveryCiTimelineV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "stale", + "type": "string" + }, + "value": { + "$ref": "#/$defs/DeliveryCiTimelineV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "checkpoint": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryRateLimitCheckpointV1" + }, + { + "type": "null" + } + ] + }, + "retry_at_micros": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "state": { + "const": "rate_limited", + "type": "string" + }, + "value": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryCiTimelineV1" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "state", + "value", + "checkpoint", + "retry_at_micros" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "failed", + "type": "string" + }, + "value": { + "$ref": "#/$defs/DeliveryCiTimelineV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "denied", + "type": "string" + }, + "value": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryCiTimelineV1" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "reason": { + "type": "string" + }, + "required_authority": { + "type": "string" + }, + "state": { + "const": "not_published", + "type": "string" + } + }, + "required": [ + "state", + "required_authority", + "reason" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "empty_measured", + "type": "string" + }, + "value": { + "$ref": "#/$defs/DeliveryCiTimelineV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "reason": { + "type": "string" + }, + "required_authority": { + "type": "string" + }, + "state": { + "const": "unavailable", + "type": "string" + }, + "value": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryCiTimelineV1" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "state", + "required_authority", + "reason", + "value" + ], + "type": "object" + } + ] + }, + "DeliveryProjectionV16": { + "oneOf": [ + { + "properties": { + "state": { + "const": "ready", + "type": "string" + }, + "value": { + "$ref": "#/$defs/DeliveryFailureLocalizationTimelineV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "partial", + "type": "string" + }, + "value": { + "$ref": "#/$defs/DeliveryFailureLocalizationTimelineV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "stale", + "type": "string" + }, + "value": { + "$ref": "#/$defs/DeliveryFailureLocalizationTimelineV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "checkpoint": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryRateLimitCheckpointV1" + }, + { + "type": "null" + } + ] + }, + "retry_at_micros": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "state": { + "const": "rate_limited", + "type": "string" + }, + "value": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryFailureLocalizationTimelineV1" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "state", + "value", + "checkpoint", + "retry_at_micros" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "failed", + "type": "string" + }, + "value": { + "$ref": "#/$defs/DeliveryFailureLocalizationTimelineV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "denied", + "type": "string" + }, + "value": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryFailureLocalizationTimelineV1" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "reason": { + "type": "string" + }, + "required_authority": { + "type": "string" + }, + "state": { + "const": "not_published", + "type": "string" + } + }, + "required": [ + "state", + "required_authority", + "reason" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "empty_measured", + "type": "string" + }, + "value": { + "$ref": "#/$defs/DeliveryFailureLocalizationTimelineV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "reason": { + "type": "string" + }, + "required_authority": { + "type": "string" + }, + "state": { + "const": "unavailable", + "type": "string" + }, + "value": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryFailureLocalizationTimelineV1" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "state", + "required_authority", + "reason", + "value" + ], + "type": "object" + } + ] + }, + "DeliveryProjectionV17": { + "oneOf": [ + { + "properties": { + "state": { + "const": "ready", + "type": "string" + }, + "value": { + "$ref": "#/$defs/DeliveryReleaseTimelineV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "partial", + "type": "string" + }, + "value": { + "$ref": "#/$defs/DeliveryReleaseTimelineV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "stale", + "type": "string" + }, + "value": { + "$ref": "#/$defs/DeliveryReleaseTimelineV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "checkpoint": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryRateLimitCheckpointV1" + }, + { + "type": "null" + } + ] + }, + "retry_at_micros": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "state": { + "const": "rate_limited", + "type": "string" + }, + "value": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryReleaseTimelineV1" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "state", + "value", + "checkpoint", + "retry_at_micros" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "failed", + "type": "string" + }, + "value": { + "$ref": "#/$defs/DeliveryReleaseTimelineV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "denied", + "type": "string" + }, + "value": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryReleaseTimelineV1" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "reason": { + "type": "string" + }, + "required_authority": { + "type": "string" + }, + "state": { + "const": "not_published", + "type": "string" + } + }, + "required": [ + "state", + "required_authority", + "reason" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "empty_measured", + "type": "string" + }, + "value": { + "$ref": "#/$defs/DeliveryReleaseTimelineV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "reason": { + "type": "string" + }, + "required_authority": { + "type": "string" + }, + "state": { + "const": "unavailable", + "type": "string" + }, + "value": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryReleaseTimelineV1" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "state", + "required_authority", + "reason", + "value" + ], + "type": "object" + } + ] + }, + "DeliveryProjectionV18": { + "oneOf": [ + { + "properties": { + "state": { + "const": "ready", + "type": "string" + }, + "value": { + "$ref": "#/$defs/DeliveryGenerationFreshnessV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "partial", + "type": "string" + }, + "value": { + "$ref": "#/$defs/DeliveryGenerationFreshnessV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "stale", + "type": "string" + }, + "value": { + "$ref": "#/$defs/DeliveryGenerationFreshnessV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "checkpoint": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryRateLimitCheckpointV1" + }, + { + "type": "null" + } + ] + }, + "retry_at_micros": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "state": { + "const": "rate_limited", + "type": "string" + }, + "value": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryGenerationFreshnessV1" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "state", + "value", + "checkpoint", + "retry_at_micros" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "failed", + "type": "string" + }, + "value": { + "$ref": "#/$defs/DeliveryGenerationFreshnessV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "denied", + "type": "string" + }, + "value": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryGenerationFreshnessV1" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "reason": { + "type": "string" + }, + "required_authority": { + "type": "string" + }, + "state": { + "const": "not_published", + "type": "string" + } + }, + "required": [ + "state", + "required_authority", + "reason" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "empty_measured", + "type": "string" + }, + "value": { + "$ref": "#/$defs/DeliveryGenerationFreshnessV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "reason": { + "type": "string" + }, + "required_authority": { + "type": "string" + }, + "state": { + "const": "unavailable", + "type": "string" + }, + "value": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryGenerationFreshnessV1" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "state", + "required_authority", + "reason", + "value" + ], + "type": "object" + } + ] + }, + "DeliveryPullRequestIdentityV1": { + "properties": { + "additions": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "changed_files": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "deletions": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "draft": { + "type": "boolean" + }, + "state": { + "$ref": "#/$defs/DeliveryPullRequestStateV1" + }, + "title": { + "type": "string" + } + }, + "required": [ + "title", + "state", + "draft", + "additions", + "deletions", + "changed_files" + ], + "type": "object" + }, + "DeliveryPullRequestOperationV1": { + "properties": { + "last_complete": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryGitHubOperationSnapshotV1" + }, + { + "type": "null" + } + ] + }, + "latest_attempt": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryGitHubOperationSnapshotV1" + }, + { + "type": "null" + } + ] + }, + "operation": { + "$ref": "#/$defs/DeliveryGitHubReadOperationV1" + } + }, + "required": [ + "operation", + "latest_attempt", + "last_complete" + ], + "type": "object" + }, + "DeliveryPullRequestStateV1": { + "enum": [ + "open", + "closed", + "merged" + ], + "type": "string" + }, + "DeliveryPullRequestTimelineV1": { + "properties": { + "expected_head_commit": { + "type": "string" + }, + "items": { + "items": { + "$ref": "#/$defs/DeliveryPullRequestV1" + }, + "type": "array" + }, + "retained_head_commit": { + "type": "string" + }, + "total_retained": { + "description": "Retained pull requests known to the source read, shown or not.", + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "truncated": { + "type": "boolean" + } + }, + "required": [ + "retained_head_commit", + "expected_head_commit", + "items", + "total_retained", + "truncated" + ], + "type": "object" + }, + "DeliveryPullRequestV1": { + "properties": { + "id": { + "type": "string" + }, + "identity": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryPullRequestIdentityV1" + }, + { + "type": "null" + } + ], + "description": "Retained PR identity from the allowlisted `RestGetPullRequest` read;\nabsent when no identity generation is retained yet." + }, + "label": { + "type": "string" + }, + "operations": { + "items": { + "$ref": "#/$defs/DeliveryPullRequestOperationV1" + }, + "type": "array" + }, + "provider": { + "type": "string" + }, + "pull_request_id": { + "type": "string" + } + }, + "required": [ + "id", + "label", + "provider", + "pull_request_id", + "identity", + "operations" + ], + "type": "object" + }, + "DeliveryRateLimitCheckpointV1": { + "properties": { + "limit": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "remaining": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "reset_at_micros": { + "format": "int64", + "type": "integer" + } + }, + "required": [ + "limit", + "remaining", + "reset_at_micros" + ], + "type": "object" + }, + "DeliveryReleaseAssetV1": { + "properties": { + "asset_id": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "content_type": { + "type": "string" + }, + "created_at_micros": { + "format": "int64", + "type": "integer" + }, + "digest": { + "type": [ + "string", + "null" + ] + }, + "download_count": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "download_url": { + "type": "string" + }, + "label": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": "string" + }, + "size_bytes": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "updated_at_micros": { + "format": "int64", + "type": "integer" + } + }, + "required": [ + "asset_id", + "name", + "label", + "content_type", + "size_bytes", + "download_count", + "download_url", + "digest", + "created_at_micros", + "updated_at_micros" + ], + "type": "object" + }, + "DeliveryReleaseTimelineV1": { + "properties": { + "items": { + "items": { + "$ref": "#/$defs/DeliveryReleaseV1" + }, + "type": "array" + }, + "truncated": { + "type": "boolean" + } + }, + "required": [ + "items", + "truncated" + ], + "type": "object" + }, + "DeliveryReleaseV1": { + "properties": { + "assets": { + "items": { + "$ref": "#/$defs/DeliveryReleaseAssetV1" + }, + "type": "array" + }, + "created_at_micros": { + "format": "int64", + "type": "integer" + }, + "draft": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "label": { + "type": "string" + }, + "name": { + "type": [ + "string", + "null" + ] + }, + "prerelease": { + "type": "boolean" + }, + "published_at_micros": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "release_id": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "source_url": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "required": [ + "id", + "label", + "release_id", + "tag", + "name", + "source_url", + "draft", + "prerelease", + "created_at_micros", + "published_at_micros", + "assets" + ], + "type": "object" + }, + "DeliveryReviewAuthorClassV1": { + "enum": [ + "bot", + "maintainer", + "other_observed_role" + ], + "type": "string" + }, + "DeliveryReviewBodyPreviewV1": { + "properties": { + "text": { + "type": "string" + }, + "truncated": { + "type": "boolean" + } + }, + "required": [ + "text", + "truncated" + ], + "type": "object" + }, + "DeliveryReviewItemV1": { + "properties": { + "comment_id": { + "type": "string" + }, + "id": { + "type": "string" + }, + "label": { + "type": "string" + }, + "observations": { + "items": { + "$ref": "#/$defs/DeliveryReviewObservationV1" + }, + "type": "array" + }, + "provider": { + "type": "string" + }, + "pull_request_id": { + "type": "string" + } + }, + "required": [ + "id", + "label", + "provider", + "pull_request_id", + "comment_id", + "observations" + ], + "type": "object" + }, + "DeliveryReviewLifecycleV1": { + "enum": [ + "current", + "outdated", + "resolved", + "edited", + "deleted" + ], + "type": "string" + }, + "DeliveryReviewObservationKindV1": { + "enum": [ + "latest_attempt", + "last_complete" + ], + "type": "string" + }, + "DeliveryReviewObservationV1": { + "properties": { + "author_class": { + "$ref": "#/$defs/DeliveryReviewAuthorClassV1" + }, + "body_preview": { + "anyOf": [ + { + "$ref": "#/$defs/DeliveryReviewBodyPreviewV1" + }, + { + "type": "null" + } + ], + "description": "Bounded sanitized preview hydrated through the canonical body\nauthority; `None` is the typed not-expanded state. The retained body\nanchor and digest stay server-private and never cross this wire." + }, + "kind": { + "$ref": "#/$defs/DeliveryReviewObservationKindV1" + }, + "lifecycle": { + "$ref": "#/$defs/DeliveryReviewLifecycleV1" + }, + "line": { + "description": "Current-diff line; absent when the thread is outdated on the provider.", + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "observed_at_micros": { + "format": "int64", + "type": "integer" + }, + "operation": { + "$ref": "#/$defs/DeliveryGitHubReadOperationV1" + }, + "original_line": { + "description": "Line on the original reviewed commit.", + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "path": { + "description": "Provider-observed repository-relative path of the review thread.", + "type": "string" + }, + "provider_outcome": { + "$ref": "#/$defs/DeliveryGitHubOutcomeV1" + }, + "reply_to_comment_id": { + "type": [ + "string", + "null" + ] + }, + "repository_id": { + "type": "string" + }, + "review_id": { + "type": [ + "string", + "null" + ] + }, + "review_state": { + "$ref": "#/$defs/DeliveryReviewStateV1" + }, + "source_url": { + "type": [ + "string", + "null" + ] + }, + "thread_id": { + "type": [ + "string", + "null" + ] + }, + "version_digest": { + "type": "string" + } + }, + "required": [ + "operation", + "kind", + "version_digest", + "repository_id", + "review_id", + "thread_id", + "reply_to_comment_id", + "path", + "line", + "original_line", + "author_class", + "review_state", + "lifecycle", + "provider_outcome", + "body_preview", + "observed_at_micros", + "source_url" + ], + "type": "object" + }, + "DeliveryReviewStateV1": { + "enum": [ + "approved", + "changes_requested", + "commented", + "dismissed", + "pending", + "unknown" + ], + "type": "string" + }, + "DeliveryReviewTimelineV1": { + "properties": { + "expected_head_commit": { + "type": "string" + }, + "items": { + "items": { + "$ref": "#/$defs/DeliveryReviewItemV1" + }, + "type": "array" + }, + "retained_head_commit": { + "type": "string" + }, + "total_retained": { + "description": "Retained review items enumerated by the source read, shown or not.", + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "truncated": { + "type": "boolean" + } + }, + "required": [ + "retained_head_commit", + "expected_head_commit", + "items", + "total_retained", + "truncated" + ], + "type": "object" + }, + "DoctorCoverageCompletenessV1": { + "description": "Whether Doctor observed all of a family's evidence sources.", + "oneOf": [ + { + "const": "complete", + "description": "Every relevant evidence source for the family was observed.", + "type": "string" + }, + { + "const": "partial", + "description": "Some evidence sources were observed; others were omitted.", + "type": "string" + }, + { + "const": "unknown", + "description": "Whether coverage is complete could not be determined.", + "type": "string" + } + ] + }, + "DoctorCoverageStatementV1": { + "description": "A bounded, human-readable coverage statement plus its completeness.", + "properties": { + "completeness": { + "$ref": "#/$defs/DoctorCoverageCompletenessV1" + }, + "statement": { + "type": "string" + } + }, + "required": [ + "completeness", + "statement" + ], + "type": "object" + }, + "DoctorEvidenceRefV1": { + "description": "A typed reference to one piece of evidence Doctor composed into a finding.\n\nThe `family` records which audited input surface produced the evidence, so\na finding may cross-cite evidence from more than one family without losing\nprovenance.", + "properties": { + "family": { + "$ref": "#/$defs/DoctorFindingFamilyV1" + }, + "reference": { + "$ref": "#/$defs/DoctorEvidenceReferenceV1" + } + }, + "required": [ + "family", + "reference" + ], + "type": "object" + }, + "DoctorEvidenceReferenceV1": { + "description": "Durable, non-disclosing reference to one owning-authority evidence\nrecord (for example a `FeedbackFindingId`, configuration revision, or\nruntime read coverage anchor). Doctor stores the reference only; the\nowning authority remains the single source of the record.", + "type": "string" + }, + "DoctorEvidenceStateV1": { + "description": "Exact Doctor evidence states.\n\nMissing, partial, or unknown truth never becomes healthy or clean. Only\n[`DoctorEvidenceStateV1::HealthyCompleteCoverage`] asserts a healthy result,\nand only when its finding carries complete coverage (see\n[`DoctorFindingV1::new`]).", + "oneOf": [ + { + "const": "unsupported", + "description": "The owning authority does not support this evidence on this platform.", + "type": "string" + }, + { + "const": "absent", + "description": "The evidence source is supported but produced nothing.", + "type": "string" + }, + { + "const": "stale", + "description": "The evidence exists but is behind the current generation/watermark.", + "type": "string" + }, + { + "const": "degraded", + "description": "The evidence proves a degraded but observed condition.", + "type": "string" + }, + { + "const": "partial", + "description": "Only part of the evidence was observed.", + "type": "string" + }, + { + "const": "unknown", + "description": "The evidence state could not be determined.", + "type": "string" + }, + { + "const": "denied", + "description": "Authorization to read the evidence was denied.", + "type": "string" + }, + { + "const": "healthy_complete_coverage", + "description": "The evidence proves a healthy condition with complete coverage.", + "type": "string" + } + ] + }, + "DoctorFamilyConsultationV1": { + "description": "Whether a family was consulted from an observed source or is unavailable.", + "oneOf": [ + { + "description": "A source produced observed evidence for this family.", + "properties": { + "status": { + "const": "consulted", + "type": "string" + } + }, + "required": [ + "status" + ], + "type": "object" + }, + { + "description": "Complete family coverage was unavailable. Storage may still carry\nfindings from resolved producers when an independent producer failed.", + "properties": { + "reason": { + "$ref": "#/$defs/DoctorFamilyUnavailableReasonV1" + }, + "status": { + "const": "unavailable", + "type": "string" + } + }, + "required": [ + "status", + "reason" + ], + "type": "object" + } + ] + }, + "DoctorFamilyCoverageV1": { + "description": "The consultation status of one finding family within a report.", + "properties": { + "consultation": { + "$ref": "#/$defs/DoctorFamilyConsultationV1" + }, + "family": { + "$ref": "#/$defs/DoctorFindingFamilyV1" + } + }, + "required": [ + "family", + "consultation" + ], + "type": "object" + }, + "DoctorFamilyUnavailableReasonV1": { + "description": "Why complete coverage of a finding family was unavailable.", + "oneOf": [ + { + "const": "unwired", + "description": "No source port is wired for this family in this composition.", + "type": "string" + }, + { + "const": "unsupported", + "description": "The source is unsupported on this build/platform.", + "type": "string" + }, + { + "const": "absent", + "description": "The source is supported but produced nothing.", + "type": "string" + }, + { + "const": "denied", + "description": "The source read was denied.", + "type": "string" + }, + { + "const": "unknown", + "description": "The source state could not be determined.", + "type": "string" + }, + { + "const": "unavailable", + "description": "The source could not be reached. Named separately from `Unknown`: the\nsource is identified and its unreachability is an observation, not an\nundetermined state.", + "type": "string" + }, + { + "const": "reset_required", + "description": "The source must be rebuilt before it can be read again.", + "type": "string" + }, + { + "const": "corrupt", + "description": "The source was read and found corrupt.", + "type": "string" + } + ] + }, + "DoctorFindingFamilyV1": { + "description": "Stable Doctor finding families.\n\nThe initial list covers advisory findings from\nBrain, Explorer, Loom, Code, and Observatory, plus the legacy\n`core_doctor` checks (graph quick-check, temporal/migration health,\nconfiguration compatibility drift, semantic runtime, session ingest).\nEach family maps to one audited typed input surface. The set is kept small\nand honest; new families are added through a future versioned enum rather\nthan by widening the meaning of an existing variant.", + "oneOf": [ + { + "const": "advisory", + "description": "advisory/scout findings (GitHub review, CI localization,\nproximity, context scout) — `crate::advisory` / domain feedback.", + "type": "string" + }, + { + "const": "configuration", + "description": "Desired-versus-effective configuration and compatibility drift from\n`ProjectConfigurationRuntime` / `ConfigurationControlPlane`.", + "type": "string" + }, + { + "const": "storage_runtime", + "description": "Store, graph, and temporal runtime health plus migration coverage\n(`RuntimeReadOperationV1` health family, `StoreRuntimeClientLease`).", + "type": "string" + }, + { + "const": "storage", + "description": "Storage retention, size, and efficiency over canonical observability\nread models. Distinct from [`Self::StorageRuntime`] health: this\nfamily surfaces over-budget stores, identity-drift orphans, quarantined\nincident debris, and retention backlog. The typed\nsubclass vocabulary is [`DoctorStorageFindingKindV1`].", + "type": "string" + }, + { + "const": "language_server", + "description": "Language-server / analyzer engine status from the LSP gateway's\n`AnalyzerState`.", + "type": "string" + }, + { + "const": "semantic_index", + "description": "Semantic search / index runtime state (indexing, stale, unavailable).", + "type": "string" + }, + { + "const": "observability", + "description": "Denominator-safe measurement and telemetry health from analytics,\naccounting read models, and session ingest.", + "type": "string" + } + ] + }, + "DoctorFindingV1": { + "description": "One canonical Doctor finding.\n\nA finding pins its diagnosis `family`, its evidence `state`, the typed\nevidence it composed, and a coverage statement. Construction enforces the\ninvariants that keep unknown/partial evidence from collapsing into a\nhealthy or clean result.", + "properties": { + "coverage": { + "$ref": "#/$defs/DoctorCoverageStatementV1" + }, + "evidence": { + "items": { + "$ref": "#/$defs/DoctorEvidenceRefV1" + }, + "type": "array" + }, + "family": { + "$ref": "#/$defs/DoctorFindingFamilyV1" + }, + "state": { + "$ref": "#/$defs/DoctorEvidenceStateV1" + } + }, + "required": [ + "family", + "state", + "evidence", + "coverage" + ], + "type": "object" + }, + "DoctorFindingsPayloadV1": { + "description": "The canonical Doctor report projection for the read-only dashboard.", + "properties": { + "entries": { + "items": { + "$ref": "#/$defs/DoctorReportEntryV1" + }, + "type": "array" + }, + "family_filter": { + "anyOf": [ + { + "$ref": "#/$defs/DoctorFindingFamilyV1" + }, + { + "type": "null" + } + ] + }, + "known_families": { + "items": { + "$ref": "#/$defs/DoctorFindingFamilyV1" + }, + "type": "array" + }, + "note": { + "type": "string" + }, + "report_coverage": { + "anyOf": [ + { + "$ref": "#/$defs/DoctorReportCoverageV1" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "family_filter", + "entries", + "report_coverage", + "known_families", + "note" + ], + "type": "object" + }, + "DoctorReportCoverageV1": { + "description": "The report-wide coverage statement: which families were consulted versus\nunavailable, plus an overall completeness and a bounded human statement.", + "properties": { + "completeness": { + "$ref": "#/$defs/DoctorCoverageCompletenessV1" + }, + "families": { + "items": { + "$ref": "#/$defs/DoctorFamilyCoverageV1" + }, + "type": "array" + }, + "statement": { + "$ref": "#/$defs/DoctorCoverageStatementV1" + } + }, + "required": [ + "families", + "completeness", + "statement" + ], + "type": "object" + }, + "DoctorReportEntryV1": { + "description": "One entry in a Doctor report: a canonical finding plus, for the storage\nfamily, its typed subclass. The subclass is present only for storage findings\n(a non-storage entry never carries one).", + "properties": { + "finding": { + "$ref": "#/$defs/DoctorFindingV1" + }, + "storage_kind": { + "anyOf": [ + { + "$ref": "#/$defs/DoctorStorageFindingKindV1" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "finding", + "storage_kind" + ], + "type": "object" + }, + "DoctorStorageFindingKindV1": { + "description": "Typed subclasses of the [`DoctorFindingFamilyV1::Storage`] finding family.\n\nThe storage family never reports a silent overage: each subclass names one\nobservable retention/size condition Doctor surfaces over canonical size\nobservability read models. The set is closed and grows only through a future\nversioned enum, never by widening an existing subclass.", + "oneOf": [ + { + "const": "over_budget_store", + "description": "A store exceeds its owner-configured soft size budget.", + "type": "string" + }, + { + "const": "orphan_store", + "description": "A store whose project identity no longer resolves to a live repository\nroot (identity-drift orphan), reported with age and size.", + "type": "string" + }, + { + "const": "incident_debris_present", + "description": "Quarantined recovery/corruption artifacts are present and awaiting\ncollection.", + "type": "string" + }, + { + "const": "retention_backlog", + "description": "Retention-eligible rows or stores are past their window and awaiting\noffload/collection.", + "type": "string" + }, + { + "const": "table_growth", + "description": "Per-table SQLite payload growth observed between two retained\nwatermarks, including baseline and unavailable measurement states.", + "type": "string" + } + ] + }, + "DuplicateEffectOutcomeV1": { + "enum": [ + "prevented", + "committed", + "unknown", + "not_applicable" + ], + "type": "string" + }, + "DuplicateEffortKindV1": { + "enum": [ + "exact_duplicate", + "superseded_overlap", + "repeated_investigation", + "duplicate_effect", + "not_duplicate", + "censored", + "unknown" + ], + "type": "string" + }, + "EffectClass": { + "description": "The stable effect classification of one application operation.\n\nGit index writes remain separate classes so policy cannot accidentally\nsubstitute one index mutation for another.", + "enum": [ + "read", + "preview", + "source_edit", + "git_index_stage", + "git_index_unstage", + "git_index_commit", + "configuration_write", + "administrative" + ], + "type": "string" + }, + "EffectReceipt": { + "additionalProperties": false, + "description": "Durable effect proof. It records identities and receipts, never credentials\nor arbitrary command text.", + "properties": { + "actor": { + "$ref": "#/$defs/ActorId" + }, + "catalog_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "committed_state": { + "anyOf": [ + { + "$ref": "#/$defs/ManifestDigest" + }, + { + "type": "null" + } + ] + }, + "configuration_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "effect_class": { + "$ref": "#/$defs/EffectClass" + }, + "expected_state": { + "$ref": "#/$defs/ManifestDigest" + }, + "external_proof": { + "anyOf": [ + { + "$ref": "#/$defs/RetrievalAnchorId" + }, + { + "type": "null" + } + ] + }, + "idempotency_key": { + "type": "string" + }, + "input_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "operation": { + "$ref": "#/$defs/UseCaseId" + }, + "outcome": { + "$ref": "#/$defs/EffectTermination" + }, + "policy_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "privacy_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "request_id": { + "type": "string" + }, + "scope": { + "$ref": "#/$defs/ResolvedScope" + } + }, + "required": [ + "operation", + "request_id", + "actor", + "scope", + "effect_class", + "idempotency_key", + "input_digest", + "expected_state", + "policy_digest", + "configuration_digest", + "catalog_digest", + "privacy_digest", + "outcome", + "committed_state", + "external_proof" + ], + "type": "object" + }, + "EffectTermination": { + "description": "Durable effect receipt terminal state.", + "enum": [ + "completed", + "cancelled", + "timed_out", + "failed", + "partial", + "effect_unknown" + ], + "type": "string" + }, + "EnvironmentSettingsPayloadV1": { + "properties": { + "global_accounting_enabled": { + "type": "boolean" + }, + "global_accounting_mode": { + "type": "string" + }, + "pricing_offline": { + "type": "boolean" + }, + "variables": { + "items": { + "$ref": "#/$defs/EnvironmentVariableV1" + }, + "type": "array" + } + }, + "required": [ + "global_accounting_mode", + "global_accounting_enabled", + "pricing_offline", + "variables" + ], + "type": "object" + }, + "EnvironmentVariableV1": { + "properties": { + "active": { + "type": "boolean" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "value": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "name", + "active", + "value", + "description" + ], + "type": "object" + }, + "EvidenceCoverage": { + "additionalProperties": false, + "description": "Deterministic coverage fold input for an evidence packet.", + "properties": { + "completeness": { + "$ref": "#/$defs/CoverageCompleteness" + }, + "domains": { + "items": { + "$ref": "#/$defs/CoverageDomainState" + }, + "type": "array" + }, + "eligible": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "requested_domains": { + "items": { + "$ref": "#/$defs/EvidenceDomain" + }, + "type": "array" + }, + "returned": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "visited": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "requested_domains", + "visited", + "eligible", + "returned", + "completeness", + "domains" + ], + "type": "object" + }, + "EvidenceDomain": { + "description": "Requested evidence domain for bounded coverage and omissions.", + "enum": [ + "symbol", + "source", + "graph", + "test", + "temporal", + "anchor", + "operational", + "diagnostic" + ], + "type": "string" + }, + "ExecutionBlockedCauseV1": { + "description": "Cause a work item was blocked for.", + "enum": [ + "dependency", + "needs_input", + "capability", + "policy", + "scope", + "conflict", + "lease", + "backpressure", + "test", + "ci", + "review", + "effect_unknown", + "other", + "unknown" + ], + "type": "string" + }, + "ExecutionConcurrencyPhaseV1": { + "description": "Concurrency-width phase. `Useful` counts only distinct admitted\nattempts that advanced a committed progress frontier; heartbeats,\nqueued work, child processes, and transport fanout never reach it.", + "enum": [ + "requested", + "accepted", + "admitted", + "active", + "useful" + ], + "type": "string" + }, + "ExecutionConflictKindV1": { + "description": "Conflict prediction kind. Mechanical and semantic keep separate\ndenominators because their adjudicators are not interchangeable.", + "enum": [ + "mechanical", + "semantic", + "combined" + ], + "type": "string" + }, + "ExecutionConflictOutcomeV1": { + "description": "Independently observed conflict outcome. `Censored` and `Unknown`\nnever enter a confusion-matrix denominator.", + "enum": [ + "conflict", + "no_conflict", + "censored", + "unknown" + ], + "type": "string" + }, + "ExecutionDeliveryOutcomeV1": { + "description": "Per-surface delivery outcome. A multi-surface delivery is never a\nduplicate of product work; only `Deduplicated` is.", + "enum": [ + "delivered", + "deduplicated", + "dropped", + "unknown" + ], + "type": "string" + }, + "ExecutionDuplicateKindV1": { + "description": "Adjudicated duplicate-work relation. Similarity, proximity, shared\npaths, and concurrency never produce one of these.", + "enum": [ + "exact_duplicate", + "superseded_overlap", + "repeated_investigation", + "duplicate_effect", + "not_duplicate", + "censored", + "unknown" + ], + "type": "string" + }, + "ExecutionDuplicateOutcomeV1": { + "description": "Whether a duplicate effect was prevented or actually committed. The\ntwo never collapse into one count.", + "enum": [ + "prevented", + "committed", + "unknown", + "not_applicable" + ], + "type": "string" + }, + "ExecutionDurationBucketV1": { + "description": "Fixed duration buckets shared by stale stack age, blocked time, and\nrerun latency. Raw timestamps and exact durations stay authorized\nlocal detail.", + "enum": [ + "under1m", + "from1m_to5m", + "from5m_to15m", + "from15m_to1h", + "from1h_to4h", + "from4h_to24h", + "from1d_to7d", + "over7d" + ], + "type": "string" + }, + "ExecutionFanoutPhaseV1": { + "description": "Fan-out width phase. `PeakActive` is the sampled active width; the\nfan-out distribution is unweighted so serialized and blocked samples,\nwhich carry no interval, are preserved rather than dropped.", + "enum": [ + "requested", + "accepted", + "admitted", + "peak_active", + "useful" + ], + "type": "string" + }, + "ExecutionGitHubStackCapabilityReadingV1": { + "additionalProperties": false, + "description": "Latest trustworthy GitHub stacked-PR capability observation in the\nhorizon. It is a typed operational state, not a metric or success claim.", + "properties": { + "capability": { + "anyOf": [ + { + "$ref": "#/$defs/ExecutionGitHubStackCapabilityV1" + }, + { + "type": "null" + } + ] + }, + "coverage": { + "$ref": "#/$defs/MetricCoverageV1" + }, + "other_forge_fallback_available": { + "type": [ + "boolean", + "null" + ] + }, + "standard_git_fallback_available": { + "type": [ + "boolean", + "null" + ] + }, + "unavailable": { + "anyOf": [ + { + "$ref": "#/$defs/ExecutionMetricUnavailableV1" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "capability", + "standard_git_fallback_available", + "other_forge_fallback_available", + "coverage", + "unavailable" + ], + "title": "ExecutionGitHubStackCapabilityReadingV1", + "type": "object" + }, + "ExecutionGitHubStackCapabilityV1": { + "description": "Last bounded GitHub stacked-PR capability state observed in the\nhorizon. This remains orthogonal to GitHub ingress and item lifecycle.", + "enum": [ + "unavailable", + "private_preview_disabled", + "enabled", + "degraded" + ], + "type": "string" + }, + "ExecutionIntegrationKindV1": { + "description": "Integration operation kind. Rebase remains external observation only.", + "enum": [ + "fast_forward", + "merge_commit", + "rebase", + "cherry_pick", + "stack_retarget", + "graph_only", + "external_observed", + "unknown" + ], + "type": "string" + }, + "ExecutionIntegrationOutcomeV1": { + "description": "Terminal result of an observed native integration.", + "enum": [ + "succeeded", + "conflicted", + "rejected", + "denied", + "stale", + "locked", + "cancelled", + "timed_out", + "failed", + "partial", + "effect_unknown", + "unsupported", + "unknown" + ], + "type": "string" + }, + "ExecutionIntervalStateV1": { + "description": "Whether the owning drift interval is still open or exactly closed.", + "enum": [ + "open", + "closed" + ], + "type": "string" + }, + "ExecutionLeakKindV1": { + "description": "Independently proved execution-leak class.", + "enum": [ + "lease_after_terminal", + "attempt_without_live_owner", + "effect_unknown_past_deadline", + "missing_worktree_binding", + "unbounded_delivery", + "none", + "unknown" + ], + "type": "string" + }, + "ExecutionLeakOutcomeV1": { + "description": "Recovery state a proved leak reached.", + "enum": [ + "not_required", + "pending", + "recovered", + "failed", + "unknown" + ], + "type": "string" + }, + "ExecutionMetricUnavailableV1": { + "description": "Why a measurement carries no value. Absence is always one of these typed\nreasons; it is never an empty string, a zero, or a silently dropped row.", + "oneOf": [ + { + "const": "store_unavailable", + "description": "The observation store could not be read at all for this horizon.", + "type": "string" + }, + { + "const": "event_budget_exceeded", + "description": "The horizon holds more events than one read may draw, so every\ndenominator here would be a partial count presented as a total.", + "type": "string" + }, + { + "const": "cell_budget_exceeded", + "description": "The bounded projection would exceed the Plan 26 result-cell ceiling.\nThe whole read refuses rather than returning a misleading subset.", + "type": "string" + }, + { + "const": "no_eligible_evidence", + "description": "No recorded event in the family supplies this metric's numerator or\ndenominator.", + "type": "string" + }, + { + "const": "support_floor_unmet", + "description": "Eligible cases exist but fall below the metric's support floor.", + "type": "string" + }, + { + "const": "coverage_floor_unmet", + "description": "Observed cases cover less of the eligible population than the metric's\ncoverage floor allows.", + "type": "string" + }, + { + "const": "censoring_ceiling_exceeded", + "description": "More of the eligible population is censored than the metric admits.", + "type": "string" + }, + { + "const": "unbounded_interval", + "description": "The interval this metric integrates over has no proved upper bound, so\nits duration cannot be measured without inventing a terminal.", + "type": "string" + } + ] + }, + "ExecutionQuantityUnitV1": { + "description": "Quantity unit for duplicate-effort accounting. Each unit is reported\nseparately: wall time, tokens, cost, tests, and effects are never\nsummed into one number.", + "enum": [ + "wall_micros", + "tokens", + "cost_micros", + "tests", + "effects" + ], + "type": "string" + }, + "ExecutionRerunCauseV1": { + "description": "Typed rerun cause. Repeated logs and transport redelivery are not\nreruns and never carry one of these.", + "enum": [ + "runtime_retry", + "runtime_fallback", + "test_rerun", + "ci_rerun", + "recovery", + "human_requested", + "unknown" + ], + "type": "string" + }, + "ExecutionRerunSourceV1": { + "description": "Which independent system observed the rerun.", + "enum": [ + "runtime", + "test", + "ci" + ], + "type": "string" + }, + "ExecutionStackDriftKindV1": { + "description": "Exact reason a stack became stale. The enum is bounded and never\ncarries a branch, ref, worktree, repository, or provider identity.", + "enum": [ + "head_advanced", + "base_advanced", + "merge_base_changed", + "retargeted", + "superseded" + ], + "type": "string" + }, + "ExecutionSurfaceFamilyV1": { + "description": "Delivery surface family. Addresses, payloads, principals, and\nrecipients are never observed, so the family is the whole label.", + "enum": [ + "hook", + "mcp", + "lsp", + "dashboard", + "cli", + "other" + ], + "type": "string" + }, + "ExecutionTopologyDimensionV1": { + "description": "One allowed local grouping dimension. The set is closed by construction:\nevery value is produced by an exhaustive match over a bounded domain class,\nso no person, agent, task, project, repository, worktree, branch, ref,\ncommit, model version, or route can ever appear as a label.", + "oneOf": [ + { + "properties": { + "dimension": { + "const": "concurrency_phase", + "type": "string" + }, + "value": { + "$ref": "#/$defs/ExecutionConcurrencyPhaseV1" + } + }, + "required": [ + "dimension", + "value" + ], + "type": "object" + }, + { + "properties": { + "dimension": { + "const": "fanout_phase", + "type": "string" + }, + "value": { + "$ref": "#/$defs/ExecutionFanoutPhaseV1" + } + }, + "required": [ + "dimension", + "value" + ], + "type": "object" + }, + { + "properties": { + "dimension": { + "const": "width_bucket", + "type": "string" + }, + "value": { + "$ref": "#/$defs/ExecutionWidthBucketV1" + } + }, + "required": [ + "dimension", + "value" + ], + "type": "object" + }, + { + "properties": { + "dimension": { + "const": "duration_bucket", + "type": "string" + }, + "value": { + "$ref": "#/$defs/ExecutionDurationBucketV1" + } + }, + "required": [ + "dimension", + "value" + ], + "type": "object" + }, + { + "properties": { + "dimension": { + "const": "duplicate_kind", + "type": "string" + }, + "value": { + "$ref": "#/$defs/ExecutionDuplicateKindV1" + } + }, + "required": [ + "dimension", + "value" + ], + "type": "object" + }, + { + "properties": { + "dimension": { + "const": "unit", + "type": "string" + }, + "value": { + "$ref": "#/$defs/ExecutionQuantityUnitV1" + } + }, + "required": [ + "dimension", + "value" + ], + "type": "object" + }, + { + "properties": { + "dimension": { + "const": "duplicate_outcome", + "type": "string" + }, + "value": { + "$ref": "#/$defs/ExecutionDuplicateOutcomeV1" + } + }, + "required": [ + "dimension", + "value" + ], + "type": "object" + }, + { + "properties": { + "dimension": { + "const": "conflict_kind", + "type": "string" + }, + "value": { + "$ref": "#/$defs/ExecutionConflictKindV1" + } + }, + "required": [ + "dimension", + "value" + ], + "type": "object" + }, + { + "properties": { + "dimension": { + "const": "conflict_outcome", + "type": "string" + }, + "value": { + "$ref": "#/$defs/ExecutionConflictOutcomeV1" + } + }, + "required": [ + "dimension", + "value" + ], + "type": "object" + }, + { + "properties": { + "dimension": { + "const": "integration_kind", + "type": "string" + }, + "value": { + "$ref": "#/$defs/ExecutionIntegrationKindV1" + } + }, + "required": [ + "dimension", + "value" + ], + "type": "object" + }, + { + "properties": { + "dimension": { + "const": "integration_outcome", + "type": "string" + }, + "value": { + "$ref": "#/$defs/ExecutionIntegrationOutcomeV1" + } + }, + "required": [ + "dimension", + "value" + ], + "type": "object" + }, + { + "properties": { + "dimension": { + "const": "stack_drift_kind", + "type": "string" + }, + "value": { + "$ref": "#/$defs/ExecutionStackDriftKindV1" + } + }, + "required": [ + "dimension", + "value" + ], + "type": "object" + }, + { + "properties": { + "dimension": { + "const": "interval_state", + "type": "string" + }, + "value": { + "$ref": "#/$defs/ExecutionIntervalStateV1" + } + }, + "required": [ + "dimension", + "value" + ], + "type": "object" + }, + { + "properties": { + "dimension": { + "const": "blocked_cause", + "type": "string" + }, + "value": { + "$ref": "#/$defs/ExecutionBlockedCauseV1" + } + }, + "required": [ + "dimension", + "value" + ], + "type": "object" + }, + { + "properties": { + "dimension": { + "const": "rerun_source", + "type": "string" + }, + "value": { + "$ref": "#/$defs/ExecutionRerunSourceV1" + } + }, + "required": [ + "dimension", + "value" + ], + "type": "object" + }, + { + "properties": { + "dimension": { + "const": "rerun_cause", + "type": "string" + }, + "value": { + "$ref": "#/$defs/ExecutionRerunCauseV1" + } + }, + "required": [ + "dimension", + "value" + ], + "type": "object" + }, + { + "properties": { + "dimension": { + "const": "leak_kind", + "type": "string" + }, + "value": { + "$ref": "#/$defs/ExecutionLeakKindV1" + } + }, + "required": [ + "dimension", + "value" + ], + "type": "object" + }, + { + "properties": { + "dimension": { + "const": "leak_outcome", + "type": "string" + }, + "value": { + "$ref": "#/$defs/ExecutionLeakOutcomeV1" + } + }, + "required": [ + "dimension", + "value" + ], + "type": "object" + }, + { + "properties": { + "dimension": { + "const": "surface", + "type": "string" + }, + "value": { + "$ref": "#/$defs/ExecutionSurfaceFamilyV1" + } + }, + "required": [ + "dimension", + "value" + ], + "type": "object" + }, + { + "properties": { + "dimension": { + "const": "delivery_outcome", + "type": "string" + }, + "value": { + "$ref": "#/$defs/ExecutionDeliveryOutcomeV1" + } + }, + "required": [ + "dimension", + "value" + ], + "type": "object" + } + ] + }, + "ExecutionTopologyDrillAnchorV1": { + "additionalProperties": false, + "description": "An opaque cursor minted by the registered observation authority. It can be\nresolved only through that same authorized local query boundary and is not\na metric dimension or exportable identity.", + "properties": { + "cursor": { + "type": "string" + } + }, + "required": [ + "cursor" + ], + "title": "ExecutionTopologyDrillAnchorV1", + "type": "object" + }, + "ExecutionTopologyEmissionCoverageV1": { + "additionalProperties": false, + "description": "Envelope-level delivery evidence for this read. `None` means the store did\nnot answer, so no zero may be inferred. `dropped` is the proved lower bound\nfrom the bound producer scope, deduplicated across explicit loss receipts\nand their next-envelope carriers; it is not attributed to a topology\nfamily. Sampling stays a count of sampled topology envelopes and is never\nexpanded into a fabricated population estimate.", + "properties": { + "delayed": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "dropped": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "emitted": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "sampled_events": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "emitted", + "delayed", + "dropped", + "sampled_events" + ], + "title": "ExecutionTopologyEmissionCoverageV1", + "type": "object" + }, + "ExecutionTopologyMeasurementV1": { + "additionalProperties": false, + "description": "One descriptor cell: the Plan 26 descriptor name, its grouping dimensions,\nand the landed metric envelope carrying value, denominator, coverage, and\nprovenance.", + "properties": { + "dimensions": { + "description": "Allowed local grouping dimensions, at most\n[`MAX_METRIC_DIMENSIONS_V1`], in a fixed order per descriptor.", + "items": { + "$ref": "#/$defs/ExecutionTopologyDimensionV1" + }, + "type": "array" + }, + "unavailable": { + "anyOf": [ + { + "$ref": "#/$defs/ExecutionMetricUnavailableV1" + }, + { + "type": "null" + } + ], + "description": "Typed absence reason. It is `Some` exactly when `value.value` is\n`None`, so a reader can never mistake a refused metric for a zero." + }, + "value": { + "$ref": "#/$defs/MetricValueV1" + } + }, + "required": [ + "dimensions", + "unavailable", + "value" + ], + "title": "ExecutionTopologyMeasurementV1", + "type": "object" + }, + "ExecutionTopologyMetricsRequestV1": { + "additionalProperties": false, + "description": "One horizon-bounded execution-topology metrics read. The authorized scope\nis taken from the request context, not from the request, so a caller can\nnever widen the population it reads.", + "properties": { + "horizon": { + "$ref": "#/$defs/ObservabilityHorizonV1" + }, + "max_events": { + "description": "Event budget for this read, at most\n[`MAX_EXECUTION_TOPOLOGY_EVENTS_V1`].", + "format": "uint32", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "horizon", + "max_events" + ], + "title": "ExecutionTopologyMetricsRequestV1", + "type": "object" + }, + "ExecutionTopologyMetricsV1": { + "additionalProperties": false, + "description": "The canonical execution-topology read model. Observatory and Costs render\nthis without local formulas; CLI, MCP, and HTTP return the same bytes.", + "properties": { + "authorized_scope_ref": { + "description": "Local authorization anchor the read was admitted under. It is derived\nfrom the resolved scope, never from a caller-supplied string.", + "type": "string" + }, + "coverage": { + "$ref": "#/$defs/MetricCoverageV1", + "description": "Family-level coverage over the event population, independent of any\nsingle descriptor's denominator." + }, + "current": { + "description": "True only when the whole family was read with `Known` coverage. A\nfalse value means at least one descriptor below is a typed absence.", + "type": "boolean" + }, + "drill_anchors": { + "description": "Bounded registered source cursors for authorized local drill-down.\nPayload anchors, traces, and scope identifiers never enter this list.", + "items": { + "$ref": "#/$defs/ExecutionTopologyDrillAnchorV1" + }, + "type": "array" + }, + "emission_coverage": { + "$ref": "#/$defs/ExecutionTopologyEmissionCoverageV1" + }, + "github_stack_capability": { + "$ref": "#/$defs/ExecutionGitHubStackCapabilityReadingV1" + }, + "horizon": { + "$ref": "#/$defs/ObservabilityHorizonV1" + }, + "measurements": { + "items": { + "$ref": "#/$defs/ExecutionTopologyMeasurementV1" + }, + "type": "array" + }, + "observed_at_micros": { + "format": "int64", + "type": "integer" + }, + "watermark": { + "description": "Watermark of the last event this projection consumed. A rebuild at the\nsame watermark yields the same values.", + "type": "string" + } + }, + "required": [ + "authorized_scope_ref", + "horizon", + "watermark", + "observed_at_micros", + "current", + "coverage", + "emission_coverage", + "github_stack_capability", + "drill_anchors", + "measurements" + ], + "title": "ExecutionTopologyMetricsV1", + "type": "object" + }, + "ExecutionTopologyViewV1": { + "description": "The application-owned execution-topology view. Absence of any Work in\nscope is a typed state, distinct from an authorized-but-empty page.", + "oneOf": [ + { + "additionalProperties": false, + "description": "No Work exists in this authority scope, so there is no topology to\ndraw. Concealed scopes are refused before any read.", + "properties": { + "state": { + "const": "absent", + "type": "string" + } + }, + "required": [ + "state" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "The four dimensions, pinned to one verified topology generation.", + "properties": { + "branch_topology": { + "$ref": "#/$defs/BranchTopologyPolicyV1" + }, + "coverage": { + "$ref": "#/$defs/WorkAttemptListCoverageV1" + }, + "execution_placement": { + "$ref": "#/$defs/WorkTopologyExecutionPlacementV1" + }, + "integration_strategy": { + "$ref": "#/$defs/WorkTopologyIntegrationStrategyV1" + }, + "review_topology": { + "$ref": "#/$defs/ReviewTopologyPolicyV1" + }, + "state": { + "const": "view", + "type": "string" + }, + "topology": { + "$ref": "#/$defs/WorkAttemptTopologyBindingV1" + } + }, + "required": [ + "state", + "topology", + "coverage", + "execution_placement", + "branch_topology", + "review_topology", + "integration_strategy" + ], + "type": "object" + } + ], + "title": "ExecutionTopologyViewV1" + }, + "ExecutionWidthBucketV1": { + "description": "Fixed width buckets. Raw widths stay authorized local detail; only\nbucket counts leave the projection.", + "enum": [ + "zero", + "one", + "two", + "from3_to4", + "from5_to8", + "from9_to16", + "from17_to32", + "from33_to64", + "over64" + ], + "type": "string" + }, + "ExplorerFinalityV1": { + "enum": [ + "pending", + "complete", + "partial", + "cancelled", + "timed_out", + "error" + ], + "type": "string" + }, + "ExplorerQueryRequestV1": { + "additionalProperties": false, + "properties": { + "limit": { + "default": 25, + "format": "int64", + "type": "integer" + }, + "offset": { + "default": 0, + "format": "int64", + "type": "integer" + }, + "query": { + "type": "string" + } + }, + "required": [ + "query", + "limit", + "offset" + ], + "type": "object" + }, + "ExplorerQueryRunV1": { + "properties": { + "completed_at_micros": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "elapsed_micros": { + "format": "int64", + "type": "integer" + }, + "explanation": { + "type": "string" + }, + "finality": { + "$ref": "#/$defs/ExplorerFinalityV1" + }, + "merge_revision": { + "type": "string" + }, + "ordering_policy": { + "type": "string" + }, + "plan_revision": { + "type": "string" + }, + "request": { + "$ref": "#/$defs/ExplorerQueryRequestV1" + }, + "request_revision": { + "type": "string" + }, + "required_source_ids": { + "items": { + "$ref": "#/$defs/ExplorerSourceIdV1" + }, + "maxItems": 4, + "minItems": 4, + "type": "array" + }, + "run_id": { + "type": "string" + }, + "sources": { + "items": { + "$ref": "#/$defs/ExplorerSourceProgressV1" + }, + "type": "array" + }, + "state": { + "$ref": "#/$defs/ExplorerRunStateV1" + }, + "submitted_at_micros": { + "format": "int64", + "type": "integer" + } + }, + "required": [ + "run_id", + "request", + "request_revision", + "plan_revision", + "merge_revision", + "required_source_ids", + "ordering_policy", + "explanation", + "submitted_at_micros", + "completed_at_micros", + "elapsed_micros", + "state", + "finality", + "sources" + ], + "type": "object" + }, + "ExplorerReadContextV1": { + "properties": { + "counts": { + "$ref": "#/$defs/ExplorerSessionCountsV1" + }, + "has_more": { + "type": "boolean" + }, + "has_more_messages": { + "type": "boolean" + }, + "has_more_summary_nodes": { + "type": "boolean" + }, + "limit": { + "format": "int64", + "type": "integer" + }, + "messages": { + "items": { + "$ref": "#/$defs/LcmMessageV1" + }, + "type": "array" + }, + "offset": { + "format": "int64", + "type": "integer" + }, + "order": { + "type": "string" + }, + "session_id": { + "type": "string" + }, + "storage_scope": { + "type": "string" + }, + "summary_nodes": { + "items": { + "$ref": "#/$defs/LcmSummaryNodeV1" + }, + "type": "array" + } + }, + "required": [ + "session_id", + "storage_scope", + "limit", + "offset", + "order", + "counts", + "messages", + "summary_nodes", + "has_more", + "has_more_messages", + "has_more_summary_nodes" + ], + "type": "object" + }, + "ExplorerResultPageV1": { + "properties": { + "limit": { + "format": "int64", + "type": "integer" + }, + "metadata": true, + "next_offset": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "offset": { + "format": "int64", + "type": "integer" + }, + "rows": { + "items": true, + "type": "array" + }, + "total": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "offset", + "limit", + "total", + "next_offset", + "rows", + "metadata" + ], + "type": "object" + }, + "ExplorerRunStateV1": { + "enum": [ + "pending", + "completed", + "partial", + "cancelled", + "timed_out", + "error" + ], + "type": "string" + }, + "ExplorerSessionCountsV1": { + "properties": { + "message_count": { + "format": "int64", + "type": "integer" + }, + "source_token_count": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "summary_node_count": { + "format": "int64", + "type": "integer" + }, + "summary_token_count": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "token_estimate_total": { + "description": "Complete session token estimate from the LCM size authority, or\ntyped-absent when the bounded estimate did not cover the session.", + "format": "int64", + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "message_count", + "summary_node_count", + "summary_token_count", + "source_token_count", + "token_estimate_total" + ], + "type": "object" + }, + "ExplorerSessionSizeV1": { + "properties": { + "counts": { + "$ref": "#/$defs/ExplorerSessionCountsV1" + }, + "session_id": { + "type": "string" + }, + "storage_scope": { + "type": "string" + } + }, + "required": [ + "session_id", + "storage_scope", + "counts" + ], + "type": "object" + }, + "ExplorerSourceIdV1": { + "enum": [ + "code_graph", + "sessions", + "knowledge", + "semantic" + ], + "type": "string" + }, + "ExplorerSourceOutcomeV1": { + "description": "What one source truthfully concluded for this run. Every member has a real\nproducer; none is speculative:\n- `Partial`: the source answered with rows but its own read reported\n omitted records (LCM temporal reads).\n- `Indexing`: the provider is acquiring its model or projecting vectors\n (semantic runtime acquisition/indexing states).\n- `Stale`: the source's store exists but does not match the current\n generation (verified graph stale reads, LCM stale projections, semantic\n generation staleness).\n- `TimedOut`: the source's own read exceeded the admitted deadline.\n- `Unsupported`: this dashboard surface cannot consult the source at all\n (no daemon authority attached, or the provider state cannot be consumed\n on this surface yet).\n- `Absent`: the source's store does not exist for this project — a typed\n absence, not a failure (semantic search not activated).", + "enum": [ + "pending", + "ready", + "partial", + "indexing", + "stale", + "timed_out", + "unavailable", + "unsupported", + "absent", + "error", + "cancelled" + ], + "type": "string" + }, + "ExplorerSourcePhaseV1": { + "enum": [ + "queued", + "reading", + "completed", + "cancelled" + ], + "type": "string" + }, + "ExplorerSourceProgressV1": { + "properties": { + "completed_units": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "coverage": { + "$ref": "#/$defs/DashboardCoverageV1" + }, + "error_code": { + "type": [ + "string", + "null" + ] + }, + "freshness": { + "type": "string" + }, + "message": { + "type": [ + "string", + "null" + ] + }, + "outcome": { + "$ref": "#/$defs/ExplorerSourceOutcomeV1" + }, + "page": { + "anyOf": [ + { + "$ref": "#/$defs/ExplorerResultPageV1" + }, + { + "type": "null" + } + ] + }, + "phase": { + "$ref": "#/$defs/ExplorerSourcePhaseV1" + }, + "source_id": { + "$ref": "#/$defs/ExplorerSourceIdV1" + }, + "source_label": { + "type": "string" + }, + "total_units": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "watermark": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "source_id", + "source_label", + "phase", + "outcome", + "completed_units", + "total_units", + "coverage", + "freshness", + "watermark", + "error_code", + "message", + "page" + ], + "type": "object" + }, + "FactArmCoverageV1": { + "properties": { + "completeness": { + "type": "string" + }, + "limit": { + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "returned": { + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "truncated": { + "type": "boolean" + } + }, + "required": [ + "completeness", + "returned", + "truncated", + "limit" + ], + "type": "object" + }, + "FactAssertionId": { + "description": "Strongly typed canonical identity: `FactAssertionId`.", + "type": "string" + }, + "FactCategoryV1": { + "enum": [ + "general", + "user_pref", + "project", + "tool", + "decision", + "code_area" + ], + "type": "string" + }, + "FactCommitDispositionV1": { + "enum": [ + "committed", + "idempotent_replay" + ], + "type": "string" + }, + "FactCommitOwnerV1": { + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "kind": { + "const": "profile", + "type": "string" + } + }, + "required": [ + "kind" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "kind": { + "const": "project", + "type": "string" + }, + "project_id": { + "$ref": "#/$defs/ProjectId" + } + }, + "required": [ + "kind", + "project_id" + ], + "type": "object" + } + ] + }, + "FactCommitReceiptV1": { + "additionalProperties": false, + "properties": { + "active_assertion_id": { + "anyOf": [ + { + "$ref": "#/$defs/FactAssertionId" + }, + { + "type": "null" + } + ] + }, + "committed_event_ids": { + "items": { + "$ref": "#/$defs/FactEventId" + }, + "type": "array" + }, + "disposition": { + "$ref": "#/$defs/FactCommitDispositionV1" + }, + "fact_id": { + "$ref": "#/$defs/FactId" + }, + "last_event_id": { + "$ref": "#/$defs/FactEventId" + }, + "owner": { + "$ref": "#/$defs/FactCommitOwnerV1" + } + }, + "required": [ + "disposition", + "fact_id", + "owner", + "committed_event_ids", + "last_event_id", + "active_assertion_id" + ], + "type": "object" + }, + "FactEventId": { + "description": "Strongly typed canonical identity: `FactEventId`.", + "type": "string" + }, + "FactId": { + "description": "Strongly typed canonical identity: `FactId`.", + "type": "string" + }, + "FactMatchArmV1": { + "properties": { + "collision_warning": { + "type": "string" + }, + "coverage": { + "$ref": "#/$defs/FactArmCoverageV1" + }, + "facts": { + "items": true, + "type": "array" + }, + "match_basis": { + "type": "string" + }, + "strength": { + "type": "string" + } + }, + "required": [ + "match_basis", + "strength", + "collision_warning", + "coverage", + "facts" + ], + "type": "object" + }, + "FactMatchesMeasurementV1": { + "properties": { + "arms": { + "items": { + "$ref": "#/$defs/FactMatchArmV1" + }, + "type": "array" + }, + "caption": { + "type": "string" + }, + "entity_matches": { + "items": true, + "type": "array" + }, + "granularity": { + "type": "string" + }, + "identity_semantics": { + "type": "string" + }, + "name": { + "type": "string" + }, + "node": { + "$ref": "#/$defs/NodeRefV1" + }, + "normalized_name": { + "type": "string" + }, + "payload_fts_matches": { + "items": true, + "type": "array" + }, + "same_name_collision_possible": { + "type": "boolean" + } + }, + "required": [ + "node", + "name", + "normalized_name", + "granularity", + "identity_semantics", + "caption", + "same_name_collision_possible", + "entity_matches", + "payload_fts_matches", + "arms" + ], + "type": "object" + }, + "FactSearchGraphCoverageV1": { + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "kind": { + "const": "not_applicable", + "type": "string" + } + }, + "required": [ + "kind" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "kind": { + "const": "not_mounted", + "type": "string" + } + }, + "required": [ + "kind" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "expanded_fact_count": { + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "kind": { + "const": "complete", + "type": "string" + }, + "relation_count": { + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "root_count": { + "format": "uint", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "kind", + "root_count", + "relation_count", + "expanded_fact_count" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "kind": { + "const": "degraded", + "type": "string" + }, + "reason": { + "$ref": "#/$defs/FactSearchGraphDegradationV1" + } + }, + "required": [ + "kind", + "reason" + ], + "type": "object" + } + ] + }, + "FactSearchGraphDegradationV1": { + "enum": [ + "conflict", + "unavailable", + "budget_exhausted", + "deadline_exceeded" + ], + "type": "string" + }, + "FactStoreCurateRequestV1": { + "additionalProperties": false, + "description": "Closed public launcher for the automatic Memory Curator.\n\nRun identity, task selection, operations, proposals, approval, and apply\nauthority are deliberately absent and rejected by `deny_unknown_fields`.", + "properties": { + "fact_review_limit": { + "default": 24, + "format": "uint32", + "maximum": 1000, + "minimum": 1, + "type": "integer" + }, + "min_confidence_millionths": { + "default": 720000, + "format": "uint32", + "maximum": 1000000, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "fact_review_limit", + "min_confidence_millionths" + ], + "type": "object" + }, + "FeedbackCoverageV1": { + "enum": [ + "known", + "partial", + "stale", + "unknown", + "sampled", + "capped" + ], + "type": "string" + }, + "FeedbackFindingId": { + "description": "Strongly typed canonical identity: `FeedbackFindingId`.", + "type": "string" + }, + "FeedbackObservationDenominatorsV1": { + "additionalProperties": false, + "properties": { + "delayed": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "dropped": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "eligible": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "emitted": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "incomplete_boots": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "persisted": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "retention_dropped": { + "format": "uint64", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "eligible", + "persisted", + "emitted", + "delayed", + "dropped", + "retention_dropped", + "incomplete_boots" + ], + "type": "object" + }, + "FeedbackObservationReadModelV1": { + "additionalProperties": false, + "properties": { + "coverage": { + "$ref": "#/$defs/FeedbackCoverageV1" + }, + "denominators": { + "$ref": "#/$defs/FeedbackObservationDenominatorsV1" + }, + "event_counts": { + "additionalProperties": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "type": "object" + }, + "first_observed_at": { + "anyOf": [ + { + "$ref": "#/$defs/UtcMicros" + }, + { + "type": "null" + } + ] + }, + "last_observed_at": { + "anyOf": [ + { + "$ref": "#/$defs/UtcMicros" + }, + { + "type": "null" + } + ] + }, + "rejected_argument_groups": { + "default": [], + "items": { + "$ref": "#/$defs/FeedbackRejectedArgumentGroupV1" + }, + "type": "array" + }, + "schema_version": { + "format": "uint16", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "system_quality": { + "$ref": "#/$defs/FeedbackSystemQualityReadModelV1" + }, + "total_count": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "watermark": { + "$ref": "#/$defs/FeedbackObservationWatermarkV1" + } + }, + "required": [ + "schema_version", + "total_count", + "first_observed_at", + "last_observed_at", + "event_counts", + "rejected_argument_groups", + "coverage", + "watermark", + "denominators", + "system_quality" + ], + "type": "object" + }, + "FeedbackObservationWatermarkV1": { + "additionalProperties": false, + "properties": { + "observed_through": { + "anyOf": [ + { + "$ref": "#/$defs/UtcMicros" + }, + { + "type": "null" + } + ] + }, + "producer_boot_id": { + "anyOf": [ + { + "$ref": "#/$defs/ManifestDigest" + }, + { + "type": "null" + } + ] + }, + "producer_sequence": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "producer_boot_id", + "producer_sequence", + "observed_through" + ], + "type": "object" + }, + "FeedbackRejectedArgumentGroupV1": { + "additionalProperties": false, + "description": "One surface × operation × argument × error-class cell projected from\ndispatcher rejection source events.", + "properties": { + "argument": { + "$ref": "#/$defs/RejectedArgumentNameV1" + }, + "count": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "error_class": { + "$ref": "#/$defs/RejectedArgumentErrorClassV1" + }, + "operation": { + "type": "string" + }, + "surface": { + "$ref": "#/$defs/RejectedArgumentSurfaceV1" + } + }, + "required": [ + "surface", + "operation", + "argument", + "error_class", + "count" + ], + "type": "object" + }, + "FeedbackSystemMetricDenominatorV1": { + "enum": [ + "eligible_observations", + "relevance_labels", + "eligible_source_families", + "latency_samples", + "returned_and_omitted_items", + "outcome_observations", + "revocation_observations", + "stack_transition_observations" + ], + "type": "string" + }, + "FeedbackSystemMetricKindV1": { + "enum": [ + "coverage", + "relevance", + "diversity", + "latency", + "omission", + "denial", + "staleness", + "revocation_propagation", + "stack_transitions" + ], + "type": "string" + }, + "FeedbackSystemMetricUnavailableReasonV1": { + "enum": [ + "no_eligible_observations", + "no_relevance_labels", + "no_diversity_observations", + "no_latency_samples", + "no_truncation_observations", + "no_outcome_observations", + "no_revocation_observations", + "no_stack_transition_observations" + ], + "type": "string" + }, + "FeedbackSystemMetricUnitV1": { + "enum": [ + "ratio", + "microseconds", + "transitions" + ], + "type": "string" + }, + "FeedbackSystemMetricV1": { + "additionalProperties": false, + "properties": { + "coverage": { + "$ref": "#/$defs/FeedbackCoverageV1" + }, + "denominator": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "denominator_population": { + "$ref": "#/$defs/FeedbackSystemMetricDenominatorV1" + }, + "metric": { + "$ref": "#/$defs/FeedbackSystemMetricKindV1" + }, + "numerator": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "unavailable_reason": { + "anyOf": [ + { + "$ref": "#/$defs/FeedbackSystemMetricUnavailableReasonV1" + }, + { + "type": "null" + } + ] + }, + "unit": { + "$ref": "#/$defs/FeedbackSystemMetricUnitV1" + }, + "value": { + "format": "double", + "type": [ + "number", + "null" + ] + } + }, + "required": [ + "metric", + "value", + "unit", + "numerator", + "denominator", + "denominator_population", + "coverage", + "unavailable_reason" + ], + "type": "object" + }, + "FeedbackSystemQualityReadModelV1": { + "additionalProperties": false, + "properties": { + "metrics": { + "items": { + "$ref": "#/$defs/FeedbackSystemMetricV1" + }, + "type": "array" + }, + "schema_version": { + "format": "uint16", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "schema_version", + "metrics" + ], + "type": "object" + }, + "GenerateProposalRequest": { + "additionalProperties": false, + "description": "Read-only proposal generation over one exact current product graph.", + "properties": { + "live_git_evidence": { + "anyOf": [ + { + "$ref": "#/$defs/WorkEvidenceFrontierV1" + }, + { + "type": "null" + } + ], + "default": null + }, + "occurred_at": { + "$ref": "#/$defs/UtcMicros" + }, + "proposal_id": { + "$ref": "#/$defs/ProposalId" + }, + "selection": { + "$ref": "#/$defs/WorkProductSelectionScopeV1" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + } + }, + "required": [ + "selection", + "task_id", + "proposal_id", + "live_git_evidence", + "occurred_at" + ], + "type": "object" + }, + "GeneratedWorkProposal": { + "additionalProperties": false, + "description": "A canonical product proposal and the exact verified graph that licensed it.\n\n`proposal` can be moved directly into a `DecideWorkProposalRequestV1`;\ncallers use `verified_graph_version` to construct that mutation's CAS pin.", + "properties": { + "calibration": { + "$ref": "#/$defs/WorkCalibrationEvidenceV1" + }, + "decision": { + "$ref": "#/$defs/WorkProposalDecisionV1" + }, + "proposal": { + "$ref": "#/$defs/WorkProposalV1" + }, + "verified_graph_version": { + "$ref": "#/$defs/VerifiedWorkGraphVersionV1" + } + }, + "required": [ + "proposal", + "verified_graph_version", + "decision", + "calibration" + ], + "type": "object" + }, + "GitHubStackedPullRequestPolicyV1": { + "enum": [ + "disabled", + "probe_private_preview" + ], + "type": "string" + }, + "GraphCappedV1": { + "properties": { + "edges": { + "type": "boolean" + }, + "nodes": { + "type": "boolean" + } + }, + "required": [ + "nodes", + "edges" + ], + "type": "object" + }, + "GraphEdgeV1": { + "properties": { + "kind": { + "type": "string" + }, + "line": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "source": { + "type": "string" + }, + "source_name": { + "type": [ + "string", + "null" + ] + }, + "target": { + "type": "string" + }, + "target_name": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "source", + "target", + "kind", + "line", + "source_name", + "target_name" + ], + "type": "object" + }, + "GraphKindCountV1": { + "properties": { + "count": { + "format": "int64", + "type": "integer" + }, + "kind": { + "type": "string" + } + }, + "required": [ + "kind", + "count" + ], + "type": "object" + }, + "GraphLanguageCountV1": { + "properties": { + "count": { + "format": "int64", + "type": "integer" + }, + "language": { + "type": "string" + } + }, + "required": [ + "language", + "count" + ], + "type": "object" + }, + "GraphLargestFileV1": { + "properties": { + "node_count": { + "format": "int64", + "type": "integer" + }, + "path": { + "type": "string" + } + }, + "required": [ + "path", + "node_count" + ], + "type": "object" + }, + "GraphLimitsV1": { + "properties": { + "edges": { + "format": "int64", + "type": "integer" + }, + "nodes": { + "format": "int64", + "type": "integer" + } + }, + "required": [ + "nodes", + "edges" + ], + "type": "object" + }, + "GraphNeighborsPayloadV1": { + "properties": { + "callees": { + "items": { + "$ref": "#/$defs/GraphNodeV1" + }, + "type": "array" + }, + "callers": { + "items": { + "$ref": "#/$defs/GraphNodeV1" + }, + "type": "array" + }, + "depth": { + "format": "int64", + "type": "integer" + }, + "edges": { + "items": { + "$ref": "#/$defs/GraphEdgeV1" + }, + "type": "array" + }, + "edges_by_kind": { + "items": { + "$ref": "#/$defs/GraphKindCountV1" + }, + "type": "array" + }, + "limit": { + "format": "int64", + "type": "integer" + }, + "node_id": { + "type": "string" + } + }, + "required": [ + "node_id", + "depth", + "limit", + "callers", + "callees", + "edges", + "edges_by_kind" + ], + "type": "object" + }, + "GraphNodePayloadV1": { + "properties": { + "node": { + "$ref": "#/$defs/GraphNodeV1" + } + }, + "required": [ + "node" + ], + "type": "object" + }, + "GraphNodeV1": { + "properties": { + "assertions": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "attrs_start_line": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "branches": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "degree": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "doc": { + "type": [ + "string", + "null" + ] + }, + "edge_kind": { + "type": [ + "string", + "null" + ] + }, + "edge_line": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "end_column": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "end_line": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "file_path": { + "type": [ + "string", + "null" + ] + }, + "id": { + "type": "string" + }, + "is_async": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "kind": { + "type": "string" + }, + "loops": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "max_nesting": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "name": { + "type": [ + "string", + "null" + ] + }, + "parent_id": { + "type": [ + "string", + "null" + ] + }, + "qualified_name": { + "type": [ + "string", + "null" + ] + }, + "returns": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "signature": { + "type": [ + "string", + "null" + ] + }, + "span": { + "anyOf": [ + { + "$ref": "#/$defs/GraphSpanV1" + }, + { + "type": "null" + } + ] + }, + "start_column": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "start_line": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "unchecked_calls": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "unsafe_blocks": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "updated_at": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "visibility": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "id", + "kind", + "name", + "qualified_name", + "file_path", + "start_line", + "end_line", + "start_column", + "end_column", + "attrs_start_line", + "doc", + "signature", + "visibility", + "is_async", + "branches", + "loops", + "returns", + "max_nesting", + "unsafe_blocks", + "unchecked_calls", + "assertions", + "updated_at", + "parent_id", + "degree", + "span", + "edge_kind", + "edge_line" + ], + "type": "object" + }, + "GraphOverviewPayloadV1": { + "properties": { + "edges_by_kind": { + "items": { + "$ref": "#/$defs/GraphKindCountV1" + }, + "type": "array" + }, + "files_by_language": { + "items": { + "$ref": "#/$defs/GraphLanguageCountV1" + }, + "type": "array" + }, + "largest_files": { + "items": { + "$ref": "#/$defs/GraphLargestFileV1" + }, + "type": "array" + }, + "nodes_by_kind": { + "items": { + "$ref": "#/$defs/GraphKindCountV1" + }, + "type": "array" + }, + "path": { + "type": "string" + }, + "top_connected": { + "items": { + "$ref": "#/$defs/GraphNodeV1" + }, + "type": "array" + }, + "totals": { + "$ref": "#/$defs/GraphTotalsV1" + } + }, + "required": [ + "totals", + "nodes_by_kind", + "edges_by_kind", + "files_by_language", + "largest_files", + "path", + "top_connected" + ], + "type": "object" + }, + "GraphPathPayloadV1": { + "properties": { + "edges": { + "items": { + "$ref": "#/$defs/GraphEdgeV1" + }, + "type": "array" + }, + "found": { + "type": "boolean" + }, + "from": { + "type": "string" + }, + "max_depth": { + "format": "int64", + "type": "integer" + }, + "nodes": { + "items": { + "$ref": "#/$defs/GraphNodeV1" + }, + "type": "array" + }, + "path": { + "items": { + "type": "string" + }, + "type": "array" + }, + "to": { + "type": "string" + } + }, + "required": [ + "from", + "to", + "found", + "path", + "nodes", + "edges", + "max_depth" + ], + "type": "object" + }, + "GraphSearchPayloadV1": { + "properties": { + "count": { + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "limit": { + "format": "int64", + "type": "integer" + }, + "offset": { + "format": "int64", + "type": "integer" + }, + "query": { + "type": "string" + }, + "results": { + "items": { + "$ref": "#/$defs/GraphNodeV1" + }, + "type": "array" + }, + "total": { + "format": "int64", + "type": "integer" + } + }, + "required": [ + "query", + "limit", + "offset", + "total", + "count", + "results" + ], + "type": "object" + }, + "GraphSpanV1": { + "properties": { + "attrs_start_line": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "end_column": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "end_line": { + "format": "int64", + "type": "integer" + }, + "start_column": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "start_line": { + "format": "int64", + "type": "integer" + } + }, + "required": [ + "start_line", + "end_line", + "start_column", + "end_column", + "attrs_start_line" + ], + "type": "object" + }, + "GraphSubgraphPayloadV1": { + "properties": { + "capped": { + "$ref": "#/$defs/GraphCappedV1" + }, + "edges": { + "items": { + "$ref": "#/$defs/GraphEdgeV1" + }, + "type": "array" + }, + "limits": { + "$ref": "#/$defs/GraphLimitsV1" + }, + "mode": { + "type": "string" + }, + "nodes": { + "items": { + "$ref": "#/$defs/GraphNodeV1" + }, + "type": "array" + }, + "seed_id": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "seed_id", + "mode", + "nodes", + "edges", + "capped", + "limits" + ], + "type": "object" + }, + "GraphTotalsV1": { + "properties": { + "edges": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "files": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "nodes": { + "format": "uint64", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "nodes", + "edges", + "files" + ], + "type": "object" + }, + "HandoffOpenKindV1": { + "enum": [ + "investigation", + "task" + ], + "type": "string" + }, + "HandoffOpenTargetV1": { + "oneOf": [ + { + "properties": { + "finding_id": { + "$ref": "#/$defs/FeedbackFindingId" + }, + "kind": { + "const": "investigation", + "type": "string" + }, + "owner_version_digest": { + "$ref": "#/$defs/ManifestDigest" + } + }, + "required": [ + "kind", + "finding_id", + "owner_version_digest" + ], + "type": "object" + }, + { + "properties": { + "kind": { + "const": "task", + "type": "string" + }, + "owner_version_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + }, + "version": { + "format": "uint64", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "kind", + "task_id", + "version", + "owner_version_digest" + ], + "type": "object" + } + ] + }, + "HistoryRewritePolicyV1": { + "enum": [ + "forbid_force_and_rebase" + ], + "type": "string" + }, + "IncomingCallEdgeV1": { + "properties": { + "kind": { + "type": "string" + }, + "line": { + "format": "uint32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "source": { + "type": "string" + }, + "target": { + "type": "string" + } + }, + "required": [ + "source", + "target", + "kind", + "line" + ], + "type": "object" + }, + "LatencyDistributionReadModelV1": { + "description": "p50/p95/p99 for one provider operation latency stage.", + "properties": { + "p50": { + "$ref": "#/$defs/MetricValueV1" + }, + "p95": { + "$ref": "#/$defs/MetricValueV1" + }, + "p99": { + "$ref": "#/$defs/MetricValueV1" + } + }, + "required": [ + "p50", + "p95", + "p99" + ], + "type": "object" + }, + "LcmCompressionSummaryV1": { + "properties": { + "node_count": { + "format": "int64", + "type": "integer" + }, + "ratio": { + "format": "double", + "type": [ + "number", + "null" + ] + }, + "source_token_count": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "token_count": { + "format": "int64", + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "source_token_count", + "token_count", + "ratio", + "node_count" + ], + "type": "object" + }, + "LcmDepthCountV1": { + "properties": { + "count": { + "format": "int64", + "type": "integer" + }, + "depth": { + "format": "int64", + "type": "integer" + } + }, + "required": [ + "depth", + "count" + ], + "type": "object" + }, + "LcmLatestSessionV1": { + "properties": { + "last_store_id": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "last_timestamp": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "message_count": { + "format": "int64", + "type": "integer" + }, + "session_id": { + "type": "string" + } + }, + "required": [ + "session_id", + "message_count", + "last_store_id", + "last_timestamp" + ], + "type": "object" + }, + "LcmMatchesV1": { + "properties": { + "messages": { + "items": { + "$ref": "#/$defs/LcmMessageV1" + }, + "type": "array" + }, + "summary_nodes": { + "items": { + "$ref": "#/$defs/LcmSummaryNodeV1" + }, + "type": "array" + } + }, + "required": [ + "messages", + "summary_nodes" + ], + "type": "object" + }, + "LcmMessageV1": { + "properties": { + "content": { + "type": [ + "string", + "null" + ] + }, + "message_id": { + "type": "string" + }, + "metadata_json": { + "type": [ + "string", + "null" + ] + }, + "ordinal": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "pinned": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "role": { + "type": [ + "string", + "null" + ] + }, + "session_id": { + "type": "string" + }, + "snippet": { + "default": null, + "type": [ + "string", + "null" + ] + }, + "source": { + "type": [ + "string", + "null" + ] + }, + "storage_kind": { + "type": [ + "string", + "null" + ] + }, + "store_id": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "summary_node_ids": { + "items": { + "type": "string" + }, + "type": "array" + }, + "timestamp": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "token_count": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "token_count_provenance": { + "anyOf": [ + { + "$ref": "#/$defs/LcmTokenCountProvenanceV1" + }, + { + "type": "null" + } + ] + }, + "tool_name": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "store_id", + "session_id", + "role", + "source", + "timestamp", + "token_count", + "token_count_provenance", + "content", + "message_id", + "ordinal", + "storage_kind", + "metadata_json", + "tool_name", + "pinned", + "summary_node_ids", + "snippet" + ], + "type": "object" + }, + "LcmOverviewPayloadV1": { + "properties": { + "exists": { + "type": "boolean" + }, + "latest_sessions": { + "items": { + "$ref": "#/$defs/LcmLatestSessionV1" + }, + "type": "array" + }, + "latest_summary_nodes": { + "items": { + "$ref": "#/$defs/LcmSummaryNodeV1" + }, + "type": "array" + }, + "limit": { + "format": "int64", + "type": "integer" + }, + "matches": { + "$ref": "#/$defs/LcmMatchesV1" + }, + "overview": { + "$ref": "#/$defs/LcmOverviewStatsV1" + }, + "path": { + "type": "string" + }, + "query": { + "type": "string" + }, + "storage_scope": { + "type": "string" + } + }, + "required": [ + "path", + "storage_scope", + "exists", + "overview", + "latest_sessions", + "latest_summary_nodes", + "matches", + "query", + "limit" + ], + "type": "object" + }, + "LcmOverviewStatsV1": { + "properties": { + "compression": { + "$ref": "#/$defs/LcmCompressionSummaryV1" + }, + "depth_counts": { + "items": { + "$ref": "#/$defs/LcmDepthCountV1" + }, + "type": "array" + }, + "max_summary_depth": { + "format": "int64", + "type": "integer" + }, + "messages_total": { + "format": "int64", + "type": "integer" + }, + "role_counts": { + "items": { + "$ref": "#/$defs/LcmRoleCountV1" + }, + "type": "array" + }, + "sessions_total": { + "format": "int64", + "type": "integer" + }, + "source_counts": { + "items": { + "$ref": "#/$defs/LcmSourceCountV1" + }, + "type": "array" + }, + "summary_node_sessions_total": { + "format": "int64", + "type": "integer" + }, + "summary_nodes_total": { + "format": "int64", + "type": "integer" + } + }, + "required": [ + "messages_total", + "sessions_total", + "summary_nodes_total", + "summary_node_sessions_total", + "max_summary_depth", + "role_counts", + "source_counts", + "depth_counts", + "compression" + ], + "type": "object" + }, + "LcmRoleCountV1": { + "properties": { + "count": { + "format": "int64", + "type": "integer" + }, + "role": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "role", + "count" + ], + "type": "object" + }, + "LcmSearchEngineDetailV1": { + "properties": { + "messages": { + "type": "string" + }, + "summary_nodes": { + "type": "string" + } + }, + "required": [ + "messages", + "summary_nodes" + ], + "type": "object" + }, + "LcmSearchFiltersV1": { + "properties": { + "role": { + "type": [ + "string", + "null" + ] + }, + "session_id": { + "type": [ + "string", + "null" + ] + }, + "since": { + "format": "double", + "type": [ + "number", + "null" + ] + }, + "source": { + "type": [ + "string", + "null" + ] + }, + "until": { + "format": "double", + "type": [ + "number", + "null" + ] + } + }, + "required": [ + "role", + "source", + "session_id", + "since", + "until" + ], + "type": "object" + }, + "LcmSearchPayloadV1": { + "properties": { + "engine": { + "type": "string" + }, + "engine_detail": { + "$ref": "#/$defs/LcmSearchEngineDetailV1" + }, + "exists": { + "type": "boolean" + }, + "filters": { + "$ref": "#/$defs/LcmSearchFiltersV1" + }, + "limit": { + "format": "int64", + "type": "integer" + }, + "matches": { + "$ref": "#/$defs/LcmMatchesV1" + }, + "next_cursor": { + "type": [ + "string", + "null" + ] + }, + "path": { + "type": "string" + }, + "query": { + "type": "string" + }, + "storage_scope": { + "type": "string" + }, + "total": { + "$ref": "#/$defs/LcmSearchTotalsV1" + } + }, + "required": [ + "path", + "storage_scope", + "exists", + "query", + "limit", + "next_cursor", + "engine", + "engine_detail", + "total", + "filters", + "matches" + ], + "type": "object" + }, + "LcmSearchTotalsV1": { + "properties": { + "messages": { + "format": "int64", + "type": "integer" + }, + "summary_nodes": { + "format": "int64", + "type": "integer" + } + }, + "required": [ + "messages", + "summary_nodes" + ], + "type": "object" + }, + "LcmSessionCountsV1": { + "properties": { + "message_count": { + "format": "int64", + "type": "integer" + }, + "source_token_count": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "summary_node_count": { + "format": "int64", + "type": "integer" + }, + "summary_token_count": { + "format": "int64", + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "message_count", + "summary_node_count", + "summary_token_count", + "source_token_count" + ], + "type": "object" + }, + "LcmSessionPayloadV1": { + "properties": { + "counts": { + "$ref": "#/$defs/LcmSessionCountsV1" + }, + "exists": { + "type": "boolean" + }, + "has_more": { + "type": "boolean" + }, + "has_more_messages": { + "type": "boolean" + }, + "has_more_summary_nodes": { + "type": "boolean" + }, + "limit": { + "format": "int64", + "type": "integer" + }, + "messages": { + "items": { + "$ref": "#/$defs/LcmMessageV1" + }, + "type": "array" + }, + "next_cursor": { + "type": [ + "string", + "null" + ] + }, + "path": { + "type": "string" + }, + "session_id": { + "type": "string" + }, + "storage_scope": { + "type": "string" + }, + "summary_nodes": { + "items": { + "$ref": "#/$defs/LcmSummaryNodeV1" + }, + "type": "array" + } + }, + "required": [ + "path", + "storage_scope", + "exists", + "session_id", + "limit", + "counts", + "messages", + "summary_nodes", + "has_more", + "has_more_messages", + "has_more_summary_nodes", + "next_cursor" + ], + "type": "object" + }, + "LcmSourceCountV1": { + "properties": { + "count": { + "format": "int64", + "type": "integer" + }, + "source": { + "type": "string" + } + }, + "required": [ + "source", + "count" + ], + "type": "object" + }, + "LcmSummaryNodeV1": { + "properties": { + "category": { + "type": "string" + }, + "created_at": { + "format": "int64", + "type": "integer" + }, + "depth": { + "format": "int64", + "type": "integer" + }, + "expand_hint": { + "type": "string" + }, + "latest_at": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "node_id": { + "type": "string" + }, + "recency": { + "default": null, + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "session_id": { + "type": "string" + }, + "snippet": { + "default": null, + "type": [ + "string", + "null" + ] + }, + "source_token_count": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "source_type": { + "type": "string" + }, + "summary": { + "type": "string" + }, + "token_count": { + "format": "int64", + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "node_id", + "session_id", + "depth", + "category", + "source_type", + "token_count", + "source_token_count", + "latest_at", + "created_at", + "expand_hint", + "summary", + "recency", + "snippet" + ], + "type": "object" + }, + "LcmTimelineBucketV1": { + "properties": { + "bucket": { + "type": "string" + }, + "count": { + "format": "int64", + "type": "integer" + }, + "known_message_count": { + "format": "int64", + "type": "integer" + }, + "token_count": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "token_count_provenance": { + "$ref": "#/$defs/LcmTokenCountProvenanceV1" + }, + "unknown_message_count": { + "format": "int64", + "type": "integer" + } + }, + "required": [ + "bucket", + "count", + "token_count", + "token_count_provenance", + "known_message_count", + "unknown_message_count" + ], + "type": "object" + }, + "LcmTimelineCoverageV1": { + "properties": { + "limit": { + "format": "int64", + "type": "integer" + }, + "next_before_bucket": { + "type": [ + "string", + "null" + ] + }, + "ordering": { + "type": "string" + }, + "returned_buckets": { + "format": "int64", + "type": "integer" + }, + "total_dated_buckets": { + "format": "int64", + "type": "integer" + }, + "truncated": { + "type": "boolean" + } + }, + "required": [ + "limit", + "returned_buckets", + "total_dated_buckets", + "truncated", + "ordering", + "next_before_bucket" + ], + "type": "object" + }, + "LcmTimelineNodeBucketV1": { + "properties": { + "bucket": { + "type": [ + "string", + "null" + ] + }, + "count": { + "format": "int64", + "type": "integer" + } + }, + "required": [ + "bucket", + "count" + ], + "type": "object" + }, + "LcmTimelinePayloadV1": { + "properties": { + "bucket": { + "type": "string" + }, + "buckets": { + "items": { + "$ref": "#/$defs/LcmTimelineBucketV1" + }, + "type": "array" + }, + "coverage": { + "anyOf": [ + { + "$ref": "#/$defs/LcmTimelineCoverageV1" + }, + { + "type": "null" + } + ], + "default": null + }, + "exists": { + "type": "boolean" + }, + "node_buckets": { + "items": { + "$ref": "#/$defs/LcmTimelineNodeBucketV1" + }, + "type": "array" + }, + "path": { + "type": "string" + }, + "session_id": { + "type": [ + "string", + "null" + ] + }, + "storage_scope": { + "type": "string" + }, + "undated": { + "$ref": "#/$defs/LcmTimelineUndatedV1" + } + }, + "required": [ + "path", + "storage_scope", + "exists", + "bucket", + "session_id", + "buckets", + "node_buckets", + "undated", + "coverage" + ], + "type": "object" + }, + "LcmTimelineUndatedV1": { + "properties": { + "count": { + "format": "int64", + "type": "integer" + }, + "known_message_count": { + "format": "int64", + "type": "integer" + }, + "token_count": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "token_count_provenance": { + "$ref": "#/$defs/LcmTokenCountProvenanceV1" + }, + "unknown_message_count": { + "format": "int64", + "type": "integer" + } + }, + "required": [ + "count", + "token_count", + "token_count_provenance", + "known_message_count", + "unknown_message_count" + ], + "type": "object" + }, + "LcmTokenCountProvenanceV1": { + "enum": [ + "o200k_approximate", + "unavailable" + ], + "type": "string" + }, + "LeakOwnerClassV1": { + "enum": [ + "work", + "workflow", + "git", + "delivery", + "unknown" + ], + "type": "string" + }, + "LegalAction": { + "description": "Bounded action an adapter may offer without inferring executable authority.", + "enum": [ + "correct_request", + "reauthorize", + "refresh", + "retry", + "reconcile", + "reset", + "restart_without_cursor", + "contact_administrator" + ], + "type": "string" + }, + "LinkAcceptedWorkAttemptRequestV1": { + "additionalProperties": false, + "properties": { + "based_on_version": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "identity": { + "$ref": "#/$defs/WorkAttemptIdentityV1" + }, + "mutation": { + "$ref": "#/$defs/WorkProductMutationIdentityV1" + }, + "selection": { + "$ref": "#/$defs/WorkProductSelectionScopeV1" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + } + }, + "required": [ + "selection", + "task_id", + "based_on_version", + "identity", + "mutation" + ], + "type": "object" + }, + "ListTaskHandoffsRequestV1": { + "additionalProperties": false, + "description": "Enumerates the handoff tokens this caller could redeem in one session.\n\nThe two `open_*` operations redeem a bearer the caller already holds; they\ncannot answer \"what has been handed to me and not yet taken up\". This one\ncan, and it does so without any bearer: the request carries no token, and\nthe result carries only digests.", + "properties": { + "session_id": { + "type": "string" + } + }, + "required": [ + "session_id" + ], + "type": "object" + }, + "ListTaskHandoffsResultV1": { + "additionalProperties": false, + "description": "The handoff-token frontier for one session.", + "properties": { + "consumed_count": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "expired_count": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "handoffs": { + "items": { + "$ref": "#/$defs/ListedTaskHandoffV1" + }, + "type": "array" + }, + "observed_at": { + "$ref": "#/$defs/UtcMicros", + "description": "The instant the states below were decided at. Without it, `open` and\n`expired` are claims with no clock behind them." + }, + "open_count": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "truncated": { + "description": "True when the enumeration ceiling was reached, so the counts describe a\nprefix of the frontier rather than all of it.", + "type": "boolean" + } + }, + "required": [ + "observed_at", + "handoffs", + "open_count", + "consumed_count", + "expired_count", + "truncated" + ], + "type": "object" + }, + "ListedTaskHandoffV1": { + "additionalProperties": false, + "description": "One handoff token, projected for public reading.\n\nMirrors [`IssueTaskHandoffResultV1`]'s doctrine: the complete binding stays\ninside the daemon authority, and only these identifiers cross the wire. No\nbearer secret exists to leak here — the authority never stored one — and the\nissuer's grant identity and policy digests stay concealed.", + "properties": { + "consumed_at": { + "anyOf": [ + { + "$ref": "#/$defs/UtcMicros" + }, + { + "type": "null" + } + ], + "description": "Set only when `state` is `consumed`." + }, + "expires_at": { + "$ref": "#/$defs/UtcMicros" + }, + "issued_at": { + "$ref": "#/$defs/UtcMicros" + }, + "issued_request_id": { + "type": "string" + }, + "kind": { + "$ref": "#/$defs/HandoffOpenKindV1" + }, + "session_id": { + "type": "string" + }, + "state": { + "$ref": "#/$defs/TaskHandoffTokenStateV1" + }, + "target": { + "$ref": "#/$defs/HandoffOpenTargetV1" + }, + "token_digest": { + "$ref": "#/$defs/ManifestDigest" + } + }, + "required": [ + "token_digest", + "issued_request_id", + "session_id", + "kind", + "target", + "issued_at", + "expires_at", + "state", + "consumed_at" + ], + "type": "object" + }, + "LocatorDigest": { + "description": "Strongly typed algorithm-tagged integrity digest: `LocatorDigest`.", + "type": "string" + }, + "LoomBranchSpanV1": { + "properties": { + "branch": { + "type": [ + "string", + "null" + ] + }, + "event_count": { + "format": "int64", + "type": "integer" + }, + "first_at": { + "format": "int64", + "type": "integer" + }, + "last_at": { + "format": "int64", + "type": "integer" + }, + "provider": { + "type": "string" + }, + "session_id": { + "type": "string" + }, + "source": { + "type": "string" + }, + "worktree": { + "type": "string" + } + }, + "required": [ + "provider", + "session_id", + "branch", + "worktree", + "first_at", + "last_at", + "event_count", + "source" + ], + "type": "object" + }, + "LoomCommitV1": { + "properties": { + "branch": { + "type": [ + "string", + "null" + ] + }, + "commit_sha": { + "type": "string" + }, + "committed_at": { + "format": "int64", + "type": "integer" + }, + "confidence": { + "format": "double", + "type": "number" + }, + "evidence": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "relation": { + "type": "string" + }, + "session_id": { + "type": "string" + }, + "span_overlap_kind": { + "type": [ + "string", + "null" + ] + }, + "worktree": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "provider", + "session_id", + "commit_sha", + "committed_at", + "branch", + "worktree", + "relation", + "evidence", + "confidence", + "span_overlap_kind" + ], + "type": "object" + }, + "LoomEditedFileV1": { + "properties": { + "change_type": { + "type": [ + "string", + "null" + ] + }, + "hunks": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "path": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "session_id": { + "type": "string" + } + }, + "required": [ + "provider", + "session_id", + "path", + "change_type", + "hunks" + ], + "type": "object" + }, + "LoomFileSessionProjectionV1": { + "properties": { + "authority": { + "type": "string" + }, + "eligible_sessions": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "granularity": { + "type": "string" + }, + "matched_sessions": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "providers": { + "items": { + "type": "string" + }, + "type": "array" + }, + "sessions": { + "items": true, + "type": "array" + } + }, + "required": [ + "granularity", + "authority", + "providers", + "eligible_sessions", + "matched_sessions", + "sessions" + ], + "type": "object" + }, + "LoomSessionModelV1": { + "properties": { + "model": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "model" + ], + "type": "object" + }, + "LoomSessionRowV1": { + "properties": { + "edited_files_recorded": { + "type": "boolean" + }, + "ended_at": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "is_subagent": { + "type": "boolean" + }, + "last_message_at": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "messages": { + "format": "int64", + "type": "integer" + }, + "models": { + "items": { + "$ref": "#/$defs/LoomSessionModelV1" + }, + "type": "array" + }, + "provider": { + "type": "string" + }, + "session_id": { + "type": "string" + }, + "started_at": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "title": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "provider", + "session_id", + "title", + "started_at", + "ended_at", + "last_message_at", + "is_subagent", + "messages", + "edited_files_recorded", + "models" + ], + "type": "object" + }, + "LoomSourceCoverageV1": { + "properties": { + "completeness": { + "type": "string" + }, + "eligible": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "examined": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "matched": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "omitted": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "reason": { + "type": "string" + }, + "unit": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "completeness", + "eligible", + "examined", + "matched", + "omitted", + "unit", + "reason" + ], + "type": "object" + }, + "LoomSourceStatusV1": { + "properties": { + "authority": { + "type": [ + "string", + "null" + ] + }, + "coverage": { + "$ref": "#/$defs/LoomSourceCoverageV1" + }, + "granularity": { + "type": "string" + }, + "id": { + "type": "string" + }, + "item_count": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "label": { + "type": "string" + }, + "providers": { + "items": { + "type": "string" + }, + "type": "array" + }, + "reason": { + "type": [ + "string", + "null" + ] + }, + "required_authority": { + "type": [ + "string", + "null" + ] + }, + "state": { + "$ref": "#/$defs/DashboardDomainStateV1" + } + }, + "required": [ + "id", + "label", + "state", + "authority", + "granularity", + "providers", + "item_count", + "reason", + "required_authority", + "coverage" + ], + "type": "object" + }, + "LoomTemporalPayloadV1": { + "properties": { + "available": { + "type": "boolean" + }, + "branch_spans": { + "items": { + "$ref": "#/$defs/LoomBranchSpanV1" + }, + "type": "array" + }, + "commits": { + "items": { + "$ref": "#/$defs/LoomCommitV1" + }, + "type": "array" + }, + "edited_files": { + "items": { + "$ref": "#/$defs/LoomEditedFileV1" + }, + "type": "array" + }, + "sessions": { + "items": { + "$ref": "#/$defs/LoomSessionRowV1" + }, + "type": "array" + }, + "source_statuses": { + "items": { + "$ref": "#/$defs/LoomSourceStatusV1" + }, + "type": "array" + }, + "temporal_refresh": { + "$ref": "#/$defs/LoomTemporalRefreshV1" + }, + "total": { + "format": "uint64", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "available", + "total", + "sessions", + "source_statuses", + "commits", + "edited_files", + "branch_spans", + "temporal_refresh" + ], + "type": "object" + }, + "LoomTemporalRefreshV1": { + "properties": { + "active_generations": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "authority": { + "type": "string" + }, + "latest_activated_at_micros": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "state": { + "$ref": "#/$defs/DashboardDomainStateV1" + } + }, + "required": [ + "state", + "active_generations", + "latest_activated_at_micros", + "authority" + ], + "type": "object" + }, + "ManifestDigest": { + "description": "Strongly typed algorithm-tagged integrity digest: `ManifestDigest`.", + "type": "string" + }, + "MemoryAlgebraStatusV1": { + "additionalProperties": false, + "properties": { + "estimated_capacity": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "hrr_dim": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "name", + "hrr_dim", + "estimated_capacity" + ], + "type": "object" + }, + "MemoryAutomationCurationAddDispositionV1": { + "enum": [ + "added", + "near_duplicate", + "possible_conflict" + ], + "type": "string" + }, + "MemoryAutomationCurationLinkDispositionV1": { + "enum": [ + "linked", + "already_linked" + ], + "type": "string" + }, + "MemoryAutomationCurationMergeV1": { + "additionalProperties": false, + "properties": { + "commit_receipts": { + "items": { + "$ref": "#/$defs/FactCommitReceiptV1" + }, + "type": "array" + }, + "content_updated": { + "type": "boolean" + }, + "deleted_loser_fact_ids": { + "items": { + "$ref": "#/$defs/FactId" + }, + "type": "array" + }, + "input_digest": { + "type": "string" + }, + "operation_id": { + "$ref": "#/$defs/ProvenanceId" + }, + "winner_fact_id": { + "$ref": "#/$defs/FactId" + } + }, + "required": [ + "operation_id", + "input_digest", + "winner_fact_id", + "content_updated", + "deleted_loser_fact_ids", + "commit_receipts" + ], + "type": "object" + }, + "MemoryAutomationCurationOperationEffectV1": { + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "closest_fact_id": { + "anyOf": [ + { + "$ref": "#/$defs/FactId" + }, + { + "type": "null" + } + ] + }, + "commit": { + "anyOf": [ + { + "$ref": "#/$defs/FactCommitReceiptV1" + }, + { + "type": "null" + } + ] + }, + "disposition": { + "$ref": "#/$defs/MemoryAutomationCurationAddDispositionV1" + }, + "fact_id": { + "$ref": "#/$defs/FactId" + }, + "kind": { + "const": "add", + "type": "string" + }, + "similarity_millionths": { + "format": "uint32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "kind", + "fact_id", + "disposition", + "closest_fact_id", + "similarity_millionths", + "commit" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "commit": { + "$ref": "#/$defs/FactCommitReceiptV1" + }, + "fact_id": { + "$ref": "#/$defs/FactId" + }, + "kind": { + "const": "update", + "type": "string" + }, + "trust_delta_millionths": { + "format": "int32", + "type": "integer" + } + }, + "required": [ + "kind", + "fact_id", + "trust_delta_millionths", + "commit" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "kind": { + "const": "merge", + "type": "string" + }, + "outcome": { + "$ref": "#/$defs/MemoryAutomationCurationMergeV1" + } + }, + "required": [ + "kind", + "outcome" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "commit": { + "anyOf": [ + { + "$ref": "#/$defs/FactCommitReceiptV1" + }, + { + "type": "null" + } + ] + }, + "disposition": { + "$ref": "#/$defs/MemoryAutomationCurationRemoveDispositionV1" + }, + "kind": { + "const": "remove", + "type": "string" + }, + "remaining_fact_count": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "target_fact_id": { + "$ref": "#/$defs/FactId" + } + }, + "required": [ + "kind", + "target_fact_id", + "disposition", + "remaining_fact_count", + "commit" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "commit": { + "$ref": "#/$defs/FactCommitReceiptV1" + }, + "fact_id": { + "$ref": "#/$defs/FactId" + }, + "kind": { + "const": "normalize_tags", + "type": "string" + } + }, + "required": [ + "kind", + "fact_id", + "commit" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "commit": { + "anyOf": [ + { + "$ref": "#/$defs/FactCommitReceiptV1" + }, + { + "type": "null" + } + ] + }, + "disposition": { + "$ref": "#/$defs/MemoryAutomationCurationLinkDispositionV1" + }, + "kind": { + "const": "link_facts", + "type": "string" + }, + "relation": { + "$ref": "#/$defs/MemoryAutomationCurationRelationV1" + }, + "source_fact_id": { + "$ref": "#/$defs/FactId" + }, + "target_fact_id": { + "$ref": "#/$defs/FactId" + } + }, + "required": [ + "kind", + "source_fact_id", + "target_fact_id", + "relation", + "disposition", + "commit" + ], + "type": "object" + } + ] + }, + "MemoryAutomationCurationReceiptV1": { + "additionalProperties": false, + "properties": { + "canonical_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "receipt": { + "$ref": "#/$defs/MemoryAutomationCurationResultV1" + } + }, + "required": [ + "receipt", + "canonical_digest" + ], + "type": "object" + }, + "MemoryAutomationCurationRelationKindV1": { + "enum": [ + "supports", + "contradicts", + "supersedes", + "derived_from" + ], + "type": "string" + }, + "MemoryAutomationCurationRelationProvenanceV1": { + "additionalProperties": false, + "properties": { + "sanitization_receipt": { + "$ref": "#/$defs/SanitizationReceiptV1" + }, + "source_label": { + "type": "string" + } + }, + "required": [ + "source_label", + "sanitization_receipt" + ], + "type": "object" + }, + "MemoryAutomationCurationRelationV1": { + "additionalProperties": false, + "properties": { + "confidence_millionths": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "evidence_fact_ids": { + "items": { + "$ref": "#/$defs/FactId" + }, + "type": "array" + }, + "kind": { + "$ref": "#/$defs/MemoryAutomationCurationRelationKindV1" + }, + "provenance": { + "$ref": "#/$defs/MemoryAutomationCurationRelationProvenanceV1" + } + }, + "required": [ + "kind", + "evidence_fact_ids", + "confidence_millionths", + "provenance" + ], + "type": "object" + }, + "MemoryAutomationCurationRemoveDispositionV1": { + "enum": [ + "removed", + "already_removed", + "not_found" + ], + "type": "string" + }, + "MemoryAutomationCurationResultV1": { + "additionalProperties": false, + "properties": { + "accepted_operations": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "automation_run_id": { + "$ref": "#/$defs/RunId" + }, + "changed_fact_ids": { + "items": { + "$ref": "#/$defs/FactId" + }, + "type": "array" + }, + "facts_added": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "facts_linked": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "facts_merged": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "facts_removed": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "facts_updated": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "input_digest": { + "type": "string" + }, + "normalized_tags": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "operation_effects": { + "items": { + "$ref": "#/$defs/MemoryAutomationCurationOperationEffectV1" + }, + "type": "array" + }, + "operation_id": { + "$ref": "#/$defs/ProvenanceId" + }, + "owner": { + "$ref": "#/$defs/FactCommitOwnerV1" + }, + "replay_event_id": { + "anyOf": [ + { + "$ref": "#/$defs/FactEventId" + }, + { + "type": "null" + } + ] + }, + "replay_fact_id": { + "anyOf": [ + { + "$ref": "#/$defs/FactId" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "owner", + "operation_id", + "input_digest", + "automation_run_id", + "operation_effects", + "replay_fact_id", + "replay_event_id", + "changed_fact_ids", + "accepted_operations", + "facts_added", + "facts_updated", + "facts_merged", + "facts_removed", + "normalized_tags", + "facts_linked" + ], + "type": "object" + }, + "MemoryAutomationFactConflictSourceV1": { + "enum": [ + "apply_time_add_fact_diff" + ], + "type": "string" + }, + "MemoryAutomationFactConflictValidationV1": { + "additionalProperties": false, + "properties": { + "note": { + "type": "string" + }, + "source": { + "$ref": "#/$defs/MemoryAutomationFactConflictSourceV1" + } + }, + "required": [ + "source", + "note" + ], + "type": "object" + }, + "MemoryAutomationFactDedupeValidationV1": { + "additionalProperties": false, + "properties": { + "near_duplicate_threshold": { + "format": "double", + "type": "number" + }, + "nearest": { + "anyOf": [ + { + "$ref": "#/$defs/MemoryAutomationFactNearestMatchV1" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "nearest", + "near_duplicate_threshold" + ], + "type": "object" + }, + "MemoryAutomationFactDispositionV1": { + "enum": [ + "applied", + "already_applied", + "quarantined" + ], + "type": "string" + }, + "MemoryAutomationFactEffectV1": { + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "assertion_id": { + "$ref": "#/$defs/FactAssertionId" + }, + "event_id": { + "$ref": "#/$defs/FactEventId" + }, + "fact_id": { + "$ref": "#/$defs/FactId" + }, + "state": { + "const": "applied", + "type": "string" + }, + "target": { + "$ref": "#/$defs/MemoryAutomationFactTargetV1" + } + }, + "required": [ + "state", + "fact_id", + "target", + "assertion_id", + "event_id" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "reason": { + "type": "string" + }, + "state": { + "const": "quarantined", + "type": "string" + } + }, + "required": [ + "state", + "reason" + ], + "type": "object" + } + ] + }, + "MemoryAutomationFactEvidenceItemV1": { + "additionalProperties": false, + "properties": { + "category": { + "$ref": "#/$defs/FactCategoryV1" + }, + "content": { + "type": "string" + }, + "entities": { + "items": { + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "reason": { + "type": "string" + }, + "source_span": { + "$ref": "#/$defs/MemoryAutomationFactEvidenceSourceSpanV1" + }, + "tags": { + "items": { + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "trust": { + "$ref": "#/$defs/MemoryAutomationFactEvidenceTrustV1" + } + }, + "required": [ + "content", + "category", + "trust", + "source_span", + "reason" + ], + "type": "object" + }, + "MemoryAutomationFactEvidenceSourceSpanV1": { + "additionalProperties": false, + "properties": { + "message_id": { + "type": [ + "string", + "null" + ] + }, + "node_id": { + "type": [ + "string", + "null" + ] + }, + "session_id": { + "type": [ + "string", + "null" + ] + }, + "store_id": { + "format": "int64", + "type": [ + "integer", + "null" + ] + } + }, + "type": "object" + }, + "MemoryAutomationFactEvidenceTrustBucketV1": { + "enum": [ + "low", + "medium", + "high" + ], + "type": "string" + }, + "MemoryAutomationFactEvidenceTrustV1": { + "anyOf": [ + { + "format": "double", + "type": "number" + }, + { + "$ref": "#/$defs/MemoryAutomationFactEvidenceTrustBucketV1" + } + ] + }, + "MemoryAutomationFactEvidenceV1": { + "additionalProperties": false, + "properties": { + "evidence_hash": { + "type": [ + "string", + "null" + ] + }, + "item": { + "anyOf": [ + { + "$ref": "#/$defs/MemoryAutomationFactEvidenceItemV1" + }, + { + "type": "null" + } + ] + }, + "validation": { + "anyOf": [ + { + "$ref": "#/$defs/MemoryAutomationFactValidationV1" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, + "MemoryAutomationFactInputDigestV1": { + "description": "Store-owned raw SHA-256 input digest. This intentionally has no algorithm\nprefix because the canonical fact command does not expose one.", + "type": "string" + }, + "MemoryAutomationFactNearestMatchV1": { + "additionalProperties": false, + "properties": { + "canonical_fact_id": { + "$ref": "#/$defs/FactId" + }, + "category": { + "$ref": "#/$defs/FactCategoryV1" + }, + "score": { + "format": "double", + "type": "number" + } + }, + "required": [ + "canonical_fact_id", + "score", + "category" + ], + "type": "object" + }, + "MemoryAutomationFactReceiptV1": { + "additionalProperties": false, + "description": "Exact public projection of one canonical automatic-fact authority result.", + "properties": { + "apply_id": { + "$ref": "#/$defs/ProvenanceId" + }, + "automation_run_id": { + "$ref": "#/$defs/RunId" + }, + "canonical_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "disposition": { + "$ref": "#/$defs/MemoryAutomationFactDispositionV1" + }, + "effect": { + "$ref": "#/$defs/MemoryAutomationFactEffectV1" + }, + "evidence": { + "$ref": "#/$defs/MemoryAutomationFactEvidenceV1" + }, + "owner": { + "$ref": "#/$defs/FactCommitOwnerV1" + }, + "recorded_at_micros": { + "$ref": "#/$defs/UtcMicros" + }, + "request": { + "$ref": "#/$defs/MemoryAutomationFactRequestV1" + }, + "state": { + "$ref": "#/$defs/MemoryAutomationFactStateV1" + } + }, + "required": [ + "apply_id", + "owner", + "state", + "disposition", + "automation_run_id", + "request", + "evidence", + "effect", + "recorded_at_micros", + "canonical_digest" + ], + "type": "object" + }, + "MemoryAutomationFactRequestV1": { + "additionalProperties": false, + "properties": { + "actor": { + "anyOf": [ + { + "$ref": "#/$defs/ActorId" + }, + { + "type": "null" + } + ] + }, + "category": { + "$ref": "#/$defs/FactCategoryV1" + }, + "content": { + "type": "string" + }, + "default_trust_millionths": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "entities": { + "items": { + "type": "string" + }, + "type": "array" + }, + "input_digest": { + "$ref": "#/$defs/MemoryAutomationFactInputDigestV1" + }, + "metadata": { + "additionalProperties": true, + "type": "object" + }, + "operation_id": { + "$ref": "#/$defs/ProvenanceId" + }, + "sanitization_receipt": { + "$ref": "#/$defs/SanitizationReceiptV1" + }, + "source_label": { + "type": [ + "string", + "null" + ] + }, + "tags": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "operation_id", + "input_digest", + "actor", + "sanitization_receipt", + "content", + "category", + "source_label", + "tags", + "entities", + "default_trust_millionths", + "metadata" + ], + "type": "object" + }, + "MemoryAutomationFactStateV1": { + "enum": [ + "applied", + "quarantined" + ], + "type": "string" + }, + "MemoryAutomationFactTargetV1": { + "additionalProperties": false, + "properties": { + "fact_id": { + "$ref": "#/$defs/FactId" + }, + "owner": { + "$ref": "#/$defs/FactCommitOwnerV1" + } + }, + "required": [ + "owner", + "fact_id" + ], + "type": "object" + }, + "MemoryAutomationFactValidationStatusV1": { + "enum": [ + "accepted" + ], + "type": "string" + }, + "MemoryAutomationFactValidationV1": { + "additionalProperties": false, + "properties": { + "conflict": { + "$ref": "#/$defs/MemoryAutomationFactConflictValidationV1" + }, + "dedupe": { + "$ref": "#/$defs/MemoryAutomationFactDedupeValidationV1" + }, + "status": { + "$ref": "#/$defs/MemoryAutomationFactValidationStatusV1" + } + }, + "required": [ + "status", + "dedupe", + "conflict" + ], + "type": "object" + }, + "MemoryCategoryCountV1": { + "additionalProperties": false, + "properties": { + "category": { + "type": "string" + }, + "count": { + "format": "uint64", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "category", + "count" + ], + "type": "object" + }, + "MemoryEntityRowV1": { + "additionalProperties": false, + "properties": { + "entity_id": { + "type": "string" + }, + "fact_count": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "name": { + "type": "string" + } + }, + "required": [ + "entity_id", + "name", + "fact_count" + ], + "type": "object" + }, + "MemoryFactDetailPayloadV1": { + "additionalProperties": false, + "properties": { + "error": { + "type": "string" + }, + "fact": { + "anyOf": [ + { + "$ref": "#/$defs/MemoryFactRowV1" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "fact", + "error" + ], + "type": "object" + }, + "MemoryFactRowV1": { + "additionalProperties": false, + "properties": { + "access_count": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "category": { + "type": [ + "string", + "null" + ] + }, + "content": { + "type": [ + "string", + "null" + ] + }, + "created_at": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "entities": { + "items": { + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "fact_id": { + "$ref": "#/$defs/FactId" + }, + "helpful_count": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "last_recalled_at": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "linked_entities": { + "items": { + "$ref": "#/$defs/MemoryEntityRowV1" + }, + "type": [ + "array", + "null" + ] + }, + "metadata": true, + "payload_access": { + "$ref": "#/$defs/PayloadAccessState" + }, + "projected_as_of": { + "format": "int64", + "type": "integer" + }, + "retrieval_count": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "score_millionths": { + "format": "uint32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "source_label": { + "type": [ + "string", + "null" + ] + }, + "tags": { + "items": { + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "trust_score": { + "format": "double", + "type": [ + "number", + "null" + ] + }, + "unhelpful_count": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "updated_at": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "why": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "fact_id", + "payload_access", + "trust_score", + "retrieval_count", + "access_count", + "helpful_count", + "unhelpful_count", + "created_at", + "updated_at", + "projected_as_of", + "last_recalled_at", + "content", + "category", + "tags", + "metadata", + "source_label", + "entities", + "linked_entities" + ], + "type": "object" + }, + "MemoryFactsCoverageV1": { + "additionalProperties": false, + "properties": { + "completeness": { + "$ref": "#/$defs/DashboardCoverageCompletenessV1" + }, + "eligible": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "examined": { + "format": "uint", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "graph": { + "anyOf": [ + { + "$ref": "#/$defs/FactSearchGraphCoverageV1" + }, + { + "type": "null" + } + ] + }, + "limit": { + "format": "uint", + "maximum": 100, + "minimum": 1, + "type": "integer" + } + }, + "required": [ + "completeness", + "limit" + ], + "type": "object" + }, + "MemoryFeedbackFunnelV1": { + "additionalProperties": false, + "properties": { + "access_count_total": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "feedback_total": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "rated_fact_count": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "retrieval_count_total": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "retrieved_fact_count": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "seen_to_feedback_ratio": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "retrieval_count_total", + "access_count_total", + "retrieved_fact_count", + "rated_fact_count", + "feedback_total", + "seen_to_feedback_ratio" + ], + "type": "object" + }, + "MemoryGraphEdgeV1": { + "additionalProperties": false, + "properties": { + "kind": { + "$ref": "#/$defs/ProjectMemoryGraphRelationKindV1" + }, + "source": { + "type": "string" + }, + "target": { + "type": "string" + } + }, + "required": [ + "source", + "target", + "kind" + ], + "type": "object" + }, + "MemoryGraphNodeV1": { + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "category": { + "type": [ + "string", + "null" + ] + }, + "content": { + "type": [ + "string", + "null" + ] + }, + "fact_id": { + "$ref": "#/$defs/FactId" + }, + "helpful_count": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "id": { + "type": "string" + }, + "kind": { + "const": "fact", + "type": "string" + }, + "label": { + "type": "string" + }, + "payload_access": { + "$ref": "#/$defs/PayloadAccessState" + }, + "projected_as_of": { + "format": "int64", + "type": "integer" + }, + "retrieval_count": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "trust_score": { + "format": "double", + "type": [ + "number", + "null" + ] + } + }, + "required": [ + "kind", + "id", + "label", + "fact_id", + "payload_access", + "projected_as_of", + "content", + "category", + "trust_score", + "retrieval_count", + "helpful_count" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "entity_id": { + "type": "string" + }, + "id": { + "type": "string" + }, + "kind": { + "const": "entity", + "type": "string" + }, + "label": { + "type": "string" + } + }, + "required": [ + "kind", + "id", + "label", + "entity_id" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "assertion_id": { + "$ref": "#/$defs/FactAssertionId" + }, + "fact_id": { + "$ref": "#/$defs/FactId" + }, + "id": { + "type": "string" + }, + "kind": { + "const": "assertion", + "type": "string" + }, + "label": { + "type": "string" + } + }, + "required": [ + "kind", + "id", + "label", + "assertion_id", + "fact_id" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "anchor_id": { + "$ref": "#/$defs/RetrievalAnchorId" + }, + "id": { + "type": "string" + }, + "kind": { + "const": "retrieval_anchor", + "type": "string" + }, + "label": { + "type": "string" + } + }, + "required": [ + "kind", + "id", + "label", + "anchor_id" + ], + "type": "object" + } + ] + }, + "MemoryGraphPayloadV1": { + "additionalProperties": false, + "properties": { + "coverage": { + "$ref": "#/$defs/DashboardCoverageV1" + }, + "edges": { + "items": { + "$ref": "#/$defs/MemoryGraphEdgeV1" + }, + "type": "array" + }, + "fact_candidates_examined": { + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "fact_universe_count": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "nodes": { + "items": { + "$ref": "#/$defs/MemoryGraphNodeV1" + }, + "type": "array" + }, + "relation_count": { + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "relation_limit": { + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "root_count": { + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "unavailable_fact_candidates": { + "format": "uint", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "nodes", + "edges", + "coverage", + "fact_universe_count", + "fact_candidates_examined", + "unavailable_fact_candidates", + "root_count", + "relation_limit", + "relation_count" + ], + "type": "object" + }, + "MemoryGrowthPointV1": { + "additionalProperties": false, + "properties": { + "cumulative_facts": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "date": { + "type": "string" + }, + "facts": { + "format": "uint64", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "date", + "facts", + "cumulative_facts" + ], + "type": "object" + }, + "MemoryHolographicPayloadV1": { + "additionalProperties": false, + "properties": { + "entities": { + "items": { + "$ref": "#/$defs/MemoryEntityRowV1" + }, + "type": "array" + }, + "error": { + "type": "string" + }, + "exists": { + "type": "boolean" + }, + "facts": { + "items": { + "$ref": "#/$defs/MemoryFactRowV1" + }, + "type": "array" + }, + "facts_coverage": { + "$ref": "#/$defs/MemoryFactsCoverageV1" + }, + "graph": { + "$ref": "#/$defs/MemoryGraphPayloadV1" + }, + "overview": { + "anyOf": [ + { + "$ref": "#/$defs/MemoryOverviewSummaryV1" + }, + { + "type": "null" + } + ] + }, + "path": { + "type": "string" + }, + "reads": { + "additionalProperties": { + "$ref": "#/$defs/MemoryReadStatusV1" + }, + "type": "object" + } + }, + "required": [ + "path", + "exists", + "overview", + "facts", + "entities", + "graph", + "error", + "reads", + "facts_coverage" + ], + "type": "object" + }, + "MemoryOverviewPayloadV1": { + "additionalProperties": false, + "properties": { + "holographic": { + "$ref": "#/$defs/MemoryHolographicPayloadV1" + }, + "limit": { + "format": "int64", + "type": "integer" + }, + "providers": { + "additionalProperties": true, + "type": "object" + }, + "query": { + "type": "string" + } + }, + "required": [ + "providers", + "query", + "limit", + "holographic" + ], + "type": "object" + }, + "MemoryOverviewSummaryV1": { + "additionalProperties": false, + "properties": { + "categories": { + "items": { + "$ref": "#/$defs/MemoryCategoryCountV1" + }, + "type": "array" + }, + "entities": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "facts": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "growth": { + "items": { + "$ref": "#/$defs/MemoryGrowthPointV1" + }, + "type": "array" + }, + "trust_histogram": { + "items": { + "$ref": "#/$defs/MemoryTrustBucketV1" + }, + "type": "array" + } + }, + "required": [ + "facts", + "entities", + "categories", + "trust_histogram", + "growth" + ], + "type": "object" + }, + "MemoryReadStatusV1": { + "additionalProperties": false, + "properties": { + "code": { + "type": [ + "string", + "null" + ] + }, + "error": { + "type": [ + "string", + "null" + ] + }, + "state": { + "$ref": "#/$defs/DashboardDomainStateV1" + } + }, + "required": [ + "state" + ], + "type": "object" + }, + "MemoryStatusPayloadV1": { + "additionalProperties": false, + "properties": { + "error": { + "type": "string" + }, + "exists": { + "type": "boolean" + }, + "memory": { + "$ref": "#/$defs/MemoryStatusV1" + }, + "path": { + "type": "string" + } + }, + "required": [ + "path", + "exists", + "memory", + "error" + ], + "type": "object" + }, + "MemoryStatusV1": { + "additionalProperties": false, + "properties": { + "algebra": { + "$ref": "#/$defs/MemoryAlgebraStatusV1" + }, + "below_default_recall_threshold_count": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "entity_count": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "fact_count": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "feedback_funnel": { + "$ref": "#/$defs/MemoryFeedbackFunnelV1" + }, + "helpful_count": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "trust_025_050_count": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "trust_050_075_count": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "trust_075_100_count": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "trust_0_025_count": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "unhelpful_count": { + "format": "uint64", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "fact_count", + "entity_count", + "algebra", + "trust_0_025_count", + "trust_025_050_count", + "trust_050_075_count", + "trust_075_100_count", + "below_default_recall_threshold_count", + "helpful_count", + "unhelpful_count", + "feedback_funnel" + ], + "type": "object" + }, + "MemoryTrustBucketV1": { + "additionalProperties": false, + "properties": { + "bucket": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "count": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "label": { + "type": "string" + } + }, + "required": [ + "bucket", + "label", + "count" + ], + "type": "object" + }, + "MetricCalibrationV1": { + "properties": { + "calibration_revision": { + "type": "string" + }, + "cohort_revision": { + "type": "string" + }, + "drift_valid": { + "type": "boolean" + }, + "estimator_revision": { + "type": "string" + }, + "support": { + "format": "uint64", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "estimator_revision", + "calibration_revision", + "cohort_revision", + "support", + "drift_valid" + ], + "type": "object" + }, + "MetricCohortV1": { + "properties": { + "descriptor_revision": { + "type": "string" + }, + "eligible_population": { + "type": "string" + } + }, + "required": [ + "descriptor_revision", + "eligible_population" + ], + "type": "object" + }, + "MetricCoverageV1": { + "properties": { + "censored": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "completed": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "eligible": { + "description": "Exact denominator cardinality. `None` means the denominator is unknown.", + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "excluded": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "observed": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "state": { + "$ref": "#/$defs/CoverageStateV1" + }, + "unknown": { + "format": "uint64", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "eligible", + "observed", + "completed", + "censored", + "unknown", + "excluded", + "state" + ], + "type": "object" + }, + "MetricEvidenceClassV1": { + "enum": [ + "measurement", + "association", + "calibrated_prediction" + ], + "type": "string" + }, + "MetricProvenanceV1": { + "properties": { + "projector_revision": { + "type": "string" + }, + "source": { + "$ref": "#/$defs/MetricSourceV1" + }, + "source_revision": { + "type": "string" + }, + "watermark": { + "type": "string" + } + }, + "required": [ + "source", + "source_revision", + "projector_revision", + "watermark" + ], + "type": "object" + }, + "MetricSourceV1": { + "enum": [ + "observability_envelope", + "feedback_observations", + "provider_usage_observation", + "savings_ledger" + ], + "type": "string" + }, + "MetricTemporalV1": { + "properties": { + "baseline_watermark": { + "type": [ + "string", + "null" + ] + }, + "delta": { + "format": "double", + "type": [ + "number", + "null" + ] + }, + "horizon": { + "$ref": "#/$defs/ObservabilityHorizonV1" + } + }, + "required": [ + "horizon", + "baseline_watermark", + "delta" + ], + "type": "object" + }, + "MetricUncertaintyV1": { + "properties": { + "lower": { + "format": "double", + "type": [ + "number", + "null" + ] + }, + "reason": { + "type": [ + "string", + "null" + ] + }, + "upper": { + "format": "double", + "type": [ + "number", + "null" + ] + } + }, + "required": [ + "lower", + "upper", + "reason" + ], + "type": "object" + }, + "MetricValueV1": { + "properties": { + "calibration": { + "anyOf": [ + { + "$ref": "#/$defs/MetricCalibrationV1" + }, + { + "type": "null" + } + ] + }, + "cohort": { + "$ref": "#/$defs/MetricCohortV1" + }, + "coverage": { + "$ref": "#/$defs/MetricCoverageV1" + }, + "denominator": { + "type": "string" + }, + "denominator_value": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "descriptor_revision": { + "type": "string" + }, + "evidence_class": { + "$ref": "#/$defs/MetricEvidenceClassV1" + }, + "metric": { + "type": "string" + }, + "provenance": { + "$ref": "#/$defs/MetricProvenanceV1" + }, + "temporal": { + "$ref": "#/$defs/MetricTemporalV1" + }, + "unavailable_reason": { + "type": [ + "string", + "null" + ] + }, + "uncertainty": { + "$ref": "#/$defs/MetricUncertaintyV1" + }, + "unit": { + "type": "string" + }, + "value": { + "description": "Aggregate value. It is absent whenever its denominator or coverage is\ninsufficient; observed lower bounds remain available in `coverage`.", + "format": "double", + "type": [ + "number", + "null" + ] + } + }, + "required": [ + "descriptor_revision", + "metric", + "value", + "unit", + "denominator", + "denominator_value", + "coverage", + "evidence_class", + "provenance", + "cohort", + "temporal", + "uncertainty", + "calibration", + "unavailable_reason" + ], + "type": "object" + }, + "MultiRootCapabilityV1": { + "description": "Capability discovery never infers multi-root support from filesystem paths.", + "oneOf": [ + { + "properties": { + "revision": { + "$ref": "#/$defs/ScopeSetRevision" + }, + "root_count": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "scope_set_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "scope_set_id": { + "$ref": "#/$defs/ScopeSetId" + }, + "status": { + "const": "mounted", + "type": "string" + } + }, + "required": [ + "status", + "scope_set_id", + "revision", + "scope_set_digest", + "root_count" + ], + "type": "object" + }, + { + "properties": { + "reason": { + "type": "string" + }, + "status": { + "const": "unavailable", + "type": "string" + } + }, + "required": [ + "status", + "reason" + ], + "type": "object" + } + ] + }, + "MultiRootContinuationV1": { + "additionalProperties": false, + "description": "Frozen continuation identity shared by all participating roots.", + "properties": { + "digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "next_page": { + "format": "uint64", + "minimum": 1, + "type": "integer" + }, + "order_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "query_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "root_generations": { + "items": { + "$ref": "#/$defs/RootScopeOutcomeV1_for_RootGenerationV1" + }, + "type": "array" + }, + "scope_set_digest": { + "$ref": "#/$defs/ManifestDigest" + } + }, + "required": [ + "scope_set_digest", + "root_generations", + "query_digest", + "order_digest", + "next_page", + "digest" + ], + "type": "object" + }, + "MultiRootExecuteRequestV1": { + "additionalProperties": false, + "description": "External federated request bound to one persisted scope-set revision and\ndigest. Query/order digests and root generations are server-derived.", + "properties": { + "continuation": { + "anyOf": [ + { + "$ref": "#/$defs/MultiRootContinuationV1" + }, + { + "type": "null" + } + ] + }, + "operation": { + "$ref": "#/$defs/MultiRootOperationV1" + }, + "page": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "scope_set_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "scope_set_id": { + "$ref": "#/$defs/ScopeSetId" + }, + "scope_set_revision": { + "$ref": "#/$defs/ScopeSetRevision" + } + }, + "required": [ + "scope_set_id", + "scope_set_revision", + "scope_set_digest", + "operation", + "page", + "continuation" + ], + "type": "object" + }, + "MultiRootOperationV1": { + "description": "Closed federated read families. The family is typed while its existing\noperation-specific request remains the canonical JSON payload owned by that\napplication surface.", + "oneOf": [ + { + "properties": { + "kind": { + "const": "work", + "type": "string" + }, + "request": true + }, + "required": [ + "kind", + "request" + ], + "type": "object" + }, + { + "properties": { + "kind": { + "const": "git", + "type": "string" + }, + "request": true + }, + "required": [ + "kind", + "request" + ], + "type": "object" + }, + { + "properties": { + "kind": { + "const": "feedback", + "type": "string" + }, + "request": true + }, + "required": [ + "kind", + "request" + ], + "type": "object" + }, + { + "properties": { + "kind": { + "const": "impact", + "type": "string" + }, + "request": true + }, + "required": [ + "kind", + "request" + ], + "type": "object" + }, + { + "properties": { + "kind": { + "const": "query", + "type": "string" + }, + "request": true + }, + "required": [ + "kind", + "request" + ], + "type": "object" + } + ] + }, + "MultiRootQueryPageV1_for_AnyValue": { + "additionalProperties": false, + "description": "Federated page preserving each root outcome and aggregate partial truth.", + "properties": { + "aggregate": { + "$ref": "#/$defs/ScopeOutcome_for_Array_of_AnyValue" + }, + "continuation": { + "$ref": "#/$defs/MultiRootContinuationV1" + }, + "roots": { + "items": { + "$ref": "#/$defs/RootScopeOutcomeV1_for_Array_of_AnyValue" + }, + "type": "array" + }, + "scope_set_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "scope_set_id": { + "$ref": "#/$defs/ScopeSetId" + }, + "scope_set_revision": { + "$ref": "#/$defs/ScopeSetRevision" + } + }, + "required": [ + "scope_set_id", + "scope_set_revision", + "scope_set_digest", + "roots", + "aggregate", + "continuation" + ], + "type": "object" + }, + "MultiRootQueryReadModelV1": { + "$ref": "#/$defs/MultiRootQueryPageV1_for_AnyValue", + "description": "Wire-stable projection. The application page already owns every\ncontinuation and per-root truthfulness invariant, so the API does not\nreconstruct or flatten it." + }, + "MultiRootScopeSetCasRequestV1": { + "additionalProperties": false, + "description": "Canonical external selector for creating or updating an authorized scope\nset. Every member names one exact registered root; project-only selection\ncannot silently widen to an active or first-mounted graph.", + "properties": { + "expected_revision": { + "anyOf": [ + { + "$ref": "#/$defs/ScopeSetRevision" + }, + { + "type": "null" + } + ] + }, + "roots": { + "items": { + "$ref": "#/$defs/RegisteredRootSelectorV1" + }, + "type": "array" + }, + "scope_set_id": { + "$ref": "#/$defs/ScopeSetId" + } + }, + "required": [ + "scope_set_id", + "expected_revision", + "roots" + ], + "type": "object" + }, + "MultiRootScopeSetCasResultV1": { + "additionalProperties": false, + "properties": { + "scope_set": { + "anyOf": [ + { + "$ref": "#/$defs/AuthorizedScopeSet" + }, + { + "type": "null" + } + ] + }, + "status": { + "$ref": "#/$defs/MultiRootScopeSetCasStatusV1" + } + }, + "required": [ + "status", + "scope_set" + ], + "type": "object" + }, + "MultiRootScopeSetCasStatusV1": { + "enum": [ + "applied", + "conflict" + ], + "type": "string" + }, + "MultiRootScopeSetReadRequestV1": { + "additionalProperties": false, + "properties": { + "scope_set_id": { + "$ref": "#/$defs/ScopeSetId" + } + }, + "required": [ + "scope_set_id" + ], + "type": "object" + }, + "NodeRefV1": { + "properties": { + "file_path": { + "type": "string" + }, + "id": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "name": { + "type": "string" + }, + "qualified_name": { + "type": "string" + }, + "start_line": { + "format": "uint32", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "id", + "name", + "qualified_name", + "kind", + "file_path", + "start_line" + ], + "type": "object" + }, + "NodeSessionsMeasurementV1": { + "properties": { + "available_granularities": { + "items": { + "type": "string" + }, + "type": "array" + }, + "linkage": { + "$ref": "#/$defs/LoomFileSessionProjectionV1" + }, + "node": { + "$ref": "#/$defs/NodeRefV1" + }, + "symbol_granularity_available": { + "type": "boolean" + }, + "symbol_granularity_reason": { + "type": "string" + } + }, + "required": [ + "node", + "linkage", + "available_granularities", + "symbol_granularity_available", + "symbol_granularity_reason" + ], + "type": "object" + }, + "ObservabilityHorizonV1": { + "properties": { + "since_micros": { + "format": "int64", + "type": "integer" + }, + "until_micros": { + "format": "int64", + "type": "integer" + } + }, + "required": [ + "since_micros", + "until_micros" + ], + "type": "object" + }, + "ObservationSourceIdentityV1": { + "additionalProperties": false, + "description": "Stable logical identity of one provider observation source.\n\nThe session identity is provider-native evidence. The physical file identity\nis represented separately by [`ObservationSourceGenerationV1`].", + "properties": { + "provider": { + "$ref": "#/$defs/ProviderId" + }, + "session_id": { + "$ref": "#/$defs/SessionId" + }, + "source_key": { + "anyOf": [ + { + "$ref": "#/$defs/SessionId" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "session_id" + ], + "type": "object" + }, + "ObservatoryReadModelV1": { + "properties": { + "analytics_mode": { + "$ref": "#/$defs/AnalyticsModeReadModelV1" + }, + "authorized_scope_ref": { + "type": "string" + }, + "comparison": { + "$ref": "#/$defs/PerformanceComparisonReadModelV1" + }, + "current": { + "type": "boolean" + }, + "horizon": { + "$ref": "#/$defs/ObservabilityHorizonV1" + }, + "metrics": { + "items": { + "$ref": "#/$defs/MetricValueV1" + }, + "type": "array" + }, + "observed_at_micros": { + "format": "int64", + "type": "integer" + }, + "rejected_arguments": { + "$ref": "#/$defs/RejectedArgumentAnalyticsV1" + }, + "watermark": { + "type": "string" + } + }, + "required": [ + "authorized_scope_ref", + "horizon", + "watermark", + "observed_at_micros", + "current", + "metrics", + "analytics_mode", + "comparison", + "rejected_arguments" + ], + "type": "object" + }, + "PauseWorkRunCommand": { + "additionalProperties": false, + "properties": { + "expected_authority_version": { + "default": null, + "description": "The authority version the caller read. Absent means \"no control row was\npublished yet\"; a mismatch is a conflict, never an overwrite.", + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "occurred_at": { + "$ref": "#/$defs/UtcMicros" + }, + "reason": { + "$ref": "#/$defs/WorkRunControlReasonV1" + }, + "run_id": { + "$ref": "#/$defs/RunId" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + } + }, + "required": [ + "task_id", + "run_id", + "reason", + "expected_authority_version", + "occurred_at" + ], + "title": "PauseWorkRunCommand", + "type": "object" + }, + "PayloadAccessState": { + "enum": [ + "eligible", + "redacted", + "quarantined", + "retention_expired", + "deleted", + "unavailable", + "ambiguous" + ], + "type": "string" + }, + "PayloadDigestV1": { + "description": "Strongly typed canonical identity: `PayloadDigestV1`.", + "type": "string" + }, + "PayloadReferenceV1": { + "additionalProperties": false, + "properties": { + "byte_len": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "digest": { + "$ref": "#/$defs/PayloadDigestV1" + } + }, + "required": [ + "digest", + "byte_len" + ], + "type": "object" + }, + "PerformanceComparisonReadModelV1": { + "properties": { + "baseline_build": { + "type": [ + "string", + "null" + ] + }, + "candidate_build": { + "type": [ + "string", + "null" + ] + }, + "configuration": { + "type": [ + "string", + "null" + ] + }, + "corpus": { + "type": [ + "string", + "null" + ] + }, + "coverage": { + "$ref": "#/$defs/MetricCoverageV1" + }, + "disposition": { + "$ref": "#/$defs/ComparisonDispositionV1" + }, + "eligible_outcomes": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "environment": { + "type": [ + "string", + "null" + ] + }, + "oracle": { + "type": [ + "string", + "null" + ] + }, + "paired_outcomes": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "platform": { + "type": [ + "string", + "null" + ] + }, + "regression_observed": { + "type": [ + "boolean", + "null" + ] + }, + "rollback_profile": { + "type": [ + "string", + "null" + ] + }, + "unavailable_reason": { + "type": [ + "string", + "null" + ] + }, + "workload": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "baseline_build", + "candidate_build", + "workload", + "corpus", + "environment", + "oracle", + "configuration", + "platform", + "rollback_profile", + "eligible_outcomes", + "paired_outcomes", + "regression_observed", + "disposition", + "coverage", + "unavailable_reason" + ], + "type": "object" + }, + "PolicyIdentifierV1": { + "description": "A bounded, canonical identifier owned by the policy input schema.\n\nIt represents immutable references only; it is never a path, display\nlabel, provider account, branch name, or native object identifier.", + "type": "string" + }, + "PrAutoTrackEntryV1": { + "properties": { + "branch": { + "type": "string" + }, + "head_branch": { + "type": "string" + }, + "pr": { + "format": "uint64", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "branch", + "pr", + "head_branch" + ], + "type": "object" + }, + "PrAutoTrackPayloadV1": { + "properties": { + "tracked": { + "items": { + "$ref": "#/$defs/PrAutoTrackEntryV1" + }, + "type": "array" + } + }, + "required": [ + "tracked" + ], + "type": "object" + }, + "PrepareWorkDuplicateAdjudicationRequestV1": { + "additionalProperties": false, + "description": "Operator judgment before the owning Work authority binds exact current\ngenerations, relation revision, command identity, and observation time.", + "properties": { + "first_attempt": { + "$ref": "#/$defs/WorkAttemptIdentityV1" + }, + "quantities": { + "$ref": "#/$defs/WorkDuplicateAdjudicationQuantitiesV1" + }, + "reason": { + "type": "string" + }, + "second_attempt": { + "$ref": "#/$defs/WorkAttemptIdentityV1" + }, + "verdict": { + "$ref": "#/$defs/DuplicateEffortKindV1" + } + }, + "required": [ + "first_attempt", + "second_attempt", + "verdict", + "quantities", + "reason" + ], + "type": "object" + }, + "PrepareWorkProductMutationRequestV1": { + "additionalProperties": false, + "description": "Read-only preparation input. Authority identities, clocks, and revision\npins are deliberately absent because the backend owns them.", + "properties": { + "causation_event_id": { + "type": [ + "string", + "null" + ] + }, + "change": { + "$ref": "#/$defs/WorkProductChangeDraftV1" + }, + "evidence": { + "items": { + "$ref": "#/$defs/WorkProductEventEvidenceV1" + }, + "type": "array" + }, + "selection": { + "$ref": "#/$defs/WorkProductSelectionScopeV1" + } + }, + "required": [ + "selection", + "change", + "causation_event_id", + "evidence" + ], + "type": "object" + }, + "ProblemOwningLayer": { + "description": "Layer that owns resolving the problem rather than merely presenting it.", + "enum": [ + "adapter", + "application", + "runtime", + "port" + ], + "type": "string" + }, + "ProblemTerminality": { + "description": "Whether the problem occurred before admission or is an admitted terminal.", + "enum": [ + "pre_admission", + "admitted_terminal" + ], + "type": "string" + }, + "ProjectAliasRecord": { + "properties": { + "alias_path": { + "type": "string" + }, + "last_seen_at": { + "format": "int64", + "type": "integer" + }, + "project_id": { + "type": "string" + } + }, + "required": [ + "alias_path", + "project_id", + "last_seen_at" + ], + "type": "object" + }, + "ProjectContextPayloadV1": { + "properties": { + "aliases": { + "items": { + "$ref": "#/$defs/ProjectAliasRecord" + }, + "type": "array" + }, + "error": { + "type": [ + "string", + "null" + ] + }, + "is_active": { + "type": [ + "boolean", + "null" + ] + }, + "project": { + "anyOf": [ + { + "$ref": "#/$defs/PublicCodeProject" + }, + { + "type": "null" + } + ] + }, + "status": { + "type": "string" + } + }, + "required": [ + "status", + "project", + "aliases" + ], + "type": "object" + }, + "ProjectEditableSettingsV1": { + "properties": { + "context_scout": { + "description": "Rendered from the effective `context_scout.settings.v1` value;\nthe dashboard holds no Scout state of its own.", + "type": "boolean" + }, + "exclude": { + "items": { + "type": "string" + }, + "type": "array" + }, + "extract_docstrings": { + "type": "boolean" + }, + "git_ignore": { + "type": "boolean" + }, + "include": { + "items": { + "type": "string" + }, + "type": "array" + }, + "max_file_size": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "sync": { + "$ref": "#/$defs/SyncSettingsV1" + }, + "telemetry": { + "$ref": "#/$defs/TelemetrySettingsV1" + }, + "track_call_sites": { + "type": "boolean" + } + }, + "required": [ + "include", + "exclude", + "max_file_size", + "extract_docstrings", + "track_call_sites", + "git_ignore", + "telemetry", + "sync", + "context_scout" + ], + "type": "object" + }, + "ProjectId": { + "description": "Strongly typed canonical identity: `ProjectId`.", + "type": "string" + }, + "ProjectMemoryGraphRelationKindV1": { + "description": "The finite relationship vocabulary exposed by the verified project-memory graph.", + "enum": [ + "supports", + "contradicts", + "supersedes", + "derived_from", + "mentions", + "active_assertion", + "evidence_anchor" + ], + "type": "string" + }, + "ProjectRegistryEntry": { + "properties": { + "alias_count": { + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "artifact_count": { + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "branches": { + "items": { + "type": "string" + }, + "type": "array" + }, + "canonical_root": { + "type": "string" + }, + "default_branch": { + "type": [ + "string", + "null" + ] + }, + "is_active": { + "type": [ + "boolean", + "null" + ] + }, + "kind": { + "type": "string" + }, + "label": { + "type": "string" + }, + "last_seen_at": { + "format": "int64", + "type": "integer" + }, + "project_id": { + "type": "string" + }, + "project_root": { + "type": "string" + }, + "store_count": { + "format": "uint", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "project_id", + "label", + "project_root", + "canonical_root", + "kind", + "default_branch", + "branches", + "store_count", + "artifact_count", + "alias_count", + "last_seen_at" + ], + "type": "object" + }, + "ProjectRegistrySummary": { + "properties": { + "project_count": { + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "repo_count": { + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "truncated": { + "type": "boolean" + } + }, + "required": [ + "project_count", + "repo_count", + "truncated" + ], + "type": "object" + }, + "ProjectRepoGroup": { + "properties": { + "branches": { + "items": { + "type": "string" + }, + "type": "array" + }, + "git_common_dir": { + "type": [ + "string", + "null" + ] + }, + "label": { + "type": "string" + }, + "project_count": { + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "projects": { + "items": { + "$ref": "#/$defs/ProjectRegistryEntry" + }, + "type": "array" + } + }, + "required": [ + "label", + "git_common_dir", + "project_count", + "branches", + "projects" + ], + "type": "object" + }, + "ProjectSettingsPatch": { + "additionalProperties": false, + "description": "Project-scoped settings patch accepted by `PATCH /api/settings/project`.", + "properties": { + "context_scout": { + "type": [ + "boolean", + "null" + ] + }, + "exclude": { + "items": { + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "expected_revision_id": { + "type": "string" + }, + "extract_docstrings": { + "type": [ + "boolean", + "null" + ] + }, + "git_ignore": { + "type": [ + "boolean", + "null" + ] + }, + "idempotency_key": { + "type": "string" + }, + "include": { + "items": { + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "max_file_size": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "sync": { + "anyOf": [ + { + "$ref": "#/$defs/SyncSettingsPatch" + }, + { + "type": "null" + } + ] + }, + "telemetry": { + "anyOf": [ + { + "$ref": "#/$defs/TelemetrySettingsPatch" + }, + { + "type": "null" + } + ] + }, + "track_call_sites": { + "type": [ + "boolean", + "null" + ] + } + }, + "required": [ + "expected_revision_id", + "idempotency_key" + ], + "type": "object" + }, + "ProjectSettingsPayloadV1": { + "properties": { + "config": { + "$ref": "#/$defs/ProjectEditableSettingsV1" + }, + "config_path": { + "type": "string" + }, + "configuration_revision_id": { + "type": "string" + }, + "configuration_snapshot_id": { + "type": "string" + }, + "legacy_config_path": { + "type": "string" + }, + "legacy_config_read_only": { + "type": "boolean" + }, + "pr_autotrack": { + "$ref": "#/$defs/PrAutoTrackPayloadV1" + }, + "tracedecay_dir_gitignored": { + "type": "boolean" + } + }, + "required": [ + "config_path", + "legacy_config_path", + "legacy_config_read_only", + "configuration_snapshot_id", + "configuration_revision_id", + "config", + "tracedecay_dir_gitignored", + "pr_autotrack" + ], + "type": "object" + }, + "ProjectionGenerationId": { + "description": "Strongly typed canonical identity: `ProjectionGenerationId`.", + "type": "string" + }, + "ProjectsPayloadV1": { + "properties": { + "active_project_id": { + "type": [ + "string", + "null" + ] + }, + "active_project_root": { + "type": "string" + }, + "error": { + "type": [ + "string", + "null" + ] + }, + "limit": { + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "project_tree": { + "items": { + "$ref": "#/$defs/ProjectRepoGroup" + }, + "type": [ + "array", + "null" + ] + }, + "projects": { + "items": { + "$ref": "#/$defs/PublicCodeProject" + }, + "type": [ + "array", + "null" + ] + }, + "status": { + "type": "string" + }, + "summary": { + "anyOf": [ + { + "$ref": "#/$defs/ProjectRegistrySummary" + }, + { + "type": "null" + } + ] + }, + "truncated": { + "type": [ + "boolean", + "null" + ] + } + }, + "required": [ + "status", + "limit", + "truncated", + "projects", + "active_project_id", + "active_project_root", + "summary", + "project_tree" + ], + "type": "object" + }, + "ProposalId": { + "description": "Strongly typed canonical identity: `ProposalId`.", + "type": "string" + }, + "ProtectedRefDispositionV1": { + "enum": [ + "reject", + "require_human_approval_and_independent_review" + ], + "type": "string" + }, + "ProtectedRefRuleV1": { + "additionalProperties": false, + "properties": { + "disposition": { + "$ref": "#/$defs/ProtectedRefDispositionV1" + }, + "selector": { + "$ref": "#/$defs/ProtectedRefSelectorV1" + } + }, + "required": [ + "selector", + "disposition" + ], + "type": "object" + }, + "ProtectedRefSelectorV1": { + "oneOf": [ + { + "properties": { + "kind": { + "const": "native_default_branch", + "type": "string" + } + }, + "required": [ + "kind" + ], + "type": "object" + }, + { + "properties": { + "kind": { + "const": "exact", + "type": "string" + }, + "value": { + "$ref": "#/$defs/CanonicalGitRefNameV1" + } + }, + "required": [ + "kind", + "value" + ], + "type": "object" + }, + { + "properties": { + "kind": { + "const": "prefix", + "type": "string" + }, + "value": { + "$ref": "#/$defs/CanonicalGitRefPrefix" + } + }, + "required": [ + "kind", + "value" + ], + "type": "object" + } + ] + }, + "ProvenanceId": { + "description": "Strongly typed canonical identity: `ProvenanceId`.", + "type": "string" + }, + "ProviderId": { + "description": "Strongly typed canonical identity: `ProviderId`.", + "type": "string" + }, + "ProviderLatencyReadModelV1": { + "description": "One provider/model cohort in the Costs latency read model.\n\nThe percentile cells are ordinary canonical metrics so every value carries\nits exact unit, horizon, denominator, coverage/censoring, and projector\nprovenance. Identity provenance is kept separately because latency is\nmeasured by `OperationResourceObservedV1`, while provider/model identity\nmay be joined from an exact `ProviderUsageObservationV1` request/session.", + "properties": { + "first_progress": { + "$ref": "#/$defs/LatencyDistributionReadModelV1" + }, + "identity_provenance": { + "$ref": "#/$defs/MetricProvenanceV1" + }, + "identity_unavailable_reason": { + "type": [ + "string", + "null" + ] + }, + "model": { + "type": [ + "string", + "null" + ] + }, + "provider": { + "type": [ + "string", + "null" + ] + }, + "queue": { + "$ref": "#/$defs/LatencyDistributionReadModelV1" + }, + "service": { + "$ref": "#/$defs/LatencyDistributionReadModelV1" + }, + "start": { + "$ref": "#/$defs/LatencyDistributionReadModelV1" + }, + "terminal": { + "$ref": "#/$defs/LatencyDistributionReadModelV1" + } + }, + "required": [ + "provider", + "model", + "identity_provenance", + "identity_unavailable_reason", + "queue", + "start", + "first_progress", + "service", + "terminal" + ], + "type": "object" + }, + "ProviderUsageSummaryV1": { + "properties": { + "available": { + "type": "boolean" + }, + "cost_basis": { + "default": null, + "type": [ + "string", + "null" + ] + }, + "error": { + "default": null, + "type": [ + "string", + "null" + ] + }, + "status": { + "default": null, + "type": [ + "string", + "null" + ] + }, + "total_cost_usd": { + "default": null, + "format": "double", + "type": [ + "number", + "null" + ] + }, + "total_tokens": { + "default": null, + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "usage_event_count": { + "default": null, + "format": "int64", + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "available", + "status", + "error", + "usage_event_count", + "total_cost_usd", + "total_tokens", + "cost_basis" + ], + "type": "object" + }, + "PublicCodeProject": { + "properties": { + "canonical_root": { + "type": "string" + }, + "created_at": { + "format": "int64", + "type": "integer" + }, + "default_branch": { + "type": [ + "string", + "null" + ] + }, + "display_root": { + "type": "string" + }, + "git_common_dir": { + "type": [ + "string", + "null" + ] + }, + "is_active": { + "type": [ + "boolean", + "null" + ] + }, + "label": { + "type": "string" + }, + "last_seen_at": { + "format": "int64", + "type": "integer" + }, + "project_id": { + "type": "string" + }, + "project_root": { + "type": "string" + } + }, + "required": [ + "project_id", + "label", + "project_root", + "display_root", + "canonical_root", + "git_common_dir", + "default_branch", + "created_at", + "last_seen_at" + ], + "type": "object" + }, + "QuantityEvidenceClassV1": { + "enum": [ + "owner_receipt", + "locally_measured", + "estimated", + "unknown" + ], + "type": "string" + }, + "RecordWorkHandoffRequestV1": { + "additionalProperties": false, + "properties": { + "handoff": { + "$ref": "#/$defs/WorkHandoffV1" + }, + "mutation": { + "$ref": "#/$defs/WorkProductMutationIdentityV1" + }, + "selection": { + "$ref": "#/$defs/WorkProductSelectionScopeV1" + } + }, + "required": [ + "selection", + "handoff", + "mutation" + ], + "type": "object" + }, + "RefId": { + "description": "Strongly typed canonical identity: `RefId`.", + "type": "string" + }, + "RegisteredRootLocatorV1": { + "additionalProperties": false, + "description": "Exact registered root locator retained with an authorized scope.\n\n`canonical_root` is routing evidence for the already-resolved\n[`ResolvedScope`]. It cannot replace or manufacture that scope identity.", + "properties": { + "canonical_root": { + "type": "string" + }, + "profile": { + "$ref": "#/$defs/SharedProfileStoreLocatorV1" + }, + "project_id": { + "$ref": "#/$defs/ProjectId" + } + }, + "required": [ + "project_id", + "profile", + "canonical_root" + ], + "type": "object" + }, + "RegisteredRootSelectorV1": { + "additionalProperties": false, + "description": "Exact registered-root selector accepted by scope-set CAS.", + "properties": { + "project_id": { + "$ref": "#/$defs/ProjectId" + }, + "root": { + "type": "string" + } + }, + "required": [ + "project_id", + "root" + ], + "type": "object" + }, + "RejectedArgumentAnalyticsV1": { + "description": "Frequency and rate projection for dispatcher rejected-argument observations.\n\nCounts may be known while `rejection_rate` stays absent: Plan 26 forbids\nfabricating a rate when the eligible-attempt denominator is unknown.", + "properties": { + "coverage": { + "$ref": "#/$defs/MetricCoverageV1" + }, + "eligible_attempts": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "groups": { + "items": { + "$ref": "#/$defs/RejectedArgumentGroupV1" + }, + "type": "array" + }, + "projector_revision": { + "type": "string" + }, + "redacted_name_count": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "rejected_total": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "rejection_rate": { + "format": "double", + "type": [ + "number", + "null" + ] + }, + "unavailable_reason": { + "type": [ + "string", + "null" + ] + }, + "watermark": { + "type": "string" + } + }, + "required": [ + "coverage", + "projector_revision", + "watermark", + "eligible_attempts", + "rejected_total", + "rejection_rate", + "redacted_name_count", + "groups", + "unavailable_reason" + ], + "type": "object" + }, + "RejectedArgumentErrorClassV1": { + "description": "Closed error class for a rejected surface argument.", + "enum": [ + "missing", + "invalid_shape", + "out_of_bounds", + "unsupported", + "unauthorized", + "stale", + "unknown" + ], + "type": "string" + }, + "RejectedArgumentGroupV1": { + "description": "One surface × operation × argument × error-class cell in the rejected-argument view.", + "properties": { + "argument": { + "$ref": "#/$defs/RejectedArgumentNameV1" + }, + "count": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "error_class": { + "$ref": "#/$defs/RejectedArgumentErrorClassV1" + }, + "operation": { + "type": "string" + }, + "rate": { + "description": "Eligible-attempt rate for this cell. Absent when the attempt\ndenominator or coverage is insufficient.", + "format": "double", + "type": [ + "number", + "null" + ] + }, + "surface": { + "$ref": "#/$defs/RejectedArgumentSurfaceV1" + } + }, + "required": [ + "surface", + "operation", + "argument", + "error_class", + "count", + "rate" + ], + "type": "object" + }, + "RejectedArgumentNameV1": { + "description": "Normalized rejected-argument name. Raw flags, values, and tokens never\nenter this vocabulary.", + "enum": [ + "request_body", + "pagination", + "request_handle", + "operation", + "lifecycle", + "unknown" + ], + "type": "string" + }, + "RejectedArgumentSurfaceV1": { + "description": "Transport that rejected a surface argument. Unknown preserves missing\nattribution instead of inventing cli/mcp/http.", + "enum": [ + "cli", + "mcp", + "http", + "unknown" + ], + "type": "string" + }, + "ReleaseWorkPlacementCommand": { + "additionalProperties": false, + "properties": { + "expected_authority_version": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "occurred_at": { + "$ref": "#/$defs/UtcMicros" + }, + "run_id": { + "$ref": "#/$defs/RunId" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + } + }, + "required": [ + "task_id", + "run_id", + "expected_authority_version", + "occurred_at" + ], + "title": "ReleaseWorkPlacementCommand", + "type": "object" + }, + "RemoteAuthorityMissingReasonV1": { + "enum": [ + "registry_unavailable", + "placement_unknown", + "authority_unreachable", + "authority_authentication_failed", + "caller_authentication_failed", + "enrollment_expired", + "enrollment_revoked", + "insufficient_capability", + "scope_mismatch", + "fence_unverified", + "protocol_incompatible" + ], + "type": "string" + }, + "RemoteAuthoritySummaryV1": { + "oneOf": [ + { + "properties": { + "fence": { + "$ref": "#/$defs/RemoteFenceSummaryV1" + }, + "state": { + "const": "available", + "type": "string" + } + }, + "required": [ + "state", + "fence" + ], + "type": "object" + }, + { + "properties": { + "fence": { + "anyOf": [ + { + "$ref": "#/$defs/RemoteFenceSummaryV1" + }, + { + "type": "null" + } + ] + }, + "missing": { + "items": { + "$ref": "#/$defs/RemoteAuthorityMissingReasonV1" + }, + "type": "array" + }, + "state": { + "const": "partial", + "type": "string" + } + }, + "required": [ + "state", + "fence", + "missing" + ], + "type": "object" + }, + { + "properties": { + "reason": { + "$ref": "#/$defs/RemoteAuthorityMissingReasonV1" + }, + "state": { + "const": "unavailable", + "type": "string" + } + }, + "required": [ + "state", + "reason" + ], + "type": "object" + } + ] + }, + "RemoteFenceSummaryV1": { + "properties": { + "authority_epoch": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "authority_node_id": { + "type": "string" + }, + "brain_id": { + "type": "string" + }, + "generation_id": { + "type": "string" + }, + "placement_revision": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "shard_id": { + "type": "string" + } + }, + "required": [ + "brain_id", + "shard_id", + "generation_id", + "placement_revision", + "authority_epoch", + "authority_node_id" + ], + "type": "object" + }, + "RemoteListenerKindV1": { + "enum": [ + "serving", + "disabled", + "degraded" + ], + "type": "string" + }, + "RemoteOperationalStatusPayloadV1": { + "description": "Dashboard wire DTO for the Remote Brain operational plane.", + "oneOf": [ + { + "properties": { + "authority": { + "$ref": "#/$defs/RemoteAuthoritySummaryV1" + }, + "coverage": { + "$ref": "#/$defs/DoctorCoverageCompletenessV1" + }, + "current_backup_verified": { + "type": "boolean" + }, + "enrollment_configured": { + "type": "boolean" + }, + "failover_in_progress": { + "type": "boolean" + }, + "kind": { + "const": "observed", + "type": "string" + }, + "listener": { + "$ref": "#/$defs/RemoteListenerKindV1" + }, + "observed_at": { + "$ref": "#/$defs/UtcMicros" + }, + "readiness": { + "$ref": "#/$defs/RemoteReadinessKindV1" + }, + "recovery_required": { + "type": "boolean" + }, + "replay_coverage_complete": { + "type": "boolean" + }, + "spool": { + "$ref": "#/$defs/RemoteSpoolSummaryV1" + } + }, + "required": [ + "kind", + "listener", + "coverage", + "readiness", + "enrollment_configured", + "authority", + "spool", + "replay_coverage_complete", + "current_backup_verified", + "failover_in_progress", + "recovery_required", + "observed_at" + ], + "type": "object" + }, + { + "properties": { + "kind": { + "const": "unconfigured", + "type": "string" + } + }, + "required": [ + "kind" + ], + "type": "object" + }, + { + "properties": { + "kind": { + "const": "unavailable", + "type": "string" + }, + "note": { + "type": "string" + } + }, + "required": [ + "kind", + "note" + ], + "type": "object" + } + ] + }, + "RemoteReadinessKindV1": { + "enum": [ + "unconfigured", + "partial", + "ready", + "recovery_required" + ], + "type": "string" + }, + "RemoteSpoolSummaryV1": { + "properties": { + "has_sequence_gap": { + "type": "boolean" + }, + "pending_count": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "quarantined_count": { + "format": "uint64", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "pending_count", + "quarantined_count", + "has_sequence_gap" + ], + "type": "object" + }, + "RepositoryId": { + "description": "Strongly typed canonical identity: `RepositoryId`.", + "type": "string" + }, + "RepositoryPlacementScopeV1": { + "oneOf": [ + { + "properties": { + "kind": { + "const": "all_authorized", + "type": "string" + } + }, + "required": [ + "kind" + ], + "type": "object" + }, + { + "properties": { + "kind": { + "const": "allowlist", + "type": "string" + }, + "repositories": { + "items": { + "$ref": "#/$defs/RepositoryId" + }, + "type": "array", + "uniqueItems": true + } + }, + "required": [ + "kind", + "repositories" + ], + "type": "object" + } + ] + }, + "RequiredCheckExpectationV1": { + "enum": [ + "successful_terminal" + ], + "type": "string" + }, + "RequiredCheckV1": { + "additionalProperties": false, + "properties": { + "capability_id": { + "$ref": "#/$defs/CapabilityId" + }, + "expectation": { + "$ref": "#/$defs/RequiredCheckExpectationV1" + }, + "maximum_age_seconds": { + "format": "uint32", + "minimum": 1, + "type": "integer" + } + }, + "required": [ + "capability_id", + "expectation", + "maximum_age_seconds" + ], + "type": "object" + }, + "RequiredNullable": { + "anyOf": [ + { + "$ref": "#/$defs/EffectReceipt" + }, + { + "type": "null" + } + ], + "description": "Unlike `Option`, this wrapper distinguishes an explicit JSON `null`\nfrom an omitted field. New terminal-state fields must be present on every\nrecord so a missing committed receipt cannot be mistaken for `None`." + }, + "RequiredNullable2": { + "anyOf": [ + { + "$ref": "#/$defs/CancellationStage" + }, + { + "type": "null" + } + ], + "description": "Unlike `Option`, this wrapper distinguishes an explicit JSON `null`\nfrom an omitted field. New terminal-state fields must be present on every\nrecord so a missing committed receipt cannot be mistaken for `None`." + }, + "RequiredNullable3": { + "anyOf": [ + { + "$ref": "#/$defs/ApplicationUnavailableClassV1" + }, + { + "type": "null" + } + ], + "description": "Unlike `Option`, this wrapper distinguishes an explicit JSON `null`\nfrom an omitted field. New terminal-state fields must be present on every\nrecord so a missing committed receipt cannot be mistaken for `None`." + }, + "RequiredNullable4": { + "anyOf": [ + { + "$ref": "#/$defs/ApplicationExecutionFailureClassV1" + }, + { + "type": "null" + } + ], + "description": "Unlike `Option`, this wrapper distinguishes an explicit JSON `null`\nfrom an omitted field. New terminal-state fields must be present on every\nrecord so a missing committed receipt cannot be mistaken for `None`." + }, + "ResolvedScope": { + "additionalProperties": false, + "description": "The resolved configuration scope is one exact project/repository/worktree root.\n\nPaths, CWDs, labels, and mutable branch spellings are deliberately absent.", + "properties": { + "project_id": { + "$ref": "#/$defs/ProjectId" + }, + "reference": { + "anyOf": [ + { + "$ref": "#/$defs/RefId" + }, + { + "type": "null" + } + ] + }, + "repository_id": { + "$ref": "#/$defs/RepositoryId" + }, + "scope_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "worktree_id": { + "$ref": "#/$defs/WorktreeId" + } + }, + "required": [ + "project_id", + "repository_id", + "worktree_id", + "reference", + "scope_digest" + ], + "type": "object" + }, + "ResultContractRef": { + "additionalProperties": false, + "description": "Versioned schema identity for an application result contract.", + "properties": { + "schema_id": { + "$ref": "#/$defs/SchemaId" + }, + "schema_revision": { + "format": "uint32", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "schema_id", + "schema_revision" + ], + "type": "object" + }, + "ResumeWorkAttemptsCommand": { + "additionalProperties": false, + "properties": { + "occurred_at": { + "$ref": "#/$defs/UtcMicros" + } + }, + "required": [ + "occurred_at" + ], + "type": "object" + }, + "ResumeWorkRunCommand": { + "additionalProperties": false, + "properties": { + "expected_authority_version": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "occurred_at": { + "$ref": "#/$defs/UtcMicros" + }, + "reason": { + "$ref": "#/$defs/WorkRunControlReasonV1" + }, + "run_id": { + "$ref": "#/$defs/RunId" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + } + }, + "required": [ + "task_id", + "run_id", + "reason", + "expected_authority_version", + "occurred_at" + ], + "title": "ResumeWorkRunCommand", + "type": "object" + }, + "RetrievalAnchorId": { + "description": "Strongly typed canonical identity: `RetrievalAnchorId`.", + "type": "string" + }, + "RetryDirective": { + "description": "Safe adapter-independent retry instruction. Adapters preserve it verbatim.", + "enum": [ + "never", + "same_request", + "after_delay", + "after_revalidate", + "after_reconcile" + ], + "type": "string" + }, + "RetryScope": { + "description": "Request identity boundary within which a retry remains valid.", + "enum": [ + "same_request", + "same_operation", + "fresh_request" + ], + "type": "string" + }, + "RetryWorkAttemptCommandV1": { + "additionalProperties": false, + "properties": { + "command_id": { + "$ref": "#/$defs/WorkCommandId" + }, + "failure": { + "$ref": "#/$defs/WorkRetryFailureSelectorV1" + }, + "new_attempt_id": { + "$ref": "#/$defs/AttemptId" + }, + "original_attempt": { + "$ref": "#/$defs/WorkAttemptIdentityV1" + } + }, + "required": [ + "original_attempt", + "new_attempt_id", + "failure", + "command_id" + ], + "title": "RetryWorkAttemptCommandV1", + "type": "object" + }, + "ReviewRequirementV1": { + "oneOf": [ + { + "properties": { + "kind": { + "const": "none", + "type": "string" + } + }, + "required": [ + "kind" + ], + "type": "object" + }, + { + "properties": { + "count": { + "format": "uint16", + "maximum": 65535, + "minimum": 1, + "type": "integer" + }, + "kind": { + "const": "independent_review_count", + "type": "string" + } + }, + "required": [ + "kind", + "count" + ], + "type": "object" + }, + { + "properties": { + "kind": { + "const": "code_owner_and_independent_review", + "type": "string" + } + }, + "required": [ + "kind" + ], + "type": "object" + } + ] + }, + "ReviewTopologyKindV1": { + "enum": [ + "no_review", + "independent_review", + "standard_pull_requests", + "git_hub_stacked_pull_requests" + ], + "type": "string" + }, + "ReviewTopologyPolicyV1": { + "additionalProperties": false, + "properties": { + "allowed": { + "items": { + "$ref": "#/$defs/ReviewTopologyKindV1" + }, + "type": "array", + "uniqueItems": true + }, + "github_stacked_prs": { + "$ref": "#/$defs/GitHubStackedPullRequestPolicyV1" + } + }, + "required": [ + "allowed", + "github_stacked_prs" + ], + "type": "object" + }, + "RootGenerationV1": { + "additionalProperties": false, + "description": "Immutable collection and stack revisions for one exact resolved root.", + "properties": { + "collection_revision": { + "$ref": "#/$defs/ManifestDigest" + }, + "generation_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "scope_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "stack_revision": { + "$ref": "#/$defs/ManifestDigest" + } + }, + "required": [ + "scope_digest", + "collection_revision", + "stack_revision", + "generation_digest" + ], + "type": "object" + }, + "RootScopeOutcomeV1_for_Array_of_AnyValue": { + "additionalProperties": false, + "description": "One typed outcome pinned to the digest of an exact resolved root.", + "properties": { + "outcome": { + "$ref": "#/$defs/ScopeOutcome_for_Array_of_AnyValue" + }, + "scope_digest": { + "$ref": "#/$defs/ManifestDigest" + } + }, + "required": [ + "scope_digest", + "outcome" + ], + "type": "object" + }, + "RootScopeOutcomeV1_for_RootGenerationV1": { + "additionalProperties": false, + "description": "One typed outcome pinned to the digest of an exact resolved root.", + "properties": { + "outcome": { + "$ref": "#/$defs/ScopeOutcome_for_RootGenerationV1" + }, + "scope_digest": { + "$ref": "#/$defs/ManifestDigest" + } + }, + "required": [ + "scope_digest", + "outcome" + ], + "type": "object" + }, + "RunId": { + "description": "Strongly typed canonical identity: `RunId`.", + "type": "string" + }, + "SafeDiagnostic": { + "additionalProperties": false, + "description": "Sanitized detail that may cross the application boundary.", + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + }, + "SanitizationReceiptId": { + "description": "Strongly typed canonical identity: `SanitizationReceiptId`.", + "type": "string" + }, + "SanitizationReceiptRefV1": { + "additionalProperties": false, + "description": "Reference to a capture-owned sanitization receipt.\n\nReceipt references are the explicit boundary between untrusted wire data and\nthe proof-carrying text types below. They do not claim that the domain crate\nran a sanitizer; the capture layer owns issuance and persistence of receipts.", + "properties": { + "receipt_id": { + "$ref": "#/$defs/SanitizationReceiptId" + }, + "sanitizer_version": { + "$ref": "#/$defs/ComponentVersion" + } + }, + "required": [ + "receipt_id", + "sanitizer_version" + ], + "type": "object" + }, + "SanitizationReceiptV1": { + "additionalProperties": false, + "properties": { + "disposition": { + "$ref": "#/$defs/SanitizerDispositionV1" + }, + "payload": { + "anyOf": [ + { + "$ref": "#/$defs/PayloadReferenceV1" + }, + { + "type": "null" + } + ] + }, + "receipt": { + "$ref": "#/$defs/SanitizationReceiptRefV1" + }, + "sensitivity": { + "$ref": "#/$defs/SensitivityV1" + } + }, + "required": [ + "receipt", + "disposition", + "sensitivity", + "payload" + ], + "type": "object" + }, + "SanitizerDispositionV1": { + "enum": [ + "accepted", + "redacted", + "rejected", + "quarantined" + ], + "type": "string" + }, + "SavingsAccountingSummaryV1": { + "properties": { + "available": { + "type": "boolean" + }, + "db": { + "type": "string" + }, + "error": { + "default": null, + "type": [ + "string", + "null" + ] + }, + "ledger": { + "anyOf": [ + { + "$ref": "#/$defs/SavingsLedgerSummaryV1" + }, + { + "type": "null" + } + ], + "default": null + }, + "lifetime_counters": { + "anyOf": [ + { + "$ref": "#/$defs/SavingsLifetimeCountersV1" + }, + { + "type": "null" + } + ], + "default": null + }, + "recording": true + }, + "required": [ + "available", + "db", + "recording", + "error", + "ledger", + "lifetime_counters" + ], + "type": "object" + }, + "SavingsLedgerSummaryV1": { + "properties": { + "all_time": { + "$ref": "#/$defs/SavingsSumV1" + }, + "last_30d": { + "$ref": "#/$defs/SavingsSumV1" + }, + "last_7d": { + "$ref": "#/$defs/SavingsSumV1" + }, + "today": { + "$ref": "#/$defs/SavingsSumV1" + } + }, + "required": [ + "today", + "last_7d", + "last_30d", + "all_time" + ], + "type": "object" + }, + "SavingsLifetimeCountersV1": { + "properties": { + "project_total": { + "format": "int64", + "type": "integer" + }, + "projects": { + "items": { + "$ref": "#/$defs/SavingsLifetimeProjectV1" + }, + "type": "array" + }, + "projects_limit": { + "format": "int64", + "type": "integer" + }, + "projects_truncated": { + "type": "boolean" + }, + "total_tokens_saved": { + "format": "int64", + "type": "integer" + } + }, + "required": [ + "total_tokens_saved", + "project_total", + "projects_limit", + "projects_truncated", + "projects" + ], + "type": "object" + }, + "SavingsLifetimeProjectV1": { + "properties": { + "path": { + "type": [ + "string", + "null" + ] + }, + "tokens_saved": { + "format": "int64", + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "path", + "tokens_saved" + ], + "type": "object" + }, + "SavingsOverviewPayloadV1": { + "properties": { + "costs": { + "$ref": "#/$defs/CostsReadModelV1" + }, + "pricing": { + "$ref": "#/$defs/SavingsPricingSummaryV1" + }, + "provider_usage": { + "$ref": "#/$defs/ProviderUsageSummaryV1" + }, + "savings": { + "$ref": "#/$defs/SavingsAccountingSummaryV1" + }, + "sessions": { + "$ref": "#/$defs/SavingsSessionSummaryV1" + } + }, + "required": [ + "savings", + "sessions", + "provider_usage", + "pricing", + "costs" + ], + "type": "object" + }, + "SavingsPricingSummaryV1": { + "properties": { + "fetched_at": true, + "model_count": true, + "offline": true, + "revision": true, + "source": true + }, + "required": [ + "source", + "revision", + "fetched_at", + "offline", + "model_count" + ], + "type": "object" + }, + "SavingsSessionModelV1": { + "properties": { + "cost_basis": { + "type": "string" + }, + "estimated": { + "$ref": "#/$defs/TokenPairV1" + }, + "estimated_messages": { + "format": "int64", + "type": "integer" + }, + "messages": { + "format": "int64", + "type": "integer" + }, + "model": { + "type": [ + "string", + "null" + ] + }, + "provider_actual": { + "anyOf": [ + { + "$ref": "#/$defs/TokenActualV1" + }, + { + "type": "null" + } + ] + }, + "provider_usage_events": { + "format": "int64", + "type": "integer" + }, + "tokenized": { + "$ref": "#/$defs/TokenPairV1" + }, + "tokenized_messages": { + "format": "int64", + "type": "integer" + }, + "tokenizer": true + }, + "required": [ + "model", + "tokenizer", + "messages", + "provider_usage_events", + "tokenized_messages", + "estimated_messages", + "cost_basis", + "provider_actual", + "tokenized", + "estimated" + ], + "type": "object" + }, + "SavingsSessionRowV1": { + "properties": { + "cost_basis": { + "type": "string" + }, + "estimated_messages": { + "format": "int64", + "type": "integer" + }, + "is_subagent": { + "type": "boolean" + }, + "last_message_at": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "messages": { + "format": "int64", + "type": "integer" + }, + "models": { + "items": { + "$ref": "#/$defs/SavingsSessionModelV1" + }, + "type": "array" + }, + "provider": { + "type": "string" + }, + "provider_usage_events": { + "format": "int64", + "type": "integer" + }, + "session_id": { + "type": "string" + }, + "started_at": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "title": { + "type": [ + "string", + "null" + ] + }, + "tokenized_messages": { + "format": "int64", + "type": "integer" + } + }, + "required": [ + "provider", + "session_id", + "title", + "started_at", + "last_message_at", + "is_subagent", + "messages", + "provider_usage_events", + "tokenized_messages", + "estimated_messages", + "cost_basis", + "models" + ], + "type": "object" + }, + "SavingsSessionSummaryV1": { + "properties": { + "available": { + "type": "boolean" + }, + "cost_basis": { + "default": null, + "type": [ + "string", + "null" + ] + }, + "db": { + "type": "string" + }, + "error": { + "default": null, + "type": [ + "string", + "null" + ] + }, + "estimated": { + "anyOf": [ + { + "$ref": "#/$defs/TokenPairV1" + }, + { + "type": "null" + } + ], + "default": null + }, + "estimated_messages": { + "default": null, + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "messages": { + "default": null, + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "model_count": { + "default": null, + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "provider_actual": { + "anyOf": [ + { + "$ref": "#/$defs/TokenActualV1" + }, + { + "type": "null" + } + ], + "default": null + }, + "provider_usage_events": { + "default": null, + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "scope": { + "default": null, + "type": [ + "string", + "null" + ] + }, + "session_count": { + "default": null, + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "status": { + "default": null, + "type": [ + "string", + "null" + ] + }, + "token_counting": { + "default": null, + "type": [ + "boolean", + "null" + ] + }, + "tokenized": { + "anyOf": [ + { + "$ref": "#/$defs/TokenPairV1" + }, + { + "type": "null" + } + ], + "default": null + }, + "tokenized_messages": { + "default": null, + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "unknown_model_messages": { + "default": null, + "format": "int64", + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "available", + "db", + "scope", + "status", + "error", + "messages", + "provider_usage_events", + "tokenized_messages", + "estimated_messages", + "cost_basis", + "provider_actual", + "tokenized", + "estimated", + "session_count", + "model_count", + "unknown_model_messages", + "token_counting" + ], + "type": "object" + }, + "SavingsSessionsPayloadV1": { + "properties": { + "available": { + "type": "boolean" + }, + "db": { + "type": "string" + }, + "range": { + "type": "string" + }, + "scope": { + "default": null, + "type": [ + "string", + "null" + ] + }, + "sessions": { + "items": { + "$ref": "#/$defs/SavingsSessionRowV1" + }, + "type": "array" + }, + "since": { + "default": null, + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "total": { + "format": "int64", + "type": "integer" + } + }, + "required": [ + "available", + "db", + "scope", + "range", + "since", + "total", + "sessions" + ], + "type": "object" + }, + "SavingsSumV1": { + "properties": { + "calls": { + "format": "int64", + "type": "integer" + }, + "saved_tokens": { + "format": "int64", + "type": "integer" + } + }, + "required": [ + "saved_tokens", + "calls" + ], + "type": "object" + }, + "SchemaId": { + "description": "Stable, canonical catalog identity for `SchemaId`.", + "type": "string" + }, + "ScopeOutcome_for_Array_of_AnyValue": { + "description": "Truthful outcome for one authorized root or an aggregate over roots.\n\n`Denied` and `Unavailable` carry no value and therefore cannot be confused\nwith a successful empty result.", + "oneOf": [ + { + "properties": { + "outcome": { + "const": "exact", + "type": "string" + }, + "value": { + "items": true, + "type": "array" + } + }, + "required": [ + "outcome", + "value" + ], + "type": "object" + }, + { + "properties": { + "outcome": { + "const": "partial", + "type": "string" + }, + "value": { + "properties": { + "reason": { + "$ref": "#/$defs/ScopePartialReasonV1" + }, + "value": { + "items": true, + "type": "array" + } + }, + "required": [ + "value", + "reason" + ], + "type": "object" + } + }, + "required": [ + "outcome", + "value" + ], + "type": "object" + }, + { + "properties": { + "outcome": { + "const": "denied", + "type": "string" + } + }, + "required": [ + "outcome" + ], + "type": "object" + }, + { + "properties": { + "outcome": { + "const": "unavailable", + "type": "string" + }, + "value": { + "properties": { + "reason": { + "$ref": "#/$defs/ScopeUnavailableReasonV1" + } + }, + "required": [ + "reason" + ], + "type": "object" + } + }, + "required": [ + "outcome", + "value" + ], + "type": "object" + } + ] + }, + "ScopeOutcome_for_RootGenerationV1": { + "description": "Truthful outcome for one authorized root or an aggregate over roots.\n\n`Denied` and `Unavailable` carry no value and therefore cannot be confused\nwith a successful empty result.", + "oneOf": [ + { + "properties": { + "outcome": { + "const": "exact", + "type": "string" + }, + "value": { + "$ref": "#/$defs/RootGenerationV1" + } + }, + "required": [ + "outcome", + "value" + ], + "type": "object" + }, + { + "properties": { + "outcome": { + "const": "partial", + "type": "string" + }, + "value": { + "properties": { + "reason": { + "$ref": "#/$defs/ScopePartialReasonV1" + }, + "value": { + "$ref": "#/$defs/RootGenerationV1" + } + }, + "required": [ + "value", + "reason" + ], + "type": "object" + } + }, + "required": [ + "outcome", + "value" + ], + "type": "object" + }, + { + "properties": { + "outcome": { + "const": "denied", + "type": "string" + } + }, + "required": [ + "outcome" + ], + "type": "object" + }, + { + "properties": { + "outcome": { + "const": "unavailable", + "type": "string" + }, + "value": { + "properties": { + "reason": { + "$ref": "#/$defs/ScopeUnavailableReasonV1" + } + }, + "required": [ + "reason" + ], + "type": "object" + } + }, + "required": [ + "outcome", + "value" + ], + "type": "object" + } + ] + }, + "ScopePartialReasonV1": { + "description": "Typed explanation for a root that returned usable but incomplete data.", + "enum": [ + "incomplete", + "stale", + "budget_exceeded", + "root_denied", + "root_unavailable" + ], + "type": "string" + }, + "ScopeSetId": { + "description": "Stable identity of one authorized scope-set record.", + "type": "string" + }, + "ScopeSetRevision": { + "description": "Monotonic optimistic-concurrency revision of one scope set.", + "format": "uint64", + "minimum": 1, + "type": "integer" + }, + "ScopeUnavailableReasonV1": { + "description": "Typed explanation for a root that could not return usable data.", + "enum": [ + "authority_unavailable", + "root_missing", + "store_unavailable" + ], + "type": "string" + }, + "SensitiveFilesystemLocatorV1": { + "additionalProperties": false, + "description": "Reference-only filesystem locator. The raw path is sealed outside this\ncontract; only the privacy-bound locator digest and sealed-value digest are\nrepresentable here.", + "properties": { + "locator_digest": { + "$ref": "#/$defs/LocatorDigest" + }, + "sealed_value_digest": { + "$ref": "#/$defs/ManifestDigest" + } + }, + "required": [ + "locator_digest", + "sealed_value_digest" + ], + "type": "object" + }, + "SensitivityV1": { + "enum": [ + "unclassified", + "non_sensitive", + "sensitive", + "secret" + ], + "type": "string" + }, + "SessionId": { + "description": "Strongly typed canonical identity: `SessionId`.", + "type": "string" + }, + "SessionRetrievalBudgetStageV1": { + "description": "Structural budget boundary that rejected a session retrieval request.\nThese causes are non-retryable request corrections; concurrent permit or\nqueue pressure remains a separate capacity-saturation failure.", + "enum": [ + "request_result_limit", + "request_hydration_limit", + "request_context_bytes", + "request_candidate_bytes", + "request_record_bytes", + "request_hydration_bytes", + "estimator_version_mismatch", + "execution_work_exhausted", + "kernel_result_limit", + "participant_manifest_participants", + "participant_manifest_canonical_bytes", + "hydration_bytes", + "context_bytes", + "context_tokens" + ], + "type": "string" + }, + "SessionRetrievalStructuralRefusalV1": { + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "kind": { + "type": "string" + }, + "maximum": { + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "observed": { + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "refusal": { + "const": "cursor_manifest_limit_exceeded", + "type": "string" + } + }, + "required": [ + "refusal", + "kind", + "observed", + "maximum" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "refusal": { + "const": "budget_exhausted", + "type": "string" + }, + "stage": { + "$ref": "#/$defs/SessionRetrievalBudgetStageV1" + } + }, + "required": [ + "refusal", + "stage" + ], + "type": "object" + } + ] + }, + "SettingsAvailabilityV1": { + "properties": { + "available": { + "type": "boolean" + }, + "reason": { + "type": [ + "string", + "null" + ] + }, + "required_authority": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "available" + ], + "type": "object" + }, + "SettingsPayloadV1": { + "properties": { + "automation": { + "$ref": "#/$defs/AutomationSettingsPayloadV1" + }, + "environment": { + "$ref": "#/$defs/EnvironmentSettingsPayloadV1" + }, + "project": { + "$ref": "#/$defs/ProjectSettingsPayloadV1" + }, + "restart_recommended": { + "type": [ + "boolean", + "null" + ] + }, + "resync_recommended": { + "type": [ + "boolean", + "null" + ] + }, + "storage": { + "$ref": "#/$defs/StorageSettingsPayloadV1" + }, + "user": { + "$ref": "#/$defs/UserSettingsPayloadV1" + }, + "version": { + "$ref": "#/$defs/VersionSettingsPayloadV1" + } + }, + "required": [ + "project", + "user", + "automation", + "environment", + "storage", + "version" + ], + "type": "object" + }, + "SharedProfileStoreLocatorV1": { + "additionalProperties": false, + "description": "Shared physical profile-store locator supplied by the profile authority.\n\nThe typed profile and store IDs select this locator. It never derives an\nidentity from a path, CWD, active graph, or mutable project alias.", + "properties": { + "profile_id": { + "$ref": "#/$defs/UserProfileId" + }, + "store_id": { + "type": "string" + } + }, + "required": [ + "profile_id", + "store_id" + ], + "type": "object" + }, + "SignificantTableGrowthSampleV1": { + "description": "One significant table-growth sample exposed to the dashboard.", + "properties": { + "current_bytes": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "current_observed_at": { + "format": "int64", + "type": "integer" + }, + "growth_bytes": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "previous_bytes": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "previous_observed_at": { + "format": "int64", + "type": "integer" + }, + "table": { + "type": "string" + } + }, + "required": [ + "table", + "previous_bytes", + "current_bytes", + "growth_bytes", + "previous_observed_at", + "current_observed_at" + ], + "type": "object" + }, + "SourceStoreId": { + "description": "Strongly typed canonical identity: `SourceStoreId`.", + "type": "string" + }, + "StartWorkAttemptCommand": { + "additionalProperties": false, + "description": "Starts one admitted provider attempt. Every field is a typed fact; there\nis no argv, environment entry, executable path, or shell string here. The\nprojection binding and admission facts are re-read from the canonical Work\nauthority, never trusted from the caller.", + "properties": { + "attempt_id": { + "$ref": "#/$defs/AttemptId" + }, + "commit": { + "$ref": "#/$defs/CommitId" + }, + "effect_state": { + "$ref": "#/$defs/WorkEffectStateV1" + }, + "execution_snapshot": { + "$ref": "#/$defs/WorkExecutionSnapshot" + }, + "instructions": { + "type": "string" + }, + "occurred_at": { + "$ref": "#/$defs/UtcMicros" + }, + "operation": { + "$ref": "#/$defs/WorkflowOperationRef" + }, + "reference": { + "anyOf": [ + { + "$ref": "#/$defs/RefId" + }, + { + "type": "null" + } + ] + }, + "run_id": { + "$ref": "#/$defs/RunId" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + }, + "worktree_root": { + "type": "string" + } + }, + "required": [ + "task_id", + "run_id", + "attempt_id", + "operation", + "execution_snapshot", + "worktree_root", + "reference", + "commit", + "instructions", + "effect_state", + "occurred_at" + ], + "type": "object" + }, + "StorageByteSizeV1": { + "description": "A byte size measurement. A newtype keeps sizes from being confused with\ncounts, ratios, or timestamps in the read models and producers.", + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "StorageFindingKindStatusV1": { + "description": "Source-coverage status for one typed storage finding producer.", + "properties": { + "kind": { + "$ref": "#/$defs/DoctorStorageFindingKindV1" + }, + "observed_entries": { + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "reason": { + "type": "string" + }, + "state": { + "$ref": "#/$defs/StorageFindingSourceStateV1" + } + }, + "required": [ + "kind", + "state", + "observed_entries", + "reason" + ], + "type": "object" + }, + "StorageFindingSourceStateV1": { + "description": "Whether one storage finding producer had enough source evidence to report\na real result. This is source coverage, not a health grade: `Real` can\ndescribe a clean observation or a problem finding.", + "enum": [ + "real", + "partial", + "unsupported" + ], + "type": "string" + }, + "StorageFindingsPayloadV1": { + "description": "Route-specific payload for `/api/storage/findings`.\n\nStorage producer coverage is required here rather than an optional field on\nthe general Doctor payload, so generated consumers cannot mistake one route\nfor the other.", + "properties": { + "entries": { + "items": { + "$ref": "#/$defs/DoctorReportEntryV1" + }, + "type": "array" + }, + "family_filter": { + "anyOf": [ + { + "$ref": "#/$defs/DoctorFindingFamilyV1" + }, + { + "type": "null" + } + ] + }, + "kind_statuses": { + "items": { + "$ref": "#/$defs/StorageFindingKindStatusV1" + }, + "type": "array" + }, + "known_families": { + "items": { + "$ref": "#/$defs/DoctorFindingFamilyV1" + }, + "type": "array" + }, + "note": { + "type": "string" + }, + "report_coverage": { + "anyOf": [ + { + "$ref": "#/$defs/DoctorReportCoverageV1" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "family_filter", + "entries", + "report_coverage", + "known_families", + "note", + "kind_statuses" + ], + "type": "object" + }, + "StorageSettingsPayloadV1": { + "properties": { + "dashboard_root": { + "type": "string" + }, + "graph_db": { + "type": "string" + }, + "lcm_db": { + "type": "string" + }, + "lcm_scope": { + "type": "string" + }, + "memory_db": { + "type": "string" + }, + "project_id": { + "type": [ + "string", + "null" + ] + }, + "project_root": { + "type": "string" + }, + "savings_db": { + "type": "string" + }, + "storage_mode": { + "type": "string" + }, + "store_root": { + "type": "string" + } + }, + "required": [ + "project_id", + "project_root", + "storage_mode", + "store_root", + "dashboard_root", + "graph_db", + "memory_db", + "lcm_db", + "lcm_scope", + "savings_db" + ], + "type": "object" + }, + "StorageTelemetryPayloadV1": { + "description": "Telemetry payload: one entry per distinct store the dashboard holds a\nconnection to.", + "properties": { + "budget_note": { + "description": "Where budgets come from, stated once for the whole read.", + "type": "string" + }, + "growth_note": { + "description": "The growth window's coverage, stated once for the whole read.", + "type": "string" + }, + "stores": { + "items": { + "$ref": "#/$defs/StoreTelemetryEntryV1" + }, + "type": "array" + }, + "table_growth_coverage": { + "$ref": "#/$defs/DashboardCoverageV1", + "description": "Aggregate coverage across the expected per-store table-growth reads." + }, + "table_growth_threshold": { + "$ref": "#/$defs/TableGrowthThresholdV1", + "description": "The exact significance rule applied to `table_growth` samples." + } + }, + "required": [ + "stores", + "budget_note", + "growth_note", + "table_growth_threshold", + "table_growth_coverage" + ], + "type": "object" + }, + "StorageTelemetryReadV1": { + "description": "The typed result of one telemetry read attempt.\n\nThe port is *total*: it never fails silently into a healthy or empty result.\nA platform that cannot query `dbstat`/pragmas reports [`Self::Unsupported`];\na denied read reports [`Self::Denied`]; an undetermined read reports\n[`Self::Unknown`]. Each maps to a distinct, honest Doctor evidence state.", + "oneOf": [ + { + "description": "A size sample was observed.", + "properties": { + "kind": { + "const": "observed", + "type": "string" + }, + "sample": { + "$ref": "#/$defs/StoreSizeSampleV1" + } + }, + "required": [ + "kind", + "sample" + ], + "type": "object" + }, + { + "description": "Canonical application `StorageStatus` observed the durable store's file\nsize without opening an adapter-owned SQLite telemetry connection.", + "properties": { + "kind": { + "const": "observed_bytes", + "type": "string" + }, + "observed_at": { + "$ref": "#/$defs/UtcMicros" + }, + "store": { + "$ref": "#/$defs/StoreKeyV1" + }, + "total_bytes": { + "$ref": "#/$defs/StorageByteSizeV1" + } + }, + "required": [ + "kind", + "store", + "total_bytes", + "observed_at" + ], + "type": "object" + }, + { + "description": "The runtime cannot expose page-count telemetry on this build/platform.", + "properties": { + "kind": { + "const": "unsupported", + "type": "string" + }, + "store": { + "$ref": "#/$defs/StoreKeyV1" + } + }, + "required": [ + "kind", + "store" + ], + "type": "object" + }, + { + "description": "Authorization to read the store's telemetry was denied.", + "properties": { + "kind": { + "const": "denied", + "type": "string" + }, + "store": { + "$ref": "#/$defs/StoreKeyV1" + } + }, + "required": [ + "kind", + "store" + ], + "type": "object" + }, + { + "description": "The telemetry state could not be determined.", + "properties": { + "kind": { + "const": "unknown", + "type": "string" + }, + "store": { + "$ref": "#/$defs/StoreKeyV1" + } + }, + "required": [ + "kind", + "store" + ], + "type": "object" + } + ] + }, + "StoreBudgetDimensionV1": { + "description": "The budget-evaluation dimension, sourced from owner configuration.", + "oneOf": [ + { + "description": "An owner-configured soft budget was evaluated against the live sample.", + "properties": { + "evaluation": { + "$ref": "#/$defs/StoreBudgetEvaluationV1" + }, + "reason": { + "type": "string" + }, + "setting_key": { + "description": "The owner setting this budget came from.", + "type": "string" + }, + "state": { + "const": "evaluated", + "type": "string" + } + }, + "required": [ + "state", + "evaluation", + "setting_key", + "reason" + ], + "type": "object" + }, + { + "description": "The budget source is wired and readable, but this owner configured no\nbudget for this store. A missing *setting*, not a missing *feature*.", + "properties": { + "reason": { + "type": "string" + }, + "setting_key": { + "description": "The setting an owner would set to configure a budget here.", + "type": "string" + }, + "state": { + "const": "unset", + "type": "string" + } + }, + "required": [ + "state", + "reason", + "setting_key" + ], + "type": "object" + }, + { + "description": "The budget could not be determined: the resolved configuration was\nunreadable, or no size sample was observed to evaluate against.", + "properties": { + "reason": { + "type": "string" + }, + "state": { + "const": "unknown", + "type": "string" + } + }, + "required": [ + "state", + "reason" + ], + "type": "object" + } + ] + }, + "StoreBudgetEvaluationV1": { + "description": "The outcome of evaluating a store size against its soft budget.", + "oneOf": [ + { + "properties": { + "observed": { + "$ref": "#/$defs/StorageByteSizeV1" + }, + "soft_limit": { + "$ref": "#/$defs/StorageByteSizeV1" + }, + "state": { + "const": "within_budget", + "type": "string" + } + }, + "required": [ + "state", + "observed", + "soft_limit" + ], + "type": "object" + }, + { + "properties": { + "observed": { + "$ref": "#/$defs/StorageByteSizeV1" + }, + "overage": { + "$ref": "#/$defs/StorageByteSizeV1" + }, + "soft_limit": { + "$ref": "#/$defs/StorageByteSizeV1" + }, + "state": { + "const": "over_budget", + "type": "string" + } + }, + "required": [ + "state", + "observed", + "soft_limit", + "overage" + ], + "type": "object" + } + ] + }, + "StoreGrowthDimensionV1": { + "description": "The per-store growth dimension. A status read observes present size but\ncannot create the execution-owned history required for a growth claim.", + "oneOf": [ + { + "description": "No execution-owned watermark is available. This is distinct from a\nzero-sized or unchanged store.", + "properties": { + "reason": { + "type": "string" + }, + "state": { + "const": "unknown", + "type": "string" + } + }, + "required": [ + "state", + "reason" + ], + "type": "object" + } + ] + }, + "StoreKeyV1": { + "description": "Logical name of one owner-profile store (for example `sessions.db`,\n`graph.db`, or `branches/feature-x`). Never an absolute on-disk path.", + "type": "string" + }, + "StoreSizeSampleV1": { + "additionalProperties": false, + "description": "One cheap size sample for a single store, derived from page-count pragmas.\n\n`total_bytes` is `page_count * page_size`; `free_bytes` is\n`freelist_pages * page_size`. Both are recorded so the free-page ratio and\nthe reclaimable-bytes estimate (Plan 38 §6 compaction) can be computed\nwithout re-reading the store.", + "properties": { + "freelist_pages": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "observed_at": { + "$ref": "#/$defs/UtcMicros" + }, + "page_count": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "page_size_bytes": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "store": { + "$ref": "#/$defs/StoreKeyV1" + } + }, + "required": [ + "store", + "page_size_bytes", + "page_count", + "freelist_pages", + "observed_at" + ], + "type": "object" + }, + "StoreTelemetryEntryV1": { + "description": "One store's telemetry entry. One entry per distinct store **file**, not per\ndashboard role.", + "properties": { + "budget": { + "$ref": "#/$defs/StoreBudgetDimensionV1" + }, + "free_bytes": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "free_page_ratio": { + "format": "double", + "type": [ + "number", + "null" + ] + }, + "growth": { + "$ref": "#/$defs/StoreGrowthDimensionV1" + }, + "path": { + "description": "Display path of the store file.", + "type": "string" + }, + "read": { + "$ref": "#/$defs/StorageTelemetryReadV1", + "description": "The typed telemetry read: `observed` with a sample, or `unknown` when the\npragma read failed. Never silently healthy." + }, + "role": { + "description": "The dashboard's primary role label for the store (`graph` / `memory` /\n`lcm` / `savings`). Retained for compatibility; see `roles` for the\ncomplete set.", + "type": "string" + }, + "roles": { + "description": "Every dashboard role served by this one store file. More than one role\nhere means the roles share a database, not that a store was duplicated.", + "items": { + "type": "string" + }, + "type": "array" + }, + "store": { + "description": "Stable store key (the store's file name), or the raw file name when it is\nnot a valid [`StoreKeyV1`].", + "type": "string" + }, + "table_growth": { + "$ref": "#/$defs/TableGrowthDimensionV1", + "description": "Per-table payload growth is unsupported until an execution-owned sampler\npublishes bounded observations. Status reads never create baselines." + }, + "total_bytes": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "store", + "role", + "roles", + "path", + "read", + "total_bytes", + "free_bytes", + "free_page_ratio", + "budget", + "growth", + "table_growth" + ], + "type": "object" + }, + "StrataClusterV1": { + "properties": { + "boundary_edges": { + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "directory": { + "type": "string" + }, + "file_count": { + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "incoming_edges": { + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "internal_edges": { + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "order": { + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "outgoing_edges": { + "format": "uint", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "order", + "directory", + "file_count", + "internal_edges", + "outgoing_edges", + "incoming_edges", + "boundary_edges" + ], + "type": "object" + }, + "StrataFileV1": { + "properties": { + "chain": { + "items": { + "type": "string" + }, + "type": "array" + }, + "depth": { + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "path": { + "type": "string" + }, + "scc_size": { + "format": "uint", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "path", + "depth", + "scc_size", + "chain" + ], + "type": "object" + }, + "StrataMeasurementV1": { + "properties": { + "algorithm": { + "type": "string" + }, + "cluster_ordering": { + "type": "string" + }, + "clusters": { + "items": { + "$ref": "#/$defs/StrataClusterV1" + }, + "type": "array" + }, + "dependency_edge_kinds": { + "items": { + "type": "string" + }, + "maxItems": 2, + "minItems": 2, + "type": "array" + }, + "files": { + "items": { + "$ref": "#/$defs/StrataFileV1" + }, + "type": "array" + }, + "granularity": { + "type": "string" + }, + "graph_generation": { + "type": "string" + }, + "ideal_depth": { + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "max_depth": { + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "scan": { + "$ref": "#/$defs/StrataScanV1" + } + }, + "required": [ + "graph_generation", + "granularity", + "dependency_edge_kinds", + "algorithm", + "cluster_ordering", + "max_depth", + "ideal_depth", + "files", + "clusters", + "scan" + ], + "type": "object" + }, + "StrataScanV1": { + "properties": { + "budget_ms": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "cache_scope": { + "type": "string" + }, + "cache_state": { + "type": "string" + }, + "dependency_edges_examined": { + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "files_examined": { + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "max_dependency_edges": { + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "max_files": { + "format": "uint", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "cache_scope", + "cache_state", + "budget_ms", + "max_files", + "max_dependency_edges", + "files_examined", + "dependency_edges_examined" + ], + "type": "object" + }, + "StructureReadV1": { + "oneOf": [ + { + "properties": { + "measurement": { + "$ref": "#/$defs/CallChainMeasurementV1" + }, + "status": { + "const": "measured", + "type": "string" + } + }, + "required": [ + "status", + "measurement" + ], + "type": "object" + }, + { + "properties": { + "detail": { + "type": "string" + }, + "reason": { + "type": "string" + }, + "status": { + "const": "unmeasured", + "type": "string" + } + }, + "required": [ + "status", + "reason", + "detail" + ], + "type": "object" + }, + { + "properties": { + "code": { + "type": "string" + }, + "detail": { + "type": "string" + }, + "retryable": { + "type": "boolean" + }, + "status": { + "const": "failed", + "type": "string" + } + }, + "required": [ + "status", + "code", + "detail", + "retryable" + ], + "type": "object" + } + ] + }, + "StructureReadV12": { + "oneOf": [ + { + "properties": { + "measurement": { + "$ref": "#/$defs/StrataMeasurementV1" + }, + "status": { + "const": "measured", + "type": "string" + } + }, + "required": [ + "status", + "measurement" + ], + "type": "object" + }, + { + "properties": { + "detail": { + "type": "string" + }, + "reason": { + "type": "string" + }, + "status": { + "const": "unmeasured", + "type": "string" + } + }, + "required": [ + "status", + "reason", + "detail" + ], + "type": "object" + }, + { + "properties": { + "code": { + "type": "string" + }, + "detail": { + "type": "string" + }, + "retryable": { + "type": "boolean" + }, + "status": { + "const": "failed", + "type": "string" + } + }, + "required": [ + "status", + "code", + "detail", + "retryable" + ], + "type": "object" + } + ] + }, + "StructureReadV13": { + "oneOf": [ + { + "properties": { + "measurement": { + "$ref": "#/$defs/FactMatchesMeasurementV1" + }, + "status": { + "const": "measured", + "type": "string" + } + }, + "required": [ + "status", + "measurement" + ], + "type": "object" + }, + { + "properties": { + "detail": { + "type": "string" + }, + "reason": { + "type": "string" + }, + "status": { + "const": "unmeasured", + "type": "string" + } + }, + "required": [ + "status", + "reason", + "detail" + ], + "type": "object" + }, + { + "properties": { + "code": { + "type": "string" + }, + "detail": { + "type": "string" + }, + "retryable": { + "type": "boolean" + }, + "status": { + "const": "failed", + "type": "string" + } + }, + "required": [ + "status", + "code", + "detail", + "retryable" + ], + "type": "object" + } + ] + }, + "StructureReadV14": { + "oneOf": [ + { + "properties": { + "measurement": { + "$ref": "#/$defs/TestMapMeasurementV1" + }, + "status": { + "const": "measured", + "type": "string" + } + }, + "required": [ + "status", + "measurement" + ], + "type": "object" + }, + { + "properties": { + "detail": { + "type": "string" + }, + "reason": { + "type": "string" + }, + "status": { + "const": "unmeasured", + "type": "string" + } + }, + "required": [ + "status", + "reason", + "detail" + ], + "type": "object" + }, + { + "properties": { + "code": { + "type": "string" + }, + "detail": { + "type": "string" + }, + "retryable": { + "type": "boolean" + }, + "status": { + "const": "failed", + "type": "string" + } + }, + "required": [ + "status", + "code", + "detail", + "retryable" + ], + "type": "object" + } + ] + }, + "StructureReadV15": { + "oneOf": [ + { + "properties": { + "measurement": { + "$ref": "#/$defs/NodeSessionsMeasurementV1" + }, + "status": { + "const": "measured", + "type": "string" + } + }, + "required": [ + "status", + "measurement" + ], + "type": "object" + }, + { + "properties": { + "detail": { + "type": "string" + }, + "reason": { + "type": "string" + }, + "status": { + "const": "unmeasured", + "type": "string" + } + }, + "required": [ + "status", + "reason", + "detail" + ], + "type": "object" + }, + { + "properties": { + "code": { + "type": "string" + }, + "detail": { + "type": "string" + }, + "retryable": { + "type": "boolean" + }, + "status": { + "const": "failed", + "type": "string" + } + }, + "required": [ + "status", + "code", + "detail", + "retryable" + ], + "type": "object" + } + ] + }, + "SyncSettingsPatch": { + "additionalProperties": false, + "description": "Nested synchronization settings patch.", + "properties": { + "auto_track_pr_branches": { + "type": [ + "boolean", + "null" + ] + }, + "auto_track_pr_poll_secs": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + } + }, + "type": "object" + }, + "SyncSettingsV1": { + "properties": { + "auto_track_pr_branches": { + "type": "boolean" + }, + "auto_track_pr_poll_secs": { + "format": "uint64", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "auto_track_pr_branches", + "auto_track_pr_poll_secs" + ], + "type": "object" + }, + "TableGrowthDimensionV1": { + "description": "Per-store typed table-growth state. Unavailable reads carry no byte values;\neach state includes source coverage and explicit omissions.", + "oneOf": [ + { + "properties": { + "coverage": { + "$ref": "#/$defs/DashboardCoverageV1" + }, + "omission_reasons": { + "items": { + "type": "string" + }, + "type": "array" + }, + "omissions": { + "items": { + "$ref": "#/$defs/TableGrowthOmissionV1" + }, + "type": "array" + }, + "significant_samples": { + "items": { + "$ref": "#/$defs/SignificantTableGrowthSampleV1" + }, + "type": "array" + }, + "state": { + "const": "observed", + "type": "string" + } + }, + "required": [ + "state", + "coverage", + "significant_samples", + "omissions", + "omission_reasons" + ], + "type": "object" + }, + { + "properties": { + "coverage": { + "$ref": "#/$defs/DashboardCoverageV1" + }, + "observed_at": { + "format": "int64", + "type": "integer" + }, + "omission_reasons": { + "items": { + "type": "string" + }, + "type": "array" + }, + "state": { + "const": "baseline_established", + "type": "string" + }, + "tables_observed": { + "format": "uint64", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "state", + "coverage", + "observed_at", + "tables_observed", + "omission_reasons" + ], + "type": "object" + }, + { + "properties": { + "coverage": { + "$ref": "#/$defs/DashboardCoverageV1" + }, + "omission_reasons": { + "items": { + "type": "string" + }, + "type": "array" + }, + "state": { + "const": "unsupported", + "type": "string" + } + }, + "required": [ + "state", + "coverage", + "omission_reasons" + ], + "type": "object" + }, + { + "properties": { + "coverage": { + "$ref": "#/$defs/DashboardCoverageV1" + }, + "omission_reasons": { + "items": { + "type": "string" + }, + "type": "array" + }, + "state": { + "const": "denied", + "type": "string" + } + }, + "required": [ + "state", + "coverage", + "omission_reasons" + ], + "type": "object" + }, + { + "properties": { + "coverage": { + "$ref": "#/$defs/DashboardCoverageV1" + }, + "omission_reasons": { + "items": { + "type": "string" + }, + "type": "array" + }, + "state": { + "const": "unknown", + "type": "string" + } + }, + "required": [ + "state", + "coverage", + "omission_reasons" + ], + "type": "object" + } + ] + }, + "TableGrowthOmissionV1": { + "description": "One current table omitted from the significant-sample list. Numeric evidence\nremains structured so clients can format units consistently.", + "oneOf": [ + { + "properties": { + "current_bytes": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "current_observed_at": { + "format": "int64", + "type": "integer" + }, + "growth_bytes": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "kind": { + "const": "below_threshold", + "type": "string" + }, + "previous_bytes": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "previous_observed_at": { + "format": "int64", + "type": "integer" + }, + "reason": { + "type": "string" + }, + "table": { + "type": "string" + } + }, + "required": [ + "kind", + "table", + "previous_bytes", + "current_bytes", + "growth_bytes", + "previous_observed_at", + "current_observed_at", + "reason" + ], + "type": "object" + }, + { + "properties": { + "current_bytes": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "kind": { + "const": "baseline_pending", + "type": "string" + }, + "observed_at": { + "format": "int64", + "type": "integer" + }, + "reason": { + "type": "string" + }, + "table": { + "type": "string" + } + }, + "required": [ + "kind", + "table", + "current_bytes", + "observed_at", + "reason" + ], + "type": "object" + } + ] + }, + "TableGrowthThresholdV1": { + "description": "Informational threshold applied to per-table payload growth samples.", + "properties": { + "absolute_bytes": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "relative_floor_bytes": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "relative_percent": { + "format": "uint64", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "absolute_bytes", + "relative_floor_bytes", + "relative_percent" + ], + "type": "object" + }, + "TaskEvidenceLinkV1": { + "additionalProperties": false, + "properties": { + "anchor_id": { + "$ref": "#/$defs/RetrievalAnchorId" + }, + "evidence_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "link_id": { + "type": "string" + }, + "observed_at": { + "$ref": "#/$defs/UtcMicros" + }, + "revision": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + } + }, + "required": [ + "link_id", + "revision", + "task_id", + "anchor_id", + "evidence_digest", + "observed_at" + ], + "type": "object" + }, + "TaskHandoffTokenStateV1": { + "description": "Where one enumerated token stands at the observed instant.", + "oneOf": [ + { + "const": "open", + "description": "Not yet redeemed, and not yet expired — the live frontier.", + "type": "string" + }, + { + "const": "consumed", + "description": "Redeemed. Single-use, so it can never be redeemed again.", + "type": "string" + }, + { + "const": "expired", + "description": "Its window closed with no redemption. A dropped handoff, which is\nexactly the fact a frontier exists to surface.", + "type": "string" + } + ] + }, + "TaskId": { + "description": "Strongly typed canonical identity: `TaskId`.", + "type": "string" + }, + "TelemetrySettingsPatch": { + "additionalProperties": false, + "description": "Nested telemetry settings patch.", + "properties": { + "timings": { + "type": [ + "boolean", + "null" + ] + } + }, + "type": "object" + }, + "TelemetrySettingsV1": { + "properties": { + "timings": { + "type": "boolean" + } + }, + "required": [ + "timings" + ], + "type": "object" + }, + "TemporalModeV1": { + "description": "Requested temporal interpretation.", + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "kind": { + "const": "current", + "type": "string" + } + }, + "required": [ + "kind" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "cutoff": { + "$ref": "#/$defs/UtcMicros" + }, + "kind": { + "const": "as_of", + "type": "string" + } + }, + "required": [ + "kind", + "cutoff" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "kind": { + "const": "evolution", + "type": "string" + } + }, + "required": [ + "kind" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "kind": { + "const": "forensic", + "type": "string" + } + }, + "required": [ + "kind" + ], + "type": "object" + } + ] + }, + "TestMapMeasurementV1": { + "properties": { + "algorithm": { + "type": "string" + }, + "applicable": { + "type": "boolean" + }, + "caller_depth": { + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "granularity": { + "type": "string" + }, + "node": { + "$ref": "#/$defs/NodeRefV1" + }, + "reason": { + "type": [ + "string", + "null" + ] + }, + "test_files": { + "items": { + "type": "string" + }, + "type": "array" + }, + "tests": { + "items": { + "$ref": "#/$defs/CoveringTestV1" + }, + "type": "array" + } + }, + "required": [ + "node", + "granularity", + "algorithm", + "caller_depth", + "applicable", + "reason", + "tests", + "test_files" + ], + "type": "object" + }, + "TokenActualV1": { + "properties": { + "cache_read_tokens": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "cache_write_tokens": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "input_tokens": { + "format": "int64", + "type": [ + "integer", + "null" + ] + }, + "output_tokens": { + "format": "int64", + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "input_tokens", + "output_tokens", + "cache_read_tokens", + "cache_write_tokens" + ], + "type": "object" + }, + "TokenPairV1": { + "properties": { + "input_tokens": { + "format": "int64", + "type": "integer" + }, + "output_tokens": { + "format": "int64", + "type": "integer" + } + }, + "required": [ + "input_tokens", + "output_tokens" + ], + "type": "object" + }, + "TopologyConcurrencyPolicyV1": { + "additionalProperties": false, + "properties": { + "maximum_active_per_repository": { + "format": "uint16", + "maximum": 65535, + "minimum": 1, + "type": "integer" + }, + "maximum_global_active": { + "format": "uint16", + "maximum": 65535, + "minimum": 1, + "type": "integer" + }, + "maximum_parallel_per_task": { + "format": "uint16", + "maximum": 65535, + "minimum": 1, + "type": "integer" + }, + "maximum_stack_depth": { + "format": "uint16", + "maximum": 65535, + "minimum": 1, + "type": "integer" + } + }, + "required": [ + "maximum_active_per_repository", + "maximum_parallel_per_task", + "maximum_global_active", + "maximum_stack_depth" + ], + "type": "object" + }, + "TopologyEscalationPolicyV1": { + "enum": [ + "reject", + "require_explicit_human_approval", + "require_human_approval_and_independent_review" + ], + "type": "string" + }, + "TopologyGatePolicyV1": { + "additionalProperties": false, + "properties": { + "cleanliness": { + "$ref": "#/$defs/WorktreeCleanlinessRequirementV1" + }, + "maximum_preflight_age_seconds": { + "format": "uint32", + "minimum": 1, + "type": "integer" + }, + "require_fresh_preflight": { + "type": "boolean" + }, + "review": { + "$ref": "#/$defs/ReviewRequirementV1" + }, + "tests": { + "items": { + "$ref": "#/$defs/RequiredCheckV1" + }, + "type": "array" + } + }, + "required": [ + "cleanliness", + "tests", + "review", + "require_fresh_preflight", + "maximum_preflight_age_seconds" + ], + "type": "object" + }, + "TopologyNotificationLevelV1": { + "enum": [ + "critical_only", + "lifecycle", + "verbose" + ], + "type": "string" + }, + "UseCaseId": { + "description": "Stable, canonical catalog identity for `UseCaseId`.", + "type": "string" + }, + "UserProfileId": { + "description": "Strongly typed canonical identity: `UserProfileId`.", + "type": "string" + }, + "UserSettingsPatch": { + "additionalProperties": false, + "description": "Profile-scoped settings patch accepted by `PATCH /api/settings/user`.", + "properties": { + "expected_revision_id": { + "type": "string" + }, + "extraction_timeout_secs": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "idempotency_key": { + "type": "string" + }, + "upload_enabled": { + "type": [ + "boolean", + "null" + ] + }, + "watcher_debounce": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "expected_revision_id", + "idempotency_key" + ], + "type": "object" + }, + "UserSettingsPayloadV1": { + "properties": { + "code_index_worker_configuration_revision_id": { + "type": "string" + }, + "code_index_worker_configuration_snapshot_id": { + "description": "Independent ProfileSessions revision for the code-index worker\nresource. It is intentionally not interchangeable with the ordinary\nuser settings revision above.", + "type": "string" + }, + "code_index_worker_status": { + "anyOf": [ + { + "$ref": "#/$defs/CodeIndexWorkerStatusV1" + }, + { + "type": "null" + } + ], + "description": "The admitted process-wide plan. A persisted selection may differ until\nthe daemon restarts, so unavailable is carried as `null` rather than\nfabricated from the saved preference." + }, + "code_index_workers": { + "$ref": "#/$defs/CodeIndexWorkerSelectionV1" + }, + "configuration_revision_id": { + "type": "string" + }, + "configuration_snapshot_id": { + "type": "string" + }, + "extraction_timeout_secs": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "installed_agents": { + "items": { + "type": "string" + }, + "type": "array" + }, + "legacy_config_path": { + "type": "string" + }, + "legacy_config_read_only": { + "type": "boolean" + }, + "upload_enabled": { + "type": "boolean" + }, + "watcher_debounce": { + "type": "string" + } + }, + "required": [ + "legacy_config_path", + "legacy_config_read_only", + "configuration_snapshot_id", + "configuration_revision_id", + "code_index_worker_configuration_snapshot_id", + "code_index_worker_configuration_revision_id", + "upload_enabled", + "code_index_workers", + "code_index_worker_status", + "watcher_debounce", + "extraction_timeout_secs", + "installed_agents" + ], + "type": "object" + }, + "UtcMicros": { + "description": "UTC timestamp represented as microseconds from the Unix epoch.", + "format": "int64", + "type": "integer" + }, + "VerifiedWorkEvidenceRootV1": { + "additionalProperties": false, + "properties": { + "item": { + "$ref": "#/$defs/WorkItemV1" + }, + "links": { + "items": { + "$ref": "#/$defs/TaskEvidenceLinkV1" + }, + "type": "array" + }, + "proposal_decisions": { + "items": { + "$ref": "#/$defs/WorkProposalDecisionV12" + }, + "type": "array" + }, + "relation_replan_decisions": { + "items": { + "$ref": "#/$defs/WorkRelationReplanDecisionV1" + }, + "type": "array" + }, + "relations": { + "items": { + "$ref": "#/$defs/WorkProductRelationV1" + }, + "type": "array" + }, + "verified_version": { + "$ref": "#/$defs/VerifiedWorkGraphVersionV1" + } + }, + "required": [ + "verified_version", + "item", + "relations", + "proposal_decisions", + "relation_replan_decisions", + "links" + ], + "type": "object" + }, + "VerifiedWorkGraphVersionV1": { + "additionalProperties": false, + "description": "One exact verified graph snapshot identity.", + "properties": { + "event_sequence": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "graph_version": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "recovered_graph_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "source_watermark": { + "additionalProperties": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "type": "object" + } + }, + "required": [ + "graph_version", + "event_sequence", + "source_watermark", + "recovered_graph_digest" + ], + "type": "object" + }, + "VerifiedWorkLeakEvidenceV1": { + "additionalProperties": false, + "description": "Exact result of one scan by the canonical lease/process/effect/placement/\ndelivery evidence owner. Evidence references are opaque local anchors;\ntheir owning records remain behind normal authorization.", + "properties": { + "attempt": { + "$ref": "#/$defs/WorkAttemptIdentityV1" + }, + "coverage": { + "$ref": "#/$defs/CoverageStateV1" + }, + "detection_horizon_micros": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "evidence_refs": { + "items": { + "type": "string" + }, + "type": "array" + }, + "kind": { + "$ref": "#/$defs/WorkExecutionLeakKindV1" + }, + "owner_class": { + "$ref": "#/$defs/LeakOwnerClassV1" + }, + "recovery": { + "$ref": "#/$defs/WorkExecutionLeakRecoveryV1" + }, + "scan_completed_at": { + "$ref": "#/$defs/UtcMicros" + }, + "scan_started_at": { + "$ref": "#/$defs/UtcMicros" + } + }, + "required": [ + "attempt", + "kind", + "recovery", + "owner_class", + "coverage", + "detection_horizon_micros", + "scan_started_at", + "scan_completed_at", + "evidence_refs" + ], + "type": "object" + }, + "VerifiedWorkRetryFailureV1": { + "additionalProperties": false, + "description": "Failure fact returned by a canonical evidence authority.", + "properties": { + "evidence_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "observed_at": { + "$ref": "#/$defs/UtcMicros" + }, + "selector": { + "$ref": "#/$defs/WorkRetryFailureSelectorV1" + } + }, + "required": [ + "selector", + "evidence_digest", + "observed_at" + ], + "type": "object" + }, + "VersionSettingsPayloadV1": { + "properties": { + "cached_latest_version": { + "type": [ + "string", + "null" + ] + }, + "channel": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "required": [ + "version", + "channel", + "cached_latest_version" + ], + "type": "object" + }, + "WorkAcceptanceCriterionV1": { + "additionalProperties": false, + "properties": { + "criterion_id": { + "type": "string" + }, + "description": { + "type": "string" + }, + "evidence_required": { + "type": "boolean" + } + }, + "required": [ + "criterion_id", + "description", + "evidence_required" + ], + "type": "object" + }, + "WorkAnchorHydrationV1": { + "additionalProperties": false, + "properties": { + "anchor_id": { + "$ref": "#/$defs/RetrievalAnchorId" + }, + "content": { + "items": { + "type": "string" + }, + "type": "array" + }, + "continuation": { + "type": [ + "string", + "null" + ] + }, + "coverage": { + "$ref": "#/$defs/WorkEvidenceCoverageStateV1" + }, + "exact_anchors": { + "items": { + "$ref": "#/$defs/RetrievalAnchorId" + }, + "type": "array" + }, + "freshness": { + "$ref": "#/$defs/WorkEvidenceFreshnessV1" + }, + "redacted": { + "type": "boolean" + } + }, + "required": [ + "anchor_id", + "exact_anchors", + "content", + "coverage", + "freshness", + "redacted", + "continuation" + ], + "type": "object" + }, + "WorkApprovalPolicy": { + "enum": [ + "never", + "on_request" + ], + "type": "string" + }, + "WorkArtifactHydrationRequestV1": { + "additionalProperties": false, + "description": "One authority-scoped artifact hydration request, paged like the attempt\nlist and pinned to the same verified topology generation.", + "properties": { + "cursor": { + "anyOf": [ + { + "$ref": "#/$defs/WorkAttemptListCursorV1" + }, + { + "type": "null" + } + ], + "default": null + }, + "page_size": { + "format": "uint32", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "page_size", + "cursor" + ], + "type": "object" + }, + "WorkArtifactHydrationV1": { + "description": "One authority-scoped artifact hydration read. Absence of any Work in\nscope is a typed state, distinct from an authorized-but-empty page.", + "oneOf": [ + { + "additionalProperties": false, + "description": "No Work exists in this authority scope, so there is no attempt set to\nhydrate. Concealed scopes never reach this state: they are refused as\nnot-found-or-not-authorized before any read.", + "properties": { + "state": { + "const": "absent", + "type": "string" + } + }, + "required": [ + "state" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "One page of attempt artifact sets under the verified topology\nsnapshot.", + "properties": { + "attempts": { + "items": { + "$ref": "#/$defs/WorkAttemptArtifactsV1" + }, + "type": "array" + }, + "coverage": { + "$ref": "#/$defs/WorkAttemptListCoverageV1" + }, + "state": { + "const": "hydrated", + "type": "string" + }, + "topology": { + "$ref": "#/$defs/WorkAttemptTopologyBindingV1" + } + }, + "required": [ + "state", + "topology", + "attempts", + "coverage" + ], + "type": "object" + } + ] + }, + "WorkArtifactId": { + "description": "Strongly typed canonical identity: `WorkArtifactId`.", + "type": "string" + }, + "WorkArtifactRefV1": { + "additionalProperties": false, + "properties": { + "artifact_id": { + "$ref": "#/$defs/WorkArtifactId" + }, + "byte_length": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "digest": { + "$ref": "#/$defs/ManifestDigest" + } + }, + "required": [ + "artifact_id", + "digest", + "byte_length" + ], + "type": "object" + }, + "WorkAttemptArtifactsV1": { + "additionalProperties": false, + "description": "The artifacts and evidence one attempt declared.", + "properties": { + "artifacts": { + "description": "Every artifact reference the attempt declared, in its canonical\nstored order. References carry digest and byte length; bytes are\nnever part of this read.", + "items": { + "$ref": "#/$defs/WorkArtifactRefV1" + }, + "type": "array" + }, + "evidence": { + "$ref": "#/$defs/WorkAttemptEvidenceStateV1" + }, + "identity": { + "$ref": "#/$defs/WorkAttemptIdentityV1" + } + }, + "required": [ + "identity", + "artifacts", + "evidence" + ], + "type": "object" + }, + "WorkAttemptEvidenceRecordV1": { + "additionalProperties": false, + "description": "Sealed terminal evidence for one provider attempt. The digest of this\nrecord is the evidence digest carried by [`WorkTerminalEvidenceV1`] and by\nthe `RuntimeEvidenceRef` attached to the Work projection, so the receipt\nin Work always names an inspectable record.", + "properties": { + "actual_route": { + "anyOf": [ + { + "$ref": "#/$defs/WorkProviderRouteV1" + }, + { + "type": "null" + } + ] + }, + "identity": { + "$ref": "#/$defs/WorkAttemptIdentityV1" + }, + "observed_at": { + "$ref": "#/$defs/UtcMicros" + }, + "outcome": { + "$ref": "#/$defs/WorkAttemptProviderOutcomeV1" + }, + "provider_fallback": { + "anyOf": [ + { + "$ref": "#/$defs/WorkProviderFallbackRecordV1" + }, + { + "type": "null" + } + ], + "description": "Present only when the pinned preferred backend was disqualified before\nstartup. `None` means the attempt ran on its first-choice backend." + }, + "provider_session": { + "anyOf": [ + { + "$ref": "#/$defs/ObservationSourceIdentityV1" + }, + { + "type": "null" + } + ], + "description": "Native provider-qualified session/thread identity, when the provider\nreported one. Admission cannot supply this value and no fallback is\nfabricated." + }, + "requested_route": { + "$ref": "#/$defs/WorkProviderRouteV1" + }, + "stderr": { + "anyOf": [ + { + "$ref": "#/$defs/WorkAttemptStreamSummaryV1" + }, + { + "type": "null" + } + ] + }, + "stdout": { + "anyOf": [ + { + "$ref": "#/$defs/WorkAttemptStreamSummaryV1" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "identity", + "requested_route", + "actual_route", + "outcome", + "stdout", + "stderr", + "provider_fallback", + "observed_at" + ], + "type": "object" + }, + "WorkAttemptEvidenceStateV1": { + "description": "Whether an attempt's terminal evidence has been sealed. An attempt that\nhas not reported an outcome yet is a typed state, not a missing record.", + "oneOf": [ + { + "additionalProperties": false, + "description": "The attempt has not sealed terminal evidence yet.", + "properties": { + "state": { + "const": "pending", + "type": "string" + } + }, + "required": [ + "state" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "The sealed terminal evidence record, exactly as it was written.", + "properties": { + "record": { + "$ref": "#/$defs/WorkAttemptEvidenceRecordV1" + }, + "state": { + "const": "sealed", + "type": "string" + } + }, + "required": [ + "state", + "record" + ], + "type": "object" + } + ] + }, + "WorkAttemptIdentityV1": { + "additionalProperties": false, + "properties": { + "attempt_id": { + "$ref": "#/$defs/AttemptId" + }, + "run_id": { + "$ref": "#/$defs/RunId" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + } + }, + "required": [ + "task_id", + "run_id", + "attempt_id" + ], + "type": "object" + }, + "WorkAttemptListCoverageV1": { + "description": "How much of the authorized attempt set one page covers.", + "oneOf": [ + { + "additionalProperties": false, + "description": "Every attempt after the page start was returned; zero returned is the\nexplicit empty authorized result, not a concealment.", + "properties": { + "coverage": { + "const": "complete", + "type": "string" + }, + "returned": { + "format": "uint32", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "coverage", + "returned" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "The page cap was reached; `resume` continues under the same verified\ntopology generation.", + "properties": { + "coverage": { + "const": "capped", + "type": "string" + }, + "remaining": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "resume": { + "$ref": "#/$defs/WorkAttemptListCursorV1" + }, + "returned": { + "format": "uint32", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "coverage", + "returned", + "remaining", + "resume" + ], + "type": "object" + } + ] + }, + "WorkAttemptListCursorV1": { + "additionalProperties": false, + "description": "Resume point for the next attempt-list page, bound to the exact verified\ntopology generation it was minted under.", + "properties": { + "generation": { + "description": "The verified topology generation the cursor was minted under.", + "type": "string" + }, + "start_after": { + "$ref": "#/$defs/WorkAttemptIdentityV1", + "description": "The last attempt identity the prior page returned." + } + }, + "required": [ + "generation", + "start_after" + ], + "type": "object" + }, + "WorkAttemptListRequestV1": { + "additionalProperties": false, + "properties": { + "cursor": { + "anyOf": [ + { + "$ref": "#/$defs/WorkAttemptListCursorV1" + }, + { + "type": "null" + } + ], + "default": null + }, + "page_size": { + "format": "uint32", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "page_size", + "cursor" + ], + "type": "object" + }, + "WorkAttemptListV1": { + "description": "One authority-scoped attempt-list read. Absence of any Work in scope is a\ntyped state, distinct from an authorized-but-empty page.", + "oneOf": [ + { + "additionalProperties": false, + "description": "No Work exists in this authority scope, so there is no attempt set to\npage. Concealed scopes never reach this state: they are refused as\nnot-found-or-not-authorized before any read.", + "properties": { + "state": { + "const": "absent", + "type": "string" + } + }, + "required": [ + "state" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "One page of durable attempts under the verified topology snapshot.", + "properties": { + "attempts": { + "items": { + "$ref": "#/$defs/WorkAttemptV1" + }, + "type": "array" + }, + "coverage": { + "$ref": "#/$defs/WorkAttemptListCoverageV1" + }, + "state": { + "const": "listed", + "type": "string" + }, + "topology": { + "$ref": "#/$defs/WorkAttemptTopologyBindingV1" + } + }, + "required": [ + "state", + "topology", + "attempts", + "coverage" + ], + "type": "object" + } + ] + }, + "WorkAttemptProgressV1": { + "additionalProperties": false, + "properties": { + "completed": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "total": { + "format": "uint64", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "completed", + "total" + ], + "type": "object" + }, + "WorkAttemptProjectionBindingV1": { + "additionalProperties": false, + "properties": { + "accepted_proposal": { + "$ref": "#/$defs/ProposalId", + "description": "Exact accepted proposal the attempt was admitted against. A superseded\nor cleared proposal is a different binding, not a compatible refresh." + }, + "event_sequence": { + "description": "Exact immutable product event that verified this graph version.", + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "graph_version": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "recovered_graph_digest": { + "$ref": "#/$defs/ManifestDigest", + "description": "Digest of the graph recovered and verified at admission." + }, + "source_watermark": { + "additionalProperties": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "description": "Source-frontier identity preserved from the verified product graph.", + "type": "object" + } + }, + "required": [ + "graph_version", + "event_sequence", + "source_watermark", + "recovered_graph_digest", + "accepted_proposal" + ], + "type": "object" + }, + "WorkAttemptProviderOutcomeV1": { + "description": "How one provider attempt ended, as observed by the daemon runtime.", + "oneOf": [ + { + "properties": { + "code": { + "format": "int32", + "type": "integer" + }, + "outcome": { + "const": "exited", + "type": "string" + } + }, + "required": [ + "outcome", + "code" + ], + "type": "object" + }, + { + "properties": { + "outcome": { + "const": "signalled", + "type": "string" + }, + "signal": { + "format": "int32", + "type": "integer" + } + }, + "required": [ + "outcome", + "signal" + ], + "type": "object" + }, + { + "properties": { + "outcome": { + "const": "timed_out", + "type": "string" + } + }, + "required": [ + "outcome" + ], + "type": "object" + }, + { + "properties": { + "outcome": { + "const": "cancelled", + "type": "string" + } + }, + "required": [ + "outcome" + ], + "type": "object" + }, + { + "properties": { + "outcome": { + "const": "provider_unavailable", + "type": "string" + }, + "state": { + "$ref": "#/$defs/WorkProviderAvailabilityV1" + } + }, + "required": [ + "outcome", + "state" + ], + "type": "object" + }, + { + "properties": { + "channel": { + "$ref": "#/$defs/WorkAttemptStreamChannelV1" + }, + "outcome": { + "const": "stream_overflow", + "type": "string" + } + }, + "required": [ + "outcome", + "channel" + ], + "type": "object" + }, + { + "properties": { + "outcome": { + "const": "launch_failed", + "type": "string" + } + }, + "required": [ + "outcome" + ], + "type": "object" + }, + { + "description": "The provider started but its typed protocol session did not reach a\nterminal answer: a malformed, out-of-order, oversized, or lost frame.\nPlan 32 requires such a stream to seal failed evidence rather than a\ntext-scraped success.", + "properties": { + "outcome": { + "const": "protocol_failed", + "type": "string" + } + }, + "required": [ + "outcome" + ], + "type": "object" + } + ] + }, + "WorkAttemptReceiptV1": { + "additionalProperties": false, + "properties": { + "artifacts": { + "items": { + "$ref": "#/$defs/WorkArtifactRefV1" + }, + "type": "array" + }, + "evidence": { + "anyOf": [ + { + "$ref": "#/$defs/WorkAttemptEvidenceRecordV1" + }, + { + "type": "null" + } + ] + }, + "identity": { + "$ref": "#/$defs/WorkAttemptIdentityV1" + } + }, + "required": [ + "identity", + "artifacts", + "evidence" + ], + "type": "object" + }, + "WorkAttemptRecoveryReportV1": { + "additionalProperties": false, + "description": "What resume-after-restart did to each open attempt.", + "properties": { + "cancelled": { + "description": "Attempts whose in-flight cancellation was completed during recovery.", + "items": { + "$ref": "#/$defs/WorkAttemptV1" + }, + "type": "array" + }, + "recovery_required": { + "description": "Attempts fenced onto a new epoch and now awaiting recovery execution.", + "items": { + "$ref": "#/$defs/WorkAttemptV1" + }, + "type": "array" + } + }, + "required": [ + "recovery_required", + "cancelled" + ], + "type": "object" + }, + "WorkAttemptStateV1": { + "enum": [ + "leased", + "running", + "cancellation_requested", + "cancellation_acknowledged", + "cancellation_escalated", + "recovery_required", + "succeeded", + "failed", + "timed_out", + "cancelled" + ], + "type": "string" + }, + "WorkAttemptStatusRequestV1": { + "additionalProperties": false, + "properties": { + "attempt_id": { + "$ref": "#/$defs/AttemptId" + }, + "run_id": { + "$ref": "#/$defs/RunId" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + } + }, + "required": [ + "task_id", + "run_id", + "attempt_id" + ], + "type": "object" + }, + "WorkAttemptStreamChannelV1": { + "enum": [ + "stdout", + "stderr" + ], + "type": "string" + }, + "WorkAttemptStreamSummaryV1": { + "additionalProperties": false, + "description": "Bounded summary of one captured provider stream.", + "properties": { + "byte_length": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "truncated": { + "type": "boolean" + } + }, + "required": [ + "byte_length", + "truncated", + "digest" + ], + "type": "object" + }, + "WorkAttemptTopologyBindingV1": { + "additionalProperties": false, + "description": "The verified Work topology snapshot one attempt-list page was read under.", + "properties": { + "generation": { + "description": "The verified graph generation the topology snapshot is published under.", + "type": "string" + }, + "task_count": { + "description": "The number of tasks in the verified topology.", + "format": "uint32", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "generation", + "task_count" + ], + "type": "object" + }, + "WorkAttemptV1": { + "properties": { + "actual_route": { + "anyOf": [ + { + "$ref": "#/$defs/WorkProviderRouteV1" + }, + { + "type": "null" + } + ] + }, + "artifacts": { + "items": { + "$ref": "#/$defs/WorkArtifactRefV1" + }, + "type": "array" + }, + "cancellation": { + "$ref": "#/$defs/WorkCancellationStateV1" + }, + "execution": { + "$ref": "#/$defs/WorkExecutionEnvelopeV1" + }, + "identity": { + "$ref": "#/$defs/WorkAttemptIdentityV1" + }, + "lease": { + "$ref": "#/$defs/WorkLeaseFenceV1" + }, + "progress": { + "anyOf": [ + { + "$ref": "#/$defs/WorkAttemptProgressV1" + }, + { + "type": "null" + } + ] + }, + "projection_binding": { + "$ref": "#/$defs/WorkAttemptProjectionBindingV1" + }, + "recovery": { + "$ref": "#/$defs/WorkRecoveryStateV1" + }, + "requested_route": { + "$ref": "#/$defs/WorkProviderRouteV1" + }, + "state": { + "$ref": "#/$defs/WorkAttemptStateV1" + }, + "terminal": { + "anyOf": [ + { + "$ref": "#/$defs/WorkTerminalEvidenceV1" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "identity", + "projection_binding", + "execution", + "lease", + "state", + "progress", + "artifacts", + "cancellation", + "recovery", + "requested_route", + "actual_route", + "terminal" + ], + "type": "object" + }, + "WorkAuthority": { + "additionalProperties": false, + "properties": { + "actor_id": { + "$ref": "#/$defs/ActorId" + }, + "policy_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "project_id": { + "$ref": "#/$defs/ProjectId" + }, + "repository_id": { + "$ref": "#/$defs/RepositoryId" + }, + "worktree_id": { + "$ref": "#/$defs/WorktreeId" + } + }, + "required": [ + "project_id", + "repository_id", + "worktree_id", + "actor_id", + "policy_digest" + ], + "type": "object" + }, + "WorkCalibratedSizingV1": { + "additionalProperties": false, + "description": "Calibrated sizing. Emitted ONLY when support >= floor. Every field is\nnamed separately (Plan 06); `support_floor` carries the governing floor\ninto the record.", + "properties": { + "band": { + "$ref": "#/$defs/WorkOrdinalBandV1", + "description": "The sizing band itself: the stronger of the route's declared effort and\nthe derived shape magnitude, widened when the cohort error is high." + }, + "cohort": { + "description": "Identity of the cohort the sizing was calibrated over: the top-ranked\nroute id. Sizing from one cohort is never reused for another.", + "type": "string" + }, + "drift_valid": { + "description": "False when the cohort contains incomparable or stale observations, so a\nconsumer can refuse a sizing that drifted rather than silently trust it.", + "type": "boolean" + }, + "error": { + "$ref": "#/$defs/WorkOrdinalBandV1", + "description": "Observed adverse-outcome band over the cohort. An ordinal band, never a\nrate and never a probability." + }, + "horizon": { + "$ref": "#/$defs/UtcMicros", + "description": "Latest comparable observation in the cohort. Nothing after\n`evaluated_at` contributes, so the horizon never runs ahead of the input." + }, + "support": { + "description": "Count of comparable in-cohort outcomes backing this sizing.", + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "support_floor": { + "description": "The floor that governed this emission, carried so replay shows which\nfloor applied rather than assuming the current constant.", + "format": "uint32", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "cohort", + "horizon", + "support", + "support_floor", + "error", + "drift_valid", + "band" + ], + "type": "object" + }, + "WorkCalibrationEvidenceV1": { + "additionalProperties": false, + "description": "Raw calibration values and their exact decision provenance.\n\nNo rate, probability, or composite score is derived here. Consumers see\nthe authority-supplied outcome rows, categorical uncertainty, and exact\ndenominator counts that produced the proposal's existing calibrated sizing.", + "properties": { + "cohort_route": { + "type": [ + "string", + "null" + ] + }, + "comparable_outcomes": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "eligible_route_count": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "incomparable_outcomes": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "provenance": { + "$ref": "#/$defs/WorkCalibrationProvenanceV1" + }, + "raw_outcomes": { + "items": { + "$ref": "#/$defs/WorkPriorOutcomeV1" + }, + "type": "array" + }, + "routes_with_outcomes": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "uncertainty": { + "$ref": "#/$defs/WorkCalibrationUncertaintyV1" + } + }, + "required": [ + "cohort_route", + "raw_outcomes", + "eligible_route_count", + "routes_with_outcomes", + "comparable_outcomes", + "incomparable_outcomes", + "uncertainty", + "provenance" + ], + "type": "object" + }, + "WorkCalibrationProvenanceV1": { + "additionalProperties": false, + "properties": { + "configuration_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "configuration_revision": { + "anyOf": [ + { + "$ref": "#/$defs/ConfigurationRevisionId" + }, + { + "type": "null" + } + ] + }, + "evaluated_at": { + "$ref": "#/$defs/UtcMicros" + }, + "evaluator_id": { + "type": "string" + }, + "evaluator_revision": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "input_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "local_evidence": { + "anyOf": [ + { + "$ref": "#/$defs/WorkEvidenceFrontierV1" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "evaluator_id", + "evaluator_revision", + "input_digest", + "configuration_digest", + "configuration_revision", + "local_evidence", + "evaluated_at" + ], + "type": "object" + }, + "WorkCalibrationUncertaintyV1": { + "enum": [ + "supported", + "sparse", + "stale", + "incomparable" + ], + "type": "string" + }, + "WorkCancellationAcknowledgementV1": { + "additionalProperties": false, + "properties": { + "acknowledged_at": { + "$ref": "#/$defs/UtcMicros" + }, + "request": { + "$ref": "#/$defs/WorkCancellationRequestV1" + } + }, + "required": [ + "request", + "acknowledged_at" + ], + "type": "object" + }, + "WorkCancellationEscalationV1": { + "additionalProperties": false, + "properties": { + "acknowledgement": { + "$ref": "#/$defs/WorkCancellationAcknowledgementV1" + }, + "escalated_at": { + "$ref": "#/$defs/UtcMicros" + } + }, + "required": [ + "acknowledgement", + "escalated_at" + ], + "type": "object" + }, + "WorkCancellationRequestId": { + "description": "Strongly typed canonical identity: `WorkCancellationRequestId`.", + "type": "string" + }, + "WorkCancellationRequestV1": { + "additionalProperties": false, + "properties": { + "request_id": { + "$ref": "#/$defs/WorkCancellationRequestId" + }, + "requested_at": { + "$ref": "#/$defs/UtcMicros" + } + }, + "required": [ + "request_id", + "requested_at" + ], + "type": "object" + }, + "WorkCancellationStateV1": { + "oneOf": [ + { + "properties": { + "state": { + "const": "none", + "type": "string" + } + }, + "required": [ + "state" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "requested", + "type": "string" + }, + "value": { + "$ref": "#/$defs/WorkCancellationRequestV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "acknowledged", + "type": "string" + }, + "value": { + "$ref": "#/$defs/WorkCancellationAcknowledgementV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + }, + { + "properties": { + "state": { + "const": "escalated", + "type": "string" + }, + "value": { + "$ref": "#/$defs/WorkCancellationEscalationV1" + } + }, + "required": [ + "state", + "value" + ], + "type": "object" + } + ] + }, + "WorkCausalProjectionV1": { + "additionalProperties": false, + "properties": { + "candidate_edges": { + "items": { + "$ref": "#/$defs/WorkDagEdgeV1" + }, + "type": "array" + }, + "graph_version": { + "format": "uint64", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "graph_version", + "candidate_edges" + ], + "type": "object" + }, + "WorkCommandId": { + "description": "Strongly typed canonical identity: `WorkCommandId`.", + "type": "string" + }, + "WorkCriticalPathProjectionV1": { + "additionalProperties": false, + "properties": { + "graph_version": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "task_ids": { + "items": { + "$ref": "#/$defs/TaskId" + }, + "type": "array" + }, + "total_effort": { + "format": "uint32", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "graph_version", + "task_ids", + "total_effort" + ], + "type": "object" + }, + "WorkDagEdgeV1": { + "additionalProperties": false, + "properties": { + "dependency": { + "$ref": "#/$defs/TaskId" + }, + "dependent": { + "$ref": "#/$defs/TaskId" + } + }, + "required": [ + "dependency", + "dependent" + ], + "type": "object" + }, + "WorkDagProjectionV1": { + "additionalProperties": false, + "properties": { + "gating_edges": { + "items": { + "$ref": "#/$defs/WorkDagEdgeV1" + }, + "type": "array" + }, + "graph_version": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "task_ids": { + "items": { + "$ref": "#/$defs/TaskId" + }, + "type": "array" + } + }, + "required": [ + "graph_version", + "task_ids", + "gating_edges" + ], + "type": "object" + }, + "WorkDecompositionProposalV1": { + "additionalProperties": false, + "description": "A one-level decomposition proposal. Never recursive: a deeper split is a\nseparate sequenced capability, not something this evaluator may invent.", + "properties": { + "candidates": { + "description": "The proposed sketches, ordinal ascending from 0.", + "items": { + "$ref": "#/$defs/WorkSubtaskSketchV1" + }, + "type": "array" + }, + "rationale": { + "description": "Why the proposal was emitted, in the same ordered reason vocabulary the\ndecision uses.", + "items": { + "$ref": "#/$defs/WorkProposalReasonV1" + }, + "type": "array" + } + }, + "required": [ + "candidates", + "rationale" + ], + "type": "object" + }, + "WorkDuplicateAdjudicationAppendOutcomeV1": { + "oneOf": [ + { + "properties": { + "outcome": { + "const": "appended", + "type": "string" + }, + "receipt": { + "$ref": "#/$defs/WorkDuplicateAdjudicationReceiptV1" + } + }, + "required": [ + "outcome", + "receipt" + ], + "type": "object" + }, + { + "properties": { + "outcome": { + "const": "replayed", + "type": "string" + }, + "receipt": { + "$ref": "#/$defs/WorkDuplicateAdjudicationReceiptV1" + } + }, + "required": [ + "outcome", + "receipt" + ], + "type": "object" + } + ] + }, + "WorkDuplicateAdjudicationCommandV1": { + "additionalProperties": false, + "properties": { + "command_id": { + "$ref": "#/$defs/WorkCommandId" + }, + "evidence": { + "$ref": "#/$defs/WorkDuplicateAdjudicationEvidenceV1" + }, + "expected_revision": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "first_attempt": { + "$ref": "#/$defs/WorkAttemptIdentityV1" + }, + "occurred_at": { + "$ref": "#/$defs/UtcMicros" + }, + "quantities": { + "$ref": "#/$defs/WorkDuplicateAdjudicationQuantitiesV1" + }, + "reason": { + "type": "string" + }, + "second_attempt": { + "$ref": "#/$defs/WorkAttemptIdentityV1" + }, + "verdict": { + "$ref": "#/$defs/DuplicateEffortKindV1" + } + }, + "required": [ + "expected_revision", + "first_attempt", + "second_attempt", + "evidence", + "verdict", + "quantities", + "reason", + "command_id", + "occurred_at" + ], + "type": "object" + }, + "WorkDuplicateAdjudicationEvidenceV1": { + "additionalProperties": false, + "properties": { + "topology_generation": { + "$ref": "#/$defs/WorkTopologyGenerationRefV1" + }, + "work_generation": { + "$ref": "#/$defs/ProjectionGenerationId" + } + }, + "required": [ + "work_generation", + "topology_generation" + ], + "type": "object" + }, + "WorkDuplicateAdjudicationQuantitiesV1": { + "additionalProperties": false, + "properties": { + "cost_micros": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "coverage": { + "$ref": "#/$defs/CoverageStateV1" + }, + "effect_count": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "effect_outcome": { + "$ref": "#/$defs/DuplicateEffectOutcomeV1" + }, + "evidence": { + "$ref": "#/$defs/QuantityEvidenceClassV1" + }, + "test_count": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "token_count": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "wall_micros": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "wall_micros", + "token_count", + "cost_micros", + "test_count", + "effect_count", + "evidence", + "effect_outcome", + "coverage" + ], + "type": "object" + }, + "WorkDuplicateAdjudicationReceiptV1": { + "additionalProperties": false, + "properties": { + "actor_id": { + "$ref": "#/$defs/ActorId" + }, + "adjudication_ref": { + "$ref": "#/$defs/ManifestDigest" + }, + "canonical_input_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "command": { + "$ref": "#/$defs/WorkDuplicateAdjudicationCommandV1" + }, + "revision": { + "format": "uint64", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "command", + "revision", + "actor_id", + "canonical_input_digest", + "adjudication_ref" + ], + "type": "object" + }, + "WorkEffectStateV1": { + "description": "Effect semantics admitted for one provider attempt.", + "enum": [ + "observational", + "intercepted", + "compound_non_repeatable" + ], + "type": "string" + }, + "WorkEgressPolicy": { + "enum": [ + "deny", + "allowlisted" + ], + "type": "string" + }, + "WorkEvidenceContinuationV1": { + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "cursor": { + "type": "string" + }, + "kind": { + "const": "anchor", + "type": "string" + }, + "link_id": { + "type": "string" + } + }, + "required": [ + "kind", + "link_id", + "cursor" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "continuation": { + "$ref": "#/$defs/WorkTaskSessionContinuationV1" + }, + "kind": { + "const": "task_session", + "type": "string" + } + }, + "required": [ + "kind", + "continuation" + ], + "type": "object" + } + ] + }, + "WorkEvidenceCoverageStateV1": { + "enum": [ + "complete", + "partial", + "unknown" + ], + "type": "string" + }, + "WorkEvidenceCoverageV1": { + "additionalProperties": false, + "properties": { + "hydrated": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "omitted": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "selected": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "state": { + "$ref": "#/$defs/WorkEvidenceCoverageStateV1" + } + }, + "required": [ + "state", + "selected", + "hydrated", + "omitted" + ], + "type": "object" + }, + "WorkEvidenceExpansionSelectorV1": { + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "kind": { + "const": "anchor", + "type": "string" + }, + "link_id": { + "type": "string" + } + }, + "required": [ + "kind", + "link_id" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "attempt": { + "$ref": "#/$defs/WorkAttemptIdentityV1" + }, + "kind": { + "const": "task_session", + "type": "string" + } + }, + "required": [ + "kind", + "attempt" + ], + "type": "object" + } + ] + }, + "WorkEvidenceFreshnessV1": { + "enum": [ + "current", + "stale", + "unknown" + ], + "type": "string" + }, + "WorkEvidenceFrontierV1": { + "additionalProperties": false, + "description": "One immutable evidence frontier. Local code/session evidence and live Git\nevidence each carry their own frontier; the evaluator never merges,\nsubstitutes, or advances one from the other.", + "properties": { + "digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "watermark": { + "$ref": "#/$defs/UtcMicros" + } + }, + "required": [ + "watermark", + "digest" + ], + "type": "object" + }, + "WorkEvidenceOmissionReasonV1": { + "oneOf": [ + { + "enum": [ + "limit_reached", + "pending", + "not_found_or_not_authorized", + "unavailable", + "reset_required", + "stale", + "cancelled", + "timed_out", + "redacted" + ], + "type": "string" + }, + { + "additionalProperties": false, + "properties": { + "structural_refusal": { + "$ref": "#/$defs/SessionRetrievalStructuralRefusalV1" + } + }, + "required": [ + "structural_refusal" + ], + "type": "object" + } + ] + }, + "WorkEvidenceOmissionV1": { + "additionalProperties": false, + "properties": { + "reason": { + "$ref": "#/$defs/WorkEvidenceOmissionReasonV1" + }, + "relation": { + "type": "string" + } + }, + "required": [ + "relation", + "reason" + ], + "type": "object" + }, + "WorkEvidenceRetrievalV1": { + "additionalProperties": false, + "properties": { + "continuations": { + "items": { + "$ref": "#/$defs/WorkEvidenceContinuationV1" + }, + "type": "array" + }, + "coverage": { + "$ref": "#/$defs/WorkEvidenceCoverageV1" + }, + "freshness": { + "$ref": "#/$defs/WorkEvidenceFreshnessV1" + }, + "item": { + "$ref": "#/$defs/WorkItemV1" + }, + "omissions": { + "items": { + "$ref": "#/$defs/WorkEvidenceOmissionV1" + }, + "type": "array" + }, + "proposal_decisions": { + "items": { + "$ref": "#/$defs/WorkProposalDecisionV12" + }, + "type": "array" + }, + "redacted": { + "type": "boolean" + }, + "relation_replan_decisions": { + "items": { + "$ref": "#/$defs/WorkRelationReplanDecisionV1" + }, + "type": "array" + }, + "relations": { + "items": { + "$ref": "#/$defs/WorkProductRelationV1" + }, + "type": "array" + }, + "sources": { + "items": { + "$ref": "#/$defs/WorkEvidenceSourceV1" + }, + "type": "array" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + }, + "verified_version": { + "$ref": "#/$defs/VerifiedWorkGraphVersionV1" + } + }, + "required": [ + "task_id", + "verified_version", + "item", + "relations", + "proposal_decisions", + "relation_replan_decisions", + "sources", + "coverage", + "omissions", + "freshness", + "redacted", + "continuations" + ], + "type": "object" + }, + "WorkEvidenceRetrieveRequestV1": { + "additionalProperties": false, + "description": "One TaskId-rooted read. The exact Work graph identity remains mandatory on\ncontinuation and expansion requests, so neither an anchor nor a cursor is\nauthority by possession.", + "properties": { + "continuation": { + "anyOf": [ + { + "$ref": "#/$defs/WorkEvidenceContinuationV1" + }, + { + "type": "null" + } + ], + "default": null + }, + "expansion": { + "anyOf": [ + { + "$ref": "#/$defs/WorkEvidenceExpansionSelectorV1" + }, + { + "type": "null" + } + ], + "default": null + }, + "observed_at": { + "$ref": "#/$defs/UtcMicros" + }, + "page_size": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "selection": { + "$ref": "#/$defs/WorkProductSelectionScopeV1" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + }, + "temporal": { + "$ref": "#/$defs/TemporalModeV1" + }, + "verified_version": { + "$ref": "#/$defs/VerifiedWorkGraphVersionV1" + } + }, + "required": [ + "selection", + "task_id", + "verified_version", + "temporal", + "page_size", + "expansion", + "continuation", + "observed_at" + ], + "type": "object" + }, + "WorkEvidenceSourceV1": { + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "kind": { + "const": "attempt_receipt", + "type": "string" + }, + "receipt": { + "$ref": "#/$defs/WorkAttemptReceiptV1" + } + }, + "required": [ + "kind", + "receipt" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "attempt": { + "$ref": "#/$defs/WorkAttemptIdentityV1" + }, + "evidence": { + "$ref": "#/$defs/WorkTaskSessionEvidenceV1" + }, + "kind": { + "const": "task_session", + "type": "string" + } + }, + "required": [ + "kind", + "attempt", + "evidence" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "hydration": { + "$ref": "#/$defs/WorkAnchorHydrationV1" + }, + "kind": { + "const": "anchor", + "type": "string" + }, + "link": { + "$ref": "#/$defs/TaskEvidenceLinkV1" + } + }, + "required": [ + "kind", + "link", + "hydration" + ], + "type": "object" + } + ] + }, + "WorkExecutableReference": { + "additionalProperties": false, + "properties": { + "artifact_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "executable_id": { + "type": "string" + } + }, + "required": [ + "executable_id", + "artifact_digest" + ], + "type": "object" + }, + "WorkExecutionEnvelopeV1": { + "additionalProperties": false, + "description": "Exact immutable provider admission attached to the durable Work attempt.\n\nCallers name typed route and scope facts, never argv, environment entries,\nor executable paths. The daemon resolves the registered executable only\nafter this envelope has been persisted and admitted to the canonical queue.", + "properties": { + "attempt_identity": { + "$ref": "#/$defs/WorkAttemptIdentityV1" + }, + "cancellation_generation": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "commit": { + "$ref": "#/$defs/CommitId" + }, + "effect_state": { + "$ref": "#/$defs/WorkEffectStateV1" + }, + "execution_snapshot": { + "$ref": "#/$defs/WorkExecutionSnapshot" + }, + "instructions": { + "description": "Exact provider instructions admitted with this attempt. The adapter\ndelivers these bytes verbatim on the provider's typed input channel;\nthey are never interpolated into argv or an ambient prompt source.", + "type": "string" + }, + "operation": { + "$ref": "#/$defs/WorkflowOperationRef" + }, + "project_id": { + "$ref": "#/$defs/ProjectId" + }, + "projection_binding": { + "$ref": "#/$defs/WorkAttemptProjectionBindingV1" + }, + "reference": { + "anyOf": [ + { + "$ref": "#/$defs/RefId" + }, + { + "type": "null" + } + ] + }, + "repository_id": { + "$ref": "#/$defs/RepositoryId" + }, + "worktree_id": { + "$ref": "#/$defs/WorktreeId" + }, + "worktree_root": { + "type": "string" + } + }, + "required": [ + "attempt_identity", + "projection_binding", + "operation", + "execution_snapshot", + "project_id", + "repository_id", + "worktree_id", + "worktree_root", + "reference", + "commit", + "instructions", + "cancellation_generation", + "effect_state" + ], + "type": "object" + }, + "WorkExecutionHistoryV1": { + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "state": { + "const": "absent", + "type": "string" + } + }, + "required": [ + "state" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "attempt_coverage": { + "$ref": "#/$defs/WorkAttemptListCoverageV1" + }, + "observed_order": { + "items": { + "$ref": "#/$defs/WorkObservedExecutionV1" + }, + "type": "array" + }, + "order_basis": { + "$ref": "#/$defs/WorkObservedExecutionOrderBasisV1" + }, + "spans": { + "items": { + "$ref": "#/$defs/WorkExecutionSpanV1" + }, + "type": "array" + }, + "state": { + "const": "listed", + "type": "string" + }, + "timing_coverage": { + "$ref": "#/$defs/WorkExecutionTimingCoverageV1" + } + }, + "required": [ + "state", + "spans", + "observed_order", + "order_basis", + "attempt_coverage", + "timing_coverage" + ], + "type": "object" + } + ] + }, + "WorkExecutionLeakKindV1": { + "enum": [ + "lease_after_terminal", + "attempt_without_live_owner", + "effect_unknown_past_deadline", + "missing_worktree_binding", + "unbounded_delivery", + "none", + "unknown" + ], + "type": "string" + }, + "WorkExecutionLeakRecoveryV1": { + "enum": [ + "not_required", + "pending", + "recovered", + "failed", + "unknown" + ], + "type": "string" + }, + "WorkExecutionLimits": { + "additionalProperties": false, + "properties": { + "max_concurrency": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "max_input_tokens": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "max_output_tokens": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "max_protocol_bytes": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "max_stderr_bytes": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "max_stdout_bytes": { + "format": "uint64", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "max_input_tokens", + "max_output_tokens", + "max_stdout_bytes", + "max_stderr_bytes", + "max_protocol_bytes", + "max_concurrency" + ], + "type": "object" + }, + "WorkExecutionSnapshot": { + "additionalProperties": false, + "description": "Immutable provider and topology authority pinned for exactly one Work\nexecution. Every constraint the execution is governed by is named here;\nnothing in this value is an opaque stand-in that a reader must resolve\nagainst a mutable store.", + "properties": { + "approval": { + "$ref": "#/$defs/WorkApprovalPolicy" + }, + "backend": { + "$ref": "#/$defs/WorkProviderBackendV1" + }, + "configuration_revision_id": { + "$ref": "#/$defs/ConfigurationRevisionId" + }, + "configuration_snapshot_id": { + "$ref": "#/$defs/ConfigurationSnapshotId" + }, + "credential_references": { + "items": { + "$ref": "#/$defs/CredentialReferenceId" + }, + "type": "array", + "uniqueItems": true + }, + "deadline": { + "$ref": "#/$defs/UtcMicros" + }, + "effective_behavior_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "egress": { + "$ref": "#/$defs/WorkEgressPolicy" + }, + "environment_allowlist": { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + "executable": { + "$ref": "#/$defs/WorkExecutableReference" + }, + "fallback": { + "$ref": "#/$defs/WorkFallbackTopology" + }, + "filesystem": { + "$ref": "#/$defs/WorkFilesystemPolicy" + }, + "limits": { + "$ref": "#/$defs/WorkExecutionLimits" + }, + "model": { + "type": "string" + }, + "protocol": { + "$ref": "#/$defs/WorkProviderProtocol" + }, + "resolution_provenance_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "route": { + "$ref": "#/$defs/WorkProviderRouteV1" + }, + "sandbox": { + "$ref": "#/$defs/WorkSandboxPolicy" + }, + "topology": { + "$ref": "#/$defs/WorkTopologyPolicyV1", + "description": "See [`WorkExecutionSnapshotInput::topology`]. Validated on construction,\nso an admitted snapshot can never pin a topology that weakens the\nprotected-ref floor or permits a native integration without its gates." + } + }, + "required": [ + "configuration_revision_id", + "configuration_snapshot_id", + "effective_behavior_digest", + "resolution_provenance_digest", + "route", + "backend", + "protocol", + "model", + "executable", + "sandbox", + "approval", + "filesystem", + "egress", + "environment_allowlist", + "credential_references", + "limits", + "deadline", + "fallback", + "topology" + ], + "type": "object" + }, + "WorkExecutionSpanV1": { + "additionalProperties": false, + "properties": { + "admitted_projection_sequence": { + "description": "Durable Work projection sequence under which execution was admitted.", + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "effect_state": { + "$ref": "#/$defs/WorkEffectStateV1" + }, + "ended_at": { + "anyOf": [ + { + "$ref": "#/$defs/UtcMicros" + }, + { + "type": "null" + } + ] + }, + "identity": { + "$ref": "#/$defs/WorkAttemptIdentityV1" + }, + "started_at": { + "$ref": "#/$defs/UtcMicros" + }, + "state": { + "$ref": "#/$defs/WorkAttemptStateV1" + }, + "terminal_evidence_digest": { + "anyOf": [ + { + "$ref": "#/$defs/ManifestDigest" + }, + { + "type": "null" + } + ] + }, + "wall_micros": { + "description": "Present only when both owner instants form a valid non-negative span.", + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "identity", + "admitted_projection_sequence", + "state", + "effect_state", + "started_at", + "ended_at", + "wall_micros", + "terminal_evidence_digest" + ], + "type": "object" + }, + "WorkExecutionTimingCoverageV1": { + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "coverage": { + "const": "complete", + "type": "string" + } + }, + "required": [ + "coverage" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "coverage": { + "const": "partial", + "type": "string" + }, + "invalid_terminal_span": { + "items": { + "$ref": "#/$defs/WorkAttemptIdentityV1" + }, + "type": "array" + }, + "missing_dispatch": { + "items": { + "$ref": "#/$defs/WorkAttemptIdentityV1" + }, + "type": "array" + } + }, + "required": [ + "coverage", + "missing_dispatch", + "invalid_terminal_span" + ], + "type": "object" + } + ] + }, + "WorkExperienceApplicabilityV1": { + "enum": [ + "same_accepted_route", + "same_milestone" + ], + "type": "string" + }, + "WorkExperienceCandidateV1": { + "additionalProperties": false, + "properties": { + "applicability": { + "description": "Separate declared applicability facts. This is intentionally not a\nscore and candidates remain in canonical TaskId order.", + "items": { + "$ref": "#/$defs/WorkExperienceApplicabilityV1" + }, + "type": "array", + "uniqueItems": true + }, + "evidence": { + "description": "Exact anchored evidence establishing that this is observed experience.", + "items": { + "$ref": "#/$defs/TaskEvidenceLinkV1" + }, + "type": "array" + }, + "item": { + "$ref": "#/$defs/WorkItemV1" + } + }, + "required": [ + "item", + "evidence", + "applicability" + ], + "type": "object" + }, + "WorkExperienceCoverageV1": { + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "coverage": { + "const": "unavailable", + "type": "string" + } + }, + "required": [ + "coverage" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "applicable": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "coverage": { + "const": "complete", + "type": "string" + }, + "returned": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "stale_excluded": { + "format": "uint32", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "coverage", + "returned", + "applicable", + "stale_excluded" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "applicable": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "coverage": { + "const": "partial", + "type": "string" + }, + "omitted_by_limit": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "returned": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "stale_excluded": { + "format": "uint32", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "coverage", + "returned", + "applicable", + "stale_excluded", + "omitted_by_limit" + ], + "type": "object" + } + ] + }, + "WorkExperienceRequestV1": { + "additionalProperties": false, + "properties": { + "evidence_not_before": { + "$ref": "#/$defs/UtcMicros", + "description": "Evidence before this owner-supplied horizon is excluded as stale." + }, + "expertise_categories": { + "description": "Categories for which the returned context will be used ephemerally.", + "items": { + "$ref": "#/$defs/WorkExpertiseCategoryV1" + }, + "type": "array", + "uniqueItems": true + }, + "limit": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "observed_at": { + "$ref": "#/$defs/UtcMicros" + }, + "selection": { + "$ref": "#/$defs/WorkProductSelectionScopeV1" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + }, + "verified_version": { + "$ref": "#/$defs/VerifiedWorkGraphVersionV1" + } + }, + "required": [ + "selection", + "task_id", + "verified_version", + "evidence_not_before", + "expertise_categories", + "limit", + "observed_at" + ], + "type": "object" + }, + "WorkExperienceV1": { + "additionalProperties": false, + "properties": { + "candidates": { + "items": { + "$ref": "#/$defs/WorkExperienceCandidateV1" + }, + "type": "array" + }, + "coverage": { + "$ref": "#/$defs/WorkExperienceCoverageV1" + }, + "evidence_not_before": { + "$ref": "#/$defs/UtcMicros" + }, + "expertise": { + "$ref": "#/$defs/WorkExpertiseAuthorizationV1" + }, + "observed_at": { + "$ref": "#/$defs/UtcMicros" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + }, + "verified_version": { + "$ref": "#/$defs/VerifiedWorkGraphVersionV1" + } + }, + "required": [ + "task_id", + "verified_version", + "evidence_not_before", + "observed_at", + "expertise", + "candidates", + "coverage" + ], + "type": "object" + }, + "WorkExpertiseAuthorizationV1": { + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "availability": { + "const": "available", + "type": "string" + }, + "categories": { + "items": { + "$ref": "#/$defs/WorkExpertiseCategoryV1" + }, + "type": "array", + "uniqueItems": true + }, + "durability": { + "$ref": "#/$defs/WorkExpertiseContextDurabilityV1" + }, + "expires_at": { + "$ref": "#/$defs/UtcMicros" + }, + "pin": { + "$ref": "#/$defs/WorkExpertiseConsentPinV1" + } + }, + "required": [ + "availability", + "categories", + "expires_at", + "pin", + "durability" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "availability": { + "const": "unavailable", + "type": "string" + }, + "legal_actions": { + "items": { + "$ref": "#/$defs/WorkExpertiseLegalActionV1" + }, + "type": "array", + "uniqueItems": true + }, + "pin": { + "$ref": "#/$defs/WorkExpertiseConsentPinV1" + }, + "reasons": { + "items": { + "$ref": "#/$defs/WorkExpertiseUnavailableReasonV1" + }, + "type": "array", + "uniqueItems": true + } + }, + "required": [ + "availability", + "reasons", + "legal_actions", + "pin" + ], + "type": "object" + } + ] + }, + "WorkExpertiseCategoryV1": { + "enum": [ + "language", + "framework", + "architecture", + "testing", + "operations", + "security", + "domain" + ], + "type": "string" + }, + "WorkExpertiseConsentPinV1": { + "additionalProperties": false, + "properties": { + "configuration_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "configuration_revision": { + "$ref": "#/$defs/ConfigurationRevisionId" + }, + "configuration_snapshot": { + "$ref": "#/$defs/ConfigurationSnapshotId" + }, + "provenance_digest": { + "$ref": "#/$defs/ManifestDigest" + } + }, + "required": [ + "configuration_revision", + "configuration_snapshot", + "configuration_digest", + "provenance_digest" + ], + "type": "object" + }, + "WorkExpertiseContextDurabilityV1": { + "oneOf": [ + { + "const": "ephemeral_only", + "description": "Context is returned for this read only and cannot establish evidence,\nrouting, proposal acceptance, execution admission, or completion.", + "type": "string" + } + ] + }, + "WorkExpertiseLegalActionV1": { + "enum": [ + "grant_user_consent", + "grant_project_consent", + "renew_user_consent", + "renew_project_consent", + "allow_requested_categories" + ], + "type": "string" + }, + "WorkExpertiseUnavailableReasonV1": { + "enum": [ + "user_consent_disabled", + "project_consent_disabled", + "user_consent_not_yet_effective", + "project_consent_not_yet_effective", + "user_consent_expired", + "project_consent_expired", + "requested_category_not_allowed" + ], + "type": "string" + }, + "WorkFallbackTopology": { + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "kind": { + "const": "disabled", + "type": "string" + } + }, + "required": [ + "kind" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "executable": { + "$ref": "#/$defs/WorkExecutableReference" + }, + "kind": { + "const": "codex_cli", + "type": "string" + }, + "route": { + "$ref": "#/$defs/WorkProviderRouteV1" + } + }, + "required": [ + "kind", + "route", + "executable" + ], + "type": "object" + } + ] + }, + "WorkFenceEpochV1": { + "format": "uint64", + "minimum": 0, + "title": "WorkFenceEpochV1", + "type": "integer" + }, + "WorkFilesystemPolicy": { + "enum": [ + "read_only", + "workspace_write" + ], + "type": "string" + }, + "WorkFrontierComparisonV1": { + "description": "Recorded relation between the two supplied frontiers. `Incomparable` means\nat least one side was absent; it is not collapsed into agreement.", + "enum": [ + "agree", + "disagree", + "incomparable" + ], + "type": "string" + }, + "WorkGraphChangeV1": { + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "item": { + "$ref": "#/$defs/WorkItemV1" + }, + "kind": { + "const": "task_added", + "type": "string" + } + }, + "required": [ + "kind", + "item" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "initiative": { + "$ref": "#/$defs/WorkInitiativeV1" + }, + "item": { + "$ref": "#/$defs/WorkItemV1" + }, + "kind": { + "const": "task_created", + "type": "string" + }, + "milestone": { + "$ref": "#/$defs/WorkMilestoneV1" + }, + "plan": { + "$ref": "#/$defs/WorkPlanV1" + } + }, + "required": [ + "kind", + "initiative", + "plan", + "milestone", + "item" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "decided_at": { + "$ref": "#/$defs/UtcMicros" + }, + "disposition": { + "$ref": "#/$defs/WorkProposalDispositionV12" + }, + "kind": { + "const": "relation_replan_decided", + "type": "string" + }, + "proposal": { + "$ref": "#/$defs/WorkRelationReplanProposalV1" + } + }, + "required": [ + "kind", + "proposal", + "disposition", + "decided_at" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "applied_at": { + "$ref": "#/$defs/UtcMicros" + }, + "kind": { + "const": "task_relations_replanned", + "type": "string" + }, + "proposal_id": { + "$ref": "#/$defs/ProposalId" + } + }, + "required": [ + "kind", + "proposal_id", + "applied_at" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "evidence": { + "$ref": "#/$defs/TaskEvidenceLinkV1" + }, + "kind": { + "const": "evidence_linked", + "type": "string" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + } + }, + "required": [ + "kind", + "task_id", + "evidence" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "decided_at": { + "$ref": "#/$defs/UtcMicros" + }, + "disposition": { + "$ref": "#/$defs/WorkProposalDispositionV12" + }, + "kind": { + "const": "proposal_decided", + "type": "string" + }, + "proposal": { + "$ref": "#/$defs/WorkProposalV1" + } + }, + "required": [ + "kind", + "proposal", + "disposition", + "decided_at" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "accepted_at": { + "$ref": "#/$defs/UtcMicros" + }, + "kind": { + "const": "proposal_accepted", + "type": "string" + }, + "proposal": { + "$ref": "#/$defs/WorkProposalV1" + } + }, + "required": [ + "kind", + "proposal", + "accepted_at" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "admitted_at": { + "$ref": "#/$defs/UtcMicros" + }, + "based_on_version": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "kind": { + "const": "execution_admitted", + "type": "string" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + } + }, + "required": [ + "kind", + "task_id", + "based_on_version", + "admitted_at" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "based_on_version": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "identity": { + "$ref": "#/$defs/WorkAttemptIdentityV1" + }, + "kind": { + "const": "accepted_attempt_linked", + "type": "string" + }, + "linked_at": { + "$ref": "#/$defs/UtcMicros" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + } + }, + "required": [ + "kind", + "task_id", + "based_on_version", + "identity", + "linked_at" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "accepted_at": { + "$ref": "#/$defs/UtcMicros" + }, + "evidence_by_criterion": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "kind": { + "const": "task_accepted", + "type": "string" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + } + }, + "required": [ + "kind", + "task_id", + "evidence_by_criterion", + "accepted_at" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "handoff": { + "$ref": "#/$defs/WorkHandoffV1" + }, + "kind": { + "const": "handoff_recorded", + "type": "string" + } + }, + "required": [ + "kind", + "handoff" + ], + "type": "object" + } + ] + }, + "WorkGraphReadModeV1": { + "oneOf": [ + { + "properties": { + "mode": { + "const": "current", + "type": "string" + } + }, + "required": [ + "mode" + ], + "type": "object" + }, + { + "properties": { + "mode": { + "const": "as_of", + "type": "string" + }, + "valid_at": { + "$ref": "#/$defs/UtcMicros" + } + }, + "required": [ + "mode", + "valid_at" + ], + "type": "object" + }, + { + "properties": { + "from_valid_at": { + "$ref": "#/$defs/UtcMicros" + }, + "mode": { + "const": "evolution", + "type": "string" + }, + "through_valid_at": { + "$ref": "#/$defs/UtcMicros" + } + }, + "required": [ + "mode", + "from_valid_at", + "through_valid_at" + ], + "type": "object" + }, + { + "properties": { + "from_observed_at": { + "$ref": "#/$defs/UtcMicros" + }, + "mode": { + "const": "forensic", + "type": "string" + }, + "through_observed_at": { + "$ref": "#/$defs/UtcMicros" + } + }, + "required": [ + "mode", + "from_observed_at", + "through_observed_at" + ], + "type": "object" + } + ] + }, + "WorkGraphReadRequestV1": { + "additionalProperties": false, + "properties": { + "continuation": { + "type": [ + "string", + "null" + ] + }, + "mode": { + "$ref": "#/$defs/WorkGraphReadModeV1" + }, + "observed_at": { + "$ref": "#/$defs/UtcMicros" + }, + "selection": { + "$ref": "#/$defs/WorkProductSelectionScopeV1" + } + }, + "required": [ + "selection", + "mode", + "continuation", + "observed_at" + ], + "type": "object" + }, + "WorkGraphReadV1": { + "oneOf": [ + { + "properties": { + "authorized_scope": { + "$ref": "#/$defs/AuthorizedWorkProductScopeV1" + }, + "mode": { + "const": "current", + "type": "string" + }, + "selection_coverage": { + "$ref": "#/$defs/WorkGraphSelectionCoverageV1" + }, + "snapshot": { + "$ref": "#/$defs/WorkGraphVersionEntryV1" + } + }, + "required": [ + "mode", + "authorized_scope", + "selection_coverage", + "snapshot" + ], + "type": "object" + }, + { + "properties": { + "authorized_scope": { + "$ref": "#/$defs/AuthorizedWorkProductScopeV1" + }, + "mode": { + "const": "as_of", + "type": "string" + }, + "selection_coverage": { + "$ref": "#/$defs/WorkGraphSelectionCoverageV1" + }, + "snapshot": { + "$ref": "#/$defs/WorkGraphVersionEntryV1" + } + }, + "required": [ + "mode", + "authorized_scope", + "selection_coverage", + "snapshot" + ], + "type": "object" + }, + { + "properties": { + "authorized_scope": { + "$ref": "#/$defs/AuthorizedWorkProductScopeV1" + }, + "mode": { + "const": "evolution", + "type": "string" + }, + "selection_coverage": { + "$ref": "#/$defs/WorkGraphSelectionCoverageV1" + }, + "timeline": { + "$ref": "#/$defs/WorkGraphTimelineV1" + } + }, + "required": [ + "mode", + "authorized_scope", + "selection_coverage", + "timeline" + ], + "type": "object" + }, + { + "properties": { + "authorized_scope": { + "$ref": "#/$defs/AuthorizedWorkProductScopeV1" + }, + "mode": { + "const": "forensic", + "type": "string" + }, + "selection_coverage": { + "$ref": "#/$defs/WorkGraphSelectionCoverageV1" + }, + "timeline": { + "$ref": "#/$defs/WorkGraphTimelineV1" + } + }, + "required": [ + "mode", + "authorized_scope", + "selection_coverage", + "timeline" + ], + "type": "object" + } + ] + }, + "WorkGraphSelectionCoverageV1": { + "description": "How much of the owner's journal the read's selection actually covers.\n\nA selection names a slice of the owner's work, not the whole journal: an\nevent records the relation scopes it was admitted under, and a selection\nthat does not name them puts that event *outside* the slice. The events\noutside a selection do not poison the ones inside it, but they must never be\nconcealed either — a caller who is shown the covered slice with no way to\nlearn that more exists is reading a silently incomplete graph.\n\nSo the read answers over the covered slice and says so, in the same\n`Complete`/`Partial` vocabulary [`WorkGraphTimelineCoverageV1`] and\n[`WorkHistoryCoverageV1`](crate::WorkHistoryCoverageV1) already use.\n\nThe covered slice is always a *prefix* of the journal, and that is a\nproperty of folding rather than a simplification. A graph version is folded\nfrom every event up to its own sequence, so the first event a selection does\nnot cover ends the readable slice: every later version, whatever scopes its\nown event named, would have to be folded across that event to exist at all.\n`excluded_events` therefore counts every event from the first uncovered one\nonward.", + "oneOf": [ + { + "description": "The selection covers the owner's whole journal. Nothing was withheld.", + "properties": { + "coverage": { + "const": "complete", + "type": "string" + }, + "covered_events": { + "format": "uint32", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "coverage", + "covered_events" + ], + "type": "object" + }, + { + "description": "The selection covers `covered_events` events and `excluded_events`\nevents lie outside it, starting at `first_excluded_sequence`. Every\nentry this read returned was folded from covered events alone.", + "properties": { + "coverage": { + "const": "partial", + "type": "string" + }, + "covered_events": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "excluded_events": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "first_excluded_sequence": { + "format": "uint64", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "coverage", + "covered_events", + "excluded_events", + "first_excluded_sequence" + ], + "type": "object" + } + ] + }, + "WorkGraphTimelineCoverageV1": { + "oneOf": [ + { + "properties": { + "coverage": { + "const": "complete", + "type": "string" + }, + "returned": { + "format": "uint32", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "coverage", + "returned" + ], + "type": "object" + }, + { + "properties": { + "continuation": { + "type": "string" + }, + "coverage": { + "const": "partial", + "type": "string" + }, + "returned": { + "format": "uint32", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "coverage", + "returned", + "continuation" + ], + "type": "object" + } + ] + }, + "WorkGraphTimelineV1": { + "additionalProperties": false, + "properties": { + "coverage": { + "$ref": "#/$defs/WorkGraphTimelineCoverageV1" + }, + "entries": { + "items": { + "$ref": "#/$defs/WorkGraphVersionEntryV1" + }, + "type": "array" + } + }, + "required": [ + "entries", + "coverage" + ], + "type": "object" + }, + "WorkGraphVersionEntryV1": { + "additionalProperties": false, + "description": "One immutable graph version and every Work projection derived from that\nsame version at the caller's explicit observation time.", + "properties": { + "graph": { + "$ref": "#/$defs/WorkProductGraphV1" + }, + "observed_at": { + "$ref": "#/$defs/UtcMicros" + }, + "projected_at": { + "$ref": "#/$defs/UtcMicros" + }, + "projections": { + "$ref": "#/$defs/WorkProductProjectionBundleV1" + }, + "runtime": { + "$ref": "#/$defs/WorkRuntimeProjectionV1" + }, + "valid_at": { + "$ref": "#/$defs/UtcMicros" + }, + "verified_version": { + "$ref": "#/$defs/VerifiedWorkGraphVersionV1" + } + }, + "required": [ + "valid_at", + "observed_at", + "projected_at", + "verified_version", + "graph", + "runtime", + "projections" + ], + "type": "object" + }, + "WorkHandoffV1": { + "additionalProperties": false, + "properties": { + "evidence_frontier": { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + "from_actor": { + "$ref": "#/$defs/ActorId" + }, + "handed_off_at": { + "$ref": "#/$defs/UtcMicros" + }, + "handoff_id": { + "type": "string" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + }, + "to_actor": { + "$ref": "#/$defs/ActorId" + }, + "unknowns": { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + } + }, + "required": [ + "handoff_id", + "task_id", + "from_actor", + "to_actor", + "evidence_frontier", + "unknowns", + "handed_off_at" + ], + "type": "object" + }, + "WorkHierarchyV1": { + "additionalProperties": false, + "properties": { + "initiative_id": { + "type": "string" + }, + "milestone_id": { + "type": "string" + }, + "plan_id": { + "type": "string" + } + }, + "required": [ + "initiative_id", + "plan_id", + "milestone_id" + ], + "type": "object" + }, + "WorkInitiativeV1": { + "additionalProperties": false, + "properties": { + "created_at": { + "$ref": "#/$defs/UtcMicros" + }, + "id": { + "type": "string" + }, + "title": { + "type": "string" + } + }, + "required": [ + "id", + "title", + "created_at" + ], + "type": "object" + }, + "WorkItemInputV1": { + "additionalProperties": false, + "properties": { + "acceptance_criteria": { + "items": { + "$ref": "#/$defs/WorkAcceptanceCriterionV1" + }, + "type": "array" + }, + "causal_candidates": { + "items": { + "$ref": "#/$defs/TaskId" + }, + "type": "array", + "uniqueItems": true + }, + "created_at": { + "$ref": "#/$defs/UtcMicros" + }, + "deadline": { + "anyOf": [ + { + "$ref": "#/$defs/UtcMicros" + }, + { + "type": "null" + } + ] + }, + "dependencies": { + "items": { + "$ref": "#/$defs/TaskId" + }, + "type": "array", + "uniqueItems": true + }, + "effort": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "hierarchy": { + "$ref": "#/$defs/WorkHierarchyV1" + }, + "informational_relations": { + "items": { + "$ref": "#/$defs/TaskId" + }, + "type": "array", + "uniqueItems": true + }, + "scheduled_at": { + "anyOf": [ + { + "$ref": "#/$defs/UtcMicros" + }, + { + "type": "null" + } + ] + }, + "task_id": { + "$ref": "#/$defs/TaskId" + }, + "title": { + "type": "string" + }, + "updated_at": { + "$ref": "#/$defs/UtcMicros" + } + }, + "required": [ + "task_id", + "hierarchy", + "title", + "dependencies", + "informational_relations", + "causal_candidates", + "acceptance_criteria", + "effort", + "scheduled_at", + "deadline", + "created_at", + "updated_at" + ], + "type": "object" + }, + "WorkItemV1": { + "additionalProperties": false, + "properties": { + "accepted_at": { + "anyOf": [ + { + "$ref": "#/$defs/UtcMicros" + }, + { + "type": "null" + } + ] + }, + "accepted_attempts": { + "items": { + "$ref": "#/$defs/WorkAttemptIdentityV1" + }, + "type": "array" + }, + "accepted_criteria": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "accepted_proposal": { + "anyOf": [ + { + "$ref": "#/$defs/ProposalId" + }, + { + "type": "null" + } + ] + }, + "accepted_route": { + "anyOf": [ + { + "$ref": "#/$defs/WorkRouteDecisionV1" + }, + { + "type": "null" + } + ] + }, + "archived_at": { + "anyOf": [ + { + "$ref": "#/$defs/UtcMicros" + }, + { + "type": "null" + } + ] + }, + "evidence_links": { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + "execution_admitted_at": { + "anyOf": [ + { + "$ref": "#/$defs/UtcMicros" + }, + { + "type": "null" + } + ] + }, + "handoffs": { + "items": { + "$ref": "#/$defs/WorkHandoffV1" + }, + "type": "array" + }, + "input": { + "$ref": "#/$defs/WorkItemInputV1" + } + }, + "required": [ + "input", + "accepted_proposal", + "accepted_route", + "execution_admitted_at", + "evidence_links", + "accepted_criteria", + "accepted_attempts", + "handoffs", + "accepted_at", + "archived_at" + ], + "type": "object" + }, + "WorkKanbanCardV1": { + "additionalProperties": false, + "properties": { + "effort": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "lane": { + "$ref": "#/$defs/WorkTimelineLaneV1" + }, + "legal_actions": { + "items": { + "$ref": "#/$defs/WorkLegalActionV1" + }, + "type": "array", + "uniqueItems": true + }, + "task_id": { + "$ref": "#/$defs/TaskId" + } + }, + "required": [ + "task_id", + "lane", + "effort", + "legal_actions" + ], + "type": "object" + }, + "WorkKanbanProjectionV1": { + "additionalProperties": false, + "properties": { + "cards": { + "items": { + "$ref": "#/$defs/WorkKanbanCardV1" + }, + "type": "array" + }, + "graph_version": { + "format": "uint64", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "graph_version", + "cards" + ], + "type": "object" + }, + "WorkLeakAdjudicationOutcomeV1": { + "oneOf": [ + { + "properties": { + "outcome": { + "const": "appended", + "type": "string" + }, + "receipt": { + "$ref": "#/$defs/WorkLeakAdjudicationReceiptV1" + } + }, + "required": [ + "outcome", + "receipt" + ], + "type": "object" + }, + { + "properties": { + "outcome": { + "const": "replayed", + "type": "string" + }, + "receipt": { + "$ref": "#/$defs/WorkLeakAdjudicationReceiptV1" + } + }, + "required": [ + "outcome", + "receipt" + ], + "type": "object" + } + ] + }, + "WorkLeakAdjudicationReceiptV1": { + "additionalProperties": false, + "properties": { + "canonical_input_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "command": { + "$ref": "#/$defs/AdjudicateWorkLeakCommandV1" + }, + "evidence": { + "$ref": "#/$defs/VerifiedWorkLeakEvidenceV1" + }, + "revision": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "scan_deadline": { + "$ref": "#/$defs/UtcMicros", + "description": "Daemon/request-owned deadline that bounded the source scan." + } + }, + "required": [ + "command", + "revision", + "evidence", + "scan_deadline", + "canonical_input_digest" + ], + "type": "object" + }, + "WorkLeaseFenceV1": { + "additionalProperties": false, + "properties": { + "epoch": { + "$ref": "#/$defs/WorkFenceEpochV1" + }, + "lease_id": { + "$ref": "#/$defs/WorkLeaseId" + } + }, + "required": [ + "lease_id", + "epoch" + ], + "type": "object" + }, + "WorkLeaseId": { + "description": "Strongly typed canonical identity: `WorkLeaseId`.", + "type": "string" + }, + "WorkLegalActionV1": { + "enum": [ + "view_evidence", + "generate_proposal", + "accept_proposal", + "link_accepted_attempt", + "accept_task", + "handoff", + "archive" + ], + "type": "string" + }, + "WorkMilestoneV1": { + "additionalProperties": false, + "properties": { + "created_at": { + "$ref": "#/$defs/UtcMicros" + }, + "id": { + "type": "string" + }, + "plan_id": { + "type": "string" + }, + "title": { + "type": "string" + } + }, + "required": [ + "id", + "plan_id", + "title", + "created_at" + ], + "type": "object" + }, + "WorkObservedExecutionOrderBasisV1": { + "enum": [ + "terminal_observed_at_then_admitted_projection_sequence_then_attempt_identity" + ], + "type": "string" + }, + "WorkObservedExecutionV1": { + "additionalProperties": false, + "properties": { + "admitted_projection_sequence": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "evidence_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "identity": { + "$ref": "#/$defs/WorkAttemptIdentityV1" + }, + "observed_at": { + "$ref": "#/$defs/UtcMicros" + }, + "ordinal": { + "description": "One-based order assigned after sorting the durable terminal instants.", + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "state": { + "$ref": "#/$defs/WorkAttemptStateV1" + } + }, + "required": [ + "ordinal", + "identity", + "admitted_projection_sequence", + "observed_at", + "state", + "evidence_digest" + ], + "type": "object" + }, + "WorkOrdinalBandV1": { + "description": "Ordinal band. Never a probability, never a scalar score.\n\nBands are ordered `Lowest` .. `Highest`. Comparison is the only operation\nconsumers perform over them, so no weighted sum can be reconstructed from\na recorded decision.", + "enum": [ + "lowest", + "low", + "moderate", + "high", + "highest" + ], + "type": "string" + }, + "WorkPlacementBlockerV1": { + "description": "Closed set of conditions that block admission or removal.", + "oneOf": [ + { + "const": "dirty_tracked_files", + "description": "Tracked files differ from the index or HEAD.", + "type": "string" + }, + { + "const": "untracked_data", + "description": "Untracked data is present in the target.", + "type": "string" + }, + { + "const": "unique_commits", + "description": "The target holds commits reachable from nowhere else.", + "type": "string" + }, + { + "const": "active_holder", + "description": "Another admitted placement holds this target.", + "type": "string" + }, + { + "const": "unresolved_effect", + "description": "An effect against this placement is unresolved.", + "type": "string" + }, + { + "const": "unacknowledged_receipt", + "description": "A receipt produced against this placement is unacknowledged.", + "type": "string" + }, + { + "const": "uncertain_pull_request", + "description": "A pull request produced from this placement is in an uncertain state.", + "type": "string" + }, + { + "const": "shared_ref", + "description": "A ref in this target is shared with another holder.", + "type": "string" + }, + { + "const": "missing_anchor", + "description": "A retrieval or evidence anchor this placement referenced is missing.", + "type": "string" + }, + { + "const": "stale_scope", + "description": "The authorized scope no longer matches the placement.", + "type": "string" + }, + { + "const": "authorization_lost", + "description": "Authorization for this placement was lost.", + "type": "string" + }, + { + "const": "target_unreadable", + "description": "The target could not be read, so its state is unknown.", + "type": "string" + }, + { + "const": "network_required", + "description": "The placement declared itself network-free but the action needs network.", + "type": "string" + } + ], + "title": "WorkPlacementBlockerV1" + }, + "WorkPlacementIdentityV1": { + "additionalProperties": false, + "description": "Which run a placement belongs to. Placement never redefines TaskId.", + "properties": { + "run_id": { + "$ref": "#/$defs/RunId" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + } + }, + "required": [ + "task_id", + "run_id" + ], + "title": "WorkPlacementIdentityV1", + "type": "object" + }, + "WorkPlacementKindV1": { + "description": "The supported placement choices, and only those.", + "oneOf": [ + { + "const": "no_managed_placement", + "description": "TraceDecay manages no checkout for this run. No-Git work is first class.", + "type": "string" + }, + { + "const": "clean_in_place", + "description": "The caller's own strictly clean checkout, explicitly acknowledged.", + "type": "string" + }, + { + "const": "linked_worktree", + "description": "A linked worktree of the same repository.", + "type": "string" + }, + { + "const": "isolated_clone", + "description": "An isolated local clone.", + "type": "string" + } + ], + "title": "WorkPlacementKindV1" + }, + "WorkPlacementObservationV1": { + "additionalProperties": false, + "description": "What was actually observed at the target, in counts rather than prose.\n\nCounts are measurements: a zero is \"we looked and found none\", and\n`readable: false` is the separate state for \"we could not look\". Collapsing\nthem would let an unreadable target read as a clean one.", + "properties": { + "active_holder": { + "description": "Whether another admitted placement already holds this target.", + "type": "boolean" + }, + "dirty_tracked_paths": { + "description": "Tracked paths that differ from the index or HEAD.", + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "network_required": { + "description": "Whether the declared network-free placement would require network.", + "type": "boolean" + }, + "observed_at": { + "$ref": "#/$defs/UtcMicros" + }, + "readable": { + "description": "Whether the target could be read at all.", + "type": "boolean" + }, + "unique_commits": { + "description": "Commits in the target reachable from nowhere else.\n\n`None` means reachability was not measured, and it blocks removal\nexactly as a positive count does: an unmeasured target is \"unknown\"\nand is retained rather than assumed worthless. Only removal consults\nthis; admission does not.", + "format": "uint32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "untracked_paths": { + "description": "Untracked paths present in the target.", + "format": "uint32", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "dirty_tracked_paths", + "untracked_paths", + "unique_commits", + "readable", + "active_holder", + "network_required", + "observed_at" + ], + "title": "WorkPlacementObservationV1", + "type": "object" + }, + "WorkPlacementPreflightRequestV1": { + "additionalProperties": false, + "properties": { + "occurred_at": { + "$ref": "#/$defs/UtcMicros" + }, + "run_id": { + "$ref": "#/$defs/RunId" + }, + "target": { + "$ref": "#/$defs/WorkPlacementTargetV1" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + } + }, + "required": [ + "task_id", + "run_id", + "target", + "occurred_at" + ], + "title": "WorkPlacementPreflightRequestV1", + "type": "object" + }, + "WorkPlacementPreflightV1": { + "additionalProperties": false, + "description": "One placement preflight reading: what was asked for, what was seen, and\nexactly what blocks it.", + "properties": { + "blockers": { + "items": { + "$ref": "#/$defs/WorkPlacementBlockerV1" + }, + "type": "array", + "uniqueItems": true + }, + "identity": { + "$ref": "#/$defs/WorkPlacementIdentityV1" + }, + "observation": { + "$ref": "#/$defs/WorkPlacementObservationV1" + }, + "target": { + "$ref": "#/$defs/WorkPlacementTargetV1" + } + }, + "required": [ + "identity", + "target", + "observation", + "blockers" + ], + "title": "WorkPlacementPreflightV1", + "type": "object" + }, + "WorkPlacementReadingV1": { + "description": "One placement reading. Absence is a state, not an empty placement.", + "oneOf": [ + { + "additionalProperties": false, + "description": "No placement was ever admitted for this run.", + "properties": { + "state": { + "const": "absent", + "type": "string" + } + }, + "required": [ + "state" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "The durable placement relation.", + "properties": { + "placement": { + "$ref": "#/$defs/WorkPlacementV1" + }, + "state": { + "const": "placed", + "type": "string" + } + }, + "required": [ + "state", + "placement" + ], + "type": "object" + } + ], + "title": "WorkPlacementReadingV1" + }, + "WorkPlacementStateV1": { + "description": "The durable state of one admitted placement.", + "oneOf": [ + { + "const": "admitted", + "description": "The placement holds its target.", + "type": "string" + }, + { + "const": "released", + "description": "The placement gave its target up cleanly. Nothing was deleted by this\ntransition; removal is a separate cleanup preflight.", + "type": "string" + }, + { + "const": "quarantined", + "description": "The placement was retained because removal is blocked.", + "type": "string" + } + ], + "title": "WorkPlacementStateV1" + }, + "WorkPlacementStatusRequestV1": { + "additionalProperties": false, + "properties": { + "run_id": { + "$ref": "#/$defs/RunId" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + } + }, + "required": [ + "task_id", + "run_id" + ], + "title": "WorkPlacementStatusRequestV1", + "type": "object" + }, + "WorkPlacementTargetV1": { + "additionalProperties": false, + "description": "The exact placement a caller asked for.", + "properties": { + "in_place_acknowledged": { + "description": "Set only for `CleanInPlace`: the caller states it accepts running in\nits own checkout. Acknowledgement is explicit, never inferred.", + "type": "boolean" + }, + "kind": { + "$ref": "#/$defs/WorkPlacementKindV1" + }, + "network_free": { + "description": "The placement declares it needs no network. Declared, not detected.", + "type": "boolean" + }, + "root": { + "description": "Absolute root, present exactly when the kind manages one.", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "kind", + "root", + "in_place_acknowledged", + "network_free" + ], + "title": "WorkPlacementTargetV1", + "type": "object" + }, + "WorkPlacementV1": { + "additionalProperties": false, + "description": "One run's durable placement relation.", + "properties": { + "authority_version": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "blockers": { + "items": { + "$ref": "#/$defs/WorkPlacementBlockerV1" + }, + "type": "array", + "uniqueItems": true + }, + "identity": { + "$ref": "#/$defs/WorkPlacementIdentityV1" + }, + "retention_eligible_at": { + "anyOf": [ + { + "$ref": "#/$defs/UtcMicros" + }, + { + "type": "null" + } + ], + "description": "When retention makes this placement *eligible* for a fresh cleanup\npreflight. Eligibility is not delete authority." + }, + "state": { + "$ref": "#/$defs/WorkPlacementStateV1" + }, + "target": { + "$ref": "#/$defs/WorkPlacementTargetV1" + }, + "transitioned_at": { + "$ref": "#/$defs/UtcMicros" + } + }, + "required": [ + "identity", + "target", + "state", + "authority_version", + "transitioned_at", + "blockers", + "retention_eligible_at" + ], + "title": "WorkPlacementV1", + "type": "object" + }, + "WorkPlanV1": { + "additionalProperties": false, + "properties": { + "created_at": { + "$ref": "#/$defs/UtcMicros" + }, + "id": { + "type": "string" + }, + "initiative_id": { + "type": "string" + }, + "title": { + "type": "string" + } + }, + "required": [ + "id", + "initiative_id", + "title", + "created_at" + ], + "type": "object" + }, + "WorkPriorOutcomeV1": { + "additionalProperties": false, + "description": "Cohort denominator. APPLICATION-supplied, never worker-supplied.\n\nA worker cannot widen its own calibration cohort, so a route cannot earn\ncalibrated sizing by reporting its own successes.", + "properties": { + "accepted": { + "description": "Whether the produced work was accepted.", + "type": "boolean" + }, + "escaped_defect": { + "description": "Whether a defect escaped review.", + "type": "boolean" + }, + "observed_at": { + "$ref": "#/$defs/UtcMicros", + "description": "When the outcome was observed. Outcomes later than `evaluated_at` are\nINCOMPARABLE and are excluded from support rather than trusted." + }, + "rework": { + "description": "Whether the accepted work required rework.", + "type": "boolean" + }, + "route_id": { + "description": "The route this outcome belongs to. May name a retired route; only\noutcomes matching the top-ranked route form the sizing cohort.", + "type": "string" + }, + "terminal": { + "$ref": "#/$defs/WorkPriorTerminalV1", + "description": "How the attempt terminated." + } + }, + "required": [ + "route_id", + "accepted", + "rework", + "escaped_defect", + "terminal", + "observed_at" + ], + "type": "object" + }, + "WorkPriorTerminalV1": { + "description": "How a prior attempt on a route ended. Recorded, never inferred.", + "enum": [ + "succeeded", + "failed", + "timed_out", + "cancelled" + ], + "type": "string" + }, + "WorkProductAuthorizedRelationScopeV1": { + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "kind": { + "const": "project", + "type": "string" + }, + "project_id": { + "$ref": "#/$defs/ProjectId" + } + }, + "required": [ + "kind", + "project_id" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "kind": { + "const": "repository", + "type": "string" + }, + "project_id": { + "$ref": "#/$defs/ProjectId" + }, + "repository_id": { + "$ref": "#/$defs/RepositoryId" + } + }, + "required": [ + "kind", + "project_id", + "repository_id" + ], + "type": "object" + } + ] + }, + "WorkProductChangeDraftV1": { + "description": "Operator-selected graph change before the owning Work authority binds the\ncurrent verified head and revision authorities.", + "oneOf": [ + { + "properties": { + "change": { + "const": "add_task", + "type": "string" + }, + "item": { + "$ref": "#/$defs/WorkItemV1" + } + }, + "required": [ + "change", + "item" + ], + "type": "object" + }, + { + "properties": { + "change": { + "const": "create_task", + "type": "string" + }, + "initiative": { + "$ref": "#/$defs/WorkInitiativeV1" + }, + "item": { + "$ref": "#/$defs/WorkItemV1" + }, + "milestone": { + "$ref": "#/$defs/WorkMilestoneV1" + }, + "plan": { + "$ref": "#/$defs/WorkPlanV1" + } + }, + "required": [ + "change", + "initiative", + "plan", + "milestone", + "item" + ], + "type": "object" + }, + { + "properties": { + "change": { + "const": "decide_proposal", + "type": "string" + }, + "disposition": { + "$ref": "#/$defs/WorkProposalDispositionV12" + }, + "proposal": { + "$ref": "#/$defs/WorkProposalV1" + } + }, + "required": [ + "change", + "proposal", + "disposition" + ], + "type": "object" + }, + { + "properties": { + "change": { + "const": "decide_relation_replan", + "type": "string" + }, + "disposition": { + "$ref": "#/$defs/WorkProposalDispositionV12" + }, + "proposal": { + "$ref": "#/$defs/WorkRelationReplanProposalV1" + } + }, + "required": [ + "change", + "proposal", + "disposition" + ], + "type": "object" + }, + { + "properties": { + "change": { + "const": "apply_relation_replan", + "type": "string" + }, + "proposal_id": { + "$ref": "#/$defs/ProposalId" + } + }, + "required": [ + "change", + "proposal_id" + ], + "type": "object" + }, + { + "properties": { + "change": { + "const": "accept_task", + "type": "string" + }, + "evidence_by_criterion": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + } + }, + "required": [ + "change", + "task_id", + "evidence_by_criterion" + ], + "type": "object" + }, + { + "properties": { + "change": { + "const": "admit_execution", + "type": "string" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + } + }, + "required": [ + "change", + "task_id" + ], + "type": "object" + }, + { + "properties": { + "change": { + "const": "link_accepted_attempt", + "type": "string" + }, + "identity": { + "$ref": "#/$defs/WorkAttemptIdentityV1" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + } + }, + "required": [ + "change", + "task_id", + "identity" + ], + "type": "object" + }, + { + "properties": { + "change": { + "const": "record_handoff", + "type": "string" + }, + "handoff": { + "$ref": "#/$defs/WorkHandoffV1" + } + }, + "required": [ + "change", + "handoff" + ], + "type": "object" + } + ] + }, + "WorkProductEventEvidenceV1": { + "additionalProperties": false, + "properties": { + "anchor_id": { + "$ref": "#/$defs/RetrievalAnchorId" + }, + "evidence_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "source_store_id": { + "$ref": "#/$defs/SourceStoreId" + } + }, + "required": [ + "source_store_id", + "anchor_id", + "evidence_digest" + ], + "type": "object" + }, + "WorkProductEventPayloadV1": { + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "graph": { + "$ref": "#/$defs/WorkProductGraphV1" + }, + "kind": { + "const": "created", + "type": "string" + } + }, + "required": [ + "kind", + "graph" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "change": { + "$ref": "#/$defs/WorkGraphChangeV1" + }, + "kind": { + "const": "changed", + "type": "string" + } + }, + "required": [ + "kind", + "change" + ], + "type": "object" + } + ] + }, + "WorkProductEventV1": { + "additionalProperties": false, + "properties": { + "actor_id": { + "$ref": "#/$defs/ActorId" + }, + "authorized_relation_scopes": { + "items": { + "$ref": "#/$defs/WorkProductAuthorizedRelationScopeV1" + }, + "type": "array" + }, + "canonical_input_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "catalog_generation_id": { + "$ref": "#/$defs/CatalogGenerationId" + }, + "causation_event_id": { + "type": [ + "string", + "null" + ] + }, + "command_id": { + "$ref": "#/$defs/WorkCommandId" + }, + "configuration_revision_id": { + "$ref": "#/$defs/ConfigurationRevisionId" + }, + "event_id": { + "type": "string" + }, + "evidence": { + "items": { + "$ref": "#/$defs/WorkProductEventEvidenceV1" + }, + "type": "array" + }, + "expected_graph_version": { + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "occurred_at": { + "$ref": "#/$defs/UtcMicros" + }, + "owner_scope": { + "$ref": "#/$defs/WorkProductProfileScopeV1" + }, + "payload": { + "$ref": "#/$defs/WorkProductEventPayloadV1" + }, + "policy_revision_id": { + "type": "string" + }, + "result_graph_version": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "sequence": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "source_watermark": { + "additionalProperties": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "type": "object" + } + }, + "required": [ + "event_id", + "sequence", + "actor_id", + "owner_scope", + "authorized_relation_scopes", + "expected_graph_version", + "result_graph_version", + "command_id", + "canonical_input_digest", + "causation_event_id", + "evidence", + "source_watermark", + "occurred_at", + "policy_revision_id", + "configuration_revision_id", + "catalog_generation_id", + "payload" + ], + "type": "object" + }, + "WorkProductExpectedAuthorityV1": { + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "authority": { + "const": "no_prior_graph", + "type": "string" + } + }, + "required": [ + "authority" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "authority": { + "const": "verified", + "type": "string" + }, + "verified_version": { + "$ref": "#/$defs/VerifiedWorkGraphVersionV1" + } + }, + "required": [ + "authority", + "verified_version" + ], + "type": "object" + } + ] + }, + "WorkProductGraphV1": { + "additionalProperties": false, + "properties": { + "evidence": { + "items": { + "$ref": "#/$defs/TaskEvidenceLinkV1" + }, + "type": "array" + }, + "initiatives": { + "items": { + "$ref": "#/$defs/WorkInitiativeV1" + }, + "type": "array" + }, + "items": { + "items": { + "$ref": "#/$defs/WorkItemV1" + }, + "type": "array" + }, + "milestones": { + "items": { + "$ref": "#/$defs/WorkMilestoneV1" + }, + "type": "array" + }, + "plans": { + "items": { + "$ref": "#/$defs/WorkPlanV1" + }, + "type": "array" + }, + "proposal_decisions": { + "items": { + "$ref": "#/$defs/WorkProposalDecisionV12" + }, + "type": "array" + }, + "relation_replan_decisions": { + "items": { + "$ref": "#/$defs/WorkRelationReplanDecisionV1" + }, + "type": "array" + }, + "version": { + "format": "uint64", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "version", + "initiatives", + "plans", + "milestones", + "items", + "proposal_decisions", + "relation_replan_decisions", + "evidence" + ], + "type": "object" + }, + "WorkProductMutationIdentityV1": { + "additionalProperties": false, + "properties": { + "causation_event_id": { + "type": [ + "string", + "null" + ] + }, + "command_id": { + "$ref": "#/$defs/WorkCommandId" + }, + "evidence": { + "items": { + "$ref": "#/$defs/WorkProductEventEvidenceV1" + }, + "type": "array" + }, + "expected_authority": { + "$ref": "#/$defs/WorkProductExpectedAuthorityV1" + }, + "occurred_at": { + "$ref": "#/$defs/UtcMicros" + }, + "revisions": { + "$ref": "#/$defs/WorkProductRevisionPinsV1" + } + }, + "required": [ + "expected_authority", + "command_id", + "causation_event_id", + "evidence", + "occurred_at", + "revisions" + ], + "type": "object" + }, + "WorkProductMutationReceiptV1": { + "additionalProperties": false, + "properties": { + "event": { + "$ref": "#/$defs/WorkProductEventV1" + }, + "replayed": { + "type": "boolean" + }, + "verified_graph_version": { + "$ref": "#/$defs/VerifiedWorkGraphVersionV1" + } + }, + "required": [ + "event", + "verified_graph_version", + "replayed" + ], + "type": "object" + }, + "WorkProductMutationRequestV1": { + "description": "Closed public mutation surface for the Work-product graph authority.", + "oneOf": [ + { + "properties": { + "mutation": { + "const": "create", + "type": "string" + }, + "request": { + "$ref": "#/$defs/CreateWorkProductRequestV1" + } + }, + "required": [ + "mutation", + "request" + ], + "type": "object" + }, + { + "properties": { + "mutation": { + "const": "add_task", + "type": "string" + }, + "request": { + "$ref": "#/$defs/AddWorkTaskRequestV1" + } + }, + "required": [ + "mutation", + "request" + ], + "type": "object" + }, + { + "properties": { + "mutation": { + "const": "create_task", + "type": "string" + }, + "request": { + "$ref": "#/$defs/CreateWorkTaskRequestV1" + } + }, + "required": [ + "mutation", + "request" + ], + "type": "object" + }, + { + "properties": { + "mutation": { + "const": "decide_proposal", + "type": "string" + }, + "request": { + "$ref": "#/$defs/DecideWorkProposalRequestV1" + } + }, + "required": [ + "mutation", + "request" + ], + "type": "object" + }, + { + "properties": { + "mutation": { + "const": "decide_relation_replan", + "type": "string" + }, + "request": { + "$ref": "#/$defs/DecideWorkRelationReplanRequestV1" + } + }, + "required": [ + "mutation", + "request" + ], + "type": "object" + }, + { + "properties": { + "mutation": { + "const": "apply_relation_replan", + "type": "string" + }, + "request": { + "$ref": "#/$defs/ApplyWorkRelationReplanRequestV1" + } + }, + "required": [ + "mutation", + "request" + ], + "type": "object" + }, + { + "properties": { + "mutation": { + "const": "accept_task", + "type": "string" + }, + "request": { + "$ref": "#/$defs/AcceptWorkTaskRequestV1" + } + }, + "required": [ + "mutation", + "request" + ], + "type": "object" + }, + { + "properties": { + "mutation": { + "const": "admit_execution", + "type": "string" + }, + "request": { + "$ref": "#/$defs/AdmitWorkExecutionRequestV1" + } + }, + "required": [ + "mutation", + "request" + ], + "type": "object" + }, + { + "properties": { + "mutation": { + "const": "link_accepted_attempt", + "type": "string" + }, + "request": { + "$ref": "#/$defs/LinkAcceptedWorkAttemptRequestV1" + } + }, + "required": [ + "mutation", + "request" + ], + "type": "object" + }, + { + "properties": { + "mutation": { + "const": "record_handoff", + "type": "string" + }, + "request": { + "$ref": "#/$defs/RecordWorkHandoffRequestV1" + } + }, + "required": [ + "mutation", + "request" + ], + "type": "object" + } + ], + "type": "object" + }, + "WorkProductProfileScopeV1": { + "additionalProperties": false, + "properties": { + "brain_id": { + "$ref": "#/$defs/BrainId" + }, + "profile_id": { + "$ref": "#/$defs/UserProfileId" + } + }, + "required": [ + "brain_id", + "profile_id" + ], + "type": "object" + }, + "WorkProductProjectionBundleV1": { + "additionalProperties": false, + "properties": { + "causal": { + "$ref": "#/$defs/WorkCausalProjectionV1" + }, + "critical_path": { + "$ref": "#/$defs/WorkCriticalPathProjectionV1" + }, + "dag": { + "$ref": "#/$defs/WorkDagProjectionV1" + }, + "graph_version": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "kanban": { + "$ref": "#/$defs/WorkKanbanProjectionV1" + }, + "runtime": { + "$ref": "#/$defs/WorkRuntimeProjectionV1" + }, + "timeline": { + "$ref": "#/$defs/WorkTimelineProjectionV1" + }, + "workload": { + "$ref": "#/$defs/WorkWorkloadProjectionV1" + } + }, + "required": [ + "graph_version", + "runtime", + "kanban", + "dag", + "timeline", + "causal", + "critical_path", + "workload" + ], + "type": "object" + }, + "WorkProductRelationV1": { + "oneOf": [ + { + "properties": { + "initiative_id": { + "type": "string" + }, + "kind": { + "const": "initiative_contains_plan", + "type": "string" + }, + "plan_id": { + "type": "string" + } + }, + "required": [ + "kind", + "initiative_id", + "plan_id" + ], + "type": "object" + }, + { + "properties": { + "kind": { + "const": "plan_contains_milestone", + "type": "string" + }, + "milestone_id": { + "type": "string" + }, + "plan_id": { + "type": "string" + } + }, + "required": [ + "kind", + "plan_id", + "milestone_id" + ], + "type": "object" + }, + { + "properties": { + "kind": { + "const": "milestone_contains_task", + "type": "string" + }, + "milestone_id": { + "type": "string" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + } + }, + "required": [ + "kind", + "milestone_id", + "task_id" + ], + "type": "object" + }, + { + "properties": { + "dependency": { + "$ref": "#/$defs/TaskId" + }, + "dependent": { + "$ref": "#/$defs/TaskId" + }, + "kind": { + "const": "gates", + "type": "string" + } + }, + "required": [ + "kind", + "dependency", + "dependent" + ], + "type": "object" + }, + { + "properties": { + "kind": { + "const": "informational", + "type": "string" + }, + "source": { + "$ref": "#/$defs/TaskId" + }, + "target": { + "$ref": "#/$defs/TaskId" + } + }, + "required": [ + "kind", + "source", + "target" + ], + "type": "object" + }, + { + "properties": { + "cause": { + "$ref": "#/$defs/TaskId" + }, + "effect": { + "$ref": "#/$defs/TaskId" + }, + "kind": { + "const": "causal_candidate", + "type": "string" + } + }, + "required": [ + "kind", + "cause", + "effect" + ], + "type": "object" + }, + { + "properties": { + "kind": { + "const": "evidence", + "type": "string" + }, + "link_id": { + "type": "string" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + } + }, + "required": [ + "kind", + "task_id", + "link_id" + ], + "type": "object" + }, + { + "properties": { + "identity": { + "$ref": "#/$defs/WorkAttemptIdentityV1" + }, + "kind": { + "const": "accepted_attempt", + "type": "string" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + } + }, + "required": [ + "kind", + "task_id", + "identity" + ], + "type": "object" + }, + { + "properties": { + "handoff_id": { + "type": "string" + }, + "kind": { + "const": "handoff", + "type": "string" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + } + }, + "required": [ + "kind", + "task_id", + "handoff_id" + ], + "type": "object" + }, + { + "properties": { + "kind": { + "const": "proposal_decision", + "type": "string" + }, + "proposal_id": { + "$ref": "#/$defs/ProposalId" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + } + }, + "required": [ + "kind", + "task_id", + "proposal_id" + ], + "type": "object" + } + ] + }, + "WorkProductRevisionPinsV1": { + "additionalProperties": false, + "properties": { + "catalog_generation_id": { + "$ref": "#/$defs/CatalogGenerationId" + }, + "configuration_revision_id": { + "$ref": "#/$defs/ConfigurationRevisionId" + }, + "policy_revision_id": { + "type": "string" + } + }, + "required": [ + "policy_revision_id", + "configuration_revision_id", + "catalog_generation_id" + ], + "type": "object" + }, + "WorkProductSelectionScopeV1": { + "description": "The exact owner-relative relation set selected for a canonical Work graph.\n\nThis identity lives in the domain because attempt admission must retain\nit byte-for-byte through provider settlement. Reconstructing it from a\nproject context would conflate explicit no-Git work with a scoped\nrepository relation.", + "oneOf": [ + { + "properties": { + "selection": { + "const": "profile_owned_no_git", + "type": "string" + } + }, + "required": [ + "selection" + ], + "type": "object" + }, + { + "properties": { + "relation_scopes": { + "items": { + "$ref": "#/$defs/WorkProductAuthorizedRelationScopeV1" + }, + "type": "array", + "uniqueItems": true + }, + "selection": { + "const": "relations", + "type": "string" + } + }, + "required": [ + "selection", + "relation_scopes" + ], + "type": "object" + } + ] + }, + "WorkProjectionSequenceV1": { + "format": "uint64", + "minimum": 0, + "title": "WorkProjectionSequenceV1", + "type": "integer" + }, + "WorkProposalActionV1": { + "description": "The explicit command the decision recommends next. A recommendation never\nexecutes; each action names a separate version-checked application command.", + "enum": [ + "proceed_to_acceptance", + "hold_for_dependencies", + "admit_execution", + "replan" + ], + "type": "string" + }, + "WorkProposalComparisonEffectV1": { + "oneOf": [ + { + "const": "advisory_only", + "description": "Comparison is evidence only. There is no apply edge from this result.", + "type": "string" + } + ] + }, + "WorkProposalComparisonRequestV1": { + "additionalProperties": false, + "properties": { + "new_version": { + "$ref": "#/$defs/VerifiedWorkGraphVersionV1" + }, + "observed_at": { + "$ref": "#/$defs/UtcMicros" + }, + "old_version": { + "$ref": "#/$defs/VerifiedWorkGraphVersionV1" + }, + "selection": { + "$ref": "#/$defs/WorkProductSelectionScopeV1" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + } + }, + "required": [ + "selection", + "task_id", + "old_version", + "new_version", + "observed_at" + ], + "type": "object" + }, + "WorkProposalComparisonV1": { + "additionalProperties": false, + "properties": { + "added_evidence": { + "items": { + "$ref": "#/$defs/TaskEvidenceLinkV1" + }, + "type": "array" + }, + "added_relations": { + "items": { + "$ref": "#/$defs/WorkProductRelationV1" + }, + "type": "array" + }, + "effect": { + "$ref": "#/$defs/WorkProposalComparisonEffectV1" + }, + "item_changed": { + "type": "boolean" + }, + "new": { + "$ref": "#/$defs/VerifiedWorkEvidenceRootV1" + }, + "old": { + "$ref": "#/$defs/VerifiedWorkEvidenceRootV1" + }, + "removed_evidence": { + "items": { + "$ref": "#/$defs/TaskEvidenceLinkV1" + }, + "type": "array" + }, + "removed_relations": { + "items": { + "$ref": "#/$defs/WorkProductRelationV1" + }, + "type": "array" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + } + }, + "required": [ + "task_id", + "old", + "new", + "added_relations", + "removed_relations", + "added_evidence", + "removed_evidence", + "item_changed", + "effect" + ], + "type": "object" + }, + "WorkProposalDecisionV1": { + "additionalProperties": false, + "description": "One explained, replayable work-loop decision.", + "properties": { + "based_on_version": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "configuration_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "configuration_revision": { + "anyOf": [ + { + "$ref": "#/$defs/ConfigurationRevisionId" + }, + { + "type": "null" + } + ] + }, + "decomposition": { + "anyOf": [ + { + "$ref": "#/$defs/WorkDecompositionProposalV1" + }, + { + "type": "null" + } + ], + "description": "One-level decomposition sketch, present only when more than one\ndependency is unresolved." + }, + "deterministic_fallback": { + "description": "True when the recommendation is the declared deterministic baseline\nselected because the evidence cannot support a stronger claim.", + "type": "boolean" + }, + "disposition": { + "$ref": "#/$defs/WorkProposalDispositionV1" + }, + "evaluator_id": { + "$ref": "#/$defs/PolicyIdentifierV1" + }, + "evaluator_revision": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "frontier_comparison": { + "$ref": "#/$defs/WorkFrontierComparisonV1" + }, + "input_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "live_git_evidence": { + "anyOf": [ + { + "$ref": "#/$defs/WorkEvidenceFrontierV1" + }, + { + "type": "null" + } + ], + "description": "The live Git frontier, returned exactly as supplied." + }, + "local_evidence": { + "anyOf": [ + { + "$ref": "#/$defs/WorkEvidenceFrontierV1" + }, + { + "type": "null" + } + ], + "description": "The local code/session frontier, returned exactly as supplied." + }, + "ordered_reason_codes": { + "items": { + "$ref": "#/$defs/WorkProposalReasonV1" + }, + "type": "array" + }, + "policy_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "policy_revision": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "recommended_action": { + "anyOf": [ + { + "$ref": "#/$defs/WorkProposalActionV1" + }, + { + "type": "null" + } + ] + }, + "route_plan": { + "anyOf": [ + { + "$ref": "#/$defs/WorkRoutePlanV1" + }, + { + "type": "null" + } + ], + "description": "The explained route plan. Present on every evaluation that reached the\ngates, including the one that found no eligible route." + }, + "shape": { + "anyOf": [ + { + "$ref": "#/$defs/WorkTaskShapeV1" + }, + { + "type": "null" + } + ], + "description": "Derived task shape. Absent on the invalid, cancelled, and deadline\nshort-circuits, where no planner claim is licensed." + }, + "sizing": { + "anyOf": [ + { + "$ref": "#/$defs/WorkCalibratedSizingV1" + }, + { + "type": "null" + } + ], + "description": "Calibrated sizing, present only when in-cohort support reached the\ngoverning floor. Absence is a recorded fact, never a fabricated estimate." + }, + "task_id": { + "$ref": "#/$defs/TaskId" + } + }, + "required": [ + "evaluator_id", + "evaluator_revision", + "input_digest", + "task_id", + "based_on_version", + "policy_revision", + "policy_digest", + "configuration_digest", + "configuration_revision", + "disposition", + "recommended_action", + "deterministic_fallback", + "ordered_reason_codes", + "local_evidence", + "live_git_evidence", + "frontier_comparison" + ], + "type": "object" + }, + "WorkProposalDecisionV12": { + "additionalProperties": false, + "properties": { + "decided_at": { + "$ref": "#/$defs/UtcMicros" + }, + "disposition": { + "$ref": "#/$defs/WorkProposalDispositionV12" + }, + "proposal": { + "$ref": "#/$defs/WorkProposalV1" + } + }, + "required": [ + "proposal", + "disposition", + "decided_at" + ], + "type": "object" + }, + "WorkProposalDispositionV1": { + "description": "Exactly one disposition per decision.", + "enum": [ + "allow", + "deny", + "abstain", + "indeterminate" + ], + "type": "string" + }, + "WorkProposalDispositionV12": { + "enum": [ + "accepted", + "rejected", + "superseded" + ], + "type": "string" + }, + "WorkProposalReasonV1": { + "enum": [ + "invalid_request", + "request_cancelled", + "deadline_exceeded", + "frontier_agreement", + "frontier_disagreement", + "frontier_incomparable", + "task_accepted", + "runtime_coverage_partial", + "runtime_coverage_unavailable", + "terminal_evidence_observed", + "execution_in_flight", + "proposal_accepted", + "dependencies_unresolved", + "ready", + "insufficient_calibration_support", + "route_budget_exceeded", + "route_content_location_refused", + "route_evidence_sparse", + "route_evidence_stale", + "human_override_applied", + "no_eligible_routes", + "deterministic_baseline_selected" + ], + "type": "string" + }, + "WorkProposalV1": { + "additionalProperties": false, + "properties": { + "based_on_version": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "children": { + "items": { + "$ref": "#/$defs/WorkProposedChildV1" + }, + "type": "array" + }, + "evidence_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "explanation": { + "type": "string" + }, + "proposal_id": { + "$ref": "#/$defs/ProposalId" + }, + "route": { + "$ref": "#/$defs/WorkRouteDecisionV1" + }, + "shape": { + "$ref": "#/$defs/WorkShapeAssessmentV1" + }, + "sizing": { + "$ref": "#/$defs/WorkSizingV1" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + } + }, + "required": [ + "proposal_id", + "task_id", + "based_on_version", + "shape", + "sizing", + "children", + "route", + "explanation", + "evidence_digest" + ], + "type": "object" + }, + "WorkProposedChildV1": { + "additionalProperties": false, + "properties": { + "dependencies": { + "items": { + "$ref": "#/$defs/TaskId" + }, + "type": "array", + "uniqueItems": true + }, + "effort": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + }, + "title": { + "type": "string" + } + }, + "required": [ + "task_id", + "title", + "effort", + "dependencies" + ], + "type": "object" + }, + "WorkProviderAvailabilityV1": { + "description": "Typed provider availability observed at negotiation. These are product\nstates, not transport errors: each one names why the configured native\nprovider could not run, without inventing a fallback.", + "oneOf": [ + { + "const": "absent", + "description": "No executable binding is configured for the pinned executable identity.", + "type": "string" + }, + { + "const": "stale", + "description": "The configured binding no longer matches the pinned reference.", + "type": "string" + }, + { + "const": "unsupported", + "description": "The configured binding does not admit the pinned backend/protocol.", + "type": "string" + }, + { + "const": "digest_mismatch", + "description": "The on-disk executable bytes do not match the pinned digest.", + "type": "string" + }, + { + "const": "unavailable", + "description": "The configured executable could not be read or is not executable.", + "type": "string" + } + ] + }, + "WorkProviderBackendV1": { + "description": "Provider protocol selected by the pinned Work configuration snapshot.", + "enum": [ + "claude_code_cli", + "codex_app_server", + "codex_cli" + ], + "type": "string" + }, + "WorkProviderFallbackRecordV1": { + "additionalProperties": false, + "description": "Why an admitted attempt did not run on the backend its pinned execution\nsnapshot preferred.\n\nPlan 32 (`docs/plans/tracedecay-v2/32-dynamic-workflow-runtime-and-sdk.md`,\n\"Native provider execution\") admits the Codex CLI \"only when app-server is\nunsupported or absent before session start and the pinned Plan 20 snapshot\nexplicitly allows that fallback\", and the plan index requires that fallback\nto be \"reported rather than hidden\". This record is that report: it names\nthe preferred backend, the typed state that disqualified it, and the\nconfiguration-bounded fallback that was selected, so a fallback run can\nnever be read as a first choice.\n\nIt is also written when the fallback itself was refused, so a denial keeps\nboth failures instead of collapsing them into one state.", + "properties": { + "fallback_backend": { + "$ref": "#/$defs/WorkProviderBackendV1", + "description": "The backend named by the snapshot's configured fallback topology." + }, + "fallback_route": { + "$ref": "#/$defs/WorkProviderRouteV1", + "description": "The route that fallback runs on." + }, + "fallback_state": { + "anyOf": [ + { + "$ref": "#/$defs/WorkProviderAvailabilityV1" + }, + { + "type": "null" + } + ], + "description": "`None` when the fallback actually started; `Some(state)` when the\nfallback was itself refused." + }, + "preferred_backend": { + "$ref": "#/$defs/WorkProviderBackendV1", + "description": "The backend the pinned snapshot named first." + }, + "preferred_route": { + "$ref": "#/$defs/WorkProviderRouteV1", + "description": "The route that backend would have run on." + }, + "preferred_state": { + "$ref": "#/$defs/WorkProviderAvailabilityV1", + "description": "Why the preferred backend could not be used." + } + }, + "required": [ + "preferred_backend", + "preferred_route", + "preferred_state", + "fallback_backend", + "fallback_route", + "fallback_state" + ], + "type": "object" + }, + "WorkProviderProtocol": { + "enum": [ + "claude_stream_json", + "codex_app_server_json_rpc", + "codex_exec_json" + ], + "type": "string" + }, + "WorkProviderRouteId": { + "description": "Strongly typed canonical identity: `WorkProviderRouteId`.", + "type": "string" + }, + "WorkProviderRouteV1": { + "additionalProperties": false, + "properties": { + "provider_id": { + "$ref": "#/$defs/ProviderId" + }, + "route_id": { + "$ref": "#/$defs/WorkProviderRouteId" + } + }, + "required": [ + "provider_id", + "route_id" + ], + "type": "object" + }, + "WorkRankedRouteV1": { + "additionalProperties": false, + "description": "Ranked route. Dimensions stay SEPARATE — no scalar score field is permitted here.", + "properties": { + "autonomy": { + "$ref": "#/$defs/WorkOrdinalBandV1", + "description": "Autonomy fitness, echoed unmerged." + }, + "correctness": { + "$ref": "#/$defs/WorkOrdinalBandV1", + "description": "Correctness fitness, echoed so the ranking can be audited without the input." + }, + "cost": { + "$ref": "#/$defs/WorkOrdinalBandV1", + "description": "Cost fitness, oriented so `Highest` is best-fitting." + }, + "evidence_quality": { + "$ref": "#/$defs/WorkOrdinalBandV1", + "description": "Evidence-quality fitness, echoed unmerged." + }, + "latency": { + "$ref": "#/$defs/WorkOrdinalBandV1", + "description": "Latency fitness, oriented so `Highest` is best-fitting." + }, + "rank": { + "description": "Position in the ranking, ascending from 1.", + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "route_id": { + "description": "The ranked route's identity.", + "type": "string" + }, + "sensitive_data_fitness": { + "$ref": "#/$defs/WorkOrdinalBandV1", + "description": "Sensitive-data fitness, echoed unmerged." + } + }, + "required": [ + "rank", + "route_id", + "correctness", + "sensitive_data_fitness", + "latency", + "cost", + "autonomy", + "evidence_quality" + ], + "type": "object" + }, + "WorkRecoveryStateV1": { + "oneOf": [ + { + "properties": { + "state": { + "const": "fresh", + "type": "string" + } + }, + "required": [ + "state" + ], + "type": "object" + }, + { + "properties": { + "checkpoint": { + "anyOf": [ + { + "$ref": "#/$defs/WorkArtifactRefV1" + }, + { + "type": "null" + } + ] + }, + "source_attempt_id": { + "$ref": "#/$defs/AttemptId" + }, + "state": { + "const": "resumed", + "type": "string" + } + }, + "required": [ + "state", + "source_attempt_id", + "checkpoint" + ], + "type": "object" + }, + { + "properties": { + "reason": { + "$ref": "#/$defs/WorkRestartReasonV1" + }, + "source_attempt_id": { + "$ref": "#/$defs/AttemptId" + }, + "state": { + "const": "restarted", + "type": "string" + } + }, + "required": [ + "state", + "source_attempt_id", + "reason" + ], + "type": "object" + }, + { + "description": "The attempt cannot continue and must be recovered. A first attempt\nlost before it ever resumed anything has no predecessor, so the source\nis absent rather than pointing at the attempt itself.", + "properties": { + "reason": { + "$ref": "#/$defs/WorkRestartReasonV1" + }, + "source_attempt_id": { + "anyOf": [ + { + "$ref": "#/$defs/AttemptId" + }, + { + "type": "null" + } + ], + "default": null + }, + "state": { + "const": "recovery_required", + "type": "string" + } + }, + "required": [ + "state", + "source_attempt_id", + "reason" + ], + "type": "object" + } + ] + }, + "WorkRelationReplanDecisionV1": { + "additionalProperties": false, + "properties": { + "decided_at": { + "$ref": "#/$defs/UtcMicros" + }, + "disposition": { + "$ref": "#/$defs/WorkProposalDispositionV12" + }, + "proposal": { + "$ref": "#/$defs/WorkRelationReplanProposalV1" + } + }, + "required": [ + "proposal", + "disposition", + "decided_at" + ], + "type": "object" + }, + "WorkRelationReplanProposalV1": { + "additionalProperties": false, + "properties": { + "based_on_version": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "causal_candidates": { + "items": { + "$ref": "#/$defs/TaskId" + }, + "type": "array", + "uniqueItems": true + }, + "dependencies": { + "items": { + "$ref": "#/$defs/TaskId" + }, + "type": "array", + "uniqueItems": true + }, + "informational_relations": { + "items": { + "$ref": "#/$defs/TaskId" + }, + "type": "array", + "uniqueItems": true + }, + "payload_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "proposal_id": { + "$ref": "#/$defs/ProposalId" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + } + }, + "required": [ + "proposal_id", + "task_id", + "based_on_version", + "dependencies", + "informational_relations", + "causal_candidates", + "payload_digest" + ], + "type": "object" + }, + "WorkRestartReasonV1": { + "enum": [ + "lease_lost", + "provider_unavailable", + "process_lost", + "failure_observed" + ], + "type": "string" + }, + "WorkRetryAttemptOutcomeV1": { + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "attempt": { + "$ref": "#/$defs/WorkAttemptV1" + }, + "outcome": { + "const": "created", + "type": "string" + }, + "receipt": { + "$ref": "#/$defs/WorkRetryReceiptV1" + } + }, + "required": [ + "outcome", + "receipt", + "attempt" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "attempt": { + "$ref": "#/$defs/WorkAttemptV1" + }, + "outcome": { + "const": "replayed", + "type": "string" + }, + "receipt": { + "$ref": "#/$defs/WorkRetryReceiptV1" + } + }, + "required": [ + "outcome", + "receipt", + "attempt" + ], + "type": "object" + } + ] + }, + "WorkRetryCauseV1": { + "enum": [ + "runtime_failure" + ], + "type": "string" + }, + "WorkRetryFailureSelectorV1": { + "additionalProperties": false, + "description": "A selector into the owning runtime-terminal evidence authority.\n\n`evidence_ref` is an opaque local reference. The Work retry owner resolves\nit through [`WorkRetryEvidencePortV1`]; callers never submit the evidence\ndigest, outcome, or observation time that decides eligibility.", + "properties": { + "cause": { + "$ref": "#/$defs/WorkRetryCauseV1" + }, + "evidence_ref": { + "type": "string" + }, + "source": { + "$ref": "#/$defs/WorkRetrySourceV1" + } + }, + "required": [ + "source", + "cause", + "evidence_ref" + ], + "type": "object" + }, + "WorkRetryReceiptV1": { + "additionalProperties": false, + "properties": { + "canonical_input_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "command": { + "$ref": "#/$defs/RetryWorkAttemptCommandV1" + }, + "failure": { + "$ref": "#/$defs/VerifiedWorkRetryFailureV1" + }, + "new_attempt": { + "$ref": "#/$defs/WorkAttemptIdentityV1" + }, + "owner_receipt_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "restarted_at": { + "$ref": "#/$defs/UtcMicros", + "description": "Daemon-owned admission time at which the new attempt was created." + }, + "retry_required_at": { + "$ref": "#/$defs/UtcMicros", + "description": "Exact source-owned time at which the failure made a retry necessary." + } + }, + "required": [ + "command", + "failure", + "new_attempt", + "retry_required_at", + "restarted_at", + "canonical_input_digest", + "owner_receipt_digest" + ], + "type": "object" + }, + "WorkRetrySourceV1": { + "enum": [ + "runtime" + ], + "type": "string" + }, + "WorkRouteDecisionV1": { + "oneOf": [ + { + "properties": { + "alternatives": { + "items": { + "$ref": "#/$defs/WorkProviderRouteV1" + }, + "type": "array" + }, + "decision": { + "const": "selected", + "type": "string" + }, + "exclusions": { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + "fallback": { + "type": "string" + }, + "recommended": { + "$ref": "#/$defs/WorkProviderRouteV1" + } + }, + "required": [ + "decision", + "recommended", + "alternatives", + "exclusions", + "fallback" + ], + "type": "object" + }, + { + "properties": { + "decision": { + "const": "abstained", + "type": "string" + }, + "reason": { + "type": "string" + } + }, + "required": [ + "decision", + "reason" + ], + "type": "object" + } + ] + }, + "WorkRouteExclusionV1": { + "additionalProperties": false, + "description": "One refused route and the single reason that refused it. Exclusion is\nrecorded rather than silent so a missing route is always explained.", + "properties": { + "reason": { + "$ref": "#/$defs/WorkProposalReasonV1", + "description": "The first limit the route failed, in the declared exclusion order." + }, + "route_id": { + "description": "The refused route's identity.", + "type": "string" + } + }, + "required": [ + "route_id", + "reason" + ], + "type": "object" + }, + "WorkRoutePlanV1": { + "additionalProperties": false, + "description": "The explained route plan for one decision. Recommends; never dispatches.", + "properties": { + "coverage": { + "$ref": "#/$defs/WorkOrdinalBandV1", + "description": "Fraction-free ordinal coverage of the cohort evidence over the ranked set." + }, + "deterministic_baseline": { + "description": "The declared deterministic baseline, selected when evidence cannot support a\nstronger claim. Always names a route that survived exclusion, or None when none did.", + "type": [ + "string", + "null" + ] + }, + "exclusions": { + "description": "Every refused route with its reason, in supplied order.", + "items": { + "$ref": "#/$defs/WorkRouteExclusionV1" + }, + "type": "array" + }, + "human_override_applied": { + "description": "True only when a recorded human override named a route that survived\nexclusion. An excluded or unknown override leaves ranking untouched.", + "type": "boolean" + }, + "ranked": { + "description": "Surviving routes in total, deterministic order, rank ascending from 1.", + "items": { + "$ref": "#/$defs/WorkRankedRouteV1" + }, + "type": "array" + }, + "uncertainty": { + "$ref": "#/$defs/WorkOrdinalBandV1", + "description": "Widens on sparse / stale / incomparable evidence." + } + }, + "required": [ + "ranked", + "exclusions", + "deterministic_baseline", + "coverage", + "uncertainty", + "human_override_applied" + ], + "type": "object" + }, + "WorkRunControlAuthorityV1": { + "description": "A monotonically versioned control authority.", + "format": "uint64", + "minimum": 0, + "title": "WorkRunControlAuthorityV1", + "type": "integer" + }, + "WorkRunControlReadingV1": { + "description": "One run's control reading.\n\n`Uncontrolled` is a distinct answer from `Controlled`: it says the run is\nadmitted and running under its admitted deadline with no control transition\never published, which is not the same as a control row that happens to say\n`Running`.", + "oneOf": [ + { + "additionalProperties": false, + "description": "The run holds durable attempts but no control transition has ever been\npublished for it.", + "properties": { + "deadline": { + "$ref": "#/$defs/UtcMicros", + "description": "The admitted deadline the run is running against." + }, + "live_attempts": { + "description": "Attempts that have not reached a terminal state.", + "items": { + "$ref": "#/$defs/AttemptId" + }, + "type": "array" + }, + "state": { + "const": "uncontrolled", + "type": "string" + }, + "total_attempts": { + "format": "uint32", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "state", + "deadline", + "live_attempts", + "total_attempts" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "The published control aggregate, plus the live frontier as of this\nread (which may differ from the frontier the transition fenced).", + "properties": { + "control": { + "$ref": "#/$defs/WorkRunControlV1" + }, + "live_attempts": { + "items": { + "$ref": "#/$defs/AttemptId" + }, + "type": "array" + }, + "state": { + "const": "controlled", + "type": "string" + }, + "total_attempts": { + "format": "uint32", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "state", + "control", + "live_attempts", + "total_attempts" + ], + "type": "object" + } + ], + "title": "WorkRunControlReadingV1" + }, + "WorkRunControlReasonV1": { + "description": "Why a run was paused or resumed. A closed vocabulary keeps the reason out\nof free text so it can be read by a projection without being a prompt.", + "oneOf": [ + { + "const": "operator_request", + "description": "An authorized operator asked for the transition.", + "type": "string" + }, + { + "const": "human_wait", + "description": "The run is waiting on a human approval or answer.", + "type": "string" + }, + { + "const": "budget_exhausted", + "description": "The shared budget ledger is exhausted for now.", + "type": "string" + }, + { + "const": "recovery", + "description": "Recovery or failover is reconciling the run.", + "type": "string" + } + ], + "title": "WorkRunControlReasonV1" + }, + "WorkRunControlRequestV1": { + "additionalProperties": false, + "properties": { + "run_id": { + "$ref": "#/$defs/RunId" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + } + }, + "required": [ + "task_id", + "run_id" + ], + "title": "WorkRunControlRequestV1", + "type": "object" + }, + "WorkRunControlStateV1": { + "description": "The published control state of one run.\n\nThere is no `Cancelled` here: cancellation is an attempt-level authority\nowned through the lease fence, and duplicating it as a run state would\ncreate a second place a run could be \"over\".", + "oneOf": [ + { + "const": "running", + "description": "New reservations are admitted.", + "type": "string" + }, + { + "const": "paused", + "description": "New reservations are fenced; committed evidence is preserved.", + "type": "string" + } + ], + "title": "WorkRunControlStateV1" + }, + "WorkRunControlV1": { + "additionalProperties": false, + "description": "One run's durable control aggregate.", + "properties": { + "authority": { + "$ref": "#/$defs/WorkRunControlAuthorityV1" + }, + "deadline": { + "$ref": "#/$defs/WorkRunDeadlineCheckpointV1" + }, + "fenced_attempts": { + "description": "The exact attempts that were live when the current state published.\nEmpty means \"none were live\", never \"we did not look\".", + "items": { + "$ref": "#/$defs/AttemptId" + }, + "type": "array" + }, + "reason": { + "anyOf": [ + { + "$ref": "#/$defs/WorkRunControlReasonV1" + }, + { + "type": "null" + } + ] + }, + "run_id": { + "$ref": "#/$defs/RunId" + }, + "state": { + "$ref": "#/$defs/WorkRunControlStateV1" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + }, + "transitioned_at": { + "$ref": "#/$defs/UtcMicros" + } + }, + "required": [ + "task_id", + "run_id", + "state", + "authority", + "deadline", + "reason", + "transitioned_at", + "fenced_attempts" + ], + "title": "WorkRunControlV1", + "type": "object" + }, + "WorkRunDeadlineCheckpointV1": { + "additionalProperties": false, + "description": "The run's deadline as of the last control transition.\n\n`remaining_micros` is the authority; `deadline` is the absolute instant that\nremaining resolves to while the run is running. Both are recorded so a\nreader never has to recompute one from a clock it does not trust.", + "properties": { + "checkpoint_at": { + "$ref": "#/$defs/UtcMicros", + "description": "The instant the checkpoint was taken." + }, + "deadline": { + "$ref": "#/$defs/UtcMicros", + "description": "The absolute deadline the run is measured against right now." + }, + "remaining_micros": { + "description": "Micros left against that deadline at `checkpoint_at`. Never negative,\nand never larger than the value the previous checkpoint carried.", + "format": "int64", + "type": "integer" + } + }, + "required": [ + "deadline", + "remaining_micros", + "checkpoint_at" + ], + "title": "WorkRunDeadlineCheckpointV1", + "type": "object" + }, + "WorkRuntimeAttemptProjectionV1": { + "additionalProperties": false, + "properties": { + "identity": { + "$ref": "#/$defs/WorkAttemptIdentityV1" + }, + "state": { + "$ref": "#/$defs/WorkAttemptStateV1" + } + }, + "required": [ + "identity", + "state" + ], + "type": "object" + }, + "WorkRuntimeProjectionCoverageV1": { + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "coverage": { + "const": "complete", + "type": "string" + } + }, + "required": [ + "coverage" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "coverage": { + "const": "partial", + "type": "string" + }, + "unavailable_attempts": { + "items": { + "$ref": "#/$defs/WorkAttemptIdentityV1" + }, + "type": "array", + "uniqueItems": true + } + }, + "required": [ + "coverage", + "unavailable_attempts" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "coverage": { + "const": "unavailable", + "type": "string" + } + }, + "required": [ + "coverage" + ], + "type": "object" + } + ] + }, + "WorkRuntimeProjectionV1": { + "additionalProperties": false, + "properties": { + "attempts": { + "items": { + "$ref": "#/$defs/WorkRuntimeAttemptProjectionV1" + }, + "type": "array" + }, + "coverage": { + "$ref": "#/$defs/WorkRuntimeProjectionCoverageV1" + }, + "generation_id": { + "$ref": "#/$defs/ProjectionGenerationId" + }, + "graph_version": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "observed_at": { + "$ref": "#/$defs/UtcMicros" + }, + "sequence": { + "$ref": "#/$defs/WorkProjectionSequenceV1" + } + }, + "required": [ + "graph_version", + "generation_id", + "sequence", + "observed_at", + "attempts", + "coverage" + ], + "type": "object" + }, + "WorkSandboxPolicy": { + "enum": [ + "required" + ], + "type": "string" + }, + "WorkScoreKindV1": { + "enum": [ + "ordinal", + "heuristic", + "calibrated_range" + ], + "type": "string" + }, + "WorkShapeAssessmentV1": { + "additionalProperties": false, + "properties": { + "ambiguity": { + "format": "uint8", + "maximum": 255, + "minimum": 0, + "type": "integer" + }, + "blast_radius": { + "format": "uint8", + "maximum": 255, + "minimum": 0, + "type": "integer" + }, + "complexity": { + "format": "uint8", + "maximum": 255, + "minimum": 0, + "type": "integer" + }, + "integration_overhead": { + "format": "uint8", + "maximum": 255, + "minimum": 0, + "type": "integer" + }, + "score_kind": { + "$ref": "#/$defs/WorkScoreKindV1" + } + }, + "required": [ + "score_kind", + "complexity", + "ambiguity", + "blast_radius", + "integration_overhead" + ], + "type": "object" + }, + "WorkSizingV1": { + "additionalProperties": false, + "properties": { + "coverage": { + "type": "string" + }, + "high": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "likely": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "low": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "score_kind": { + "$ref": "#/$defs/WorkScoreKindV1" + } + }, + "required": [ + "score_kind", + "low", + "likely", + "high", + "coverage" + ], + "type": "object" + }, + "WorkSubtaskSketchV1": { + "additionalProperties": false, + "description": "One level only (Q3). Read-only sketch; accepting it stays a separate version-checked command.", + "properties": { + "ordinal": { + "description": "Position in the proposal, ascending from 0. Stable across replays of the\nsame input.", + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "shape": { + "$ref": "#/$defs/WorkTaskShapeKindV1", + "description": "Kind the sketch would carry if it were accepted as its own task." + }, + "summary": { + "description": "What the sketch covers, phrased from the declared counts alone.", + "type": "string" + } + }, + "required": [ + "ordinal", + "summary", + "shape" + ], + "type": "object" + }, + "WorkSynthesisAttemptV1": { + "description": "The typed outcome of a synthesis request: an admitted attempt, or the\nsealed unsynthesized set when synthesis could not truthfully begin.", + "oneOf": [ + { + "additionalProperties": false, + "description": "The admitted synthesis attempt and everything it is accountable to.", + "properties": { + "attempt": { + "$ref": "#/$defs/WorkAttemptV1", + "description": "The leased (or idempotently replayed) synthesis attempt." + }, + "draft": { + "$ref": "#/$defs/WorkflowSynthesisDraft", + "description": "The citation obligation, complete by construction: the draft cites\nevery citable source digest and is verified downstream by\n[`crate::workflow_synthesis::verify_workflow_synthesis_draft`]." + }, + "groups": { + "description": "Disagreement structure over the succeeded sources.", + "items": { + "$ref": "#/$defs/WorkSynthesisEvidenceGroupV1" + }, + "type": "array" + }, + "source_set": { + "$ref": "#/$defs/WorkSynthesisSourceSetV1", + "description": "The sealed source envelopes the attempt was admitted against." + }, + "synthesis": { + "const": "admitted", + "type": "string" + }, + "uncited": { + "description": "Sources preserved without citations — failures, unknowns, and\nartifact-less successes — in the caller's requested order.", + "items": { + "$ref": "#/$defs/WorkAttemptIdentityV1" + }, + "type": "array" + } + }, + "required": [ + "synthesis", + "attempt", + "source_set", + "groups", + "draft", + "uncited" + ], + "type": "object" + }, + { + "properties": { + "refusal": { + "$ref": "#/$defs/WorkSynthesisRefusalV1" + }, + "sources": { + "$ref": "#/$defs/WorkSynthesisSourceSetV1" + }, + "synthesis": { + "const": "unsynthesized", + "type": "string" + } + }, + "required": [ + "synthesis", + "sources", + "refusal" + ], + "type": "object" + } + ] + }, + "WorkSynthesisEvidenceGroupV1": { + "additionalProperties": false, + "description": "Succeeded sources grouped by the exact artifact digest list they produced.\nGroups are ordered largest first; smaller groups are the minority\nevidence, and more than one group is the disagreement, preserved as\nstructure instead of being resolved by fiat.", + "properties": { + "artifacts": { + "description": "The artifact digest list every source in this group produced.", + "items": { + "$ref": "#/$defs/ManifestDigest" + }, + "type": "array" + }, + "sources": { + "description": "The concurring sources, in the caller's requested order.", + "items": { + "$ref": "#/$defs/WorkAttemptIdentityV1" + }, + "type": "array" + } + }, + "required": [ + "artifacts", + "sources" + ], + "type": "object" + }, + "WorkSynthesisRefusalV1": { + "description": "Why a synthesis request was answered with the unsynthesized set instead\nof an admitted attempt.", + "oneOf": [ + { + "const": "no_citable_sources", + "description": "No source contributed a citable artifact: every source failed, was\ncancelled, timed out, is still unknown, or succeeded without\ndeclaring artifacts. There is nothing a synthesis could truthfully\ncite.", + "type": "string" + } + ] + }, + "WorkSynthesisSourceEnvelopeV1": { + "additionalProperties": false, + "description": "One immutable source envelope: which attempt, and what it truthfully\ncontributed at admission time.", + "properties": { + "outcome": { + "$ref": "#/$defs/WorkSynthesisSourceOutcomeV1" + }, + "source": { + "$ref": "#/$defs/WorkAttemptIdentityV1" + } + }, + "required": [ + "source", + "outcome" + ], + "type": "object" + }, + "WorkSynthesisSourceOutcomeV1": { + "description": "One sibling attempt's terminal contribution, captured verbatim from the\nWork authority at admission time.", + "oneOf": [ + { + "description": "The source succeeded; its declared artifact digests, in declaration\norder, are the evidence a synthesis may cite.", + "properties": { + "artifacts": { + "items": { + "$ref": "#/$defs/ManifestDigest" + }, + "type": "array" + }, + "outcome": { + "const": "succeeded", + "type": "string" + } + }, + "required": [ + "outcome", + "artifacts" + ], + "type": "object" + }, + { + "description": "The source failed; its sealed terminal evidence digest is preserved\nso the failure stays visible in the synthesis record.", + "properties": { + "evidence": { + "$ref": "#/$defs/ManifestDigest" + }, + "outcome": { + "const": "failed", + "type": "string" + } + }, + "required": [ + "outcome", + "evidence" + ], + "type": "object" + }, + { + "description": "The source timed out; preserved like a failure.", + "properties": { + "evidence": { + "$ref": "#/$defs/ManifestDigest" + }, + "outcome": { + "const": "timed_out", + "type": "string" + } + }, + "required": [ + "outcome", + "evidence" + ], + "type": "object" + }, + { + "description": "The source was cancelled; preserved like a failure.", + "properties": { + "evidence": { + "$ref": "#/$defs/ManifestDigest" + }, + "outcome": { + "const": "cancelled", + "type": "string" + } + }, + "required": [ + "outcome", + "evidence" + ], + "type": "object" + }, + { + "description": "The source has not reached a terminal state. The unknown is preserved\nas an unknown; it contributes no citable evidence and is never\nguessed at.", + "properties": { + "outcome": { + "const": "unknown", + "type": "string" + }, + "state": { + "$ref": "#/$defs/WorkAttemptStateV1" + } + }, + "required": [ + "outcome", + "state" + ], + "type": "object" + } + ] + }, + "WorkSynthesisSourceSetV1": { + "additionalProperties": false, + "description": "The ordered, digest-sealed source envelope set a synthesis admission\nconsumed. Reordering or mutating any envelope changes the digest, so a\nreplayed or tampered set is distinguishable from the admitted one.", + "properties": { + "set_digest": { + "$ref": "#/$defs/ManifestDigest", + "description": "Canonical digest over the ordered envelopes." + }, + "sources": { + "description": "The envelopes, exactly in the caller's requested order.", + "items": { + "$ref": "#/$defs/WorkSynthesisSourceEnvelopeV1" + }, + "type": "array" + } + }, + "required": [ + "sources", + "set_digest" + ], + "type": "object" + }, + "WorkTaskSessionContinuationV1": { + "additionalProperties": false, + "properties": { + "attempt": { + "$ref": "#/$defs/WorkAttemptIdentityV1" + }, + "participant_epoch": { + "$ref": "#/$defs/ManifestDigest" + }, + "ranking_cursor": { + "type": [ + "string", + "null" + ] + }, + "source": { + "$ref": "#/$defs/ObservationSourceIdentityV1" + }, + "temporal_cursor": { + "type": [ + "string", + "null" + ] + }, + "verified_version": { + "$ref": "#/$defs/VerifiedWorkGraphVersionV1" + } + }, + "required": [ + "verified_version", + "attempt", + "source", + "participant_epoch", + "temporal_cursor", + "ranking_cursor" + ], + "type": "object" + }, + "WorkTaskSessionCoverageV1": { + "additionalProperties": false, + "properties": { + "hidden": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "redacted": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "unknown": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "visible": { + "format": "uint64", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "visible", + "hidden", + "unknown", + "redacted" + ], + "type": "object" + }, + "WorkTaskSessionEvidenceV1": { + "additionalProperties": false, + "properties": { + "attempt": { + "$ref": "#/$defs/WorkAttemptIdentityV1" + }, + "continuation": { + "anyOf": [ + { + "$ref": "#/$defs/WorkTaskSessionContinuationV1" + }, + { + "type": "null" + } + ] + }, + "coverage": { + "$ref": "#/$defs/WorkEvidenceCoverageStateV1" + }, + "coverage_counts": { + "$ref": "#/$defs/WorkTaskSessionCoverageV1" + }, + "freshness": { + "$ref": "#/$defs/WorkEvidenceFreshnessV1" + }, + "hydrated": { + "items": { + "$ref": "#/$defs/WorkTaskSessionHydrationV1" + }, + "type": "array" + }, + "participant_epoch": { + "$ref": "#/$defs/ManifestDigest" + }, + "ranked_anchors": { + "items": { + "$ref": "#/$defs/WorkTaskSessionRankedAnchorV1" + }, + "type": "array" + }, + "redacted": { + "type": "boolean" + }, + "source": { + "$ref": "#/$defs/ObservationSourceIdentityV1" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + }, + "verified_version": { + "$ref": "#/$defs/VerifiedWorkGraphVersionV1" + } + }, + "required": [ + "task_id", + "verified_version", + "attempt", + "source", + "participant_epoch", + "ranked_anchors", + "hydrated", + "coverage", + "coverage_counts", + "freshness", + "redacted", + "continuation" + ], + "type": "object" + }, + "WorkTaskSessionHydrationStateV1": { + "enum": [ + "available", + "retained_but_unavailable", + "redacted", + "deleted", + "retention_expired", + "unauthorized", + "locked", + "unverifiable_legacy" + ], + "type": "string" + }, + "WorkTaskSessionHydrationV1": { + "additionalProperties": false, + "properties": { + "anchor_id": { + "$ref": "#/$defs/RetrievalAnchorId" + }, + "content": { + "items": { + "format": "uint8", + "maximum": 255, + "minimum": 0, + "type": "integer" + }, + "type": [ + "array", + "null" + ] + }, + "rank": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "state": { + "$ref": "#/$defs/WorkTaskSessionHydrationStateV1" + } + }, + "required": [ + "rank", + "anchor_id", + "state", + "content" + ], + "type": "object" + }, + "WorkTaskSessionRankContributionV1": { + "additionalProperties": false, + "properties": { + "calibrated_feature_micros": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "calibration_profile": { + "type": "string" + }, + "ordinal_rank": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "raw_score_micros": { + "format": "int64", + "type": "integer" + }, + "retriever": { + "type": "string" + }, + "retriever_revision": { + "type": "string" + }, + "score_domain": { + "type": "string" + }, + "source_occurrence": { + "type": "string" + }, + "weight_micros": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "weighted_contribution_micros": { + "format": "uint64", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "retriever", + "retriever_revision", + "source_occurrence", + "ordinal_rank", + "raw_score_micros", + "score_domain", + "calibration_profile", + "calibrated_feature_micros", + "weight_micros", + "weighted_contribution_micros" + ], + "type": "object" + }, + "WorkTaskSessionRankedAnchorV1": { + "additionalProperties": false, + "properties": { + "anchor_id": { + "$ref": "#/$defs/RetrievalAnchorId" + }, + "contributions": { + "items": { + "$ref": "#/$defs/WorkTaskSessionRankContributionV1" + }, + "type": "array" + }, + "final_ordinal": { + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "utility_micros": { + "format": "uint64", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "anchor_id", + "final_ordinal", + "utility_micros", + "contributions" + ], + "type": "object" + }, + "WorkTaskShapeKindV1": { + "description": "Kind of work the snapshot facts describe. Derived only from facts already in\nthe input; `Unclassified` when those facts do not distinguish a kind.", + "enum": [ + "investigation", + "change", + "synthesis", + "unclassified" + ], + "type": "string" + }, + "WorkTaskShapeV1": { + "additionalProperties": false, + "description": "The derived shape of the task: what kind of work it is and how large the\ndeclared dependency and evidence counts make it.", + "properties": { + "band": { + "$ref": "#/$defs/WorkOrdinalBandV1", + "description": "Magnitude band derived from the declared dependency and evidence counts." + }, + "kind": { + "$ref": "#/$defs/WorkTaskShapeKindV1", + "description": "Kind derived from the gate booleans and counts. No new discovery." + } + }, + "required": [ + "kind", + "band" + ], + "type": "object" + }, + "WorkTerminalEvidenceV1": { + "oneOf": [ + { + "properties": { + "evidence_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "observed_at": { + "$ref": "#/$defs/UtcMicros" + }, + "outcome": { + "const": "succeeded", + "type": "string" + } + }, + "required": [ + "outcome", + "evidence_digest", + "observed_at" + ], + "type": "object" + }, + { + "properties": { + "evidence_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "observed_at": { + "$ref": "#/$defs/UtcMicros" + }, + "outcome": { + "const": "failed", + "type": "string" + } + }, + "required": [ + "outcome", + "evidence_digest", + "observed_at" + ], + "type": "object" + }, + { + "properties": { + "evidence_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "observed_at": { + "$ref": "#/$defs/UtcMicros" + }, + "outcome": { + "const": "timed_out", + "type": "string" + } + }, + "required": [ + "outcome", + "evidence_digest", + "observed_at" + ], + "type": "object" + }, + { + "properties": { + "evidence_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "observed_at": { + "$ref": "#/$defs/UtcMicros" + }, + "outcome": { + "const": "cancelled", + "type": "string" + } + }, + "required": [ + "outcome", + "evidence_digest", + "observed_at" + ], + "type": "object" + } + ] + }, + "WorkTimelineEntryV1": { + "additionalProperties": false, + "properties": { + "created_at": { + "$ref": "#/$defs/UtcMicros" + }, + "deadline": { + "anyOf": [ + { + "$ref": "#/$defs/UtcMicros" + }, + { + "type": "null" + } + ] + }, + "scheduled_at": { + "anyOf": [ + { + "$ref": "#/$defs/UtcMicros" + }, + { + "type": "null" + } + ] + }, + "task_id": { + "$ref": "#/$defs/TaskId" + }, + "updated_at": { + "$ref": "#/$defs/UtcMicros" + } + }, + "required": [ + "task_id", + "created_at", + "updated_at", + "scheduled_at", + "deadline" + ], + "type": "object" + }, + "WorkTimelineLaneV1": { + "enum": [ + "triage", + "todo", + "scheduled", + "ready", + "running", + "blocked", + "review", + "done", + "archived", + "cancelled", + "unavailable" + ], + "type": "string" + }, + "WorkTimelineProjectionV1": { + "additionalProperties": false, + "properties": { + "entries": { + "items": { + "$ref": "#/$defs/WorkTimelineEntryV1" + }, + "type": "array" + }, + "graph_version": { + "format": "uint64", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "graph_version", + "entries" + ], + "type": "object" + }, + "WorkTopologyExecutionPlacementV1": { + "additionalProperties": false, + "description": "The execution-placement dimension: the policy's placement mode plus one\nlane per distinct `(task, run)` pair in page order.", + "properties": { + "lanes": { + "items": { + "$ref": "#/$defs/WorkTopologyPlacementLaneV1" + }, + "type": "array" + }, + "mode": { + "$ref": "#/$defs/WorktreePlacementModeV1" + } + }, + "required": [ + "mode", + "lanes" + ], + "title": "WorkTopologyExecutionPlacementV1", + "type": "object" + }, + "WorkTopologyGenerationRefV1": { + "description": "Strongly typed algorithm-tagged integrity digest: `WorkTopologyGenerationRefV1`.", + "type": "string" + }, + "WorkTopologyIntegrationStrategyV1": { + "additionalProperties": false, + "description": "The integration-strategy dimension, read verbatim from the resolved work\ntopology policy the runs in scope are admitted against.", + "properties": { + "cross_merge": { + "$ref": "#/$defs/CrossMergePolicyV1" + }, + "gates": { + "$ref": "#/$defs/TopologyGatePolicyV1" + }, + "protected_refs": { + "items": { + "$ref": "#/$defs/ProtectedRefRuleV1" + }, + "type": "array" + } + }, + "required": [ + "cross_merge", + "gates", + "protected_refs" + ], + "title": "WorkTopologyIntegrationStrategyV1", + "type": "object" + }, + "WorkTopologyPlacementLaneV1": { + "additionalProperties": false, + "description": "One execution-placement lane: a distinct `(task, run)` pair from the\nattempt page joined to its durable placement reading. Placement absence is\na state on the lane, not a dropped lane.", + "properties": { + "attempt_count": { + "description": "Attempts this lane carried within the requested page.", + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "placement": { + "$ref": "#/$defs/WorkPlacementReadingV1" + }, + "run_id": { + "$ref": "#/$defs/RunId" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + } + }, + "required": [ + "task_id", + "run_id", + "attempt_count", + "placement" + ], + "title": "WorkTopologyPlacementLaneV1", + "type": "object" + }, + "WorkTopologyPolicyV1": { + "additionalProperties": false, + "description": "Complete V1 policy. Partial values are intentionally impossible: callers\nmust provide the entire policy and validation rejects adapter-local defaults.", + "properties": { + "branch_naming": { + "$ref": "#/$defs/BranchNamingPolicyV1" + }, + "branch_topology": { + "$ref": "#/$defs/BranchTopologyPolicyV1" + }, + "concurrency": { + "$ref": "#/$defs/TopologyConcurrencyPolicyV1" + }, + "cross_merge": { + "$ref": "#/$defs/CrossMergePolicyV1" + }, + "escalation": { + "$ref": "#/$defs/TopologyEscalationPolicyV1" + }, + "gates": { + "$ref": "#/$defs/TopologyGatePolicyV1" + }, + "history_rewrite": { + "$ref": "#/$defs/HistoryRewritePolicyV1" + }, + "notifications": { + "$ref": "#/$defs/TopologyNotificationLevelV1" + }, + "placement": { + "$ref": "#/$defs/WorktreePlacementModeV1" + }, + "protected_refs": { + "items": { + "$ref": "#/$defs/ProtectedRefRuleV1" + }, + "type": "array" + }, + "retention": { + "$ref": "#/$defs/WorktreeRetentionPolicyV1" + }, + "review_topology": { + "$ref": "#/$defs/ReviewTopologyPolicyV1" + }, + "roots": { + "items": { + "$ref": "#/$defs/WorktreeRootPolicyV1" + }, + "type": "array" + }, + "schema_version": { + "format": "uint16", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "schema_version", + "placement", + "roots", + "branch_topology", + "review_topology", + "branch_naming", + "concurrency", + "cross_merge", + "gates", + "protected_refs", + "history_rewrite", + "escalation", + "retention", + "notifications" + ], + "type": "object" + }, + "WorkTopologyViewRequestV1": { + "additionalProperties": false, + "description": "One page-bounded topology view read. The cursor vocabulary is the attempt\nlist's: a cursor minted under a superseded topology generation is a typed\nstaleness refusal, never a silently different page.", + "properties": { + "cursor": { + "anyOf": [ + { + "$ref": "#/$defs/WorkAttemptListCursorV1" + }, + { + "type": "null" + } + ], + "default": null + }, + "page_size": { + "format": "uint32", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "page_size", + "cursor" + ], + "title": "WorkTopologyViewRequestV1", + "type": "object" + }, + "WorkWorkloadProjectionV1": { + "additionalProperties": false, + "properties": { + "actual_concurrency": { + "format": "uint32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "blocked_effort": { + "format": "uint32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "graph_version": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "ready_effort": { + "format": "uint32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "requested_concurrency": { + "format": "uint32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "running_effort": { + "format": "uint32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "total_effort": { + "format": "uint32", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "graph_version", + "total_effort", + "ready_effort", + "running_effort", + "blocked_effort", + "requested_concurrency", + "actual_concurrency" + ], + "type": "object" + }, + "WorkflowDefinition": { + "additionalProperties": false, + "properties": { + "definition_id": { + "$ref": "#/$defs/WorkflowDefinitionId" + }, + "definition_version": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "pinned_catalog_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "pinned_configuration_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "pinned_policy_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "project_id": { + "$ref": "#/$defs/ProjectId" + }, + "steps": { + "items": { + "$ref": "#/$defs/WorkflowStep" + }, + "type": "array" + } + }, + "required": [ + "definition_id", + "definition_version", + "project_id", + "steps", + "pinned_policy_digest", + "pinned_configuration_digest", + "pinned_catalog_digest" + ], + "type": "object" + }, + "WorkflowDefinitionActivateRequest": { + "additionalProperties": false, + "description": "Wire request for [`WorkflowDefinitionService::activate`].", + "properties": { + "definition_id": { + "$ref": "#/$defs/WorkflowDefinitionId" + }, + "definition_version": { + "format": "uint64", + "minimum": 1, + "type": "integer" + }, + "expected_revision": { + "format": "uint64", + "minimum": 1, + "type": "integer" + } + }, + "required": [ + "definition_id", + "definition_version", + "expected_revision" + ], + "type": "object" + }, + "WorkflowDefinitionDisposition": { + "additionalProperties": false, + "description": "Revisioned lifecycle disposition of one definition version.", + "properties": { + "definition_id": { + "$ref": "#/$defs/WorkflowDefinitionId" + }, + "definition_version": { + "format": "uint64", + "minimum": 1, + "type": "integer" + }, + "revision": { + "format": "uint64", + "minimum": 1, + "type": "integer" + }, + "state": { + "$ref": "#/$defs/WorkflowDefinitionLifecycleState" + }, + "transitioned_at": { + "$ref": "#/$defs/UtcMicros" + } + }, + "required": [ + "definition_id", + "definition_version", + "state", + "revision", + "transitioned_at" + ], + "type": "object" + }, + "WorkflowDefinitionGetRequest": { + "additionalProperties": false, + "description": "Wire request for [`WorkflowDefinitionService::get`].", + "properties": { + "definition_id": { + "$ref": "#/$defs/WorkflowDefinitionId" + }, + "definition_version": { + "format": "uint64", + "minimum": 1, + "type": "integer" + } + }, + "required": [ + "definition_id", + "definition_version" + ], + "type": "object" + }, + "WorkflowDefinitionHistoryRequest": { + "additionalProperties": false, + "description": "Wire request for [`WorkflowDefinitionService::history`].", + "properties": { + "definition_id": { + "$ref": "#/$defs/WorkflowDefinitionId" + } + }, + "required": [ + "definition_id" + ], + "type": "object" + }, + "WorkflowDefinitionId": { + "description": "Strongly typed canonical identity: `WorkflowDefinitionId`.", + "type": "string" + }, + "WorkflowDefinitionLifecycleState": { + "description": "Durable lifecycle disposition of one immutable workflow definition version.\n\nPlan 32 (\"Typed workflow definitions\"): \"Lifecycle retains candidate,\nvalidate, activate, retire, reject, list, get, diff, and history operations\nthrough the same application surfaces.\" The definition payload itself stays\nimmutable — \"Editing creates a new version; admitted runs remain pinned\" —\nso the disposition is a separate revisioned aggregate keyed by the same\ndefinition identity.", + "enum": [ + "candidate", + "validated", + "active", + "retired", + "rejected" + ], + "type": "string" + }, + "WorkflowDefinitionListRequest": { + "additionalProperties": false, + "description": "Wire request for [`WorkflowDefinitionService::list`].", + "type": "object" + }, + "WorkflowDefinitionRejectRequest": { + "additionalProperties": false, + "description": "Wire request for [`WorkflowDefinitionService::reject`].", + "properties": { + "definition_id": { + "$ref": "#/$defs/WorkflowDefinitionId" + }, + "definition_version": { + "format": "uint64", + "minimum": 1, + "type": "integer" + }, + "expected_revision": { + "format": "uint64", + "minimum": 1, + "type": "integer" + } + }, + "required": [ + "definition_id", + "definition_version", + "expected_revision" + ], + "type": "object" + }, + "WorkflowDefinitionRetireRequest": { + "additionalProperties": false, + "description": "Wire request for [`WorkflowDefinitionService::retire`].", + "properties": { + "definition_id": { + "$ref": "#/$defs/WorkflowDefinitionId" + }, + "definition_version": { + "format": "uint64", + "minimum": 1, + "type": "integer" + }, + "expected_revision": { + "format": "uint64", + "minimum": 1, + "type": "integer" + } + }, + "required": [ + "definition_id", + "definition_version", + "expected_revision" + ], + "type": "object" + }, + "WorkflowFanOut": { + "additionalProperties": false, + "properties": { + "max_width": { + "format": "uint32", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "max_width" + ], + "type": "object" + }, + "WorkflowFanOutChildPlanV1": { + "additionalProperties": false, + "properties": { + "admit_command_id": { + "$ref": "#/$defs/WorkCommandId" + }, + "attempt_identity": { + "$ref": "#/$defs/WorkAttemptIdentityV1" + }, + "create_command_id": { + "$ref": "#/$defs/WorkCommandId" + }, + "initiative": { + "$ref": "#/$defs/WorkInitiativeV1" + }, + "instructions": { + "type": "string" + }, + "item": { + "$ref": "#/$defs/WorkItemV1" + }, + "milestone": { + "$ref": "#/$defs/WorkMilestoneV1" + }, + "plan": { + "$ref": "#/$defs/WorkPlanV1" + }, + "proposal": { + "$ref": "#/$defs/WorkProposalV1" + }, + "proposal_command_id": { + "$ref": "#/$defs/WorkCommandId" + }, + "task_id": { + "$ref": "#/$defs/TaskId" + } + }, + "required": [ + "task_id", + "attempt_identity", + "create_command_id", + "proposal_command_id", + "admit_command_id", + "initiative", + "plan", + "milestone", + "item", + "proposal", + "instructions" + ], + "type": "object" + }, + "WorkflowFanOutFailurePolicyV1": { + "oneOf": [ + { + "properties": { + "policy": { + "const": "fail_fast", + "type": "string" + } + }, + "required": [ + "policy" + ], + "type": "object" + }, + { + "properties": { + "policy": { + "const": "collect", + "type": "string" + } + }, + "required": [ + "policy" + ], + "type": "object" + }, + { + "properties": { + "policy": { + "const": "require_at_least", + "type": "string" + }, + "successes": { + "format": "uint16", + "maximum": 65535, + "minimum": 1, + "type": "integer" + } + }, + "required": [ + "policy", + "successes" + ], + "type": "object" + } + ] + }, + "WorkflowFanOutPlanV1": { + "additionalProperties": false, + "properties": { + "admitted_at": { + "$ref": "#/$defs/UtcMicros" + }, + "authority": { + "$ref": "#/$defs/WorkAuthority", + "description": "Exact Work authority that admitted this plan. Recovery may execute the\nplan only from a runtime with this byte-identical authority." + }, + "children": { + "items": { + "$ref": "#/$defs/WorkflowFanOutChildPlanV1" + }, + "type": "array" + }, + "commit": { + "$ref": "#/$defs/CommitId" + }, + "effect_state": { + "$ref": "#/$defs/WorkEffectStateV1" + }, + "execution_snapshot": { + "$ref": "#/$defs/WorkExecutionSnapshot" + }, + "failure_policy": { + "$ref": "#/$defs/WorkflowFanOutFailurePolicyV1" + }, + "maximum_parallel": { + "format": "uint16", + "maximum": 65535, + "minimum": 1, + "type": "integer" + }, + "operation": { + "$ref": "#/$defs/WorkflowOperationRef" + }, + "plan_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "reference": { + "anyOf": [ + { + "$ref": "#/$defs/RefId" + }, + { + "type": "null" + } + ] + }, + "step_id": { + "$ref": "#/$defs/WorkflowStepId" + } + }, + "required": [ + "authority", + "step_id", + "operation", + "plan_digest", + "admitted_at", + "maximum_parallel", + "failure_policy", + "execution_snapshot", + "reference", + "commit", + "effect_state", + "children" + ], + "type": "object" + }, + "WorkflowOperationRef": { + "description": "Strongly typed canonical identity: `WorkflowOperationRef`.", + "type": "string" + }, + "WorkflowOutputArtifact": { + "additionalProperties": false, + "properties": { + "artifact": { + "$ref": "#/$defs/WorkArtifactRefV1" + }, + "attempt_identity": { + "$ref": "#/$defs/WorkAttemptIdentityV1" + } + }, + "required": [ + "attempt_identity", + "artifact" + ], + "type": "object" + }, + "WorkflowOutputName": { + "description": "Strongly typed canonical identity: `WorkflowOutputName`.", + "type": "string" + }, + "WorkflowOutputReference": { + "additionalProperties": false, + "properties": { + "output_name": { + "$ref": "#/$defs/WorkflowOutputName" + }, + "producer_step_id": { + "$ref": "#/$defs/WorkflowStepId" + } + }, + "required": [ + "producer_step_id", + "output_name" + ], + "type": "object" + }, + "WorkflowPlacementReceipt": { + "additionalProperties": false, + "properties": { + "backend": { + "$ref": "#/$defs/WorkProviderBackendV1" + }, + "configuration_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "model": { + "type": "string" + }, + "placement_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "provider_registry_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "route": { + "$ref": "#/$defs/WorkProviderRouteV1" + }, + "run_id": { + "$ref": "#/$defs/RunId" + }, + "step_id": { + "$ref": "#/$defs/WorkflowStepId" + }, + "topology_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "worktree_placement": { + "$ref": "#/$defs/WorktreePlacementModeV1" + } + }, + "required": [ + "run_id", + "step_id", + "route", + "backend", + "model", + "configuration_digest", + "topology_digest", + "provider_registry_digest", + "worktree_placement", + "placement_digest" + ], + "type": "object" + }, + "WorkflowRunEvent": { + "additionalProperties": false, + "properties": { + "command_id": { + "$ref": "#/$defs/WorkCommandId" + }, + "event": { + "$ref": "#/$defs/WorkflowRunEventKind" + }, + "input_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "occurred_at": { + "$ref": "#/$defs/UtcMicros" + }, + "run_id": { + "$ref": "#/$defs/RunId" + }, + "sequence": { + "format": "uint64", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "run_id", + "sequence", + "command_id", + "input_digest", + "occurred_at", + "event" + ], + "type": "object" + }, + "WorkflowRunEventKind": { + "oneOf": [ + { + "properties": { + "definition": { + "$ref": "#/$defs/WorkflowDefinition" + }, + "fan_out_plans": { + "default": [], + "items": { + "$ref": "#/$defs/WorkflowFanOutPlanV1" + }, + "type": "array" + }, + "pinned_provider_registry_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "pinned_topology_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "type": { + "const": "admitted", + "type": "string" + } + }, + "required": [ + "type", + "definition", + "pinned_topology_digest", + "pinned_provider_registry_digest", + "fan_out_plans" + ], + "type": "object" + }, + { + "properties": { + "attempts": { + "items": { + "$ref": "#/$defs/WorkAttemptIdentityV1" + }, + "type": "array" + }, + "step_id": { + "$ref": "#/$defs/WorkflowStepId" + }, + "type": { + "const": "fan_out_children_released", + "type": "string" + } + }, + "required": [ + "type", + "step_id", + "attempts" + ], + "type": "object" + }, + { + "properties": { + "attempts": { + "items": { + "$ref": "#/$defs/WorkAttemptIdentityV1" + }, + "type": "array" + }, + "step_id": { + "$ref": "#/$defs/WorkflowStepId" + }, + "type": { + "const": "fan_out_children_settled", + "type": "string" + } + }, + "required": [ + "type", + "step_id", + "attempts" + ], + "type": "object" + }, + { + "properties": { + "placement": { + "$ref": "#/$defs/WorkflowPlacementReceipt" + }, + "step_id": { + "$ref": "#/$defs/WorkflowStepId" + }, + "type": { + "const": "step_started", + "type": "string" + } + }, + "required": [ + "type", + "step_id", + "placement" + ], + "type": "object" + }, + { + "properties": { + "effect_receipt": { + "$ref": "#/$defs/WorkflowStepEffectReceipt" + }, + "outputs": { + "items": { + "$ref": "#/$defs/WorkflowStepOutput" + }, + "type": "array" + }, + "step_id": { + "$ref": "#/$defs/WorkflowStepId" + }, + "type": { + "const": "step_completed", + "type": "string" + } + }, + "required": [ + "type", + "step_id", + "outputs", + "effect_receipt" + ], + "type": "object" + }, + { + "properties": { + "effect_receipt": { + "$ref": "#/$defs/WorkflowStepEffectReceipt" + }, + "outputs": { + "items": { + "$ref": "#/$defs/WorkflowStepOutput" + }, + "type": "array" + }, + "step_id": { + "$ref": "#/$defs/WorkflowStepId" + }, + "type": { + "const": "step_failed", + "type": "string" + } + }, + "required": [ + "type", + "step_id", + "outputs", + "effect_receipt" + ], + "type": "object" + }, + { + "properties": { + "type": { + "const": "paused", + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "properties": { + "type": { + "const": "resumed", + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "properties": { + "type": { + "const": "cancellation_requested", + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "properties": { + "type": { + "const": "cancelled", + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + } + ] + }, + "WorkflowRunGetRequest": { + "additionalProperties": false, + "properties": { + "run_id": { + "$ref": "#/$defs/RunId" + } + }, + "required": [ + "run_id" + ], + "type": "object" + }, + "WorkflowRunProjection": { + "additionalProperties": false, + "properties": { + "definition": { + "$ref": "#/$defs/WorkflowDefinition" + }, + "fan_out_plans": { + "additionalProperties": { + "$ref": "#/$defs/WorkflowFanOutPlanV1" + }, + "type": "object" + }, + "history": { + "items": { + "$ref": "#/$defs/WorkflowRunEvent" + }, + "type": "array" + }, + "pinned_provider_registry_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "pinned_topology_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "released_fan_out_attempts": { + "items": { + "$ref": "#/$defs/WorkAttemptIdentityV1" + }, + "type": "array", + "uniqueItems": true + }, + "run_id": { + "$ref": "#/$defs/RunId" + }, + "sequence": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "settled_fan_out_attempts": { + "items": { + "$ref": "#/$defs/WorkAttemptIdentityV1" + }, + "type": "array", + "uniqueItems": true + }, + "status": { + "$ref": "#/$defs/WorkflowRunStatus" + }, + "steps": { + "additionalProperties": { + "$ref": "#/$defs/WorkflowStepRunProjection" + }, + "type": "object" + } + }, + "required": [ + "run_id", + "definition", + "pinned_topology_digest", + "pinned_provider_registry_digest", + "status", + "sequence", + "steps", + "fan_out_plans", + "released_fan_out_attempts", + "settled_fan_out_attempts", + "history" + ], + "type": "object" + }, + "WorkflowRunStatus": { + "enum": [ + "running", + "paused", + "cancelling", + "completed", + "failed", + "cancelled" + ], + "type": "string" + }, + "WorkflowStep": { + "additionalProperties": false, + "properties": { + "fan_out": { + "anyOf": [ + { + "$ref": "#/$defs/WorkflowFanOut" + }, + { + "type": "null" + } + ] + }, + "inputs": { + "items": { + "$ref": "#/$defs/WorkflowOutputReference" + }, + "type": "array" + }, + "operation": { + "$ref": "#/$defs/WorkflowOperationRef" + }, + "outputs": { + "items": { + "$ref": "#/$defs/WorkflowOutputName" + }, + "type": "array" + }, + "predecessors": { + "items": { + "$ref": "#/$defs/WorkflowStepId" + }, + "type": "array", + "uniqueItems": true + }, + "step_id": { + "$ref": "#/$defs/WorkflowStepId" + } + }, + "required": [ + "step_id", + "operation", + "predecessors", + "inputs", + "outputs", + "fan_out" + ], + "type": "object" + }, + "WorkflowStepEffectOutcome": { + "enum": [ + "completed", + "failed", + "cancelled", + "timed_out", + "unknown" + ], + "type": "string" + }, + "WorkflowStepEffectReceipt": { + "additionalProperties": false, + "properties": { + "effect_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "outcome": { + "$ref": "#/$defs/WorkflowStepEffectOutcome" + }, + "output_set_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "placement_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "receipt_digest": { + "$ref": "#/$defs/ManifestDigest" + }, + "run_id": { + "$ref": "#/$defs/RunId" + }, + "step_id": { + "$ref": "#/$defs/WorkflowStepId" + } + }, + "required": [ + "run_id", + "step_id", + "placement_digest", + "outcome", + "effect_digest", + "output_set_digest", + "receipt_digest" + ], + "type": "object" + }, + "WorkflowStepId": { + "description": "Strongly typed canonical identity: `WorkflowStepId`.", + "type": "string" + }, + "WorkflowStepOutput": { + "additionalProperties": false, + "properties": { + "artifacts": { + "items": { + "$ref": "#/$defs/WorkflowOutputArtifact" + }, + "type": "array" + }, + "output_name": { + "$ref": "#/$defs/WorkflowOutputName" + } + }, + "required": [ + "output_name", + "artifacts" + ], + "type": "object" + }, + "WorkflowStepRunProjection": { + "additionalProperties": false, + "properties": { + "effect_receipt": { + "anyOf": [ + { + "$ref": "#/$defs/WorkflowStepEffectReceipt" + }, + { + "type": "null" + } + ] + }, + "outputs": { + "additionalProperties": { + "$ref": "#/$defs/WorkflowStepOutput" + }, + "type": "object" + }, + "placement_receipt": { + "anyOf": [ + { + "$ref": "#/$defs/WorkflowPlacementReceipt" + }, + { + "type": "null" + } + ] + }, + "status": { + "$ref": "#/$defs/WorkflowStepStatus" + } + }, + "required": [ + "status", + "outputs", + "placement_receipt", + "effect_receipt" + ], + "type": "object" + }, + "WorkflowStepStatus": { + "enum": [ + "blocked", + "ready", + "running", + "succeeded", + "failed", + "cancelled" + ], + "type": "string" + }, + "WorkflowSynthesisDraft": { + "additionalProperties": false, + "description": "A provider's claim that one artifact of a fan-out output synthesizes its\nsibling source artifacts.", + "properties": { + "cited_source_digests": { + "description": "Content digests of every source artifact the synthesis consumed.", + "items": { + "$ref": "#/$defs/ManifestDigest" + }, + "type": "array", + "uniqueItems": true + }, + "output_name": { + "$ref": "#/$defs/WorkflowOutputName", + "description": "The fan-out output the synthesis belongs to." + }, + "synthesis_attempt": { + "$ref": "#/$defs/WorkAttemptIdentityV1", + "description": "The attempt that produced the synthesis artifact inside that output." + } + }, + "required": [ + "output_name", + "synthesis_attempt", + "cited_source_digests" + ], + "type": "object" + }, + "WorktreeCleanlinessRequirementV1": { + "enum": [ + "require_clean", + "allow_untracked_only_for_preflight", + "read_only_preflight_only" + ], + "type": "string" + }, + "WorktreeId": { + "description": "Strongly typed canonical identity: `WorktreeId`.", + "type": "string" + }, + "WorktreePlacementModeV1": { + "oneOf": [ + { + "properties": { + "kind": { + "const": "existing_worktree_only", + "type": "string" + } + }, + "required": [ + "kind" + ], + "type": "object" + }, + { + "properties": { + "kind": { + "const": "sibling_of_primary_checkout", + "type": "string" + } + }, + "required": [ + "kind" + ], + "type": "object" + }, + { + "properties": { + "kind": { + "const": "repository_local_root", + "type": "string" + } + }, + "required": [ + "kind" + ], + "type": "object" + }, + { + "properties": { + "kind": { + "const": "configured_root", + "type": "string" + }, + "root_id": { + "type": "string" + } + }, + "required": [ + "kind", + "root_id" + ], + "type": "object" + } + ] + }, + "WorktreeRetentionPolicyV1": { + "additionalProperties": false, + "properties": { + "abandoned_retention_seconds": { + "format": "uint64", + "minimum": 1, + "type": [ + "integer", + "null" + ] + }, + "automatic_gc": { + "$ref": "#/$defs/AutomaticWorktreeGcV1" + }, + "maximum_retained_per_repository": { + "format": "uint16", + "maximum": 65535, + "minimum": 1, + "type": [ + "integer", + "null" + ] + }, + "terminal_retention_seconds": { + "format": "uint64", + "minimum": 1, + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "terminal_retention_seconds", + "abandoned_retention_seconds", + "maximum_retained_per_repository", + "automatic_gc" + ], + "type": "object" + }, + "WorktreeRootPolicyV1": { + "additionalProperties": false, + "properties": { + "locator": { + "$ref": "#/$defs/SensitiveFilesystemLocatorV1" + }, + "maximum_active_worktrees": { + "format": "uint16", + "maximum": 65535, + "minimum": 1, + "type": "integer" + }, + "repository_scope": { + "$ref": "#/$defs/RepositoryPlacementScopeV1" + }, + "root_id": { + "type": "string" + } + }, + "required": [ + "root_id", + "locator", + "repository_scope", + "maximum_active_worktrees" + ], + "type": "object" + } + }, + "$schema": "https://json-schema.org/draft/2020-12/schema", + "properties": { + "analytics_agents": { + "$ref": "#/$defs/DashboardEnvelopeV117" + }, + "analytics_diagnostics": { + "$ref": "#/$defs/DashboardEnvelopeV121" + }, + "analytics_hints": { + "$ref": "#/$defs/DashboardEnvelopeV119" + }, + "analytics_overview": { + "$ref": "#/$defs/DashboardEnvelopeV115" + }, + "analytics_subagent_tree": { + "$ref": "#/$defs/DashboardEnvelopeV118" + }, + "analytics_underused": { + "$ref": "#/$defs/DashboardEnvelopeV120" + }, + "analytics_usage": { + "$ref": "#/$defs/DashboardEnvelopeV116" + }, + "automation_problem": { + "$ref": "#/$defs/AutomationRunProblemV1" + }, + "automation_run": { + "$ref": "#/$defs/AutomationRunResultV1" + }, + "automation_scheduler_status": { + "$ref": "#/$defs/AutomationSchedulerStatusV1", + "description": "Served identically by `GET /api/automation/scheduler/status` and by the\n`pause`/`resume` controls, which re-read rather than acknowledge." + }, + "code_index_freshness": { + "$ref": "#/$defs/CodeIndexFreshnessPayloadV1" + }, + "costs": { + "$ref": "#/$defs/CostsReadModelV1" + }, + "delivery_overview": { + "$ref": "#/$defs/DeliveryOverviewV1" + }, + "doctor_findings": { + "$ref": "#/$defs/DoctorFindingsPayloadV1" + }, + "envelope": { + "$ref": "#/$defs/DashboardEnvelopeV1" + }, + "explorer_query_run": { + "$ref": "#/$defs/ExplorerQueryRunV1" + }, + "explorer_read_context": { + "$ref": "#/$defs/DashboardEnvelopeV13" + }, + "explorer_session_size": { + "$ref": "#/$defs/DashboardEnvelopeV12" + }, + "fact_store_curate_request": { + "$ref": "#/$defs/FactStoreCurateRequestV1" + }, + "feedback_status": { + "$ref": "#/$defs/DashboardEnvelopeV127" + }, + "graph_call_chain": { + "$ref": "#/$defs/StructureReadV1" + }, + "graph_fact_matches": { + "$ref": "#/$defs/StructureReadV13" + }, + "graph_neighbors": { + "$ref": "#/$defs/DashboardEnvelopeV19" + }, + "graph_node": { + "$ref": "#/$defs/DashboardEnvelopeV18" + }, + "graph_node_sessions": { + "$ref": "#/$defs/StructureReadV15" + }, + "graph_overview": { + "$ref": "#/$defs/DashboardEnvelopeV16" + }, + "graph_path": { + "$ref": "#/$defs/DashboardEnvelopeV111" + }, + "graph_search": { + "$ref": "#/$defs/DashboardEnvelopeV17" + }, + "graph_strata": { + "$ref": "#/$defs/StructureReadV12" + }, + "graph_subgraph": { + "$ref": "#/$defs/DashboardEnvelopeV110" + }, + "graph_test_map": { + "$ref": "#/$defs/StructureReadV14" + }, + "handoff_list_task_handoffs": { + "$ref": "#/$defs/ListTaskHandoffsResultV1" + }, + "handoff_list_task_handoffs_request": { + "$ref": "#/$defs/ListTaskHandoffsRequestV1", + "description": "The handoff-token frontier. Contracted here because the Agents surface\nreads it directly off the mounted application route; the two `open_*`\noperations stay uncontracted for the dashboard because it never redeems\na bearer and must not grow a client that could." + }, + "lcm_overview": { + "$ref": "#/$defs/DashboardEnvelopeV125" + }, + "lcm_search": { + "$ref": "#/$defs/DashboardEnvelopeV126" + }, + "lcm_session": { + "$ref": "#/$defs/DashboardEnvelopeV123" + }, + "lcm_timeline": { + "$ref": "#/$defs/DashboardEnvelopeV124" + }, + "loom_temporal": { + "$ref": "#/$defs/LoomTemporalPayloadV1" + }, + "memory_fact_detail": { + "$ref": "#/$defs/DashboardEnvelopeV114" + }, + "memory_overview": { + "$ref": "#/$defs/DashboardEnvelopeV112" + }, + "memory_status": { + "$ref": "#/$defs/DashboardEnvelopeV113" + }, + "multi_root_capability": { + "$ref": "#/$defs/MultiRootCapabilityV1" + }, + "multi_root_execute_request": { + "$ref": "#/$defs/MultiRootExecuteRequestV1" + }, + "multi_root_query": { + "$ref": "#/$defs/MultiRootQueryReadModelV1" + }, + "multi_root_scope_set": { + "anyOf": [ + { + "$ref": "#/$defs/AuthorizedScopeSet" + }, + { + "type": "null" + } + ] + }, + "multi_root_scope_set_cas_request": { + "$ref": "#/$defs/MultiRootScopeSetCasRequestV1" + }, + "multi_root_scope_set_cas_result": { + "$ref": "#/$defs/MultiRootScopeSetCasResultV1" + }, + "multi_root_scope_set_read_request": { + "$ref": "#/$defs/MultiRootScopeSetReadRequestV1" + }, + "observatory": { + "$ref": "#/$defs/ObservatoryReadModelV1" + }, + "project_context": { + "$ref": "#/$defs/DashboardEnvelopeV15" + }, + "projects": { + "$ref": "#/$defs/DashboardEnvelopeV14" + }, + "remote_operational_status": { + "$ref": "#/$defs/RemoteOperationalStatusPayloadV1" + }, + "savings_overview": { + "$ref": "#/$defs/DashboardEnvelopeV122" + }, + "savings_sessions": { + "$ref": "#/$defs/SavingsSessionsPayloadV1" + }, + "settings": { + "$ref": "#/$defs/SettingsPayloadV1" + }, + "settings_code_index_worker_patch": { + "$ref": "#/$defs/CodeIndexWorkerSettingsPatch" + }, + "settings_project_patch": { + "$ref": "#/$defs/ProjectSettingsPatch" + }, + "settings_user_patch": { + "$ref": "#/$defs/UserSettingsPatch" + }, + "storage_findings": { + "$ref": "#/$defs/StorageFindingsPayloadV1" + }, + "storage_telemetry": { + "$ref": "#/$defs/StorageTelemetryPayloadV1" + }, + "work_admit_execution_request": { + "$ref": "#/$defs/AdmitWorkExecutionRequestV1" + }, + "work_admit_placement_command": { + "$ref": "#/$defs/AdmitWorkPlacementCommand" + }, + "work_admit_synthesis_command": { + "$ref": "#/$defs/AdmitWorkSynthesisCommand" + }, + "work_artifact_hydration": { + "$ref": "#/$defs/WorkArtifactHydrationV1" + }, + "work_artifact_hydration_request": { + "$ref": "#/$defs/WorkArtifactHydrationRequestV1" + }, + "work_attempt": { + "$ref": "#/$defs/WorkAttemptV1" + }, + "work_attempt_list": { + "$ref": "#/$defs/WorkAttemptListV1" + }, + "work_attempt_list_request": { + "$ref": "#/$defs/WorkAttemptListRequestV1" + }, + "work_attempt_recovery_report": { + "$ref": "#/$defs/WorkAttemptRecoveryReportV1" + }, + "work_attempt_status_request": { + "$ref": "#/$defs/WorkAttemptStatusRequestV1" + }, + "work_cancel_attempt_command": { + "$ref": "#/$defs/CancelWorkAttemptCommand" + }, + "work_create_task_request": { + "$ref": "#/$defs/CreateWorkTaskRequestV1" + }, + "work_decide_proposal_request": { + "$ref": "#/$defs/DecideWorkProposalRequestV1" + }, + "work_duplicate_adjudication_command": { + "$ref": "#/$defs/WorkDuplicateAdjudicationCommandV1" + }, + "work_duplicate_adjudication_result": { + "$ref": "#/$defs/WorkDuplicateAdjudicationAppendOutcomeV1" + }, + "work_evidence_retrieval": { + "$ref": "#/$defs/WorkEvidenceRetrievalV1" + }, + "work_evidence_retrieve_request": { + "$ref": "#/$defs/WorkEvidenceRetrieveRequestV1" + }, + "work_execution_history": { + "$ref": "#/$defs/WorkExecutionHistoryV1" + }, + "work_experience": { + "$ref": "#/$defs/WorkExperienceV1" + }, + "work_experience_request": { + "$ref": "#/$defs/WorkExperienceRequestV1" + }, + "work_generate_proposal_request": { + "$ref": "#/$defs/GenerateProposalRequest" + }, + "work_generated_proposal": { + "$ref": "#/$defs/GeneratedWorkProposal" + }, + "work_graph_read": { + "$ref": "#/$defs/WorkGraphReadV1" + }, + "work_graph_read_request": { + "$ref": "#/$defs/WorkGraphReadRequestV1" + }, + "work_leak_adjudication_command": { + "$ref": "#/$defs/AdjudicateWorkLeakCommandV1" + }, + "work_leak_adjudication_result": { + "$ref": "#/$defs/WorkLeakAdjudicationOutcomeV1" + }, + "work_pause_run_command": { + "$ref": "#/$defs/PauseWorkRunCommand" + }, + "work_placement": { + "$ref": "#/$defs/WorkPlacementV1" + }, + "work_placement_preflight": { + "$ref": "#/$defs/WorkPlacementPreflightV1" + }, + "work_placement_preflight_request": { + "$ref": "#/$defs/WorkPlacementPreflightRequestV1" + }, + "work_placement_reading": { + "$ref": "#/$defs/WorkPlacementReadingV1" + }, + "work_placement_status_request": { + "$ref": "#/$defs/WorkPlacementStatusRequestV1" + }, + "work_prepare_duplicate_adjudication_request": { + "$ref": "#/$defs/PrepareWorkDuplicateAdjudicationRequestV1" + }, + "work_prepare_product_mutation_request": { + "$ref": "#/$defs/PrepareWorkProductMutationRequestV1" + }, + "work_product_mutation_receipt": { + "$ref": "#/$defs/WorkProductMutationReceiptV1" + }, + "work_product_mutation_request": { + "$ref": "#/$defs/WorkProductMutationRequestV1" + }, + "work_proposal_comparison": { + "$ref": "#/$defs/WorkProposalComparisonV1" + }, + "work_proposal_comparison_request": { + "$ref": "#/$defs/WorkProposalComparisonRequestV1" + }, + "work_release_placement_command": { + "$ref": "#/$defs/ReleaseWorkPlacementCommand" + }, + "work_resume_attempts_command": { + "$ref": "#/$defs/ResumeWorkAttemptsCommand" + }, + "work_resume_run_command": { + "$ref": "#/$defs/ResumeWorkRunCommand" + }, + "work_retry_attempt_command": { + "$ref": "#/$defs/RetryWorkAttemptCommandV1" + }, + "work_retry_attempt_outcome": { + "$ref": "#/$defs/WorkRetryAttemptOutcomeV1" + }, + "work_run_control": { + "$ref": "#/$defs/WorkRunControlV1" + }, + "work_run_control_reading": { + "$ref": "#/$defs/WorkRunControlReadingV1" + }, + "work_run_control_request": { + "$ref": "#/$defs/WorkRunControlRequestV1" + }, + "work_start_attempt_command": { + "$ref": "#/$defs/StartWorkAttemptCommand" + }, + "work_synthesis_attempt": { + "$ref": "#/$defs/WorkSynthesisAttemptV1" + }, + "work_topology_metrics": { + "$ref": "#/$defs/ExecutionTopologyMetricsV1" + }, + "work_topology_metrics_request": { + "$ref": "#/$defs/ExecutionTopologyMetricsRequestV1" + }, + "work_topology_view": { + "$ref": "#/$defs/ExecutionTopologyViewV1" + }, + "work_topology_view_request": { + "$ref": "#/$defs/WorkTopologyViewRequestV1" + }, + "workflow_definition": { + "$ref": "#/$defs/WorkflowDefinition", + "description": "The workflow definition/run slice the Workflows workspace consumes.\nHandoffs and run control stay uncontracted: the browser never holds a\nbearer or mints fences, command ids, or provider admissions." + }, + "workflow_definition_activate_request": { + "$ref": "#/$defs/WorkflowDefinitionActivateRequest" + }, + "workflow_definition_disposition": { + "$ref": "#/$defs/WorkflowDefinitionDisposition" + }, + "workflow_definition_get_request": { + "$ref": "#/$defs/WorkflowDefinitionGetRequest" + }, + "workflow_definition_history_request": { + "$ref": "#/$defs/WorkflowDefinitionHistoryRequest" + }, + "workflow_definition_list_request": { + "$ref": "#/$defs/WorkflowDefinitionListRequest" + }, + "workflow_definition_reject_request": { + "$ref": "#/$defs/WorkflowDefinitionRejectRequest" + }, + "workflow_definition_retire_request": { + "$ref": "#/$defs/WorkflowDefinitionRetireRequest" + }, + "workflow_run_get_request": { + "$ref": "#/$defs/WorkflowRunGetRequest" + }, + "workflow_run_projection": { + "$ref": "#/$defs/WorkflowRunProjection" + } + }, + "required": [ + "envelope", + "storage_telemetry", + "storage_findings", + "doctor_findings", + "remote_operational_status", + "explorer_query_run", + "explorer_session_size", + "explorer_read_context", + "projects", + "project_context", + "graph_overview", + "graph_search", + "graph_node", + "graph_neighbors", + "graph_subgraph", + "graph_path", + "memory_overview", + "memory_status", + "memory_fact_detail", + "analytics_overview", + "analytics_usage", + "analytics_agents", + "analytics_subagent_tree", + "handoff_list_task_handoffs_request", + "handoff_list_task_handoffs", + "analytics_hints", + "analytics_underused", + "analytics_diagnostics", + "savings_overview", + "savings_sessions", + "lcm_session", + "lcm_timeline", + "lcm_overview", + "lcm_search", + "loom_temporal", + "delivery_overview", + "feedback_status", + "code_index_freshness", + "settings", + "settings_project_patch", + "settings_user_patch", + "settings_code_index_worker_patch", + "observatory", + "costs", + "graph_call_chain", + "graph_strata", + "graph_fact_matches", + "graph_test_map", + "graph_node_sessions", + "work_generate_proposal_request", + "work_generated_proposal", + "work_create_task_request", + "work_decide_proposal_request", + "work_admit_execution_request", + "work_start_attempt_command", + "work_admit_synthesis_command", + "work_synthesis_attempt", + "work_attempt_status_request", + "work_cancel_attempt_command", + "work_resume_attempts_command", + "work_retry_attempt_command", + "work_retry_attempt_outcome", + "work_attempt", + "work_attempt_recovery_report", + "work_attempt_list_request", + "work_attempt_list", + "work_execution_history", + "work_evidence_retrieve_request", + "work_evidence_retrieval", + "work_graph_read_request", + "work_graph_read", + "work_experience_request", + "work_experience", + "work_proposal_comparison_request", + "work_proposal_comparison", + "work_prepare_product_mutation_request", + "work_product_mutation_request", + "work_product_mutation_receipt", + "work_artifact_hydration_request", + "work_artifact_hydration", + "work_pause_run_command", + "work_resume_run_command", + "work_run_control", + "work_run_control_request", + "work_run_control_reading", + "work_placement_preflight_request", + "work_placement_preflight", + "work_admit_placement_command", + "work_release_placement_command", + "work_placement", + "work_placement_status_request", + "work_placement_reading", + "work_topology_view_request", + "work_topology_view", + "work_topology_metrics_request", + "work_topology_metrics", + "work_prepare_duplicate_adjudication_request", + "work_duplicate_adjudication_command", + "work_duplicate_adjudication_result", + "work_leak_adjudication_command", + "work_leak_adjudication_result", + "workflow_definition", + "workflow_definition_list_request", + "workflow_definition_get_request", + "workflow_definition_history_request", + "workflow_definition_activate_request", + "workflow_definition_retire_request", + "workflow_definition_reject_request", + "workflow_definition_disposition", + "workflow_run_get_request", + "workflow_run_projection", + "multi_root_capability", + "multi_root_scope_set_read_request", + "multi_root_scope_set", + "multi_root_scope_set_cas_request", + "multi_root_scope_set_cas_result", + "multi_root_execute_request", + "multi_root_query", + "automation_scheduler_status", + "fact_store_curate_request", + "automation_run", + "automation_problem" + ], + "schemaRevision": 1, + "title": "DashboardContractCatalogV1", + "type": "object" +} diff --git a/mockups/code-topography/NOTES.md b/mockups/code-topography/NOTES.md new file mode 100644 index 0000000000..d79af5ece3 --- /dev/null +++ b/mockups/code-topography/NOTES.md @@ -0,0 +1,113 @@ +# Design notes — code topography + +Per-sheet notes are printed on each sheet. This file holds what is common to all +four: the rules they obey, the data they are allowed to claim, and where they are +knowingly weak. + +## The direction + +The ask was for callers/callees traced **over the surrounding types**, a way to see +the structure of many files and many functions in a file, and "the topography of the +code base" — explicitly not boxes-and-arrows UML and not a route-between-two-points +diagram. + +Everything here follows from one decision: **treat structure as terrain and traffic +as flow.** A module is not a container with a border, it is a landform with an +elevation, an area, a shoreline and a contour density. A call is not an arrow, it is +water with a measured volume that runs downhill, converges, forks, crosses +boundaries, and enters and leaves types. Both are continuous, which is what lets a +reader take in a whole basin at a glance instead of tracing a path. + +The sheets share a vertical semantic on purpose: **height is dependency depth**. +Sheet 01 establishes it, sheet 04 carries it through unchanged, sheet 02 uses hop +distance instead and says so in its own legend rather than borrowing the authority +of the elevation axis. + +## House rules, and how each sheet keeps them + +**Every position, size, elevation and width encodes a stated measurement.** There +is no decorative mark on any of the four sheets. Blob roughness is fed the region's +own connectivity, node width is the symbol's `degree`, channel width is the call-site +count, band height is `end_line − start_line`, the rail is cyclomatic complexity, +the tint is churn. Where a value is derived rather than stored (sheet 04's x axis is +symbols ÷ drawn bodies), the sheet says "derived". + +**Captions say exactly what encodes what.** Every sheet carries a `channel → data` +list naming the channel, the underlying quantity, and whether the graph really holds +it. Legends state units and intervals like a real instrument plate: sheet 01 prints +its contour interval (0.50 internal edges per symbol, index contour every fifth +line) and its aggregation ratio; sheet 03 prints its vertical scale (1 px = 1.35 +source lines) and its datum; sheet 04 prints the aggregation ratio on the ruler +itself. + +**Absence is drawn, not cropped — one deliberate beat per sheet.** + +- 01 `hooks/src/vendor/` is on the map at its true position and true area with a + dashed shoreline and an empty interior: *no relief, 0 of 11 files parsed*. +- 02 a downstream channel ends in a dashed mouth at `dyn ContextSource` — full + width, then it stops: *channel ends, target not in graph*. +- 03 core 6 is banded to line 331 and the remaining 281 lines are drawn at full + length and hatched, with the reason and the consequence: *outgoing edges unknown, + not zero* — so no arc leaves it. +- 04 the axis is drawn to its floor and then hatched: *statement scale not held*. + The absence of finer resolution is itself a reading. + +**Dark and light through CSS variables.** `topography.css` transcribes the token +block from `dashboard/src/theme/tokens.css`, including the `[data-theme='light']` +mappings. Kind hues are not baked: `topography.js` registers one custom property +per kind with its dark value and a `:root[data-theme='light']` override with its +light value, so a theme flip re-tints every band with no observer and no second copy +of the arithmetic — the same pattern `kindColorVars` uses in the app. + +## Reuse of the existing language + +- **Kind hue** is `kindColor.ts` transcribed verbatim — the same hash, the same + chroma step, the same `186 + hash % 148` arc, the same two lightness levels. A + `struct` is the same hue on these sheets as on the Code workspace's connectivity + spine. Sheet 01 extends the arc to DSM cluster ids so a cluster keeps one hue + across all four sheets; sheet 02 extends it to the two flow directions. +- **The instrument chassis** is the one the console already has: engraved legends + with a hairline fill rule, monospaced tabular values, square corners, corner + brackets, `well / face / raised` as three planes, the graticule behind a field, + and the graph field's two-source lighting on every canvas. +- **The measured-field philosophy** comes from `brain/field.ts`: axes are + measurements, an offset inside a cell costs nothing while an offset across one + would be a lie, and an empty column is a reading. Sheet 01 spreads regions inside + a (cluster, depth) cell and never across one, for exactly that reason. +- **Magnitude through area, not radius** comes from `CodePage.tsx`'s + `markDiameter`: symbol counts go through a square root before they become a width. + +## Wire truth these were designed against + +- Nodes carry `{id, name, kind, file_path, start_line, end_line, degree}`; edges + carry kinds `calls` / `uses` / `imports` / `contains`, with per-edge call-site + counts. Every channel on every sheet reduces to one of these, or to one of the + derived metrics below. +- File-level dependency depth (Tarjan SCC condensation → longest path) and DSM + directory clustering exist. They are sheet 01's two axes. +- Per-symbol cyclomatic complexity exists. It is sheet 03's rail. +- Churn / hotspots (git) exist. They are sheet 01's tint. +- **Live SSE activity is project-granular today.** Sheet 01's weather strip is + therefore captioned as project-level, in the strip itself, with per-region weather + named as a future state. No other sheet claims liveness. +- **The subgraph endpoint serves roughly 80–250 nodes.** Sheet 01 declares itself an + aggregate (19 regions standing for 1 206 symbols) and prints the ratio. Sheets 02 + and 03 declare themselves direct renders and print their node counts to show they + are inside the band. Sheet 04 turns the cap into a labelled position on its ruler + — the point where bodies stop being masses and start being symbols. + +## Known weaknesses + +Each sheet prints its own open question. The three that cut across all four: + +1. **Correlated channels.** Area and contour density on sheet 01 both grow with + module size, so a reader can double-count. Coupling ratio (internal ÷ external + edges) would be less correlated and more actionable, and would cost the "how + crowded is it here" reading that makes the map legible. +2. **Two containments.** Modules and types are different nestings. Sheet 02 draws + both, as relief and as membranes, and they already overlap awkwardly at three + hops; a type whose methods span two files cannot be one convex membrane. +3. **Scale.** Sheet 02 is legible at depth 3 and its tributary count roughly cubes + by depth 5; sheet 03 fits six cores and the ask said "many files". Each sheet + names its degradation strategy as an open question rather than pretending it + scales. diff --git a/mockups/code-topography/README.md b/mockups/code-topography/README.md new file mode 100644 index 0000000000..d3f034e9a4 --- /dev/null +++ b/mockups/code-topography/README.md @@ -0,0 +1,95 @@ +# Code topography — concept mockups + +Four screenshot-ready HTML sheets explore a "code topography" direction: the +dashboard concept draws the codebase as **measured terrain and flow** rather than as +boxes and arrows, and callers/callees drawn as **structure** rather than as a route +between two points. + +These are **concepts, not production code.** Nothing here imports from +`dashboard/src/**`, nothing here is wired to an endpoint, and no file under +`dashboard/` was modified. Every page is a static HTML file that can be opened +straight off disk. + +| Sheet | File | What it is | +| --- | --- | --- | +| 01 CORTEX | [`cortex.html`](cortex.html) | The repository as continuous relief: modules as landforms with elevation (dependency depth), area (symbol mass), contour density (internal connectivity) and churn heat, with bundled call-flow channels and an instrument-plate map legend. | +| 02 TRACE | [`trace.html`](trace.html) | **Hero sheet.** One symbol as a watershed — caller tributaries converging, callee delta fanning, over a dimmed cortex underlay, with impl/trait membranes the flow enters, moves inside, and leaves. | +| 03 CORE SAMPLE | [`core-sample.html`](core-sample.html) | Six files as vertical strat columns against one shared line datum: symbols banded at true line span, complexity rails, internal call arcs in the gutter, external arcs across it. | +| 04 LENS | [`lens.html`](lens.html) | An optional fourth form, offered with an argument: the horizontal axis *is* the aggregation ratio, so repository / module / symbol scales sit on one sheet and zoom becomes a position instead of a transition. | + +Design notes live **on each page** (the three-column plate at the bottom: what +the form is, which real data backs each channel, and one open question). +[`NOTES.md`](NOTES.md) collects the cross-sheet rules and the wire-truth +constraints they were designed against. + +## Screenshots + +`shots/` holds each sheet at 1440 wide, in both themes, at 2× device scale: + +``` +shots/cortex-dark.png shots/cortex-light.png +shots/trace-dark.png shots/trace-light.png +shots/core-sample-dark.png shots/core-sample-light.png +shots/lens-dark.png shots/lens-light.png +``` + +## Re-shooting + +```sh +node shoot.mjs +``` + +Playwright is **not** a dependency of this folder — it is resolved from the +dashboard's `node_modules`, the only place in the repo that has it. The location +comes from an environment variable so no machine-local path is committed: + +- `TD_DASHBOARD_DIR` — directory containing the dashboard's `node_modules`. + **Default: `../../dashboard`, resolved relative to `shoot.mjs`** (i.e. the + repo's own `dashboard/`). + +Override it when the default has no install — for example in a **git worktree**, +where `dashboard/node_modules` does not exist and the main checkout's does: + +```sh +TD_DASHBOARD_DIR=/path/to/main-checkout/dashboard node shoot.mjs +``` + +The script launches headless Chromium, sets `data-theme` on the document, and +writes full-page PNGs. It starts no daemon and no dev server. All page geometry is +seeded and deterministic (no animation, no randomness), so re-running produces +byte-comparable output for the same source. + +## Opening a sheet by hand + +Open the `.html` file directly — `file://` works, no server needed. Append +`?theme=light` to load the light theme. The pages are classic scripts rather +than ES modules for exactly this reason: module scripts are blocked by CORS on +`file://`. + +## Layout + +``` +topography.css the token block (transcribed from dashboard/src/theme/tokens.css) + plus the shared chassis: spine, readbar, panels, plates, hatch +topography.js kindColor.ts arithmetic verbatim, theme-reactive kind paint, + and the relief primitives (seeded blobs, bundled splines, + tapered ribbons) all four sheets draw with +cortex.html sheet 01 + its fixture and renderer +trace.html sheet 02 + its fixture and renderer +core-sample.html sheet 03 + its fixture and renderer +lens.html sheet 04 + its fixture and renderer +shoot.mjs screenshot harness +shots/ 1440-wide PNGs, dark + light +NOTES.md cross-sheet design rules and wire-truth constraints +``` + +## Data + +All figures are **fake but honestly shaped**: they use real crate and file paths +from this repository (`crates/tracedecay-application/src/retrieval/service.rs` +and friends) and only quantities the graph actually holds or already computes — +node `kind` / `file_path` / `start_line` / `end_line` / `degree`, edge kinds +`calls` / `uses` / `imports` / `contains`, per-edge call-site counts, file-level +dependency depth, DSM directory clusters, per-symbol cyclomatic complexity, and +git churn. Where a sheet shows something the wire cannot support at the stated +granularity, the sheet says so on itself (see the weather strip on sheet 01). diff --git a/mockups/code-topography/core-sample.html b/mockups/code-topography/core-sample.html new file mode 100644 index 0000000000..676e07c996 --- /dev/null +++ b/mockups/code-topography/core-sample.html @@ -0,0 +1,404 @@ + + + + +CORE SAMPLE — six files as strat columns + + + + +
+ +
+ 03 +

Core sample

+ Six files pulled as vertical cores and stood side by side against one shared line datum. Every + band is a symbol at its true line span, so the reader is looking at the file's actual stratigraphy — not a + list of its contents. +
+ +
+
Cores6 files
+
Symbols banded54
+
Deepest core1 118 lines · handlers.rs
+
Vertical scale1 px = 1.35 source lines
+
Datumline 1 top rule, all cores
+
Internal arcs16 same-file calls
+
External arcs7 cross-file calls · 1 core partly unindexed
+
+ +
+ +
+
+
Band height
+ +
end_line − start_line. A band is exactly as tall as the symbol is long, at the same + scale in every core, so a 400-line function looks like a 400-line function next to a 20-line one.
+
+
+
Hue
+ +
kind, through kindColor.ts — the same arc the graph canvas and the + connectivity spine already use, so a struct is the same colour everywhere in the console.
+
+
+
Rail
+ +
Cyclomatic complexity on the five-step severity ramp: ≤2 info, ≤5 low, ≤9 medium, + ≤14 high, >14 critical. It is a rail and not a fill so complexity never competes with kind.
+
+
+
Arcs
+ +
Left gutter: calls inside the file. Across the gutters: calls that leave it. Width is + call sites. An arc's two ends are the two true line positions, which is why a file that calls itself + upward is visibly recursive.
+
+
+
Interburden
+ +
The unbanded stretches between symbols: imports, attributes, module docs, whitespace. + Drawn as empty core rather than closed up, because the distance between two functions is real.
+
+
+
Absence
+ +
Core 6 is banded to line 331 and no further. The rest of the file is drawn at full + length, hatched, and labelled with why. Its outgoing edges are unknown, not zero — so no arc leaves it.
+
+
+ +
+
+

What this is

+

The other half of the ask: not "how do the modules sit against each other" but + "what is the shape of the inside of a file, and of six files at once". A symbol list answers neither. + A core sample does both, because the vertical axis is the file itself.

+

Reading it: handlers.rs is a deep core with two enormous high-complexity + bands near the top and a long test seam at the bottom; decision.rs is short, tight and almost + all logic. That comparison takes about two seconds and is impossible in any tree view.

+
+
+

Channel → data

+
+
y
start_line. Real, on every node payload.
+
band height
end_line − start_line. Real.
+
hue
kind via kindColor.ts. Real.
+
rail
per-symbol cyclomatic complexity. Real; it is already computed.
+
arc width
call sites on that calls edge. Real.
+
column order
DSM cluster order — the same left-to-right order as sheet 01, not alphabetical.
+
hatch
lines present in the file with no node covering them. Real: the index knows what it parsed.
+
+

54 symbols and 23 edges — a single-file-set query, far below the + subgraph cap. No aggregation on this sheet either.

+
+
+

Open question

+

Six cores fit. Sixty do not, and "many files" was the actual ask. The honest options are + (a) keep six and make core selection the interesting problem — cores chosen by churn, by complexity, by being + on the traced path from sheet 02; or (b) let the core width collapse toward a hairline as the count grows, so + forty files become forty ruled strips with bands but no names — a fabric rather than a set of samples. + (b) is closer to "the topography of the codebase" and gives up the line numbers.

+

Also: nesting. A method inside an impl inside a module is three + containments, and this sheet flattens them to one band. Indenting the band by containment depth would show + it and would cost the shared left edge that makes the cores comparable.

+
+
+
+ + + + + diff --git a/mockups/code-topography/cortex.html b/mockups/code-topography/cortex.html new file mode 100644 index 0000000000..2b6be25230 --- /dev/null +++ b/mockups/code-topography/cortex.html @@ -0,0 +1,465 @@ + + + + +CORTEX — the codebase as relief + + + + +
+ +
+ 01 +

Cortex

+ The indexed repository as continuous relief. Elevation is dependency depth, area is symbol mass, + contour density is internal connectivity, tint is churn. Nothing here is a box and nothing is an arrow. +
+ +
+
Indexed symbols1 206
+
Module regions19 +1 unindexed
+
Depth strata0 – 6
+
Contour interval0.50 edges / symbol
+
Channels drawn6 of 214 cross-module
+
Aggregation19 regions ⟵ 1 206 symbols subgraph cap 250 nodes
+
+ +
+
+ + +
+ +
+
+

What this is

+

A topographic sheet of the repository. Modules are not boxes on a canvas — they are + landforms with an elevation, an area, a shoreline and a contour density, and the reader navigates them + the way they navigate a map: by shape, by height, by where the water runs.

+

The point of the form is that structure is continuous. A dependency graph drawn as + nodes and arrows makes a reader trace a route. A relief map lets them see the whole basin at once and notice + that retrieval/ is a broad, densely-ringed, hot massif sitting three strata above bedrock, before + they have read a single label.

+
+
+

Channel → data

+
+
y position
file-level dependency depth (Tarjan SCC → longest path). Real, already computed.
+
x position
DSM directory cluster. Real. Order within a cluster is by symbol mass, descending.
+
area
count of symbol nodes whose file_path is under the module. Real.
+
contours
internal calls+uses edges ÷ symbols. Real; edge kinds exist.
+
tint
git churn over 90 days. Real (hotspots).
+
channel width
√(call-site count on the bundled cross-module edge). Real; per-edge call-site counts exist.
+
cluster hue
the kind-hue arc from kindColor.ts, applied to the cluster id, so a cluster keeps one hue across all four sheets.
+
weather strip
project-level only. Live SSE activity is project-granular today, so the strip reports the whole project and is captioned as such. Per-region weather is a future state.
+
+
+
+

Open question

+

Contour density and area are computed on the same quantity family — a big module + tends to have more internal edges — so the two channels are correlated and a reader may double-count. Should + contours encode edges per symbol (as drawn: a shape measure, roughly area-independent) or coupling + ratio — internal edges ÷ external edges — which is what actually predicts whether a module can be moved? + The second is more useful and less correlated, but it is no longer a "how crowded is it here" reading, and the + map metaphor may not survive it.

+

Second-order: the strata are drawn evenly spaced, but dependency depth is an integer with + a wildly uneven population (stratum 3 holds a third of the repository). An area-preserving vertical scale would + be truer and much harder to read.

+
+
+
+ + + + + diff --git a/mockups/code-topography/lens.html b/mockups/code-topography/lens.html new file mode 100644 index 0000000000..22a0145aa7 --- /dev/null +++ b/mockups/code-topography/lens.html @@ -0,0 +1,402 @@ + + + + +LENS — zoom as a position, not a transition + + + + +
+ +
+ 04 +

Lens

+ A fourth form, offered as an argument. The horizontal axis is not space — it is + aggregation ratio. One sheet holds the repository, a crate's modules and a file's symbols at once, and + one call path is drawn through all three at each scale's own resolution. +
+ +
+
Scale span151 : 18 : 1 symbols per body
+
Axislog continuous, no steps
+
Thread1 412 call sites, conserved
+
Splits1 → 3 → 9
+
Bodies drawn8 + 10 + 11
+
Resolution floorsymbol statement scale is not held — drawn as the hatched margin
+
+ +
+ +
+
+
x axis
+ +
Symbols per drawn body, log scale, continuous. There are no zoom levels and no + transition: moving right is moving down the aggregation ratio, and the ratio is printed on the ruler.
+
+
+
Dissolve
+ +
Two representations overlap where their ratios overlap, rather than swapping at a + boundary. The overlap band is where a module is simultaneously a mass and a set of symbols — which is what + a reader needs to carry context across a scale change.
+
+
+
Thread
+ +
One call path, drawn at every scale at once. Width is call sites and is conserved + here, unlike sheet 02 — a split is a disaggregation of the same edge set, so 1 412 splits into 641 + 486 + + 285 and then into nine landing counts that also sum to 1 412.
+
+
+
Bodies
+ +
Left: crate masses, area = symbol mass, contoured as on sheet 01. Middle: module regions, + same rule. Right: symbol bands at true line span, as on sheet 03. Three sheets, one axis.
+
+
+
Floor
+ +
The axis stops where the index stops. Statement and expression granularity are not + held, so the continuum is drawn to its floor and then hatched rather than trailing off — the absence of + finer resolution is itself a reading.
+
+
+ +
+

Why this one should exist

+

Every code viewer that has ever been built makes zoom a transition: you click into a + crate, the screen replaces itself, and the thing you were looking at is gone. The cost is not the click — it is + that the reader must hold the previous frame in their head, and they cannot, which is why people say they "get + lost in the codebase". Sheets 01 and 03 each solve one scale beautifully and inherit exactly this problem the + moment you want both.

+

Lens makes zoom a position. The repository, the crate's modules and the file's + symbols are all on the sheet, adjacent, with one thread running through them, so the answer to "where is this in + the whole thing" is never a memory operation — it is a glance to the left. It is also the only one of the four + that is honest about aggregation as a continuum rather than as a cap: the subgraph endpoint's 80–250-node + ceiling stops being a limit you hit and becomes a readable position on the ruler, the point where bodies + stop being masses and start being symbols.

+

What it gives up: it is not a map. There is no "where things are" — the vertical axis is + the only free dimension left, and it has to carry dependency depth alone. If the reader's question is spatial + ("what is next to what"), sheet 01 is strictly better. Lens answers a different question — "what is this, at + every size" — and answers it in one frame.

+
+ +
+
+

What this is

+

A single continuous surface whose horizontal axis is the aggregation ratio. At the left + edge one drawn body stands for 151 symbols; at the right edge one drawn body is one symbol. Nothing + between them is a step.

+

The vertical axis is the one thing carried through unchanged from sheet 01: dependency + depth. A crate mass, a module region and a symbol band at the same height all sit at the same depth, which + is what makes the three representations comparable rather than merely adjacent.

+
+
+

Channel → data

+
+
x
symbols ÷ drawn bodies, log. Derived from real counts; not itself stored.
+
y
file-level dependency depth. Real, shared with sheet 01.
+
body area
symbol mass (left, middle) / line span (right). Real.
+
thread width
call sites, conserved across splits. Real.
+
contours
internal edges ÷ symbols, same interval as sheet 01. Real.
+
hatched margin
the granularity the index does not hold. Real — it is a property of the extractor.
+
+

Left and middle are aggregates; only the right third is a direct + render. The ruler says exactly where that changes, which is the point.

+
+
+

Open question

+

The thread is drawn conserved, but that is only true because this particular path + happens to disaggregate cleanly. A call path that re-enters the same module at two scales, or a cycle, cannot + be a single left-to-right thread — it would have to double back, and a doubling-back thread on an axis that + means "resolution" is meaningless. Does the sheet refuse such paths, or does it grow a second thread lane?

+

And the honest worry: three representations on one sheet is three grammars to learn. + Sheet 01 has one. Is a reader who has to learn all three actually faster than one who clicks?

+
+
+
+ + + + + diff --git a/mockups/code-topography/prototype/README.md b/mockups/code-topography/prototype/README.md new file mode 100644 index 0000000000..9e3ecbfbaa --- /dev/null +++ b/mockups/code-topography/prototype/README.md @@ -0,0 +1,191 @@ +# TRACE — round two, the live physics prototype + +Round one (`../trace.html`) settled the **spatial** language of the TRACE +surface. It could not answer the question the sensory contract actually asks: +does the structure *feel* like what it is. This folder is that answer — the same +26-node subgraph, the same visual grammar, with real spring physics under it, a +flight recorder on it, and a gate that can fail. + +Requirements this implements live in +`docs/plans/tracedecay-v2/11b-structure-visualization.md`, sections *Sensory +contract*, *Rendering strategy*, and *Topography round one — coordinator +verdict*. + +> This is still a **prototype**, not `dashboard/src`. But `sim.js` is written to +> production standard because it is the module that gets lifted: pure, seeded, +> DOM-free, deterministic, and covered by `sim.test.mjs`. The renderer and the +> page are throwaway scaffolding around it. + +## Files + +| File | What it is | +| --- | --- | +| `sim.js` | **Pure** simulation. Hand-rolled position-Verlet integrator, per-node velocity damping, anchor springs + channel springs. No DOM, no canvas, no clock, no `Math.random` at runtime. Exposes `step(dt)`, `applyDrag`, `release`, `settle`, and readback of positions / velocities / stretches / energy. | +| `dataset.js` | The subgraph, carried over unchanged from the static sheet. Also `buildSimSpec` (measurement → simulation vocabulary) and `hopRings` (the distance the sheet's rows actually encode). | +| `render.js` | Canvas2D only. Draws channels, membranes, ports, relief underlay, node sills, focus basin, labels, hover bloom. Computes no physics and reads no CSS — it is handed positions and a resolved palette. | +| `recorder.js` | Flight recorder: per-frame `{t, frameMs, workMs, positions}` plus timeline marks, exported as JSON. Also `displacements` and `settleFrame`, the shared definitions of "followed" and "settled". | +| `trace-live.html` | Composes the three. Hover / drag / release, reduced-motion mode, theme flip, live gauges, `window.__traceRecorder`, `window.__traceHarness`. | +| `sim.test.mjs` | 14 numeric tests, `node --test`, zero dependencies. | +| `qa-drive.mjs` | Playwright driver: real pointer gestures, recorded, asserted, screenshotted. | +| `shots/` | Keyframes from the last QA run. | + +## How to run + +### The tests + +```sh +node --test mockups/code-topography/prototype/ +``` + +No install. `node:test` and `node:assert/strict` only. + +### The page + +ES modules are blocked over `file://`, so the page needs an origin. The QA +script doubles as the static server: + +```sh +node mockups/code-topography/prototype/qa-drive.mjs --serve +# → serving http://127.0.0.1:/trace-live.html +``` + +Query parameters: `?theme=light`, `?seed=`, `?realtime=1` (wall-clock +accumulator instead of one fixed step per frame — for judging feel on a machine +that is not holding 60 Hz; determinism is knowingly given up there and nowhere +else). + +Interactions: **hover** a node to feel its weight, **drag** it to deform its +neighbourhood, **release** and watch it settle. The `Reduced motion` button (and +`prefers-reduced-motion`) switches to the one-shot settle. + +### The QA gate + +Playwright is not a dependency of this folder — it is resolved out of the +dashboard's `node_modules`, the only place in the repo that has it. The location +comes from an environment variable, so no machine-local path is committed: + +```sh +# default: ../../../dashboard relative to this script +node mockups/code-topography/prototype/qa-drive.mjs + +# or point it somewhere else +TD_DASHBOARD_DIR=/path/to/dashboard node mockups/code-topography/prototype/qa-drive.mjs +``` + +It opens the page, runs a scripted drag on the heaviest hub and on a leaf, +asserts on the recording, writes nine keyframes to `shots/`, and exits non-zero +if any check fails. + +## Tuning parameters + +Every knob, its default, and why that default. These are the numbers the owner's +feel feedback moves. + +| Parameter | Default | Meaning | Why this value | +| --- | --- | --- | --- | +| `anchorBase` | `90` | Anchor stiffness at unit mass, force/px. | Sets the absolute speed of the field. At 40 the 63-degree hub took ~2.5 s to settle, which reads as broken rather than heavy; 90 puts the whole mass range in 0.8–1.75 s. | +| `anchorMassExponent` | `0.5` | Anchor stiffness scales as `mass^this`. | The one deliberate compression on this page. At `0` every node keeps its own natural frequency and the hub settles ~4.6x slower than a leaf — true to the measurement, unusable as an interface. At `1` mass cancels out entirely and the weight channel dies. `0.5` gives settle time ∝ `mass^0.25`: a **2.19x** spread across this subgraph, monotone, felt, never stalling. | +| `edgeStiffnessScale` | `6` | Channel stiffness = `this × call sites`. | Puts the strongest channel (58 call sites → k 348) above typical anchor stiffness so coupled code moves as flesh, and the weakest (1 call site → k 6) far below it so loose code trails. Measured follow ratios 20.6 % vs 6.5 %. | +| `dampingRatio` | `0.72` | Damping ratio against each node's own anchor spring. | Underdamped, so there is one visible overshoot — flesh, not jelly. Measured swing sequence, mass-independent by construction: **100 % → 3.97–4.10 % → 0.16 % → 0.006 %**. At `1.0` the return is inert; below ~0.5 it rings. | +| `substep` | `1/240` | Integrator substep, seconds. | Four substeps per 60 Hz frame. Keeps the stiffest channel far from the stability limit and keeps post-release energy decay monotone to within 1e-6 relative. | +| `restSpeed` | `0.6` | px/s below which the gauge calls the field settled. | A speed the eye cannot see at this scale. The QA gate demands a much tighter `0.02` before taking a "before" reading, because a drifting field would credit the drag with the startup settle's motion. | +| `minMass` | `3` | Degree floor. | The unresolved node has degree 0. Zero mass is infinite acceleration; a floor keeps absence a body with inertia instead of a numerical singularity. | +| `jitter` | `6` | px of seeded startup displacement. | Enough that the field visibly breathes into place (75 frames) and the physics announces itself; small enough that no label collides on the way. Applied once, from the seed, never at runtime. | +| `bloomAttack` | `9.5` | Hover bloom approach rate at unit mass, 1/s, growing. | Leaf reaches half bloom in **0.13 s** (a flick), hub in **0.42 s** (arrives late and keeps arriving). | +| `bloomRelease` | `5.0` | …decaying. | Slower than attack, so a bloom lingers rather than snapping off. | +| `bloomMassExponent` | `0.42` | Bloom rate divided by `mass^this`. | Tuned so the latency spread is ~3.2x — clearly wider than the settle-time spread, because hover is where a reader first meets a node's weight. | + +Renderer constants, same idea: + +| Constant | Default | Why | +| --- | --- | --- | +| `TENSION_FLOOR_PX` | `5` | Below this a channel is at rest; drawing a rail for 1 px of stretch produced label noise across the whole field. | +| `TENSION_SATURATION_PX` | `60` | The reduced-motion tension rail saturates here. Drawn at true scale a 172 px stretch is a 23 px slab that swamps the picture. | +| gate `dragDistance` | `200` px | Long enough to deform, short enough to keep the target inside the field for both gestures. | + +## Measured baseline — QA run of 2026-07-25 + +Chromium headless, 1440x1500 viewport, `deviceScaleFactor: 1`, dark theme, +`anchorMassExponent 0.5`, all defaults above. 18/18 checks passed. + +### Gestures + +| | hub | leaf | +| --- | --- | --- | +| node | `focus` (`resolve_context`) | `ctest` (`contributes_catalog`) | +| mass (degree) | 63 | 4 | +| channels | 7 | 1 | +| channel under test | `hctx`, stiffness 204 (34 call sites) | `profile`, stiffness 18 (3 call sites) | +| gesture | 200 px along that channel's axis | 200 px along that channel's axis | +| dragged travel | 200.0 px | 203.3 px | +| **follow ratio** | **20.6 %** | **6.5 %** | +| next-largest mover | `hctx`, 41.2 px | `profile`, 13.2 px | +| worst node ≥3 channels away | `dispatch`, 4.08 px = **2.0 %** | `mount`, 5.84 px = **2.9 %** | +| **settle frames after release** | **166** (2.77 s) | **97** (1.62 s) | +| **step+paint p95** | **2.50 ms** | 2.60 ms | +| step+paint p50 / max | 2.30 / 7.00 ms | 2.30 / 5.30 ms | +| frame interval p50 / p95 | 16.70 / 17.80 ms | 16.70 / 19.10 ms | +| frames captured / dropped | 385 / 0 | 291 / 0 | + +The frame **interval** maxima in a take are ~300 ms. Those are the QA driver's +own screenshot pauses, which freeze `requestAnimationFrame`; they are why the +budget is asserted against `workMs` (the page's step+paint cost) and the interval +is only used to prove no frames were dropped. A page holding 60 Hz has an +interval of 16.7 ms *by definition*, so asserting "frame time p95 < 16.7 ms" +against the interval can never pass — the first run of this gate failed exactly +that way before the two clocks were separated. + +### Weight channel, isolated + +Frames for a body pulled 200 px to return inside 2 % of home (envelope +definition — see the note in `sim.test.mjs` about why a speed threshold is not +monotone here): + +| degree | 3 | 4 | 9 | 12 | 20 | 31 | 41 | 46 | 63 | +| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | +| settle frames | 48 | 52 | 64 | 69 | 78 | 87 | 94 | 97 | 105 | +| settle seconds | 0.80 | 0.87 | 1.07 | 1.15 | 1.30 | 1.45 | 1.57 | 1.62 | 1.75 | +| half-bloom seconds | 0.117 | 0.133 | 0.200 | 0.217 | 0.267 | 0.317 | 0.350 | 0.367 | 0.417 | + +Spread across the real subgraph: **2.19x** settle, **3.2x** hover latency. +Startup settle from seeded jitter: **75 frames** (1.25 s). + +## Keyframes in `shots/` + +| Shot | What it shows | +| --- | --- | +| `hub-1-rest.png` | The field at equilibrium. Identical to the static sheet, because every channel's rest length is its anchor-to-anchor distance. | +| `hub-2-mid-drag.png` | Hub at 50 % of the gesture. The `RetrievalService` membrane stretches with its members; `hctx` has been pulled in; loaded channels brighten. | +| `hub-3-release-plus-100ms.png` | 100 ms after release — the return, mid-flight. | +| `hub-4-settled.png` | Back home. | +| `leaf-1..4` | Same four beats on the 4-degree leaf. The contrast is the point: it flicks, and its loose partner barely notices. | +| `settled-light.png` | Light theme, settled. The renderer answers a theme flip from the token block, not from a second palette. | +| `reduced-motion-settled.png` | Reduced motion at rest — no rails, because nothing is under tension. | +| `reduced-motion-held.png` | Reduced motion with a node held. Tension is amber core rails with the stretch printed in px. | + +## What is deliberately NOT here + +- **Warmth** (churn recency) and **grain** (cyclomatic complexity). Both are real + channels in the sensory contract, but they need a time axis and a contour pass. + Mixing them in now would make it impossible to tell which mapping a reviewer is + reacting to. +- **The full cortex relief.** The underlay is simplified to two contours per + region. Shorelines still move with their members, so a crossing is still a + cross-module call — that was the part that had to be proven live. +- **Semantic zoom** between CORTEX / TRACE / CORE SAMPLE. That is the LENS + navigation model and a separate question. + +## Open questions for round three + +1. `anchorMassExponent` is the only place a measurement is compressed for + usability. Is `0.5` the right trade, or should the hub be allowed to feel as + slow as it measurably is (`0` → 4.6x spread, ~2.5 s hub settle)? +2. Release currently carries **no fling**: a pinned node has zero velocity, so + letting go drops the node rather than throwing it. Momentum on release would + feel better but encodes nothing measured. Feel channel or dishonest garnish? +3. The reduced-motion tension rail saturates at 60 px. A saturating scale means + two very different stretches can draw the same thickness. Print the figure + always (current behaviour) or switch the rail to a log scale? +4. Hover bloom is currently exclusive — one node at a time. Should a hover bloom + the neighbourhood in proportion to channel stiffness, so weight and coupling + are felt in the same gesture? diff --git a/mockups/code-topography/prototype/dataset.js b/mockups/code-topography/prototype/dataset.js new file mode 100644 index 0000000000..971428a599 --- /dev/null +++ b/mockups/code-topography/prototype/dataset.js @@ -0,0 +1,249 @@ +/** + * The TRACE subgraph, carried over unchanged from the static sheet + * (`mockups/code-topography/trace.html`) so round one and round two are the + * same picture and any difference the owner sees is MOTION, not data. + * + * Shape note for the eventual product wiring: every field here has a real + * source. `deg` is on the node payload; `calls` is the per-edge call-site count; + * `membranes` are `contains` edges from an impl/trait node to its methods; + * `regions` are the module rollups the cortex sheet aggregates. `unresolved` is + * the absence the extractor already records — a `calls` edge whose target did + * not resolve — and it is drawn, never dropped. + * + * Coordinates are the static sheet's 1440x1160 world. They are LAYOUT ANCHORS, + * not physics state: the simulation holds every node to its anchor, so the live + * field at rest is this sheet. + * + * @module dataset + */ + +/** Hop rings. Hop distance from the focus, NOT elevation — see the legend. */ +export const ROW = Object.freeze({ + u3: 118, + u2: 268, + u1: 420, + focus: 590, + d1: 760, + d2: 906, + d3: 1046, +}); + +export const WORLD = Object.freeze({ width: 1440, height: 1160 }); + +export const FOCUS_ID = 'focus'; + +/** @typedef {{id: string, name: string, kind: string, deg: number, mod: string|null, x0: number, y0: number, row: string, unresolved?: string, source?: string}} TraceNode */ + +/** @type {TraceNode[]} */ +export const NODES = [ + { id: 'dispatch', name: 'dispatch_tool_call', kind: 'method', deg: 31, mod: 'hooks/session', x0: 250, y0: ROW.u3, row: 'u3' }, + { id: 'replay', name: 'replay_transcript', kind: 'method', deg: 18, mod: 'hooks/session', x0: 500, y0: ROW.u3, row: 'u3' }, + { id: 'mount', name: 'mount_graph_plugin', kind: 'function', deg: 9, mod: 'api/plugins', x0: 790, y0: ROW.u3, row: 'u3' }, + { id: 'ctest', name: 'contributes_catalog', kind: 'test', deg: 4, mod: 'tests', x0: 1120, y0: ROW.u3, row: 'u3' }, + + { id: 'ctxroute', name: 'context_route', kind: 'method', deg: 24, mod: 'api/routes', x0: 300, y0: ROW.u2, row: 'u2' }, + { id: 'schroute', name: 'search_route', kind: 'method', deg: 17, mod: 'api/routes', x0: 545, y0: ROW.u2, row: 'u2' }, + { id: 'profile', name: 'build_profile', kind: 'function', deg: 22, mod: 'tool-catalog/snapshot', x0: 880, y0: ROW.u2, row: 'u2' }, + { id: 'bind', name: 'bind_surfaces', kind: 'method', deg: 15, mod: 'application/git', x0: 1180, y0: ROW.u2, row: 'u2', source: 'no callers ≤3 hops — public surface' }, + + { id: 'hctx', name: 'handle_context_request', kind: 'function', deg: 46, mod: 'application/handlers', x0: 405, y0: ROW.u1, row: 'u1' }, + { id: 'hsearch', name: 'handle_search_request', kind: 'function', deg: 28, mod: 'application/handlers', x0: 680, y0: ROW.u1, row: 'u1' }, + { id: 'lookup', name: 'lookup_callable', kind: 'method', deg: 19, mod: 'application/retrieval', x0: 1030, y0: ROW.u1, row: 'u1' }, + + { id: 'focus', name: 'resolve_context', kind: 'method', deg: 63, mod: 'application/retrieval', x0: 640, y0: ROW.focus, row: 'focus' }, + { id: 'sibgraph', name: 'symbol_graph_for', kind: 'method', deg: 21, mod: 'application/retrieval', x0: 855, y0: ROW.focus, row: 'focus' }, + { id: 'sibcall', name: 'hydrate_callable', kind: 'method', deg: 17, mod: 'application/retrieval', x0: 430, y0: ROW.focus, row: 'focus' }, + + { id: 'neighbors', name: 'neighbors_of', kind: 'function', deg: 26, mod: 'application/retrieval', x0: 300, y0: ROW.d1, row: 'd1' }, + { id: 'assemble', name: 'assemble_context', kind: 'method', deg: 14, mod: 'application/retrieval', x0: 560, y0: ROW.d1, row: 'd1' }, + { id: 'evaluate', name: 'evaluate_decision', kind: 'method', deg: 20, mod: 'policy/authorization', x0: 800, y0: ROW.d1, row: 'd1' }, + { id: 'fetchn', name: 'fetch_nodes', kind: 'method', deg: 33, mod: 'store/repository', x0: 1030, y0: ROW.d1, row: 'd1' }, + { id: 'fetche', name: 'fetch_edges', kind: 'method', deg: 29, mod: 'store/repository', x0: 1250, y0: ROW.d1, row: 'd1' }, + + { id: 'adjacency', name: 'adjacency_of', kind: 'function', deg: 38, mod: 'domain/graph', x0: 265, y0: ROW.d2, row: 'd2' }, + { id: 'nodeview', name: 'node_view', kind: 'struct', deg: 41, mod: 'domain/graph', x0: 545, y0: ROW.d2, row: 'd2' }, + { id: 'rules', name: 'rules_for', kind: 'function', deg: 12, mod: 'policy/configuration', x0: 800, y0: ROW.d2, row: 'd2' }, + { id: 'acquire', name: 'acquire', kind: 'method', deg: 22, mod: 'rusqlite/reader', x0: 1140, y0: ROW.d2, row: 'd2' }, + + { id: 'edgeindex', name: 'edge_index', kind: 'struct', deg: 30, mod: 'domain/graph', x0: 265, y0: ROW.d3, row: 'd3' }, + { id: 'checkout', name: 'checkout', kind: 'method', deg: 11, mod: 'rusqlite/reader', x0: 1140, y0: ROW.d3, row: 'd3' }, + { + id: 'unresolved', + name: 'dyn ContextSource', + kind: 'unresolved', + deg: 0, + mod: null, + x0: 545, + y0: ROW.d3, + row: 'd3', + unresolved: '1 call site · trait object, impl not in graph', + }, +]; + +/** + * Every channel carries its own call-site count. Volume is NOT conserved: a + * function reached 58 times may call the next one 34 times. + * + * `dir` is drawing direction only — `up` tributary, `down` delta, `in` a move + * between two methods of the same type, `lost` a channel whose target left the + * graph. The simulation treats all four as the same undirected spring. + * + * @type {Array<{a: string, b: string, calls: number, dir: 'up'|'down'|'in'|'lost'}>} + */ +export const EDGES = [ + { a: 'dispatch', b: 'ctxroute', calls: 41, dir: 'up' }, + { a: 'replay', b: 'schroute', calls: 18, dir: 'up' }, + { a: 'mount', b: 'ctxroute', calls: 6, dir: 'up' }, + { a: 'ctest', b: 'profile', calls: 3, dir: 'up' }, + { a: 'ctxroute', b: 'hctx', calls: 58, dir: 'up' }, + { a: 'schroute', b: 'hsearch', calls: 23, dir: 'up' }, + { a: 'profile', b: 'hctx', calls: 9, dir: 'up' }, + { a: 'bind', b: 'lookup', calls: 14, dir: 'up' }, + { a: 'hctx', b: 'focus', calls: 34, dir: 'up' }, + { a: 'hsearch', b: 'focus', calls: 12, dir: 'up' }, + { a: 'lookup', b: 'focus', calls: 7, dir: 'up' }, + { a: 'focus', b: 'sibgraph', calls: 9, dir: 'in' }, + { a: 'focus', b: 'sibcall', calls: 5, dir: 'in' }, + { a: 'sibgraph', b: 'neighbors', calls: 21, dir: 'down' }, + { a: 'focus', b: 'assemble', calls: 11, dir: 'down' }, + { a: 'focus', b: 'evaluate', calls: 8, dir: 'down' }, + { a: 'sibcall', b: 'fetchn', calls: 16, dir: 'down' }, + { a: 'fetchn', b: 'fetche', calls: 6, dir: 'in' }, + { a: 'neighbors', b: 'adjacency', calls: 21, dir: 'down' }, + { a: 'assemble', b: 'nodeview', calls: 11, dir: 'down' }, + { a: 'evaluate', b: 'rules', calls: 8, dir: 'down' }, + { a: 'fetche', b: 'acquire', calls: 16, dir: 'down' }, + { a: 'adjacency', b: 'edgeindex', calls: 14, dir: 'down' }, + { a: 'acquire', b: 'checkout', calls: 16, dir: 'down' }, + { a: 'nodeview', b: 'unresolved', calls: 1, dir: 'lost' }, +]; + +/** `contains` edges from an impl/trait node to its methods. */ +export const MEMBRANES = [ + { + label: 'impl GraphRoutes', + file: 'crates/tracedecay-api/src/routes/graph.rs', + of: ['ctxroute', 'schroute'], + kind: 'impl', + }, + { + label: 'impl RetrievalService', + file: 'crates/tracedecay-application/src/retrieval/service.rs', + of: ['sibcall', 'focus', 'sibgraph'], + kind: 'impl', + hero: true, + }, + { + label: 'impl SqliteRepository', + file: 'crates/tracedecay-store/src/repository/sqlite.rs', + of: ['fetchn', 'fetche'], + kind: 'impl', + }, + { + label: 'trait ContextSource', + file: 'crates/tracedecay-domain/src/graph/source.rs', + of: ['nodeview', 'unresolved'], + kind: 'trait', + }, +]; + +/** + * The dimmed relief underlay: the cortex sheet's regions filtered to the + * modules this trace lands in. Simplified for round two — two contours instead + * of the sheet's full interval stack — because the point of this page is motion, + * and a shoreline that moves with its members is the part that had to be proven. + */ +export const REGIONS = [ + { mod: 'hooks/session', sym: 92, of: ['dispatch', 'replay'] }, + { mod: 'api', sym: 179, of: ['mount', 'ctxroute', 'schroute'] }, + { mod: 'tool-catalog + tests', sym: 64, of: ['ctest', 'profile'] }, + { mod: 'application/handlers', sym: 156, of: ['hctx', 'hsearch'] }, + { mod: 'application/retrieval', sym: 214, of: ['lookup', 'focus', 'sibgraph', 'sibcall', 'neighbors', 'assemble'] }, + { mod: 'application/git', sym: 88, of: ['bind'] }, + { mod: 'policy', sym: 109, of: ['evaluate', 'rules'] }, + { mod: 'store + rusqlite', sym: 234, of: ['fetchn', 'fetche', 'acquire', 'checkout'] }, + { mod: 'domain/graph', sym: 148, of: ['adjacency', 'nodeview', 'edgeindex'] }, +]; + +/** + * Hop ring of every node: the distance the sheet's rows actually encode. + * + * The plain channel count does NOT reproduce the static sheet's rows, and + * chasing that discrepancy turned up the sheet's real rule rather than a bug in + * it: an `in` channel — a call that entered a type and moves between that + * type's methods — is a LATERAL move inside a membrane, not a step down the + * call graph, so it costs zero hops. Under that rule every one of the 26 nodes + * lands on exactly the row the sheet drew it on, `sim.test.mjs` asserts it, and + * the row caption ("hop distance from the focus, not elevation") stays true. + * + * Plain undirected channel distance is still what the QA gate uses to say what + * "far" means; that is `hopDistances` in `sim.js`, and the two are deliberately + * different questions. + * + * @returns {Map} id → hop ring + */ +export function hopRings(dataset = DATASET, sourceId = FOCUS_ID) { + const adjacency = new Map(dataset.nodes.map((node) => [node.id, []])); + for (const edge of dataset.edges) { + const cost = edge.dir === 'in' ? 0 : 1; + adjacency.get(edge.a).push({ other: edge.b, cost }); + adjacency.get(edge.b).push({ other: edge.a, cost }); + } + // 0–1 BFS: zero-cost channels go to the front of the queue, so a lateral move + // inside a membrane never advances the ring. + const distance = new Map([[sourceId, 0]]); + const deque = [sourceId]; + while (deque.length) { + const id = deque.shift(); + for (const { other, cost } of adjacency.get(id)) { + const candidate = distance.get(id) + cost; + if (distance.has(other) && distance.get(other) <= candidate) continue; + distance.set(other, candidate); + if (cost === 0) deque.unshift(other); + else deque.push(other); + } + } + return distance; +} + +/** Readbar figures, all carried from the static sheet. */ +export const READOUT = Object.freeze({ + focusName: 'RetrievalService::resolve_context', + callersUp: '12 nodes · 53 call sites', + calleesDown: '14 nodes · 61 call sites', + depthLimit: '3 ↑ / 3 ↓', + beyondLimit: '41 not drawn', + membranes: '4 types entered', + modules: '7 crossed · 9 shorelines', + focusStats: '53 in · 61 out · degree 63 · cyclomatic 14', + focusSite: 'retrieval/service.rs:212–318', +}); + +export const DATASET = Object.freeze({ + world: WORLD, + row: ROW, + focusId: FOCUS_ID, + nodes: NODES, + edges: EDGES, + membranes: MEMBRANES, + regions: REGIONS, + readout: READOUT, +}); + +/** + * Translate the dataset into the simulation's vocabulary: mass IS degree, + * stiffness IS the call-site count, and the anchor IS the layout position. + * No shaping, no normalisation that would launder the measurement — the + * simulation's own parameters do the scaling, in one place, where they can be + * read off a table. + */ +export function buildSimSpec(dataset = DATASET, { seed = 20260725, params } = {}) { + return { + seed, + params, + nodes: dataset.nodes.map((node) => ({ id: node.id, mass: node.deg, x0: node.x0, y0: node.y0 })), + springs: dataset.edges.map((edge) => ({ a: edge.a, b: edge.b, stiffness: edge.calls })), + }; +} + +export default DATASET; diff --git a/mockups/code-topography/prototype/qa-drive.mjs b/mockups/code-topography/prototype/qa-drive.mjs new file mode 100644 index 0000000000..5d3715c325 --- /dev/null +++ b/mockups/code-topography/prototype/qa-drive.mjs @@ -0,0 +1,474 @@ +/** + * QA driver for the TRACE live prototype. + * + * Round two is a claim about feel, so it needs a gate that can fail. This script + * opens the page in Chromium, performs REAL pointer gestures (synthesised mouse + * events, not a scripted call into the simulation — the harness can only be + * asked where a node is, never told to move one), records every frame with the + * page's own flight recorder, and asserts on the recording: + * + * · the dragged node led the field + * · its stiffest-coupled neighbour followed by at least a stated fraction + * · nodes three or more channels away stayed put + * · the field settled inside a stated number of frames after release + * · frame-time p95 stayed under one 60 Hz budget + * + * The same gestures also produce the keyframe screenshots. Playwright is not a + * dependency of this folder — it is resolved out of the dashboard's + * node_modules, the only place in the repo that has it, and the location comes + * from an environment variable so no machine-local path is ever committed: + * + * TD_DASHBOARD_DIR directory holding the dashboard's node_modules. + * Default: ../../../dashboard, relative to this script. + * + * node qa-drive.mjs + * TD_DASHBOARD_DIR=/elsewhere/dashboard node qa-drive.mjs + * node qa-drive.mjs --serve # just host the page for manual review + * + * ES modules are blocked over file://, so the page is always served over a + * loopback HTTP server on an ephemeral port, started and stopped by this script. + */ +import { createRequire } from 'node:module'; +import { fileURLToPath } from 'node:url'; +import http from 'node:http'; +import path from 'node:path'; +import fs from 'node:fs'; + +const here = path.dirname(fileURLToPath(import.meta.url)); +const shotsDir = path.join(here, 'shots'); + +/* ---- tunable gate thresholds -------------------------------------------- */ +/* Every one of these is a measured baseline, not an aspiration. The README + * carries the numbers this run produced; the owner's feel feedback moves the + * simulation parameters and these move with them. */ +const GATE = Object.freeze({ + /** Fraction of the dragged node's travel the stiffest neighbour must pick up. */ + stiffFollowFloor: 0.1, + /** Ceiling for a LOOSE neighbour, so "coupled" and "trailing" differ in kind. */ + looseFollowCeiling: 0.1, + /** + * Max travel for a node three or more channels away, as a fraction of the + * dragged node's travel. Expressed as a ratio rather than in px so the gate + * does not silently loosen when the gesture length is tuned. + */ + farDisplacementCeiling: 0.05, + /** Frames from release to a field where nothing moves more than 0.01 px. */ + settleFrameCeiling: 200, + /** One 60 Hz frame: the budget the page's own step+paint work must fit in. */ + workMsP95Ceiling: 16.7, + /** + * Ceiling on the frame INTERVAL. A page holding 60 Hz has an interval of + * 16.7 ms by definition, so this can only ever detect dropped frames — 25 ms + * is one and a half frames. + */ + frameIntervalP95Ceiling: 25, + /** Length of the drag gesture, in world px, along the tested channel's axis. */ + dragDistance: 200, + /** Keep the gesture target this far inside the field. */ + fieldMargin: 70, + /** Speed, in px/s, below which the field counts as genuinely at rest. */ + restSpeed: 0.02, +}); + +/* ---- playwright ---------------------------------------------------------- */ +const dashboardDir = path.resolve(here, process.env.TD_DASHBOARD_DIR ?? '../../../dashboard'); +function loadChromium() { + const requireFromDashboard = createRequire(path.join(dashboardDir, 'package.json')); + try { + return requireFromDashboard('playwright').chromium; + } catch (cause) { + throw new Error( + `Could not load playwright from ${dashboardDir}. ` + + 'Set TD_DASHBOARD_DIR to a directory whose node_modules contains playwright.', + { cause }, + ); + } +} + +/* ---- static server: ES modules need an origin --------------------------- */ +const MIME = { '.html': 'text/html', '.js': 'text/javascript', '.json': 'application/json', '.css': 'text/css' }; + +function startServer() { + const server = http.createServer((request, response) => { + const requested = decodeURIComponent(new URL(request.url, 'http://localhost').pathname); + const target = path.join(here, requested === '/' ? 'trace-live.html' : requested); + // Refuse anything outside the prototype folder, so a stray relative path in + // the page cannot turn this into a repo file server. + if (!target.startsWith(here + path.sep) && target !== here) { + response.writeHead(403).end('forbidden'); + return; + } + fs.readFile(target, (error, body) => { + if (error) { + response.writeHead(404).end('not found'); + return; + } + response.writeHead(200, { 'content-type': MIME[path.extname(target)] ?? 'application/octet-stream' }); + response.end(body); + }); + }); + return new Promise((resolve) => { + server.listen(0, '127.0.0.1', () => resolve({ server, port: server.address().port })); + }); +} + +/* ---- result collection: report every failure, not just the first -------- */ +const results = []; +function check(label, passed, detail) { + results.push({ label, passed, detail }); + console.log(` ${passed ? 'PASS' : 'FAIL'} ${label} — ${detail}`); +} +const measurements = {}; + +/* ---- take analysis (mirrors recorder.js helpers, run in Node) ---------- */ +function displacementsBetween(take, fromFrame, toFrame) { + const a = take.frames[fromFrame]; + const b = take.frames[toFrame]; + const out = new Map(); + take.nodeIds.forEach((id, i) => { + out.set( + id, + Math.hypot(b.positions[i * 2] - a.positions[i * 2], b.positions[i * 2 + 1] - a.positions[i * 2 + 1]), + ); + }); + return out; +} + +function settleFrame(take, fromFrame, restPx = 0.01) { + for (let i = Math.max(1, fromFrame + 1); i < take.frames.length; i += 1) { + const previous = take.frames[i - 1].positions; + const current = take.frames[i].positions; + let worst = 0; + for (let p = 0; p < current.length; p += 2) { + const step = Math.hypot(current[p] - previous[p], current[p + 1] - previous[p + 1]); + if (step > worst) worst = step; + } + if (worst < restPx) return i; + } + return -1; +} + +function markFrame(take, label) { + const mark = take.marks.find((entry) => entry.label === label); + return mark ? Math.min(mark.frame, take.frames.length - 1) : -1; +} + +/* ---- the run ------------------------------------------------------------ */ +async function waitForRest(page, restSpeed = GATE.restSpeed) { + await page.waitForFunction( + (speed) => window.__traceHarness?.ready && window.__traceHarness.isSettled(speed), + restSpeed, + { timeout: 20000 }, + ); +} + +async function shoot(page, name) { + const file = path.join(shotsDir, `${name}.png`); + await page.locator('.hero').screenshot({ path: file }); + console.log(` shot shots/${name}.png`); + return file; +} + +/** + * One gesture: grab a node, drag it across the field, hold until the + * neighbourhood reaches its deformed equilibrium, release, watch it settle. + * Keyframes at rest / mid-drag / release+100 ms / settled. + */ +async function runGesture(page, { name, nodeId, expectFollow }) { + console.log(`\n[${name}] node ${nodeId}`); + await page.evaluate(() => window.__traceHarness.reset()); + await waitForRest(page); + + await page.evaluate(() => window.__traceRecorder.start('rest')); + // A few frames of genuine rest, so "before" is a real reading. + await page.waitForTimeout(120); + await shoot(page, `${name}-1-rest`); + + /** + * The gesture runs ALONG the axis of the channel under test. + * + * This is not a convenience: dragging a hub across a channel barely changes + * that channel's length, so the first run of this gate measured `focus` + * pulling its stiffest neighbour `hctx` (k=204) only 2.5 % while the much + * weaker `hsearch` (k=72) came along 11 % — purely because `hsearch` happened + * to lie along the drag direction. A follow ratio read off an arbitrary + * direction is a statement about layout geometry, not about coupling. Aiming + * down the channel makes the reading a measurement of stiffness, and applying + * the same rule to both gestures makes hub and leaf comparable. + */ + const plan = await page.evaluate( + ([id, distance, margin]) => { + const h = window.__traceHarness; + const world = h.world(); + const node = h.worldOf(id); + const stiffest = h.stiffestNeighbour(id); + const other = h.worldOf(stiffest.other); + const length = Math.hypot(node.x - other.x, node.y - other.y) || 1; + const axis = { x: (node.x - other.x) / length, y: (node.y - other.y) / length }; + const inside = (point) => + point.x > margin && + point.y > margin && + point.x < world.width - margin && + point.y < world.height - margin; + let reach = distance; + let target = null; + let direction = 'away'; + while (reach > 40 && target === null) { + const away = { x: node.x + axis.x * reach, y: node.y + axis.y * reach }; + const toward = { x: node.x - axis.x * reach, y: node.y - axis.y * reach }; + if (inside(away)) { + target = away; + direction = 'away'; + } else if (inside(toward)) { + target = toward; + direction = 'toward'; + } else { + reach -= 20; + } + } + return { + mass: h.massOf(id), + channels: h.springsOf(id).length, + hops: h.hopsFrom(id), + stiffest, + channelLength: length, + reach, + direction, + from: h.screenOf(id), + to: h.clientFromWorld(target.x, target.y), + }; + }, + [nodeId, GATE.dragDistance, GATE.fieldMargin], + ); + const facts = plan; + console.log( + ` gesture: ${plan.reach.toFixed(0)} px ${plan.direction} from ${plan.stiffest.other} ` + + `along a ${plan.channelLength.toFixed(0)} px channel of stiffness ${plan.stiffest.stiffness}`, + ); + + const path0 = { from: plan.from, to: plan.to }; + await page.mouse.move(path0.from.x, path0.from.y); + await page.waitForTimeout(80); + await page.mouse.down(); + const STEPS = 20; + for (let i = 1; i <= STEPS; i += 1) { + const t = i / STEPS; + await page.mouse.move( + path0.from.x + (path0.to.x - path0.from.x) * t, + path0.from.y + (path0.to.y - path0.from.y) * t, + ); + await page.waitForTimeout(16); + if (i === Math.round(STEPS / 2)) await shoot(page, `${name}-2-mid-drag`); + } + // Hold: the follow ratio is a coupling measurement, so it is read at the + // deformed equilibrium rather than off the transient. + await page.waitForTimeout(700); + await page.evaluate(() => window.__traceRecorder.mark('held')); + await page.waitForTimeout(40); + + await page.mouse.up(); + await page.waitForTimeout(100); + await shoot(page, `${name}-3-release-plus-100ms`); + + await waitForRest(page); + await page.waitForTimeout(60); + await shoot(page, `${name}-4-settled`); + const take = await page.evaluate(() => window.__traceRecorder.stop()); + + /* ---- assertions on the recording ------------------------------------- */ + const restFrame = markFrame(take, 'rest'); + const heldFrame = markFrame(take, 'held'); + const releaseFrame = markFrame(take, 'release'); + check( + `[${name}] recording has rest / held / release marks`, + restFrame >= 0 && heldFrame > restFrame && releaseFrame > heldFrame, + `frames ${restFrame} / ${heldFrame} / ${releaseFrame} of ${take.frameCount}`, + ); + + const moved = displacementsBetween(take, restFrame, heldFrame); + const dragged = moved.get(nodeId); + const others = [...moved].filter(([id]) => id !== nodeId); + const runnerUp = others.reduce((best, entry) => (entry[1] > best[1] ? entry : best), ['—', 0]); + check( + `[${name}] the dragged node led the field`, + dragged > runnerUp[1], + `${nodeId} moved ${dragged.toFixed(1)} px; next was ${runnerUp[0]} at ${runnerUp[1].toFixed(1)} px`, + ); + + const neighbour = facts.stiffest.other; + const followRatio = moved.get(neighbour) / dragged; + if (expectFollow === 'coupled') { + check( + `[${name}] stiffest neighbour followed as flesh`, + followRatio >= GATE.stiffFollowFloor, + `${neighbour} (k=${facts.stiffest.stiffness}) followed ${(followRatio * 100).toFixed(1)} % ≥ ${GATE.stiffFollowFloor * 100} %`, + ); + } else { + check( + `[${name}] loose neighbour trailed instead of following`, + followRatio < GATE.looseFollowCeiling, + `${neighbour} (k=${facts.stiffest.stiffness}) followed ${(followRatio * 100).toFixed(1)} % < ${GATE.looseFollowCeiling * 100} %`, + ); + } + + const far = [...moved].filter(([id]) => (facts.hops[id] ?? 99) >= 3); + const worstFar = far.reduce((best, entry) => (entry[1] > best[1] ? entry : best), ['—', 0]); + const worstFarRatio = worstFar[1] / dragged; + check( + `[${name}] nodes ≥3 channels away stayed put`, + far.length > 0 && worstFarRatio < GATE.farDisplacementCeiling, + `${far.length} far nodes; worst ${worstFar[0]} at ${worstFar[1].toFixed(2)} px ` + + `= ${(worstFarRatio * 100).toFixed(1)} % of the drag < ${GATE.farDisplacementCeiling * 100} %`, + ); + + const settledAt = settleFrame(take, releaseFrame); + const settleFrames = settledAt < 0 ? -1 : settledAt - releaseFrame; + check( + `[${name}] settled after release`, + settleFrames >= 0 && settleFrames <= GATE.settleFrameCeiling, + `${settleFrames} frames ≤ ${GATE.settleFrameCeiling}`, + ); + + check( + `[${name}] per-frame work p95 inside the 60 Hz budget`, + take.workMs.p95 !== null && take.workMs.p95 < GATE.workMsP95Ceiling, + `step+paint p50 ${take.workMs.p50?.toFixed(2)} ms, p95 ${take.workMs.p95?.toFixed(2)} ms, max ${take.workMs.max?.toFixed(2)} ms`, + ); + + check( + `[${name}] frame interval p95 shows no dropped frames`, + take.frameMs.p95 !== null && take.frameMs.p95 < GATE.frameIntervalP95Ceiling, + `interval p50 ${take.frameMs.p50?.toFixed(2)} ms, p95 ${take.frameMs.p95?.toFixed(2)} ms ` + + `(max ${take.frameMs.max?.toFixed(0)} ms — the screenshot pauses this driver itself causes)`, + ); + + check( + `[${name}] no frames dropped from the take`, + take.droppedFrames === 0, + `${take.frameCount} frames captured, ${take.droppedFrames} dropped`, + ); + + measurements[name] = { + nodeId, + mass: facts.mass, + channels: facts.channels, + stiffestNeighbour: neighbour, + stiffestStiffness: facts.stiffest.stiffness, + draggedTravelPx: Number(dragged.toFixed(2)), + followRatio: Number(followRatio.toFixed(4)), + runnerUp: { id: runnerUp[0], px: Number(runnerUp[1].toFixed(2)) }, + worstFar: { + id: worstFar[0], + px: Number(worstFar[1].toFixed(3)), + ratio: Number(worstFarRatio.toFixed(4)), + count: far.length, + }, + settleFrames, + gesture: { reachPx: Math.round(plan.reach), direction: plan.direction, channelLengthPx: Math.round(plan.channelLength) }, + workMs: take.workMs, + frameIntervalMs: take.frameMs, + frameCount: take.frameCount, + }; +} + +async function main() { + const serveOnly = process.argv.includes('--serve'); + const { server, port } = await startServer(); + const url = `http://127.0.0.1:${port}/trace-live.html`; + + if (serveOnly) { + console.log(`serving ${url}\npress ctrl-c to stop`); + return; + } + + fs.mkdirSync(shotsDir, { recursive: true }); + const chromium = loadChromium(); + const browser = await chromium.launch(); + // Tall enough that the whole 1440x1000 field is on screen without scrolling: + // a scroll mid-gesture would move the client coordinates under the pointer. + const context = await browser.newContext({ + viewport: { width: 1440, height: 1500 }, + deviceScaleFactor: 1, + reducedMotion: 'no-preference', + colorScheme: 'dark', + }); + const page = await context.newPage(); + const problems = []; + page.on('pageerror', (error) => problems.push(String(error))); + page.on('console', (message) => { + if (message.type() === 'error') problems.push(message.text()); + }); + + try { + await page.goto(url, { waitUntil: 'load' }); + await waitForRest(page); + + const identity = await page.evaluate(() => ({ + heaviest: window.__traceHarness.heaviestId(), + leaf: window.__traceHarness.leafId(), + params: window.__traceHarness.params(), + })); + console.log(`heaviest hub: ${identity.heaviest} leaf: ${identity.leaf}`); + measurements.params = identity.params; + + await runGesture(page, { name: 'hub', nodeId: identity.heaviest, expectFollow: 'coupled' }); + await runGesture(page, { name: 'leaf', nodeId: identity.leaf, expectFollow: 'loose' }); + + // One light-theme settled shot: the renderer must answer a theme flip from + // the token block, not from a second palette. + console.log('\n[light] settled, light theme'); + await page.evaluate(() => { + window.__traceHarness.reset(); + window.__traceHarness.setTheme('light'); + }); + await waitForRest(page); + await page.waitForTimeout(120); + await shoot(page, 'settled-light'); + await page.evaluate(() => window.__traceHarness.setTheme('dark')); + + // Reduced motion: the same field, drawn once, with tension carried by the + // core rails instead of by movement. + console.log('\n[reduced-motion] one-shot settle, no animation'); + const reduced = await page.evaluate(() => { + const h = window.__traceHarness; + h.reset(); + h.setReducedMotion(true); + return { settled: h.isSettled(), frame: h.frameIndex(), reduced: h.reducedMotion() }; + }); + check( + '[reduced-motion] one-shot settle reaches rest with no animation frames', + reduced.reduced && reduced.settled, + `settled=${reduced.settled} after ${reduced.frame} integrator frames, animation off`, + ); + await shoot(page, 'reduced-motion-settled'); + const heldRails = await page.evaluate(async () => { + const h = window.__traceHarness; + const id = h.heaviestId(); + const world = h.worldOf(id); + const from = h.screenOf(id); + return { id, from, to: h.clientFromWorld(world.x - 180, world.y + 90) }; + }); + await page.mouse.move(heldRails.from.x, heldRails.from.y); + await page.mouse.down(); + await page.mouse.move(heldRails.to.x, heldRails.to.y); + await page.waitForTimeout(120); + await shoot(page, 'reduced-motion-held'); + await page.mouse.up(); + await page.evaluate(() => window.__traceHarness.setReducedMotion(false)); + + check('page raised no console or runtime errors', problems.length === 0, problems.join(' | ') || 'clean'); + } finally { + await browser.close(); + server.close(); + } + + console.log(`\n${JSON.stringify(measurements, null, 2)}`); + const failed = results.filter((result) => !result.passed); + console.log(`\n${results.length - failed.length}/${results.length} checks passed`); + if (failed.length) { + console.error(`FAILED:\n${failed.map((result) => ` ${result.label} — ${result.detail}`).join('\n')}`); + process.exitCode = 1; + } +} + +await main(); diff --git a/mockups/code-topography/prototype/recorder.js b/mockups/code-topography/prototype/recorder.js new file mode 100644 index 0000000000..37bffd6d36 --- /dev/null +++ b/mockups/code-topography/prototype/recorder.js @@ -0,0 +1,185 @@ +/** + * Flight recorder for the TRACE prototype. + * + * Round two exists to be measured, not admired. Every claim about feel in the + * report — settle frames, follow ratios, frame-time p95 — comes out of a + * recording made by this module, so a number in the README can be traced to a + * captured frame rather than to an impression. + * + * The recorder is the only place in the prototype that reads a clock, and it + * reads it for MEASUREMENT, never to drive the simulation: `frameMs` is the + * wall-clock cost of producing a frame, while the simulation always advances by + * its own fixed step. That separation is what makes a recording replayable. + * + * @module recorder + */ + +/** + * @param {object} options + * @param {() => Float64Array} options.getPositions flat [x,y,…] in node order + * @param {string[]} options.nodeIds readback order, recorded once + * @param {() => number} [options.now] injectable clock, ms + * @param {number} [options.maxFrames] ring cap, drops nothing silently + */ +export function createRecorder({ getPositions, nodeIds, now, maxFrames = 20000 }) { + if (typeof getPositions !== 'function') throw new TypeError('getPositions must be a function'); + if (!Array.isArray(nodeIds)) throw new TypeError('nodeIds must be an array'); + const clock = now ?? (() => (typeof performance === 'undefined' ? 0 : performance.now())); + + let recording = false; + let startedAt = 0; + let lastAt = 0; + let dropped = 0; + /** @type {Array<{t: number, frameMs: number, positions: number[]}>} */ + let frames = []; + /** @type {Array<{t: number, frame: number, label: string, detail?: unknown}>} */ + let marks = []; + + return { + get recording() { + return recording; + }, + get frameCount() { + return frames.length; + }, + + /** Begin a take. Discards any previous one. */ + start(label = 'start') { + frames = []; + marks = []; + dropped = 0; + recording = true; + startedAt = clock(); + lastAt = startedAt; + marks.push({ t: 0, frame: 0, label }); + return this; + }, + + /** End the take and hand back the recording. */ + stop(label = 'stop') { + if (recording) marks.push({ t: clock() - startedAt, frame: frames.length, label }); + recording = false; + return this.toJSON(); + }, + + /** + * Capture one frame. Called from the page's animation loop AFTER the + * simulation has stepped, so frame N holds the positions frame N drew. + * + * Two different times are recorded and they answer different questions: + * `frameMs` is the INTERVAL since the previous captured frame — at a healthy + * 60 Hz it is 16.7 ms by definition, so it detects dropped frames and + * nothing else. `workMs` is the time the page spent stepping and painting, + * which is the number that has to fit inside the budget. Conflating them + * produces the false failure of a page that is running perfectly. + * + * @param {number} [workMs] measured cost of producing this frame. + */ + capture(workMs) { + if (!recording) return this; + if (frames.length >= maxFrames) { + dropped += 1; + return this; + } + const at = clock(); + const positions = getPositions(); + const copy = new Array(positions.length); + for (let i = 0; i < positions.length; i += 1) copy[i] = positions[i]; + frames.push({ + t: at - startedAt, + frameMs: at - lastAt, + workMs: typeof workMs === 'number' ? workMs : null, + positions: copy, + }); + lastAt = at; + return this; + }, + + /** Annotate the timeline — gesture boundaries, theme flips, releases. */ + mark(label, detail) { + if (!recording) return this; + marks.push({ t: clock() - startedAt, frame: frames.length, label, detail }); + return this; + }, + + /** + * The recording, plus the frame-time distribution the QA gate asserts on. + * `droppedFrames` is reported rather than hidden: a truncated take must not + * be able to masquerade as a complete one. + */ + toJSON() { + const distribution = (values) => { + const sorted = values.filter((value) => typeof value === 'number').sort((a, b) => a - b); + const quantile = (q) => + sorted.length === 0 ? null : sorted[Math.min(sorted.length - 1, Math.floor(q * sorted.length))]; + return { + p50: quantile(0.5), + p95: quantile(0.95), + max: sorted.length ? sorted[sorted.length - 1] : null, + }; + }; + return { + nodeIds: nodeIds.slice(), + frameCount: frames.length, + droppedFrames: dropped, + durationMs: frames.length ? frames[frames.length - 1].t : 0, + // The first interval is dropped: it is measured from `start()`, not from + // a previous frame, so it is not a frame time at all. + frameMs: distribution(frames.slice(1).map((frame) => frame.frameMs)), + workMs: distribution(frames.map((frame) => frame.workMs)), + marks: marks.slice(), + frames, + }; + }, + + /** Serialised take, for `qa-drive.mjs` or a manual download. */ + toBlobUrl() { + const json = JSON.stringify(this.toJSON()); + const blob = new Blob([json], { type: 'application/json' }); + return URL.createObjectURL(blob); + }, + }; +} + +/** + * Per-node displacement between two recorded frames, in world px. + * + * Lives beside the recorder rather than in the QA script because it is the + * definition of "followed" that every assertion and every reported ratio + * shares — one definition, so the gate and the report cannot drift. + * + * @param {{nodeIds: string[], frames: Array<{positions: number[]}>}} take + * @param {number} fromFrame + * @param {number} toFrame + * @returns {Map} + */ +export function displacements(take, fromFrame, toFrame) { + const a = take.frames[fromFrame]; + const b = take.frames[toFrame]; + if (!a || !b) throw new RangeError(`frames ${fromFrame}..${toFrame} not in a take of ${take.frames.length}`); + const out = new Map(); + take.nodeIds.forEach((id, i) => { + out.set(id, Math.hypot(b.positions[i * 2] - a.positions[i * 2], b.positions[i * 2 + 1] - a.positions[i * 2 + 1])); + }); + return out; +} + +/** + * First frame at or after `fromFrame` where every node moved less than + * `restPx` between consecutive frames — the recorded definition of settled. + * + * @returns {number} frame index, or -1 if the take never settles. + */ +export function settleFrame(take, fromFrame, restPx = 0.01) { + for (let i = Math.max(1, fromFrame + 1); i < take.frames.length; i += 1) { + const previous = take.frames[i - 1].positions; + const current = take.frames[i].positions; + let worst = 0; + for (let p = 0; p < current.length; p += 2) { + const step = Math.hypot(current[p] - previous[p], current[p + 1] - previous[p + 1]); + if (step > worst) worst = step; + } + if (worst < restPx) return i; + } + return -1; +} diff --git a/mockups/code-topography/prototype/render.js b/mockups/code-topography/prototype/render.js new file mode 100644 index 0000000000..626fc04a8c --- /dev/null +++ b/mockups/code-topography/prototype/render.js @@ -0,0 +1,636 @@ +/** + * Canvas2D renderer for the TRACE surface. + * + * This module draws and does nothing else. It is handed positions, per-channel + * stretch, per-node bloom and a resolved palette, and it paints one frame. It + * never integrates, never decides how a body responds to a gesture, and never + * reads the clock — if a mark moves, it is because the simulation moved it. + * + * Canvas cannot read CSS custom properties, so the composing page resolves the + * token block once per theme flip and hands the resolved strings in. That keeps + * `tokens.css` the single source of the instrument's colour without putting a + * `getComputedStyle` call inside the draw loop. + * + * @module render + */ + +/* ---- kind hue: verbatim transcription of dashboard/src/viz/graph/kindColor.ts */ + +function hashKind(kind) { + let hash = 0; + for (let index = 0; index < kind.length; index += 1) { + hash = (hash * 31 + kind.charCodeAt(index)) >>> 0; + } + return hash; +} + +/** @param light whether the kind is drawn against a light medium. */ +export function kindColor(kind, light) { + const hash = hashKind(kind); + const chroma = (light ? 0.135 : 0.152) + ((hash >>> 9) % 6) * 0.012; + const lightness = light ? 0.55 : 0.72; + return `oklch(${lightness} ${chroma.toFixed(3)} ${186 + (hash % 148)})`; +} + +/* ---- deterministic relief noise (shared with the static sheets) ---------- */ + +function mulberry32(seed) { + let a = seed >>> 0; + return function next() { + a = (a + 0x6d2b79f5) >>> 0; + let t = a; + t = Math.imul(t ^ (t >>> 15), t | 1); + t ^= t + Math.imul(t ^ (t >>> 7), t | 61); + return ((t ^ (t >>> 14)) >>> 0) / 4294967296; + }; +} + +/** + * A closed relief outline. `rough` is the region's own irregularity, handed in + * by the caller — a lumpy coastline means a lumpy module. + */ +function blob(ctx, cx, cy, radiusX, radiusY, seed, rough = 0.14, samples = 72) { + const random = mulberry32(seed); + const harmonics = [ + { k: 2 + Math.floor(random() * 2), a: rough * (0.55 + random() * 0.5), p: random() * 6.283 }, + { k: 3 + Math.floor(random() * 3), a: rough * (0.34 + random() * 0.4), p: random() * 6.283 }, + { k: 6 + Math.floor(random() * 4), a: rough * (0.14 + random() * 0.2), p: random() * 6.283 }, + ]; + ctx.beginPath(); + for (let i = 0; i <= samples; i += 1) { + const t = (i / samples) * Math.PI * 2; + let m = 1; + for (const h of harmonics) m += h.a * Math.sin(h.k * t + h.p); + const px = cx + Math.cos(t) * radiusX * m; + const py = cy + Math.sin(t) * radiusY * m; + if (i === 0) ctx.moveTo(px, py); + else ctx.lineTo(px, py); + } + ctx.closePath(); +} + +/** + * Catmull–Rom through the waypoints, emitted as cubics. This is what makes + * several channels sharing a trunk read as one braided river rather than as + * parallel arrows. + */ +function traceCurve(ctx, points, move) { + const p = [points[0], ...points, points[points.length - 1]]; + if (move) ctx.moveTo(p[1][0], p[1][1]); + else ctx.lineTo(p[1][0], p[1][1]); + for (let i = 1; i < p.length - 2; i += 1) { + const [x0, y0] = p[i - 1]; + const [x1, y1] = p[i]; + const [x2, y2] = p[i + 1]; + const [x3, y3] = p[i + 2]; + ctx.bezierCurveTo( + x1 + (x2 - x0) / 6, + y1 + (y2 - y0) / 6, + x2 - (x3 - x1) / 6, + y2 - (y3 - y1) / 6, + x2, + y2, + ); + } +} + +/** A tapered ribbon: width is a measured quantity at each end. */ +function ribbon(ctx, points, widthStart, widthEnd) { + const n = points.length; + const normals = points.map((_, i) => { + const a = points[Math.max(0, i - 1)]; + const b = points[Math.min(n - 1, i + 1)]; + const dx = b[0] - a[0]; + const dy = b[1] - a[1]; + const len = Math.hypot(dx, dy) || 1; + return [-dy / len, dx / len]; + }); + const half = (i) => (widthStart + (widthEnd - widthStart) * (i / (n - 1))) / 2; + const upper = points.map((pt, i) => [pt[0] + normals[i][0] * half(i), pt[1] + normals[i][1] * half(i)]); + const lower = points + .map((pt, i) => [pt[0] - normals[i][0] * half(i), pt[1] - normals[i][1] * half(i)]) + .reverse(); + ctx.beginPath(); + traceCurve(ctx, upper, true); + traceCurve(ctx, lower, false); + ctx.closePath(); +} + +function roundRect(ctx, x, y, w, h, r) { + const radius = Math.min(r, w / 2, h / 2); + ctx.beginPath(); + ctx.moveTo(x + radius, y); + ctx.arcTo(x + w, y, x + w, y + h, radius); + ctx.arcTo(x + w, y + h, x, y + h, radius); + ctx.arcTo(x, y + h, x, y, radius); + ctx.arcTo(x, y, x + w, y, radius); + ctx.closePath(); +} + +/* ---- measurement → mark ------------------------------------------------- */ + +/** Channel width in px: the call-site count on that one edge. */ +export function channelWidth(calls) { + return 2.2 + Math.sqrt(calls) * 1.15; +} + +/** Node sill width in px: the symbol's degree, straight off the payload. */ +export function sillWidth(degree) { + return 16 + degree * 0.62; +} + +/** Below this stretch a channel is at rest and gets no tension rail. */ +const TENSION_FLOOR_PX = 5; +/** Stretch at which the tension rail reaches full thickness. */ +const TENSION_SATURATION_PX = 60; + +const HOP_LABEL = [ + ['u3', '3 hops up'], + ['u2', '2 hops up'], + ['u1', '1 hop up'], + ['focus', 'focus'], + ['d1', '1 hop down'], + ['d2', '2 hops down'], + ['d3', '3 hops down'], +]; + +/** + * @param {HTMLCanvasElement} canvas + * @param {import('./dataset.js').DATASET} dataset + */ +export function createRenderer(canvas, dataset) { + const ctx = canvas.getContext('2d', { alpha: true }); + if (!ctx) throw new Error('Canvas2D unavailable'); + + const nodes = dataset.nodes; + const indexOfId = new Map(nodes.map((node, i) => [node.id, i])); + /** Region seeds are stable per module name, so the coastline never shimmers. */ + const regionSeed = dataset.regions.map((region) => hashKind(region.mod)); + + let palette = null; + let view = { width: 0, height: 0, dpr: 1, scale: 1, offsetX: 0, offsetY: 0 }; + + /** Cheap per-frame scratch so a 60 Hz loop allocates nothing. */ + const point = { x: 0, y: 0 }; + function readPosition(positions, i) { + point.x = positions[i * 2]; + point.y = positions[i * 2 + 1]; + return point; + } + + function label(text, x, y, { size = 9, color, align = 'left', tracking = 0, halo = true, upper = false } = {}) { + const body = upper ? text.toUpperCase() : text; + ctx.font = `${size}px ui-monospace, "SFMono-Regular", "JetBrains Mono", monospace`; + ctx.textAlign = tracking > 0 ? 'left' : align; + ctx.textBaseline = 'alphabetic'; + // A label on a moving field has to survive every crossing, so it is set + // with a substrate-coloured halo exactly as the static sheets do it. + if (tracking > 0) { + const glyphs = [...body]; + const total = glyphs.reduce((sum, g) => sum + ctx.measureText(g).width + tracking, -tracking); + let cursor = align === 'right' ? x - total : align === 'center' ? x - total / 2 : x; + for (const glyph of glyphs) { + if (halo) { + ctx.strokeStyle = palette.surface0; + ctx.lineWidth = 3; + ctx.strokeText(glyph, cursor, y); + } + ctx.fillStyle = color ?? palette.textMuted; + ctx.fillText(glyph, cursor, y); + cursor += ctx.measureText(glyph).width + tracking; + } + return; + } + if (halo) { + ctx.strokeStyle = palette.surface0; + ctx.lineWidth = 3; + ctx.lineJoin = 'round'; + ctx.strokeText(body, x, y); + } + ctx.fillStyle = color ?? palette.textMuted; + ctx.fillText(body, x, y); + } + + /* ---- 1. underlay: the dimmed relief, moving with its members ----------- */ + function drawUnderlay(positions) { + ctx.save(); + ctx.globalAlpha = 0.22; + const centres = dataset.regions.map((region, r) => { + let cx = 0; + let cy = 0; + for (const id of region.of) { + const p = readPosition(positions, indexOfId.get(id)); + cx += p.x; + cy += p.y; + } + cx /= region.of.length; + cy /= region.of.length; + let spreadX = 0; + let spreadY = 0; + for (const id of region.of) { + const p = readPosition(positions, indexOfId.get(id)); + spreadX = Math.max(spreadX, Math.abs(p.x - cx)); + spreadY = Math.max(spreadY, Math.abs(p.y - cy)); + } + const mass = Math.sqrt(region.sym) * 3.4; + const rx = spreadX + mass; + const ry = spreadY + mass * 0.62; + blob(ctx, cx, cy, rx, ry, regionSeed[r], 0.11); + ctx.fillStyle = palette.reliefFillLo; + ctx.fill(); + ctx.strokeStyle = palette.reliefLineIndex; + ctx.lineWidth = 1.6; + ctx.stroke(); + blob(ctx, cx, cy, rx * 0.6, ry * 0.6, regionSeed[r] + 11, 0.09); + ctx.strokeStyle = palette.reliefLine; + ctx.lineWidth = 0.8; + ctx.stroke(); + return { cx, cy, rx, ry }; + }); + ctx.restore(); + // The underlay is dim; its labels are not. A boundary you cannot name is + // decoration, and nothing on this page is allowed to be decoration. + dataset.regions.forEach((region, r) => { + const c = centres[r]; + label(`${region.mod}/`, c.cx - c.rx * 0.62, c.cy + c.ry * 0.94, { + color: palette.textMuted, + tracking: 1.1, + upper: true, + }); + }); + } + + /* ---- 2. membranes: the types the flow passes through ------------------- */ + function drawMembranes(positions) { + for (const membrane of dataset.membranes) { + let x0 = Infinity; + let x1 = -Infinity; + let y0 = Infinity; + let y1 = -Infinity; + for (const id of membrane.of) { + const p = readPosition(positions, indexOfId.get(id)); + x0 = Math.min(x0, p.x); + x1 = Math.max(x1, p.x); + y0 = Math.min(y0, p.y); + y1 = Math.max(y1, p.y); + } + x0 -= 64; + x1 += 64; + y0 -= 54; + y1 += 54; + ctx.save(); + roundRect(ctx, x0, y0, x1 - x0, y1 - y0, Math.min((y1 - y0) / 2, 74)); + ctx.fillStyle = membrane.hero ? palette.membraneHero : palette.membraneFill; + ctx.fill(); + ctx.strokeStyle = membrane.hero ? palette.accent : palette.edgeStrong; + ctx.lineWidth = membrane.hero ? 1.4 : 1; + ctx.globalAlpha = membrane.hero ? 0.8 : 0.7; + // A trait's enclosure is dashed because the concrete side is chosen at + // run time; an impl's is solid because it is not. + if (membrane.kind === 'trait') ctx.setLineDash([5, 4]); + ctx.stroke(); + ctx.restore(); + label(membrane.label, x0 + 12, y0 - 7, { + color: membrane.hero ? palette.accent : palette.textMuted, + tracking: 1.1, + upper: true, + }); + label(membrane.file.split('/').slice(-2).join('/'), x1 - 12, y0 - 7, { + color: palette.textMuted, + align: 'right', + }); + membrane.box = { x0, y0, x1, y1 }; + } + } + + /* ---- 3. channels: width is call sites, brightness is live tension ------ */ + function drawChannels(positions, stretches, reducedMotion) { + const focusIndex = indexOfId.get(dataset.focusId); + const focus = { x: positions[focusIndex * 2], y: positions[focusIndex * 2 + 1] }; + const readings = []; + dataset.edges.forEach((edge, e) => { + const ai = indexOfId.get(edge.a); + const bi = indexOfId.get(edge.b); + const ax = positions[ai * 2]; + const ay = positions[ai * 2 + 1]; + const bx = positions[bi * 2]; + const by = positions[bi * 2 + 1]; + const w = channelWidth(edge.calls); + let points; + if (edge.dir === 'in') { + // A call that entered a type and moves between its methods before + // leaving. Drawn, not implied — it is the sheet's whole argument. + points = [ + [ax, ay], + [(ax + bx) / 2, Math.min(ay, by) - 46], + [bx, by], + ]; + } else { + const mid = (ay + by) / 2; + const pull = edge.dir === 'up' ? 0.42 : 0.34; + points = [ + [ax, ay], + [ax + (focus.x - ax) * pull * 0.5, mid - (by - ay) * 0.18], + [bx + (focus.x - bx) * pull * 0.12, mid + (by - ay) * 0.2], + [bx, by], + ]; + } + const upstream = edge.dir === 'up' || edge.dir === 'in'; + const hue = upstream ? palette.upstream : palette.downstream; + const widthStart = edge.dir === 'up' ? w * 0.78 : w; + const widthEnd = edge.dir === 'up' ? w : w * 0.78; + const stretch = Math.abs(stretches[e]); + // Tension is the SAME measurement as width (call sites); under load the + // channel reports how far it has been pulled off its rest length, so the + // felt channel and the drawn channel cannot disagree. + const load = Math.min(1, stretch / 26); + ctx.save(); + ribbon(ctx, points, widthStart, widthEnd); + ctx.fillStyle = hue; + ctx.globalAlpha = edge.dir === 'lost' ? 0.18 : 0.42 + load * 0.3; + ctx.fill(); + ctx.globalAlpha = edge.dir === 'lost' ? 0.5 : 0.62 + load * 0.38; + ctx.strokeStyle = hue; + ctx.lineWidth = 0.8 + load * 1.4; + if (edge.dir === 'lost') ctx.setLineDash([4, 4]); + ctx.stroke(); + ctx.restore(); + + if (reducedMotion && stretch > TENSION_FLOOR_PX) { + // Reduced motion: tension becomes literal thickness on a core rail, + // because a reader who cannot see the deformation must still be able to + // measure it. Two decisions here were forced by looking at the frame: + // the rail saturates (a 172 px stretch drawn at true scale is a 23 px + // slab that swamps the field), and it wears the PARTIAL state hue rather + // than the accent, because an accent-coloured rail was indistinguishable + // from the upstream channel it was sitting inside. + const railWidth = 1.5 + Math.min(1, stretch / TENSION_SATURATION_PX) * 6.5; + ctx.save(); + ribbon(ctx, points, railWidth, railWidth); + ctx.fillStyle = palette.statePartial; + ctx.globalAlpha = 0.72; + ctx.fill(); + ctx.restore(); + readings.push({ + x: (points[0][0] + points[points.length - 1][0]) / 2, + y: (ay + by) / 2, + text: `${stretch.toFixed(0)} px`, + hue: palette.statePartial, + }); + } else if (edge.calls >= 9 || edge.dir === 'lost') { + readings.push({ + x: (points[0][0] + points[points.length - 1][0]) / 2, + y: (ay + by) / 2 + (edge.dir === 'in' ? -30 : 0), + text: String(edge.calls), + hue, + }); + } + }); + return readings; + } + + /* ---- 4. membrane ports: where flow crosses a type boundary ------------- */ + function drawPorts(positions) { + for (const membrane of dataset.membranes) { + const box = membrane.box; + if (!box) continue; + ctx.save(); + ctx.strokeStyle = membrane.hero ? palette.accent : palette.edgeStrong; + ctx.lineWidth = 2.4; + for (const id of membrane.of) { + const p = readPosition(positions, indexOfId.get(id)); + for (const edgeY of [box.y0, box.y1]) { + ctx.beginPath(); + ctx.moveTo(p.x - 9, edgeY); + ctx.lineTo(p.x + 9, edgeY); + ctx.stroke(); + } + } + ctx.restore(); + } + } + + /* ---- 5. hover bloom: depth and latency are the node's degree ----------- */ + function drawBloom(positions, bloom, light) { + nodes.forEach((node, i) => { + const value = bloom[i]; + if (value < 0.004) return; + const p = readPosition(positions, i); + const hue = node.unresolved ? palette.stateUnknown : kindColor(node.kind, light); + // Bloom DEPTH scales with degree: a hub opens a wide slow well, a leaf a + // tight flick. Same number that sets its inertia. + const reach = (14 + Math.max(3, node.deg) * 0.9) * value; + ctx.save(); + for (let ring = 3; ring >= 1; ring -= 1) { + ctx.beginPath(); + ctx.ellipse(p.x, p.y, sillWidth(node.deg) / 2 + reach * ring * 0.55, 7 + reach * ring * 0.34, 0, 0, Math.PI * 2); + ctx.strokeStyle = hue; + ctx.globalAlpha = value * (0.42 - ring * 0.09); + ctx.lineWidth = ring === 1 ? 1.6 : 0.9; + ctx.stroke(); + } + ctx.restore(); + }); + } + + /* ---- 6. nodes: a sill whose WIDTH is the symbol's degree --------------- */ + function drawNodes(positions, light, draggingId) { + nodes.forEach((node, i) => { + if (node.id === dataset.focusId) return; + const p = readPosition(positions, i); + if (node.unresolved) { + ctx.save(); + roundRect(ctx, p.x - 34, p.y - 5, 68, 10, 5); + ctx.strokeStyle = palette.textMuted; + ctx.lineWidth = 1; + ctx.globalAlpha = 0.55; + ctx.setLineDash([3, 4]); + ctx.stroke(); + ctx.restore(); + return; + } + const w = sillWidth(node.deg); + roundRect(ctx, p.x - w / 2, p.y - 5, w, 10, 5); + ctx.save(); + ctx.fillStyle = kindColor(node.kind, light); + ctx.globalAlpha = 0.9; + ctx.fill(); + ctx.restore(); + ctx.strokeStyle = node.id === draggingId ? palette.accent : palette.surface0; + ctx.lineWidth = node.id === draggingId ? 1.8 : 1; + ctx.stroke(); + }); + } + + /* ---- 7. the focus basin ------------------------------------------------ */ + function drawFocus(positions) { + const i = indexOfId.get(dataset.focusId); + const p = readPosition(positions, i); + ctx.save(); + for (let r = 4; r >= 1; r -= 1) { + blob(ctx, p.x, p.y, 20 + r * 15, 12 + r * 8, 77 + r * 13, 0.07); + if (r === 1) { + ctx.fillStyle = palette.accent; + ctx.globalAlpha = 0.85; + ctx.fill(); + } + ctx.strokeStyle = palette.accent; + ctx.globalAlpha = 0.25 + (5 - r) * 0.16; + ctx.lineWidth = r === 1 ? 1.6 : 0.9; + ctx.stroke(); + } + ctx.restore(); + } + + /* ---- 8. hop rings and labels, set last -------------------------------- */ + function drawRings() { + ctx.save(); + for (const [key, text] of HOP_LABEL) { + const y = dataset.row[key]; + ctx.beginPath(); + ctx.moveTo(96, y); + ctx.lineTo(1416, y); + ctx.strokeStyle = palette.grid; + ctx.lineWidth = 1; + ctx.globalAlpha = key === 'focus' ? 0.9 : 1; + ctx.setLineDash(key === 'focus' ? [] : [1, 6]); + ctx.stroke(); + ctx.setLineDash([]); + label(text, 88, y + 3, { + align: 'right', + color: key === 'focus' ? palette.accent : palette.textMuted, + tracking: 1.1, + upper: true, + }); + } + ctx.restore(); + label('hop ring ↓', 88, 40, { align: 'right', tracking: 1.1, upper: true }); + label('depth limit 3 — 41 further symbols exist beyond this frame and are not drawn', 1416, 40, { + align: 'right', + tracking: 1.1, + upper: true, + }); + } + + function drawLabels(positions, readings) { + nodes.forEach((node, i) => { + if (node.id === dataset.focusId) return; + const p = readPosition(positions, i); + const above = node.y0 <= dataset.row.focus; + const dy = above ? -14 : 22; + if (node.unresolved) { + label(node.name, p.x, p.y + dy, { size: 11, color: palette.textMuted, align: 'center' }); + label(node.unresolved, p.x, p.y + dy + 12, { color: palette.stateUnknown, align: 'center' }); + label('channel ends — target not in graph', p.x, p.y + dy - 12, { + color: palette.stateUnknown, + align: 'center', + tracking: 1.1, + upper: true, + }); + return; + } + label(node.name, p.x, p.y + dy, { size: 11, color: palette.textPrimary, align: 'center' }); + label(`${node.mod}/ · deg ${node.deg}`, p.x, p.y + dy + (above ? -11 : 11), { + color: palette.textMuted, + align: 'center', + }); + if (node.source) { + label(node.source, p.x, p.y + dy - 22, { + color: palette.statePartial, + align: 'center', + tracking: 1.1, + upper: true, + }); + } + }); + + const fi = indexOfId.get(dataset.focusId); + const f = readPosition(positions, fi); + const focusNode = nodes[fi]; + label(focusNode.name, f.x, f.y + 4, { size: 15, color: palette.textPrimary, align: 'center' }); + label(dataset.readout.focusStats, f.x, f.y + 24, { color: palette.textMuted, align: 'center' }); + label(dataset.readout.focusSite, f.x, f.y + 37, { + color: palette.accent, + align: 'center', + tracking: 1.1, + upper: true, + }); + + for (const reading of readings) { + label(reading.text, reading.x, reading.y + 3, { color: reading.hue, align: 'center' }); + } + } + + return { + /** Resolved token strings for the current theme, plus the `light` flag. */ + setPalette(next) { + palette = next; + }, + + /** + * Fit the 1440x1160 world into the canvas box. The page uses the same + * transform to map a pointer back into world space, so a gesture lands on + * the mark the reader aimed at. + */ + setViewport({ width, height, dpr }) { + const scale = Math.min(width / dataset.world.width, height / dataset.world.height); + view = { + width, + height, + dpr, + scale, + offsetX: (width - dataset.world.width * scale) / 2, + offsetY: (height - dataset.world.height * scale) / 2, + }; + canvas.width = Math.round(width * dpr); + canvas.height = Math.round(height * dpr); + canvas.style.width = `${width}px`; + canvas.style.height = `${height}px`; + return view; + }, + + get viewport() { + return { ...view }; + }, + + /** World → canvas-CSS-pixel, for hit testing and for the QA harness. */ + toScreen(worldX, worldY) { + return { x: view.offsetX + worldX * view.scale, y: view.offsetY + worldY * view.scale }; + }, + /** Canvas-CSS-pixel → world. */ + toWorld(screenX, screenY) { + return { x: (screenX - view.offsetX) / view.scale, y: (screenY - view.offsetY) / view.scale }; + }, + + /** + * Paint one frame. + * + * @param {object} frame + * @param {Float64Array} frame.positions world coords, dataset node order + * @param {Float64Array} frame.stretches signed px off rest length, edge order + * @param {Float64Array} frame.bloom hover bloom per node, [0,1] + * @param {string|null} frame.draggingId + * @param {boolean} frame.reducedMotion + */ + draw(frame) { + if (!palette) throw new Error('setPalette must be called before draw'); + const { positions, stretches, bloom, draggingId = null, reducedMotion = false } = frame; + ctx.setTransform(view.dpr, 0, 0, view.dpr, 0, 0); + ctx.clearRect(0, 0, view.width, view.height); + ctx.translate(view.offsetX, view.offsetY); + ctx.scale(view.scale, view.scale); + ctx.lineJoin = 'round'; + ctx.lineCap = 'round'; + + drawRings(); + drawUnderlay(positions); + drawMembranes(positions); + const readings = drawChannels(positions, stretches, reducedMotion); + drawPorts(positions); + drawBloom(positions, bloom, palette.light); + drawNodes(positions, palette.light, draggingId); + drawFocus(positions); + drawLabels(positions, readings); + }, + }; +} diff --git a/mockups/code-topography/prototype/session-commit-weave.html b/mockups/code-topography/prototype/session-commit-weave.html new file mode 100644 index 0000000000..b6c7ea9ebf --- /dev/null +++ b/mockups/code-topography/prototype/session-commit-weave.html @@ -0,0 +1,34 @@ +Session and commit weave +
+
S E S S I O N  ·  C O M M I T   W E A V E
+
feat: consolidate TraceDecay V2 delivery — the pull request drawn against the sessions that made it. +Every mark is a store or forge fact: session threads (left, hue by id) at their recorded active spans; PR commits (right rail) at their true times.
+
+
100PR commits
+
12drawn (latest)
+
20correlated sessions
+
0 / 12commit-level links
+
7dwindow
+
+ + +TIME ↓ +SESSIONS ← +COMMITS + REASONING LINK +Jul 18Jul 19Jul 20Jul 21Jul 22Jul 23Jul 24 +fde18e46035c8f3c5784acebfe0a475c8c36d276954283f0569d86beffa8b72b267b2a4fbec09a73c1d9f934f4f26a37387cf18a52559900ca621dbf3c021bf30ed123877ec3a270STILL ALIVEspan stale in store5f9a695e019f8dd6 +1965be8e2 feat(dashboard): rebuild Loom as a zoomable dd2d8b3cc feat(dashboard): make the graph canvas a liv7fc727fa3 test: clear blocking clippy lints in test mo927bd18ea fix(lsp): accept versionless partial diagnos507913b61 fix(cursor): fail closed on corrupt composerbb6dc1cd3 fix(migrate): bound and validate Hermes snapf9231f907 fix(lsp): bind managed test runs to content5534b6f86 fix(memory): preserve curated correction pro90ce232d4 fix(temporal): preserve refresh and resoluti64d38f216 fix(dashboard): clear the instrument chrome'07326a20f feat(application): complete PR11 callable aud643efce8 fix: resolve xhigh code-review findings + +
Threads = the 20 sessions the store correlates to this branch, at their recorded spans; hollow rings are sessions whose span +collapsed to an instant (ingest recorded no duration). The dashed red stubs on every commit are the reading this sheet exists to show: +commit→session correlation resolves 0 of 12 — the causal joins the Loom needs are not being written for agent-made commits, +so the reasoning trace behind each commit is currently unaddressable. The amber thread is this very session: provably alive while its stored +span says it ended — span refresh lags live sessions. Both defects are store truths, drawn, not smoothed over.
+
diff --git a/mockups/code-topography/prototype/sim.js b/mockups/code-topography/prototype/sim.js new file mode 100644 index 0000000000..5c7e51a935 --- /dev/null +++ b/mockups/code-topography/prototype/sim.js @@ -0,0 +1,463 @@ +/** + * Pure spring simulation for the TRACE surface. + * + * This module is the honesty boundary. Every felt quantity in the prototype — + * weight, latency, deformation, settle time — is computed HERE from a stated + * measurement, and the renderer only draws what comes out. Nothing in this file + * touches the DOM, a canvas, `Date.now`, `performance.now` or `Math.random`, so + * the same seed and the same gesture script produce a bit-identical trajectory + * on every machine and inside `node --test`. + * + * Physics: hand-rolled position Verlet (Störmer–Verlet) with per-node velocity + * damping, integrated at a fixed substep. Two force families: + * + * anchor every node is held to its watershed layout position by a spring of + * stiffness `anchorBase * mass^anchorMassExponent`. Because the + * anchor is the ONLY force at rest (see `restLength` below), the + * layout is an exact equilibrium: the live page at rest is the static + * sheet, pixel for pixel. + * channel every drawn `calls` edge is a spring whose stiffness is its + * call-site count. Rest length is the distance between the two + * layout anchors, so a channel stores zero energy at rest and only + * pulls once something has been displaced. + * + * Mass is the symbol's degree. With a uniform damping RATIO (not a uniform + * damping coefficient) the closed form of the anchored oscillator gives + * settle time ∝ mass^(anchorMassExponent/2 … ) — monotone in mass, which is + * the "hubs are slow and deep, leaves flick" clause of the sensory contract, + * and `sim.test.mjs` asserts the monotonicity rather than trusting the algebra. + * + * @module sim + */ + +/** + * Tuning defaults. Every one of these is a feel knob; the README carries the + * table with the reasoning and the measured consequence of each. + */ +export const DEFAULT_PARAMS = Object.freeze({ + /** Anchor stiffness at unit mass, in force units per px. */ + anchorBase: 90, + /** + * Exponent applied to mass when scaling anchor stiffness. 0 would make every + * node oscillate at its own natural frequency and a 63-degree hub would take + * ~4.6x as long as a 3-degree leaf to settle — true to the measurement but + * unusable as an interface. 1 would cancel mass out entirely and destroy the + * weight channel. 0.5 keeps latency strictly monotone in degree with a ~2.1x + * spread across this subgraph, which reads as weight without stalling. + */ + anchorMassExponent: 0.5, + /** Channel stiffness per call site, in force units per px. */ + edgeStiffnessScale: 6, + /** + * Damping ratio of the anchored oscillator. Below 1 is underdamped. 0.72 + * gives one small overshoot — flesh, not jelly — and no ringing. + */ + dampingRatio: 0.72, + /** Integrator substep, in seconds. `step(dt)` subdivides down to this. */ + substep: 1 / 240, + /** Speed below which a node counts as at rest, in px/s. */ + restSpeed: 0.6, + /** Degree floor, so an unresolved (degree 0) node still has inertia. */ + minMass: 3, + /** Amplitude of the seeded startup displacement, in px. */ + jitter: 6, + /** Hover-bloom approach rate at unit mass, in 1/s, growing. */ + bloomAttack: 9.5, + /** Hover-bloom approach rate at unit mass, in 1/s, decaying. */ + bloomRelease: 5, + /** Exponent applied to mass when slowing the bloom approach. */ + bloomMassExponent: 0.42, +}); + +/** + * Deterministic PRNG (mulberry32). Used ONCE, at construction, to break the + * perfect symmetry of the layout so the field visibly breathes into place. + * Never called during stepping — that is what makes replay exact. + */ +function mulberry32(seed) { + let a = seed >>> 0; + return function next() { + a = (a + 0x6d2b79f5) >>> 0; + let t = a; + t = Math.imul(t ^ (t >>> 15), t | 1); + t ^= t + Math.imul(t ^ (t >>> 7), t | 61); + return ((t ^ (t >>> 14)) >>> 0) / 4294967296; + }; +} + +function requireFinite(value, what) { + if (typeof value !== 'number' || !Number.isFinite(value)) { + throw new TypeError(`${what} must be a finite number, got ${String(value)}`); + } + return value; +} + +/** + * Build a simulation over a measured subgraph. + * + * @param {object} spec + * @param {Array<{id: string, mass: number, x0: number, y0: number}>} spec.nodes + * `mass` is the symbol's degree; `x0`/`y0` are its watershed layout anchor. + * @param {Array<{a: string, b: string, stiffness: number, restLength?: number}>} spec.springs + * `stiffness` is the edge's call-site count. `restLength` defaults to the + * distance between the two anchors, which makes the layout an equilibrium. + * @param {number} [spec.seed] seed for the startup displacement only. + * @param {Partial} [spec.params] + */ +export function createSimulation(spec) { + if (!spec || !Array.isArray(spec.nodes) || !Array.isArray(spec.springs)) { + throw new TypeError('createSimulation needs { nodes: [], springs: [] }'); + } + const params = { ...DEFAULT_PARAMS, ...(spec.params ?? {}) }; + requireFinite(params.substep, 'params.substep'); + if (params.substep <= 0) throw new RangeError('params.substep must be > 0'); + + const count = spec.nodes.length; + if (count === 0) throw new RangeError('createSimulation needs at least one node'); + + const ids = new Array(count); + const indexOfId = new Map(); + const mass = new Float64Array(count); + const invMass = new Float64Array(count); + const anchorX = new Float64Array(count); + const anchorY = new Float64Array(count); + const anchorK = new Float64Array(count); + const dampPerSubstep = new Float64Array(count); + const x = new Float64Array(count); + const y = new Float64Array(count); + const prevX = new Float64Array(count); + const prevY = new Float64Array(count); + const forceX = new Float64Array(count); + const forceY = new Float64Array(count); + const pinned = new Uint8Array(count); + const pinX = new Float64Array(count); + const pinY = new Float64Array(count); + + const random = mulberry32(requireFinite(spec.seed ?? 1, 'spec.seed')); + + spec.nodes.forEach((node, i) => { + if (!node || typeof node.id !== 'string' || node.id.length === 0) { + throw new TypeError(`nodes[${i}].id must be a non-empty string`); + } + if (indexOfId.has(node.id)) throw new TypeError(`duplicate node id ${node.id}`); + indexOfId.set(node.id, i); + ids[i] = node.id; + const m = Math.max(params.minMass, requireFinite(node.mass, `nodes[${i}].mass`)); + mass[i] = m; + invMass[i] = 1 / m; + anchorX[i] = requireFinite(node.x0, `nodes[${i}].x0`); + anchorY[i] = requireFinite(node.y0, `nodes[${i}].y0`); + anchorK[i] = params.anchorBase * Math.pow(m, params.anchorMassExponent); + // c = 2 ζ sqrt(k m) is the damping coefficient that realises the target + // ratio against this node's own anchor spring. Applying it as a + // multiplicative velocity factor per substep (exp of the decay rate) means + // kinetic energy can only ever go DOWN in the damping half of the step, + // which is what keeps the post-release energy curve monotone. + const c = 2 * params.dampingRatio * Math.sqrt(anchorK[i] * m); + dampPerSubstep[i] = Math.exp((-c / m) * params.substep); + }); + + // Seeded startup displacement, applied as an offset with zero initial + // velocity (prev === current), so the field falls into the layout. + for (let i = 0; i < count; i += 1) { + const angle = random() * Math.PI * 2; + const radius = params.jitter * (0.35 + random() * 0.65); + x[i] = anchorX[i] + Math.cos(angle) * radius; + y[i] = anchorY[i] + Math.sin(angle) * radius; + prevX[i] = x[i]; + prevY[i] = y[i]; + } + + const springCount = spec.springs.length; + const springA = new Int32Array(springCount); + const springB = new Int32Array(springCount); + const springK = new Float64Array(springCount); + const springRest = new Float64Array(springCount); + /** @type {Map>} */ + const adjacency = new Map(); + ids.forEach((id) => adjacency.set(id, [])); + + spec.springs.forEach((spring, i) => { + const a = indexOfId.get(spring?.a); + const b = indexOfId.get(spring?.b); + if (a === undefined) throw new TypeError(`springs[${i}].a references unknown node ${String(spring?.a)}`); + if (b === undefined) throw new TypeError(`springs[${i}].b references unknown node ${String(spring?.b)}`); + if (a === b) throw new TypeError(`springs[${i}] is a self-loop on ${ids[a]}`); + const k = requireFinite(spring.stiffness, `springs[${i}].stiffness`); + if (k <= 0) throw new RangeError(`springs[${i}].stiffness must be > 0`); + springA[i] = a; + springB[i] = b; + springK[i] = k * params.edgeStiffnessScale; + springRest[i] = + spring.restLength === undefined + ? Math.hypot(anchorX[b] - anchorX[a], anchorY[b] - anchorY[a]) + : requireFinite(spring.restLength, `springs[${i}].restLength`); + adjacency.get(ids[a]).push({ spring: i, other: ids[b] }); + adjacency.get(ids[b]).push({ spring: i, other: ids[a] }); + }); + + let stepCount = 0; + let substepCount = 0; + + function accumulateForces() { + for (let i = 0; i < count; i += 1) { + forceX[i] = -anchorK[i] * (x[i] - anchorX[i]); + forceY[i] = -anchorK[i] * (y[i] - anchorY[i]); + } + for (let s = 0; s < springCount; s += 1) { + const a = springA[s]; + const b = springB[s]; + const dx = x[b] - x[a]; + const dy = y[b] - y[a]; + const length = Math.hypot(dx, dy); + if (length === 0) continue; + const magnitude = springK[s] * (length - springRest[s]); + const fx = (dx / length) * magnitude; + const fy = (dy / length) * magnitude; + forceX[a] += fx; + forceY[a] += fy; + forceX[b] -= fx; + forceY[b] -= fy; + } + } + + function integrate(dt) { + accumulateForces(); + const dt2 = dt * dt; + for (let i = 0; i < count; i += 1) { + if (pinned[i]) { + // A pinned node is the pointer, not a body: it goes exactly where the + // gesture says and carries no velocity of its own. Its neighbours feel + // it only through the channel springs. + x[i] = pinX[i]; + y[i] = pinY[i]; + prevX[i] = pinX[i]; + prevY[i] = pinY[i]; + continue; + } + const damp = dampPerSubstep[i]; + const stepX = (x[i] - prevX[i]) * damp + forceX[i] * invMass[i] * dt2; + const stepY = (y[i] - prevY[i]) * damp + forceY[i] * invMass[i] * dt2; + prevX[i] = x[i]; + prevY[i] = y[i]; + x[i] += stepX; + y[i] += stepY; + } + substepCount += 1; + } + + function resolveIndex(nodeId) { + const i = indexOfId.get(nodeId); + if (i === undefined) throw new TypeError(`unknown node id ${String(nodeId)}`); + return i; + } + + const sim = { + /** Node ids in readback order. */ + get nodeIds() { + return ids.slice(); + }, + get nodeCount() { + return count; + }, + get springCount() { + return springCount; + }, + /** Frozen copy of the parameters actually in force. */ + get params() { + return Object.freeze({ ...params }); + }, + get stepCount() { + return stepCount; + }, + get substepCount() { + return substepCount; + }, + + indexOf: resolveIndex, + massOf(nodeId) { + return mass[resolveIndex(nodeId)]; + }, + anchorOf(nodeId) { + const i = resolveIndex(nodeId); + return { x: anchorX[i], y: anchorY[i] }; + }, + /** Channel stiffnesses incident on a node, keyed by the other endpoint. */ + springsOf(nodeId) { + resolveIndex(nodeId); + return adjacency.get(nodeId).map((entry) => ({ + other: entry.other, + stiffness: springK[entry.spring], + restLength: springRest[entry.spring], + })); + }, + + /** + * Advance by `dt` seconds, subdivided into equal substeps no larger than + * `params.substep`. Callers MUST pass a fixed `dt` (the page drives one + * fixed step per animation frame) — wall-clock jitter never reaches the + * integrator, which is the whole reason a recording can be replayed. + */ + step(dt) { + requireFinite(dt, 'dt'); + if (dt <= 0) throw new RangeError('dt must be > 0'); + const substeps = Math.max(1, Math.ceil(dt / params.substep - 1e-9)); + const h = dt / substeps; + for (let s = 0; s < substeps; s += 1) integrate(h); + stepCount += 1; + return this; + }, + + /** Pin a node to a gesture position. Idempotent per frame. */ + applyDrag(nodeId, targetX, targetY) { + const i = resolveIndex(nodeId); + pinned[i] = 1; + pinX[i] = requireFinite(targetX, 'targetX'); + pinY[i] = requireFinite(targetY, 'targetY'); + return this; + }, + + /** Release every pinned node. Velocity stays zero — no fling. */ + release() { + pinned.fill(0); + return this; + }, + + /** @returns {string[]} ids currently pinned. */ + pinnedIds() { + const out = []; + for (let i = 0; i < count; i += 1) if (pinned[i]) out.push(ids[i]); + return out; + }, + + /** Flat [x0,y0,x1,y1,…] copy in `nodeIds` order. */ + positions() { + const out = new Float64Array(count * 2); + for (let i = 0; i < count; i += 1) { + out[i * 2] = x[i]; + out[i * 2 + 1] = y[i]; + } + return out; + }, + positionOf(nodeId) { + const i = resolveIndex(nodeId); + return { x: x[i], y: y[i] }; + }, + /** Flat [vx0,vy0,…] in px/s, derived from the Verlet position history. */ + velocities() { + const out = new Float64Array(count * 2); + const inv = 1 / params.substep; + for (let i = 0; i < count; i += 1) { + out[i * 2] = (x[i] - prevX[i]) * inv; + out[i * 2 + 1] = (y[i] - prevY[i]) * inv; + } + return out; + }, + maxSpeed() { + const inv = 1 / params.substep; + let worst = 0; + for (let i = 0; i < count; i += 1) { + if (pinned[i]) continue; + const speed = Math.hypot(x[i] - prevX[i], y[i] - prevY[i]) * inv; + if (speed > worst) worst = speed; + } + return worst; + }, + /** + * Kinetic + anchor + channel energy. With every node damped and no node + * pinned, this can only fall; `sim.test.mjs` asserts exactly that. + */ + energy() { + const inv = 1 / params.substep; + let kinetic = 0; + let anchor = 0; + for (let i = 0; i < count; i += 1) { + const vx = (x[i] - prevX[i]) * inv; + const vy = (y[i] - prevY[i]) * inv; + kinetic += 0.5 * mass[i] * (vx * vx + vy * vy); + const dx = x[i] - anchorX[i]; + const dy = y[i] - anchorY[i]; + anchor += 0.5 * anchorK[i] * (dx * dx + dy * dy); + } + let channel = 0; + for (let s = 0; s < springCount; s += 1) { + const stretch = + Math.hypot(x[springB[s]] - x[springA[s]], y[springB[s]] - y[springA[s]]) - springRest[s]; + channel += 0.5 * springK[s] * stretch * stretch; + } + return { kinetic, anchor, channel, total: kinetic + anchor + channel }; + }, + /** Signed stretch per spring, in px: what the renderer draws as tension. */ + stretches() { + const out = new Float64Array(springCount); + for (let s = 0; s < springCount; s += 1) { + out[s] = + Math.hypot(x[springB[s]] - x[springA[s]], y[springB[s]] - y[springA[s]]) - springRest[s]; + } + return out; + }, + isSettled(restSpeed = params.restSpeed) { + return sim.maxSpeed() < restSpeed; + }, + /** + * Run the SAME `step()` the animated loop runs until the field is at rest. + * The reduced-motion mode is exactly this: identical arithmetic, drawn once + * instead of sixty times a second. That identity is the a11y guarantee, and + * it is asserted, not asserted-in-prose. + */ + settle({ dt = 1 / 60, maxFrames = 1200, restSpeed = params.restSpeed } = {}) { + let frames = 0; + while (frames < maxFrames) { + sim.step(dt); + frames += 1; + if (sim.maxSpeed() < restSpeed) break; + } + return frames; + }, + }; + + return sim; +} + +/** + * Hop distance over the channel graph, ignoring direction. Used by the QA + * harness to say what "far" means when it asserts that far nodes did not move. + * + * @returns {Map} id → hops, unreachable ids omitted. + */ +export function hopDistances(sim, sourceId) { + const seen = new Map([[sourceId, 0]]); + let frontier = [sourceId]; + while (frontier.length) { + const next = []; + for (const id of frontier) { + const hops = seen.get(id) + 1; + for (const { other } of sim.springsOf(id)) { + if (seen.has(other)) continue; + seen.set(other, hops); + next.push(other); + } + } + frontier = next; + } + return seen; +} + +/** + * One exponential-approach step of the hover bloom. + * + * Bloom is not physics — it is the hover channel of the sensory contract, and + * it lives here so it is testable and lifts with the simulation rather than + * with a renderer. The approach RATE is divided by mass, so a leaf snaps and a + * hub arrives late and keeps arriving: "hover-response latency scales with + * degree", drawn from the same number that sets the node's inertia. + * + * @param {number} current bloom in [0,1] + * @param {number} target 0 or 1 + * @param {number} mass the node's degree + */ +export function bloomStep(current, target, mass, dt, params = DEFAULT_PARAMS) { + const base = target > current ? params.bloomAttack : params.bloomRelease; + const rate = base / Math.pow(Math.max(params.minMass, mass), params.bloomMassExponent); + return current + (target - current) * (1 - Math.exp(-rate * dt)); +} diff --git a/mockups/code-topography/prototype/sim.test.mjs b/mockups/code-topography/prototype/sim.test.mjs new file mode 100644 index 0000000000..35363b3dbf --- /dev/null +++ b/mockups/code-topography/prototype/sim.test.mjs @@ -0,0 +1,397 @@ +/** + * Numeric contract for the TRACE simulation. + * + * node --test mockups/code-topography/prototype/ + * + * No framework, no install: `node:test` and `node:assert/strict` only, which is + * the point — the simulation is pure enough to be tested without a browser, a + * bundler or a dependency, and every clause of the sensory contract that can be + * stated as a number is stated here rather than in prose. + * + * Tolerances are named and justified where they appear. Where a claim can be + * exact — determinism, reduced-motion equivalence — it is asserted EXACTLY, by + * bitwise array comparison, because a tolerance there would be hiding drift. + */ +import test from 'node:test'; +import assert from 'node:assert/strict'; + +import { createSimulation, hopDistances, bloomStep, DEFAULT_PARAMS } from './sim.js'; +import { DATASET, buildSimSpec, hopRings } from './dataset.js'; + +const DT = 1 / 60; + +/** + * A single anchored body with no channels at all — the weight channel in + * isolation, so a mass claim cannot be contaminated by a neighbour's pull. + */ +function loneBody(mass, params) { + return createSimulation({ + seed: 7, + params: { ...params, jitter: 0 }, + nodes: [{ id: 'a', mass, x0: 0, y0: 0 }], + springs: [], + }); +} + +/** Two bodies joined by one channel of a chosen stiffness. */ +function pair(stiffness, { mass = 20, separation = 200, params } = {}) { + return createSimulation({ + seed: 11, + params: { ...params, jitter: 0 }, + nodes: [ + { id: 'a', mass, x0: 0, y0: 0 }, + { id: 'b', mass, x0: separation, y0: 0 }, + ], + springs: [{ a: 'a', b: 'b', stiffness }], + }); +} + +/** + * Settling time of a released body, in frames, by the classic envelope + * definition: the last frame at which the body is still further than `tol` of + * its pull from home. + * + * A speed threshold cannot be used here. An underdamped body passes through + * zero speed at every turning point, so "first frame under 0.6 px/s" samples + * WHERE IN THE SWING the frame happened to land and is not monotone in mass — + * measured 115 frames at mass 20 against 71 at mass 40, which is a + * frame-quantisation artefact, not a lighter-feeling hub. The envelope is what + * a reader actually perceives as "it has stopped". + */ +function framesToRest(sim, id, offsetX, tol = 0.02) { + const anchor = sim.anchorOf(id); + sim.applyDrag(id, anchor.x + offsetX, anchor.y); + sim.step(DT); + sim.release(); + const threshold = Math.abs(offsetX) * tol; + let last = 0; + for (let frame = 1; frame <= 4000; frame += 1) { + sim.step(DT); + if (Math.abs(sim.positionOf(id).x - anchor.x) >= threshold) last = frame; + } + return last; +} + +test('construction rejects malformed measurements rather than guessing', () => { + assert.throws(() => createSimulation({ nodes: [], springs: [] }), /at least one node/); + assert.throws( + () => createSimulation({ nodes: [{ id: 'a', mass: 1, x0: 0, y0: 0 }, { id: 'a', mass: 1, x0: 1, y0: 1 }], springs: [] }), + /duplicate node id a/, + ); + assert.throws( + () => createSimulation({ nodes: [{ id: 'a', mass: 1, x0: 0, y0: 0 }], springs: [{ a: 'a', b: 'ghost', stiffness: 1 }] }), + /unknown node ghost/, + ); + assert.throws( + () => createSimulation({ nodes: [{ id: 'a', mass: 1, x0: Number.NaN, y0: 0 }], springs: [] }), + /nodes\[0\]\.x0 must be a finite number/, + ); + const sim = createSimulation({ nodes: [{ id: 'a', mass: 1, x0: 0, y0: 0 }], springs: [] }); + assert.throws(() => sim.step(0), /dt must be > 0/); + assert.throws(() => sim.positionOf('ghost'), /unknown node id ghost/); +}); + +test('the layout is an exact equilibrium: rest length is anchor separation', () => { + const sim = pair(30); + // With jitter off and every spring at rest length, nothing should move at all. + for (let i = 0; i < 240; i += 1) sim.step(DT); + assert.equal(sim.maxSpeed(), 0); + assert.deepEqual(Array.from(sim.positions()), [0, 0, 200, 0]); + const energy = sim.energy(); + assert.equal(energy.total, 0); +}); + +test('WEIGHT: settle time increases monotonically with mass', () => { + const masses = [4, 9, 20, 40, 63]; + const settle = masses.map((mass) => framesToRest(loneBody(mass), 'a', 160)); + for (let i = 1; i < settle.length; i += 1) { + assert.ok( + settle[i] > settle[i - 1], + `mass ${masses[i]} settled in ${settle[i]} frames, not slower than mass ${masses[i - 1]} at ${settle[i - 1]}`, + ); + } + // The spread is the feel budget: enough to be felt, not enough to stall. The + // exponent that produces it is a documented tuning knob, so this asserts the + // BAND rather than an exact figure. + const spread = settle[settle.length - 1] / settle[0]; + assert.ok(spread > 1.5 && spread < 4, `mass spread ${spread.toFixed(2)}x outside the 1.5–4x feel budget`); +}); + +test('WEIGHT: hover bloom latency increases with mass, and both extremes still arrive', () => { + const halfBloomSeconds = (mass) => { + let value = 0; + let seconds = 0; + while (value < 0.5 && seconds < 10) { + value = bloomStep(value, 1, mass, DT); + seconds += DT; + } + return seconds; + }; + const leaf = halfBloomSeconds(4); + const hub = halfBloomSeconds(63); + assert.ok(hub > leaf * 2, `hub half-bloom ${hub.toFixed(3)}s is not meaningfully later than leaf ${leaf.toFixed(3)}s`); + assert.ok(leaf < 0.2, `a leaf must flick: ${leaf.toFixed(3)}s to half bloom`); + assert.ok(hub < 0.6, `a hub must still arrive: ${hub.toFixed(3)}s to half bloom`); + // Release is slower than attack, so a bloom lingers rather than snapping off. + assert.ok(bloomStep(1, 0, 20, DT) > 1 - (1 - bloomStep(0, 1, 20, DT))); +}); + +test('TENSION: a stiff channel propagates displacement, a weak one does not', () => { + const STIFF_CALLS = 58; + const WEAK_CALLS = 3; + const PULL = 200; + + function follow(calls) { + const sim = pair(calls); + const start = sim.positionOf('b').x; + // Hold 'a' displaced long enough for the neighbourhood to reach the + // deformed equilibrium — this measures coupling, not the transient. + for (let i = 0; i < 600; i += 1) { + sim.applyDrag('a', -PULL, 0); + sim.step(DT); + } + return Math.abs(sim.positionOf('b').x - start) / PULL; + } + + const stiff = follow(STIFF_CALLS); + const weak = follow(WEAK_CALLS); + assert.ok(stiff >= 0.25, `stiff channel follow ratio ${stiff.toFixed(4)} below the 0.25 floor`); + assert.ok(weak < 0.06, `weak channel follow ratio ${weak.toFixed(4)} above the 0.06 ceiling`); + assert.ok(stiff / weak > 8, `stiff/weak contrast ${(stiff / weak).toFixed(1)}x is not legible as a difference in kind`); +}); + +test('TENSION: on the real subgraph, deformation falls off with hop distance', () => { + const sim = createSimulation(buildSimSpec(DATASET, { seed: 3 })); + sim.settle({ dt: DT }); + const before = sim.positions(); + const ids = sim.nodeIds; + const hops = hopDistances(sim, DATASET.focusId); + const anchor = sim.anchorOf(DATASET.focusId); + for (let i = 0; i < 600; i += 1) { + sim.applyDrag(DATASET.focusId, anchor.x - 180, anchor.y + 90); + sim.step(DT); + } + const after = sim.positions(); + const moved = new Map( + ids.map((id, i) => [ + id, + Math.hypot(after[i * 2] - before[i * 2], after[i * 2 + 1] - before[i * 2 + 1]), + ]), + ); + + const byHop = new Map(); + for (const [id, hop] of hops) { + if (hop === 0) continue; + byHop.set(hop, Math.max(byHop.get(hop) ?? 0, moved.get(id))); + } + const oneHop = byHop.get(1); + const threeHop = byHop.get(3) ?? 0; + assert.ok(oneHop > 12, `one-hop neighbours barely moved (${oneHop.toFixed(2)} px) — coupling is not being felt`); + assert.ok( + threeHop < oneHop * 0.35, + `three-hop displacement ${threeHop.toFixed(2)} px is not clearly less than one-hop ${oneHop.toFixed(2)} px`, + ); +}); + +test('RELEASE: total energy decays monotonically and nearly to nothing', () => { + const sim = createSimulation(buildSimSpec(DATASET, { seed: 5 })); + sim.settle({ dt: DT }); + const anchor = sim.anchorOf(DATASET.focusId); + for (let i = 0; i < 120; i += 1) { + sim.applyDrag(DATASET.focusId, anchor.x - 220, anchor.y); + sim.step(DT); + } + sim.release(); + + const first = sim.energy().total; + assert.ok(first > 1000, `nothing was stored to decay (${first.toFixed(1)})`); + let previous = first; + let peak = first; + for (let i = 0; i < 900; i += 1) { + sim.step(DT); + const total = sim.energy().total; + // Tolerance is RELATIVE and tiny: it covers the discretisation error of a + // symplectic step, not a physical energy gain. A real blow-up (undamped + // ringing, stiff-spring explosion) fails this by orders of magnitude. + assert.ok( + total <= previous * (1 + 1e-6) + 1e-9, + `energy rose at frame ${i}: ${previous.toFixed(6)} → ${total.toFixed(6)}`, + ); + previous = total; + peak = Math.max(peak, total); + } + assert.equal(peak, first, 'the post-release peak must be the release itself, never later'); + assert.ok(previous < first * 1e-4, `energy only fell to ${(previous / first).toExponential(2)} of release`); + assert.ok(sim.isSettled(), 'the field never came to rest after release'); +}); + +test('RELEASE: the swing decays fast — one small overshoot, then nothing', () => { + const PULL = 200; + const sim = loneBody(63); + const anchor = sim.anchorOf('a'); + sim.applyDrag('a', anchor.x + PULL, anchor.y); + sim.step(DT); + sim.release(); + + // A damped sinusoid crosses zero forever, so counting crossings measures + // float noise, not feel. What a reader actually perceives is the sequence of + // swing amplitudes, so that is what is asserted. + const swings = []; + let previous = sim.positionOf('a').x - anchor.x; + let extreme = previous; + for (let i = 0; i < 3000; i += 1) { + sim.step(DT); + const offset = sim.positionOf('a').x - anchor.x; + if (Math.sign(offset) !== Math.sign(previous) && Math.sign(offset) !== 0) { + swings.push(Math.abs(extreme)); + extreme = offset; + } else if (Math.abs(offset) > Math.abs(extreme)) { + extreme = offset; + } + previous = offset; + if (swings.length >= 3) break; + } + assert.ok(swings.length >= 2, 'the body never swung back — check the release path'); + assert.ok(swings[0] >= PULL * 0.9, `the first swing should be the pull itself, measured ${swings[0].toFixed(1)} px`); + assert.ok(swings[1] < PULL * 0.12, `overshoot ${swings[1].toFixed(2)} px is more than 12 % of the pull`); + if (swings[2] !== undefined) { + assert.ok(swings[2] < PULL * 0.02, `second swing ${swings[2].toFixed(3)} px is still visible — this is ringing`); + } +}); + +test('DETERMINISM: same seed and same gesture script give an identical trajectory', () => { + const script = [ + { frames: 30, drag: null }, + { frames: 45, drag: { id: 'focus', dx: -170, dy: 60 } }, + { frames: 12, drag: { id: 'hctx', dx: 90, dy: -40 } }, + { frames: 120, drag: null }, + ]; + function run() { + const sim = createSimulation(buildSimSpec(DATASET, { seed: 20260725 })); + const trajectory = []; + for (const phase of script) { + if (!phase.drag) sim.release(); + for (let i = 0; i < phase.frames; i += 1) { + if (phase.drag) { + const anchor = sim.anchorOf(phase.drag.id); + sim.applyDrag(phase.drag.id, anchor.x + phase.drag.dx, anchor.y + phase.drag.dy); + } + sim.step(DT); + trajectory.push(Array.from(sim.positions())); + } + } + return trajectory; + } + const a = run(); + const b = run(); + assert.equal(a.length, 207); + assert.deepEqual(a, b, 'two runs of the same script diverged'); + // A different seed must actually change the trajectory, or the seed is a lie. + const other = createSimulation(buildSimSpec(DATASET, { seed: 999 })); + other.step(DT); + const same = createSimulation(buildSimSpec(DATASET, { seed: 20260725 })); + same.step(DT); + assert.notDeepEqual(Array.from(other.positions()), Array.from(same.positions())); +}); + +test('REDUCED MOTION: settling in one shot lands on bit-identical positions', () => { + // Reduced motion is not an approximation of the animated path — it is the + // same `step()` sequence with the paints removed. So the arrays must match + // EXACTLY, and this test would catch any renderer-side shortcut that broke + // that equivalence. + const animated = createSimulation(buildSimSpec(DATASET, { seed: 42 })); + const frames = animated.settle({ dt: DT }); + assert.ok(frames > 5 && frames < 1200, `startup settled in ${frames} frames`); + + const reduced = createSimulation(buildSimSpec(DATASET, { seed: 42 })); + for (let i = 0; i < frames; i += 1) reduced.step(DT); + + assert.deepEqual(Array.from(reduced.positions()), Array.from(animated.positions())); + + // And with a gesture in the middle: hold, settle, release, settle. + const anchor = animated.anchorOf('hctx'); + for (const sim of [animated, reduced]) { + for (let i = 0; i < 90; i += 1) { + sim.applyDrag('hctx', anchor.x - 140, anchor.y + 70); + sim.step(DT); + } + sim.release(); + } + const settledFrames = animated.settle({ dt: DT }); + for (let i = 0; i < settledFrames; i += 1) reduced.step(DT); + assert.deepEqual(Array.from(reduced.positions()), Array.from(animated.positions())); + // Final positions must be the layout again: release returns the field home. + animated.nodeIds.forEach((id) => { + const home = animated.anchorOf(id); + const now = animated.positionOf(id); + assert.ok( + Math.hypot(now.x - home.x, now.y - home.y) < 1, + `${id} settled ${Math.hypot(now.x - home.x, now.y - home.y).toFixed(2)} px away from its layout anchor`, + ); + }); +}); + +test('readback surfaces are copies, not live views into the integrator', () => { + const sim = createSimulation(buildSimSpec(DATASET, { seed: 1 })); + const snapshot = sim.positions(); + snapshot[0] = 1e9; + sim.step(DT); + assert.notEqual(sim.positions()[0], 1e9); + assert.notEqual(sim.positionOf('focus').x, 1e9); + const params = sim.params; + assert.throws(() => { + 'use strict'; + params.anchorBase = 1; + }); +}); + +test('substepping is a refinement, not a different simulation', () => { + // One 1/60 step must equal four 1/240 steps taken through the public API, + // which is what lets the page choose its frame budget without changing feel. + const coarse = createSimulation({ ...buildSimSpec(DATASET, { seed: 8 }), params: { substep: 1 / 240 } }); + const fine = createSimulation({ ...buildSimSpec(DATASET, { seed: 8 }), params: { substep: 1 / 240 } }); + coarse.step(1 / 60); + for (let i = 0; i < 4; i += 1) fine.step(1 / 240); + assert.deepEqual(Array.from(coarse.positions()), Array.from(fine.positions())); + assert.equal(coarse.substepCount, fine.substepCount); +}); + +test('every drawn row IS the measured hop ring', () => { + // The row caption is "hop distance from the focus, not elevation", so a node's + // ring and its measured distance cannot be allowed to disagree — that caption + // is the whole reason the sheet is not a decorative flow diagram. + const rings = hopRings(DATASET, DATASET.focusId); + const expected = { u3: 3, u2: 2, u1: 1, focus: 0, d1: 1, d2: 2, d3: 3 }; + assert.equal(rings.size, DATASET.nodes.length, 'the drawn subgraph must be connected through the focus'); + for (const node of DATASET.nodes) { + assert.equal(rings.get(node.id), expected[node.row], `${node.id} is drawn on ring ${node.row}`); + } + // The rule that makes that true is that an in-membrane move costs zero hops. + // Assert the rule has teeth: dropping it moves nodes off their rows. + const naive = hopDistances(createSimulation(buildSimSpec(DATASET, { seed: 1 })), DATASET.focusId); + const disagreeing = DATASET.nodes.filter((node) => naive.get(node.id) !== expected[node.row]); + assert.deepEqual( + disagreeing.map((node) => node.id).sort(), + ['acquire', 'adjacency', 'checkout', 'edgeindex', 'fetche', 'fetchn', 'neighbors', 'sibcall', 'sibgraph'], + 'the set of nodes reached through an in-membrane channel changed', + ); +}); + +test('default parameters are the ones the README documents', () => { + assert.deepEqual( + { ...DEFAULT_PARAMS }, + { + anchorBase: 90, + anchorMassExponent: 0.5, + edgeStiffnessScale: 6, + dampingRatio: 0.72, + substep: 1 / 240, + restSpeed: 0.6, + minMass: 3, + jitter: 6, + bloomAttack: 9.5, + bloomRelease: 5, + bloomMassExponent: 0.42, + }, + ); +}); diff --git a/mockups/code-topography/prototype/trace-live.html b/mockups/code-topography/prototype/trace-live.html new file mode 100644 index 0000000000..081d7107e0 --- /dev/null +++ b/mockups/code-topography/prototype/trace-live.html @@ -0,0 +1,647 @@ + + + + +TRACE — live watershed (round two prototype) + + + +
+ +
+ 02 · LIVE +

Trace

+ The static watershed with its physics turned on. Every node is a body whose mass is its degree; + every channel is a spring whose stiffness is its call-site count. Hover to feel weight, drag to feel coupling, + release to watch it settle. Nothing here is eased for looks — the motion is the measurement. +
+ +
+
Focus
+
Callers ≤ 3 hops
+
Callees ≤ 3 hops
+
Depth limit
+
Beyond the limit
+
Types entered
+
Modules crossed
+
+ +
+ Instrument + + + + + + + frame 0 + max speed 0 px/s + energy 0 + frame ms p95 + settled +
+ +
+ +
+
+
Weight
+
Mass is degree. Anchor stiffness rises as √mass, so hover latency and settle time rise + monotonically with connectedness: a 4-degree test leaf reaches half bloom in ~0.12 s, the 63-degree hub takes + ~0.40 s and keeps arriving. Hubs are slow and deep; leaves flick.
+
+
+
Tension
+
Stiffness is call sites. Drag a node and its neighbourhood deforms in proportion: the + 58-call channel drags its partner along as flesh, the 3-call channel trails. Channel brightness and stroke + weight report how far that spring is off its rest length, in px.
+
+
+
Rest
+
Each channel's rest length is the distance between its two layout anchors, so the field at + rest is the static sheet exactly — no drift, no relayout. A channel only stores energy once a gesture has + displaced something.
+
+
+
Reduced motion
+
Not a degradation: the same integrator, run to rest and drawn once. Final positions are + bit-identical to the animated path. Tension, which was carried by motion, becomes an amber core rail whose + thickness is the stretch, saturating at 60 px, with the figure printed beside it. Channels under 5 px of + stretch are at rest and get no rail.
+
+
+
Determinism
+
One fixed 1/60 s step per animation frame, subdivided to 1/240 s inside the integrator. Wall + clock never reaches the physics — it is measured, in frameMs, and reported. Same seed plus same + gestures gives the same trajectory, which is what the QA gate replays.
+
+
+ +
+
+

What round two adds

+

Round one settled the spatial language. This page answers the only question a static sheet + cannot: does the structure feel like what it is. Weight and tension are the two channels of the sensory + contract that a spring field can carry honestly, and both are wired to numbers already on the payload — + degree and per-edge call sites.

+

Warmth (churn recency) and grain (cyclomatic complexity) are deliberately absent: they are + real channels in the contract but they need a time axis and a contour pass, and mixing them in here would make + it impossible to tell which mapping the reviewer is reacting to.

+
+
+

Sensation → data

+
+
mass
symbol degree, floored at 3 so an unresolved node still has inertia.
+
anchor k
90 · mass^0.5. The exponent is the one compression on this page and it is a + tuning knob, not a measurement — see the README table.
+
channel k
6 · call sites on that single edge.
+
damping
ratio 0.72 against each node's own anchor — one overshoot, no ringing.
+
bloom rate
9.5 / mass^0.42 per second, growing; 5.0 / mass^0.42 decaying.
+
rest length
anchor-to-anchor distance. Makes the layout an exact equilibrium.
+
+
+
+

Honesty notes carried forward

+

Rows are hop rings, not elevation. The dashed mouth at dyn ContextSource + is a real unresolved calls edge, drawn to full width and then stopped. The relief underlay is the + cortex sheet's regions, simplified to two contours here because this page is about motion; shorelines still move + with their members, so a crossing is still a cross-module call.

+

The underlay's blobs are seeded from the module name, never from the clock, so the coastline + does not shimmer frame to frame.

+
+
+
+ + + + + + diff --git a/mockups/code-topography/shoot.mjs b/mockups/code-topography/shoot.mjs new file mode 100644 index 0000000000..f2f9c327c5 --- /dev/null +++ b/mockups/code-topography/shoot.mjs @@ -0,0 +1,75 @@ +/** + * Screenshot harness for the code-topography mockups. + * + * Playwright is not a dependency of this folder — it is resolved out of the + * dashboard's node_modules, which is the only place in the repo that has it. + * The location is read from an environment variable so no machine-local path + * is ever committed: + * + * TD_DASHBOARD_DIR directory holding the dashboard's node_modules. + * Default: ../../dashboard, relative to this script. + * + * node shoot.mjs + * TD_DASHBOARD_DIR=/somewhere/else/dashboard node shoot.mjs + * + * Shoots every page at 1440 wide in both themes. Pages render deterministically + * (seeded geometry, no animation), so re-running produces identical files. + */ +import { createRequire } from 'node:module'; +import { fileURLToPath, pathToFileURL } from 'node:url'; +import path from 'node:path'; +import fs from 'node:fs'; + +const here = path.dirname(fileURLToPath(import.meta.url)); +const dashboardDir = path.resolve(here, process.env.TD_DASHBOARD_DIR ?? '../../dashboard'); +const requireFromDashboard = createRequire(path.join(dashboardDir, 'package.json')); + +let chromium; +try { + ({ chromium } = requireFromDashboard('playwright')); +} catch (cause) { + console.error( + `Could not load playwright from ${dashboardDir}.\n` + + 'Set TD_DASHBOARD_DIR to a directory whose node_modules contains playwright.', + ); + throw cause; +} + +const PAGES = ['cortex', 'trace', 'core-sample', 'lens']; +const THEMES = ['dark', 'light']; +const shots = path.join(here, 'shots'); +fs.mkdirSync(shots, { recursive: true }); + +const browser = await chromium.launch(); +const context = await browser.newContext({ + viewport: { width: 1440, height: 1200 }, + deviceScaleFactor: 2, + reducedMotion: 'reduce', +}); +const page = await context.newPage(); +const problems = []; +page.on('pageerror', (error) => problems.push(String(error))); +page.on('console', (message) => { + if (message.type() === 'error') problems.push(message.text()); +}); + +for (const name of PAGES) { + const file = path.join(here, `${name}.html`); + if (!fs.existsSync(file)) continue; + for (const theme of THEMES) { + await page.goto(pathToFileURL(file).href, { waitUntil: 'load' }); + await page.evaluate((value) => { + document.documentElement.setAttribute('data-theme', value); + }, theme); + await page.waitForTimeout(180); + const out = path.join(shots, `${name}-${theme}.png`); + await page.screenshot({ path: out, fullPage: true }); + console.log(`${path.relative(here, out)}`); + } +} + +await browser.close(); +if (problems.length) { + console.error('\npage errors:\n' + problems.join('\n')); + process.exitCode = 1; +} diff --git a/mockups/code-topography/topography.css b/mockups/code-topography/topography.css new file mode 100644 index 0000000000..d31dfdb134 --- /dev/null +++ b/mockups/code-topography/topography.css @@ -0,0 +1,337 @@ +/* Code-topography mockups — shared surface. + * + * These are CONCEPT MOCKUPS, not production code. The token block below is a + * transcription of dashboard/src/theme/tokens.css so the pages can be opened + * as bare files (no build, no dev server) and still wear the instrument + * language: graphite face, hairline rules, square corners, tabular mono + * numerals, colour that reports rather than decorates. + * + * House rule that governs every page here: a position, a size, a width or an + * elevation is a MEASUREMENT or it is not drawn. Captions name the measurement. + */ + +:root { + --raw-surface-0: oklch(0.145 0.003 260); + --raw-surface-1: oklch(0.178 0.0035 260); + --raw-surface-2: oklch(0.215 0.004 260); + --raw-surface-3: oklch(0.262 0.0045 260); + --raw-text-primary: oklch(0.945 0.002 260); + --raw-text-secondary: oklch(0.79 0.003 260); + --raw-text-muted: oklch(0.685 0.004 260); + --raw-edge-subtle: oklch(0.315 0.004 260); + --raw-edge-strong: oklch(0.46 0.006 260); + --raw-accent: oklch(0.75 0.15 200); + --raw-accent-emphasis: oklch(0.64 0.16 200); + --raw-grid: oklch(0.24 0.004 260); + --raw-grid-minor: oklch(0.195 0.003 260); + + --raw-state-ready: oklch(0.72 0.14 155); + --raw-state-partial: oklch(0.78 0.14 85); + --raw-state-stale: oklch(0.74 0.11 85); + --raw-state-unknown: oklch(0.6 0.015 260); + --raw-state-error: oklch(0.62 0.18 25); + + --raw-sev-info: oklch(0.68 0.06 250); + --raw-sev-low: oklch(0.7 0.1 85); + --raw-sev-medium: oklch(0.7 0.13 55); + --raw-sev-high: oklch(0.64 0.16 35); + --raw-sev-critical: oklch(0.58 0.19 25); + + --raw-graph-field: + radial-gradient(85% 70% at 50% 42%, oklch(0.245 0.035 262 / 0.75) 0%, transparent 62%), + radial-gradient(140% 120% at 50% 45%, oklch(0.165 0.014 264) 0%, oklch(0.105 0.012 268) 100%); + --raw-membrane-lift: oklch(0.34 0.016 262 / 0.55); + --raw-depth: oklch(0.07 0.012 262 / 0.6); + --raw-well: oklch(0.118 0.0035 262); + --raw-raised: oklch(0.228 0.004 260); + --shadow-well: inset 0 1px 3px var(--raw-depth), inset 0 -1px 0 var(--raw-membrane-lift); + --shadow-raised: inset 0 1px 0 var(--raw-membrane-lift), 0 1px 2px var(--raw-depth); + + /* Relief ink: the colour a contour line is drawn in. On graphite the lines + * are light scored into a dark mass; on paper they are ink on a pale one. */ + --relief-line: oklch(0.62 0.02 250 / 0.85); + --relief-line-index: oklch(0.86 0.03 250 / 0.9); + --relief-fill-lo: oklch(0.20 0.012 250); + --relief-fill-hi: oklch(0.34 0.02 250); + + --font-sans: 'Inter Variable', 'Inter', system-ui, sans-serif; + --font-mono: ui-monospace, 'SFMono-Regular', 'Cascadia Mono', 'JetBrains Mono', monospace; + --grid-cell: 32px; + --radius-standard: 2px; +} + +[data-theme='light'] { + --raw-surface-0: oklch(0.985 0.001 260); + --raw-surface-1: oklch(0.962 0.0015 260); + --raw-surface-2: oklch(0.936 0.002 260); + --raw-surface-3: oklch(0.9 0.0025 260); + --raw-text-primary: oklch(0.2 0.004 260); + --raw-text-secondary: oklch(0.37 0.005 260); + --raw-text-muted: oklch(0.45 0.005 260); + --raw-edge-subtle: oklch(0.855 0.003 260); + --raw-edge-strong: oklch(0.7 0.005 260); + --raw-accent: oklch(0.47 0.14 220); + --raw-accent-emphasis: oklch(0.43 0.15 220); + --raw-grid: oklch(0.895 0.002 260); + --raw-grid-minor: oklch(0.945 0.001 260); + + --raw-state-ready: oklch(0.52 0.14 155); + --raw-state-partial: oklch(0.56 0.13 85); + --raw-state-stale: oklch(0.55 0.11 85); + --raw-state-unknown: oklch(0.46 0.015 260); + --raw-state-error: oklch(0.48 0.19 25); + + --raw-sev-info: oklch(0.55 0.08 250); + --raw-sev-low: oklch(0.55 0.12 85); + --raw-sev-medium: oklch(0.53 0.14 55); + --raw-sev-high: oklch(0.5 0.17 35); + --raw-sev-critical: oklch(0.45 0.2 25); + + --raw-graph-field: + radial-gradient(85% 70% at 50% 42%, oklch(0.995 0.008 250 / 0.9) 0%, transparent 62%), + radial-gradient(140% 120% at 50% 45%, oklch(0.965 0.008 264) 0%, oklch(0.918 0.012 268) 100%); + --raw-membrane-lift: oklch(1 0 0 / 0.9); + --raw-depth: oklch(0.52 0.03 262 / 0.16); + --raw-well: oklch(0.945 0.0018 260); + --raw-raised: oklch(1 0 0); + + --relief-line: oklch(0.55 0.025 250 / 0.55); + --relief-line-index: oklch(0.34 0.04 250 / 0.8); + --relief-fill-lo: oklch(0.955 0.004 250); + --relief-fill-hi: oklch(0.87 0.014 250); +} + +* { box-sizing: border-box; } + +html, body { + margin: 0; + padding: 0; + background: var(--raw-surface-0); + color: var(--raw-text-primary); + font-family: var(--font-sans); + -webkit-font-smoothing: antialiased; +} + +/* ---- typography: the two extremes of the scale are the two extremes of fit */ + +.td-legend { + font-size: 9px; + line-height: 1; + letter-spacing: 0.16em; + text-transform: uppercase; + font-weight: 500; + color: var(--raw-text-muted); + white-space: nowrap; +} +.td-title { + font-size: 10px; + line-height: 1; + letter-spacing: 0.13em; + text-transform: uppercase; + font-weight: 600; + color: var(--raw-text-secondary); +} +.td-value { + font-family: var(--font-mono); + font-variant-numeric: tabular-nums; + font-feature-settings: 'tnum' 1; + color: var(--raw-text-primary); +} +.td-unit { + font-size: 9px; + letter-spacing: 0.1em; + text-transform: uppercase; + color: var(--raw-text-muted); +} +.td-display { + font-family: var(--font-mono); + font-variant-numeric: tabular-nums; + font-weight: 500; + letter-spacing: -0.035em; + line-height: 0.92; + color: var(--raw-text-primary); +} +.td-rule { + flex: 1 1 0%; + height: 1px; + min-width: 8px; + background: var(--raw-edge-subtle); +} +.td-caption { + font-size: 11px; + line-height: 1.45; + color: var(--raw-text-secondary); +} +.td-caption b { + font-weight: 600; + color: var(--raw-text-primary); +} +.td-caption code, .mono { + font-family: var(--font-mono); + font-size: 0.94em; +} + +/* ---- chassis ---- */ + +.page { + width: 1440px; + margin: 0 auto; + padding: 0 0 28px; +} + +.spine { + display: flex; + align-items: baseline; + gap: 14px; + padding: 18px 28px 12px; + border-bottom: 1px solid var(--raw-edge-subtle); + background: var(--raw-surface-1); +} +.spine h1 { + margin: 0; + font-family: var(--font-mono); + font-size: 22px; + letter-spacing: 0.24em; + font-weight: 500; + text-transform: uppercase; +} +.spine .sub { + font-size: 12px; + color: var(--raw-text-secondary); + max-width: 640px; +} +.spine .chan { + font-family: var(--font-mono); + font-size: 11px; + color: var(--raw-accent); + letter-spacing: 0.1em; +} + +.readbar { + display: flex; + align-items: stretch; + border-bottom: 1px solid var(--raw-edge-subtle); + background: var(--raw-surface-1); +} +.readout { + padding: 9px 20px; + border-right: 1px solid var(--raw-edge-subtle); + display: flex; + flex-direction: column; + gap: 5px; + min-width: 0; +} +.readout .v { + font-family: var(--font-mono); + font-variant-numeric: tabular-nums; + font-size: 15px; + letter-spacing: -0.02em; + color: var(--raw-text-primary); +} +.readout .v .u { + font-size: 9px; + letter-spacing: 0.1em; + text-transform: uppercase; + color: var(--raw-text-muted); + margin-left: 5px; +} +.readout.grow { flex: 1 1 auto; border-right: none; } + +/* A milled region: hairline bezel plus four corner brackets. */ +.panel { + position: relative; + border: 1px solid var(--raw-edge-subtle); + background: var(--raw-surface-1); +} +.panel > .corner { + position: absolute; + width: 6px; + height: 6px; + border-color: var(--raw-edge-strong); + pointer-events: none; +} +.corner.tl { left: -1px; top: -1px; border-left: 1px solid; border-top: 1px solid; } +.corner.tr { right: -1px; top: -1px; border-right: 1px solid; border-top: 1px solid; } +.corner.bl { left: -1px; bottom: -1px; border-left: 1px solid; border-bottom: 1px solid; } +.corner.br { right: -1px; bottom: -1px; border-right: 1px solid; border-bottom: 1px solid; } + +.panel-head { + display: flex; + align-items: center; + gap: 8px; + padding: 8px 12px; + border-bottom: 1px solid var(--raw-edge-subtle); +} + +.field { + background: var(--raw-graph-field); + box-shadow: var(--shadow-well); + position: relative; +} + +.graticule { + background-image: + linear-gradient(to right, var(--raw-grid) 1px, transparent 1px), + linear-gradient(to bottom, var(--raw-grid) 1px, transparent 1px), + linear-gradient(to right, var(--raw-grid-minor) 1px, transparent 1px), + linear-gradient(to bottom, var(--raw-grid-minor) 1px, transparent 1px); + background-size: + calc(var(--grid-cell) * 4) calc(var(--grid-cell) * 4), + calc(var(--grid-cell) * 4) calc(var(--grid-cell) * 4), + var(--grid-cell) var(--grid-cell), + var(--grid-cell) var(--grid-cell); + background-position: center center; +} + +/* The instrument plate a legend is engraved on: raised, not recessed, because + * a legend is read OFF the face. */ +.plate { + background: var(--raw-raised); + box-shadow: var(--shadow-raised); + border: 1px solid var(--raw-edge-subtle); + padding: 10px 12px; +} + +.note { + margin: 18px 28px 0; + border: 1px solid var(--raw-edge-subtle); + background: var(--raw-surface-1); + display: grid; + grid-template-columns: 1.15fr 1fr 0.85fr; +} +.note section { padding: 13px 16px; border-right: 1px solid var(--raw-edge-subtle); } +.note section:last-child { border-right: none; } +.note h2 { + margin: 0 0 8px; + font-size: 10px; + letter-spacing: 0.13em; + text-transform: uppercase; + font-weight: 600; + color: var(--raw-text-secondary); +} +.note p { margin: 0 0 7px; } +.note p:last-child { margin-bottom: 0; } +.note dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; } +.note dt { + font-family: var(--font-mono); + font-size: 10px; + color: var(--raw-accent); + letter-spacing: 0.04em; + white-space: nowrap; +} +.note dd { margin: 0; font-size: 11px; line-height: 1.4; color: var(--raw-text-secondary); } + +/* Absence is drawn, not cropped: this is the hatch every page uses for a + * region TraceDecay does not hold. */ +.absence-hatch { + fill: none; + stroke: var(--raw-text-muted); + stroke-width: 1; + stroke-dasharray: 3 4; + opacity: 0.55; +} + +svg text { font-family: var(--font-mono); fill: var(--raw-text-secondary); } +svg .lbl { font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; fill: var(--raw-text-muted); } +svg .name { font-size: 11px; fill: var(--raw-text-primary); letter-spacing: -0.01em; } +svg .num { font-size: 9px; fill: var(--raw-text-muted); font-variant-numeric: tabular-nums; } diff --git a/mockups/code-topography/topography.js b/mockups/code-topography/topography.js new file mode 100644 index 0000000000..feff9f864d --- /dev/null +++ b/mockups/code-topography/topography.js @@ -0,0 +1,185 @@ +/* Shared geometry for the code-topography mockups. + * + * Two things live here and nothing else: (1) the kind→hue arithmetic, copied + * verbatim from dashboard/src/viz/graph/kindColor.ts so a `struct` is the same + * hue on these pages as it is on the Code workspace's spine; (2) the relief + * primitives — seeded blob outlines and bundled flow splines — that all four + * pages draw with. Every function here is deterministic: the same fixture + * produces the same picture on every screenshot run. + */ + +/* Classic script, not an ES module: these pages are opened straight off + * disk (file://), where module scripts are blocked by CORS. Everything hangs + * off one global namespace instead. */ +window.TOPO = (function () { +'use strict'; + +/* ---- kind hue: verbatim transcription of kindColor.ts ------------------- */ + +function hashKind(kind) { + let hash = 0; + for (let index = 0; index < kind.length; index += 1) { + hash = (hash * 31 + kind.charCodeAt(index)) >>> 0; + } + return hash; +} + +/** @param light whether the kind is drawn against a light medium. */ +function kindColor(kind, light) { + const hash = hashKind(kind); + const chroma = (light ? 0.135 : 0.152) + ((hash >>> 9) % 6) * 0.012; + const lightness = light ? 0.55 : 0.72; + return `oklch(${lightness} ${chroma.toFixed(3)} ${186 + (hash % 148)})`; +} + +/** Both sides of the hue as custom properties, so a mark carries dark+light + * and the stylesheet picks — no theme observer, exactly as the app does it. */ +function kindVars(kind) { + return `--kind-dark:${kindColor(kind, false)};--kind-light:${kindColor(kind, true)}`; +} + +/** + * The paint every kind-tinted mark in these pages actually uses. + * + * A canvas has to be handed a resolved colour, but these sheets are SVG, so a + * mark can carry both sides of the hue and let the stylesheet pick — which is + * how the console answers a theme flip everywhere else (see `kindColorVars`). + * The first request for a kind registers one custom property with its dark + * value and a `[data-theme='light']` override with its light value, and every + * call site just gets `var(--p-…)` back. No observer, no re-render, no second + * copy of the arithmetic. + */ +let paletteSheet = null; +const registered = Object.create(null); +function paint(kind) { + const key = 'p-' + String(kind).replace(/[^a-z0-9]+/gi, '-').toLowerCase(); + if (!registered[key]) { + registered[key] = true; + if (!paletteSheet) { + const node = document.createElement('style'); + document.head.appendChild(node); + paletteSheet = node.sheet; + } + paletteSheet.insertRule( + ':root{--' + key + ':' + kindColor(kind, false) + '}', + paletteSheet.cssRules.length, + ); + paletteSheet.insertRule( + ":root[data-theme='light']{--" + key + ':' + kindColor(kind, true) + '}', + paletteSheet.cssRules.length, + ); + } + return 'var(--' + key + ')'; +} + +/* ---- deterministic noise ------------------------------------------------ */ + +function rng(seed) { + let a = seed >>> 0; + return function next() { + a += 0x6d2b79f5; + let t = a; + t = Math.imul(t ^ (t >>> 15), t | 1); + t ^= t + Math.imul(t ^ (t >>> 7), t | 61); + return ((t ^ (t >>> 14)) >>> 0) / 4294967296; + }; +} + +/** + * A closed relief outline. Not decorative noise: `rough` is handed the + * region's own irregularity measure by the caller, so a lumpy coastline means + * a lumpy module and a smooth one means a tight one. + */ +function blobPath(cx, cy, radiusX, radiusY, seed, rough = 0.16, samples = 84) { + const random = rng(seed); + const harmonics = [ + { k: 2 + Math.floor(random() * 2), a: rough * (0.55 + random() * 0.5), p: random() * 6.283 }, + { k: 3 + Math.floor(random() * 3), a: rough * (0.34 + random() * 0.4), p: random() * 6.283 }, + { k: 6 + Math.floor(random() * 4), a: rough * (0.14 + random() * 0.2), p: random() * 6.283 }, + ]; + let d = ''; + for (let i = 0; i <= samples; i += 1) { + const t = (i / samples) * Math.PI * 2; + let m = 1; + for (const h of harmonics) m += h.a * Math.sin(h.k * t + h.p); + const x = cx + Math.cos(t) * radiusX * m; + const y = cy + Math.sin(t) * radiusY * m; + d += (i === 0 ? 'M' : 'L') + x.toFixed(2) + ' ' + y.toFixed(2); + } + return d + 'Z'; +} + +/** + * A hierarchically bundled flow. Waypoints are the bundle's trunk; the spline + * is a Catmull–Rom through them converted to cubic beziers, which is what + * makes several flows sharing a trunk read as one braided channel rather than + * as parallel arrows. + */ +function bundledPath(points, tension = 0.5) { + if (points.length < 2) return ''; + const p = [points[0], ...points, points[points.length - 1]]; + let d = `M${p[1][0].toFixed(2)} ${p[1][1].toFixed(2)}`; + for (let i = 1; i < p.length - 2; i += 1) { + const [x0, y0] = p[i - 1]; + const [x1, y1] = p[i]; + const [x2, y2] = p[i + 1]; + const [x3, y3] = p[i + 2]; + const c1x = x1 + ((x2 - x0) / 6) * tension * 2; + const c1y = y1 + ((y2 - y0) / 6) * tension * 2; + const c2x = x2 - ((x3 - x1) / 6) * tension * 2; + const c2y = y2 - ((y3 - y1) / 6) * tension * 2; + d += `C${c1x.toFixed(2)} ${c1y.toFixed(2)},${c2x.toFixed(2)} ${c2y.toFixed(2)},${x2.toFixed(2)} ${y2.toFixed(2)}`; + } + return d; +} + +/** + * A tapered ribbon along a spline: width is a MEASURED quantity at each end + * (call sites entering, call sites leaving), so a channel that loses volume + * to a branch visibly narrows past the fork. + */ +function ribbonPath(points, widthStart, widthEnd) { + const n = points.length; + if (n < 2) return ''; + const normals = points.map((pt, i) => { + const a = points[Math.max(0, i - 1)]; + const b = points[Math.min(n - 1, i + 1)]; + const dx = b[0] - a[0]; + const dy = b[1] - a[1]; + const len = Math.hypot(dx, dy) || 1; + return [-dy / len, dx / len]; + }); + const w = (i) => (widthStart + (widthEnd - widthStart) * (i / (n - 1))) / 2; + const upper = points.map((pt, i) => [pt[0] + normals[i][0] * w(i), pt[1] + normals[i][1] * w(i)]); + const lower = points + .map((pt, i) => [pt[0] - normals[i][0] * w(i), pt[1] - normals[i][1] * w(i)]) + .reverse(); + // The return leg starts at the far end of the upper edge, so its leading + // moveto becomes a lineto — concatenating the two `M` paths without doing + // that fuses two coordinates into one enormous number and the ribbon flies + // off the canvas. + return bundledPath(upper) + 'L' + bundledPath(lower).slice(1) + 'Z'; +} + +/* ---- small DOM helpers -------------------------------------------------- */ + +const NS = 'http://www.w3.org/2000/svg'; + +function el(name, attrs = {}, parent = null) { + const node = document.createElementNS(NS, name); + for (const [k, v] of Object.entries(attrs)) { + if (v === null || v === undefined) continue; + node.setAttribute(k, String(v)); + } + if (parent) parent.appendChild(node); + return node; +} + +function text(parent, x, y, content, cls = 'lbl', extra = {}) { + const node = el('text', { x, y, class: cls, ...extra }, parent); + node.textContent = content; + return node; +} + + return { hashKind, kindColor, kindVars, paint, rng, blobPath, bundledPath, ribbonPath, NS, el, text }; +})(); diff --git a/mockups/code-topography/trace.html b/mockups/code-topography/trace.html new file mode 100644 index 0000000000..7cb7febc25 --- /dev/null +++ b/mockups/code-topography/trace.html @@ -0,0 +1,499 @@ + + + + +TRACE — one function as a watershed + + + + +
+ +
+ 02 +

Trace

+ One symbol as a watershed. Callers are the tributary system above it, callees the delta below it, + width is call sites, and the whole system is drawn over the dimmed relief of sheet 01 so every crossing of a + shoreline is a call leaving its module. +
+ +
+
FocusRetrievalService::resolve_context
+
Callers ≤ 3 hops12 53 call sites
+
Callees ≤ 3 hops14 61 call sites
+
Depth limit3 ↑ / 3 ↓
+
Beyond the limit41 not drawn
+
Types entered4 membranes
+
Modules crossed7 shorelines: 9
+
+ +
+ +
+
+
Width
+ +
Call sites on that one edge. Volume is not conserved: a function reached 58 times may + call the next one 34 times, so a channel legitimately narrows without anything branching off it.
+
+
+
Direction
+ +
Two hues off the same kindColor.ts arc. Upstream channels also widen as they + converge; downstream channels narrow as they fan. Hue and taper say the same thing twice, on purpose.
+
+
+
Membrane
+ +
A translucent enclosure is one type — an impl block, solid edge; a + trait, dashed edge, because the concrete side is chosen at run time. Ports mark where flow + crosses the boundary.
+
+
+
Underlay
+ +
Sheet 01's relief for the 7 modules this trace touches, dimmed to 22 %. Nothing about + it is decorative: shorelines are module boundaries, and the flow crossing one is a cross-module call.
+
+
+
Rows
+ +
Hop distance from the focus, not elevation. It happens to run downhill here because the + call graph is acyclic through this symbol; where it is not, a row is captioned as a hop ring only.
+
+
+
Absence
+ +
A channel that ends in a dashed mouth has left the graph: dynamic dispatch through a + trait object with no resolvable impl. The channel is drawn to its full width and then stops. It is not + deleted and it is not guessed at.
+
+
+ +
+
+

What this is

+

The answer to "who calls this, and what does it call" drawn as one hydrological + system rather than two lists or a route map. Fifty-three call sites converge from four modules into one + basin; sixty-one leave it and disperse into five.

+

Callers and callees are the same picture because they are the same water. The reader + does not trace a path between two points — they see a catchment: how wide it is, where it drains from, and + which types the water has to pass through. The membranes are the part that makes this structural rather + than topological: a call is not just an arrow between functions, it is an entry into a type, a movement + between that type's methods, and an exit.

+
+
+

Channel → data

+
+
row
hop distance on calls edges, depth-limited to 3 in each direction. Real (callers / callees).
+
channel width
call-site count on that single edge. Real; per-edge call-site counts exist.
+
node width
the symbol's degree. Real; it is on every node payload.
+
node hue
kind through kindColor.ts, unchanged.
+
membrane
contains edges from an impl/trait node to its methods. Real; contains is an edge kind.
+
underlay
sheet 01's relief, filtered to the modules holding a traced file_path. Real.
+
dashed mouth
a calls edge whose target failed to resolve. Real — it is the absence the extractor already records.
+
+

26 nodes at ≤3 hops, well inside the subgraph endpoint's 80–250 + band, so this sheet is a direct render — no aggregation, unlike sheet 01.

+
+
+

Open question

+

Membranes and modules are two different containments drawn as two different kinds of + enclosure, and at three hops they already overlap awkwardly — a type whose methods live in two files cannot be + one convex membrane. Options: (a) let a membrane be non-convex and let it look like the mess it is; (b) drop + the module underlay on this sheet and keep only types; (c) draw the membrane as a tint on the flow — + the water changes colour while it is inside a type — instead of an enclosure at all. (c) is the only one that + composes at 6 hops, but it loses the "you are inside something" feeling that makes this sheet work.

+

Also unresolved: at depth 3 this is legible; at depth 5 the tributary count roughly + cubes. Does the sheet degrade by aggregating far rows into single channels with a count, or by refusing and + saying so?

+
+
+
+ + + + + diff --git a/mockups/structure-viz/README.md b/mockups/structure-viz/README.md new file mode 100644 index 0000000000..3a70d945c6 --- /dev/null +++ b/mockups/structure-viz/README.md @@ -0,0 +1,50 @@ +# Structure-viz mockups + +Screenshot-ready **concept mockups** — not production code, not wired to +anything, and deliberately outside `dashboard/src/`. Three surfaces exploring +one question: how do symbols connect to threads, sessions and memory, and how do +we draw call chains and architecture without falling back on bland UML? + +| Concept | Page | Note | +| --- | --- | --- | +| 1 · Symbol anatomy | [`symbol-anatomy.html`](symbol-anatomy.html) | [note](notes/symbol-anatomy.md) | +| 2 · Call-chain transit map | [`call-chain-transit.html`](call-chain-transit.html) | [note](notes/call-chain-transit.md) | +| 3 · Disagreement field | [`disagreement-field.html`](disagreement-field.html) | [note](notes/disagreement-field.md) | + +Shots in [`shots/`](shots/), dark and light, 1440 wide at 2× — six files. + +## Ground rules these follow + +- **Every position, size and brightness encodes a stated measurement**, and each + figure's caption says exactly what encodes what — including the channels that + encode *nothing* (a connector's length, a hand-laid node's position). +- **Absence is shown, not cropped.** Each page carries at least one deliberate + beat where missing data keeps its slot and is labelled `unrecorded`, + `absent`, `uncovered`, `no station`, or drawn hollow. Unmeasured is never + collapsed into zero. +- **All data is invented.** Each note names precisely which fields a real + backend would have to serve and which ones I am least confident exist today. + +## Running them + +Open any page from `file://`. Theme comes from a query parameter: + + …/symbol-anatomy.html?theme=light # default is dark + +Chrome tokens are copied verbatim from `dashboard/src/theme/tokens.css` and the +`@theme` block of `dashboard/src/theme/tailwind.css`; `kindColor()` is a +line-for-line port of `dashboard/src/viz/graph/kindColor.ts` so a kind lands on +the same hue here as in the product. Those copies exist only because a +standalone `file://` page cannot import the product modules — **if the palette +or the token values move, these mockups are stale and should be regenerated +rather than patched.** + +## Re-shooting + + node mockups/structure-viz/shoot.mjs # all six + node mockups/structure-viz/shoot.mjs disagreement # one page, both themes + +`shoot.mjs` drives `file://` directly — no dev server, no daemon. It resolves +`@playwright/test` from whichever `dashboard/` directory actually has +`node_modules` (a git worktree has none of its own); override with +`TD_DASHBOARD_DIR`. diff --git a/mockups/structure-viz/call-chain-transit.html b/mockups/structure-viz/call-chain-transit.html new file mode 100644 index 0000000000..9675c11c00 --- /dev/null +++ b/mockups/structure-viz/call-chain-transit.html @@ -0,0 +1,437 @@ + + + + + +Call-chain transit map — mockup + + + +
+ +
+
+
call-chain transit map
+
graph_overview & feedback_submit
+
+ two 8-station chains plotted on one shared depth axis · tracedecay workspace, 8 crates +
+
+
+
chains2
+
stations16
+
hops14
+
+ layer climbs + 1 +
+
+
+ + +
+ route a + + mcp context → graph overview → row read + + + + + descends only · 5 → 0 + +
+
+ +
+ band order = measured dependency depth — the longest + path from that crate to a leaf crate in the workspace's Cargo dependency graph (domain = 0, api = 5). It is a + measurement, not an editorial diagram of how the layers ought to sit · + vertical position = the crate that owns the station · horizontal position = position in the chain, evenly spaced, + and encodes nothing about time or cost · station hue = symbol kind, on the product's kindColor arc · + the ruler at the foot carries one numeral per hop: the depth delta that hop crosses, negative downward · + the two hatched bands are workspace crates at these depths that this chain never enters — they keep their full + height and their label, because a chart that drops the layers a chain skips cannot show a layer being skipped +
+
+ + +
+ route b + + feedback submit → correction write → catalog refresh + + + + + climbs +3 at hop 5 + +
+
+ +
+ the same bands, the same scale and the same station geometry as route A — only the line differs · + the climbing hop is drawn at its true steepness (it cannot be given a 45° elbow, because the depth it crosses + exceeds the horizontal room a single hop gets) and wears the error hue and a double stroke · + this chain is not proof of a bug — a legitimate + callback can climb; what the map claims is only that the call graph crosses a layer boundary upward, which is + the thing worth arguing about +
+
+ +
+ mockup + + concept only · every symbol, depth and hop on this page is invented · see notes/call-chain-transit.md + + + +
+
+ + + + diff --git a/mockups/structure-viz/disagreement-field.html b/mockups/structure-viz/disagreement-field.html new file mode 100644 index 0000000000..ce8cfa5b2f --- /dev/null +++ b/mockups/structure-viz/disagreement-field.html @@ -0,0 +1,475 @@ + + + + + +Disagreement field — mockup + + + +
+ +
+
+
disagreement field
+
what the compiler links vs. what the work touches
+
+ 25 symbols · call edges from the graph, co-change edges from sessions that edited both within one session +
+
+
+
symbols25
+
call edges
+
co-change pairs
+
+ unlinked co-change + +
+
+
+ + +
+
+
+ +
+
+
+ + coupled & called +
+
+ one calls the other and they get edited in the same session. + Agreement. The expected state, so it is drawn quietest. +
+
+
+
+
+ +
+
+
+ + called, never co-touched +
+
+ a real call edge that no captured session has ever crossed. Usually a settled interface — + occasionally a piece of code nobody has had to think about in months. +
+
+
+
+
+ + + + +
+
+
+ + co-changed, not linked +
+
+ edited together, repeatedly, with no call edge in either direction. + The coupling is real and the code does not record it. This is the finding. +
+
+
+
+ +
+
+ +
+
+ node position = module cluster, hand-laid for legibility — position + carries no magnitude here, only membership, and the cluster label states which module · + node diameter = sessions that edited this symbol + (1 → 9), which is the denominator every co-change claim rests on: a symbol touched once cannot co-change with anything · + node hue = symbol kind, on the product's kindColor arc · + edge state = the three declared above; the loud state is drawn last and on top, because a finding that renders + underneath the expected case is not a finding · + three symbols carry no session attribution at all and + are drawn hollow — their absence from the co-change layer is + unmeasured, not zero, and collapsing that distinction is the easiest lie this + chart could tell +
+
+ + +
+ the unlinked pairs, in full + + + sorted by shared sessions, descending · every pair verified to have no call edge in either direction + +
+
+ +
+ mockup + + concept only · every symbol, edge and session count is invented · the three legend counts are computed from the + edge list, not typed · see notes/disagreement-field.md + + + +
+
+ + + + diff --git a/mockups/structure-viz/notes/call-chain-transit.md b/mockups/structure-viz/notes/call-chain-transit.md new file mode 100644 index 0000000000..172786184b --- /dev/null +++ b/mockups/structure-viz/notes/call-chain-transit.md @@ -0,0 +1,75 @@ +# Call-chain transit map — design note + +`call-chain-transit.html` · shots: `shots/call-chain-transit-{dark,light}.png` + +A call chain drawn as a route across horizontal strata, where the strata are +ordered by a *measured* quantity. The point is that layering violations become a +**silhouette** rather than a finding you have to read: route A is a staircase +with no risers, route B has one riser, and you can tell them apart from across +the room without reading a single symbol name. + +## What each channel encodes + +| Channel | Encodes | +| --- | --- | +| Band (vertical position) | The crate that owns the station. | +| Band **order** | Measured dependency depth — the longest path from that crate to a leaf crate in the workspace's Cargo dependency graph. `tracedecay-domain` = 0, `tracedecay-api` = 5. | +| Gutter numeral | That depth, printed. It is the axis tick; the crate name annotates it. | +| Station x-position | Position in the chain, 1 → 8, evenly spaced. Encodes **nothing** about time, cost or call frequency. | +| Station hue | Symbol kind, `kindColor` arc. | +| Station numeral | Chain order. | +| Line | The chain. Level runs plus a 45° diagonal per hop — except where the depth crossed exceeds the horizontal room a hop gets, where the diagonal is simply steeper. | +| Line colour | Accent for a hop that descends or stays level; error hue plus a halo and a double stroke for a hop that climbs. | +| Foot ruler numeral | That hop's depth delta, negative downward. | + +Both panels share one band geometry, one scale and one station spacing, so the +two silhouettes are directly comparable — that is the whole argument for +stacking them rather than putting them side by side. + +## Where absence is shown rather than cropped + +`tracedecay-hooks` and `tracedecay-tool-catalog` sit at depths 4 and 3 and +neither chain enters them. They keep their full band height, their gutter label +and their depth numeral, hatched and captioned `NO STATION ON THIS ROUTE`. A +strata chart that quietly drops the layers a chain skips is structurally +incapable of showing you a layer being skipped — which is one of the two things +this chart is for. Route B additionally leaves `tracedecay-domain` empty, and +that empty band is the visible fact that the correction path never reaches the +domain model. + +## What data would back it, honestly + +Invented: every symbol, every hop, both routes, and all depth values. + +- **Dependency depth per crate.** The one number the entire chart's ordering + rests on. A workspace Cargo graph makes this computable and it is the thing I + would verify first, because if the ordering is editorial the chart is a UML + diagram with better typography and the caption is a lie. +- **The chain itself.** Call chains between two symbols are a graph query; an + 8-station chain is plausible. What is invented is that these *particular* + eight symbols form a chain. +- **Crate ownership per symbol.** Should be free from file paths. +- The eight crates are real names from this workspace; the depths assigned to + them are guesses that happen to be consistent with the obvious layering. + +## One open question + +**Which chain does a user get, and who picks it?** The map is compelling for one +chosen chain and says nothing about how that chain was chosen. Between two +symbols there are usually many paths; the shortest one is the least likely to +contain the violation, and "all of them" is a hairball. The honest options are +(a) pick the chain that maximises depth climbs and label it as such — a +*worst-path* view, useful and clearly captioned; (b) let the user drive it from +a selected symbol; or (c) drop the two-symbol framing and draw every chain that +contains a climb, which is a different chart. I do not think the surface is +shippable until that selection rule is stated on it. + +## Known mockup shortcuts + +- Exactly 8 stations, hand-sized to the width. Longer chains need either + scrolling or a rank cut-off, and the label spacing does not survive either. +- Station labels are `module` + short name; the crate comes from the band. A + chain crossing two modules with the same leaf name would read ambiguously. +- A climbing hop is not necessarily a bug — a legitimate callback climbs. The + page says so; a real surface would need to let the user mark a climb as + intended, which implies persistent state this mockup does not model. diff --git a/mockups/structure-viz/notes/disagreement-field.md b/mockups/structure-viz/notes/disagreement-field.md new file mode 100644 index 0000000000..f0008596c9 --- /dev/null +++ b/mockups/structure-viz/notes/disagreement-field.md @@ -0,0 +1,80 @@ +# Disagreement field — design note + +`disagreement-field.html` · shots: `shots/disagreement-field-{dark,light}.png` + +Two graphs over the same 25 symbols — the call graph, and the co-change graph +built from sessions that edited two symbols within one session — overlaid so +that the interesting cell is the one where they **disagree**. The loud state is +the pair that gets edited together over and over with no call edge in either +direction: coupling that is real, repeated, and entirely absent from the code. + +## What each channel encodes + +| Channel | Encodes | +| --- | --- | +| Node position | Module cluster membership only. Hand-laid; **position carries no magnitude**, and the caption says so outright. | +| Node diameter | Sessions that edited this symbol, 1 → 9. This is the denominator every co-change claim rests on — a symbol touched once cannot co-change with anything, and the reader can see that. | +| Node hue | Symbol kind, `kindColor` arc. | +| Edge: thin solid, edge-strong | **Coupled and called** — a call edge whose ends also co-change. Agreement, and therefore drawn quietest. | +| Edge: fine dotted, edge-subtle | **Called, never co-touched** — a real call edge no captured session has crossed. | +| Edge: conflicting hue, halo + weighted stroke | **Co-changed, not linked.** The finding. Stroke width = shared sessions. | +| Draw order | call-only → coupled → unlinked, so the finding lands on top. A finding that renders under the expected case is not a finding. | + +The three counts in the key and the four in the masthead are **computed from the +edge list at render time**, not typed into the markup, so the caption and the +picture cannot drift apart. The seven unlinked pairs are also printed in full +below the field, sorted by shared sessions — the field shows that the state +exists and where it clusters; only the table says *which*. + +## Where absence is shown rather than cropped + +Three of the 25 symbols (`storage::open_reader`, `kind_histogram`, +`snapshot::validate`) have **no session attribution at all**. They are drawn as +open dashed circles at the low end of the diameter scale, and they still carry +their call edges. Their absence from the co-change layer is **unmeasured, not +zero** — and collapsing that distinction is the easiest lie this chart could +tell, because a symbol nobody has captured a session for looks exactly like a +symbol nobody edits together with anything. The caption names it. + +## What data would back it, honestly + +Invented: all 25 symbols, all 39 edges, every session count. + +- **Co-change edges.** The load-bearing new data: for each session, the set of + symbols it edited, pairwise. Everything loud on this page comes from that + join, and it is the piece I would verify exists before drawing any of this. + Its quality also depends entirely on capture coverage — sessions from before + capture was installed produce false "never co-touched". +- **Sessions-per-symbol**, for the diameter and for the honesty about the three + unattributed nodes. +- **Call edges** — the one layer I would expect to be solid. +- Symbol names and module membership are shaped like this repo's real crates; + the specific symbols and their pairings are made up. + +A real version also needs a **threshold**, which this mockup dodges: two symbols +sharing one session is noise. The page shows pairs down to 2 shared sessions and +does not state a cut-off — a shipping version must. + +## One open question + +**Is "no call edge" the right definition of unlinked, or just the cheap one?** +Two symbols can be genuinely coupled through a trait impl, a serialized schema, +a config key, a generated binding, or a test fixture — none of which is a call +edge, all of which would make a pair land in the loud bucket while being +perfectly well recorded in the code. If that is common, the loud state is mostly +false positives and the chart trains people to ignore it. The question is +whether "linked" should mean *any* graph relationship rather than a call edge, +and I cannot answer it from the mockup: it needs a sample of real co-change +pairs, hand-classified, before the third edge state is worth shipping at this +volume. + +## Known mockup shortcuts + +- 25 nodes hand-placed, labels hand-positioned. Neither survives real data; a + real field needs a layout and a label solver, and the "position means nothing" + caption is only honest as long as the layout stays deliberate. +- Undirected edges. Call direction is dropped, which is fine for the + disagreement question and would be wrong for anything else. +- No interaction: no hover, no filtering by threshold, no drill-through from a + pair to the sessions that produced it — which is the obvious next click and + the thing that would make the finding actionable. diff --git a/mockups/structure-viz/notes/symbol-anatomy.md b/mockups/structure-viz/notes/symbol-anatomy.md new file mode 100644 index 0000000000..60a75ec85c --- /dev/null +++ b/mockups/structure-viz/notes/symbol-anatomy.md @@ -0,0 +1,80 @@ +# Symbol anatomy — design note + +`symbol-anatomy.html` · shots: `shots/symbol-anatomy-{dark,light}.png` + +A drill-in for one symbol that puts the code neighbourhood and the *work* +neighbourhood on the same surface. The premise is that "who calls this" and +"who has been arguing about this in a session for three weeks" are the same +question asked twice, and a tabbed detail panel is what stops anyone from ever +noticing that. + +## What each channel encodes + +| Channel | Encodes | +| --- | --- | +| Bar length, left and right columns | Call sites between that neighbour and this symbol, 0 → 6. **One scale for both columns**, so a caller and a callee bar are directly comparable. | +| Bar hue | Neighbour's symbol kind, via the product's `kindColor` arc (ported verbatim). | +| Vertical order within a column | Call-site count, descending. Not alphabetical, not file order. | +| The curve | The call edge itself. Its length, curvature and crossing pattern encode **nothing** — it is linkage, and the caption says so. | +| Body plate cap hue | This symbol's own kind, same arc. | +| Session tick x-position | When that session last touched this symbol, linear over 63 real days. | +| Session tick height | Messages in that session, 0 → 214. | +| Session tick hue | Host (claude-code / codex / cursor / hermes). | +| Fact rail length | Trust, 0 → 1, anchored at zero. | +| Test dot | Run state — filled green/amber for green/stale, dashed outline for uncovered. | +| Pulsing dot | The only animated mark on the surface: an open session has this symbol in its working set. | + +## Where absence is shown rather than cropped + +Three deliberate beats, because this is the part a real implementation will be +tempted to shortcut: + +1. The 2026-06-02 session has **no recorded message count**. Its tick is drawn + hollow, dashed, at zero height, on its true x-position; the table row reads + `unrecorded`, not `0`. The session stays on the axis because it did edit the + symbol — dropping it would silently shrink the "6 sessions" headline. +2. The body plate prints `doc comment: absent` in the partial hue rather than + omitting the row. The field exists and is empty; those are different. +3. The uncovered policy-denied branch gets a row in the covering-tests table + with a dashed empty dot. A test list that only lists tests can never show you + the hole. + +## What data would back it, honestly + +Invented: **all of it**. Specifically what does *not* exist today: + +- **Call-site counts per neighbour.** The graph has caller/callee edges; a + per-edge *multiplicity* (how many times B calls A) is the load-bearing number + for the bar length and I did not verify it is stored. If it isn't, the bar + should fall back to a uniform mark and the caption must change — an invented + magnitude is exactly the failure mode this console exists to avoid. +- **Symbol ↔ session attribution.** Sessions are captured and symbols are + indexed; the join ("this session edited this symbol") is the whole premise of + the lower half. Message count per session and host are plausible, `last + touched this symbol` is the field I'd expect to be missing. +- **Facts citing a symbol.** Facts carry trust and feedback; a symbol-level + citation edge is the piece I'd check first. +- **Covering tests + per-branch coverage.** Test mapping exists in some form; + "9 of 12 branches" and the named uncovered branch imply branch-level coverage + data, which is a much stronger claim than a test-to-symbol map. +- Cyclomatic complexity, LOC, dependency depth: these are the fields most likely + to already exist. + +## One open question + +**Does the strike indicator survive being right?** It pulses when an open +session has the symbol in its working set — which, on the symbol you are +currently editing, is *always*. The one animated mark on the surface may end up +lit on essentially every drill-in a developer actually opens, at which point it +has told them nothing and cost them the only motion budget the console has. The +honest alternatives are to scope it to *other* sessions (someone else is in +here) or to drop the animation and keep only the `struck 4 min ago` readout. + +## Known mockup shortcuts + +- Fixed 1440 layout; no responsive behaviour, no virtualization, no empty/error + states, no keyboard equivalents for the SVG marks (the product would need the + list-beside-canvas pattern `CodePage` already uses). +- Neighbour columns are capped at what fits; a symbol with 200 callers would + need a rank cut-off and an honest "top N of M" legend, which this does not + demonstrate. diff --git a/mockups/structure-viz/shoot.mjs b/mockups/structure-viz/shoot.mjs new file mode 100644 index 0000000000..edf3aeffab --- /dev/null +++ b/mockups/structure-viz/shoot.mjs @@ -0,0 +1,64 @@ +/** + * Minimal file:// screenshooter for the structure-viz mockups. + * + * Deliberately NOT the product's stories/shot.ts: these are standalone concept + * pages with no daemon, no dev server and no #td-main to wait for. Each page + * reads ?theme=… itself, so one pass per theme is all this needs. + * + * node mockups/structure-viz/shoot.mjs # all pages, both themes + * node mockups/structure-viz/shoot.mjs anatomy # one page + */ +import { createRequire } from 'node:module'; +import { existsSync } from 'node:fs'; +import { fileURLToPath, pathToFileURL } from 'node:url'; +import { dirname, join, resolve } from 'node:path'; + +const here = dirname(fileURLToPath(import.meta.url)); + +/* A git worktree has no node_modules of its own — the dashboard's install + * lives in the primary checkout. Resolve Playwright from whichever dashboard + * dir actually has it rather than requiring an install per worktree. */ +function loadPlaywright() { + const roots = [ + resolve(here, '../../dashboard'), + process.env.TD_DASHBOARD_DIR, + '/fast/projects/tracedecay/dashboard', + ].filter(Boolean); + for (const root of roots) { + if (!existsSync(join(root, 'node_modules/@playwright/test'))) continue; + return createRequire(join(root, 'package.json'))('@playwright/test'); + } + throw new Error( + 'could not find @playwright/test; set TD_DASHBOARD_DIR to a dashboard dir that has node_modules', + ); +} +const { chromium } = loadPlaywright(); +const PAGES = [ + { slug: 'symbol-anatomy', height: 1180 }, + { slug: 'call-chain-transit', height: 1000 }, + { slug: 'disagreement-field', height: 1080 }, +]; + +const filter = process.argv[2]; +const wanted = filter ? PAGES.filter((p) => p.slug.includes(filter)) : PAGES; +if (wanted.length === 0) throw new Error(`no mockup matches "${filter}"`); + +const browser = await chromium.launch({ headless: true }); +for (const { slug, height } of wanted) { + for (const theme of ['dark', 'light']) { + const page = await browser.newPage({ + viewport: { width: 1440, height }, + deviceScaleFactor: 2, + // Freeze the one animated mark so consecutive shots are byte-comparable. + reducedMotion: 'reduce', + }); + const url = `${pathToFileURL(join(here, `${slug}.html`)).href}?theme=${theme}`; + await page.goto(url, { waitUntil: 'load' }); + await page.waitForTimeout(400); + const out = join(here, 'shots', `${slug}-${theme}.png`); + await page.screenshot({ path: out, fullPage: true }); + console.log('wrote', out); + await page.close(); + } +} +await browser.close(); diff --git a/mockups/structure-viz/symbol-anatomy.html b/mockups/structure-viz/symbol-anatomy.html new file mode 100644 index 0000000000..353368c0c5 --- /dev/null +++ b/mockups/structure-viz/symbol-anatomy.html @@ -0,0 +1,620 @@ + + + + + +Symbol anatomy — mockup + + + +
+ + +
+
+
+ symbol anatomy + tracedecay-application + function +
+
+ retrieval::service::graph_overview +
+
+ crates/tracedecay-application/src/retrieval/service.rs:412–487 +
+
+
+
callers7
+
callees9
+
sessions6
+
facts4
+
+ last strike + 4min +
+
+
+ + +
+ code afferents & efferents + + + 16 direct neighbours · 41 call sites · indirect callers not drawn + +
+ +
+ + + + + + + + + + + + + + this symbol + graph_overview + retrieval::service + + + + lines + 76 + cyclomatic + 9 + dep. depth + 1 + doc comment + absent + + + + callers — who reaches in + callees — what it reaches for + + +
+ bar length = call sites between that neighbour and this symbol (0 → 6, one scale for both sides) · + hue = neighbour kind on the product's kindColor arc · vertical order = call-site count, descending · + the curve is the edge, its length encodes nothing · + the body's own plate carries only measured fields; absent + is printed where the field exists and is empty, never blanked +
+
+ + +
+ + +
+
+ sessions that edited this symbol + + + 6 sessions · 63 days · 4 hosts · each links to its thread + +
+ +
+ + + + + + 2026-05-24 + 2026-07-24 · today + +
+ +
+ +
+ horizontal position = when the session last touched this symbol, on a linear 63-day axis · + tick height = messages in that session (0 → 214) · hue = host · + the 2026-06-02 session's message count was never recorded, so its tick is drawn + hollow at zero height and its row reads + unrecorded — the session is still on the axis, + because it did edit this symbol +
+
+ +
+ +
+
+ facts citing this symbol + + 4 · trust 0.46–0.98 +
+
+
+ rail length = trust (0 → 1, anchored at zero) · a fact below 0.5 is drawn at its real short length + rather than hidden, because a weak assertion about a hot symbol is the finding +
+
+ + +
+
+ covering tests + + 3 tests · 9 of 12 branches +
+
+ +
+ live + +
+
+ +
+
+ struck 4 min ago · write +
+
+ by code spine redesign + on claude-code · this thread is open now +
+
+
+
strikes / 24h
+
11
+
+
+
+ the pulsing dot is the only animated mark on the surface and it means exactly one thing: + an open session has this symbol in its working set · reduced-motion pins it lit +
+
+
+
+ +
+ mockup + + concept only · every value on this page is invented · see notes/symbol-anatomy.md for what a real + backend would have to serve + +
+
+ + + + diff --git a/plugin/cursor-native-extension/.gitignore b/plugin/cursor-native-extension/.gitignore new file mode 100644 index 0000000000..b947077876 --- /dev/null +++ b/plugin/cursor-native-extension/.gitignore @@ -0,0 +1,2 @@ +node_modules/ +dist/ diff --git a/plugin/cursor-native-extension/LICENSE b/plugin/cursor-native-extension/LICENSE new file mode 100644 index 0000000000..088a35b6c0 --- /dev/null +++ b/plugin/cursor-native-extension/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 Enzo Lombardi + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/plugin/cursor-native-extension/README.md b/plugin/cursor-native-extension/README.md new file mode 100644 index 0000000000..724b9270ce --- /dev/null +++ b/plugin/cursor-native-extension/README.md @@ -0,0 +1,20 @@ +# TraceDecay Cursor Native Diagnostics + +This Cursor desktop extension starts `tracedecay lsp bridge --stdio` through +`vscode-languageclient` and forwards bounded, workspace-scoped native +diagnostics to its `tracedecay/nativeDiagnostics` notification. +Untrusted or non-single-root workspaces resolve through a typed unavailable +state; multi-root workspaces do not start the bridge. + +TraceDecay packages the built, unpacked extension into Cursor's host-component +lifecycle under `.cursor/extensions/tracedecay.cursor-native-0.0.0/`. The +receipt-backed Doctor check verifies the deployed `package.json` and +`dist/extension.js`. The deployed bundle receives the installed TraceDecay +binary path from that lifecycle; `tracedecay.binaryPath` and `TRACEDECAY_BIN` +remain explicit overrides. + +`embedded/extension.js` is the sole checked-in compiled asset. The Rust host +bundle embeds it at compile time and the published crate must build with stock +Cargo without Node, so this generated file is an explicit offline-packaging +exception. `npm run build` regenerates it from TypeScript; `npm run +check:embedded` performs a byte-for-byte drift check. `dist/` remains ignored. diff --git a/plugin/cursor-native-extension/embedded/extension.js b/plugin/cursor-native-extension/embedded/extension.js new file mode 100644 index 0000000000..958345fc84 --- /dev/null +++ b/plugin/cursor-native-extension/embedded/extension.js @@ -0,0 +1,26918 @@ +"use strict"; +const __rslib_import_meta_url__ = /*#__PURE__*/ (function () { + return typeof document === 'undefined' + ? new (require('url'.replace('', '')).URL)('file:' + __filename).href + : (document.currentScript && document.currentScript.src) || + new URL('main.js', document.baseURI).href; +})(); +; +var __webpack_modules__ = ({ +"./node_modules/semver/classes/comparator.js"(module, __unused_rspack_exports, __webpack_require__) { + + +const ANY = Symbol('SemVer ANY') +// hoisted class for cyclic dependency +class Comparator { + static get ANY () { + return ANY + } + + constructor (comp, options) { + options = parseOptions(options) + + if (comp instanceof Comparator) { + if (comp.loose === !!options.loose) { + return comp + } else { + comp = comp.value + } + } + + comp = comp.trim().split(/\s+/).join(' ') + debug('comparator', comp, options) + this.options = options + this.loose = !!options.loose + this.parse(comp) + + if (this.semver === ANY) { + this.value = '' + } else { + this.value = this.operator + this.semver.version + } + + debug('comp', this) + } + + parse (comp) { + const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] + const m = comp.match(r) + + if (!m) { + throw new TypeError(`Invalid comparator: ${comp}`) + } + + this.operator = m[1] !== undefined ? m[1] : '' + if (this.operator === '=') { + this.operator = '' + } + + // if it literally is just '>' or '' then allow anything. + if (!m[2]) { + this.semver = ANY + } else { + this.semver = new SemVer(m[2], this.options.loose) + } + } + + toString () { + return this.value + } + + test (version) { + debug('Comparator.test', version, this.options.loose) + + if (this.semver === ANY || version === ANY) { + return true + } + + if (typeof version === 'string') { + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } + } + + return cmp(version, this.operator, this.semver, this.options) + } + + intersects (comp, options) { + if (!(comp instanceof Comparator)) { + throw new TypeError('a Comparator is required') + } + + if (this.operator === '') { + if (this.value === '') { + return true + } + return new Range(comp.value, options).test(this.value) + } else if (comp.operator === '') { + if (comp.value === '') { + return true + } + return new Range(this.value, options).test(comp.semver) + } + + options = parseOptions(options) + + // Special cases where nothing can possibly be lower + if (options.includePrerelease && + (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) { + return false + } + if (!options.includePrerelease && + (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) { + return false + } + + // Same direction increasing (> or >=) + if (this.operator.startsWith('>') && comp.operator.startsWith('>')) { + return true + } + // Same direction decreasing (< or <=) + if (this.operator.startsWith('<') && comp.operator.startsWith('<')) { + return true + } + // same SemVer and both sides are inclusive (<= or >=) + if ( + (this.semver.version === comp.semver.version) && + this.operator.includes('=') && comp.operator.includes('=')) { + return true + } + // opposite directions less than + if (cmp(this.semver, '<', comp.semver, options) && + this.operator.startsWith('>') && comp.operator.startsWith('<')) { + return true + } + // opposite directions greater than + if (cmp(this.semver, '>', comp.semver, options) && + this.operator.startsWith('<') && comp.operator.startsWith('>')) { + return true + } + return false + } +} + +module.exports = Comparator + +const parseOptions = __webpack_require__("./node_modules/semver/internal/parse-options.js") +const { safeRe: re, t } = __webpack_require__("./node_modules/semver/internal/re.js") +const cmp = __webpack_require__("./node_modules/semver/functions/cmp.js") +const debug = __webpack_require__("./node_modules/semver/internal/debug.js") +const SemVer = __webpack_require__("./node_modules/semver/classes/semver.js") +const Range = __webpack_require__("./node_modules/semver/classes/range.js") + + +}, +"./node_modules/semver/classes/range.js"(module, __unused_rspack_exports, __webpack_require__) { + + +const SPACE_CHARACTERS = /\s+/g + +// hoisted class for cyclic dependency +class Range { + constructor (range, options) { + options = parseOptions(options) + + if (range instanceof Range) { + if ( + range.loose === !!options.loose && + range.includePrerelease === !!options.includePrerelease + ) { + return range + } else { + return new Range(range.raw, options) + } + } + + if (range instanceof Comparator) { + // just put it in the set and return + this.raw = range.value + this.set = [[range]] + this.formatted = undefined + return this + } + + this.options = options + this.loose = !!options.loose + this.includePrerelease = !!options.includePrerelease + + // First reduce all whitespace as much as possible so we do not have to rely + // on potentially slow regexes like \s*. This is then stored and used for + // future error messages as well. + this.raw = range.trim().replace(SPACE_CHARACTERS, ' ') + + // First, split on || + this.set = this.raw + .split('||') + // map the range to a 2d array of comparators + .map(r => this.parseRange(r.trim())) + // throw out any comparator lists that are empty + // this generally means that it was not a valid range, which is allowed + // in loose mode, but will still throw if the WHOLE range is invalid. + .filter(c => c.length) + + if (!this.set.length) { + throw new TypeError(`Invalid SemVer Range: ${this.raw}`) + } + + // if we have any that are not the null set, throw out null sets. + if (this.set.length > 1) { + // keep the first one, in case they're all null sets + const first = this.set[0] + this.set = this.set.filter(c => !isNullSet(c[0])) + if (this.set.length === 0) { + this.set = [first] + } else if (this.set.length > 1) { + // if we have any that are *, then the range is just * + for (const c of this.set) { + if (c.length === 1 && isAny(c[0])) { + this.set = [c] + break + } + } + } + } + + this.formatted = undefined + } + + get range () { + if (this.formatted === undefined) { + this.formatted = '' + for (let i = 0; i < this.set.length; i++) { + if (i > 0) { + this.formatted += '||' + } + const comps = this.set[i] + for (let k = 0; k < comps.length; k++) { + if (k > 0) { + this.formatted += ' ' + } + this.formatted += comps[k].toString().trim() + } + } + } + return this.formatted + } + + format () { + return this.range + } + + toString () { + return this.range + } + + parseRange (range) { + // strip build metadata so it can't bleed into the version + range = range.replace(BUILDSTRIPRE, '') + + // memoize range parsing for performance. + // this is a very hot path, and fully deterministic. + const memoOpts = + (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | + (this.options.loose && FLAG_LOOSE) + const memoKey = memoOpts + ':' + range + const cached = cache.get(memoKey) + if (cached) { + return cached + } + + const loose = this.options.loose + // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` + const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE] + range = range.replace(hr, hyphenReplace(this.options.includePrerelease)) + debug('hyphen replace', range) + + // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` + range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace) + debug('comparator trim', range) + + // `~ 1.2.3` => `~1.2.3` + range = range.replace(re[t.TILDETRIM], tildeTrimReplace) + debug('tilde trim', range) + + // `^ 1.2.3` => `^1.2.3` + range = range.replace(re[t.CARETTRIM], caretTrimReplace) + debug('caret trim', range) + + // At this point, the range is completely trimmed and + // ready to be split into comparators. + + let rangeList = range + .split(' ') + .map(comp => parseComparator(comp, this.options)) + .join(' ') + .split(/\s+/) + // >=0.0.0 is equivalent to * + .map(comp => replaceGTE0(comp, this.options)) + + if (loose) { + // in loose mode, throw out any that are not valid comparators + rangeList = rangeList.filter(comp => { + debug('loose invalid filter', comp, this.options) + return !!comp.match(re[t.COMPARATORLOOSE]) + }) + } + debug('range list', rangeList) + + // if any comparators are the null set, then replace with JUST null set + // if more than one comparator, remove any * comparators + // also, don't include the same comparator more than once + const rangeMap = new Map() + const comparators = rangeList.map(comp => new Comparator(comp, this.options)) + for (const comp of comparators) { + if (isNullSet(comp)) { + return [comp] + } + rangeMap.set(comp.value, comp) + } + if (rangeMap.size > 1 && rangeMap.has('')) { + rangeMap.delete('') + } + + const result = [...rangeMap.values()] + cache.set(memoKey, result) + return result + } + + intersects (range, options) { + if (!(range instanceof Range)) { + throw new TypeError('a Range is required') + } + + return this.set.some((thisComparators) => { + return ( + isSatisfiable(thisComparators, options) && + range.set.some((rangeComparators) => { + return ( + isSatisfiable(rangeComparators, options) && + thisComparators.every((thisComparator) => { + return rangeComparators.every((rangeComparator) => { + return thisComparator.intersects(rangeComparator, options) + }) + }) + ) + }) + ) + }) + } + + // if ANY of the sets match ALL of its comparators, then pass + test (version) { + if (!version) { + return false + } + + if (typeof version === 'string') { + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } + } + + for (let i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version, this.options)) { + return true + } + } + return false + } +} + +module.exports = Range + +const LRU = __webpack_require__("./node_modules/semver/internal/lrucache.js") +const cache = new LRU() + +const parseOptions = __webpack_require__("./node_modules/semver/internal/parse-options.js") +const Comparator = __webpack_require__("./node_modules/semver/classes/comparator.js") +const debug = __webpack_require__("./node_modules/semver/internal/debug.js") +const SemVer = __webpack_require__("./node_modules/semver/classes/semver.js") +const { + safeRe: re, + src, + t, + comparatorTrimReplace, + tildeTrimReplace, + caretTrimReplace, +} = __webpack_require__("./node_modules/semver/internal/re.js") +const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = __webpack_require__("./node_modules/semver/internal/constants.js") + +// unbounded global build-metadata stripper used by parseRange +const BUILDSTRIPRE = new RegExp(src[t.BUILD], 'g') + +const isNullSet = c => c.value === '<0.0.0-0' +const isAny = c => c.value === '' + +// take a set of comparators and determine whether there +// exists a version which can satisfy it +const isSatisfiable = (comparators, options) => { + let result = true + const remainingComparators = comparators.slice() + let testComparator = remainingComparators.pop() + + while (result && remainingComparators.length) { + result = remainingComparators.every((otherComparator) => { + return testComparator.intersects(otherComparator, options) + }) + + testComparator = remainingComparators.pop() + } + + return result +} + +// comprised of xranges, tildes, stars, and gtlt's at this point. +// already replaced the hyphen ranges +// turn into a set of JUST comparators. +const parseComparator = (comp, options) => { + comp = comp.replace(re[t.BUILD], '') + debug('comp', comp, options) + comp = replaceCarets(comp, options) + debug('caret', comp) + comp = replaceTildes(comp, options) + debug('tildes', comp) + comp = replaceXRanges(comp, options) + debug('xrange', comp) + comp = replaceStars(comp, options) + debug('stars', comp) + return comp +} + +const isX = id => !id || id.toLowerCase() === 'x' || id === '*' + +const invalidXRangeOrder = (M, m, p) => ( + (isX(M) && !isX(m)) || + (isX(m) && p && !isX(p)) +) + +// ~, ~> --> * (any, kinda silly) +// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0 +// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0 +// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0 +// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0 +// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0 +// ~0.0.1 --> >=0.0.1 <0.1.0-0 +const replaceTildes = (comp, options) => { + return comp + .trim() + .split(/\s+/) + .map((c) => replaceTilde(c, options)) + .join(' ') +} + +const replaceTilde = (comp, options) => { + const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE] + // if we're including prereleases in the match, then the lower bound is + // -0, the lowest possible prerelease value, just like x-ranges and carets. + // this keeps `~1.2` equivalent to the `1.2.x` x-range it's documented as. + const z = options.includePrerelease ? '-0' : '' + return comp.replace(r, (_, M, m, p, pr) => { + debug('tilde', comp, _, M, m, p, pr) + let ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0` + } else if (isX(p)) { + // ~1.2 == >=1.2.0 <1.3.0-0 + ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0` + } else if (pr) { + debug('replaceTilde pr', pr) + ret = `>=${M}.${m}.${p}-${pr + } <${M}.${+m + 1}.0-0` + } else { + // ~1.2.3 == >=1.2.3 <1.3.0-0 + ret = `>=${M}.${m}.${p + } <${M}.${+m + 1}.0-0` + } + + debug('tilde return', ret) + return ret + }) +} + +// ^ --> * (any, kinda silly) +// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0 +// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0 +// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0 +// ^1.2.3 --> >=1.2.3 <2.0.0-0 +// ^1.2.0 --> >=1.2.0 <2.0.0-0 +// ^0.0.1 --> >=0.0.1 <0.0.2-0 +// ^0.1.0 --> >=0.1.0 <0.2.0-0 +const replaceCarets = (comp, options) => { + return comp + .trim() + .split(/\s+/) + .map((c) => replaceCaret(c, options)) + .join(' ') +} + +const replaceCaret = (comp, options) => { + debug('caret', comp, options) + const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET] + const z = options.includePrerelease ? '-0' : '' + return comp.replace(r, (_, M, m, p, pr) => { + debug('caret', comp, _, M, m, p, pr) + let ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0` + } else if (isX(p)) { + if (M === '0') { + ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0` + } else { + ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0` + } + } else if (pr) { + debug('replaceCaret pr', pr) + if (M === '0') { + if (m === '0') { + ret = `>=${M}.${m}.${p}-${pr + } <${M}.${m}.${+p + 1}-0` + } else { + ret = `>=${M}.${m}.${p}-${pr + } <${M}.${+m + 1}.0-0` + } + } else { + ret = `>=${M}.${m}.${p}-${pr + } <${+M + 1}.0.0-0` + } + } else { + debug('no pr') + if (M === '0') { + if (m === '0') { + ret = `>=${M}.${m}.${p + } <${M}.${m}.${+p + 1}-0` + } else { + ret = `>=${M}.${m}.${p + } <${M}.${+m + 1}.0-0` + } + } else { + ret = `>=${M}.${m}.${p + } <${+M + 1}.0.0-0` + } + } + + debug('caret return', ret) + return ret + }) +} + +const replaceXRanges = (comp, options) => { + debug('replaceXRanges', comp, options) + return comp + .split(/\s+/) + .map((c) => replaceXRange(c, options)) + .join(' ') +} + +const replaceXRange = (comp, options) => { + comp = comp.trim() + const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE] + return comp.replace(r, (ret, gtlt, M, m, p, pr) => { + debug('xRange', comp, ret, gtlt, M, m, p, pr) + if (invalidXRangeOrder(M, m, p)) { + return comp + } + + const xM = isX(M) + const xm = xM || isX(m) + const xp = xm || isX(p) + const anyX = xp + + if (gtlt === '=' && anyX) { + gtlt = '' + } + + // if we're including prereleases in the match, then we need + // to fix this to -0, the lowest possible prerelease value + pr = options.includePrerelease ? '-0' : '' + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0-0' + } else { + // nothing is forbidden + ret = '*' + } + } else if (gtlt && anyX) { + // we know patch is an x, because we have any x at all. + // replace X with 0 + if (xm) { + m = 0 + } + p = 0 + + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + gtlt = '>=' + if (xm) { + M = +M + 1 + m = 0 + p = 0 + } else { + m = +m + 1 + p = 0 + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<' + if (xm) { + M = +M + 1 + } else { + m = +m + 1 + } + } + + if (gtlt === '<') { + pr = '-0' + } + + ret = `${gtlt + M}.${m}.${p}${pr}` + } else if (xm) { + ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0` + } else if (xp) { + ret = `>=${M}.${m}.0${pr + } <${M}.${+m + 1}.0-0` + } + + debug('xRange return', ret) + + return ret + }) +} + +// Because * is AND-ed with everything else in the comparator, +// and '' means "any version", just remove the *s entirely. +const replaceStars = (comp, options) => { + debug('replaceStars', comp, options) + // Looseness is ignored here. star is always as loose as it gets! + return comp + .trim() + .replace(re[t.STAR], '') +} + +const replaceGTE0 = (comp, options) => { + debug('replaceGTE0', comp, options) + return comp + .trim() + .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '') +} + +// This function is passed to string.replace(re[t.HYPHENRANGE]) +// M, m, patch, prerelease, build +// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 +// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do +// 1.2 - 3.4 => >=1.2.0 <3.5.0-0 +// TODO build? +const hyphenReplace = incPr => ($0, + from, fM, fm, fp, fpr, fb, + to, tM, tm, tp, tpr) => { + if (isX(fM)) { + from = '' + } else if (isX(fm)) { + from = `>=${fM}.0.0${incPr ? '-0' : ''}` + } else if (isX(fp)) { + from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}` + } else if (fpr) { + from = `>=${from}` + } else { + from = `>=${from}${incPr ? '-0' : ''}` + } + + if (isX(tM)) { + to = '' + } else if (isX(tm)) { + to = `<${+tM + 1}.0.0-0` + } else if (isX(tp)) { + to = `<${tM}.${+tm + 1}.0-0` + } else if (tpr) { + to = `<=${tM}.${tm}.${tp}-${tpr}` + } else if (incPr) { + to = `<${tM}.${tm}.${+tp + 1}-0` + } else { + to = `<=${to}` + } + + return `${from} ${to}`.trim() +} + +const testSet = (set, version, options) => { + for (let i = 0; i < set.length; i++) { + if (!set[i].test(version)) { + return false + } + } + + if (version.prerelease.length && !options.includePrerelease) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (let i = 0; i < set.length; i++) { + debug(set[i].semver) + if (set[i].semver === Comparator.ANY) { + continue + } + + if (set[i].semver.prerelease.length > 0) { + const allowed = set[i].semver + if (allowed.major === version.major && + allowed.minor === version.minor && + allowed.patch === version.patch) { + return true + } + } + } + + // Version has a -pre, but it's not one of the ones we like. + return false + } + + return true +} + + +}, +"./node_modules/semver/classes/semver.js"(module, __unused_rspack_exports, __webpack_require__) { + + +const debug = __webpack_require__("./node_modules/semver/internal/debug.js") +const { MAX_LENGTH, MAX_SAFE_INTEGER } = __webpack_require__("./node_modules/semver/internal/constants.js") +const { safeRe: re, t } = __webpack_require__("./node_modules/semver/internal/re.js") + +const parseOptions = __webpack_require__("./node_modules/semver/internal/parse-options.js") +const { compareIdentifiers } = __webpack_require__("./node_modules/semver/internal/identifiers.js") + +const isPrereleaseIdentifier = (prerelease, identifier) => { + const identifiers = identifier.split('.') + if (identifiers.length > prerelease.length) { + return false + } + + for (let i = 0; i < identifiers.length; i++) { + if (compareIdentifiers(prerelease[i], identifiers[i]) !== 0) { + return false + } + } + + return true +} + +class SemVer { + constructor (version, options) { + options = parseOptions(options) + + if (version instanceof SemVer) { + if (version.loose === !!options.loose && + version.includePrerelease === !!options.includePrerelease) { + return version + } else { + version = version.version + } + } else if (typeof version !== 'string') { + throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`) + } + + if (version.length > MAX_LENGTH) { + throw new TypeError( + `version is longer than ${MAX_LENGTH} characters` + ) + } + + debug('SemVer', version, options) + this.options = options + this.loose = !!options.loose + // this isn't actually relevant for versions, but keep it so that we + // don't run into trouble passing this.options around. + this.includePrerelease = !!options.includePrerelease + + const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]) + + if (!m) { + throw new TypeError(`Invalid Version: ${version}`) + } + + this.raw = version + + // these are actually numbers + this.major = +m[1] + this.minor = +m[2] + this.patch = +m[3] + + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError('Invalid major version') + } + + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError('Invalid minor version') + } + + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError('Invalid patch version') + } + + // numberify any prerelease numeric ids + if (!m[4]) { + this.prerelease = [] + } else { + this.prerelease = m[4].split('.').map((id) => { + if (/^[0-9]+$/.test(id)) { + const num = +id + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num + } + } + return id + }) + } + + this.build = m[5] ? m[5].split('.') : [] + this.format() + } + + format () { + this.version = `${this.major}.${this.minor}.${this.patch}` + if (this.prerelease.length) { + this.version += `-${this.prerelease.join('.')}` + } + return this.version + } + + toString () { + return this.version + } + + compare (other) { + debug('SemVer.compare', this.version, this.options, other) + if (!(other instanceof SemVer)) { + if (typeof other === 'string' && other === this.version) { + return 0 + } + other = new SemVer(other, this.options) + } + + if (other.version === this.version) { + return 0 + } + + return this.compareMain(other) || this.comparePre(other) + } + + compareMain (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + if (this.major < other.major) { + return -1 + } + if (this.major > other.major) { + return 1 + } + if (this.minor < other.minor) { + return -1 + } + if (this.minor > other.minor) { + return 1 + } + if (this.patch < other.patch) { + return -1 + } + if (this.patch > other.patch) { + return 1 + } + return 0 + } + + comparePre (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + // NOT having a prerelease is > having one + if (this.prerelease.length && !other.prerelease.length) { + return -1 + } else if (!this.prerelease.length && other.prerelease.length) { + return 1 + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0 + } + + let i = 0 + do { + const a = this.prerelease[i] + const b = other.prerelease[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) + } + + compareBuild (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + let i = 0 + do { + const a = this.build[i] + const b = other.build[i] + debug('build compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) + } + + // preminor will bump the version up to the next minor release, and immediately + // down to pre-release. premajor and prepatch work the same way. + inc (release, identifier, identifierBase) { + if (release.startsWith('pre')) { + if (!identifier && identifierBase === false) { + throw new Error('invalid increment argument: identifier is empty') + } + // Avoid an invalid semver results + if (identifier) { + const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]) + if (!match || match[1] !== identifier) { + throw new Error(`invalid identifier: ${identifier}`) + } + } + } + + switch (release) { + case 'premajor': + this.prerelease.length = 0 + this.patch = 0 + this.minor = 0 + this.major++ + this.inc('pre', identifier, identifierBase) + break + case 'preminor': + this.prerelease.length = 0 + this.patch = 0 + this.minor++ + this.inc('pre', identifier, identifierBase) + break + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0 + this.inc('patch', identifier, identifierBase) + this.inc('pre', identifier, identifierBase) + break + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case 'prerelease': + if (this.prerelease.length === 0) { + this.inc('patch', identifier, identifierBase) + } + this.inc('pre', identifier, identifierBase) + break + case 'release': + if (this.prerelease.length === 0) { + throw new Error(`version ${this.raw} is not a prerelease`) + } + this.prerelease.length = 0 + break + + case 'major': + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if ( + this.minor !== 0 || + this.patch !== 0 || + this.prerelease.length === 0 + ) { + this.major++ + } + this.minor = 0 + this.patch = 0 + this.prerelease = [] + break + case 'minor': + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++ + } + this.patch = 0 + this.prerelease = [] + break + case 'patch': + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) { + this.patch++ + } + this.prerelease = [] + break + // This probably shouldn't be used publicly. + // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction. + case 'pre': { + const base = Number(identifierBase) ? 1 : 0 + + if (this.prerelease.length === 0) { + this.prerelease = [base] + } else { + let i = this.prerelease.length + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++ + i = -2 + } + } + if (i === -1) { + // didn't increment anything + if (identifier === this.prerelease.join('.') && identifierBase === false) { + throw new Error('invalid increment argument: identifier already exists') + } + this.prerelease.push(base) + } + } + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + let prerelease = [identifier, base] + if (identifierBase === false) { + prerelease = [identifier] + } + if (isPrereleaseIdentifier(this.prerelease, identifier)) { + const prereleaseBase = this.prerelease[identifier.split('.').length] + if (isNaN(prereleaseBase)) { + this.prerelease = prerelease + } + } else { + this.prerelease = prerelease + } + } + break + } + default: + throw new Error(`invalid increment argument: ${release}`) + } + this.raw = this.format() + if (this.build.length) { + this.raw += `+${this.build.join('.')}` + } + return this + } +} + +module.exports = SemVer + + +}, +"./node_modules/semver/functions/cmp.js"(module, __unused_rspack_exports, __webpack_require__) { + + +const eq = __webpack_require__("./node_modules/semver/functions/eq.js") +const neq = __webpack_require__("./node_modules/semver/functions/neq.js") +const gt = __webpack_require__("./node_modules/semver/functions/gt.js") +const gte = __webpack_require__("./node_modules/semver/functions/gte.js") +const lt = __webpack_require__("./node_modules/semver/functions/lt.js") +const lte = __webpack_require__("./node_modules/semver/functions/lte.js") + +const cmp = (a, op, b, loose) => { + switch (op) { + case '===': + if (typeof a === 'object') { + a = a.version + } + if (typeof b === 'object') { + b = b.version + } + return a === b + + case '!==': + if (typeof a === 'object') { + a = a.version + } + if (typeof b === 'object') { + b = b.version + } + return a !== b + + case '': + case '=': + case '==': + return eq(a, b, loose) + + case '!=': + return neq(a, b, loose) + + case '>': + return gt(a, b, loose) + + case '>=': + return gte(a, b, loose) + + case '<': + return lt(a, b, loose) + + case '<=': + return lte(a, b, loose) + + default: + throw new TypeError(`Invalid operator: ${op}`) + } +} +module.exports = cmp + + +}, +"./node_modules/semver/functions/compare.js"(module, __unused_rspack_exports, __webpack_require__) { + + +const SemVer = __webpack_require__("./node_modules/semver/classes/semver.js") +const compare = (a, b, loose) => + new SemVer(a, loose).compare(new SemVer(b, loose)) + +module.exports = compare + + +}, +"./node_modules/semver/functions/eq.js"(module, __unused_rspack_exports, __webpack_require__) { + + +const compare = __webpack_require__("./node_modules/semver/functions/compare.js") +const eq = (a, b, loose) => compare(a, b, loose) === 0 +module.exports = eq + + +}, +"./node_modules/semver/functions/gt.js"(module, __unused_rspack_exports, __webpack_require__) { + + +const compare = __webpack_require__("./node_modules/semver/functions/compare.js") +const gt = (a, b, loose) => compare(a, b, loose) > 0 +module.exports = gt + + +}, +"./node_modules/semver/functions/gte.js"(module, __unused_rspack_exports, __webpack_require__) { + + +const compare = __webpack_require__("./node_modules/semver/functions/compare.js") +const gte = (a, b, loose) => compare(a, b, loose) >= 0 +module.exports = gte + + +}, +"./node_modules/semver/functions/lt.js"(module, __unused_rspack_exports, __webpack_require__) { + + +const compare = __webpack_require__("./node_modules/semver/functions/compare.js") +const lt = (a, b, loose) => compare(a, b, loose) < 0 +module.exports = lt + + +}, +"./node_modules/semver/functions/lte.js"(module, __unused_rspack_exports, __webpack_require__) { + + +const compare = __webpack_require__("./node_modules/semver/functions/compare.js") +const lte = (a, b, loose) => compare(a, b, loose) <= 0 +module.exports = lte + + +}, +"./node_modules/semver/functions/neq.js"(module, __unused_rspack_exports, __webpack_require__) { + + +const compare = __webpack_require__("./node_modules/semver/functions/compare.js") +const neq = (a, b, loose) => compare(a, b, loose) !== 0 +module.exports = neq + + +}, +"./node_modules/semver/functions/parse.js"(module, __unused_rspack_exports, __webpack_require__) { + + +const SemVer = __webpack_require__("./node_modules/semver/classes/semver.js") +const parse = (version, options, throwErrors = false) => { + if (version instanceof SemVer) { + return version + } + try { + return new SemVer(version, options) + } catch (er) { + if (!throwErrors) { + return null + } + throw er + } +} + +module.exports = parse + + +}, +"./node_modules/semver/functions/satisfies.js"(module, __unused_rspack_exports, __webpack_require__) { + + +const Range = __webpack_require__("./node_modules/semver/classes/range.js") +const satisfies = (version, range, options) => { + try { + range = new Range(range, options) + } catch (er) { + return false + } + return range.test(version) +} +module.exports = satisfies + + +}, +"./node_modules/semver/internal/constants.js"(module) { + + +// Note: this is the semver.org version of the spec that it implements +// Not necessarily the package version of this code. +const SEMVER_SPEC_VERSION = '2.0.0' + +const MAX_LENGTH = 256 +const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || +/* istanbul ignore next */ 9007199254740991 + +// Max safe segment length for coercion. +const MAX_SAFE_COMPONENT_LENGTH = 16 + +// Max safe length for a build identifier. The max length minus 6 characters for +// the shortest version with a build 0.0.0+BUILD. +const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6 + +const RELEASE_TYPES = [ + 'major', + 'premajor', + 'minor', + 'preminor', + 'patch', + 'prepatch', + 'prerelease', +] + +module.exports = { + MAX_LENGTH, + MAX_SAFE_COMPONENT_LENGTH, + MAX_SAFE_BUILD_LENGTH, + MAX_SAFE_INTEGER, + RELEASE_TYPES, + SEMVER_SPEC_VERSION, + FLAG_INCLUDE_PRERELEASE: 0b001, + FLAG_LOOSE: 0b010, +} + + +}, +"./node_modules/semver/internal/debug.js"(module) { + + +const debug = ( + typeof process === 'object' && + process.env && + process.env.NODE_DEBUG && + /\bsemver\b/i.test(process.env.NODE_DEBUG) +) ? (...args) => console.error('SEMVER', ...args) + : () => {} + +module.exports = debug + + +}, +"./node_modules/semver/internal/identifiers.js"(module) { + + +const numeric = /^[0-9]+$/ +const compareIdentifiers = (a, b) => { + if (typeof a === 'number' && typeof b === 'number') { + return a === b ? 0 : a < b ? -1 : 1 + } + + const anum = numeric.test(a) + const bnum = numeric.test(b) + + if (anum && bnum) { + a = +a + b = +b + } + + return a === b ? 0 + : (anum && !bnum) ? -1 + : (bnum && !anum) ? 1 + : a < b ? -1 + : 1 +} + +const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a) + +module.exports = { + compareIdentifiers, + rcompareIdentifiers, +} + + +}, +"./node_modules/semver/internal/lrucache.js"(module) { + + +class LRUCache { + constructor () { + this.max = 1000 + this.map = new Map() + } + + get (key) { + const value = this.map.get(key) + if (value === undefined) { + return undefined + } else { + // Remove the key from the map and add it to the end + this.map.delete(key) + this.map.set(key, value) + return value + } + } + + delete (key) { + return this.map.delete(key) + } + + set (key, value) { + const deleted = this.delete(key) + + if (!deleted && value !== undefined) { + // If cache is full, delete the least recently used item + if (this.map.size >= this.max) { + const firstKey = this.map.keys().next().value + this.delete(firstKey) + } + + this.map.set(key, value) + } + + return this + } +} + +module.exports = LRUCache + + +}, +"./node_modules/semver/internal/parse-options.js"(module) { + + +// parse out just the options we care about +const looseOption = Object.freeze({ loose: true }) +const emptyOpts = Object.freeze({ }) +const parseOptions = options => { + if (!options) { + return emptyOpts + } + + if (typeof options !== 'object') { + return looseOption + } + + return options +} +module.exports = parseOptions + + +}, +"./node_modules/semver/internal/re.js"(module, exports, __webpack_require__) { + + +const { + MAX_SAFE_COMPONENT_LENGTH, + MAX_SAFE_BUILD_LENGTH, + MAX_LENGTH, +} = __webpack_require__("./node_modules/semver/internal/constants.js") +const debug = __webpack_require__("./node_modules/semver/internal/debug.js") +exports = module.exports = {} + +// The actual regexps go on exports.re +const re = exports.re = [] +const safeRe = exports.safeRe = [] +const src = exports.src = [] +const safeSrc = exports.safeSrc = [] +const t = exports.t = {} +let R = 0 + +const LETTERDASHNUMBER = '[a-zA-Z0-9-]' + +// Replace some greedy regex tokens to prevent regex dos issues. These regex are +// used internally via the safeRe object since all inputs in this library get +// normalized first to trim and collapse all extra whitespace. The original +// regexes are exported for userland consumption and lower level usage. A +// future breaking change could export the safer regex only with a note that +// all input should have extra whitespace removed. +const safeRegexReplacements = [ + ['\\s', 1], + ['\\d', MAX_LENGTH], + [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH], +] + +const makeSafeRegex = (value) => { + for (const [token, max] of safeRegexReplacements) { + value = value + .split(`${token}*`).join(`${token}{0,${max}}`) + .split(`${token}+`).join(`${token}{1,${max}}`) + } + return value +} + +const createToken = (name, value, isGlobal) => { + const safe = makeSafeRegex(value) + const index = R++ + debug(name, index, value) + t[name] = index + src[index] = value + safeSrc[index] = safe + re[index] = new RegExp(value, isGlobal ? 'g' : undefined) + safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined) +} + +// The following Regular Expressions can be used for tokenizing, +// validating, and parsing SemVer version strings. + +// ## Numeric Identifier +// A single `0`, or a non-zero digit followed by zero or more digits. + +createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*') +createToken('NUMERICIDENTIFIERLOOSE', '\\d+') + +// ## Non-numeric Identifier +// Zero or more digits, followed by a letter or hyphen, and then zero or +// more letters, digits, or hyphens. + +createToken('NONNUMERICIDENTIFIER', `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`) + +// ## Main Version +// Three dot-separated numeric identifiers. + +createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` + + `(${src[t.NUMERICIDENTIFIER]})\\.` + + `(${src[t.NUMERICIDENTIFIER]})`) + +createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + + `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + + `(${src[t.NUMERICIDENTIFIERLOOSE]})`) + +// ## Pre-release Version Identifier +// A numeric identifier, or a non-numeric identifier. +// Non-numeric identifiers include numeric identifiers but can be longer. +// Therefore non-numeric identifiers must go first. + +createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NONNUMERICIDENTIFIER] +}|${src[t.NUMERICIDENTIFIER]})`) + +createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NONNUMERICIDENTIFIER] +}|${src[t.NUMERICIDENTIFIERLOOSE]})`) + +// ## Pre-release Version +// Hyphen, followed by one or more dot-separated pre-release version +// identifiers. + +createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER] +}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`) + +createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE] +}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`) + +// ## Build Metadata Identifier +// Any combination of digits, letters, or hyphens. + +createToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`) + +// ## Build Metadata +// Plus sign, followed by one or more period-separated build metadata +// identifiers. + +createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER] +}(?:\\.${src[t.BUILDIDENTIFIER]})*))`) + +// ## Full Version String +// A main version, followed optionally by a pre-release version and +// build metadata. + +// Note that the only major, minor, patch, and pre-release sections of +// the version string are capturing groups. The build metadata is not a +// capturing group, because it should not ever be used in version +// comparison. + +createToken('FULLPLAIN', `v?${src[t.MAINVERSION] +}${src[t.PRERELEASE]}?${ + src[t.BUILD]}?`) + +createToken('FULL', `^${src[t.FULLPLAIN]}$`) + +// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. +// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty +// common in the npm registry. +createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE] +}${src[t.PRERELEASELOOSE]}?${ + src[t.BUILD]}?`) + +createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`) + +createToken('GTLT', '((?:<|>)?=?)') + +// Something like "2.*" or "1.2.x". +// Note that "x.x" is a valid xRange identifier, meaning "any version" +// Only the first item is strictly required. +createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`) +createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`) + +createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` + + `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + + `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + + `(?:${src[t.PRERELEASE]})?${ + src[t.BUILD]}?` + + `)?)?`) + +createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` + + `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + + `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + + `(?:${src[t.PRERELEASELOOSE]})?${ + src[t.BUILD]}?` + + `)?)?`) + +createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`) +createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`) + +// Coercion. +// Extract anything that could conceivably be a part of a valid semver +createToken('COERCEPLAIN', `${'(^|[^\\d])' + + '(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` + + `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + + `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`) +createToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\d])`) +createToken('COERCEFULL', src[t.COERCEPLAIN] + + `(?:${src[t.PRERELEASE]})?` + + `(?:${src[t.BUILD]})?` + + `(?:$|[^\\d])`) +createToken('COERCERTL', src[t.COERCE], true) +createToken('COERCERTLFULL', src[t.COERCEFULL], true) + +// Tilde ranges. +// Meaning is "reasonably at or greater than" +createToken('LONETILDE', '(?:~>?)') + +createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true) +exports.tildeTrimReplace = '$1~' + +createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`) +createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`) + +// Caret ranges. +// Meaning is "at least and backwards compatible with" +createToken('LONECARET', '(?:\\^)') + +createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true) +exports.caretTrimReplace = '$1^' + +createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`) +createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`) + +// A simple gt/lt/eq thing, or just "" to indicate "any version" +createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`) +createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`) + +// An expression to strip any whitespace between the gtlt and the thing +// it modifies, so that `> 1.2.3` ==> `>1.2.3` +createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT] +}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true) +exports.comparatorTrimReplace = '$1$2$3' + +// Something like `1.2.3 - 1.2.4` +// Note that these all use the loose form, because they'll be +// checked against either the strict or loose comparator form +// later. +createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` + + `\\s+-\\s+` + + `(${src[t.XRANGEPLAIN]})` + + `\\s*$`) + +createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` + + `\\s+-\\s+` + + `(${src[t.XRANGEPLAINLOOSE]})` + + `\\s*$`) + +// Star ranges basically just allow anything at all. +createToken('STAR', '(<|>)?=?\\s*\\*') +// >=0.0.0 is like a star +createToken('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$') +createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$') + + +}, +"./node_modules/vscode-jsonrpc/lib/common/api.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +/// +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ProgressType = exports.ProgressToken = exports.createMessageConnection = exports.NullLogger = exports.ConnectionOptions = exports.ConnectionStrategy = exports.AbstractMessageBuffer = exports.WriteableStreamMessageWriter = exports.AbstractMessageWriter = exports.MessageWriter = exports.ReadableStreamMessageReader = exports.AbstractMessageReader = exports.MessageReader = exports.SharedArrayReceiverStrategy = exports.SharedArraySenderStrategy = exports.CancellationToken = exports.CancellationTokenSource = exports.Emitter = exports.Event = exports.Disposable = exports.LRUCache = exports.Touch = exports.LinkedMap = exports.ParameterStructures = exports.NotificationType9 = exports.NotificationType8 = exports.NotificationType7 = exports.NotificationType6 = exports.NotificationType5 = exports.NotificationType4 = exports.NotificationType3 = exports.NotificationType2 = exports.NotificationType1 = exports.NotificationType0 = exports.NotificationType = exports.ErrorCodes = exports.ResponseError = exports.RequestType9 = exports.RequestType8 = exports.RequestType7 = exports.RequestType6 = exports.RequestType5 = exports.RequestType4 = exports.RequestType3 = exports.RequestType2 = exports.RequestType1 = exports.RequestType0 = exports.RequestType = exports.Message = exports.RAL = void 0; +exports.MessageStrategy = exports.CancellationStrategy = exports.CancellationSenderStrategy = exports.RequestCancellationReceiverStrategy = exports.IdCancellationReceiverStrategy = exports.CancellationReceiverStrategy = exports.ConnectionError = exports.ConnectionErrors = exports.LogTraceNotification = exports.SetTraceNotification = exports.TraceFormat = exports.TraceValues = exports.TraceValue = exports.Trace = void 0; +const messages_1 = __webpack_require__("./node_modules/vscode-jsonrpc/lib/common/messages.js"); +Object.defineProperty(exports, "Message", ({ enumerable: true, get: function () { return messages_1.Message; } })); +Object.defineProperty(exports, "RequestType", ({ enumerable: true, get: function () { return messages_1.RequestType; } })); +Object.defineProperty(exports, "RequestType0", ({ enumerable: true, get: function () { return messages_1.RequestType0; } })); +Object.defineProperty(exports, "RequestType1", ({ enumerable: true, get: function () { return messages_1.RequestType1; } })); +Object.defineProperty(exports, "RequestType2", ({ enumerable: true, get: function () { return messages_1.RequestType2; } })); +Object.defineProperty(exports, "RequestType3", ({ enumerable: true, get: function () { return messages_1.RequestType3; } })); +Object.defineProperty(exports, "RequestType4", ({ enumerable: true, get: function () { return messages_1.RequestType4; } })); +Object.defineProperty(exports, "RequestType5", ({ enumerable: true, get: function () { return messages_1.RequestType5; } })); +Object.defineProperty(exports, "RequestType6", ({ enumerable: true, get: function () { return messages_1.RequestType6; } })); +Object.defineProperty(exports, "RequestType7", ({ enumerable: true, get: function () { return messages_1.RequestType7; } })); +Object.defineProperty(exports, "RequestType8", ({ enumerable: true, get: function () { return messages_1.RequestType8; } })); +Object.defineProperty(exports, "RequestType9", ({ enumerable: true, get: function () { return messages_1.RequestType9; } })); +Object.defineProperty(exports, "ResponseError", ({ enumerable: true, get: function () { return messages_1.ResponseError; } })); +Object.defineProperty(exports, "ErrorCodes", ({ enumerable: true, get: function () { return messages_1.ErrorCodes; } })); +Object.defineProperty(exports, "NotificationType", ({ enumerable: true, get: function () { return messages_1.NotificationType; } })); +Object.defineProperty(exports, "NotificationType0", ({ enumerable: true, get: function () { return messages_1.NotificationType0; } })); +Object.defineProperty(exports, "NotificationType1", ({ enumerable: true, get: function () { return messages_1.NotificationType1; } })); +Object.defineProperty(exports, "NotificationType2", ({ enumerable: true, get: function () { return messages_1.NotificationType2; } })); +Object.defineProperty(exports, "NotificationType3", ({ enumerable: true, get: function () { return messages_1.NotificationType3; } })); +Object.defineProperty(exports, "NotificationType4", ({ enumerable: true, get: function () { return messages_1.NotificationType4; } })); +Object.defineProperty(exports, "NotificationType5", ({ enumerable: true, get: function () { return messages_1.NotificationType5; } })); +Object.defineProperty(exports, "NotificationType6", ({ enumerable: true, get: function () { return messages_1.NotificationType6; } })); +Object.defineProperty(exports, "NotificationType7", ({ enumerable: true, get: function () { return messages_1.NotificationType7; } })); +Object.defineProperty(exports, "NotificationType8", ({ enumerable: true, get: function () { return messages_1.NotificationType8; } })); +Object.defineProperty(exports, "NotificationType9", ({ enumerable: true, get: function () { return messages_1.NotificationType9; } })); +Object.defineProperty(exports, "ParameterStructures", ({ enumerable: true, get: function () { return messages_1.ParameterStructures; } })); +const linkedMap_1 = __webpack_require__("./node_modules/vscode-jsonrpc/lib/common/linkedMap.js"); +Object.defineProperty(exports, "LinkedMap", ({ enumerable: true, get: function () { return linkedMap_1.LinkedMap; } })); +Object.defineProperty(exports, "LRUCache", ({ enumerable: true, get: function () { return linkedMap_1.LRUCache; } })); +Object.defineProperty(exports, "Touch", ({ enumerable: true, get: function () { return linkedMap_1.Touch; } })); +const disposable_1 = __webpack_require__("./node_modules/vscode-jsonrpc/lib/common/disposable.js"); +Object.defineProperty(exports, "Disposable", ({ enumerable: true, get: function () { return disposable_1.Disposable; } })); +const events_1 = __webpack_require__("./node_modules/vscode-jsonrpc/lib/common/events.js"); +Object.defineProperty(exports, "Event", ({ enumerable: true, get: function () { return events_1.Event; } })); +Object.defineProperty(exports, "Emitter", ({ enumerable: true, get: function () { return events_1.Emitter; } })); +const cancellation_1 = __webpack_require__("./node_modules/vscode-jsonrpc/lib/common/cancellation.js"); +Object.defineProperty(exports, "CancellationTokenSource", ({ enumerable: true, get: function () { return cancellation_1.CancellationTokenSource; } })); +Object.defineProperty(exports, "CancellationToken", ({ enumerable: true, get: function () { return cancellation_1.CancellationToken; } })); +const sharedArrayCancellation_1 = __webpack_require__("./node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js"); +Object.defineProperty(exports, "SharedArraySenderStrategy", ({ enumerable: true, get: function () { return sharedArrayCancellation_1.SharedArraySenderStrategy; } })); +Object.defineProperty(exports, "SharedArrayReceiverStrategy", ({ enumerable: true, get: function () { return sharedArrayCancellation_1.SharedArrayReceiverStrategy; } })); +const messageReader_1 = __webpack_require__("./node_modules/vscode-jsonrpc/lib/common/messageReader.js"); +Object.defineProperty(exports, "MessageReader", ({ enumerable: true, get: function () { return messageReader_1.MessageReader; } })); +Object.defineProperty(exports, "AbstractMessageReader", ({ enumerable: true, get: function () { return messageReader_1.AbstractMessageReader; } })); +Object.defineProperty(exports, "ReadableStreamMessageReader", ({ enumerable: true, get: function () { return messageReader_1.ReadableStreamMessageReader; } })); +const messageWriter_1 = __webpack_require__("./node_modules/vscode-jsonrpc/lib/common/messageWriter.js"); +Object.defineProperty(exports, "MessageWriter", ({ enumerable: true, get: function () { return messageWriter_1.MessageWriter; } })); +Object.defineProperty(exports, "AbstractMessageWriter", ({ enumerable: true, get: function () { return messageWriter_1.AbstractMessageWriter; } })); +Object.defineProperty(exports, "WriteableStreamMessageWriter", ({ enumerable: true, get: function () { return messageWriter_1.WriteableStreamMessageWriter; } })); +const messageBuffer_1 = __webpack_require__("./node_modules/vscode-jsonrpc/lib/common/messageBuffer.js"); +Object.defineProperty(exports, "AbstractMessageBuffer", ({ enumerable: true, get: function () { return messageBuffer_1.AbstractMessageBuffer; } })); +const connection_1 = __webpack_require__("./node_modules/vscode-jsonrpc/lib/common/connection.js"); +Object.defineProperty(exports, "ConnectionStrategy", ({ enumerable: true, get: function () { return connection_1.ConnectionStrategy; } })); +Object.defineProperty(exports, "ConnectionOptions", ({ enumerable: true, get: function () { return connection_1.ConnectionOptions; } })); +Object.defineProperty(exports, "NullLogger", ({ enumerable: true, get: function () { return connection_1.NullLogger; } })); +Object.defineProperty(exports, "createMessageConnection", ({ enumerable: true, get: function () { return connection_1.createMessageConnection; } })); +Object.defineProperty(exports, "ProgressToken", ({ enumerable: true, get: function () { return connection_1.ProgressToken; } })); +Object.defineProperty(exports, "ProgressType", ({ enumerable: true, get: function () { return connection_1.ProgressType; } })); +Object.defineProperty(exports, "Trace", ({ enumerable: true, get: function () { return connection_1.Trace; } })); +Object.defineProperty(exports, "TraceValue", ({ enumerable: true, get: function () { return connection_1.TraceValue; } })); +Object.defineProperty(exports, "TraceFormat", ({ enumerable: true, get: function () { return connection_1.TraceFormat; } })); +Object.defineProperty(exports, "SetTraceNotification", ({ enumerable: true, get: function () { return connection_1.SetTraceNotification; } })); +Object.defineProperty(exports, "LogTraceNotification", ({ enumerable: true, get: function () { return connection_1.LogTraceNotification; } })); +Object.defineProperty(exports, "ConnectionErrors", ({ enumerable: true, get: function () { return connection_1.ConnectionErrors; } })); +Object.defineProperty(exports, "ConnectionError", ({ enumerable: true, get: function () { return connection_1.ConnectionError; } })); +Object.defineProperty(exports, "CancellationReceiverStrategy", ({ enumerable: true, get: function () { return connection_1.CancellationReceiverStrategy; } })); +Object.defineProperty(exports, "IdCancellationReceiverStrategy", ({ enumerable: true, get: function () { return connection_1.IdCancellationReceiverStrategy; } })); +Object.defineProperty(exports, "RequestCancellationReceiverStrategy", ({ enumerable: true, get: function () { return connection_1.RequestCancellationReceiverStrategy; } })); +Object.defineProperty(exports, "CancellationSenderStrategy", ({ enumerable: true, get: function () { return connection_1.CancellationSenderStrategy; } })); +Object.defineProperty(exports, "CancellationStrategy", ({ enumerable: true, get: function () { return connection_1.CancellationStrategy; } })); +Object.defineProperty(exports, "MessageStrategy", ({ enumerable: true, get: function () { return connection_1.MessageStrategy; } })); +Object.defineProperty(exports, "TraceValues", ({ enumerable: true, get: function () { return connection_1.TraceValues; } })); +const ral_1 = __importDefault(__webpack_require__("./node_modules/vscode-jsonrpc/lib/common/ral.js")); +exports.RAL = ral_1.default; + + +}, +"./node_modules/vscode-jsonrpc/lib/common/cancellation.js"(__unused_rspack_module, exports, __webpack_require__) { + +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CancellationTokenSource = exports.CancellationToken = void 0; +const ral_1 = __importDefault(__webpack_require__("./node_modules/vscode-jsonrpc/lib/common/ral.js")); +const Is = __importStar(__webpack_require__("./node_modules/vscode-jsonrpc/lib/common/is.js")); +const events_1 = __webpack_require__("./node_modules/vscode-jsonrpc/lib/common/events.js"); +var CancellationToken; +(function (CancellationToken) { + CancellationToken.None = Object.freeze({ + isCancellationRequested: false, + onCancellationRequested: events_1.Event.None + }); + CancellationToken.Cancelled = Object.freeze({ + isCancellationRequested: true, + onCancellationRequested: events_1.Event.None + }); + function is(value) { + const candidate = value; + return candidate && (candidate === CancellationToken.None + || candidate === CancellationToken.Cancelled + || (Is.boolean(candidate.isCancellationRequested) && !!candidate.onCancellationRequested)); + } + CancellationToken.is = is; +})(CancellationToken || (exports.CancellationToken = CancellationToken = {})); +const shortcutEvent = Object.freeze(function (callback, context) { + const handle = (0, ral_1.default)().timer.setTimeout(callback.bind(context), 0); + return { dispose() { handle.dispose(); } }; +}); +class MutableToken { + _isCancelled = false; + _emitter; + cancel() { + if (!this._isCancelled) { + this._isCancelled = true; + if (this._emitter) { + this._emitter.fire(undefined); + this.dispose(); + } + } + } + get isCancellationRequested() { + return this._isCancelled; + } + get onCancellationRequested() { + if (this._isCancelled) { + return shortcutEvent; + } + if (!this._emitter) { + this._emitter = new events_1.Emitter(); + } + return this._emitter.event; + } + dispose() { + if (this._emitter) { + this._emitter.dispose(); + this._emitter = undefined; + } + } +} +class CancellationTokenSource { + _token; + get token() { + if (!this._token) { + // be lazy and create the token only when + // actually needed + this._token = new MutableToken(); + } + return this._token; + } + cancel() { + if (!this._token) { + // save an object by returning the default + // cancelled token when cancellation happens + // before someone asks for the token + this._token = CancellationToken.Cancelled; + } + else { + this._token.cancel(); + } + } + dispose() { + if (!this._token) { + // ensure to initialize with an empty token if we had none + this._token = CancellationToken.None; + } + else if (this._token instanceof MutableToken) { + // actually dispose + this._token.dispose(); + } + } +} +exports.CancellationTokenSource = CancellationTokenSource; + + +}, +"./node_modules/vscode-jsonrpc/lib/common/connection.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +/// +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ConnectionOptions = exports.MessageStrategy = exports.CancellationStrategy = exports.CancellationSenderStrategy = exports.CancellationReceiverStrategy = exports.RequestCancellationReceiverStrategy = exports.IdCancellationReceiverStrategy = exports.ConnectionStrategy = exports.ConnectionError = exports.ConnectionErrors = exports.LogTraceNotification = exports.SetTraceNotification = exports.TraceFormat = exports.TraceValues = exports.TraceValue = exports.Trace = exports.NullLogger = exports.ProgressType = exports.ProgressToken = void 0; +exports.createMessageConnection = createMessageConnection; +const ral_1 = __importDefault(__webpack_require__("./node_modules/vscode-jsonrpc/lib/common/ral.js")); +const Is = __importStar(__webpack_require__("./node_modules/vscode-jsonrpc/lib/common/is.js")); +const messages_1 = __webpack_require__("./node_modules/vscode-jsonrpc/lib/common/messages.js"); +const linkedMap_1 = __webpack_require__("./node_modules/vscode-jsonrpc/lib/common/linkedMap.js"); +const events_1 = __webpack_require__("./node_modules/vscode-jsonrpc/lib/common/events.js"); +const cancellation_1 = __webpack_require__("./node_modules/vscode-jsonrpc/lib/common/cancellation.js"); +var CancelNotification; +(function (CancelNotification) { + CancelNotification.type = new messages_1.NotificationType('$/cancelRequest'); +})(CancelNotification || (CancelNotification = {})); +var ProgressToken; +(function (ProgressToken) { + function is(value) { + return typeof value === 'string' || typeof value === 'number'; + } + ProgressToken.is = is; +})(ProgressToken || (exports.ProgressToken = ProgressToken = {})); +var ProgressNotification; +(function (ProgressNotification) { + ProgressNotification.type = new messages_1.NotificationType('$/progress'); +})(ProgressNotification || (ProgressNotification = {})); +class ProgressType { + /** + * Clients must not use these properties. They are here to ensure correct typing. + * in TypeScript + */ + __; + _pr; + constructor() { + } +} +exports.ProgressType = ProgressType; +var StarRequestHandler; +(function (StarRequestHandler) { + function is(value) { + return Is.func(value); + } + StarRequestHandler.is = is; +})(StarRequestHandler || (StarRequestHandler = {})); +exports.NullLogger = Object.freeze({ + error: () => { }, + warn: () => { }, + info: () => { }, + log: () => { } +}); +var Trace; +(function (Trace) { + Trace[Trace["Off"] = 0] = "Off"; + Trace[Trace["Messages"] = 1] = "Messages"; + Trace[Trace["Compact"] = 2] = "Compact"; + Trace[Trace["Verbose"] = 3] = "Verbose"; +})(Trace || (exports.Trace = Trace = {})); +var TraceValue; +(function (TraceValue) { + /** + * Turn tracing off. + */ + TraceValue.Off = 'off'; + /** + * Trace messages only. + */ + TraceValue.Messages = 'messages'; + /** + * Compact message tracing. + */ + TraceValue.Compact = 'compact'; + /** + * Verbose message tracing. + */ + TraceValue.Verbose = 'verbose'; +})(TraceValue || (exports.TraceValue = TraceValue = {})); +/** + * @deprecated Use TraceValue instead + */ +exports.TraceValues = TraceValue; +(function (Trace) { + function fromString(value) { + if (!Is.string(value)) { + return Trace.Off; + } + value = value.toLowerCase(); + switch (value) { + case 'off': + return Trace.Off; + case 'messages': + return Trace.Messages; + case 'compact': + return Trace.Compact; + case 'verbose': + return Trace.Verbose; + default: + return Trace.Off; + } + } + Trace.fromString = fromString; + function toString(value) { + switch (value) { + case Trace.Off: + return 'off'; + case Trace.Messages: + return 'messages'; + case Trace.Compact: + return 'compact'; + case Trace.Verbose: + return 'verbose'; + default: + return 'off'; + } + } + Trace.toString = toString; +})(Trace || (exports.Trace = Trace = {})); +var TraceFormat; +(function (TraceFormat) { + TraceFormat["Text"] = "text"; + TraceFormat["JSON"] = "json"; +})(TraceFormat || (exports.TraceFormat = TraceFormat = {})); +(function (TraceFormat) { + function fromString(value) { + if (!Is.string(value)) { + return TraceFormat.Text; + } + value = value.toLowerCase(); + if (value === 'json') { + return TraceFormat.JSON; + } + else { + return TraceFormat.Text; + } + } + TraceFormat.fromString = fromString; +})(TraceFormat || (exports.TraceFormat = TraceFormat = {})); +var SetTraceNotification; +(function (SetTraceNotification) { + SetTraceNotification.type = new messages_1.NotificationType('$/setTrace'); +})(SetTraceNotification || (exports.SetTraceNotification = SetTraceNotification = {})); +var LogTraceNotification; +(function (LogTraceNotification) { + LogTraceNotification.type = new messages_1.NotificationType('$/logTrace'); +})(LogTraceNotification || (exports.LogTraceNotification = LogTraceNotification = {})); +var ConnectionErrors; +(function (ConnectionErrors) { + /** + * The connection is closed. + */ + ConnectionErrors[ConnectionErrors["Closed"] = 1] = "Closed"; + /** + * The connection got disposed. + */ + ConnectionErrors[ConnectionErrors["Disposed"] = 2] = "Disposed"; + /** + * The connection is already in listening mode. + */ + ConnectionErrors[ConnectionErrors["AlreadyListening"] = 3] = "AlreadyListening"; +})(ConnectionErrors || (exports.ConnectionErrors = ConnectionErrors = {})); +class ConnectionError extends Error { + code; + constructor(code, message) { + super(message); + this.code = code; + Object.setPrototypeOf(this, ConnectionError.prototype); + } +} +exports.ConnectionError = ConnectionError; +var ConnectionStrategy; +(function (ConnectionStrategy) { + function is(value) { + const candidate = value; + return candidate && Is.func(candidate.cancelUndispatched); + } + ConnectionStrategy.is = is; +})(ConnectionStrategy || (exports.ConnectionStrategy = ConnectionStrategy = {})); +var IdCancellationReceiverStrategy; +(function (IdCancellationReceiverStrategy) { + function is(value) { + const candidate = value; + return candidate && (candidate.kind === undefined || candidate.kind === 'id') && Is.func(candidate.createCancellationTokenSource) && (candidate.dispose === undefined || Is.func(candidate.dispose)); + } + IdCancellationReceiverStrategy.is = is; +})(IdCancellationReceiverStrategy || (exports.IdCancellationReceiverStrategy = IdCancellationReceiverStrategy = {})); +var RequestCancellationReceiverStrategy; +(function (RequestCancellationReceiverStrategy) { + function is(value) { + const candidate = value; + return candidate && candidate.kind === 'request' && Is.func(candidate.createCancellationTokenSource) && (candidate.dispose === undefined || Is.func(candidate.dispose)); + } + RequestCancellationReceiverStrategy.is = is; +})(RequestCancellationReceiverStrategy || (exports.RequestCancellationReceiverStrategy = RequestCancellationReceiverStrategy = {})); +var CancellationReceiverStrategy; +(function (CancellationReceiverStrategy) { + CancellationReceiverStrategy.Message = Object.freeze({ + createCancellationTokenSource(_) { + return new cancellation_1.CancellationTokenSource(); + } + }); + function is(value) { + return IdCancellationReceiverStrategy.is(value) || RequestCancellationReceiverStrategy.is(value); + } + CancellationReceiverStrategy.is = is; +})(CancellationReceiverStrategy || (exports.CancellationReceiverStrategy = CancellationReceiverStrategy = {})); +var CancellationSenderStrategy; +(function (CancellationSenderStrategy) { + CancellationSenderStrategy.Message = Object.freeze({ + sendCancellation(conn, id) { + return conn.sendNotification(CancelNotification.type, { id }); + }, + cleanup(_) { } + }); + function is(value) { + const candidate = value; + return candidate && Is.func(candidate.sendCancellation) && Is.func(candidate.cleanup); + } + CancellationSenderStrategy.is = is; +})(CancellationSenderStrategy || (exports.CancellationSenderStrategy = CancellationSenderStrategy = {})); +var CancellationStrategy; +(function (CancellationStrategy) { + CancellationStrategy.Message = Object.freeze({ + receiver: CancellationReceiverStrategy.Message, + sender: CancellationSenderStrategy.Message + }); + function is(value) { + const candidate = value; + return candidate && CancellationReceiverStrategy.is(candidate.receiver) && CancellationSenderStrategy.is(candidate.sender); + } + CancellationStrategy.is = is; +})(CancellationStrategy || (exports.CancellationStrategy = CancellationStrategy = {})); +var MessageStrategy; +(function (MessageStrategy) { + function is(value) { + const candidate = value; + return candidate && Is.func(candidate.handleMessage); + } + MessageStrategy.is = is; +})(MessageStrategy || (exports.MessageStrategy = MessageStrategy = {})); +var ConnectionOptions; +(function (ConnectionOptions) { + function is(value) { + const candidate = value; + return candidate + && (CancellationStrategy.is(candidate.cancellationStrategy) || ConnectionStrategy.is(candidate.connectionStrategy) || MessageStrategy.is(candidate.messageStrategy) || Is.number(candidate.maxParallelism)); + } + ConnectionOptions.is = is; +})(ConnectionOptions || (exports.ConnectionOptions = ConnectionOptions = {})); +var ConnectionState; +(function (ConnectionState) { + ConnectionState[ConnectionState["New"] = 1] = "New"; + ConnectionState[ConnectionState["Listening"] = 2] = "Listening"; + ConnectionState[ConnectionState["Closed"] = 3] = "Closed"; + ConnectionState[ConnectionState["Disposed"] = 4] = "Disposed"; +})(ConnectionState || (ConnectionState = {})); +function createMessageConnection(messageReader, messageWriter, _logger, options) { + const logger = _logger !== undefined ? _logger : exports.NullLogger; + let sequenceNumber = 0; + let notificationSequenceNumber = 0; + let unknownResponseSequenceNumber = 0; + const version = '2.0'; + const maxParallelism = options?.maxParallelism ?? -1; + let inFlight = 0; + let starRequestHandler = undefined; + const requestHandlers = new Map(); + let starNotificationHandler = undefined; + const notificationHandlers = new Map(); + const progressHandlers = new Map(); + let timer; + let messageQueue = new linkedMap_1.LinkedMap(); + let responsePromises = new Map(); + let knownCanceledRequests = new Set(); + let requestTokens = new Map(); + let trace = Trace.Off; + let traceFormat = TraceFormat.Text; + let tracer; + let state = ConnectionState.New; + const errorEmitter = new events_1.Emitter(); + const closeEmitter = new events_1.Emitter(); + const unhandledNotificationEmitter = new events_1.Emitter(); + const unhandledProgressEmitter = new events_1.Emitter(); + const disposeEmitter = new events_1.Emitter(); + const cancellationStrategy = (options && options.cancellationStrategy) ? options.cancellationStrategy : CancellationStrategy.Message; + function cancelUndispatched(_message) { + return undefined; + } + function isListening() { + return state === ConnectionState.Listening; + } + function isClosed() { + return state === ConnectionState.Closed; + } + function isDisposed() { + return state === ConnectionState.Disposed; + } + function closeHandler() { + if (state === ConnectionState.New || state === ConnectionState.Listening) { + state = ConnectionState.Closed; + closeEmitter.fire(undefined); + } + // If the connection is disposed don't sent close events. + } + function readErrorHandler(error) { + errorEmitter.fire([error, undefined, undefined]); + } + function writeErrorHandler(data) { + errorEmitter.fire(data); + } + messageReader.onClose(closeHandler); + messageReader.onError(readErrorHandler); + messageWriter.onClose(closeHandler); + messageWriter.onError(writeErrorHandler); + function createRequestQueueKey(id) { + if (id === null) { + throw new Error(`Can't send requests with id null since the response can't be correlated.`); + } + return 'req-' + id.toString(); + } + function createResponseQueueKey(id) { + if (id === null) { + return 'res-unknown-' + (++unknownResponseSequenceNumber).toString(); + } + else { + return 'res-' + id.toString(); + } + } + function createNotificationQueueKey() { + return 'not-' + (++notificationSequenceNumber).toString(); + } + function addMessageToQueue(queue, message) { + if (messages_1.Message.isRequest(message)) { + queue.set(createRequestQueueKey(message.id), message); + } + else if (messages_1.Message.isResponse(message)) { + // If we have unlimited parallelism we queue the response to keep + // the previous semantics. + if (maxParallelism === -1) { + queue.set(createResponseQueueKey(message.id), message); + } + else { + // If we have limited parallelism we resolve responses to avoid + // dead locks. + handleResponse(message); + } + } + else { + queue.set(createNotificationQueueKey(), message); + } + } + function triggerMessageQueue() { + if (timer || messageQueue.size === 0) { + return; + } + if (maxParallelism !== -1 && inFlight >= maxParallelism) { + return; + } + timer = (0, ral_1.default)().timer.setImmediate(async () => { + timer = undefined; + if (messageQueue.size === 0) { + return; + } + if (maxParallelism !== -1 && inFlight >= maxParallelism) { + return; + } + const message = messageQueue.shift(); + let result; + try { + inFlight++; + const messageStrategy = options?.messageStrategy; + if (MessageStrategy.is(messageStrategy)) { + result = messageStrategy.handleMessage(message, handleMessage); + } + else { + result = handleMessage(message); + } + } + catch (error) { + logger.error(`Processing message queue failed: ${error.toString()}`); + } + finally { + if (result instanceof Promise) { + result.then(() => { + inFlight--; + triggerMessageQueue(); + }).catch((error) => { + logger.error(`Processing message queue failed: ${error.toString()}`); + }); + } + else { + inFlight--; + } + triggerMessageQueue(); + } + }); + } + async function handleMessage(message) { + if (messages_1.Message.isRequest(message)) { + return handleRequest(message); + } + else if (messages_1.Message.isNotification(message)) { + return handleNotification(message); + } + else if (messages_1.Message.isResponse(message)) { + return handleResponse(message); + } + else { + return handleInvalidMessage(message); + } + } + const callback = (message) => { + try { + // We have received a cancellation message. Check if the message is still in the queue + // and cancel it if allowed to do so. + if (messages_1.Message.isNotification(message) && message.method === CancelNotification.type.method) { + const cancelId = message.params.id; + const key = createRequestQueueKey(cancelId); + const toCancel = messageQueue.get(key); + if (messages_1.Message.isRequest(toCancel)) { + const strategy = options?.connectionStrategy; + const response = (strategy && strategy.cancelUndispatched) ? strategy.cancelUndispatched(toCancel, cancelUndispatched) : cancelUndispatched(toCancel); + if (response && (response.error !== undefined || response.result !== undefined)) { + messageQueue.delete(key); + requestTokens.delete(cancelId); + response.id = toCancel.id; + traceSendingResponse(response, message.method, Date.now()); + messageWriter.write(response).catch(() => logger.error(`Sending response for canceled message failed.`)); + return; + } + } + const cancellationToken = requestTokens.get(cancelId); + // The request is already running. Cancel the token + if (cancellationToken !== undefined) { + cancellationToken.cancel(); + traceReceivedNotification(message); + return; + } + else { + // Remember the cancel but still queue the message to + // clean up state in process message. + knownCanceledRequests.add(cancelId); + } + } + addMessageToQueue(messageQueue, message); + } + finally { + triggerMessageQueue(); + } + }; + async function handleRequest(requestMessage) { + if (isDisposed()) { + // we return here silently since we fired an event when the + // connection got disposed. + return Promise.resolve(); + } + function reply(resultOrError, method, startTime) { + const message = { + jsonrpc: version, + id: requestMessage.id + }; + if (resultOrError instanceof messages_1.ResponseError) { + message.error = resultOrError.toJson(); + } + else { + message.result = resultOrError === undefined ? null : resultOrError; + } + traceSendingResponse(message, method, startTime); + return messageWriter.write(message); + } + function replyError(error, method, startTime) { + const message = { + jsonrpc: version, + id: requestMessage.id, + error: error.toJson() + }; + traceSendingResponse(message, method, startTime); + return messageWriter.write(message); + } + traceReceivedRequest(requestMessage); + const element = requestHandlers.get(requestMessage.method); + let type; + let requestHandler; + if (element) { + type = element.type; + requestHandler = element.handler; + } + const startTime = Date.now(); + if (requestHandler || starRequestHandler) { + const tokenKey = requestMessage.id ?? String(Date.now()); // + const cancellationSource = IdCancellationReceiverStrategy.is(cancellationStrategy.receiver) + ? cancellationStrategy.receiver.createCancellationTokenSource(tokenKey) + : cancellationStrategy.receiver.createCancellationTokenSource(requestMessage); + if (requestMessage.id !== null && knownCanceledRequests.has(requestMessage.id)) { + cancellationSource.cancel(); + } + if (requestMessage.id !== null) { + requestTokens.set(tokenKey, cancellationSource); + } + try { + let handlerResult; + if (requestHandler) { + if (requestMessage.params === undefined) { + if (type !== undefined && type.numberOfParams !== 0) { + return replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InvalidParams, `Request ${requestMessage.method} defines ${type.numberOfParams} params but received none.`), requestMessage.method, startTime); + } + handlerResult = requestHandler(cancellationSource.token); + } + else if (Array.isArray(requestMessage.params)) { + if (type !== undefined && type.parameterStructures === messages_1.ParameterStructures.byName) { + return replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InvalidParams, `Request ${requestMessage.method} defines parameters by name but received parameters by position`), requestMessage.method, startTime); + } + handlerResult = requestHandler(...requestMessage.params, cancellationSource.token); + } + else { + if (type !== undefined && type.parameterStructures === messages_1.ParameterStructures.byPosition) { + return replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InvalidParams, `Request ${requestMessage.method} defines parameters by position but received parameters by name`), requestMessage.method, startTime); + } + handlerResult = requestHandler(requestMessage.params, cancellationSource.token); + } + } + else if (starRequestHandler) { + handlerResult = starRequestHandler(requestMessage.method, requestMessage.params, cancellationSource.token); + } + const resultOrError = await handlerResult; + await reply(resultOrError, requestMessage.method, startTime); + } + catch (error) { + if (error instanceof messages_1.ResponseError) { + await reply(error, requestMessage.method, startTime); + } + else if (error && Is.string(error.message)) { + await replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime); + } + else { + await replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime); + } + } + finally { + requestTokens.delete(tokenKey); + } + } + else { + await replyError(new messages_1.ResponseError(messages_1.ErrorCodes.MethodNotFound, `Unhandled method ${requestMessage.method}`), requestMessage.method, startTime); + } + } + function handleResponse(responseMessage) { + if (isDisposed()) { + // See handle request. + return; + } + if (responseMessage.id === null) { + if (responseMessage.error) { + logger.error(`Received response message without id: Error is: \n${JSON.stringify(responseMessage.error, undefined, 4)}`); + } + else { + logger.error(`Received response message without id. No further error information provided.`); + } + } + else { + const key = responseMessage.id; + const responsePromise = responsePromises.get(key); + traceReceivedResponse(responseMessage, responsePromise); + if (responsePromise !== undefined) { + responsePromises.delete(key); + try { + if (responseMessage.error) { + const error = responseMessage.error; + responsePromise.reject(new messages_1.ResponseError(error.code, error.message, error.data)); + } + else if (responseMessage.result !== undefined) { + responsePromise.resolve(responseMessage.result); + } + else { + throw new Error('Should never happen.'); + } + } + catch (error) { + if (error.message) { + logger.error(`Response handler '${responsePromise.method}' failed with message: ${error.message}`); + } + else { + logger.error(`Response handler '${responsePromise.method}' failed unexpectedly.`); + } + } + } + } + } + async function handleNotification(message) { + if (isDisposed()) { + // See handle request. + return; + } + let type = undefined; + let notificationHandler; + if (message.method === CancelNotification.type.method) { + const cancelId = message.params.id; + knownCanceledRequests.delete(cancelId); + traceReceivedNotification(message); + return; + } + else { + const element = notificationHandlers.get(message.method); + if (element) { + notificationHandler = element.handler; + type = element.type; + } + } + if (notificationHandler || starNotificationHandler) { + try { + traceReceivedNotification(message); + if (notificationHandler) { + if (message.params === undefined) { + if (type !== undefined) { + if (type.numberOfParams !== 0 && type.parameterStructures !== messages_1.ParameterStructures.byName) { + logger.error(`Notification ${message.method} defines ${type.numberOfParams} params but received none.`); + } + } + await notificationHandler(); + } + else if (Array.isArray(message.params)) { + // There are JSON-RPC libraries that send progress message as positional params although + // specified as named. So convert them if this is the case. + const params = message.params; + if (message.method === ProgressNotification.type.method && params.length === 2 && ProgressToken.is(params[0])) { + await notificationHandler({ token: params[0], value: params[1] }); + } + else { + if (type !== undefined) { + if (type.parameterStructures === messages_1.ParameterStructures.byName) { + logger.error(`Notification ${message.method} defines parameters by name but received parameters by position`); + } + if (type.numberOfParams !== message.params.length) { + logger.error(`Notification ${message.method} defines ${type.numberOfParams} params but received ${params.length} arguments`); + } + } + await notificationHandler(...params); + } + } + else { + if (type !== undefined && type.parameterStructures === messages_1.ParameterStructures.byPosition) { + logger.error(`Notification ${message.method} defines parameters by position but received parameters by name`); + } + await notificationHandler(message.params); + } + } + else if (starNotificationHandler) { + await starNotificationHandler(message.method, message.params); + } + } + catch (error) { + if (error.message) { + logger.error(`Notification handler '${message.method}' failed with message: ${error.message}`); + } + else { + logger.error(`Notification handler '${message.method}' failed unexpectedly.`); + } + } + } + else { + unhandledNotificationEmitter.fire(message); + } + } + function handleInvalidMessage(message) { + if (!message) { + logger.error('Received empty message.'); + return; + } + logger.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(message, null, 4)}`); + // Test whether we find an id to reject the promise + const responseMessage = message; + if (Is.string(responseMessage.id) || Is.number(responseMessage.id)) { + const key = responseMessage.id; + const responseHandler = responsePromises.get(key); + if (responseHandler) { + responseHandler.reject(new Error('The received response has neither a result nor an error property.')); + } + } + } + function stringifyTrace(params) { + if (params === undefined || params === null) { + return undefined; + } + switch (trace) { + case Trace.Verbose: + return JSON.stringify(params, null, 4); + case Trace.Compact: + return JSON.stringify(params); + default: + return undefined; + } + } + function traceSendingRequest(message) { + if (trace === Trace.Off || !tracer) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if ((trace === Trace.Verbose || trace === Trace.Compact) && message.params) { + data = `Params: ${stringifyTrace(message.params)}`; + } + tracer.log(`Sending request '${message.method} - (${message.id})'.`, data); + } + else { + logLSPMessage('send-request', message); + } + } + function traceSendingNotification(message) { + if (trace === Trace.Off || !tracer) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if (trace === Trace.Verbose || trace === Trace.Compact) { + if (message.params) { + data = `Params: ${stringifyTrace(message.params)}`; + } + else { + data = 'No parameters provided.'; + } + } + tracer.log(`Sending notification '${message.method}'.`, data); + } + else { + logLSPMessage('send-notification', message); + } + } + function traceSendingResponse(message, method, startTime) { + if (trace === Trace.Off || !tracer) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if (trace === Trace.Verbose || trace === Trace.Compact) { + if (message.error && message.error.data) { + data = `Error data: ${stringifyTrace(message.error.data)}`; + } + else { + if (message.result) { + data = `Result: ${stringifyTrace(message.result)}`; + } + else if (message.error === undefined) { + data = 'No result returned.'; + } + } + } + tracer.log(`Sending response '${method} - (${message.id})'. Processing request took ${Date.now() - startTime}ms`, data); + } + else { + logLSPMessage('send-response', message); + } + } + function traceReceivedRequest(message) { + if (trace === Trace.Off || !tracer) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if ((trace === Trace.Verbose || trace === Trace.Compact) && message.params) { + data = `Params: ${stringifyTrace(message.params)}`; + } + tracer.log(`Received request '${message.method} - (${message.id})'.`, data); + } + else { + logLSPMessage('receive-request', message); + } + } + function traceReceivedNotification(message) { + if (trace === Trace.Off || !tracer || message.method === LogTraceNotification.type.method) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if (trace === Trace.Verbose || trace === Trace.Compact) { + if (message.params) { + data = `Params: ${stringifyTrace(message.params)}`; + } + else { + data = 'No parameters provided.'; + } + } + tracer.log(`Received notification '${message.method}'.`, data); + } + else { + logLSPMessage('receive-notification', message); + } + } + function traceReceivedResponse(message, responsePromise) { + if (trace === Trace.Off || !tracer) { + return; + } + if (traceFormat === TraceFormat.Text) { + let data = undefined; + if (trace === Trace.Verbose || trace === Trace.Compact) { + if (message.error && message.error.data) { + data = `Error data: ${stringifyTrace(message.error.data)}`; + } + else { + if (message.result) { + data = `Result: ${stringifyTrace(message.result)}`; + } + else if (message.error === undefined) { + data = 'No result returned.'; + } + } + } + if (responsePromise) { + const error = message.error ? ` Request failed: ${message.error.message} (${message.error.code}).` : ''; + tracer.log(`Received response '${responsePromise.method} - (${message.id})' in ${Date.now() - responsePromise.timerStart}ms.${error}`, data); + } + else { + tracer.log(`Received response ${message.id} without active response promise.`, data); + } + } + else { + logLSPMessage('receive-response', message); + } + } + function logLSPMessage(type, message) { + if (!tracer || trace === Trace.Off) { + return; + } + const lspMessage = { + isLSPMessage: true, + type, + message, + timestamp: Date.now() + }; + tracer.log(lspMessage); + } + function throwIfClosedOrDisposed() { + if (isClosed()) { + throw new ConnectionError(ConnectionErrors.Closed, 'Connection is closed.'); + } + if (isDisposed()) { + throw new ConnectionError(ConnectionErrors.Disposed, 'Connection is disposed.'); + } + } + function throwIfListening() { + if (isListening()) { + throw new ConnectionError(ConnectionErrors.AlreadyListening, 'Connection is already listening'); + } + } + function throwIfNotListening() { + if (!isListening()) { + throw new Error('Call listen() first.'); + } + } + function undefinedToNull(param) { + if (param === undefined) { + return null; + } + else { + return param; + } + } + function nullToUndefined(param) { + if (param === null) { + return undefined; + } + else { + return param; + } + } + function isNamedParam(param) { + return param !== undefined && param !== null && !Array.isArray(param) && typeof param === 'object'; + } + function computeSingleParam(parameterStructures, param) { + switch (parameterStructures) { + case messages_1.ParameterStructures.auto: + if (isNamedParam(param)) { + return nullToUndefined(param); + } + else { + return [undefinedToNull(param)]; + } + case messages_1.ParameterStructures.byName: + if (!isNamedParam(param)) { + throw new Error(`Received parameters by name but param is not an object literal.`); + } + return nullToUndefined(param); + case messages_1.ParameterStructures.byPosition: + return [undefinedToNull(param)]; + default: + throw new Error(`Unknown parameter structure ${parameterStructures.toString()}`); + } + } + function computeMessageParams(type, params) { + let result; + const numberOfParams = type.numberOfParams; + switch (numberOfParams) { + case 0: + result = undefined; + break; + case 1: + result = computeSingleParam(type.parameterStructures, params[0]); + break; + default: + result = []; + for (let i = 0; i < params.length && i < numberOfParams; i++) { + result.push(undefinedToNull(params[i])); + } + if (params.length < numberOfParams) { + for (let i = params.length; i < numberOfParams; i++) { + result.push(null); + } + } + break; + } + return result; + } + const connection = { + sendNotification: (type, ...args) => { + throwIfClosedOrDisposed(); + let method; + let messageParams; + if (Is.string(type)) { + method = type; + const first = args[0]; + let paramStart = 0; + let parameterStructures = messages_1.ParameterStructures.auto; + if (messages_1.ParameterStructures.is(first)) { + paramStart = 1; + parameterStructures = first; + } + const paramEnd = args.length; + const numberOfParams = paramEnd - paramStart; + switch (numberOfParams) { + case 0: + messageParams = undefined; + break; + case 1: + messageParams = computeSingleParam(parameterStructures, args[paramStart]); + break; + default: + if (parameterStructures === messages_1.ParameterStructures.byName) { + throw new Error(`Received ${numberOfParams} parameters for 'by Name' notification parameter structure.`); + } + messageParams = args.slice(paramStart, paramEnd).map(value => undefinedToNull(value)); + break; + } + } + else { + const params = args; + method = type.method; + messageParams = computeMessageParams(type, params); + } + const notificationMessage = { + jsonrpc: version, + method: method, + params: messageParams + }; + traceSendingNotification(notificationMessage); + return messageWriter.write(notificationMessage).catch((error) => { + logger.error(`Sending notification failed.`); + throw error; + }); + }, + onNotification: (type, handler) => { + throwIfClosedOrDisposed(); + let method; + if (Is.func(type)) { + starNotificationHandler = type; + } + else if (handler) { + if (Is.string(type)) { + method = type; + notificationHandlers.set(type, { type: undefined, handler }); + } + else { + method = type.method; + notificationHandlers.set(type.method, { type, handler }); + } + } + return { + dispose: () => { + if (method !== undefined) { + if (notificationHandlers.get(method)?.handler === handler) { + notificationHandlers.delete(method); + } + } + else if (starNotificationHandler === type) { + starNotificationHandler = undefined; + } + } + }; + }, + onProgress: (_type, token, handler) => { + if (progressHandlers.has(token)) { + throw new Error(`Progress handler for token ${token} already registered`); + } + progressHandlers.set(token, handler); + return { + dispose: () => { + if (progressHandlers.get(token) === handler) { + progressHandlers.delete(token); + } + } + }; + }, + sendProgress: (_type, token, value) => { + // This should not await but simple return to ensure that we don't have another + // async scheduling. Otherwise one send could overtake another send. + return connection.sendNotification(ProgressNotification.type, { token, value }); + }, + onUnhandledProgress: unhandledProgressEmitter.event, + sendRequest: (type, ...args) => { + throwIfClosedOrDisposed(); + throwIfNotListening(); + function sendCancellation(connection, id) { + const p = cancellationStrategy.sender.sendCancellation(connection, id); + if (p === undefined) { + logger.log(`Received no promise from cancellation strategy when cancelling id ${id}`); + } + else { + p.catch(() => { + logger.log(`Sending cancellation messages for id ${id} failed.`); + }); + } + } + let method; + let messageParams; + let token = undefined; + if (Is.string(type)) { + method = type; + const first = args[0]; + const last = args[args.length - 1]; + let paramStart = 0; + let parameterStructures = messages_1.ParameterStructures.auto; + if (messages_1.ParameterStructures.is(first)) { + paramStart = 1; + parameterStructures = first; + } + let paramEnd = args.length; + if (cancellation_1.CancellationToken.is(last)) { + paramEnd = paramEnd - 1; + token = last; + } + const numberOfParams = paramEnd - paramStart; + switch (numberOfParams) { + case 0: + messageParams = undefined; + break; + case 1: + messageParams = computeSingleParam(parameterStructures, args[paramStart]); + break; + default: + if (parameterStructures === messages_1.ParameterStructures.byName) { + throw new Error(`Received ${numberOfParams} parameters for 'by Name' request parameter structure.`); + } + messageParams = args.slice(paramStart, paramEnd).map(value => undefinedToNull(value)); + break; + } + } + else { + const params = args; + method = type.method; + messageParams = computeMessageParams(type, params); + const numberOfParams = type.numberOfParams; + token = cancellation_1.CancellationToken.is(params[numberOfParams]) ? params[numberOfParams] : undefined; + } + const id = sequenceNumber++; + let disposable; + let tokenWasCancelled = false; + if (token !== undefined) { + if (token.isCancellationRequested) { + tokenWasCancelled = true; + } + else { + disposable = token.onCancellationRequested(() => { + sendCancellation(connection, id); + }); + } + } + const requestMessage = { + jsonrpc: version, + id: id, + method: method, + params: messageParams + }; + traceSendingRequest(requestMessage); + if (typeof cancellationStrategy.sender.enableCancellation === 'function') { + cancellationStrategy.sender.enableCancellation(requestMessage); + } + // eslint-disable-next-line no-async-promise-executor + return new Promise(async (resolve, reject) => { + const resolveWithCleanup = (r) => { + resolve(r); + cancellationStrategy.sender.cleanup(id); + disposable?.dispose(); + }; + const rejectWithCleanup = (r) => { + reject(r); + cancellationStrategy.sender.cleanup(id); + disposable?.dispose(); + }; + const responsePromise = { method: method, timerStart: Date.now(), resolve: resolveWithCleanup, reject: rejectWithCleanup }; + try { + responsePromises.set(id, responsePromise); + await messageWriter.write(requestMessage); + if (tokenWasCancelled) { + sendCancellation(connection, id); + } + } + catch (error) { + // Writing the message failed. So we need to delete it from the response promises and + // reject it. + responsePromises.delete(id); + responsePromise.reject(new messages_1.ResponseError(messages_1.ErrorCodes.MessageWriteError, error.message ? error.message : 'Unknown reason')); + logger.error(`Sending request failed.`); + throw error; + } + }); + }, + onRequest: (type, handler) => { + throwIfClosedOrDisposed(); + let method = null; + if (StarRequestHandler.is(type)) { + method = undefined; + starRequestHandler = type; + } + else if (Is.string(type)) { + method = null; + if (handler !== undefined) { + method = type; + requestHandlers.set(type, { handler: handler, type: undefined }); + } + } + else { + if (handler !== undefined) { + method = type.method; + requestHandlers.set(type.method, { type, handler }); + } + } + return { + dispose: () => { + if (method === null) { + return; + } + if (method !== undefined) { + if (requestHandlers.get(method)?.handler === handler) { + requestHandlers.delete(method); + } + } + else if (starRequestHandler === type) { + starRequestHandler = undefined; + } + } + }; + }, + hasPendingResponse: () => { + return responsePromises.size > 0; + }, + trace: async (_value, _tracer, sendNotificationOrTraceOptions) => { + let _sendNotification = false; + let _traceFormat = TraceFormat.Text; + if (sendNotificationOrTraceOptions !== undefined) { + if (Is.boolean(sendNotificationOrTraceOptions)) { + _sendNotification = sendNotificationOrTraceOptions; + } + else { + _sendNotification = sendNotificationOrTraceOptions.sendNotification || false; + _traceFormat = sendNotificationOrTraceOptions.traceFormat || TraceFormat.Text; + } + } + trace = _value; + traceFormat = _traceFormat; + if (trace === Trace.Off) { + tracer = undefined; + } + else { + tracer = _tracer; + } + if (_sendNotification && !isClosed() && !isDisposed()) { + await connection.sendNotification(SetTraceNotification.type, { value: Trace.toString(_value) }); + } + }, + onError: errorEmitter.event, + onClose: closeEmitter.event, + onUnhandledNotification: unhandledNotificationEmitter.event, + onDispose: disposeEmitter.event, + end: () => { + messageWriter.end(); + }, + dispose: () => { + if (isDisposed()) { + return; + } + state = ConnectionState.Disposed; + disposeEmitter.fire(undefined); + const error = new messages_1.ResponseError(messages_1.ErrorCodes.PendingResponseRejected, 'Pending response rejected since connection got disposed'); + for (const promise of responsePromises.values()) { + promise.reject(error); + } + responsePromises = new Map(); + requestTokens = new Map(); + knownCanceledRequests = new Set(); + messageQueue = new linkedMap_1.LinkedMap(); + // Test for backwards compatibility + if (Is.func(messageWriter.dispose)) { + messageWriter.dispose(); + } + if (Is.func(messageReader.dispose)) { + messageReader.dispose(); + } + }, + listen: () => { + throwIfClosedOrDisposed(); + throwIfListening(); + state = ConnectionState.Listening; + messageReader.listen(callback); + }, + inspect: () => { + (0, ral_1.default)().console.log('inspect'); + } + }; + connection.onNotification(LogTraceNotification.type, (params) => { + if (trace === Trace.Off || !tracer) { + return; + } + const verbose = trace === Trace.Verbose || trace === Trace.Compact; + tracer.log(params.message, verbose ? params.verbose : undefined); + }); + connection.onNotification(ProgressNotification.type, async (params) => { + const handler = progressHandlers.get(params.token); + if (handler) { + await handler(params.value); + } + else { + unhandledProgressEmitter.fire(params); + } + }); + return connection; +} + + +}, +"./node_modules/vscode-jsonrpc/lib/common/disposable.js"(__unused_rspack_module, exports) { +var __rspack_unused_export; + +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +__rspack_unused_export = ({ value: true }); +exports.Disposable = void 0; +var Disposable; +(function (Disposable) { + function create(func) { + return { + dispose: func + }; + } + Disposable.create = create; +})(Disposable || (exports.Disposable = Disposable = {})); + + +}, +"./node_modules/vscode-jsonrpc/lib/common/events.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Emitter = exports.Event = void 0; +const ral_1 = __importDefault(__webpack_require__("./node_modules/vscode-jsonrpc/lib/common/ral.js")); +var Event; +(function (Event) { + const _disposable = { dispose() { } }; + Event.None = function () { return _disposable; }; +})(Event || (exports.Event = Event = {})); +class CallbackList { + _callbacks; + _contexts; + add(callback, context = null, bucket) { + if (!this._callbacks) { + this._callbacks = []; + this._contexts = []; + } + this._callbacks.push(callback); + this._contexts.push(context); + if (Array.isArray(bucket)) { + bucket.push({ dispose: () => this.remove(callback, context) }); + } + } + remove(callback, context = null) { + if (!this._callbacks) { + return; + } + let foundCallbackWithDifferentContext = false; + for (let i = 0, len = this._callbacks.length; i < len; i++) { + if (this._callbacks[i] === callback) { + if (this._contexts[i] === context) { + // callback & context match => remove it + this._callbacks.splice(i, 1); + this._contexts.splice(i, 1); + return; + } + else { + foundCallbackWithDifferentContext = true; + } + } + } + if (foundCallbackWithDifferentContext) { + throw new Error('When adding a listener with a context, you should remove it with the same context'); + } + } + invoke(...args) { + if (!this._callbacks) { + return []; + } + const ret = [], callbacks = this._callbacks.slice(0), contexts = this._contexts.slice(0); + for (let i = 0, len = callbacks.length; i < len; i++) { + try { + ret.push(callbacks[i].apply(contexts[i], args)); + } + catch (e) { + (0, ral_1.default)().console.error(e); + } + } + return ret; + } + isEmpty() { + return !this._callbacks || this._callbacks.length === 0; + } + dispose() { + this._callbacks = undefined; + this._contexts = undefined; + } +} +class Emitter { + _options; + static _noop = function () { }; + _event; + _callbacks; + constructor(_options) { + this._options = _options; + } + /** + * For the public to allow to subscribe + * to events from this Emitter + */ + get event() { + if (!this._event) { + this._event = (listener, thisArgs, disposables) => { + if (!this._callbacks) { + this._callbacks = new CallbackList(); + } + if (this._options && this._options.onFirstListenerAdd && this._callbacks.isEmpty()) { + this._options.onFirstListenerAdd(this); + } + this._callbacks.add(listener, thisArgs); + const result = { + dispose: () => { + if (!this._callbacks) { + // disposable is disposed after emitter is disposed. + return; + } + this._callbacks.remove(listener, thisArgs); + result.dispose = Emitter._noop; + if (this._options && this._options.onLastListenerRemove && this._callbacks.isEmpty()) { + this._options.onLastListenerRemove(this); + } + } + }; + if (Array.isArray(disposables)) { + disposables.push(result); + } + return result; + }; + } + return this._event; + } + /** + * To be kept private to fire an event to + * subscribers + */ + fire(event) { + if (this._callbacks) { + this._callbacks.invoke.call(this._callbacks, event); + } + } + dispose() { + if (this._callbacks) { + this._callbacks.dispose(); + this._callbacks = undefined; + } + } +} +exports.Emitter = Emitter; + + +}, +"./node_modules/vscode-jsonrpc/lib/common/is.js"(__unused_rspack_module, exports) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.boolean = boolean; +exports.string = string; +exports.number = number; +exports.error = error; +exports.func = func; +exports.array = array; +exports.stringArray = stringArray; +function boolean(value) { + return value === true || value === false; +} +function string(value) { + return typeof value === 'string' || value instanceof String; +} +function number(value) { + return typeof value === 'number' || value instanceof Number; +} +function error(value) { + return value instanceof Error; +} +function func(value) { + return typeof value === 'function'; +} +function array(value) { + return Array.isArray(value); +} +function stringArray(value) { + return array(value) && value.every(elem => string(elem)); +} + + +}, +"./node_modules/vscode-jsonrpc/lib/common/linkedMap.js"(__unused_rspack_module, exports) { +var __rspack_unused_export; + +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +__rspack_unused_export = ({ value: true }); +exports.LRUCache = exports.LinkedMap = exports.Touch = void 0; +var Touch; +(function (Touch) { + Touch.None = 0; + Touch.First = 1; + Touch.AsOld = Touch.First; + Touch.Last = 2; + Touch.AsNew = Touch.Last; +})(Touch || (exports.Touch = Touch = {})); +class LinkedMap { + [Symbol.toStringTag] = 'LinkedMap'; + _map; + _head; + _tail; + _size; + _state; + constructor() { + this._map = new Map(); + this._head = undefined; + this._tail = undefined; + this._size = 0; + this._state = 0; + } + clear() { + this._map.clear(); + this._head = undefined; + this._tail = undefined; + this._size = 0; + this._state++; + } + isEmpty() { + return !this._head && !this._tail; + } + get size() { + return this._size; + } + get first() { + return this._head?.value; + } + get last() { + return this._tail?.value; + } + before(key) { + const item = this._map.get(key); + return item ? item.previous?.value : undefined; + } + after(key) { + const item = this._map.get(key); + return item ? item.next?.value : undefined; + } + has(key) { + return this._map.has(key); + } + get(key, touch = Touch.None) { + const item = this._map.get(key); + if (!item) { + return undefined; + } + if (touch !== Touch.None) { + this.touch(item, touch); + } + return item.value; + } + set(key, value, touch = Touch.None) { + let item = this._map.get(key); + if (item) { + item.value = value; + if (touch !== Touch.None) { + this.touch(item, touch); + } + } + else { + item = { key, value, next: undefined, previous: undefined }; + switch (touch) { + case Touch.None: + this.addItemLast(item); + break; + case Touch.First: + this.addItemFirst(item); + break; + case Touch.Last: + this.addItemLast(item); + break; + default: + this.addItemLast(item); + break; + } + this._map.set(key, item); + this._size++; + } + return this; + } + delete(key) { + return !!this.remove(key); + } + remove(key) { + const item = this._map.get(key); + if (!item) { + return undefined; + } + this._map.delete(key); + this.removeItem(item); + this._size--; + return item.value; + } + shift() { + if (!this._head && !this._tail) { + return undefined; + } + if (!this._head || !this._tail) { + throw new Error('Invalid list'); + } + const item = this._head; + this._map.delete(item.key); + this.removeItem(item); + this._size--; + return item.value; + } + forEach(callbackfn, thisArg) { + const state = this._state; + let current = this._head; + while (current) { + if (thisArg) { + callbackfn.bind(thisArg)(current.value, current.key, this); + } + else { + callbackfn(current.value, current.key, this); + } + if (this._state !== state) { + throw new Error(`LinkedMap got modified during iteration.`); + } + current = current.next; + } + } + keys() { + const state = this._state; + let current = this._head; + const iterator = { + [Symbol.iterator]: () => { + return iterator; + }, + next: () => { + if (this._state !== state) { + throw new Error(`LinkedMap got modified during iteration.`); + } + if (current) { + const result = { value: current.key, done: false }; + current = current.next; + return result; + } + else { + return { value: undefined, done: true }; + } + } + }; + return iterator; + } + values() { + const state = this._state; + let current = this._head; + const iterator = { + [Symbol.iterator]: () => { + return iterator; + }, + next: () => { + if (this._state !== state) { + throw new Error(`LinkedMap got modified during iteration.`); + } + if (current) { + const result = { value: current.value, done: false }; + current = current.next; + return result; + } + else { + return { value: undefined, done: true }; + } + } + }; + return iterator; + } + entries() { + const state = this._state; + let current = this._head; + const iterator = { + [Symbol.iterator]: () => { + return iterator; + }, + next: () => { + if (this._state !== state) { + throw new Error(`LinkedMap got modified during iteration.`); + } + if (current) { + const result = { value: [current.key, current.value], done: false }; + current = current.next; + return result; + } + else { + return { value: undefined, done: true }; + } + } + }; + return iterator; + } + [Symbol.iterator]() { + return this.entries(); + } + trimOld(newSize) { + if (newSize >= this.size) { + return; + } + if (newSize === 0) { + this.clear(); + return; + } + let current = this._head; + let currentSize = this.size; + while (current && currentSize > newSize) { + this._map.delete(current.key); + current = current.next; + currentSize--; + } + this._head = current; + this._size = currentSize; + if (current) { + current.previous = undefined; + } + this._state++; + } + addItemFirst(item) { + // First time Insert + if (!this._head && !this._tail) { + this._tail = item; + } + else if (!this._head) { + throw new Error('Invalid list'); + } + else { + item.next = this._head; + this._head.previous = item; + } + this._head = item; + this._state++; + } + addItemLast(item) { + // First time Insert + if (!this._head && !this._tail) { + this._head = item; + } + else if (!this._tail) { + throw new Error('Invalid list'); + } + else { + item.previous = this._tail; + this._tail.next = item; + } + this._tail = item; + this._state++; + } + removeItem(item) { + if (item === this._head && item === this._tail) { + this._head = undefined; + this._tail = undefined; + } + else if (item === this._head) { + // This can only happened if size === 1 which is handle + // by the case above. + if (!item.next) { + throw new Error('Invalid list'); + } + item.next.previous = undefined; + this._head = item.next; + } + else if (item === this._tail) { + // This can only happened if size === 1 which is handle + // by the case above. + if (!item.previous) { + throw new Error('Invalid list'); + } + item.previous.next = undefined; + this._tail = item.previous; + } + else { + const next = item.next; + const previous = item.previous; + if (!next || !previous) { + throw new Error('Invalid list'); + } + next.previous = previous; + previous.next = next; + } + item.next = undefined; + item.previous = undefined; + this._state++; + } + touch(item, touch) { + if (!this._head || !this._tail) { + throw new Error('Invalid list'); + } + if ((touch !== Touch.First && touch !== Touch.Last)) { + return; + } + if (touch === Touch.First) { + if (item === this._head) { + return; + } + const next = item.next; + const previous = item.previous; + // Unlink the item + if (item === this._tail) { + // previous must be defined since item was not head but is tail + // So there are more than on item in the map + previous.next = undefined; + this._tail = previous; + } + else { + // Both next and previous are not undefined since item was neither head nor tail. + next.previous = previous; + previous.next = next; + } + // Insert the node at head + item.previous = undefined; + item.next = this._head; + this._head.previous = item; + this._head = item; + this._state++; + } + else if (touch === Touch.Last) { + if (item === this._tail) { + return; + } + const next = item.next; + const previous = item.previous; + // Unlink the item. + if (item === this._head) { + // next must be defined since item was not tail but is head + // So there are more than on item in the map + next.previous = undefined; + this._head = next; + } + else { + // Both next and previous are not undefined since item was neither head nor tail. + next.previous = previous; + previous.next = next; + } + item.next = undefined; + item.previous = this._tail; + this._tail.next = item; + this._tail = item; + this._state++; + } + } + toJSON() { + const data = []; + this.forEach((value, key) => { + data.push([key, value]); + }); + return data; + } + fromJSON(data) { + this.clear(); + for (const [key, value] of data) { + this.set(key, value); + } + } +} +exports.LinkedMap = LinkedMap; +class LRUCache extends LinkedMap { + _limit; + _ratio; + constructor(limit, ratio = 1) { + super(); + this._limit = limit; + this._ratio = Math.min(Math.max(0, ratio), 1); + } + get limit() { + return this._limit; + } + set limit(limit) { + this._limit = limit; + this.checkTrim(); + } + get ratio() { + return this._ratio; + } + set ratio(ratio) { + this._ratio = Math.min(Math.max(0, ratio), 1); + this.checkTrim(); + } + get(key, touch = Touch.AsNew) { + return super.get(key, touch); + } + peek(key) { + return super.get(key, Touch.None); + } + set(key, value) { + super.set(key, value, Touch.Last); + this.checkTrim(); + return this; + } + checkTrim() { + if (this.size > this._limit) { + this.trimOld(Math.round(this._limit * this._ratio)); + } + } +} +exports.LRUCache = LRUCache; + + +}, +"./node_modules/vscode-jsonrpc/lib/common/messageBuffer.js"(__unused_rspack_module, exports) { +var __rspack_unused_export; + +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +__rspack_unused_export = ({ value: true }); +exports.AbstractMessageBuffer = void 0; +const CR = 13; +const LF = 10; +const CRLF = '\r\n'; +class AbstractMessageBuffer { + _encoding; + _chunks; + _totalLength; + constructor(encoding = 'utf-8') { + this._encoding = encoding; + this._chunks = []; + this._totalLength = 0; + } + get encoding() { + return this._encoding; + } + append(chunk) { + const toAppend = typeof chunk === 'string' ? this.fromString(chunk, this._encoding) : chunk; + this._chunks.push(toAppend); + this._totalLength += toAppend.byteLength; + } + tryReadHeaders(lowerCaseKeys = false) { + if (this._chunks.length === 0) { + return undefined; + } + let state = 0; + let chunkIndex = 0; + let offset = 0; + let chunkBytesRead = 0; + row: while (chunkIndex < this._chunks.length) { + const chunk = this._chunks[chunkIndex]; + offset = 0; + while (offset < chunk.length) { + const value = chunk[offset]; + switch (value) { + case CR: + switch (state) { + case 0: + state = 1; + break; + case 2: + state = 3; + break; + default: + state = 0; + } + break; + case LF: + switch (state) { + case 1: + state = 2; + break; + case 3: + state = 4; + offset++; + break row; + default: + state = 0; + } + break; + default: + state = 0; + } + offset++; + } + chunkBytesRead += chunk.byteLength; + chunkIndex++; + } + if (state !== 4) { + return undefined; + } + // The buffer contains the two CRLF at the end. So we will + // have two empty lines after the split at the end as well. + const buffer = this._read(chunkBytesRead + offset); + const result = new Map(); + const headers = this.toString(buffer, 'ascii').split(CRLF); + if (headers.length < 2) { + return result; + } + for (let i = 0; i < headers.length - 2; i++) { + const header = headers[i]; + const index = header.indexOf(':'); + if (index === -1) { + throw new Error(`Message header must separate key and value using ':'\n${header}`); + } + const key = header.substr(0, index); + const value = header.substr(index + 1).trim(); + result.set(lowerCaseKeys ? key.toLowerCase() : key, value); + } + return result; + } + tryReadBody(length) { + if (this._totalLength < length) { + return undefined; + } + return this._read(length); + } + get numberOfBytes() { + return this._totalLength; + } + _read(byteCount) { + if (byteCount === 0) { + return this.emptyBuffer(); + } + if (byteCount > this._totalLength) { + throw new Error(`Cannot read so many bytes!`); + } + if (this._chunks[0].byteLength === byteCount) { + // super fast path, precisely first chunk must be returned + const chunk = this._chunks[0]; + this._chunks.shift(); + this._totalLength -= byteCount; + return this.asNative(chunk); + } + if (this._chunks[0].byteLength > byteCount) { + // fast path, the reading is entirely within the first chunk + const chunk = this._chunks[0]; + const result = this.asNative(chunk, byteCount); + this._chunks[0] = chunk.slice(byteCount); + this._totalLength -= byteCount; + return result; + } + const result = this.allocNative(byteCount); + let resultOffset = 0; + const chunkIndex = 0; + while (byteCount > 0) { + const chunk = this._chunks[chunkIndex]; + if (chunk.byteLength > byteCount) { + // this chunk will survive + const chunkPart = chunk.slice(0, byteCount); + result.set(chunkPart, resultOffset); + resultOffset += byteCount; + this._chunks[chunkIndex] = chunk.slice(byteCount); + this._totalLength -= byteCount; + byteCount -= byteCount; + } + else { + // this chunk will be entirely read + result.set(chunk, resultOffset); + resultOffset += chunk.byteLength; + this._chunks.shift(); + this._totalLength -= chunk.byteLength; + byteCount -= chunk.byteLength; + } + } + return result; + } +} +exports.AbstractMessageBuffer = AbstractMessageBuffer; + + +}, +"./node_modules/vscode-jsonrpc/lib/common/messageReader.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ReadableStreamMessageReader = exports.AbstractMessageReader = exports.MessageReader = void 0; +const ral_1 = __importDefault(__webpack_require__("./node_modules/vscode-jsonrpc/lib/common/ral.js")); +const Is = __importStar(__webpack_require__("./node_modules/vscode-jsonrpc/lib/common/is.js")); +const events_1 = __webpack_require__("./node_modules/vscode-jsonrpc/lib/common/events.js"); +const semaphore_1 = __webpack_require__("./node_modules/vscode-jsonrpc/lib/common/semaphore.js"); +var MessageReader; +(function (MessageReader) { + function is(value) { + const candidate = value; + return candidate && Is.func(candidate.listen) && Is.func(candidate.dispose) && + Is.func(candidate.onError) && Is.func(candidate.onClose) && Is.func(candidate.onPartialMessage); + } + MessageReader.is = is; +})(MessageReader || (exports.MessageReader = MessageReader = {})); +class AbstractMessageReader { + errorEmitter; + closeEmitter; + partialMessageEmitter; + constructor() { + this.errorEmitter = new events_1.Emitter(); + this.closeEmitter = new events_1.Emitter(); + this.partialMessageEmitter = new events_1.Emitter(); + } + dispose() { + this.errorEmitter.dispose(); + this.closeEmitter.dispose(); + this.partialMessageEmitter.dispose(); + } + get onError() { + return this.errorEmitter.event; + } + fireError(error) { + this.errorEmitter.fire(this.asError(error)); + } + get onClose() { + return this.closeEmitter.event; + } + fireClose() { + this.closeEmitter.fire(undefined); + } + get onPartialMessage() { + return this.partialMessageEmitter.event; + } + firePartialMessage(info) { + this.partialMessageEmitter.fire(info); + } + asError(error) { + if (error instanceof Error) { + return error; + } + else { + return new Error(`Reader received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`); + } + } +} +exports.AbstractMessageReader = AbstractMessageReader; +var ResolvedMessageReaderOptions; +(function (ResolvedMessageReaderOptions) { + function fromOptions(options) { + let charset; + let result; + let contentDecoder; + const contentDecoders = new Map(); + let contentTypeDecoder; + const contentTypeDecoders = new Map(); + if (options === undefined || typeof options === 'string') { + charset = options ?? 'utf-8'; + } + else { + charset = options.charset ?? 'utf-8'; + if (options.contentDecoder !== undefined) { + contentDecoder = options.contentDecoder; + contentDecoders.set(contentDecoder.name, contentDecoder); + } + if (options.contentDecoders !== undefined) { + for (const decoder of options.contentDecoders) { + contentDecoders.set(decoder.name, decoder); + } + } + if (options.contentTypeDecoder !== undefined) { + contentTypeDecoder = options.contentTypeDecoder; + contentTypeDecoders.set(contentTypeDecoder.name, contentTypeDecoder); + } + if (options.contentTypeDecoders !== undefined) { + for (const decoder of options.contentTypeDecoders) { + contentTypeDecoders.set(decoder.name, decoder); + } + } + } + if (contentTypeDecoder === undefined) { + contentTypeDecoder = (0, ral_1.default)().applicationJson.decoder; + contentTypeDecoders.set(contentTypeDecoder.name, contentTypeDecoder); + } + return { charset, contentDecoder, contentDecoders, contentTypeDecoder, contentTypeDecoders }; + } + ResolvedMessageReaderOptions.fromOptions = fromOptions; +})(ResolvedMessageReaderOptions || (ResolvedMessageReaderOptions = {})); +class ReadableStreamMessageReader extends AbstractMessageReader { + readable; + options; + callback; + nextMessageLength; + messageToken; + buffer; + partialMessageTimer; + _partialMessageTimeout; + readSemaphore; + constructor(readable, options) { + super(); + this.readable = readable; + this.options = ResolvedMessageReaderOptions.fromOptions(options); + this.buffer = (0, ral_1.default)().messageBuffer.create(this.options.charset); + this._partialMessageTimeout = 10000; + this.nextMessageLength = -1; + this.messageToken = 0; + this.readSemaphore = new semaphore_1.Semaphore(1); + } + set partialMessageTimeout(timeout) { + this._partialMessageTimeout = timeout; + } + get partialMessageTimeout() { + return this._partialMessageTimeout; + } + listen(callback) { + this.nextMessageLength = -1; + this.messageToken = 0; + this.partialMessageTimer = undefined; + this.callback = callback; + const result = this.readable.onData((data) => { + this.onData(data); + }); + this.readable.onError((error) => this.fireError(error)); + this.readable.onClose(() => this.fireClose()); + return result; + } + onData(data) { + try { + this.buffer.append(data); + while (true) { + if (this.nextMessageLength === -1) { + const headers = this.buffer.tryReadHeaders(true); + if (!headers) { + return; + } + const contentLength = headers.get('content-length'); + if (!contentLength) { + this.fireError(new Error(`Header must provide a Content-Length property.\n${JSON.stringify(Object.fromEntries(headers))}`)); + return; + } + const length = parseInt(contentLength); + if (isNaN(length)) { + this.fireError(new Error(`Content-Length value must be a number. Got ${contentLength}`)); + return; + } + this.nextMessageLength = length; + } + const body = this.buffer.tryReadBody(this.nextMessageLength); + if (body === undefined) { + /** We haven't received the full message yet. */ + this.setPartialMessageTimer(); + return; + } + this.clearPartialMessageTimer(); + this.nextMessageLength = -1; + // Make sure that we convert one received message after the + // other. Otherwise it could happen that a decoding of a second + // smaller message finished before the decoding of a first larger + // message and then we would deliver the second message first. + this.readSemaphore.lock(async () => { + const bytes = this.options.contentDecoder !== undefined + ? await this.options.contentDecoder.decode(body) + : body; + const message = await this.options.contentTypeDecoder.decode(bytes, this.options); + this.callback(message); + }).catch((error) => { + this.fireError(error); + }); + } + } + catch (error) { + this.fireError(error); + } + } + clearPartialMessageTimer() { + if (this.partialMessageTimer) { + this.partialMessageTimer.dispose(); + this.partialMessageTimer = undefined; + } + } + setPartialMessageTimer() { + this.clearPartialMessageTimer(); + if (this._partialMessageTimeout <= 0) { + return; + } + this.partialMessageTimer = (0, ral_1.default)().timer.setTimeout((token, timeout) => { + this.partialMessageTimer = undefined; + if (token === this.messageToken) { + this.firePartialMessage({ messageToken: token, waitingTime: timeout }); + this.setPartialMessageTimer(); + } + }, this._partialMessageTimeout, this.messageToken, this._partialMessageTimeout); + } +} +exports.ReadableStreamMessageReader = ReadableStreamMessageReader; + + +}, +"./node_modules/vscode-jsonrpc/lib/common/messageWriter.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.WriteableStreamMessageWriter = exports.AbstractMessageWriter = exports.MessageWriter = void 0; +const ral_1 = __importDefault(__webpack_require__("./node_modules/vscode-jsonrpc/lib/common/ral.js")); +const Is = __importStar(__webpack_require__("./node_modules/vscode-jsonrpc/lib/common/is.js")); +const semaphore_1 = __webpack_require__("./node_modules/vscode-jsonrpc/lib/common/semaphore.js"); +const events_1 = __webpack_require__("./node_modules/vscode-jsonrpc/lib/common/events.js"); +const ContentLength = 'Content-Length: '; +const CRLF = '\r\n'; +var MessageWriter; +(function (MessageWriter) { + function is(value) { + const candidate = value; + return candidate && Is.func(candidate.dispose) && Is.func(candidate.onClose) && + Is.func(candidate.onError) && Is.func(candidate.write); + } + MessageWriter.is = is; +})(MessageWriter || (exports.MessageWriter = MessageWriter = {})); +class AbstractMessageWriter { + errorEmitter; + closeEmitter; + constructor() { + this.errorEmitter = new events_1.Emitter(); + this.closeEmitter = new events_1.Emitter(); + } + dispose() { + this.errorEmitter.dispose(); + this.closeEmitter.dispose(); + } + get onError() { + return this.errorEmitter.event; + } + fireError(error, message, count) { + this.errorEmitter.fire([this.asError(error), message, count]); + } + get onClose() { + return this.closeEmitter.event; + } + fireClose() { + this.closeEmitter.fire(undefined); + } + asError(error) { + if (error instanceof Error) { + return error; + } + else { + return new Error(`Writer received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`); + } + } +} +exports.AbstractMessageWriter = AbstractMessageWriter; +var ResolvedMessageWriterOptions; +(function (ResolvedMessageWriterOptions) { + function fromOptions(options) { + if (options === undefined || typeof options === 'string') { + return { charset: options ?? 'utf-8', contentTypeEncoder: (0, ral_1.default)().applicationJson.encoder }; + } + else { + return { charset: options.charset ?? 'utf-8', contentEncoder: options.contentEncoder, contentTypeEncoder: options.contentTypeEncoder ?? (0, ral_1.default)().applicationJson.encoder }; + } + } + ResolvedMessageWriterOptions.fromOptions = fromOptions; +})(ResolvedMessageWriterOptions || (ResolvedMessageWriterOptions = {})); +class WriteableStreamMessageWriter extends AbstractMessageWriter { + writable; + options; + errorCount; + writeSemaphore; + constructor(writable, options) { + super(); + this.writable = writable; + this.options = ResolvedMessageWriterOptions.fromOptions(options); + this.errorCount = 0; + this.writeSemaphore = new semaphore_1.Semaphore(1); + this.writable.onError((error) => this.fireError(error)); + this.writable.onClose(() => this.fireClose()); + } + async write(msg) { + return this.writeSemaphore.lock(async () => { + const payload = this.options.contentTypeEncoder.encode(msg, this.options).then((buffer) => { + if (this.options.contentEncoder !== undefined) { + return this.options.contentEncoder.encode(buffer); + } + else { + return buffer; + } + }); + return payload.then((buffer) => { + const headers = []; + headers.push(ContentLength, buffer.byteLength.toString(), CRLF); + headers.push(CRLF); + return this.doWrite(msg, headers, buffer); + }, (error) => { + this.fireError(error); + throw error; + }); + }); + } + async doWrite(msg, headers, data) { + try { + await this.writable.write(headers.join(''), 'ascii'); + return this.writable.write(data); + } + catch (error) { + this.handleError(error, msg); + return Promise.reject(error); + } + } + handleError(error, msg) { + this.errorCount++; + this.fireError(error, msg, this.errorCount); + } + end() { + this.writable.end(); + } +} +exports.WriteableStreamMessageWriter = WriteableStreamMessageWriter; + + +}, +"./node_modules/vscode-jsonrpc/lib/common/messages.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Message = exports.NotificationType9 = exports.NotificationType8 = exports.NotificationType7 = exports.NotificationType6 = exports.NotificationType5 = exports.NotificationType4 = exports.NotificationType3 = exports.NotificationType2 = exports.NotificationType1 = exports.NotificationType0 = exports.NotificationType = exports.RequestType9 = exports.RequestType8 = exports.RequestType7 = exports.RequestType6 = exports.RequestType5 = exports.RequestType4 = exports.RequestType3 = exports.RequestType2 = exports.RequestType1 = exports.RequestType = exports.RequestType0 = exports.AbstractMessageSignature = exports.ParameterStructures = exports.ResponseError = exports.ErrorCodes = void 0; +const is = __importStar(__webpack_require__("./node_modules/vscode-jsonrpc/lib/common/is.js")); +/** + * Predefined error codes. + */ +var ErrorCodes; +(function (ErrorCodes) { + // Defined by JSON RPC + ErrorCodes.ParseError = -32700; + ErrorCodes.InvalidRequest = -32600; + ErrorCodes.MethodNotFound = -32601; + ErrorCodes.InvalidParams = -32602; + ErrorCodes.InternalError = -32603; + /** + * This is the start range of JSON RPC reserved error codes. + * It doesn't denote a real error code. No application error codes should + * be defined between the start and end range. For backwards + * compatibility the `ServerNotInitialized` and the `UnknownErrorCode` + * are left in the range. + * + * @since 3.16.0 + */ + ErrorCodes.jsonrpcReservedErrorRangeStart = -32099; + /** @deprecated use jsonrpcReservedErrorRangeStart */ + ErrorCodes.serverErrorStart = -32099; + /** + * An error occurred when write a message to the transport layer. + */ + ErrorCodes.MessageWriteError = -32099; + /** + * An error occurred when reading a message from the transport layer. + */ + ErrorCodes.MessageReadError = -32098; + /** + * The connection got disposed or lost and all pending responses got + * rejected. + */ + ErrorCodes.PendingResponseRejected = -32097; + /** + * The connection is inactive and a use of it failed. + */ + ErrorCodes.ConnectionInactive = -32096; + /** + * Error code indicating that a server received a notification or + * request before the server has received the `initialize` request. + */ + ErrorCodes.ServerNotInitialized = -32002; + ErrorCodes.UnknownErrorCode = -32001; + /** + * This is the end range of JSON RPC reserved error codes. + * It doesn't denote a real error code. + * + * @since 3.16.0 + */ + ErrorCodes.jsonrpcReservedErrorRangeEnd = -32000; + /** @deprecated use jsonrpcReservedErrorRangeEnd */ + ErrorCodes.serverErrorEnd = -32000; +})(ErrorCodes || (exports.ErrorCodes = ErrorCodes = {})); +/** + * An error object return in a response in case a request + * has failed. + */ +class ResponseError extends Error { + code; + data; + constructor(code, message, data) { + super(message); + this.code = is.number(code) ? code : ErrorCodes.UnknownErrorCode; + this.data = data; + Object.setPrototypeOf(this, ResponseError.prototype); + } + toJson() { + const result = { + code: this.code, + message: this.message + }; + if (this.data !== undefined) { + result.data = this.data; + } + return result; + } +} +exports.ResponseError = ResponseError; +class ParameterStructures { + kind; + /** + * The parameter structure is automatically inferred on the number of parameters + * and the parameter type in case of a single param. + */ + static auto = new ParameterStructures('auto'); + /** + * Forces `byPosition` parameter structure. This is useful if you have a single + * parameter which has a literal type. + */ + static byPosition = new ParameterStructures('byPosition'); + /** + * Forces `byName` parameter structure. This is only useful when having a single + * parameter. The library will report errors if used with a different number of + * parameters. + */ + static byName = new ParameterStructures('byName'); + constructor(kind) { + this.kind = kind; + } + static is(value) { + return value === ParameterStructures.auto || value === ParameterStructures.byName || value === ParameterStructures.byPosition; + } + toString() { + return this.kind; + } +} +exports.ParameterStructures = ParameterStructures; +/** + * An abstract implementation of a MessageType. + */ +class AbstractMessageSignature { + method; + numberOfParams; + constructor(method, numberOfParams) { + this.method = method; + this.numberOfParams = numberOfParams; + } + get parameterStructures() { + return ParameterStructures.auto; + } +} +exports.AbstractMessageSignature = AbstractMessageSignature; +/** + * Classes to type request response pairs + */ +class RequestType0 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 0); + } +} +exports.RequestType0 = RequestType0; +class RequestType extends AbstractMessageSignature { + _parameterStructures; + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method, _parameterStructures = ParameterStructures.auto) { + super(method, 1); + this._parameterStructures = _parameterStructures; + } + get parameterStructures() { + return this._parameterStructures; + } +} +exports.RequestType = RequestType; +class RequestType1 extends AbstractMessageSignature { + _parameterStructures; + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method, _parameterStructures = ParameterStructures.auto) { + super(method, 1); + this._parameterStructures = _parameterStructures; + } + get parameterStructures() { + return this._parameterStructures; + } +} +exports.RequestType1 = RequestType1; +class RequestType2 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 2); + } +} +exports.RequestType2 = RequestType2; +class RequestType3 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 3); + } +} +exports.RequestType3 = RequestType3; +class RequestType4 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 4); + } +} +exports.RequestType4 = RequestType4; +class RequestType5 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 5); + } +} +exports.RequestType5 = RequestType5; +class RequestType6 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 6); + } +} +exports.RequestType6 = RequestType6; +class RequestType7 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 7); + } +} +exports.RequestType7 = RequestType7; +class RequestType8 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 8); + } +} +exports.RequestType8 = RequestType8; +class RequestType9 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 9); + } +} +exports.RequestType9 = RequestType9; +class NotificationType extends AbstractMessageSignature { + _parameterStructures; + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method, _parameterStructures = ParameterStructures.auto) { + super(method, 1); + this._parameterStructures = _parameterStructures; + } + get parameterStructures() { + return this._parameterStructures; + } +} +exports.NotificationType = NotificationType; +class NotificationType0 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 0); + } +} +exports.NotificationType0 = NotificationType0; +class NotificationType1 extends AbstractMessageSignature { + _parameterStructures; + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method, _parameterStructures = ParameterStructures.auto) { + super(method, 1); + this._parameterStructures = _parameterStructures; + } + get parameterStructures() { + return this._parameterStructures; + } +} +exports.NotificationType1 = NotificationType1; +class NotificationType2 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 2); + } +} +exports.NotificationType2 = NotificationType2; +class NotificationType3 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 3); + } +} +exports.NotificationType3 = NotificationType3; +class NotificationType4 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 4); + } +} +exports.NotificationType4 = NotificationType4; +class NotificationType5 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 5); + } +} +exports.NotificationType5 = NotificationType5; +class NotificationType6 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 6); + } +} +exports.NotificationType6 = NotificationType6; +class NotificationType7 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 7); + } +} +exports.NotificationType7 = NotificationType7; +class NotificationType8 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 8); + } +} +exports.NotificationType8 = NotificationType8; +class NotificationType9 extends AbstractMessageSignature { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + _; + constructor(method) { + super(method, 9); + } +} +exports.NotificationType9 = NotificationType9; +var Message; +(function (Message) { + /** + * Tests if the given message is a request message + */ + function isRequest(message) { + const candidate = message; + return candidate && is.string(candidate.method) && (is.string(candidate.id) || is.number(candidate.id)); + } + Message.isRequest = isRequest; + /** + * Tests if the given message is a notification message + */ + function isNotification(message) { + const candidate = message; + return candidate && is.string(candidate.method) && message.id === void 0; + } + Message.isNotification = isNotification; + /** + * Tests if the given message is a response message + */ + function isResponse(message) { + const candidate = message; + return candidate && (candidate.result !== void 0 || !!candidate.error) && (is.string(candidate.id) || is.number(candidate.id) || candidate.id === null); + } + Message.isResponse = isResponse; +})(Message || (exports.Message = Message = {})); + + +}, +"./node_modules/vscode-jsonrpc/lib/common/ral.js"(__unused_rspack_module, exports) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +let _ral; +function RAL() { + if (_ral === undefined) { + throw new Error(`No runtime abstraction layer installed`); + } + return _ral; +} +(function (RAL) { + function install(ral) { + if (ral === undefined) { + throw new Error(`No runtime abstraction layer provided`); + } + _ral = ral; + } + RAL.install = install; +})(RAL || (RAL = {})); +exports["default"] = RAL; + + +}, +"./node_modules/vscode-jsonrpc/lib/common/semaphore.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Semaphore = void 0; +const ral_1 = __importDefault(__webpack_require__("./node_modules/vscode-jsonrpc/lib/common/ral.js")); +class Semaphore { + _capacity; + _active; + _waiting; + constructor(capacity = 1) { + if (capacity <= 0) { + throw new Error('Capacity must be greater than 0'); + } + this._capacity = capacity; + this._active = 0; + this._waiting = []; + } + lock(thunk) { + return new Promise((resolve, reject) => { + this._waiting.push({ thunk, resolve, reject }); + this.runNext(); + }); + } + get active() { + return this._active; + } + runNext() { + if (this._waiting.length === 0 || this._active === this._capacity) { + return; + } + (0, ral_1.default)().timer.setImmediate(() => this.doRunNext()); + } + doRunNext() { + if (this._waiting.length === 0 || this._active === this._capacity) { + return; + } + const next = this._waiting.shift(); + this._active++; + if (this._active > this._capacity) { + throw new Error(`Too many thunks active`); + } + try { + const result = next.thunk(); + if (result instanceof Promise) { + result.then((value) => { + this._active--; + next.resolve(value); + this.runNext(); + }, (err) => { + this._active--; + next.reject(err); + this.runNext(); + }); + } + else { + this._active--; + next.resolve(result); + this.runNext(); + } + } + catch (err) { + this._active--; + next.reject(err); + this.runNext(); + } + } +} +exports.Semaphore = Semaphore; + + +}, +"./node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js"(__unused_rspack_module, exports, __webpack_require__) { +var __rspack_unused_export; + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +__rspack_unused_export = ({ value: true }); +exports.SharedArrayReceiverStrategy = exports.SharedArraySenderStrategy = void 0; +const cancellation_1 = __webpack_require__("./node_modules/vscode-jsonrpc/lib/common/cancellation.js"); +var CancellationState; +(function (CancellationState) { + CancellationState.Continue = 0; + CancellationState.Cancelled = 1; +})(CancellationState || (CancellationState = {})); +class SharedArraySenderStrategy { + buffers; + constructor() { + this.buffers = new Map(); + } + enableCancellation(request) { + if (request.id === null) { + return; + } + const buffer = new SharedArrayBuffer(4); + const data = new Int32Array(buffer, 0, 1); + data[0] = CancellationState.Continue; + this.buffers.set(request.id, buffer); + request.$cancellationData = buffer; + } + async sendCancellation(_conn, id) { + const buffer = this.buffers.get(id); + if (buffer === undefined) { + return; + } + const data = new Int32Array(buffer, 0, 1); + Atomics.store(data, 0, CancellationState.Cancelled); + } + cleanup(id) { + this.buffers.delete(id); + } + dispose() { + this.buffers.clear(); + } +} +exports.SharedArraySenderStrategy = SharedArraySenderStrategy; +class SharedArrayBufferCancellationToken { + data; + constructor(buffer) { + this.data = new Int32Array(buffer, 0, 1); + } + get isCancellationRequested() { + return Atomics.load(this.data, 0) === CancellationState.Cancelled; + } + get onCancellationRequested() { + throw new Error(`Cancellation over SharedArrayBuffer doesn't support cancellation events`); + } +} +class SharedArrayBufferCancellationTokenSource { + token; + constructor(buffer) { + this.token = new SharedArrayBufferCancellationToken(buffer); + } + cancel() { + } + dispose() { + } +} +class SharedArrayReceiverStrategy { + kind = 'request'; + createCancellationTokenSource(request) { + const buffer = request.$cancellationData; + if (buffer === undefined) { + return new cancellation_1.CancellationTokenSource(); + } + return new SharedArrayBufferCancellationTokenSource(buffer); + } +} +exports.SharedArrayReceiverStrategy = SharedArrayReceiverStrategy; + + +}, +"./node_modules/vscode-jsonrpc/lib/node/main.js"(__unused_rspack_module, exports, __webpack_require__) { + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StreamMessageWriter = exports.StreamMessageReader = exports.SocketMessageWriter = exports.SocketMessageReader = exports.PortMessageWriter = exports.PortMessageReader = exports.IPCMessageWriter = exports.IPCMessageReader = void 0; +exports.generateRandomPipeName = generateRandomPipeName; +exports.createClientPipeTransport = createClientPipeTransport; +exports.createServerPipeTransport = createServerPipeTransport; +exports.createClientSocketTransport = createClientSocketTransport; +exports.createServerSocketTransport = createServerSocketTransport; +exports.createMessageConnection = createMessageConnection; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ----------------------------------------------------------------------------------------- */ +const ril_1 = __importDefault(__webpack_require__("./node_modules/vscode-jsonrpc/lib/node/ril.js")); +// Install the node runtime abstract. +ril_1.default.install(); +const path = __importStar(__webpack_require__("path")); +const os = __importStar(__webpack_require__("os")); +const fs = __importStar(__webpack_require__("fs")); +const crypto_1 = __webpack_require__("crypto"); +const net_1 = __webpack_require__("net"); +const api_1 = __webpack_require__("./node_modules/vscode-jsonrpc/lib/common/api.js"); +__exportStar(__webpack_require__("./node_modules/vscode-jsonrpc/lib/common/api.js"), exports); +class IPCMessageReader extends api_1.AbstractMessageReader { + process; + constructor(process) { + super(); + this.process = process; + const eventEmitter = this.process; + eventEmitter.on('error', (error) => this.fireError(error)); + eventEmitter.on('close', () => this.fireClose()); + } + listen(callback) { + this.process.on('message', callback); + return api_1.Disposable.create(() => this.process.off('message', callback)); + } +} +exports.IPCMessageReader = IPCMessageReader; +class IPCMessageWriter extends api_1.AbstractMessageWriter { + process; + errorCount; + constructor(process) { + super(); + this.process = process; + this.errorCount = 0; + const eventEmitter = this.process; + eventEmitter.on('error', (error) => this.fireError(error)); + eventEmitter.on('close', () => this.fireClose); + } + write(msg) { + try { + if (typeof this.process.send === 'function') { + this.process.send(msg, undefined, undefined, (error) => { + if (error) { + this.errorCount++; + this.handleError(error, msg); + } + else { + this.errorCount = 0; + } + }); + } + return Promise.resolve(); + } + catch (error) { + this.handleError(error, msg); + return Promise.reject(error); + } + } + handleError(error, msg) { + this.errorCount++; + this.fireError(error, msg, this.errorCount); + } + end() { + } +} +exports.IPCMessageWriter = IPCMessageWriter; +class PortMessageReader extends api_1.AbstractMessageReader { + onData; + constructor(port) { + super(); + this.onData = new api_1.Emitter; + port.on('close', () => this.fireClose); + port.on('error', (error) => this.fireError(error)); + port.on('message', (message) => { + this.onData.fire(message); + }); + } + listen(callback) { + return this.onData.event(callback); + } +} +exports.PortMessageReader = PortMessageReader; +class PortMessageWriter extends api_1.AbstractMessageWriter { + port; + errorCount; + constructor(port) { + super(); + this.port = port; + this.errorCount = 0; + port.on('close', () => this.fireClose()); + port.on('error', (error) => this.fireError(error)); + } + write(msg) { + try { + this.port.postMessage(msg); + return Promise.resolve(); + } + catch (error) { + this.handleError(error, msg); + return Promise.reject(error); + } + } + handleError(error, msg) { + this.errorCount++; + this.fireError(error, msg, this.errorCount); + } + end() { + } +} +exports.PortMessageWriter = PortMessageWriter; +class SocketMessageReader extends api_1.ReadableStreamMessageReader { + constructor(socket, encoding = 'utf-8') { + super((0, ril_1.default)().stream.asReadableStream(socket), encoding); + } +} +exports.SocketMessageReader = SocketMessageReader; +class SocketMessageWriter extends api_1.WriteableStreamMessageWriter { + socket; + constructor(socket, options) { + super((0, ril_1.default)().stream.asWritableStream(socket), options); + this.socket = socket; + } + dispose() { + super.dispose(); + this.socket.destroy(); + } +} +exports.SocketMessageWriter = SocketMessageWriter; +class StreamMessageReader extends api_1.ReadableStreamMessageReader { + constructor(readable, encoding) { + super((0, ril_1.default)().stream.asReadableStream(readable), encoding); + } +} +exports.StreamMessageReader = StreamMessageReader; +class StreamMessageWriter extends api_1.WriteableStreamMessageWriter { + constructor(writable, options) { + super((0, ril_1.default)().stream.asWritableStream(writable), options); + } +} +exports.StreamMessageWriter = StreamMessageWriter; +const XDG_RUNTIME_DIR = process.env['XDG_RUNTIME_DIR']; +const safeIpcPathLengths = new Map([ + ['linux', 107], + ['darwin', 102] +]); +function generateRandomPipeName() { + if (process.platform === 'win32') { + return `\\\\.\\pipe\\lsp-${(0, crypto_1.randomBytes)(16).toString('hex')}-sock`; + } + let randomLength = 32; + const fixedLength = '/lsp-.sock'.length; + const tmpDir = fs.realpathSync(XDG_RUNTIME_DIR ?? os.tmpdir()); + const limit = safeIpcPathLengths.get(process.platform); + if (limit !== undefined) { + randomLength = Math.min(limit - tmpDir.length - fixedLength, randomLength); + } + if (randomLength < 16) { + throw new Error(`Unable to generate a random pipe name with ${randomLength} characters.`); + } + const randomSuffix = (0, crypto_1.randomBytes)(Math.floor(randomLength / 2)).toString('hex'); + return path.join(tmpDir, `lsp-${randomSuffix}.sock`); +} +function createClientPipeTransport(pipeName, encoding = 'utf-8') { + let connectResolve; + const connected = new Promise((resolve, _reject) => { + connectResolve = resolve; + }); + return new Promise((resolve, reject) => { + const server = (0, net_1.createServer)((socket) => { + server.close(); + connectResolve([ + new SocketMessageReader(socket, encoding), + new SocketMessageWriter(socket, encoding) + ]); + }); + server.on('error', reject); + server.listen(pipeName, () => { + server.removeListener('error', reject); + resolve({ + onConnected: () => { return connected; } + }); + }); + }); +} +function createServerPipeTransport(pipeName, encoding = 'utf-8') { + const socket = (0, net_1.createConnection)(pipeName); + return [ + new SocketMessageReader(socket, encoding), + new SocketMessageWriter(socket, encoding) + ]; +} +function createClientSocketTransport(port, encoding = 'utf-8') { + let connectResolve; + const connected = new Promise((resolve, _reject) => { + connectResolve = resolve; + }); + return new Promise((resolve, reject) => { + const server = (0, net_1.createServer)((socket) => { + server.close(); + connectResolve([ + new SocketMessageReader(socket, encoding), + new SocketMessageWriter(socket, encoding) + ]); + }); + server.on('error', reject); + server.listen(port, '127.0.0.1', () => { + server.removeListener('error', reject); + resolve({ + onConnected: () => { return connected; } + }); + }); + }); +} +function createServerSocketTransport(port, encoding = 'utf-8') { + const socket = (0, net_1.createConnection)(port, '127.0.0.1'); + return [ + new SocketMessageReader(socket, encoding), + new SocketMessageWriter(socket, encoding) + ]; +} +function isReadableStream(value) { + const candidate = value; + return candidate.read !== undefined && candidate.addListener !== undefined; +} +function isWritableStream(value) { + const candidate = value; + return candidate.write !== undefined && candidate.addListener !== undefined; +} +function createMessageConnection(input, output, logger, options) { + if (!logger) { + logger = api_1.NullLogger; + } + const reader = isReadableStream(input) ? new StreamMessageReader(input) : input; + const writer = isWritableStream(output) ? new StreamMessageWriter(output) : output; + if (api_1.ConnectionStrategy.is(options)) { + options = { connectionStrategy: options }; + } + return (0, api_1.createMessageConnection)(reader, writer, logger, options); +} + + +}, +"./node_modules/vscode-jsonrpc/lib/node/ril.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +const util_1 = __webpack_require__("util"); +const api_1 = __webpack_require__("./node_modules/vscode-jsonrpc/lib/common/api.js"); +class MessageBuffer extends api_1.AbstractMessageBuffer { + static emptyBuffer = Buffer.allocUnsafe(0); + constructor(encoding = 'utf-8') { + super(encoding); + } + emptyBuffer() { + return MessageBuffer.emptyBuffer; + } + fromString(value, encoding) { + return Buffer.from(value, encoding); + } + toString(value, encoding) { + if (value instanceof Buffer) { + return value.toString(encoding); + } + else { + return new util_1.TextDecoder(encoding).decode(value); + } + } + asNative(buffer, length) { + if (length === undefined) { + return buffer instanceof Buffer ? buffer : Buffer.from(buffer); + } + else { + return buffer instanceof Buffer ? buffer.slice(0, length) : Buffer.from(buffer, 0, length); + } + } + allocNative(length) { + return Buffer.allocUnsafe(length); + } +} +class ReadableStreamWrapper { + stream; + constructor(stream) { + this.stream = stream; + } + onClose(listener) { + this.stream.on('close', listener); + return api_1.Disposable.create(() => this.stream.off('close', listener)); + } + onError(listener) { + this.stream.on('error', listener); + return api_1.Disposable.create(() => this.stream.off('error', listener)); + } + onEnd(listener) { + this.stream.on('end', listener); + return api_1.Disposable.create(() => this.stream.off('end', listener)); + } + onData(listener) { + this.stream.on('data', listener); + return api_1.Disposable.create(() => this.stream.off('data', listener)); + } +} +class WritableStreamWrapper { + stream; + constructor(stream) { + this.stream = stream; + } + onClose(listener) { + this.stream.on('close', listener); + return api_1.Disposable.create(() => this.stream.off('close', listener)); + } + onError(listener) { + this.stream.on('error', listener); + return api_1.Disposable.create(() => this.stream.off('error', listener)); + } + onEnd(listener) { + this.stream.on('end', listener); + return api_1.Disposable.create(() => this.stream.off('end', listener)); + } + write(data, encoding) { + return new Promise((resolve, reject) => { + const callback = (error) => { + if (error === undefined || error === null) { + resolve(); + } + else { + reject(error); + } + }; + if (typeof data === 'string') { + this.stream.write(data, encoding, callback); + } + else { + this.stream.write(data, callback); + } + }); + } + end() { + this.stream.end(); + } +} +const _ril = Object.freeze({ + messageBuffer: Object.freeze({ + create: (encoding) => new MessageBuffer(encoding) + }), + applicationJson: Object.freeze({ + encoder: Object.freeze({ + name: 'application/json', + encode: (msg, options) => { + try { + return Promise.resolve(Buffer.from(JSON.stringify(msg, undefined, 0), options.charset)); + } + catch (err) { + return Promise.reject(err); + } + } + }), + decoder: Object.freeze({ + name: 'application/json', + decode: (buffer, options) => { + try { + if (buffer instanceof Buffer) { + return Promise.resolve(JSON.parse(buffer.toString(options.charset))); + } + else { + return Promise.resolve(JSON.parse(new util_1.TextDecoder(options.charset).decode(buffer))); + } + } + catch (err) { + return Promise.reject(err); + } + } + }) + }), + stream: Object.freeze({ + asReadableStream: (stream) => new ReadableStreamWrapper(stream), + asWritableStream: (stream) => new WritableStreamWrapper(stream) + }), + console: console, + timer: Object.freeze({ + setTimeout(callback, ms, ...args) { + const handle = setTimeout(callback, ms, ...args); + return { dispose: () => clearTimeout(handle) }; + }, + setImmediate(callback, ...args) { + const handle = setImmediate(callback, ...args); + return { dispose: () => clearImmediate(handle) }; + }, + setInterval(callback, ms, ...args) { + const handle = setInterval(callback, ms, ...args); + return { dispose: () => clearInterval(handle) }; + } + }) +}); +function RIL() { + return _ril; +} +(function (RIL) { + function install() { + api_1.RAL.install(_ril); + } + RIL.install = install; +})(RIL || (RIL = {})); +exports["default"] = RIL; + + +}, +"./node_modules/vscode-languageclient/lib/common/api.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DiagnosticPullMode = exports.vsdiag = void 0; +__exportStar(__webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js"), exports); +__exportStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/features.js"), exports); +var diagnostic_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/diagnostic.js"); +Object.defineProperty(exports, "vsdiag", ({ enumerable: true, get: function () { return diagnostic_1.vsdiag; } })); +Object.defineProperty(exports, "DiagnosticPullMode", ({ enumerable: true, get: function () { return diagnostic_1.DiagnosticPullMode; } })); +__exportStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/client.js"), exports); + + +}, +"./node_modules/vscode-languageclient/lib/common/callHierarchy.js"(__unused_rspack_module, exports, __webpack_require__) { +var __rspack_unused_export; + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +__rspack_unused_export = ({ value: true }); +exports.CallHierarchyFeature = void 0; +const vscode_1 = __webpack_require__("vscode"); +const vscode_languageserver_protocol_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js"); +const features_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/features.js"); +class CallHierarchyProvider { + client; + middleware; + constructor(client) { + this.client = client; + this.middleware = client.middleware; + } + prepareCallHierarchy(document, position, token) { + const client = this.client; + const middleware = this.middleware; + const prepareCallHierarchy = (document, position, token) => { + const params = client.code2ProtocolConverter.asTextDocumentPositionParams(document, position); + return client.sendRequest(vscode_languageserver_protocol_1.CallHierarchyPrepareRequest.type, params, token).then((result) => { + if (token.isCancellationRequested) { + return null; + } + return client.protocol2CodeConverter.asCallHierarchyItems(result, token); + }, (error) => { + return client.handleFailedRequest(vscode_languageserver_protocol_1.CallHierarchyPrepareRequest.type, token, error, null); + }); + }; + return middleware.prepareCallHierarchy + ? middleware.prepareCallHierarchy(document, position, token, prepareCallHierarchy) + : prepareCallHierarchy(document, position, token); + } + provideCallHierarchyIncomingCalls(item, token) { + const client = this.client; + const middleware = this.middleware; + const provideCallHierarchyIncomingCalls = (item, token) => { + const params = { + item: client.code2ProtocolConverter.asCallHierarchyItem(item) + }; + return client.sendRequest(vscode_languageserver_protocol_1.CallHierarchyIncomingCallsRequest.type, params, token).then((result) => { + if (token.isCancellationRequested) { + return null; + } + return client.protocol2CodeConverter.asCallHierarchyIncomingCalls(result, token); + }, (error) => { + return client.handleFailedRequest(vscode_languageserver_protocol_1.CallHierarchyIncomingCallsRequest.type, token, error, null); + }); + }; + return middleware.provideCallHierarchyIncomingCalls + ? middleware.provideCallHierarchyIncomingCalls(item, token, provideCallHierarchyIncomingCalls) + : provideCallHierarchyIncomingCalls(item, token); + } + provideCallHierarchyOutgoingCalls(item, token) { + const client = this.client; + const middleware = this.middleware; + const provideCallHierarchyOutgoingCalls = (item, token) => { + const params = { + item: client.code2ProtocolConverter.asCallHierarchyItem(item) + }; + return client.sendRequest(vscode_languageserver_protocol_1.CallHierarchyOutgoingCallsRequest.type, params, token).then((result) => { + if (token.isCancellationRequested) { + return null; + } + return client.protocol2CodeConverter.asCallHierarchyOutgoingCalls(result, token); + }, (error) => { + return client.handleFailedRequest(vscode_languageserver_protocol_1.CallHierarchyOutgoingCallsRequest.type, token, error, null); + }); + }; + return middleware.provideCallHierarchyOutgoingCalls + ? middleware.provideCallHierarchyOutgoingCalls(item, token, provideCallHierarchyOutgoingCalls) + : provideCallHierarchyOutgoingCalls(item, token); + } +} +class CallHierarchyFeature extends features_1.TextDocumentLanguageFeature { + constructor(client) { + super(client, vscode_languageserver_protocol_1.CallHierarchyPrepareRequest.type); + } + fillClientCapabilities(cap) { + const capabilities = cap; + const capability = (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'textDocument'), 'callHierarchy'); + capability.dynamicRegistration = true; + } + initialize(capabilities, documentSelector) { + const [id, options] = this.getRegistration(documentSelector, capabilities.callHierarchyProvider); + if (!id || !options) { + return; + } + this.register({ id: id, registerOptions: options }); + } + registerLanguageProvider(options) { + const client = this._client; + const provider = new CallHierarchyProvider(client); + return [vscode_1.languages.registerCallHierarchyProvider(this._client.protocol2CodeConverter.asDocumentSelector(options.documentSelector), provider), provider]; + } +} +exports.CallHierarchyFeature = CallHierarchyFeature; + + +}, +"./node_modules/vscode-languageclient/lib/common/client.js"(__unused_rspack_module, exports, __webpack_require__) { + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ProposedFeatures = exports.LanguageClient = exports.BaseLanguageClient = exports.ShutdownMode = exports.MessageTransports = exports.SuspendMode = exports.State = exports.CloseAction = exports.ErrorAction = exports.RevealOutputChannelOn = void 0; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +const vscode_1 = __webpack_require__("vscode"); +const vscode_languageserver_protocol_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js"); +const c2p = __importStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/codeConverter.js")); +const p2c = __importStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/protocolConverter.js")); +const Is = __importStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/utils/is.js")); +const async_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/utils/async.js"); +const UUID = __importStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/utils/uuid.js")); +const progressPart_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/progressPart.js"); +const features_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/features.js"); +const diagnostic_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/diagnostic.js"); +const notebook_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/notebook.js"); +const configuration_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/configuration.js"); +const textSynchronization_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/textSynchronization.js"); +const completion_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/completion.js"); +const hover_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/hover.js"); +const definition_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/definition.js"); +const signatureHelp_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/signatureHelp.js"); +const documentHighlight_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/documentHighlight.js"); +const documentSymbol_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/documentSymbol.js"); +const workspaceSymbol_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/workspaceSymbol.js"); +const reference_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/reference.js"); +const typeDefinition_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/typeDefinition.js"); +const implementation_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/implementation.js"); +const colorProvider_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/colorProvider.js"); +const codeAction_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/codeAction.js"); +const codeLens_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/codeLens.js"); +const formatting_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/formatting.js"); +const rename_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/rename.js"); +const documentLink_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/documentLink.js"); +const executeCommand_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/executeCommand.js"); +const foldingRange_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/foldingRange.js"); +const declaration_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/declaration.js"); +const selectionRange_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/selectionRange.js"); +const callHierarchy_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/callHierarchy.js"); +const semanticTokens_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/semanticTokens.js"); +const linkedEditingRange_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/linkedEditingRange.js"); +const typeHierarchy_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/typeHierarchy.js"); +const inlineValue_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/inlineValue.js"); +const inlayHint_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/inlayHint.js"); +const workspaceFolder_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/workspaceFolder.js"); +const fileOperations_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/fileOperations.js"); +const inlineCompletion_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/inlineCompletion.js"); +const textDocumentContent_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/textDocumentContent.js"); +const fileSystemWatcher_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/fileSystemWatcher.js"); +const progress_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/progress.js"); +/** + * Controls when the output channel is revealed. + */ +var RevealOutputChannelOn; +(function (RevealOutputChannelOn) { + RevealOutputChannelOn[RevealOutputChannelOn["Debug"] = 0] = "Debug"; + RevealOutputChannelOn[RevealOutputChannelOn["Info"] = 1] = "Info"; + RevealOutputChannelOn[RevealOutputChannelOn["Warn"] = 2] = "Warn"; + RevealOutputChannelOn[RevealOutputChannelOn["Error"] = 3] = "Error"; + RevealOutputChannelOn[RevealOutputChannelOn["Never"] = 4] = "Never"; +})(RevealOutputChannelOn || (exports.RevealOutputChannelOn = RevealOutputChannelOn = {})); +/** + * An action to be performed when the connection is producing errors. + */ +var ErrorAction; +(function (ErrorAction) { + /** + * Continue running the server. + */ + ErrorAction[ErrorAction["Continue"] = 1] = "Continue"; + /** + * Shutdown the server. + */ + ErrorAction[ErrorAction["Shutdown"] = 2] = "Shutdown"; +})(ErrorAction || (exports.ErrorAction = ErrorAction = {})); +/** + * An action to be performed when the connection to a server got closed. + */ +var CloseAction; +(function (CloseAction) { + /** + * Don't restart the server. The connection stays closed. + */ + CloseAction[CloseAction["DoNotRestart"] = 1] = "DoNotRestart"; + /** + * Restart the server. + */ + CloseAction[CloseAction["Restart"] = 2] = "Restart"; +})(CloseAction || (exports.CloseAction = CloseAction = {})); +/** + * Signals in which state the language client is in. + */ +var State; +(function (State) { + /** + * The client is stopped or got never started. + */ + State[State["Stopped"] = 1] = "Stopped"; + /** + * The client is starting but not ready yet. + */ + State[State["Starting"] = 3] = "Starting"; + /** + * The start has failed. + */ + State[State["StartFailed"] = 4] = "StartFailed"; + /** + * The client is running and ready. + */ + State[State["Running"] = 2] = "Running"; +})(State || (exports.State = State = {})); +var SuspendMode; +(function (SuspendMode) { + /** + * Don't allow suspend mode. + */ + SuspendMode["off"] = "off"; + /** + * Support suspend mode even if not all + * registered providers have a corresponding + * activation listener. + */ + SuspendMode["on"] = "on"; +})(SuspendMode || (exports.SuspendMode = SuspendMode = {})); +var ResolvedClientOptions; +(function (ResolvedClientOptions) { + function sanitizeIsTrusted(isTrusted) { + if (isTrusted === undefined || isTrusted === null) { + return false; + } + if ((typeof isTrusted === 'boolean') || (typeof isTrusted === 'object' && isTrusted !== null && Is.stringArray(isTrusted.enabledCommands))) { + return isTrusted; + } + return false; + } + ResolvedClientOptions.sanitizeIsTrusted = sanitizeIsTrusted; +})(ResolvedClientOptions || (ResolvedClientOptions = {})); +class DefaultErrorHandler { + client; + maxRestartCount; + restarts; + constructor(client, maxRestartCount) { + this.client = client; + this.maxRestartCount = maxRestartCount; + this.restarts = []; + } + error(_error, _message, count) { + if (count && count <= 3) { + return { action: ErrorAction.Continue }; + } + return { action: ErrorAction.Shutdown }; + } + closed() { + this.restarts.push(Date.now()); + if (this.restarts.length <= this.maxRestartCount) { + return { action: CloseAction.Restart }; + } + else { + const diff = this.restarts[this.restarts.length - 1] - this.restarts[0]; + if (diff <= 3 * 60 * 1000) { + return { action: CloseAction.DoNotRestart, message: `The ${this.client.name} server crashed ${this.maxRestartCount + 1} times in the last 3 minutes. The server will not be restarted. See the output for more information.` }; + } + else { + this.restarts.shift(); + return { action: CloseAction.Restart }; + } + } + } +} +var ClientState; +(function (ClientState) { + ClientState["Initial"] = "initial"; + ClientState["Starting"] = "starting"; + ClientState["StartFailed"] = "startFailed"; + ClientState["Running"] = "running"; + ClientState["Stopping"] = "stopping"; + ClientState["Stopped"] = "stopped"; +})(ClientState || (ClientState = {})); +var MessageTransports; +(function (MessageTransports) { + function is(value) { + const candidate = value; + return candidate && vscode_languageserver_protocol_1.MessageReader.is(value.reader) && vscode_languageserver_protocol_1.MessageWriter.is(value.writer); + } + MessageTransports.is = is; +})(MessageTransports || (exports.MessageTransports = MessageTransports = {})); +var ShutdownMode; +(function (ShutdownMode) { + ShutdownMode["Restart"] = "restart"; + ShutdownMode["Stop"] = "stop"; +})(ShutdownMode || (exports.ShutdownMode = ShutdownMode = {})); +/** + * Manages the open tabs. We don't directly use the tab API since for + * diagnostics we need to de-dupe tabs that show the same resources since + * we pull on the model not the UI. + */ +class VisibleDocumentsImpl { + open; + _onOpen; + _onClose; + disposables; + constructor() { + this.disposables = []; + this.open = new Set(); + this._onOpen = new vscode_1.EventEmitter(); + this._onClose = new vscode_1.EventEmitter(); + VisibleDocumentsImpl.fillVisibleResources(this.open); + const updateVisibleDocuments = () => { + const oldTabs = this.open; + const currentTabs = new Set(); + VisibleDocumentsImpl.fillVisibleResources(currentTabs); + const closed = new Set(); + const opened = new Set(currentTabs); + for (const tab of oldTabs.values()) { + if (currentTabs.has(tab)) { + opened.delete(tab); + } + else { + closed.add(tab); + } + } + this.open = currentTabs; + if (closed.size > 0) { + const toFire = new Set(); + for (const item of closed) { + toFire.add(vscode_1.Uri.parse(item)); + } + this._onClose.fire(toFire); + } + if (opened.size > 0) { + const toFire = new Set(); + for (const item of opened) { + toFire.add(vscode_1.Uri.parse(item)); + } + this._onOpen.fire(toFire); + } + }; + this.disposables.push(vscode_1.window.tabGroups.onDidChangeTabs((event) => { + if (event.closed.length === 0 && event.opened.length === 0) { + return; + } + updateVisibleDocuments(); + })); + this.disposables.push(vscode_1.window.onDidChangeVisibleTextEditors((_editors) => { + updateVisibleDocuments(); + })); + } + get onClose() { + return this._onClose.event; + } + get onOpen() { + return this._onOpen.event; + } + dispose() { + this.disposables.forEach(disposable => disposable.dispose()); + } + isActive(document) { + return document instanceof vscode_1.Uri + ? vscode_1.window.activeTextEditor?.document.uri === document + : vscode_1.window.activeTextEditor?.document === document; + } + isVisible(document) { + const uri = document instanceof vscode_1.Uri ? document : document.uri; + if (uri.scheme === notebook_1.NotebookDocumentSyncFeature.CellScheme) { + // Notebook cells aren't in the list of tabs, but the notebook should be. + return vscode_1.workspace.notebookDocuments.some(notebook => { + if (this.open.has(notebook.uri.toString())) { + const cell = notebook.getCells().find(cell => cell.document.uri.toString() === uri.toString()); + return cell !== undefined; + } + return false; + }); + } + return this.open.has(uri.toString()); + } + getResources() { + const result = new Set(); + VisibleDocumentsImpl.fillVisibleResources(new Set(), result); + return result; + } + static fillVisibleResources(strings, uris) { + const seen = strings ?? new Set(); + for (const group of vscode_1.window.tabGroups.all) { + for (const tab of group.tabs) { + const input = tab.input; + let uri; + if (input instanceof vscode_1.TabInputText) { + uri = input.uri; + } + else if (input instanceof vscode_1.TabInputTextDiff) { + uri = input.modified; + } + else if (input instanceof vscode_1.TabInputCustom) { + uri = input.uri; + } + else if (input instanceof vscode_1.TabInputNotebook) { + uri = input.uri; + } + if (uri !== undefined && !seen.has(uri.toString())) { + seen.add(uri.toString()); + uris !== undefined && uris.add(uri); + } + } + } + // Peek editors are not part of tabs but should be considered visible + for (const editor of vscode_1.window.visibleTextEditors) { + const uri = editor.document.uri; + if (!seen.has(uri.toString())) { + seen.add(uri.toString()); + uris !== undefined && uris.add(uri); + } + } + } +} +class BaseLanguageClient { + _id; + _name; + _clientOptions; + _state; + _onStart; + _onStop; + _connection; + _idleInterval; + _ignoredRegistrations; + // private _idleStart: number | undefined; + _listeners; + _disposed; + _notificationHandlers; + _notificationDisposables; + _pendingNotificationHandlers; + _requestHandlers; + _requestDisposables; + _pendingRequestHandlers; + _progressHandlers; + _pendingProgressHandlers; + _progressDisposables; + _initializeResult; + _outputChannel; + _disposeOutputChannel; + _traceOutputChannel; + _traceLogLevel; + _capabilities; + // undefined: allow lazy creation of the diagnostic collection. + // null: the diagnostic collection has been disposed and should not be + // recreated. + _diagnostics; + _syncedDocuments; + _didChangeTextDocumentFeature; + _inFlightOpenNotifications; + _pendingChangeSemaphore; + _pendingChangeDelayer; + _didOpenTextDocumentFeature; + _fileEvents; + _fileEventDelayer; + _telemetryEmitter; + _stateChangeEmitter; + _trace; + _traceFormat = vscode_languageserver_protocol_1.TraceFormat.Text; + _tracer; + _c2p; + _p2c; + _visibleDocuments; + constructor(id, name, clientOptions) { + this._id = id; + this._name = name; + clientOptions = clientOptions || {}; + const markdown = { + isTrusted: false, + supportHtml: false, + supportThemeIcons: false + }; + if (clientOptions.markdown !== undefined) { + markdown.isTrusted = ResolvedClientOptions.sanitizeIsTrusted(clientOptions.markdown.isTrusted); + markdown.supportHtml = clientOptions.markdown.supportHtml === true; + markdown.supportThemeIcons = clientOptions.markdown.supportThemeIcons === true; + } + // const defaultInterval = (clientOptions as TestOptions).$testMode ? 50 : 60000; + this._clientOptions = { + documentSelector: clientOptions.documentSelector ?? [], + synchronize: clientOptions.synchronize ?? {}, + diagnosticCollectionName: clientOptions.diagnosticCollectionName, + outputChannelName: clientOptions.outputChannelName ?? this._name, + revealOutputChannelOn: clientOptions.revealOutputChannelOn ?? RevealOutputChannelOn.Error, + stdioEncoding: clientOptions.stdioEncoding ?? 'utf8', + initializationOptions: clientOptions.initializationOptions, + initializationFailedHandler: clientOptions.initializationFailedHandler, + progressOnInitialization: !!clientOptions.progressOnInitialization, + errorHandler: clientOptions.errorHandler ?? this.createDefaultErrorHandler(clientOptions.connectionOptions?.maxRestartCount), + middleware: clientOptions.middleware ?? {}, + uriConverters: clientOptions.uriConverters, + workspaceFolder: clientOptions.workspaceFolder, + connectionOptions: clientOptions.connectionOptions, + markdown, + // suspend: { + // mode: clientOptions.suspend?.mode ?? SuspendMode.off, + // callback: clientOptions.suspend?.callback ?? (() => Promise.resolve(true)), + // interval: clientOptions.suspend?.interval ? Math.max(clientOptions.suspend.interval, defaultInterval) : defaultInterval + // }, + diagnosticPullOptions: clientOptions.diagnosticPullOptions ?? { onChange: true, onSave: false }, + diagnosticCollectionProvider: clientOptions.diagnosticCollectionProvider ?? new features_1.DefaultDiagnosticCollectionProvider(), + notebookDocumentOptions: clientOptions.notebookDocumentOptions ?? {}, + textSynchronization: this.createTextSynchronizationOptions(clientOptions.textSynchronization) + }; + this._clientOptions.synchronize = this._clientOptions.synchronize || {}; + this._state = ClientState.Initial; + this._ignoredRegistrations = new Set(); + this._listeners = []; + this._notificationHandlers = new Map(); + this._pendingNotificationHandlers = new Map(); + this._notificationDisposables = new Map(); + this._requestHandlers = new Map(); + this._pendingRequestHandlers = new Map(); + this._requestDisposables = new Map(); + this._progressHandlers = new Map(); + this._pendingProgressHandlers = new Map(); + this._progressDisposables = new Map(); + this._connection = undefined; + // this._idleStart = undefined; + this._initializeResult = undefined; + if (clientOptions.outputChannel) { + this._outputChannel = clientOptions.outputChannel; + this._disposeOutputChannel = false; + this._traceLogLevel = this._outputChannel.logLevel; + } + else { + this._outputChannel = undefined; + this._disposeOutputChannel = true; + this._traceLogLevel = vscode_1.LogLevel.Info; + } + this._traceOutputChannel = clientOptions.traceOutputChannel; + if (this._traceOutputChannel !== undefined) { + this._traceLogLevel = this._traceOutputChannel.logLevel; + } + // Allow lazy creation of the diagnostic collection. + this._diagnostics = undefined; + this._inFlightOpenNotifications = new Set(); + this._pendingChangeSemaphore = new async_1.Semaphore(1); + this._pendingChangeDelayer = new async_1.Delayer(250); + this._fileEvents = []; + this._fileEventDelayer = new async_1.Delayer(250); + this._onStop = undefined; + this._telemetryEmitter = new vscode_languageserver_protocol_1.Emitter(); + this._stateChangeEmitter = new vscode_languageserver_protocol_1.Emitter(); + this._trace = vscode_languageserver_protocol_1.Trace.Off; + this._tracer = { + log: (messageOrDataObject, data) => { + if (Is.string(messageOrDataObject)) { + this.trace(messageOrDataObject, data); + } + else { + this.traceObject(messageOrDataObject); + } + }, + }; + this._c2p = c2p.createConverter(clientOptions.uriConverters ? clientOptions.uriConverters.code2Protocol : undefined); + this._p2c = p2c.createConverter(clientOptions.uriConverters ? clientOptions.uriConverters.protocol2Code : undefined, this._clientOptions.markdown.isTrusted, this._clientOptions.markdown.supportHtml, this._clientOptions.markdown.supportThemeIcons); + this._syncedDocuments = new Map(); + this.registerBuiltinFeatures(); + } + createTextSynchronizationOptions(options) { + if (!options) { + return { delayOpenNotifications: false }; + } + if (typeof options.delayOpenNotifications === 'boolean') { + return { delayOpenNotifications: options.delayOpenNotifications }; + } + return { delayOpenNotifications: false }; + } + get name() { + return this._name; + } + get middleware() { + return this._clientOptions.middleware ?? Object.create(null); + } + get clientOptions() { + return this._clientOptions; + } + get protocol2CodeConverter() { + return this._p2c; + } + get code2ProtocolConverter() { + return this._c2p; + } + get visibleDocuments() { + if (this._visibleDocuments === undefined) { + this._visibleDocuments = new VisibleDocumentsImpl(); + } + return this._visibleDocuments; + } + get onTelemetry() { + return this._telemetryEmitter.event; + } + get onDidChangeState() { + return this._stateChangeEmitter.event; + } + get outputChannel() { + if (!this._outputChannel) { + this._outputChannel = vscode_1.window.createOutputChannel(this._clientOptions.outputChannelName ? this._clientOptions.outputChannelName : this._name, { log: true }); + if (this._traceOutputChannel === undefined) { + this._traceLogLevel = this._outputChannel.logLevel; + } + } + return this._outputChannel; + } + get traceOutputChannel() { + return this._traceOutputChannel ? this._traceOutputChannel : this.outputChannel; + } + get diagnostics() { + if (this._diagnostics === null) { + return undefined; + } + if (this._diagnostics === undefined) { + this._diagnostics = this._clientOptions.diagnosticCollectionProvider.create(this._clientOptions.diagnosticCollectionName ?? this._id, features_1.DiagnosticCollectionSource.push); + } + return this._diagnostics; + } + get state() { + return this.getPublicState(); + } + get $state() { + return this._state; + } + set $state(value) { + const oldState = this.getPublicState(); + this._state = value; + const newState = this.getPublicState(); + if (newState !== oldState) { + this._stateChangeEmitter.fire({ oldState, newState }); + } + } + getPublicState() { + switch (this.$state) { + case ClientState.Starting: + return State.Starting; + case ClientState.Running: + return State.Running; + case ClientState.StartFailed: + return State.StartFailed; + default: + return State.Stopped; + } + } + get initializeResult() { + return this._initializeResult; + } + async sendRequest(type, ...params) { + if (this.$state === ClientState.StartFailed || this.$state === ClientState.Stopping || this.$state === ClientState.Stopped) { + return Promise.reject(new vscode_languageserver_protocol_1.ResponseError(vscode_languageserver_protocol_1.ErrorCodes.ConnectionInactive, `Client is not running`)); + } + // Ensure we have a connection before we force the document sync. + const connection = await this.$start(); + // Send ony depending open notifications + await this._didOpenTextDocumentFeature.sendPendingOpenNotifications(); + // If any document is synced in full mode make sure we flush any pending + // full document syncs. + if (this._didChangeTextDocumentFeature.syncKind === vscode_languageserver_protocol_1.TextDocumentSyncKind.Full) { + await this.sendPendingFullTextDocumentChanges(connection); + } + let param = undefined; + let token = undefined; + // Separate cancellation tokens from other parameters for a better client interface + if (params.length === 1) { + // CancellationToken is an interface, so we need to check if the first param complies to it + if (vscode_languageserver_protocol_1.CancellationToken.is(params[0])) { + token = params[0]; + } + else { + param = params[0]; + } + } + else if (params.length === 2) { + param = params[0]; + token = params[1]; + } + if (token !== undefined && token.isCancellationRequested) { + return Promise.reject(new vscode_languageserver_protocol_1.ResponseError(vscode_languageserver_protocol_1.LSPErrorCodes.RequestCancelled, 'Request got cancelled')); + } + const _sendRequest = this._clientOptions.middleware?.sendRequest; + if (_sendRequest !== undefined) { + // Return the general middleware invocation defining `next` as a utility function that reorganizes parameters to + // pass them to the original sendRequest function. + return _sendRequest(type, param, token, (type, param, token) => { + const params = []; + // Add the parameters if there are any + if (param !== undefined) { + params.push(param); + } + // Add the cancellation token if there is one + if (token !== undefined) { + params.push(token); + } + return connection.sendRequest(type, ...params); + }); + } + else { + return connection.sendRequest(type, ...params); + } + } + onRequest(type, handler) { + const method = typeof type === 'string' ? type : type.method; + this._requestHandlers.set(method, handler); + const connection = this.activeConnection(); + let disposable; + if (connection !== undefined) { + this._requestDisposables.set(method, connection.onRequest(type, handler)); + disposable = { + dispose: () => { + const disposable = this._requestDisposables.get(method); + if (disposable !== undefined) { + disposable.dispose(); + this._requestDisposables.delete(method); + } + } + }; + } + else { + this._pendingRequestHandlers.set(method, handler); + disposable = { + dispose: () => { + this._pendingRequestHandlers.delete(method); + const disposable = this._requestDisposables.get(method); + if (disposable !== undefined) { + disposable.dispose(); + this._requestDisposables.delete(method); + } + } + }; + } + return { + dispose: () => { + this._requestHandlers.delete(method); + disposable.dispose(); + } + }; + } + async sendNotification(type, params) { + if (this.$state === ClientState.StartFailed || this.$state === ClientState.Stopping || this.$state === ClientState.Stopped) { + return Promise.reject(new vscode_languageserver_protocol_1.ResponseError(vscode_languageserver_protocol_1.ErrorCodes.ConnectionInactive, `Client is not running`)); + } + const needsPendingFullTextDocumentSync = this._didChangeTextDocumentFeature.syncKind === vscode_languageserver_protocol_1.TextDocumentSyncKind.Full; + let openNotification; + if (needsPendingFullTextDocumentSync && typeof type !== 'string' && type.method === vscode_languageserver_protocol_1.DidOpenTextDocumentNotification.method) { + openNotification = params?.textDocument.uri; + this._inFlightOpenNotifications.add(openNotification); + } + let documentToClose; + if (typeof type !== 'string' && type.method === vscode_languageserver_protocol_1.DidCloseTextDocumentNotification.method) { + documentToClose = params.textDocument.uri; + } + // Ensure we have a connection before we force the document sync. + const connection = await this.$start(); + // Send any depending open notifications + const didDropOpenNotification = await this._didOpenTextDocumentFeature.sendPendingOpenNotifications(documentToClose); + if (didDropOpenNotification) { + // Don't forward this close notification if we dropped the + // corresponding open notification. + return; + } + // If any document is synced in full mode make sure we flush any pending + // full document syncs. + if (needsPendingFullTextDocumentSync) { + await this.sendPendingFullTextDocumentChanges(connection); + } + // We need to remove the pending open notification before we actually + // send the notification over the connection. Otherwise there could be + // a request coming in that although the open notification got already put + // onto the wire will ignore pending document changes. + // + // Since the code path of connection.sendNotification is actually sync + // until the message is handed off to the writer and the writer has a semaphore + // lock with a capacity of 1 no additional async scheduling can happen until + // the message is actually handed off. + if (openNotification !== undefined) { + this._inFlightOpenNotifications.delete(openNotification); + } + const _sendNotification = this._clientOptions.middleware?.sendNotification; + return _sendNotification + ? _sendNotification(type, connection.sendNotification.bind(connection), params) + : connection.sendNotification(type, params); + } + onNotification(type, handler) { + const method = typeof type === 'string' ? type : type.method; + this._notificationHandlers.set(method, handler); + const connection = this.activeConnection(); + let disposable; + if (connection !== undefined) { + this._notificationDisposables.set(method, connection.onNotification(type, handler)); + disposable = { + dispose: () => { + const disposable = this._notificationDisposables.get(method); + if (disposable !== undefined) { + disposable.dispose(); + this._notificationDisposables.delete(method); + } + } + }; + } + else { + this._pendingNotificationHandlers.set(method, handler); + disposable = { + dispose: () => { + this._pendingNotificationHandlers.delete(method); + const disposable = this._notificationDisposables.get(method); + if (disposable !== undefined) { + disposable.dispose(); + this._notificationDisposables.delete(method); + } + } + }; + } + return { + dispose: () => { + this._notificationHandlers.delete(method); + disposable.dispose(); + } + }; + } + async sendProgress(type, token, value) { + if (this.$state === ClientState.StartFailed || this.$state === ClientState.Stopping || this.$state === ClientState.Stopped) { + return Promise.reject(new vscode_languageserver_protocol_1.ResponseError(vscode_languageserver_protocol_1.ErrorCodes.ConnectionInactive, `Client is not running`)); + } + try { + // Ensure we have a connection before we force the document sync. + const connection = await this.$start(); + return connection.sendProgress(type, token, value); + } + catch (error) { + this.error(`Sending progress for token ${token} failed.`, error); + throw error; + } + } + onProgress(type, token, handler) { + this._progressHandlers.set(token, { type, handler }); + const connection = this.activeConnection(); + let disposable; + const handleWorkDoneProgress = this._clientOptions.middleware?.handleWorkDoneProgress; + const realHandler = vscode_languageserver_protocol_1.WorkDoneProgress.is(type) && handleWorkDoneProgress !== undefined + ? (params) => { + handleWorkDoneProgress(token, params, () => handler(params)); + } + : handler; + if (connection !== undefined) { + this._progressDisposables.set(token, connection.onProgress(type, token, realHandler)); + disposable = { + dispose: () => { + const disposable = this._progressDisposables.get(token); + if (disposable !== undefined) { + disposable.dispose(); + this._progressDisposables.delete(token); + } + } + }; + } + else { + this._pendingProgressHandlers.set(token, { type, handler }); + disposable = { + dispose: () => { + this._pendingProgressHandlers.delete(token); + const disposable = this._progressDisposables.get(token); + if (disposable !== undefined) { + disposable.dispose(); + this._progressDisposables.delete(token); + } + } + }; + } + return { + dispose: () => { + this._progressHandlers.delete(token); + disposable.dispose(); + } + }; + } + createDefaultErrorHandler(maxRestartCount) { + if (maxRestartCount !== undefined && maxRestartCount < 0) { + throw new Error(`Invalid maxRestartCount: ${maxRestartCount}`); + } + return new DefaultErrorHandler(this, maxRestartCount ?? 4); + } + async setTrace(value) { + this._trace = value; + const connection = this.activeConnection(); + if (connection !== undefined) { + await connection.trace(this._trace, this._tracer, { + sendNotification: false, + traceFormat: this._traceFormat + }); + } + } + data2String(data) { + if (data instanceof vscode_languageserver_protocol_1.ResponseError) { + const responseError = data; + return ` Message: ${responseError.message}\n Code: ${responseError.code} ${responseError.data ? '\n' + responseError.data.toString() : ''}`; + } + if (data instanceof Error) { + if (Is.string(data.stack)) { + return data.stack; + } + return data.message; + } + if (Is.string(data)) { + return data; + } + return data.toString(); + } + shouldLogToOutputChannel() { + if (this.$state !== ClientState.Stopped) { + return true; + } + return this._outputChannel !== undefined; + } + error(message, data, showNotification = true) { + if (this.shouldLogToOutputChannel()) { + this.outputChannel.error(this.getLogMessage(message, data)); + } + if (showNotification === 'force' || (showNotification && this._clientOptions.revealOutputChannelOn <= RevealOutputChannelOn.Error)) { + this.showNotificationMessage(vscode_languageserver_protocol_1.MessageType.Error, message, data); + } + } + warn(message, data, showNotification = true) { + if (this.shouldLogToOutputChannel()) { + this.outputChannel.warn(this.getLogMessage(message, data)); + } + if (showNotification && this._clientOptions.revealOutputChannelOn <= RevealOutputChannelOn.Warn) { + this.showNotificationMessage(vscode_languageserver_protocol_1.MessageType.Warning, message, data); + } + } + info(message, data, showNotification = true) { + if (this.shouldLogToOutputChannel()) { + this.outputChannel.info(this.getLogMessage(message, data)); + } + if (showNotification && this._clientOptions.revealOutputChannelOn <= RevealOutputChannelOn.Info) { + this.showNotificationMessage(vscode_languageserver_protocol_1.MessageType.Info, message, data); + } + } + debug(message, data, showNotification = true) { + if (this.shouldLogToOutputChannel()) { + this.outputChannel.debug(this.getLogMessage(message, data)); + } + if (showNotification && this._clientOptions.revealOutputChannelOn <= RevealOutputChannelOn.Debug) { + this.showNotificationMessage(vscode_languageserver_protocol_1.MessageType.Debug, message, data); + } + } + trace(message, data) { + this.traceOutputChannel.trace(this.getLogMessage(message, data)); + } + traceObject(data) { + this.traceOutputChannel.trace(JSON.stringify(data)); + } + showNotificationMessage(type, message, data) { + message = message ?? 'A request has failed. See the output for more information.'; + if (data) { + message += '\n' + this.data2String(data); + } + const messageFunc = type === vscode_languageserver_protocol_1.MessageType.Error + ? vscode_1.window.showErrorMessage + : type === vscode_languageserver_protocol_1.MessageType.Warning + ? vscode_1.window.showWarningMessage + : vscode_1.window.showInformationMessage; + void messageFunc(message, 'Go to output').then((selection) => { + if (selection !== undefined) { + this.outputChannel.show(true); + } + }); + } + getLogMessage(message, data) { + return data !== null && data !== undefined ? `${message}\n${this.data2String(data)}` : message; + } + needsStart() { + return this.$state === ClientState.Initial || this.$state === ClientState.Stopping || this.$state === ClientState.Stopped; + } + needsStop() { + return this.$state === ClientState.Starting || this.$state === ClientState.Running; + } + activeConnection() { + return this.$state === ClientState.Running && this._connection !== undefined ? this._connection : undefined; + } + isRunning() { + return this.$state === ClientState.Running; + } + async start() { + if (this._disposed === 'disposing' || this._disposed === 'disposed') { + throw new Error(`Client got disposed and can't be restarted.`); + } + if (this.$state === ClientState.Stopping) { + throw new Error(`Client is currently stopping. Can only restart a full stopped client`); + } + // We are already running or are in the process of getting up + // to speed. + if (this._onStart !== undefined) { + return this._onStart; + } + const [promise, resolve, reject] = this.createOnStartPromise(); + this._onStart = promise; + // A previous shutdown disposed the diagnostic collection and set it to + // `null` to prevent recreation. On (re)start we re-enable lazy creation. + this._diagnostics = undefined; + // When we start make all buffer handlers pending so that they + // get added. + for (const [method, handler] of this._notificationHandlers) { + if (!this._pendingNotificationHandlers.has(method)) { + this._pendingNotificationHandlers.set(method, handler); + } + } + for (const [method, handler] of this._requestHandlers) { + if (!this._pendingRequestHandlers.has(method)) { + this._pendingRequestHandlers.set(method, handler); + } + } + for (const [token, data] of this._progressHandlers) { + if (!this._pendingProgressHandlers.has(token)) { + this._pendingProgressHandlers.set(token, data); + } + } + this.$state = ClientState.Starting; + try { + const connection = await this.createConnection(); + connection.onNotification(vscode_languageserver_protocol_1.LogMessageNotification.type, (message) => { + switch (message.type) { + case vscode_languageserver_protocol_1.MessageType.Error: + this.error(message.message, undefined, false); + break; + case vscode_languageserver_protocol_1.MessageType.Warning: + this.warn(message.message, undefined, false); + break; + case vscode_languageserver_protocol_1.MessageType.Info: + this.info(message.message, undefined, false); + break; + case vscode_languageserver_protocol_1.MessageType.Debug: + this.debug(message.message, undefined, false); + break; + default: + this.outputChannel.appendLine(message.message); + } + }); + connection.onNotification(vscode_languageserver_protocol_1.ShowMessageNotification.type, (message) => { + switch (message.type) { + case vscode_languageserver_protocol_1.MessageType.Error: + void vscode_1.window.showErrorMessage(message.message); + break; + case vscode_languageserver_protocol_1.MessageType.Warning: + void vscode_1.window.showWarningMessage(message.message); + break; + case vscode_languageserver_protocol_1.MessageType.Info: + void vscode_1.window.showInformationMessage(message.message); + break; + default: + void vscode_1.window.showInformationMessage(message.message); + } + }); + connection.onRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, (params) => { + let messageFunc; + switch (params.type) { + case vscode_languageserver_protocol_1.MessageType.Error: + messageFunc = vscode_1.window.showErrorMessage; + break; + case vscode_languageserver_protocol_1.MessageType.Warning: + messageFunc = vscode_1.window.showWarningMessage; + break; + case vscode_languageserver_protocol_1.MessageType.Info: + messageFunc = vscode_1.window.showInformationMessage; + break; + default: + messageFunc = vscode_1.window.showInformationMessage; + } + const actions = params.actions || []; + return messageFunc(params.message, ...actions); + }); + connection.onNotification(vscode_languageserver_protocol_1.TelemetryEventNotification.type, (data) => { + this._telemetryEmitter.fire(data); + }); + connection.onRequest(vscode_languageserver_protocol_1.ShowDocumentRequest.type, async (params, token) => { + const showDocument = async (params) => { + const uri = this.protocol2CodeConverter.asUri(params.uri); + try { + if (params.external === true) { + const success = await vscode_1.env.openExternal(uri); + return { success }; + } + else { + const options = {}; + if (params.selection !== undefined) { + options.selection = this.protocol2CodeConverter.asRange(params.selection); + } + if (params.takeFocus === undefined || params.takeFocus === false) { + options.preserveFocus = true; + } + else if (params.takeFocus === true) { + options.preserveFocus = false; + } + await vscode_1.window.showTextDocument(uri, options); + return { success: true }; + } + } + catch (error) { + return { success: false }; + } + }; + const middleware = this._clientOptions.middleware.window?.showDocument; + if (middleware !== undefined) { + return middleware(params, token, showDocument); + } + else { + return showDocument(params); + } + }); + connection.listen(); + await this.initialize(connection); + resolve(); + } + catch (error) { + this.$state = ClientState.StartFailed; + this.error(`${this._name} client: couldn't create connection to server.`, error, 'force'); + reject(error); + } + return this._onStart; + } + createOnStartPromise() { + let resolve; + let reject; + const promise = new Promise((_resolve, _reject) => { + resolve = _resolve; + reject = _reject; + }); + return [promise, resolve, reject]; + } + async initialize(connection) { + this.refreshTrace(connection, false); + const initOption = this._clientOptions.initializationOptions; + // If the client is locked to a workspace folder use it. In this case the workspace folder + // feature is not registered and we need to initialize the value here. + const [rootPath, workspaceFolders] = this._clientOptions.workspaceFolder !== undefined + ? [this._clientOptions.workspaceFolder.uri.fsPath, [{ uri: this._c2p.asUri(this._clientOptions.workspaceFolder.uri), name: this._clientOptions.workspaceFolder.name }]] + : [this._clientGetRootPath(), null]; + const initParams = { + processId: null, + clientInfo: { + name: vscode_1.env.appName, + version: vscode_1.version + }, + locale: this.getLocale(), + rootPath: rootPath ? rootPath : null, + rootUri: rootPath ? this._c2p.asUri(vscode_1.Uri.file(rootPath)) : null, + capabilities: this.computeClientCapabilities(), + initializationOptions: Is.func(initOption) ? initOption() : initOption, + trace: vscode_languageserver_protocol_1.Trace.toString(this._trace), + workspaceFolders: workspaceFolders + }; + this.fillInitializeParams(initParams); + if (this._clientOptions.progressOnInitialization) { + const token = UUID.generateUuid(); + const part = new progressPart_1.ProgressPart(connection, token); + initParams.workDoneToken = token; + try { + const result = await this.doInitialize(connection, initParams); + part.done(); + return result; + } + catch (error) { + part.cancel(); + throw error; + } + } + else { + return this.doInitialize(connection, initParams); + } + } + async doInitialize(connection, initParams) { + try { + const result = await connection.initialize(initParams); + if (result.capabilities.positionEncoding !== undefined && result.capabilities.positionEncoding !== vscode_languageserver_protocol_1.PositionEncodingKind.UTF16) { + throw new Error(`Unsupported position encoding (${result.capabilities.positionEncoding}) received from server ${this.name}`); + } + this._initializeResult = result; + this.$state = ClientState.Running; + let textDocumentSyncOptions = undefined; + if (Is.number(result.capabilities.textDocumentSync)) { + if (result.capabilities.textDocumentSync === vscode_languageserver_protocol_1.TextDocumentSyncKind.None) { + textDocumentSyncOptions = { + openClose: false, + change: vscode_languageserver_protocol_1.TextDocumentSyncKind.None, + save: undefined + }; + } + else { + textDocumentSyncOptions = { + openClose: true, + change: result.capabilities.textDocumentSync, + save: { + includeText: false + } + }; + } + } + else if (result.capabilities.textDocumentSync !== undefined && result.capabilities.textDocumentSync !== null) { + textDocumentSyncOptions = result.capabilities.textDocumentSync; + } + this._capabilities = Object.assign({}, result.capabilities, { resolvedTextDocumentSync: textDocumentSyncOptions }); + connection.onNotification(vscode_languageserver_protocol_1.PublishDiagnosticsNotification.type, params => this.handleDiagnostics(params)); + connection.onRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params => this.handleRegistrationRequest(params)); + // See https://github.com/Microsoft/vscode-languageserver-node/issues/199 + connection.onRequest('client/registerFeature', params => this.handleRegistrationRequest(params)); + connection.onRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params => this.handleUnregistrationRequest(params)); + // See https://github.com/Microsoft/vscode-languageserver-node/issues/199 + connection.onRequest('client/unregisterFeature', params => this.handleUnregistrationRequest(params)); + connection.onRequest(vscode_languageserver_protocol_1.ApplyWorkspaceEditRequest.type, params => this.handleApplyWorkspaceEdit(params)); + // Add pending notification, request and progress handlers. + for (const [method, handler] of this._pendingNotificationHandlers) { + this._notificationDisposables.set(method, connection.onNotification(method, handler)); + } + this._pendingNotificationHandlers.clear(); + for (const [method, handler] of this._pendingRequestHandlers) { + this._requestDisposables.set(method, connection.onRequest(method, handler)); + } + this._pendingRequestHandlers.clear(); + for (const [token, data] of this._pendingProgressHandlers) { + this._progressDisposables.set(token, connection.onProgress(data.type, token, data.handler)); + } + this._pendingProgressHandlers.clear(); + // if (this._clientOptions.suspend.mode !== SuspendMode.off) { + // this._idleInterval = RAL().timer.setInterval(() => this.checkSuspend(), this._clientOptions.suspend.interval); + // } + await connection.sendNotification(vscode_languageserver_protocol_1.InitializedNotification.type, {}); + this.hookFileEvents(connection); + this.hookLogLevelChanged(connection); + this.hookConfigurationChanged(connection); + this.initializeFeatures(connection); + return result; + } + catch (error) { + if (this._clientOptions.initializationFailedHandler) { + if (this._clientOptions.initializationFailedHandler(error)) { + void this.initialize(connection); + } + else { + void this.stop(); + } + } + else if (error instanceof vscode_languageserver_protocol_1.ResponseError && error.data && error.data.retry) { + void vscode_1.window.showErrorMessage(error.message, { title: 'Retry', id: 'retry' }).then(item => { + if (item && item.id === 'retry') { + void this.initialize(connection); + } + else { + void this.stop(); + } + }); + } + else { + if (error && error.message) { + void vscode_1.window.showErrorMessage(error.message); + } + this.error('Server initialization failed.', error); + void this.stop(); + } + throw error; + } + } + _clientGetRootPath() { + const folders = vscode_1.workspace.workspaceFolders; + if (!folders || folders.length === 0) { + return undefined; + } + const folder = folders[0]; + if (folder.uri.scheme === 'file') { + return folder.uri.fsPath; + } + return undefined; + } + stop(timeout = 2000) { + // Wait 2 seconds on stop + return this.shutdown(ShutdownMode.Stop, timeout); + } + dispose(timeout = 2000) { + try { + this._disposed = 'disposing'; + return this.stop(timeout); + } + finally { + this._disposed = 'disposed'; + } + } + async shutdown(mode, timeout = 2000) { + // If the client is stopped or in its initial state return. + if (this.$state === ClientState.Stopped || this.$state === ClientState.Initial) { + return; + } + // If we are stopping the client and have a stop promise return it. + if (this.$state === ClientState.Stopping) { + if (this._onStop !== undefined) { + return this._onStop; + } + else { + throw new Error(`Client is stopping but no stop promise available.`); + } + } + const connection = this.activeConnection(); + // We can't stop a client that is not running (e.g. has no connection). Especially not + // on that us starting since it can't be correctly synchronized. + if (connection === undefined || this.$state !== ClientState.Running) { + throw new Error(`Client is not running and can't be stopped. It's current state is: ${this.$state}`); + } + this._initializeResult = undefined; + this.$state = ClientState.Stopping; + this.cleanUp(mode); + const tp = new Promise(c => { (0, vscode_languageserver_protocol_1.RAL)().timer.setTimeout(c, timeout); }); + const shutdown = (async (connection) => { + await connection.shutdown(); + await connection.exit(); + return connection; + })(connection); + return this._onStop = Promise.race([tp, shutdown]).then((connection) => { + // The connection won the race with the timeout. + if (connection !== undefined) { + connection.end(); + connection.dispose(); + } + else { + this.error(`Stopping server timed out`, undefined, false); + throw new Error(`Stopping the server timed out`); + } + }, (error) => { + this.error(`Stopping server failed`, error, false); + throw error; + }).finally(() => { + this.$state = ClientState.Stopped; + mode === ShutdownMode.Stop && this.cleanUpChannel(); + this._onStart = undefined; + this._onStop = undefined; + this._connection = undefined; + this._ignoredRegistrations.clear(); + }); + } + cleanUp(mode) { + // purge outstanding file events. + this._fileEvents = []; + this._fileEventDelayer.cancel(); + const disposables = this._listeners.splice(0, this._listeners.length); + for (const disposable of disposables) { + disposable.dispose(); + } + if (this._syncedDocuments) { + this._syncedDocuments.clear(); + } + // Clear features in reverse order; + for (const feature of Array.from(this._features.entries()).map(entry => entry[1]).reverse()) { + feature.clear(); + } + if ((mode === ShutdownMode.Stop || mode === ShutdownMode.Restart)) { + if (this._diagnostics === undefined) { + this._diagnostics = null; + } + if (this._diagnostics !== null) { + this._clientOptions.diagnosticCollectionProvider.dispose(this._diagnostics, features_1.DiagnosticCollectionSource.push); + this._diagnostics = null; + } + } + if (this._idleInterval !== undefined) { + this._idleInterval.dispose(); + this._idleInterval = undefined; + } + // this._idleStart = undefined; + } + cleanUpChannel() { + if (this._outputChannel !== undefined && this._disposeOutputChannel) { + this._outputChannel.dispose(); + this._outputChannel = undefined; + } + } + notifyFileEvent(event) { + const client = this; + async function didChangeWatchedFile(event) { + client._fileEvents.push(event); + return client._fileEventDelayer.trigger(async () => { + const fileEvents = client._fileEvents; + client._fileEvents = []; + try { + await client.sendNotification(vscode_languageserver_protocol_1.DidChangeWatchedFilesNotification.type, { changes: fileEvents }); + } + catch (error) { + // Restore the file events. + client._fileEvents.push(...fileEvents); + throw error; + } + }); + } + const workSpaceMiddleware = this.clientOptions.middleware?.workspace; + (workSpaceMiddleware?.didChangeWatchedFile ? workSpaceMiddleware.didChangeWatchedFile(event, didChangeWatchedFile) : didChangeWatchedFile(event)).catch((error) => { + client.error(`Notifying file events failed.`, error); + }); + } + async sendPendingFullTextDocumentChanges(connection) { + return this._pendingChangeSemaphore.lock(async () => { + try { + const changes = this._didChangeTextDocumentFeature.getPendingDocumentChanges(this._inFlightOpenNotifications); + if (changes.length === 0) { + return; + } + for (const document of changes) { + const params = this.code2ProtocolConverter.asChangeTextDocumentParams(document); + // We await the send and not the delivery since it is more or less the same for + // notifications. + this._didChangeTextDocumentFeature.aboutToSendNotification(document, vscode_languageserver_protocol_1.DidChangeTextDocumentNotification.type, params); + await connection.sendNotification(vscode_languageserver_protocol_1.DidChangeTextDocumentNotification.type, params); + this._didChangeTextDocumentFeature.notificationSent(document, vscode_languageserver_protocol_1.DidChangeTextDocumentNotification.type, params); + } + } + catch (error) { + this.error(`Sending pending changes failed`, error, false); + throw error; + } + }); + } + triggerPendingChangeDelivery() { + this._pendingChangeDelayer.trigger(async () => { + const connection = this.activeConnection(); + if (connection === undefined) { + this.triggerPendingChangeDelivery(); + return; + } + await this.sendPendingFullTextDocumentChanges(connection); + }).catch((error) => this.error(`Delivering pending changes failed`, error, false)); + } + _diagnosticQueue = new Map(); + _diagnosticQueueState = { state: 'idle' }; + handleDiagnostics(params) { + if (this._diagnostics === null) { + return; + } + const key = params.uri; + if (this._diagnosticQueueState.state === 'busy' && this._diagnosticQueueState.document === key) { + // Cancel the active run; + this._diagnosticQueueState.tokenSource.cancel(); + } + this._diagnosticQueue.set(params.uri, params.diagnostics); + this.triggerDiagnosticQueue(); + } + triggerDiagnosticQueue() { + (0, vscode_languageserver_protocol_1.RAL)().timer.setImmediate(() => { this.workDiagnosticQueue(); }); + } + workDiagnosticQueue() { + if (this._diagnosticQueueState.state === 'busy') { + return; + } + const next = this._diagnosticQueue.entries().next(); + if (next.done === true) { + // Nothing in the queue + return; + } + const [document, diagnostics] = next.value; + this._diagnosticQueue.delete(document); + const tokenSource = new vscode_1.CancellationTokenSource(); + this._diagnosticQueueState = { state: 'busy', document: document, tokenSource }; + this._p2c.asDiagnostics(diagnostics, tokenSource.token).then((converted) => { + if (!tokenSource.token.isCancellationRequested) { + const uri = this._p2c.asUri(document); + const middleware = this.clientOptions.middleware; + if (middleware.handleDiagnostics) { + middleware.handleDiagnostics(uri, converted, (uri, diagnostics) => this.setDiagnostics(uri, diagnostics)); + } + else { + this.setDiagnostics(uri, converted); + } + } + }).catch((error) => { + this.error(`Processing diagnostic queue failed.`, error); + }).finally(() => { + this._diagnosticQueueState = { state: 'idle' }; + this.triggerDiagnosticQueue(); + }); + } + setDiagnostics(uri, diagnostics) { + if (this._diagnostics === null) { + return; + } + const diagnosticsCollection = this.diagnostics; + if (diagnosticsCollection !== undefined) { + diagnosticsCollection.set(uri, diagnostics); + } + } + getLocale() { + return vscode_1.env.language; + } + async $start() { + if (this.$state === ClientState.StartFailed) { + throw new Error(`Previous start failed. Can't restart server.`); + } + await this.start(); + const connection = this.activeConnection(); + if (connection === undefined) { + throw new Error(`Starting server failed`); + } + return connection; + } + async createConnection() { + const errorHandler = (error, message, count) => { + this.handleConnectionError(error, message, count).catch((error) => this.error(`Handling connection error failed`, error)); + }; + const closeHandler = () => { + this.handleConnectionClosed().catch((error) => this.error(`Handling connection close failed`, error)); + }; + const transports = await this.createMessageTransports(this._clientOptions.stdioEncoding || 'utf8'); + this._connection = createConnection(transports.reader, transports.writer, errorHandler, closeHandler, this._clientOptions.connectionOptions); + return this._connection; + } + async handleConnectionClosed() { + // Check whether this is a normal shutdown in progress or the client stopped normally. + if (this.$state === ClientState.Stopped) { + return; + } + try { + if (this._connection !== undefined) { + this._connection.dispose(); + } + } + catch (error) { + // Disposing a connection could fail if error cases. + } + let handlerResult = { action: CloseAction.DoNotRestart }; + if (this.$state !== ClientState.Stopping) { + try { + handlerResult = await this._clientOptions.errorHandler.closed(); + } + catch (error) { + // Ignore errors coming from the error handler. + } + } + this._connection = undefined; + if (handlerResult.action === CloseAction.DoNotRestart) { + this.error(handlerResult.message ?? 'Connection to server got closed. Server will not be restarted.', undefined, handlerResult.handled === true ? false : 'force'); + this.cleanUp(ShutdownMode.Stop); + if (this.$state === ClientState.Starting) { + this.$state = ClientState.StartFailed; + } + else { + this.$state = ClientState.Stopped; + } + this._onStop = Promise.resolve(); + this._onStart = undefined; + } + else if (handlerResult.action === CloseAction.Restart) { + this.info(handlerResult.message ?? 'Connection to server got closed. Server will restart.', undefined, !handlerResult.handled); + this.cleanUp(ShutdownMode.Restart); + this.$state = ClientState.Initial; + this._onStop = Promise.resolve(); + this._onStart = undefined; + this.start().catch((error) => this.error(`Restarting server failed`, error, 'force')); + } + } + async handleConnectionError(error, message, count) { + const handlerResult = await this._clientOptions.errorHandler.error(error, message, count); + if (handlerResult.action === ErrorAction.Shutdown) { + this.error(handlerResult.message ?? `Client ${this._name}: connection to server is erroring.\n${error.message}\nShutting down server.`, undefined, handlerResult.handled === true ? false : 'force'); + this.stop().catch((error) => { + this.error(`Stopping server failed`, error, false); + }); + } + else { + this.error(handlerResult.message ?? + `Client ${this._name}: connection to server is erroring.\n${error.message}`, undefined, handlerResult.handled === true ? false : 'force'); + } + } + hookConfigurationChanged(connection) { + this._listeners.push(vscode_1.workspace.onDidChangeConfiguration(() => { + this.refreshTrace(connection, true); + })); + } + hookLogLevelChanged(connection) { + this._listeners.push(this.traceOutputChannel.onDidChangeLogLevel((level) => { + this._traceLogLevel = level; + this.refreshTrace(connection, true); + })); + } + refreshTrace(connection, sendNotification = false) { + const config = vscode_1.workspace.getConfiguration(this._id); + let trace = this._traceLogLevel !== vscode_1.LogLevel.Trace ? vscode_languageserver_protocol_1.Trace.Off : vscode_languageserver_protocol_1.Trace.Messages; + let traceFormat = vscode_languageserver_protocol_1.TraceFormat.Text; + if (config && trace !== vscode_languageserver_protocol_1.Trace.Off) { + const traceConfig = config.get('trace.server', 'messages'); + if (typeof traceConfig === 'string') { + trace = vscode_languageserver_protocol_1.Trace.fromString(traceConfig); + if (trace === vscode_languageserver_protocol_1.Trace.Off) { + trace = vscode_languageserver_protocol_1.Trace.Messages; + } + } + else { + trace = vscode_languageserver_protocol_1.Trace.fromString(config.get('trace.server.verbosity', 'messages')); + if (trace === vscode_languageserver_protocol_1.Trace.Off) { + trace = vscode_languageserver_protocol_1.Trace.Messages; + } + traceFormat = vscode_languageserver_protocol_1.TraceFormat.fromString(config.get('trace.server.format', 'text')); + } + } + this._trace = trace; + this._traceFormat = traceFormat; + connection.trace(this._trace, this._tracer, { + sendNotification, + traceFormat: this._traceFormat + }).catch((error) => { this.error(`Updating trace failed with error`, error, false); }); + } + hookFileEvents(_connection) { + const fileEvents = this._clientOptions.synchronize.fileEvents; + if (!fileEvents) { + return; + } + let watchers; + if (Is.array(fileEvents)) { + watchers = fileEvents; + } + else { + watchers = [fileEvents]; + } + if (!watchers) { + return; + } + this._dynamicFeatures.get(vscode_languageserver_protocol_1.DidChangeWatchedFilesNotification.type.method).registerRaw(UUID.generateUuid(), watchers); + } + _features = []; + _dynamicFeatures = new Map(); + registerFeatures(features) { + for (const feature of features) { + this.registerFeature(feature); + } + } + registerFeature(feature) { + this._features.push(feature); + if (features_1.DynamicFeature.is(feature)) { + const registrationType = feature.registrationType; + this._dynamicFeatures.set(registrationType.method, feature); + } + } + getFeature(request) { + return this._dynamicFeatures.get(request); + } + hasDedicatedTextSynchronizationFeature(textDocument) { + const feature = this.getFeature(vscode_languageserver_protocol_1.NotebookDocumentSyncRegistrationType.method); + if (feature === undefined || !(feature instanceof notebook_1.NotebookDocumentSyncFeature)) { + return false; + } + return feature.handles(textDocument); + } + registerBuiltinFeatures() { + const pendingFullTextDocumentChanges = new Map(); + this.registerFeature(new configuration_1.ConfigurationFeature(this)); + this._didOpenTextDocumentFeature = new textSynchronization_1.DidOpenTextDocumentFeature(this, this._syncedDocuments); + this.registerFeature(this._didOpenTextDocumentFeature); + this._didChangeTextDocumentFeature = new textSynchronization_1.DidChangeTextDocumentFeature(this, pendingFullTextDocumentChanges); + this._didChangeTextDocumentFeature.onPendingChangeAdded(() => { + this.triggerPendingChangeDelivery(); + }); + this.registerFeature(this._didChangeTextDocumentFeature); + this.registerFeature(new textSynchronization_1.WillSaveFeature(this)); + this.registerFeature(new textSynchronization_1.WillSaveWaitUntilFeature(this)); + this.registerFeature(new textSynchronization_1.DidSaveTextDocumentFeature(this)); + this.registerFeature(new textSynchronization_1.DidCloseTextDocumentFeature(this, this._syncedDocuments, pendingFullTextDocumentChanges)); + this.registerFeature(new fileSystemWatcher_1.FileSystemWatcherFeature(this, (event) => this.notifyFileEvent(event))); + this.registerFeature(new completion_1.CompletionItemFeature(this)); + this.registerFeature(new hover_1.HoverFeature(this)); + this.registerFeature(new signatureHelp_1.SignatureHelpFeature(this)); + this.registerFeature(new definition_1.DefinitionFeature(this)); + this.registerFeature(new reference_1.ReferencesFeature(this)); + this.registerFeature(new documentHighlight_1.DocumentHighlightFeature(this)); + this.registerFeature(new documentSymbol_1.DocumentSymbolFeature(this)); + this.registerFeature(new workspaceSymbol_1.WorkspaceSymbolFeature(this)); + this.registerFeature(new codeAction_1.CodeActionFeature(this)); + this.registerFeature(new codeLens_1.CodeLensFeature(this)); + this.registerFeature(new formatting_1.DocumentFormattingFeature(this)); + this.registerFeature(new formatting_1.DocumentRangeFormattingFeature(this)); + this.registerFeature(new formatting_1.DocumentOnTypeFormattingFeature(this)); + this.registerFeature(new rename_1.RenameFeature(this)); + this.registerFeature(new documentLink_1.DocumentLinkFeature(this)); + this.registerFeature(new executeCommand_1.ExecuteCommandFeature(this)); + this.registerFeature(new configuration_1.SyncConfigurationFeature(this)); + this.registerFeature(new typeDefinition_1.TypeDefinitionFeature(this)); + this.registerFeature(new implementation_1.ImplementationFeature(this)); + this.registerFeature(new colorProvider_1.ColorProviderFeature(this)); + // We only register the workspace folder feature if the client is not locked + // to a specific workspace folder. + if (this.clientOptions.workspaceFolder === undefined) { + this.registerFeature(new workspaceFolder_1.WorkspaceFoldersFeature(this)); + } + this.registerFeature(new foldingRange_1.FoldingRangeFeature(this)); + this.registerFeature(new declaration_1.DeclarationFeature(this)); + this.registerFeature(new selectionRange_1.SelectionRangeFeature(this)); + this.registerFeature(new progress_1.ProgressFeature(this)); + this.registerFeature(new callHierarchy_1.CallHierarchyFeature(this)); + this.registerFeature(new semanticTokens_1.SemanticTokensFeature(this)); + this.registerFeature(new linkedEditingRange_1.LinkedEditingFeature(this)); + this.registerFeature(new fileOperations_1.DidCreateFilesFeature(this)); + this.registerFeature(new fileOperations_1.DidRenameFilesFeature(this)); + this.registerFeature(new fileOperations_1.DidDeleteFilesFeature(this)); + this.registerFeature(new fileOperations_1.WillCreateFilesFeature(this)); + this.registerFeature(new fileOperations_1.WillRenameFilesFeature(this)); + this.registerFeature(new fileOperations_1.WillDeleteFilesFeature(this)); + this.registerFeature(new typeHierarchy_1.TypeHierarchyFeature(this)); + this.registerFeature(new inlineValue_1.InlineValueFeature(this)); + this.registerFeature(new inlayHint_1.InlayHintsFeature(this)); + this.registerFeature(new diagnostic_1.DiagnosticFeature(this)); + this.registerFeature(new notebook_1.NotebookDocumentSyncFeature(this)); + this.registerFeature(new inlineCompletion_1.InlineCompletionItemFeature(this)); + this.registerFeature(new textDocumentContent_1.TextDocumentContentFeature(this)); + } + registerProposedFeatures() { + this.registerFeatures(ProposedFeatures.createAll(this)); + } + fillInitializeParams(params) { + for (const feature of this._features) { + if (Is.func(feature.fillInitializeParams)) { + feature.fillInitializeParams(params); + } + } + } + computeClientCapabilities() { + const result = {}; + (0, features_1.ensure)(result, 'workspace').applyEdit = true; + const workspaceEdit = (0, features_1.ensure)((0, features_1.ensure)(result, 'workspace'), 'workspaceEdit'); + workspaceEdit.documentChanges = true; + workspaceEdit.resourceOperations = [vscode_languageserver_protocol_1.ResourceOperationKind.Create, vscode_languageserver_protocol_1.ResourceOperationKind.Rename, vscode_languageserver_protocol_1.ResourceOperationKind.Delete]; + workspaceEdit.failureHandling = vscode_languageserver_protocol_1.FailureHandlingKind.TextOnlyTransactional; + workspaceEdit.normalizesLineEndings = true; + workspaceEdit.changeAnnotationSupport = { + groupsOnLabel: true + }; + workspaceEdit.metadataSupport = true; + workspaceEdit.snippetEditSupport = true; + const diagnostics = (0, features_1.ensure)((0, features_1.ensure)(result, 'textDocument'), 'publishDiagnostics'); + diagnostics.relatedInformation = true; + diagnostics.versionSupport = false; + diagnostics.tagSupport = { valueSet: [vscode_languageserver_protocol_1.DiagnosticTag.Unnecessary, vscode_languageserver_protocol_1.DiagnosticTag.Deprecated] }; + diagnostics.codeDescriptionSupport = true; + diagnostics.dataSupport = true; + const textDocumentFilter = (0, features_1.ensure)((0, features_1.ensure)(result, 'textDocument'), 'filters'); + textDocumentFilter.relativePatternSupport = true; + const windowCapabilities = (0, features_1.ensure)(result, 'window'); + const showMessage = (0, features_1.ensure)(windowCapabilities, 'showMessage'); + showMessage.messageActionItem = { additionalPropertiesSupport: true }; + const showDocument = (0, features_1.ensure)(windowCapabilities, 'showDocument'); + showDocument.support = true; + const generalCapabilities = (0, features_1.ensure)(result, 'general'); + generalCapabilities.staleRequestSupport = { + cancel: true, + retryOnContentModified: Array.from(BaseLanguageClient.RequestsToCancelOnContentModified) + }; + generalCapabilities.regularExpressions = { engine: 'ECMAScript', version: 'ES2020' }; + generalCapabilities.markdown = { + parser: 'marked', + version: '1.1.0', + }; + generalCapabilities.positionEncodings = ['utf-16']; + if (this._clientOptions.markdown.supportHtml) { + generalCapabilities.markdown.allowedTags = ['ul', 'li', 'p', 'code', 'blockquote', 'ol', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'em', 'pre', 'table', 'thead', 'tbody', 'tr', 'th', 'td', 'div', 'del', 'a', 'strong', 'br', 'img', 'span']; + } + for (const feature of this._features) { + feature.fillClientCapabilities(result); + } + return result; + } + initializeFeatures(_connection) { + const documentSelector = this._clientOptions.documentSelector; + for (const feature of this._features) { + if (Is.func(feature.preInitialize)) { + feature.preInitialize(this._capabilities, documentSelector); + } + } + for (const feature of this._features) { + feature.initialize(this._capabilities, documentSelector); + } + } + async handleRegistrationRequest(params) { + const middleware = this.clientOptions.middleware?.handleRegisterCapability; + if (middleware) { + return middleware(params, nextParams => this.doRegisterCapability(nextParams)); + } + else { + return this.doRegisterCapability(params); + } + } + async doRegisterCapability(params) { + // We will not receive a registration call before a client is running + // from a server. However if we stop or shutdown we might which might + // try to restart the server. So ignore registrations if we are not running + if (!this.isRunning()) { + for (const registration of params.registrations) { + this._ignoredRegistrations.add(registration.id); + } + return; + } + for (const registration of params.registrations) { + const feature = this._dynamicFeatures.get(registration.method); + if (feature === undefined) { + return Promise.reject(new Error(`No feature implementation for ${registration.method} found. Registration failed.`)); + } + const options = registration.registerOptions ?? {}; + options.documentSelector = options.documentSelector ?? this._clientOptions.documentSelector; + const data = { + id: registration.id, + registerOptions: options + }; + try { + feature.register(data); + } + catch (err) { + return Promise.reject(err); + } + } + } + async handleUnregistrationRequest(params) { + const middleware = this.clientOptions.middleware?.handleUnregisterCapability; + if (middleware) { + return middleware(params, nextParams => this.doUnregisterCapability(nextParams)); + } + else { + return this.doUnregisterCapability(params); + } + } + async doUnregisterCapability(params) { + for (const unregistration of params.unregisterations) { + if (this._ignoredRegistrations.has(unregistration.id)) { + continue; + } + const feature = this._dynamicFeatures.get(unregistration.method); + if (!feature) { + return Promise.reject(new Error(`No feature implementation for ${unregistration.method} found. Unregistration failed.`)); + } + feature.unregister(unregistration.id); + } + } + async handleApplyWorkspaceEdit(params) { + const middleware = this.clientOptions.middleware?.workspace?.handleApplyEdit; + if (middleware) { + const resultOrError = await middleware(params, nextParams => this.doHandleApplyWorkspaceEdit(nextParams)); + if (resultOrError instanceof vscode_languageserver_protocol_1.ResponseError) { + return Promise.reject(resultOrError); + } + return resultOrError; + } + else { + return this.doHandleApplyWorkspaceEdit(params); + } + } + workspaceEditLock = new async_1.Semaphore(1); + async doHandleApplyWorkspaceEdit(params) { + const workspaceEdit = params.edit; + // Make sure we convert workspace edits one after the other. Otherwise + // we might execute a workspace edit received first after we received another + // one since the conversion might race. + const converted = await this.workspaceEditLock.lock(() => { + return this._p2c.asWorkspaceEdit(workspaceEdit); + }); + // Check whether the version provided in the workspace edit matches the version of the open text document. + // If not, we can't apply the workspace edit since it might be based on an old version of the document. + // CRITICAL: make sure that after this check has run no async operation happens which might cause that + // the version of the text document changes. Otherwise we might apply a workspace edit based on an old + // version of the document. + const valid = this.validateWorkspaceEdit(workspaceEdit); + if (!valid) { + return Promise.resolve({ applied: false }); + } + return Is.asPromise(vscode_1.workspace.applyEdit(converted, { isRefactoring: params.metadata?.isRefactoring }).then((value) => { return { applied: value }; })); + } + validateWorkspaceEdit(workspaceEdit) { + const openTextDocuments = new Map(); + vscode_1.workspace.textDocuments.forEach((document) => openTextDocuments.set(document.uri.toString(), document)); + if (workspaceEdit.documentChanges) { + for (const change of workspaceEdit.documentChanges) { + if (vscode_languageserver_protocol_1.TextDocumentEdit.is(change) && change.textDocument.version !== null && change.textDocument.version >= 0) { + const changeUri = this._p2c.asUri(change.textDocument.uri).toString(); + const textDocument = openTextDocuments.get(changeUri); + if (textDocument && textDocument.version !== change.textDocument.version) { + return false; + } + } + } + } + return true; + } + static RequestsToCancelOnContentModified = new Set([ + vscode_languageserver_protocol_1.SemanticTokensRequest.method, + vscode_languageserver_protocol_1.SemanticTokensRangeRequest.method, + vscode_languageserver_protocol_1.SemanticTokensDeltaRequest.method + ]); + static CancellableResolveCalls = new Set([ + vscode_languageserver_protocol_1.CompletionResolveRequest.method, + vscode_languageserver_protocol_1.CodeLensResolveRequest.method, + vscode_languageserver_protocol_1.CodeActionResolveRequest.method, + vscode_languageserver_protocol_1.InlayHintResolveRequest.method, + vscode_languageserver_protocol_1.DocumentLinkResolveRequest.method, + vscode_languageserver_protocol_1.WorkspaceSymbolResolveRequest.method + ]); + handleFailedRequest(type, token, error, defaultValue, showNotification = true, throwOnCancel = false) { + // If we get a request cancel or a content modified don't log anything. + if (error instanceof vscode_languageserver_protocol_1.ResponseError) { + // The connection got disposed while we were waiting for a response. + // Simply return the default value. Is the best we can do. + if (error.code === vscode_languageserver_protocol_1.ErrorCodes.PendingResponseRejected || error.code === vscode_languageserver_protocol_1.ErrorCodes.ConnectionInactive) { + return defaultValue; + } + if (error.code === vscode_languageserver_protocol_1.LSPErrorCodes.RequestCancelled || error.code === vscode_languageserver_protocol_1.LSPErrorCodes.ServerCancelled) { + if (token !== undefined && token.isCancellationRequested && !throwOnCancel) { + return defaultValue; + } + else { + if (error.data !== undefined) { + throw new features_1.LSPCancellationError(error.data); + } + else { + throw new vscode_1.CancellationError(); + } + } + } + else if (error.code === vscode_languageserver_protocol_1.LSPErrorCodes.ContentModified) { + if (BaseLanguageClient.RequestsToCancelOnContentModified.has(type.method) || BaseLanguageClient.CancellableResolveCalls.has(type.method)) { + throw new vscode_1.CancellationError(); + } + else { + return defaultValue; + } + } + } + this.error(`Request ${type.method} failed.`, error, showNotification); + throw error; + } +} +exports.BaseLanguageClient = BaseLanguageClient; +class LanguageClient extends BaseLanguageClient { + serverOptions; + constructor(id, name, serverOptions, clientOptions) { + super(id, name, clientOptions); + this.serverOptions = serverOptions; + } + async createMessageTransports(_encoding) { + return this.serverOptions(); + } +} +exports.LanguageClient = LanguageClient; +class ConsoleLogger { + error(message) { + (0, vscode_languageserver_protocol_1.RAL)().console.error(message); + } + warn(message) { + (0, vscode_languageserver_protocol_1.RAL)().console.warn(message); + } + info(message) { + (0, vscode_languageserver_protocol_1.RAL)().console.info(message); + } + log(message) { + (0, vscode_languageserver_protocol_1.RAL)().console.log(message); + } +} +function createConnection(input, output, errorHandler, closeHandler, options) { + const logger = new ConsoleLogger(); + const connection = (0, vscode_languageserver_protocol_1.createProtocolConnection)(input, output, logger, options); + connection.onError((data) => { errorHandler(data[0], data[1], data[2]); }); + connection.onClose(closeHandler); + const result = { + listen: () => connection.listen(), + sendRequest: connection.sendRequest, + onRequest: connection.onRequest, + hasPendingResponse: connection.hasPendingResponse, + sendNotification: connection.sendNotification, + onNotification: connection.onNotification, + onProgress: connection.onProgress, + sendProgress: connection.sendProgress, + trace: (value, tracer, sendNotificationOrTraceOptions) => { + const defaultTraceOptions = { + sendNotification: false, + traceFormat: vscode_languageserver_protocol_1.TraceFormat.Text + }; + if (sendNotificationOrTraceOptions === undefined) { + return connection.trace(value, tracer, defaultTraceOptions); + } + else if (Is.boolean(sendNotificationOrTraceOptions)) { + return connection.trace(value, tracer, sendNotificationOrTraceOptions); + } + else { + return connection.trace(value, tracer, sendNotificationOrTraceOptions); + } + }, + initialize: (params) => { + // This needs to return and MUST not be await to avoid any async + // scheduling. Otherwise messages might overtake each other. + return connection.sendRequest(vscode_languageserver_protocol_1.InitializeRequest.type, params); + }, + shutdown: () => { + // This needs to return and MUST not be await to avoid any async + // scheduling. Otherwise messages might overtake each other. + return connection.sendRequest(vscode_languageserver_protocol_1.ShutdownRequest.type, undefined); + }, + exit: () => { + // This needs to return and MUST not be await to avoid any async + // scheduling. Otherwise messages might overtake each other. + return connection.sendNotification(vscode_languageserver_protocol_1.ExitNotification.type); + }, + end: () => connection.end(), + dispose: () => connection.dispose() + }; + return result; +} +// Exporting proposed protocol. +var ProposedFeatures; +(function (ProposedFeatures) { + function createAll(_client) { + const result = []; + return result; + } + ProposedFeatures.createAll = createAll; +})(ProposedFeatures || (exports.ProposedFeatures = ProposedFeatures = {})); + + +}, +"./node_modules/vscode-languageclient/lib/common/codeAction.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CodeActionFeature = void 0; +const vscode_1 = __webpack_require__("vscode"); +const vscode_languageserver_protocol_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js"); +const UUID = __importStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/utils/uuid.js")); +const features_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/features.js"); +class CodeActionFeature extends features_1.TextDocumentLanguageFeature { + constructor(client) { + super(client, vscode_languageserver_protocol_1.CodeActionRequest.type); + } + fillClientCapabilities(capabilities) { + const cap = (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'textDocument'), 'codeAction'); + cap.dynamicRegistration = true; + cap.isPreferredSupport = true; + cap.disabledSupport = true; + cap.dataSupport = true; + // We can only resolve the edit property. + cap.resolveSupport = { + properties: ['edit', 'command'] + }; + cap.codeActionLiteralSupport = { + codeActionKind: { + valueSet: [ + vscode_languageserver_protocol_1.CodeActionKind.Empty, + vscode_languageserver_protocol_1.CodeActionKind.QuickFix, + vscode_languageserver_protocol_1.CodeActionKind.Refactor, + vscode_languageserver_protocol_1.CodeActionKind.RefactorExtract, + vscode_languageserver_protocol_1.CodeActionKind.RefactorInline, + vscode_languageserver_protocol_1.CodeActionKind.RefactorMove, + vscode_languageserver_protocol_1.CodeActionKind.RefactorRewrite, + vscode_languageserver_protocol_1.CodeActionKind.Source, + vscode_languageserver_protocol_1.CodeActionKind.SourceOrganizeImports, + vscode_languageserver_protocol_1.CodeActionKind.Notebook + ] + } + }; + cap.honorsChangeAnnotations = true; + cap.documentationSupport = true; + cap.tagSupport = { + valueSet: [vscode_languageserver_protocol_1.CodeActionTag.LLMGenerated] + }; + } + initialize(capabilities, documentSelector) { + const options = this.getRegistrationOptions(documentSelector, capabilities.codeActionProvider); + if (!options) { + return; + } + this.register({ id: UUID.generateUuid(), registerOptions: options }); + } + registerLanguageProvider(options) { + const selector = options.documentSelector; + const provider = { + provideCodeActions: (document, range, context, token) => { + const client = this._client; + const _provideCodeActions = async (document, range, context, token) => { + const params = { + textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(document), + range: client.code2ProtocolConverter.asRange(range), + context: client.code2ProtocolConverter.asCodeActionContextSync(context) + }; + return client.sendRequest(vscode_languageserver_protocol_1.CodeActionRequest.type, params, token).then((values) => { + if (token.isCancellationRequested || values === null || values === undefined) { + return null; + } + return client.protocol2CodeConverter.asCodeActionResult(values, token); + }, (error) => { + return client.handleFailedRequest(vscode_languageserver_protocol_1.CodeActionRequest.type, token, error, null); + }); + }; + const middleware = client.middleware; + return middleware.provideCodeActions + ? middleware.provideCodeActions(document, range, context, token, _provideCodeActions) + : _provideCodeActions(document, range, context, token); + }, + resolveCodeAction: options.resolveProvider + ? (item, token) => { + const client = this._client; + const middleware = this._client.middleware; + const resolveCodeAction = async (item, token) => { + return client.sendRequest(vscode_languageserver_protocol_1.CodeActionResolveRequest.type, client.code2ProtocolConverter.asCodeActionSync(item), token).then((result) => { + if (token.isCancellationRequested) { + return item; + } + return client.protocol2CodeConverter.asCodeAction(result, token); + }, (error) => { + return client.handleFailedRequest(vscode_languageserver_protocol_1.CodeActionResolveRequest.type, token, error, item); + }); + }; + return middleware.resolveCodeAction + ? middleware.resolveCodeAction(item, token, resolveCodeAction) + : resolveCodeAction(item, token); + } + : undefined + }; + return [vscode_1.languages.registerCodeActionsProvider(this._client.protocol2CodeConverter.asDocumentSelector(selector), provider, this.getMetadata(options)), provider]; + } + getMetadata(options) { + if (options.codeActionKinds === undefined && options.documentation === undefined) { + return undefined; + } + return { + providedCodeActionKinds: this._client.protocol2CodeConverter.asCodeActionKinds(options.codeActionKinds), + documentation: this._client.protocol2CodeConverter.asCodeActionDocumentations(options.documentation) + }; + } +} +exports.CodeActionFeature = CodeActionFeature; + + +}, +"./node_modules/vscode-languageclient/lib/common/codeConverter.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +/// +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createConverter = createConverter; +const code = __importStar(__webpack_require__("vscode")); +const proto = __importStar(__webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js")); +const Is = __importStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/utils/is.js")); +const async = __importStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/utils/async.js")); +const protocolCompletionItem_1 = __importDefault(__webpack_require__("./node_modules/vscode-languageclient/lib/common/protocolCompletionItem.js")); +const protocolCodeLens_1 = __importDefault(__webpack_require__("./node_modules/vscode-languageclient/lib/common/protocolCodeLens.js")); +const protocolDocumentLink_1 = __importDefault(__webpack_require__("./node_modules/vscode-languageclient/lib/common/protocolDocumentLink.js")); +const protocolCodeAction_1 = __importDefault(__webpack_require__("./node_modules/vscode-languageclient/lib/common/protocolCodeAction.js")); +const protocolDiagnostic_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/protocolDiagnostic.js"); +const protocolCallHierarchyItem_1 = __importDefault(__webpack_require__("./node_modules/vscode-languageclient/lib/common/protocolCallHierarchyItem.js")); +const protocolTypeHierarchyItem_1 = __importDefault(__webpack_require__("./node_modules/vscode-languageclient/lib/common/protocolTypeHierarchyItem.js")); +const protocolWorkspaceSymbol_1 = __importDefault(__webpack_require__("./node_modules/vscode-languageclient/lib/common/protocolWorkspaceSymbol.js")); +const protocolInlayHint_1 = __importDefault(__webpack_require__("./node_modules/vscode-languageclient/lib/common/protocolInlayHint.js")); +var InsertReplaceRange; +(function (InsertReplaceRange) { + function is(value) { + const candidate = value; + return candidate && !!candidate.inserting && !!candidate.replacing; + } + InsertReplaceRange.is = is; +})(InsertReplaceRange || (InsertReplaceRange = {})); +function createConverter(uriConverter) { + const nullConverter = (value) => value.toString(); + const _uriConverter = uriConverter || nullConverter; + function asUri(value) { + return _uriConverter(value); + } + function asTextDocumentIdentifier(textDocument) { + return { + uri: _uriConverter(textDocument.uri) + }; + } + function asTextDocumentItem(textDocument) { + return { + uri: _uriConverter(textDocument.uri), + languageId: textDocument.languageId, + version: textDocument.version, + text: textDocument.getText() + }; + } + function asVersionedTextDocumentIdentifier(textDocument) { + return { + uri: _uriConverter(textDocument.uri), + version: textDocument.version + }; + } + function asOpenTextDocumentParams(textDocument) { + return { + textDocument: asTextDocumentItem(textDocument) + }; + } + function isTextDocumentChangeEvent(value) { + const candidate = value; + return !!candidate.document && !!candidate.contentChanges; + } + function isTextDocument(value) { + const candidate = value; + return !!candidate.uri && !!candidate.version; + } + function asChangeTextDocumentParams(arg0, arg1, arg2) { + if (isTextDocument(arg0)) { + const result = { + textDocument: { + uri: _uriConverter(arg0.uri), + version: arg0.version + }, + contentChanges: [{ text: arg0.getText() }] + }; + return result; + } + else if (isTextDocumentChangeEvent(arg0)) { + const uri = arg1; + const version = arg2; + const result = { + textDocument: { + uri: _uriConverter(uri), + version: version + }, + contentChanges: arg0.contentChanges.map((change) => { + const range = change.range; + return { + range: { + start: { line: range.start.line, character: range.start.character }, + end: { line: range.end.line, character: range.end.character } + }, + rangeLength: change.rangeLength, + text: change.text + }; + }) + }; + return result; + } + else { + throw Error('Unsupported text document change parameter'); + } + } + function asCloseTextDocumentParams(textDocument) { + return { + textDocument: asTextDocumentIdentifier(textDocument) + }; + } + function asSaveTextDocumentParams(textDocument, includeContent = false) { + const result = { + textDocument: asTextDocumentIdentifier(textDocument) + }; + if (includeContent) { + result.text = textDocument.getText(); + } + return result; + } + function asTextDocumentSaveReason(reason) { + switch (reason) { + case code.TextDocumentSaveReason.Manual: + return proto.TextDocumentSaveReason.Manual; + case code.TextDocumentSaveReason.AfterDelay: + return proto.TextDocumentSaveReason.AfterDelay; + case code.TextDocumentSaveReason.FocusOut: + return proto.TextDocumentSaveReason.FocusOut; + } + return proto.TextDocumentSaveReason.Manual; + } + function asWillSaveTextDocumentParams(event) { + return { + textDocument: asTextDocumentIdentifier(event.document), + reason: asTextDocumentSaveReason(event.reason) + }; + } + function asDidCreateFilesParams(event) { + return { + files: event.files.map((fileUri) => ({ + uri: _uriConverter(fileUri), + })), + }; + } + function asDidRenameFilesParams(event) { + return { + files: event.files.map((file) => ({ + oldUri: _uriConverter(file.oldUri), + newUri: _uriConverter(file.newUri), + })), + }; + } + function asDidDeleteFilesParams(event) { + return { + files: event.files.map((fileUri) => ({ + uri: _uriConverter(fileUri), + })), + }; + } + function asWillCreateFilesParams(event) { + return { + files: event.files.map((fileUri) => ({ + uri: _uriConverter(fileUri), + })), + }; + } + function asWillRenameFilesParams(event) { + return { + files: event.files.map((file) => ({ + oldUri: _uriConverter(file.oldUri), + newUri: _uriConverter(file.newUri), + })), + }; + } + function asWillDeleteFilesParams(event) { + return { + files: event.files.map((fileUri) => ({ + uri: _uriConverter(fileUri), + })), + }; + } + function asTextDocumentPositionParams(textDocument, position) { + return { + textDocument: asTextDocumentIdentifier(textDocument), + position: asWorkerPosition(position) + }; + } + function asCompletionTriggerKind(triggerKind) { + switch (triggerKind) { + case code.CompletionTriggerKind.TriggerCharacter: + return proto.CompletionTriggerKind.TriggerCharacter; + case code.CompletionTriggerKind.TriggerForIncompleteCompletions: + return proto.CompletionTriggerKind.TriggerForIncompleteCompletions; + default: + return proto.CompletionTriggerKind.Invoked; + } + } + function asCompletionParams(textDocument, position, context) { + return { + textDocument: asTextDocumentIdentifier(textDocument), + position: asWorkerPosition(position), + context: { + triggerKind: asCompletionTriggerKind(context.triggerKind), + triggerCharacter: context.triggerCharacter + } + }; + } + function asSignatureHelpTriggerKind(triggerKind) { + switch (triggerKind) { + case code.SignatureHelpTriggerKind.Invoke: + return proto.SignatureHelpTriggerKind.Invoked; + case code.SignatureHelpTriggerKind.TriggerCharacter: + return proto.SignatureHelpTriggerKind.TriggerCharacter; + case code.SignatureHelpTriggerKind.ContentChange: + return proto.SignatureHelpTriggerKind.ContentChange; + } + } + function asParameterInformation(value) { + // We leave the documentation out on purpose since it usually adds no + // value for the server. + return { + label: value.label + }; + } + function asParameterInformations(values) { + return values.map(asParameterInformation); + } + function asSignatureInformation(value) { + // We leave the documentation out on purpose since it usually adds no + // value for the server. + return { + label: value.label, + parameters: asParameterInformations(value.parameters) + }; + } + function asSignatureInformations(values) { + return values.map(asSignatureInformation); + } + function asSignatureHelp(value) { + if (value === undefined) { + return value; + } + return { + signatures: asSignatureInformations(value.signatures), + activeSignature: value.activeSignature, + activeParameter: value.activeParameter + }; + } + function asSignatureHelpParams(textDocument, position, context) { + return { + textDocument: asTextDocumentIdentifier(textDocument), + position: asWorkerPosition(position), + context: { + isRetrigger: context.isRetrigger, + triggerCharacter: context.triggerCharacter, + triggerKind: asSignatureHelpTriggerKind(context.triggerKind), + activeSignatureHelp: asSignatureHelp(context.activeSignatureHelp) + } + }; + } + function asWorkerPosition(position) { + return { line: position.line, character: position.character }; + } + function asPosition(value) { + if (value === undefined || value === null) { + return value; + } + return { line: value.line > proto.uinteger.MAX_VALUE ? proto.uinteger.MAX_VALUE : value.line, character: value.character > proto.uinteger.MAX_VALUE ? proto.uinteger.MAX_VALUE : value.character }; + } + function asPositions(values, token) { + return async.map(values, asPosition, token); + } + function asPositionsSync(values) { + return values.map(asPosition); + } + function asRange(value) { + if (value === undefined || value === null) { + return value; + } + return { start: asPosition(value.start), end: asPosition(value.end) }; + } + function asRanges(values) { + return values.map(asRange); + } + function asLocation(value) { + if (value === undefined || value === null) { + return value; + } + return proto.Location.create(asUri(value.uri), asRange(value.range)); + } + function asDiagnosticSeverity(value) { + switch (value) { + case code.DiagnosticSeverity.Error: + return proto.DiagnosticSeverity.Error; + case code.DiagnosticSeverity.Warning: + return proto.DiagnosticSeverity.Warning; + case code.DiagnosticSeverity.Information: + return proto.DiagnosticSeverity.Information; + case code.DiagnosticSeverity.Hint: + return proto.DiagnosticSeverity.Hint; + } + } + function asDiagnosticTags(tags) { + if (!tags) { + return undefined; + } + const result = []; + for (const tag of tags) { + const converted = asDiagnosticTag(tag); + if (converted !== undefined) { + result.push(converted); + } + } + return result.length > 0 ? result : undefined; + } + function asDiagnosticTag(tag) { + switch (tag) { + case code.DiagnosticTag.Unnecessary: + return proto.DiagnosticTag.Unnecessary; + case code.DiagnosticTag.Deprecated: + return proto.DiagnosticTag.Deprecated; + default: + return undefined; + } + } + function asRelatedInformation(item) { + return { + message: item.message, + location: asLocation(item.location) + }; + } + function asRelatedInformations(items) { + return items.map(asRelatedInformation); + } + function asDiagnosticCode(value) { + if (value === undefined || value === null) { + return undefined; + } + if (Is.number(value) || Is.string(value)) { + return value; + } + return { value: value.value, target: asUri(value.target) }; + } + function asDiagnostic(item) { + const result = proto.Diagnostic.create(asRange(item.range), item.message); + const protocolDiagnostic = item instanceof protocolDiagnostic_1.ProtocolDiagnostic ? item : undefined; + if (protocolDiagnostic !== undefined && protocolDiagnostic.data !== undefined) { + result.data = protocolDiagnostic.data; + } + const code = asDiagnosticCode(item.code); + if (protocolDiagnostic_1.DiagnosticCode.is(code)) { + if (protocolDiagnostic !== undefined && protocolDiagnostic.hasDiagnosticCode) { + result.code = code; + } + else { + result.code = code.value; + result.codeDescription = { href: code.target }; + } + } + else { + result.code = code; + } + if (Is.number(item.severity)) { + result.severity = asDiagnosticSeverity(item.severity); + } + if (Array.isArray(item.tags)) { + result.tags = asDiagnosticTags(item.tags); + } + if (item.relatedInformation) { + result.relatedInformation = asRelatedInformations(item.relatedInformation); + } + if (item.source) { + result.source = item.source; + } + return result; + } + function asDiagnostics(items, token) { + if (items === undefined || items === null) { + return items; + } + return async.map(items, asDiagnostic, token); + } + function asDiagnosticsSync(items) { + if (items === undefined || items === null) { + return items; + } + return items.map(asDiagnostic); + } + function asDocumentation(format, documentation) { + switch (format) { + case '$string': + return documentation; + case proto.MarkupKind.PlainText: + return { kind: format, value: documentation }; + case proto.MarkupKind.Markdown: + return { kind: format, value: documentation.value }; + default: + return `Unsupported Markup content received. Kind is: ${format}`; + } + } + function asCompletionItemTag(tag) { + switch (tag) { + case code.CompletionItemTag.Deprecated: + return proto.CompletionItemTag.Deprecated; + } + return undefined; + } + function asCompletionItemTags(tags) { + if (tags === undefined) { + return tags; + } + const result = []; + for (const tag of tags) { + const converted = asCompletionItemTag(tag); + if (converted !== undefined) { + result.push(converted); + } + } + return result; + } + function asCompletionItemKind(value, original) { + if (original !== undefined) { + return original; + } + return value + 1; + } + function asCompletionItem(item, labelDetailsSupport = false) { + let label; + let labelDetails; + if (Is.string(item.label)) { + label = item.label; + } + else { + label = item.label.label; + if (labelDetailsSupport && (item.label.detail !== undefined || item.label.description !== undefined)) { + labelDetails = { detail: item.label.detail, description: item.label.description }; + } + } + const result = { label: label }; + if (labelDetails !== undefined) { + result.labelDetails = labelDetails; + } + const protocolItem = item instanceof protocolCompletionItem_1.default ? item : undefined; + if (item.detail) { + result.detail = item.detail; + } + // We only send items back we created. So this can't be something else than + // a string right now. + if (item.documentation) { + if (!protocolItem || protocolItem.documentationFormat === '$string') { + result.documentation = item.documentation; + } + else { + result.documentation = asDocumentation(protocolItem.documentationFormat, item.documentation); + } + } + if (item.filterText) { + result.filterText = item.filterText; + } + fillPrimaryInsertText(result, item); + if (Is.number(item.kind)) { + result.kind = asCompletionItemKind(item.kind, protocolItem && protocolItem.originalItemKind); + } + if (item.sortText) { + result.sortText = item.sortText; + } + if (item.additionalTextEdits) { + result.additionalTextEdits = asTextEdits(item.additionalTextEdits); + } + if (item.commitCharacters) { + result.commitCharacters = item.commitCharacters.slice(); + } + if (item.command) { + result.command = asCommand(item.command); + } + if (item.preselect === true || item.preselect === false) { + result.preselect = item.preselect; + } + const tags = asCompletionItemTags(item.tags); + if (protocolItem) { + if (protocolItem.data !== undefined) { + result.data = protocolItem.data; + } + if (protocolItem.deprecated === true || protocolItem.deprecated === false) { + if (protocolItem.deprecated === true && tags !== undefined && tags.length > 0) { + const index = tags.indexOf(code.CompletionItemTag.Deprecated); + if (index !== -1) { + tags.splice(index, 1); + } + } + result.deprecated = protocolItem.deprecated; + } + if (protocolItem.insertTextMode !== undefined) { + result.insertTextMode = protocolItem.insertTextMode; + } + } + if (tags !== undefined && tags.length > 0) { + result.tags = tags; + } + if (result.insertTextMode === undefined && item.keepWhitespace === true) { + result.insertTextMode = proto.InsertTextMode.adjustIndentation; + } + return result; + } + function fillPrimaryInsertText(target, source) { + let format = proto.InsertTextFormat.PlainText; + let text = undefined; + let range = undefined; + if (source.textEdit) { + text = source.textEdit.newText; + range = source.textEdit.range; + } + else if (source.insertText instanceof code.SnippetString) { + format = proto.InsertTextFormat.Snippet; + text = source.insertText.value; + } + else { + text = source.insertText; + } + if (source.range) { + range = source.range; + } + target.insertTextFormat = format; + if (source.fromEdit && text !== undefined && range !== undefined) { + target.textEdit = asCompletionTextEdit(text, range); + } + else { + target.insertText = text; + } + } + function asCompletionTextEdit(newText, range) { + if (InsertReplaceRange.is(range)) { + return proto.InsertReplaceEdit.create(newText, asRange(range.inserting), asRange(range.replacing)); + } + else { + return { newText, range: asRange(range) }; + } + } + function asTextEdit(edit) { + return { range: asRange(edit.range), newText: edit.newText }; + } + function asTextEdits(edits) { + if (edits === undefined || edits === null) { + return edits; + } + return edits.map(asTextEdit); + } + function asSymbolKind(item) { + if (item <= code.SymbolKind.TypeParameter) { + // Symbol kind is one based in the protocol and zero based in code. + return (item + 1); + } + return proto.SymbolKind.Property; + } + function asSymbolTag(item) { + return item; + } + function asSymbolTags(items) { + return items.map(asSymbolTag); + } + function asReferenceParams(textDocument, position, options) { + return { + textDocument: asTextDocumentIdentifier(textDocument), + position: asWorkerPosition(position), + context: { includeDeclaration: options.includeDeclaration } + }; + } + async function asCodeAction(item, token) { + const result = proto.CodeAction.create(item.title); + if (item instanceof protocolCodeAction_1.default && item.data !== undefined) { + result.data = item.data; + } + if (item.kind !== undefined) { + result.kind = asCodeActionKind(item.kind); + } + if (item.diagnostics !== undefined) { + result.diagnostics = await asDiagnostics(item.diagnostics, token); + } + if (item.edit !== undefined) { + throw new Error(`VS Code code actions can only be converted to a protocol code action without an edit.`); + } + if (item.command !== undefined) { + result.command = asCommand(item.command); + } + if (item.isPreferred !== undefined) { + result.isPreferred = item.isPreferred; + } + if (item.disabled !== undefined) { + result.disabled = { reason: item.disabled.reason }; + } + if (item.isAI) { + result.tags ??= []; + result.tags.push(proto.CodeActionTag.LLMGenerated); + } + return result; + } + function asCodeActionSync(item) { + const result = proto.CodeAction.create(item.title); + if (item instanceof protocolCodeAction_1.default && item.data !== undefined) { + result.data = item.data; + } + if (item.kind !== undefined) { + result.kind = asCodeActionKind(item.kind); + } + if (item.diagnostics !== undefined) { + result.diagnostics = asDiagnosticsSync(item.diagnostics); + } + if (item.edit !== undefined) { + throw new Error(`VS Code code actions can only be converted to a protocol code action without an edit.`); + } + if (item.command !== undefined) { + result.command = asCommand(item.command); + } + if (item.isPreferred !== undefined) { + result.isPreferred = item.isPreferred; + } + if (item.disabled !== undefined) { + result.disabled = { reason: item.disabled.reason }; + } + if (item.isAI) { + result.tags ??= []; + result.tags.push(proto.CodeActionTag.LLMGenerated); + } + return result; + } + async function asCodeActionContext(context, token) { + if (context === undefined || context === null) { + return context; + } + let only; + if (context.only && Is.string(context.only.value)) { + only = [context.only.value]; + } + return proto.CodeActionContext.create(await asDiagnostics(context.diagnostics, token), only, asCodeActionTriggerKind(context.triggerKind)); + } + function asCodeActionContextSync(context) { + if (context === undefined || context === null) { + return context; + } + let only; + if (context.only && Is.string(context.only.value)) { + only = [context.only.value]; + } + return proto.CodeActionContext.create(asDiagnosticsSync(context.diagnostics), only, asCodeActionTriggerKind(context.triggerKind)); + } + function asCodeActionTriggerKind(kind) { + switch (kind) { + case code.CodeActionTriggerKind.Invoke: + return proto.CodeActionTriggerKind.Invoked; + case code.CodeActionTriggerKind.Automatic: + return proto.CodeActionTriggerKind.Automatic; + default: + return undefined; + } + } + function asCodeActionKind(item) { + if (item === undefined || item === null) { + return undefined; + } + return item.value; + } + function asInlineValueContext(context) { + return proto.InlineValueContext.create(context.frameId, asRange(context.stoppedLocation)); + } + function asInlineCompletionParams(document, position, context) { + return { + textDocument: asTextDocumentIdentifier(document), position: asPosition(position), + context: asInlineCompletionContext(context) + }; + } + function asInlineCompletionContext(context) { + return { + triggerKind: asInlineCompletionTriggerKind(context.triggerKind), + selectedCompletionInfo: asSelectedCompletionInfo(context.selectedCompletionInfo) + }; + } + function asInlineCompletionTriggerKind(kind) { + switch (kind) { + case code.InlineCompletionTriggerKind.Invoke: + return proto.InlineCompletionTriggerKind.Invoked; + case code.InlineCompletionTriggerKind.Automatic: + return proto.InlineCompletionTriggerKind.Automatic; + } + } + function asSelectedCompletionInfo(info) { + if (info === undefined || info === null) { + return undefined; + } + return { range: asRange(info.range), text: info.text }; + } + function asCommand(item) { + const result = proto.Command.create(item.title, item.command); + if (item.tooltip) { + result.tooltip = item.tooltip; + } + if (item.arguments) { + result.arguments = item.arguments; + } + return result; + } + function asCodeLens(item) { + const result = proto.CodeLens.create(asRange(item.range)); + if (item.command) { + result.command = asCommand(item.command); + } + if (item instanceof protocolCodeLens_1.default) { + if (item.data) { + result.data = item.data; + } + } + return result; + } + function asFormattingOptions(options, fileOptions) { + const result = { tabSize: options.tabSize, insertSpaces: options.insertSpaces }; + if (fileOptions.trimTrailingWhitespace) { + result.trimTrailingWhitespace = true; + } + if (fileOptions.trimFinalNewlines) { + result.trimFinalNewlines = true; + } + if (fileOptions.insertFinalNewline) { + result.insertFinalNewline = true; + } + return result; + } + function asDocumentSymbolParams(textDocument) { + return { + textDocument: asTextDocumentIdentifier(textDocument) + }; + } + function asCodeLensParams(textDocument) { + return { + textDocument: asTextDocumentIdentifier(textDocument) + }; + } + function asDocumentLink(item) { + const result = proto.DocumentLink.create(asRange(item.range)); + if (item.target) { + result.target = asUri(item.target); + } + if (item.tooltip !== undefined) { + result.tooltip = item.tooltip; + } + const protocolItem = item instanceof protocolDocumentLink_1.default ? item : undefined; + if (protocolItem && protocolItem.data) { + result.data = protocolItem.data; + } + return result; + } + function asDocumentLinkParams(textDocument) { + return { + textDocument: asTextDocumentIdentifier(textDocument) + }; + } + function asCallHierarchyItem(value) { + const result = { + name: value.name, + kind: asSymbolKind(value.kind), + uri: asUri(value.uri), + range: asRange(value.range), + selectionRange: asRange(value.selectionRange) + }; + if (value.detail !== undefined && value.detail.length > 0) { + result.detail = value.detail; + } + if (value.tags !== undefined) { + result.tags = asSymbolTags(value.tags); + } + if (value instanceof protocolCallHierarchyItem_1.default && value.data !== undefined) { + result.data = value.data; + } + return result; + } + function asTypeHierarchyItem(value) { + const result = { + name: value.name, + kind: asSymbolKind(value.kind), + uri: asUri(value.uri), + range: asRange(value.range), + selectionRange: asRange(value.selectionRange), + }; + if (value.detail !== undefined && value.detail.length > 0) { + result.detail = value.detail; + } + if (value.tags !== undefined) { + result.tags = asSymbolTags(value.tags); + } + if (value instanceof protocolTypeHierarchyItem_1.default && value.data !== undefined) { + result.data = value.data; + } + return result; + } + function asWorkspaceSymbol(item) { + const result = item instanceof protocolWorkspaceSymbol_1.default + ? { name: item.name, kind: asSymbolKind(item.kind), location: item.hasRange ? asLocation(item.location) : { uri: _uriConverter(item.location.uri) }, data: item.data } + : { name: item.name, kind: asSymbolKind(item.kind), location: asLocation(item.location) }; + if (item.tags !== undefined) { + result.tags = asSymbolTags(item.tags); + } + if (item.containerName !== '') { + result.containerName = item.containerName; + } + return result; + } + function asInlayHint(item) { + const label = typeof item.label === 'string' + ? item.label + : item.label.map(asInlayHintLabelPart); + const result = proto.InlayHint.create(asPosition(item.position), label); + if (item.kind !== undefined) { + result.kind = item.kind; + } + if (item.textEdits !== undefined) { + result.textEdits = asTextEdits(item.textEdits); + } + if (item.tooltip !== undefined) { + result.tooltip = asTooltip(item.tooltip); + } + if (item.paddingLeft !== undefined) { + result.paddingLeft = item.paddingLeft; + } + if (item.paddingRight !== undefined) { + result.paddingRight = item.paddingRight; + } + if (item instanceof protocolInlayHint_1.default && item.data !== undefined) { + result.data = item.data; + } + return result; + } + function asInlayHintLabelPart(item) { + const result = proto.InlayHintLabelPart.create(item.value); + if (item.location !== undefined) { + result.location = asLocation(item.location); + } + if (item.command !== undefined) { + result.command = asCommand(item.command); + } + if (item.tooltip !== undefined) { + result.tooltip = asTooltip(item.tooltip); + } + return result; + } + function asTooltip(value) { + if (typeof value === 'string') { + return value; + } + const result = { + kind: proto.MarkupKind.Markdown, + value: value.value + }; + return result; + } + return { + asUri, + asTextDocumentIdentifier, + asTextDocumentItem, + asVersionedTextDocumentIdentifier, + asOpenTextDocumentParams, + asChangeTextDocumentParams, + asCloseTextDocumentParams, + asSaveTextDocumentParams, + asWillSaveTextDocumentParams, + asDidCreateFilesParams, + asDidRenameFilesParams, + asDidDeleteFilesParams, + asWillCreateFilesParams, + asWillRenameFilesParams, + asWillDeleteFilesParams, + asTextDocumentPositionParams, + asCompletionParams, + asSignatureHelpParams, + asWorkerPosition, + asRange, + asRanges, + asPosition, + asPositions, + asPositionsSync, + asLocation, + asDiagnosticSeverity, + asDiagnosticTag, + asDiagnostic, + asDiagnostics, + asDiagnosticsSync, + asCompletionItem, + asTextEdit, + asSymbolKind, + asSymbolTag, + asSymbolTags, + asReferenceParams, + asCodeAction, + asCodeActionSync, + asCodeActionContext, + asCodeActionContextSync, + asInlineValueContext, + asCommand, + asCodeLens, + asFormattingOptions, + asDocumentSymbolParams, + asCodeLensParams, + asDocumentLink, + asDocumentLinkParams, + asCallHierarchyItem, + asTypeHierarchyItem, + asInlayHint, + asWorkspaceSymbol, + asInlineCompletionParams, + asInlineCompletionContext + }; +} + + +}, +"./node_modules/vscode-languageclient/lib/common/codeLens.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CodeLensFeature = void 0; +const vscode_1 = __webpack_require__("vscode"); +const vscode_languageserver_protocol_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js"); +const UUID = __importStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/utils/uuid.js")); +const features_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/features.js"); +class CodeLensFeature extends features_1.TextDocumentLanguageFeature { + constructor(client) { + super(client, vscode_languageserver_protocol_1.CodeLensRequest.type); + } + fillClientCapabilities(capabilities) { + const clc = (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'textDocument'), 'codeLens'); + clc.dynamicRegistration = true; + clc.resolveSupport = { properties: ['command'] }; + (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'workspace'), 'codeLens').refreshSupport = true; + } + initialize(capabilities, documentSelector) { + const client = this._client; + client.onRequest(vscode_languageserver_protocol_1.CodeLensRefreshRequest.type, async () => { + for (const provider of this.getAllProviders()) { + provider.onDidChangeCodeLensEmitter.fire(); + } + }); + const options = this.getRegistrationOptions(documentSelector, capabilities.codeLensProvider); + if (!options) { + return; + } + this.register({ id: UUID.generateUuid(), registerOptions: options }); + } + registerLanguageProvider(options) { + const selector = options.documentSelector; + const eventEmitter = new vscode_1.EventEmitter(); + const provider = { + onDidChangeCodeLenses: eventEmitter.event, + provideCodeLenses: (document, token) => { + const client = this._client; + const provideCodeLenses = (document, token) => { + return client.sendRequest(vscode_languageserver_protocol_1.CodeLensRequest.type, client.code2ProtocolConverter.asCodeLensParams(document), token).then((result) => { + if (token.isCancellationRequested) { + return null; + } + return client.protocol2CodeConverter.asCodeLenses(result, token); + }, (error) => { + return client.handleFailedRequest(vscode_languageserver_protocol_1.CodeLensRequest.type, token, error, null); + }); + }; + const middleware = client.middleware; + return middleware.provideCodeLenses + ? middleware.provideCodeLenses(document, token, provideCodeLenses) + : provideCodeLenses(document, token); + }, + resolveCodeLens: (options.resolveProvider) + ? (codeLens, token) => { + const client = this._client; + const resolveCodeLens = (codeLens, token) => { + return client.sendRequest(vscode_languageserver_protocol_1.CodeLensResolveRequest.type, client.code2ProtocolConverter.asCodeLens(codeLens), token).then((result) => { + if (token.isCancellationRequested) { + return codeLens; + } + return client.protocol2CodeConverter.asCodeLens(result); + }, (error) => { + return client.handleFailedRequest(vscode_languageserver_protocol_1.CodeLensResolveRequest.type, token, error, codeLens); + }); + }; + const middleware = client.middleware; + return middleware.resolveCodeLens + ? middleware.resolveCodeLens(codeLens, token, resolveCodeLens) + : resolveCodeLens(codeLens, token); + } + : undefined + }; + return [vscode_1.languages.registerCodeLensProvider(this._client.protocol2CodeConverter.asDocumentSelector(selector), provider), { provider, onDidChangeCodeLensEmitter: eventEmitter }]; + } +} +exports.CodeLensFeature = CodeLensFeature; + + +}, +"./node_modules/vscode-languageclient/lib/common/colorProvider.js"(__unused_rspack_module, exports, __webpack_require__) { +var __rspack_unused_export; + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +__rspack_unused_export = ({ value: true }); +exports.ColorProviderFeature = void 0; +const vscode_1 = __webpack_require__("vscode"); +const vscode_languageserver_protocol_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js"); +const features_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/features.js"); +class ColorProviderFeature extends features_1.TextDocumentLanguageFeature { + constructor(client) { + super(client, vscode_languageserver_protocol_1.DocumentColorRequest.type); + } + fillClientCapabilities(capabilities) { + (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'textDocument'), 'colorProvider').dynamicRegistration = true; + } + initialize(capabilities, documentSelector) { + const [id, options] = this.getRegistration(documentSelector, capabilities.colorProvider); + if (!id || !options) { + return; + } + this.register({ id: id, registerOptions: options }); + } + registerLanguageProvider(options) { + const selector = options.documentSelector; + const provider = { + provideColorPresentations: (color, context, token) => { + const client = this._client; + const provideColorPresentations = (color, context, token) => { + const requestParams = { + color, + textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(context.document), + range: client.code2ProtocolConverter.asRange(context.range) + }; + return client.sendRequest(vscode_languageserver_protocol_1.ColorPresentationRequest.type, requestParams, token).then((result) => { + if (token.isCancellationRequested) { + return null; + } + return this._client.protocol2CodeConverter.asColorPresentations(result, token); + }, (error) => { + return client.handleFailedRequest(vscode_languageserver_protocol_1.ColorPresentationRequest.type, token, error, null); + }); + }; + const middleware = client.middleware; + return middleware.provideColorPresentations + ? middleware.provideColorPresentations(color, context, token, provideColorPresentations) + : provideColorPresentations(color, context, token); + }, + provideDocumentColors: (document, token) => { + const client = this._client; + const provideDocumentColors = (document, token) => { + const requestParams = { + textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(document) + }; + return client.sendRequest(vscode_languageserver_protocol_1.DocumentColorRequest.type, requestParams, token).then((result) => { + if (token.isCancellationRequested) { + return null; + } + return this._client.protocol2CodeConverter.asColorInformations(result, token); + }, (error) => { + return client.handleFailedRequest(vscode_languageserver_protocol_1.DocumentColorRequest.type, token, error, null); + }); + }; + const middleware = client.middleware; + return middleware.provideDocumentColors + ? middleware.provideDocumentColors(document, token, provideDocumentColors) + : provideDocumentColors(document, token); + } + }; + return [vscode_1.languages.registerColorProvider(this._client.protocol2CodeConverter.asDocumentSelector(selector), provider), provider]; + } +} +exports.ColorProviderFeature = ColorProviderFeature; + + +}, +"./node_modules/vscode-languageclient/lib/common/completion.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CompletionItemFeature = void 0; +const vscode_1 = __webpack_require__("vscode"); +const vscode_languageserver_protocol_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js"); +const features_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/features.js"); +const UUID = __importStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/utils/uuid.js")); +const SupportedCompletionItemKinds = [ + vscode_languageserver_protocol_1.CompletionItemKind.Text, + vscode_languageserver_protocol_1.CompletionItemKind.Method, + vscode_languageserver_protocol_1.CompletionItemKind.Function, + vscode_languageserver_protocol_1.CompletionItemKind.Constructor, + vscode_languageserver_protocol_1.CompletionItemKind.Field, + vscode_languageserver_protocol_1.CompletionItemKind.Variable, + vscode_languageserver_protocol_1.CompletionItemKind.Class, + vscode_languageserver_protocol_1.CompletionItemKind.Interface, + vscode_languageserver_protocol_1.CompletionItemKind.Module, + vscode_languageserver_protocol_1.CompletionItemKind.Property, + vscode_languageserver_protocol_1.CompletionItemKind.Unit, + vscode_languageserver_protocol_1.CompletionItemKind.Value, + vscode_languageserver_protocol_1.CompletionItemKind.Enum, + vscode_languageserver_protocol_1.CompletionItemKind.Keyword, + vscode_languageserver_protocol_1.CompletionItemKind.Snippet, + vscode_languageserver_protocol_1.CompletionItemKind.Color, + vscode_languageserver_protocol_1.CompletionItemKind.File, + vscode_languageserver_protocol_1.CompletionItemKind.Reference, + vscode_languageserver_protocol_1.CompletionItemKind.Folder, + vscode_languageserver_protocol_1.CompletionItemKind.EnumMember, + vscode_languageserver_protocol_1.CompletionItemKind.Constant, + vscode_languageserver_protocol_1.CompletionItemKind.Struct, + vscode_languageserver_protocol_1.CompletionItemKind.Event, + vscode_languageserver_protocol_1.CompletionItemKind.Operator, + vscode_languageserver_protocol_1.CompletionItemKind.TypeParameter +]; +class CompletionItemFeature extends features_1.TextDocumentLanguageFeature { + labelDetailsSupport; + constructor(client) { + super(client, vscode_languageserver_protocol_1.CompletionRequest.type); + this.labelDetailsSupport = new Map(); + } + fillClientCapabilities(capabilities) { + const completion = (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'textDocument'), 'completion'); + completion.dynamicRegistration = true; + completion.contextSupport = true; + completion.completionItem = { + snippetSupport: true, + commitCharactersSupport: true, + documentationFormat: [vscode_languageserver_protocol_1.MarkupKind.Markdown, vscode_languageserver_protocol_1.MarkupKind.PlainText], + deprecatedSupport: true, + preselectSupport: true, + tagSupport: { valueSet: [vscode_languageserver_protocol_1.CompletionItemTag.Deprecated] }, + insertReplaceSupport: true, + resolveSupport: { + properties: ['documentation', 'detail', 'additionalTextEdits'] + }, + insertTextModeSupport: { valueSet: [vscode_languageserver_protocol_1.InsertTextMode.asIs, vscode_languageserver_protocol_1.InsertTextMode.adjustIndentation] }, + labelDetailsSupport: true + }; + completion.insertTextMode = vscode_languageserver_protocol_1.InsertTextMode.adjustIndentation; + completion.completionItemKind = { valueSet: SupportedCompletionItemKinds }; + completion.completionList = { + itemDefaults: [ + 'commitCharacters', 'editRange', 'insertTextFormat', 'insertTextMode', 'data' + ], + applyKindSupport: true, + }; + } + initialize(capabilities, documentSelector) { + const options = this.getRegistrationOptions(documentSelector, capabilities.completionProvider); + if (!options) { + return; + } + this.register({ + id: UUID.generateUuid(), + registerOptions: options + }); + } + registerLanguageProvider(options, id) { + this.labelDetailsSupport.set(id, !!options.completionItem?.labelDetailsSupport); + const triggerCharacters = options.triggerCharacters ?? []; + const defaultCommitCharacters = options.allCommitCharacters; + const selector = options.documentSelector; + const provider = { + provideCompletionItems: (document, position, token, context) => { + const client = this._client; + const middleware = this._client.middleware; + const provideCompletionItems = (document, position, context, token) => { + return client.sendRequest(vscode_languageserver_protocol_1.CompletionRequest.type, client.code2ProtocolConverter.asCompletionParams(document, position, context), token).then((result) => { + if (token.isCancellationRequested) { + return null; + } + return client.protocol2CodeConverter.asCompletionResult(result, defaultCommitCharacters, token); + }, (error) => { + return client.handleFailedRequest(vscode_languageserver_protocol_1.CompletionRequest.type, token, error, null); + }); + }; + return middleware.provideCompletionItem + ? middleware.provideCompletionItem(document, position, context, token, provideCompletionItems) + : provideCompletionItems(document, position, context, token); + }, + resolveCompletionItem: options.resolveProvider + ? (item, token) => { + const client = this._client; + const middleware = this._client.middleware; + const resolveCompletionItem = (item, token) => { + return client.sendRequest(vscode_languageserver_protocol_1.CompletionResolveRequest.type, client.code2ProtocolConverter.asCompletionItem(item, !!this.labelDetailsSupport.get(id)), token).then((result) => { + if (token.isCancellationRequested) { + return null; + } + return client.protocol2CodeConverter.asCompletionItem(result); + }, (error) => { + return client.handleFailedRequest(vscode_languageserver_protocol_1.CompletionResolveRequest.type, token, error, item); + }); + }; + return middleware.resolveCompletionItem + ? middleware.resolveCompletionItem(item, token, resolveCompletionItem) + : resolveCompletionItem(item, token); + } + : undefined + }; + return [vscode_1.languages.registerCompletionItemProvider(this._client.protocol2CodeConverter.asDocumentSelector(selector), provider, ...triggerCharacters), provider]; + } +} +exports.CompletionItemFeature = CompletionItemFeature; + + +}, +"./node_modules/vscode-languageclient/lib/common/configuration.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SyncConfigurationFeature = exports.ConfigurationFeature = void 0; +exports.toJSONObject = toJSONObject; +const vscode_1 = __webpack_require__("vscode"); +const vscode_languageserver_protocol_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js"); +const Is = __importStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/utils/is.js")); +const UUID = __importStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/utils/uuid.js")); +const features_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/features.js"); +/** + * Configuration pull model. From server to client. + */ +class ConfigurationFeature { + _client; + constructor(client) { + this._client = client; + } + getState() { + return { kind: 'static' }; + } + fillClientCapabilities(capabilities) { + capabilities.workspace = capabilities.workspace || {}; + capabilities.workspace.configuration = true; + } + initialize() { + const client = this._client; + client.onRequest(vscode_languageserver_protocol_1.ConfigurationRequest.type, (params, token) => { + const configuration = (params) => { + const result = []; + for (const item of params.items) { + const resource = item.scopeUri !== void 0 && item.scopeUri !== null ? this._client.protocol2CodeConverter.asUri(item.scopeUri) : undefined; + result.push(this.getConfiguration(resource, item.section !== null ? item.section : undefined)); + } + return result; + }; + const middleware = client.middleware.workspace; + return middleware && middleware.configuration + ? middleware.configuration(params, token, configuration) + : configuration(params, token); + }); + } + getConfiguration(resource, section) { + let result = null; + if (section) { + const index = section.lastIndexOf('.'); + if (index === -1) { + result = toJSONObject(vscode_1.workspace.getConfiguration(undefined, resource).get(section)); + } + else { + const config = vscode_1.workspace.getConfiguration(section.substr(0, index), resource); + if (config) { + result = toJSONObject(config.get(section.substr(index + 1))); + } + } + } + else { + const config = vscode_1.workspace.getConfiguration(undefined, resource); + result = {}; + for (const key of Object.keys(config)) { + if (config.has(key)) { + result[key] = toJSONObject(config.get(key)); + } + } + } + if (result === undefined) { + result = null; + } + return result; + } + clear() { + } +} +exports.ConfigurationFeature = ConfigurationFeature; +function toJSONObject(obj) { + if (obj) { + if (Array.isArray(obj)) { + return obj.map(toJSONObject); + } + else if (typeof obj === 'object') { + const res = Object.create(null); + for (const key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + res[key] = toJSONObject(obj[key]); + } + } + return res; + } + } + return obj; +} +class SyncConfigurationFeature { + _client; + isCleared; + _listeners; + constructor(_client) { + this._client = _client; + this.isCleared = false; + this._listeners = new Map(); + } + getState() { + return { kind: 'workspace', id: this.registrationType.method, registrations: this._listeners.size > 0 }; + } + get registrationType() { + return vscode_languageserver_protocol_1.DidChangeConfigurationNotification.type; + } + fillClientCapabilities(capabilities) { + (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'workspace'), 'didChangeConfiguration').dynamicRegistration = true; + } + initialize() { + this.isCleared = false; + const section = this._client.clientOptions.synchronize?.configurationSection; + if (section !== undefined) { + this.register({ + id: UUID.generateUuid(), + registerOptions: { + section: section + } + }); + } + } + register(data) { + const disposable = vscode_1.workspace.onDidChangeConfiguration((event) => { + this.onDidChangeConfiguration(data.registerOptions.section, event); + }); + this._listeners.set(data.id, disposable); + if (data.registerOptions.section !== undefined) { + this.onDidChangeConfiguration(data.registerOptions.section, undefined); + } + } + unregister(id) { + const disposable = this._listeners.get(id); + if (disposable) { + this._listeners.delete(id); + disposable.dispose(); + } + } + clear() { + for (const disposable of this._listeners.values()) { + disposable.dispose(); + } + this._listeners.clear(); + this.isCleared = true; + } + onDidChangeConfiguration(configurationSection, event) { + if (this.isCleared) { + return; + } + let sections; + if (Is.string(configurationSection)) { + sections = [configurationSection]; + } + else { + sections = configurationSection; + } + if (sections !== undefined && event !== undefined) { + const affected = sections.some((section) => event.affectsConfiguration(section)); + if (!affected) { + return; + } + } + const didChangeConfiguration = async (sections) => { + if (sections === undefined) { + return this._client.sendNotification(vscode_languageserver_protocol_1.DidChangeConfigurationNotification.type, { settings: null }); + } + else { + return this._client.sendNotification(vscode_languageserver_protocol_1.DidChangeConfigurationNotification.type, { settings: this.extractSettingsInformation(sections) }); + } + }; + const middleware = this._client.middleware.workspace?.didChangeConfiguration; + (middleware ? middleware(sections, didChangeConfiguration) : didChangeConfiguration(sections)).catch((error) => { + this._client.error(`Sending notification ${vscode_languageserver_protocol_1.DidChangeConfigurationNotification.type.method} failed`, error); + }); + } + extractSettingsInformation(keys) { + function ensurePath(config, path) { + let current = config; + for (let i = 0; i < path.length - 1; i++) { + let obj = current[path[i]]; + if (!obj) { + obj = Object.create(null); + current[path[i]] = obj; + } + current = obj; + } + return current; + } + const resource = this._client.clientOptions.workspaceFolder + ? this._client.clientOptions.workspaceFolder.uri + : undefined; + const result = Object.create(null); + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + const index = key.indexOf('.'); + let config = null; + if (index >= 0) { + config = vscode_1.workspace.getConfiguration(key.substr(0, index), resource).get(key.substr(index + 1)); + } + else { + config = vscode_1.workspace.getConfiguration(undefined, resource).get(key); + } + if (config) { + const path = keys[i].split('.'); + ensurePath(result, path)[path[path.length - 1]] = toJSONObject(config); + } + } + return result; + } +} +exports.SyncConfigurationFeature = SyncConfigurationFeature; + + +}, +"./node_modules/vscode-languageclient/lib/common/declaration.js"(__unused_rspack_module, exports, __webpack_require__) { +var __rspack_unused_export; + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +__rspack_unused_export = ({ value: true }); +exports.DeclarationFeature = void 0; +const vscode_1 = __webpack_require__("vscode"); +const vscode_languageserver_protocol_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js"); +const features_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/features.js"); +class DeclarationFeature extends features_1.TextDocumentLanguageFeature { + constructor(client) { + super(client, vscode_languageserver_protocol_1.DeclarationRequest.type); + } + fillClientCapabilities(capabilities) { + const declarationSupport = (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'textDocument'), 'declaration'); + declarationSupport.dynamicRegistration = true; + declarationSupport.linkSupport = true; + } + initialize(capabilities, documentSelector) { + const [id, options] = this.getRegistration(documentSelector, capabilities.declarationProvider); + if (!id || !options) { + return; + } + this.register({ id: id, registerOptions: options }); + } + registerLanguageProvider(options) { + const selector = options.documentSelector; + const provider = { + provideDeclaration: (document, position, token) => { + const client = this._client; + const provideDeclaration = (document, position, token) => { + return client.sendRequest(vscode_languageserver_protocol_1.DeclarationRequest.type, client.code2ProtocolConverter.asTextDocumentPositionParams(document, position), token).then((result) => { + if (token.isCancellationRequested) { + return null; + } + return client.protocol2CodeConverter.asDeclarationResult(result, token); + }, (error) => { + return client.handleFailedRequest(vscode_languageserver_protocol_1.DeclarationRequest.type, token, error, null); + }); + }; + const middleware = client.middleware; + return middleware.provideDeclaration + ? middleware.provideDeclaration(document, position, token, provideDeclaration) + : provideDeclaration(document, position, token); + } + }; + return [this.registerProvider(selector, provider), provider]; + } + registerProvider(selector, provider) { + return vscode_1.languages.registerDeclarationProvider(this._client.protocol2CodeConverter.asDocumentSelector(selector), provider); + } +} +exports.DeclarationFeature = DeclarationFeature; + + +}, +"./node_modules/vscode-languageclient/lib/common/definition.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DefinitionFeature = void 0; +const vscode_1 = __webpack_require__("vscode"); +const vscode_languageserver_protocol_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js"); +const features_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/features.js"); +const UUID = __importStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/utils/uuid.js")); +class DefinitionFeature extends features_1.TextDocumentLanguageFeature { + constructor(client) { + super(client, vscode_languageserver_protocol_1.DefinitionRequest.type); + } + fillClientCapabilities(capabilities) { + const definitionSupport = (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'textDocument'), 'definition'); + definitionSupport.dynamicRegistration = true; + definitionSupport.linkSupport = true; + } + initialize(capabilities, documentSelector) { + const options = this.getRegistrationOptions(documentSelector, capabilities.definitionProvider); + if (!options) { + return; + } + this.register({ id: UUID.generateUuid(), registerOptions: options }); + } + registerLanguageProvider(options) { + const selector = options.documentSelector; + const provider = { + provideDefinition: (document, position, token) => { + const client = this._client; + const provideDefinition = (document, position, token) => { + return client.sendRequest(vscode_languageserver_protocol_1.DefinitionRequest.type, client.code2ProtocolConverter.asTextDocumentPositionParams(document, position), token).then((result) => { + if (token.isCancellationRequested) { + return null; + } + return client.protocol2CodeConverter.asDefinitionResult(result, token); + }, (error) => { + return client.handleFailedRequest(vscode_languageserver_protocol_1.DefinitionRequest.type, token, error, null); + }); + }; + const middleware = client.middleware; + return middleware.provideDefinition + ? middleware.provideDefinition(document, position, token, provideDefinition) + : provideDefinition(document, position, token); + } + }; + return [this.registerProvider(selector, provider), provider]; + } + registerProvider(selector, provider) { + return vscode_1.languages.registerDefinitionProvider(this._client.protocol2CodeConverter.asDocumentSelector(selector), provider); + } +} +exports.DefinitionFeature = DefinitionFeature; + + +}, +"./node_modules/vscode-languageclient/lib/common/diagnostic.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DiagnosticFeature = exports.DiagnosticPullMode = exports.vsdiag = void 0; +const vscode_1 = __webpack_require__("vscode"); +const vscode_languageserver_protocol_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js"); +const uuid_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/utils/uuid.js"); +const globPattern_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/utils/globPattern.js"); +const features_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/features.js"); +function ensure(target, key) { + if (target[key] === void 0) { + target[key] = {}; + } + return target[key]; +} +var vsdiag; +(function (vsdiag) { + let DocumentDiagnosticReportKind; + (function (DocumentDiagnosticReportKind) { + DocumentDiagnosticReportKind["full"] = "full"; + DocumentDiagnosticReportKind["unChanged"] = "unChanged"; + })(DocumentDiagnosticReportKind = vsdiag.DocumentDiagnosticReportKind || (vsdiag.DocumentDiagnosticReportKind = {})); +})(vsdiag || (exports.vsdiag = vsdiag = {})); +var DiagnosticPullMode; +(function (DiagnosticPullMode) { + DiagnosticPullMode["onType"] = "onType"; + DiagnosticPullMode["onSave"] = "onSave"; + DiagnosticPullMode["onFocus"] = "onFocus"; +})(DiagnosticPullMode || (exports.DiagnosticPullMode = DiagnosticPullMode = {})); +var RequestStateKind; +(function (RequestStateKind) { + RequestStateKind["active"] = "open"; + RequestStateKind["reschedule"] = "reschedule"; + RequestStateKind["outDated"] = "drop"; +})(RequestStateKind || (RequestStateKind = {})); +var PullState; +(function (PullState) { + PullState[PullState["document"] = 1] = "document"; + PullState[PullState["workspace"] = 2] = "workspace"; +})(PullState || (PullState = {})); +var DocumentOrUri; +(function (DocumentOrUri) { + function asKey(document) { + return document instanceof vscode_1.Uri ? document.toString() : document.uri.toString(); + } + DocumentOrUri.asKey = asKey; +})(DocumentOrUri || (DocumentOrUri = {})); +class DocumentPullStateTracker { + documentPullStates; + workspacePullStates; + constructor() { + this.documentPullStates = new Map(); + this.workspacePullStates = new Map(); + } + track(kind, document, arg1) { + const states = kind === PullState.document ? this.documentPullStates : this.workspacePullStates; + const [key, uri, version] = document instanceof vscode_1.Uri + ? [document.toString(), document, arg1] + : [document.uri.toString(), document.uri, document.version]; + let state = states.get(key); + if (state === undefined) { + state = { document: uri, pulledVersion: version, resultId: undefined }; + states.set(key, state); + } + return state; + } + update(kind, document, arg1, arg2) { + const states = kind === PullState.document ? this.documentPullStates : this.workspacePullStates; + const [key, uri, version, resultId] = document instanceof vscode_1.Uri + ? [document.toString(), document, arg1, arg2] + : [document.uri.toString(), document.uri, document.version, arg1]; + let state = states.get(key); + if (state === undefined) { + state = { document: uri, pulledVersion: version, resultId }; + states.set(key, state); + } + else { + state.pulledVersion = version; + state.resultId = resultId; + } + } + unTrack(kind, document) { + const key = DocumentOrUri.asKey(document); + const states = kind === PullState.document ? this.documentPullStates : this.workspacePullStates; + states.delete(key); + } + tracks(kind, document) { + const key = DocumentOrUri.asKey(document); + const states = kind === PullState.document ? this.documentPullStates : this.workspacePullStates; + return states.has(key); + } + tracksSameVersion(kind, document) { + const key = document.uri.toString(); + const states = kind === PullState.document ? this.documentPullStates : this.workspacePullStates; + const state = states.get(key); + return state !== undefined && state.pulledVersion === document.version; + } + getResultId(kind, document) { + const key = DocumentOrUri.asKey(document); + const states = kind === PullState.document ? this.documentPullStates : this.workspacePullStates; + return states.get(key)?.resultId; + } + getAllResultIds() { + const result = []; + for (let [uri, value] of this.workspacePullStates) { + if (this.documentPullStates.has(uri)) { + value = this.documentPullStates.get(uri); + } + if (value.resultId !== undefined) { + result.push({ uri, value: value.resultId }); + } + } + return result; + } +} +class DiagnosticRequestor { + isDisposed; + client; + visibleDocuments; + options; + onDidChangeDiagnosticsEmitter; + provider; + diagnostics; + openRequests; + documentStates; + workspaceErrorCounter; + workspaceCancellation; + workspaceTimeout; + constructor(client, visibleDocuments, options) { + this.client = client; + this.visibleDocuments = visibleDocuments; + this.options = options; + this.isDisposed = false; + this.onDidChangeDiagnosticsEmitter = new vscode_1.EventEmitter(); + this.provider = this.createProvider(); + this.diagnostics = this.createDiagnosticCollection(); + this.openRequests = new Map(); + this.documentStates = new DocumentPullStateTracker(); + this.workspaceErrorCounter = 0; + } + createDiagnosticCollection() { + if (this.client.clientOptions.diagnosticCollectionProvider === undefined) { + return vscode_1.languages.createDiagnosticCollection(this.options.identifier); + } + else { + return this.client.clientOptions.diagnosticCollectionProvider.create(this.options.identifier, features_1.DiagnosticCollectionSource.pull); + } + } + knows(kind, document) { + const uri = document instanceof vscode_1.Uri ? document : document.uri; + return this.documentStates.tracks(kind, document) || this.openRequests.has(uri.toString()); + } + knowsSameVersion(kind, document) { + const requestState = this.openRequests.get(document.uri.toString()); + if (requestState === undefined) { + return this.documentStates.tracksSameVersion(kind, document); + } + // A reschedule request is independent of a version so it will trigger + // on the latest version no matter what. + if (requestState.state === RequestStateKind.reschedule) { + return true; + } + if (requestState.state === RequestStateKind.outDated) { + return false; + } + return requestState.version === document.version; + } + forget(kind, document) { + this.documentStates.unTrack(kind, document); + } + pull(document, cb) { + if (this.isDisposed) { + return; + } + const uri = document instanceof vscode_1.Uri ? document : document.uri; + this.pullAsync(document).then(() => { + if (cb) { + cb(); + } + }, (error) => { + this.client.error(`Document pull failed for text document ${uri.toString()}`, error, false); + }); + } + async pullAsync(document, version) { + if (this.isDisposed) { + return; + } + const isUri = document instanceof vscode_1.Uri; + const uri = isUri ? document : document.uri; + const key = uri.toString(); + version = isUri ? version : document.version; + const currentRequestState = this.openRequests.get(key); + const documentState = isUri + ? this.documentStates.track(PullState.document, document, version) + : this.documentStates.track(PullState.document, document); + if (currentRequestState === undefined) { + const tokenSource = new vscode_1.CancellationTokenSource(); + this.openRequests.set(key, { state: RequestStateKind.active, document: document, version: version, tokenSource }); + let report; + let afterState; + try { + report = await this.provider.provideDiagnostics(document, documentState.resultId, tokenSource.token) ?? { kind: vsdiag.DocumentDiagnosticReportKind.full, items: [] }; + } + catch (error) { + if (error instanceof features_1.LSPCancellationError && vscode_languageserver_protocol_1.DiagnosticServerCancellationData.is(error.data) && error.data.retriggerRequest === false) { + afterState = { state: RequestStateKind.outDated, document }; + } + if (afterState === undefined && error instanceof vscode_1.CancellationError) { + afterState = { state: RequestStateKind.reschedule, document }; + } + else { + throw error; + } + } + afterState = afterState ?? this.openRequests.get(key); + if (afterState === undefined) { + // This shouldn't happen. Log it + this.client.error(`Lost request state in diagnostic pull model. Clearing diagnostics for ${key}`); + this.diagnostics.delete(uri); + return; + } + this.openRequests.delete(key); + if (!this.visibleDocuments.isVisible(document)) { + this.documentStates.unTrack(PullState.document, document); + return; + } + if (afterState.state === RequestStateKind.outDated) { + return; + } + // report is only undefined if the request has thrown. + if (report !== undefined) { + if (report.kind === vsdiag.DocumentDiagnosticReportKind.full) { + this.diagnostics.set(uri, report.items); + } + documentState.pulledVersion = version; + documentState.resultId = report.resultId; + } + if (afterState.state === RequestStateKind.reschedule) { + this.pull(document); + } + } + else { + if (currentRequestState.state === RequestStateKind.active) { + // Cancel the current request and reschedule a new one when the old one returned. + currentRequestState.tokenSource.cancel(); + this.openRequests.set(key, { state: RequestStateKind.reschedule, document: currentRequestState.document }); + } + else if (currentRequestState.state === RequestStateKind.outDated) { + this.openRequests.set(key, { state: RequestStateKind.reschedule, document: currentRequestState.document }); + } + } + } + forgetDocument(document) { + if (this.isDisposed) { + return; + } + const uri = document instanceof vscode_1.Uri ? document : document.uri; + const key = uri.toString(); + const request = this.openRequests.get(key); + if (this.options.workspaceDiagnostics && uri.scheme !== 'untitled') { + // If we run workspace diagnostic pull a last time for the diagnostics + // and then rely on getting them from the workspace result. + if (request !== undefined) { + this.openRequests.set(key, { state: RequestStateKind.reschedule, document: document }); + } + else { + this.pull(document, () => { + this.forget(PullState.document, document); + }); + } + // The previous resultId from the workspace pull state can map to diagnostics we no longer have + // (e.g. they came from a workspace report but were overwritten by a later document pull request). + // Clear the workspace pull state for this document as well to ensure we get fresh diagnostics. + this.forget(PullState.workspace, document); + } + else { + // We have normal pull or inter file dependencies. In this case we + // clear the diagnostics (to have the same start as after startup). + // We also cancel outstanding requests. + if (request !== undefined) { + if (request.state === RequestStateKind.active) { + request.tokenSource.cancel(); + } + this.openRequests.set(key, { state: RequestStateKind.outDated, document: document }); + } + this.diagnostics.delete(uri); + this.forget(PullState.document, document); + } + } + pullWorkspace() { + if (this.isDisposed) { + return; + } + this.pullWorkspaceAsync().then(() => { + this.workspaceTimeout = (0, vscode_languageserver_protocol_1.RAL)().timer.setTimeout(() => { + this.pullWorkspace(); + }, 2000); + }, (error) => { + if (!(error instanceof features_1.LSPCancellationError) && !vscode_languageserver_protocol_1.DiagnosticServerCancellationData.is(error.data)) { + this.client.error(`Workspace diagnostic pull failed.`, error, false); + this.workspaceErrorCounter++; + } + if (this.workspaceErrorCounter <= 5) { + this.workspaceTimeout = (0, vscode_languageserver_protocol_1.RAL)().timer.setTimeout(() => { + this.pullWorkspace(); + }, 2000); + } + }); + } + async pullWorkspaceAsync() { + if (!this.provider.provideWorkspaceDiagnostics || this.isDisposed) { + return; + } + if (this.workspaceCancellation !== undefined) { + this.workspaceCancellation.cancel(); + this.workspaceCancellation = undefined; + } + this.workspaceCancellation = new vscode_1.CancellationTokenSource(); + const previousResultIds = this.documentStates.getAllResultIds().map((item) => { + return { + uri: this.client.protocol2CodeConverter.asUri(item.uri), + value: item.value + }; + }); + await this.provider.provideWorkspaceDiagnostics(previousResultIds, this.workspaceCancellation.token, (chunk) => { + if (!chunk || this.isDisposed) { + return; + } + for (const item of chunk.items) { + if (item.kind === vsdiag.DocumentDiagnosticReportKind.full) { + // Favour document pull result over workspace results. So skip if it is tracked + // as a document result. + if (!this.documentStates.tracks(PullState.document, item.uri)) { + this.diagnostics.set(item.uri, item.items); + } + } + this.documentStates.update(PullState.workspace, item.uri, item.version ?? undefined, item.resultId); + } + }); + } + createProvider() { + const result = { + onDidChangeDiagnostics: this.onDidChangeDiagnosticsEmitter.event, + provideDiagnostics: (document, previousResultId, token) => { + const provideDiagnostics = (document, previousResultId, token) => { + const params = { + identifier: this.options.identifier, + textDocument: { uri: this.client.code2ProtocolConverter.asUri(document instanceof vscode_1.Uri ? document : document.uri) }, + previousResultId: previousResultId + }; + if (this.isDisposed === true || !this.client.isRunning()) { + return { kind: vsdiag.DocumentDiagnosticReportKind.full, items: [] }; + } + return this.client.sendRequest(vscode_languageserver_protocol_1.DocumentDiagnosticRequest.type, params, token).then(async (result) => { + if (this.isDisposed) { + return { kind: vsdiag.DocumentDiagnosticReportKind.full, items: [] }; + } + if (token.isCancellationRequested) { + throw new vscode_1.CancellationError(); + } + if (result === undefined || result === null) { + return { kind: vsdiag.DocumentDiagnosticReportKind.full, items: [] }; + } + if (result.kind === vscode_languageserver_protocol_1.DocumentDiagnosticReportKind.Full) { + return { kind: vsdiag.DocumentDiagnosticReportKind.full, resultId: result.resultId, items: await this.client.protocol2CodeConverter.asDiagnostics(result.items, token) }; + } + else { + return { kind: vsdiag.DocumentDiagnosticReportKind.unChanged, resultId: result.resultId }; + } + }, (error) => { + return this.client.handleFailedRequest(vscode_languageserver_protocol_1.DocumentDiagnosticRequest.type, token, error, { kind: vsdiag.DocumentDiagnosticReportKind.full, items: [] }, true, true); + }); + }; + const middleware = this.client.middleware; + return middleware.provideDiagnostics + ? middleware.provideDiagnostics(document, previousResultId, token, provideDiagnostics) + : provideDiagnostics(document, previousResultId, token); + } + }; + if (this.options.workspaceDiagnostics) { + result.provideWorkspaceDiagnostics = (resultIds, token, resultReporter) => { + const convertReport = async (report) => { + if (report.kind === vscode_languageserver_protocol_1.DocumentDiagnosticReportKind.Full) { + return { + kind: vsdiag.DocumentDiagnosticReportKind.full, + uri: this.client.protocol2CodeConverter.asUri(report.uri), + resultId: report.resultId, + version: report.version, + items: await this.client.protocol2CodeConverter.asDiagnostics(report.items, token) + }; + } + else { + return { + kind: vsdiag.DocumentDiagnosticReportKind.unChanged, + uri: this.client.protocol2CodeConverter.asUri(report.uri), + resultId: report.resultId, + version: report.version + }; + } + }; + const convertPreviousResultIds = (resultIds) => { + const converted = []; + for (const item of resultIds) { + converted.push({ uri: this.client.code2ProtocolConverter.asUri(item.uri), value: item.value }); + } + return converted; + }; + const provideDiagnostics = (resultIds, token, resultReporter) => { + const partialResultToken = (0, uuid_1.generateUuid)(); + const disposable = this.client.onProgress(vscode_languageserver_protocol_1.WorkspaceDiagnosticRequest.partialResult, partialResultToken, async (partialResult) => { + if (partialResult === undefined || partialResult === null) { + resultReporter(null); + return; + } + const converted = { + items: [] + }; + for (const item of partialResult.items) { + try { + converted.items.push(await convertReport(item)); + } + catch (error) { + this.client.error(`Converting workspace diagnostics failed.`, error); + } + } + resultReporter(converted); + }); + const params = { + identifier: this.options.identifier, + previousResultIds: convertPreviousResultIds(resultIds), + partialResultToken: partialResultToken + }; + if (this.isDisposed === true || !this.client.isRunning()) { + return { items: [] }; + } + return this.client.sendRequest(vscode_languageserver_protocol_1.WorkspaceDiagnosticRequest.type, params, token).then(async (result) => { + if (token.isCancellationRequested) { + return { items: [] }; + } + const converted = { + items: [] + }; + for (const item of result.items) { + converted.items.push(await convertReport(item)); + } + disposable.dispose(); + resultReporter(converted); + return { items: [] }; + }, (error) => { + disposable.dispose(); + return this.client.handleFailedRequest(vscode_languageserver_protocol_1.DocumentDiagnosticRequest.type, token, error, { items: [] }); + }); + }; + const middleware = this.client.middleware; + return middleware.provideWorkspaceDiagnostics + ? middleware.provideWorkspaceDiagnostics(resultIds, token, resultReporter, provideDiagnostics) + : provideDiagnostics(resultIds, token, resultReporter); + }; + } + return result; + } + dispose() { + this.isDisposed = true; + // Cancel and clear workspace pull if present. + this.workspaceCancellation?.cancel(); + this.workspaceTimeout?.dispose(); + // Cancel all request and mark open requests as outdated. + for (const [key, request] of this.openRequests) { + if (request.state === RequestStateKind.active) { + request.tokenSource.cancel(); + } + this.openRequests.set(key, { state: RequestStateKind.outDated, document: request.document }); + } + // cleanup old diagnostics + if (this.client.clientOptions.diagnosticCollectionProvider !== undefined) { + this.client.clientOptions.diagnosticCollectionProvider.dispose(this.diagnostics, features_1.DiagnosticCollectionSource.pull); + } + else { + this.diagnostics.dispose(); + } + } +} +class BackgroundScheduler { + client; + diagnosticRequestor; + lastDocumentToPull; + documents; + timeoutHandle; + // The problem is that there could be outstanding diagnostic requests + // when we shutdown which when we receive the result will trigger a + // reschedule. So we remember if the background scheduler got disposed + // and ignore those re-schedules + isDisposed; + constructor(client, diagnosticRequestor) { + this.client = client; + this.diagnosticRequestor = diagnosticRequestor; + this.documents = new vscode_languageserver_protocol_1.LinkedMap(); + this.isDisposed = false; + } + add(document) { + if (this.isDisposed === true) { + return; + } + const key = DocumentOrUri.asKey(document); + if (this.documents.has(key)) { + return; + } + this.documents.set(key, document, vscode_languageserver_protocol_1.Touch.Last); + // Make sure we run up to that document. We could + // consider inserting it after the current last + // document for performance reasons but it might not catch + // all interfile dependencies. + this.lastDocumentToPull = document; + } + remove(document) { + const key = DocumentOrUri.asKey(document); + this.documents.delete(key); + // No more documents. Stop background activity. + if (this.documents.size === 0) { + this.stop(); + return; + } + else if (key === this.lastDocumentToPullKey()) { + // The remove document was the one we would run up to. So + // take the one before it. + const before = this.documents.before(key); + if (before === undefined) { + this.stop(); + } + else { + this.lastDocumentToPull = before; + } + } + } + trigger() { + this.lastDocumentToPull = this.documents.last; + this.runLoop(); + } + runLoop() { + if (this.isDisposed === true) { + return; + } + // We have an empty background list. Make sure we stop + // background activity. + if (this.documents.size === 0) { + this.stop(); + return; + } + // We have no last document anymore so stop the loop + if (this.lastDocumentToPull === undefined) { + return; + } + // We have a timeout in the loop. So we should not schedule + // another run. + if (this.timeoutHandle !== undefined) { + return; + } + this.timeoutHandle = (0, vscode_languageserver_protocol_1.RAL)().timer.setTimeout(() => { + const document = this.documents.first; + if (document === undefined) { + return; + } + const key = DocumentOrUri.asKey(document); + this.diagnosticRequestor.pullAsync(document).catch((error) => { + this.client.error(`Document pull failed for text document ${key}`, error, false); + }).finally(() => { + this.timeoutHandle = undefined; + this.documents.set(key, document, vscode_languageserver_protocol_1.Touch.Last); + if (key !== this.lastDocumentToPullKey()) { + this.runLoop(); + } + }); + }, 500); + } + dispose() { + this.isDisposed = true; + this.stop(); + this.documents.clear(); + this.lastDocumentToPull = undefined; + } + stop() { + this.timeoutHandle?.dispose(); + this.timeoutHandle = undefined; + this.lastDocumentToPull = undefined; + } + lastDocumentToPullKey() { + return this.lastDocumentToPull !== undefined ? DocumentOrUri.asKey(this.lastDocumentToPull) : undefined; + } +} +class DiagnosticFeatureProviderImpl { + disposable; + diagnosticRequestor; + activeTextDocument; + backgroundScheduler; + constructor(client, visibleDocuments, options) { + const diagnosticPullOptions = Object.assign({ onChange: false, onSave: false, onFocus: false }, client.clientOptions.diagnosticPullOptions); + const documentSelector = client.protocol2CodeConverter.asDocumentSelector(options.documentSelector); + const disposables = []; + const matchFilter = (filter, resource) => { + // The filter is a language id. We can't determine if it matches + // so we return false. + if (typeof filter === 'string') { + return false; + } + if (filter.language !== undefined && filter.language !== '*') { + return false; + } + if (filter.scheme !== undefined && filter.scheme !== '*' && filter.scheme !== resource.scheme) { + return false; + } + if (filter.pattern !== undefined && !(0, globPattern_1.matchGlobPattern)(filter.pattern, resource)) { + return false; + } + return true; + }; + const matchResource = (resource) => { + const selector = options.documentSelector; + if (diagnosticPullOptions.match !== undefined) { + return diagnosticPullOptions.match(selector, resource); + } + for (const filter of selector) { + if (!vscode_languageserver_protocol_1.TextDocumentFilter.is(filter)) { + continue; + } + if (matchFilter(filter, resource)) { + return true; + } + } + return false; + }; + const matches = (document) => { + return document instanceof vscode_1.Uri + ? matchResource(document) + : vscode_1.languages.match(documentSelector, document) > 0 && visibleDocuments.isVisible(document); + }; + const matchesCell = (cell) => { + // Cells match if the language is allowed and if the containing notebook is visible. + return vscode_1.languages.match(documentSelector, cell.document) > 0 && visibleDocuments.isVisible(cell.notebook.uri); + }; + const isActiveDocument = (document) => { + return document instanceof vscode_1.Uri + ? this.activeTextDocument?.uri.toString() === document.toString() + : this.activeTextDocument === document; + }; + this.diagnosticRequestor = new DiagnosticRequestor(client, visibleDocuments, options); + this.backgroundScheduler = new BackgroundScheduler(client, this.diagnosticRequestor); + const addToBackgroundIfNeeded = (document) => { + if (!matches(document) || !options.interFileDependencies || isActiveDocument(document) || diagnosticPullOptions.onChange === false) { + return; + } + this.backgroundScheduler.add(document); + }; + const considerDocument = (textDocument, mode) => { + return (diagnosticPullOptions.filter === undefined || !diagnosticPullOptions.filter(textDocument, mode)) && this.diagnosticRequestor.knows(PullState.document, textDocument); + }; + this.activeTextDocument = vscode_1.window.activeTextEditor?.document; + disposables.push(vscode_1.window.onDidChangeActiveTextEditor((editor) => { + const oldActive = this.activeTextDocument; + this.activeTextDocument = editor?.document; + if (oldActive !== undefined) { + addToBackgroundIfNeeded(oldActive); + } + if (this.activeTextDocument !== undefined) { + this.backgroundScheduler.remove(this.activeTextDocument); + if (diagnosticPullOptions.onFocus === true && matches(this.activeTextDocument) && considerDocument(this.activeTextDocument, DiagnosticPullMode.onFocus)) { + this.diagnosticRequestor.pull(this.activeTextDocument); + } + } + })); + // For pull model diagnostics we pull for documents visible in the UI. + // From an eventing point of view we still rely on open document events + // and filter the documents that are not visible in the UI instead of + // listening to Tab events. Major reason is event timing since we need + // to ensure that the pull is send after the document open has reached + // the server. + // We always pull on open. + const openFeature = client.getFeature(vscode_languageserver_protocol_1.DidOpenTextDocumentNotification.method); + disposables.push(openFeature.onNotificationSent((event) => { + const textDocument = event.textDocument; + // We already know about this document. This can happen via a tab open. + if (this.diagnosticRequestor.knowsSameVersion(PullState.document, textDocument)) { + return; + } + if (matches(textDocument)) { + this.diagnosticRequestor.pull(textDocument, () => { addToBackgroundIfNeeded(textDocument); }); + } + })); + const notebookFeature = client.getFeature(vscode_languageserver_protocol_1.NotebookDocumentSyncRegistrationType.method); + disposables.push(notebookFeature.onOpenNotificationSent((event) => { + // Send a pull for all opened cells in the notebook. + for (const cell of event.getCells()) { + if (matchesCell(cell)) { + this.diagnosticRequestor.pull(cell.document, () => { addToBackgroundIfNeeded(cell.document); }); + } + } + })); + disposables.push(visibleDocuments.onOpen((opened) => { + for (const resource of opened) { + // We already know about this document. This can happen via a document open. + if (this.diagnosticRequestor.knows(PullState.document, resource)) { + continue; + } + const uriStr = resource.toString(); + let textDocument; + for (const item of vscode_1.workspace.textDocuments) { + if (uriStr === item.uri.toString()) { + textDocument = item; + break; + } + } + // In VS Code the event timing is as follows: + // 1. tab events are fired. + // 2. open document events are fired and internal data structures like + // workspace.textDocuments and Window.activeTextEditor are updated. + // + // This means: for newly created tab/editors we don't find the underlying + // document yet. So we do nothing and rely on the underlying open document event + // to be fired. + if (textDocument !== undefined && matches(textDocument)) { + this.diagnosticRequestor.pull(textDocument, () => { addToBackgroundIfNeeded(textDocument); }); + } + } + })); + // Pull all diagnostics for documents that are already open + const pulledTextDocuments = new Set(); + for (const textDocument of vscode_1.workspace.textDocuments) { + if (matches(textDocument)) { + this.diagnosticRequestor.pull(textDocument, () => { addToBackgroundIfNeeded(textDocument); }); + pulledTextDocuments.add(textDocument.uri.toString()); + } + } + // Do the same for already open notebook cells. + for (const notebookDocument of vscode_1.workspace.notebookDocuments) { + for (const cell of notebookDocument.getCells()) { + if (matchesCell(cell)) { + this.diagnosticRequestor.pull(cell.document, () => { addToBackgroundIfNeeded(cell.document); }); + pulledTextDocuments.add(cell.document.uri.toString()); + } + } + } + // Pull all visible documents if not already pulled as text document + if (diagnosticPullOptions.onTabs === true) { + for (const resource of visibleDocuments.getResources()) { + if (!pulledTextDocuments.has(resource.toString()) && matches(resource)) { + this.diagnosticRequestor.pull(resource, () => { addToBackgroundIfNeeded(resource); }); + } + } + } + // We don't need to pull on tab open since we will receive a document open as well later on + // and that event allows us to use a document for a match check which will have a set + // language id. + if (diagnosticPullOptions.onChange === true) { + const changeFeature = client.getFeature(vscode_languageserver_protocol_1.DidChangeTextDocumentNotification.method); + disposables.push(changeFeature.onNotificationSent(async (event) => { + const textDocument = event.textDocument; + if (considerDocument(textDocument, DiagnosticPullMode.onType)) { + this.diagnosticRequestor.pull(textDocument, () => { this.backgroundScheduler.trigger(); }); + } + })); + disposables.push(notebookFeature.onChangeNotificationSent(async (event) => { + // Send a pull for all changed cells in the notebook. + const textEvents = event.cells?.textContent || []; + const changedCells = textEvents.map((c) => event.notebook.getCells().find(cell => cell.document.uri.toString() === c.document.uri.toString())); + for (const cell of changedCells) { + if (cell && matchesCell(cell)) { + this.diagnosticRequestor.pull(cell.document, () => { this.backgroundScheduler.trigger(); }); + } + } + // Clear out any closed cells. + const closedCells = event.cells?.structure?.didClose || []; + for (const cell of closedCells) { + this.diagnosticRequestor.forgetDocument(cell.document); + } + // Send a pull for any new opened cells. + const openedCells = event.cells?.structure?.didOpen || []; + for (const cell of openedCells) { + if (matchesCell(cell)) { + this.diagnosticRequestor.pull(cell.document, () => { this.backgroundScheduler.trigger(); }); + } + } + })); + } + if (diagnosticPullOptions.onSave === true) { + const saveFeature = client.getFeature(vscode_languageserver_protocol_1.DidSaveTextDocumentNotification.method); + disposables.push(saveFeature.onNotificationSent((event) => { + const textDocument = event.textDocument; + if (considerDocument(textDocument, DiagnosticPullMode.onSave)) { + this.diagnosticRequestor.pull(event.textDocument); + } + })); + disposables.push(notebookFeature.onSaveNotificationSent((event) => { + for (const cell of event.getCells()) { + if (matchesCell(cell)) { + this.diagnosticRequestor.pull(cell.document); + } + } + })); + } + // When the document closes clear things up. We do that right before the + // close notification is sent to the server so that it is not taken + // from the pull queue in case it is still there. + const closeFeature = client.getFeature(vscode_languageserver_protocol_1.DidCloseTextDocumentNotification.method); + disposables.push(closeFeature.onAboutToSendNotification((event) => { + this.cleanUpDocument(event.textDocument); + })); + disposables.push(notebookFeature.onCloseNotificationSent((event) => { + for (const cell of event.getCells()) { + this.cleanUpDocument(cell.document); + } + })); + // Same when a visible document closes. + disposables.push(visibleDocuments.onClose((closed) => { + for (const document of closed) { + this.cleanUpDocument(document); + } + })); + // We received a did change from the server. + this.diagnosticRequestor.onDidChangeDiagnosticsEmitter.event(() => { + for (const textDocument of vscode_1.workspace.textDocuments) { + if (matches(textDocument)) { + this.diagnosticRequestor.pull(textDocument); + } + } + }); + // da348dc5-c30a-4515-9d98-31ff3be38d14 is the test UUID to test the middle ware. So don't auto trigger pulls. + if (options.workspaceDiagnostics === true && options.identifier !== 'da348dc5-c30a-4515-9d98-31ff3be38d14') { + this.diagnosticRequestor.pullWorkspace(); + } + this.disposable = vscode_1.Disposable.from(...disposables, this.backgroundScheduler, this.diagnosticRequestor); + } + get onDidChangeDiagnosticsEmitter() { + return this.diagnosticRequestor.onDidChangeDiagnosticsEmitter; + } + get diagnostics() { + return this.diagnosticRequestor.provider; + } + forget(document) { + this.cleanUpDocument(document); + } + cleanUpDocument(document) { + this.backgroundScheduler.remove(document); + if (this.diagnosticRequestor.knows(PullState.document, document)) { + this.diagnosticRequestor.forgetDocument(document); + } + } +} +class DiagnosticFeature extends features_1.TextDocumentLanguageFeature { + constructor(client) { + super(client, vscode_languageserver_protocol_1.DocumentDiagnosticRequest.type); + } + fillClientCapabilities(capabilities) { + const capability = ensure(ensure(capabilities, 'textDocument'), 'diagnostic'); + capability.relatedInformation = true; + capability.tagSupport = { valueSet: [vscode_languageserver_protocol_1.DiagnosticTag.Unnecessary, vscode_languageserver_protocol_1.DiagnosticTag.Deprecated] }; + capability.codeDescriptionSupport = true; + capability.dataSupport = true; + capability.dynamicRegistration = true; + // We first need to decide how a UI will look with related documents. + // An easy implementation would be to only show related diagnostics for + // the active editor. + capability.relatedDocumentSupport = false; + // VS Code has no support for markup content in diagnostic messages. + capability.markupMessageSupport = false; + ensure(ensure(capabilities, 'workspace'), 'diagnostics').refreshSupport = true; + } + initialize(capabilities, documentSelector) { + const client = this._client; + client.onRequest(vscode_languageserver_protocol_1.DiagnosticRefreshRequest.type, async () => { + for (const provider of this.getAllProviders()) { + provider.onDidChangeDiagnosticsEmitter.fire(); + } + }); + const [id, options] = this.getRegistration(documentSelector, capabilities.diagnosticProvider); + if (!id || !options) { + return; + } + this.register({ id: id, registerOptions: options }); + } + clear() { + super.clear(); + } + refresh() { + for (const provider of this.getAllProviders()) { + provider.onDidChangeDiagnosticsEmitter.fire(); + } + } + registerLanguageProvider(options) { + const provider = new DiagnosticFeatureProviderImpl(this._client, this._client.visibleDocuments, options); + return [provider.disposable, provider]; + } +} +exports.DiagnosticFeature = DiagnosticFeature; + + +}, +"./node_modules/vscode-languageclient/lib/common/documentHighlight.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DocumentHighlightFeature = void 0; +const vscode_1 = __webpack_require__("vscode"); +const vscode_languageserver_protocol_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js"); +const features_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/features.js"); +const UUID = __importStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/utils/uuid.js")); +class DocumentHighlightFeature extends features_1.TextDocumentLanguageFeature { + constructor(client) { + super(client, vscode_languageserver_protocol_1.DocumentHighlightRequest.type); + } + fillClientCapabilities(capabilities) { + (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'textDocument'), 'documentHighlight').dynamicRegistration = true; + } + initialize(capabilities, documentSelector) { + const options = this.getRegistrationOptions(documentSelector, capabilities.documentHighlightProvider); + if (!options) { + return; + } + this.register({ id: UUID.generateUuid(), registerOptions: options }); + } + registerLanguageProvider(options) { + const selector = options.documentSelector; + const provider = { + provideDocumentHighlights: (document, position, token) => { + const client = this._client; + const _provideDocumentHighlights = (document, position, token) => { + return client.sendRequest(vscode_languageserver_protocol_1.DocumentHighlightRequest.type, client.code2ProtocolConverter.asTextDocumentPositionParams(document, position), token).then((result) => { + if (token.isCancellationRequested) { + return null; + } + return client.protocol2CodeConverter.asDocumentHighlights(result, token); + }, (error) => { + return client.handleFailedRequest(vscode_languageserver_protocol_1.DocumentHighlightRequest.type, token, error, null); + }); + }; + const middleware = client.middleware; + return middleware.provideDocumentHighlights + ? middleware.provideDocumentHighlights(document, position, token, _provideDocumentHighlights) + : _provideDocumentHighlights(document, position, token); + } + }; + return [vscode_1.languages.registerDocumentHighlightProvider(this._client.protocol2CodeConverter.asDocumentSelector(selector), provider), provider]; + } +} +exports.DocumentHighlightFeature = DocumentHighlightFeature; + + +}, +"./node_modules/vscode-languageclient/lib/common/documentLink.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DocumentLinkFeature = void 0; +const vscode_1 = __webpack_require__("vscode"); +const vscode_languageserver_protocol_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js"); +const features_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/features.js"); +const UUID = __importStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/utils/uuid.js")); +class DocumentLinkFeature extends features_1.TextDocumentLanguageFeature { + constructor(client) { + super(client, vscode_languageserver_protocol_1.DocumentLinkRequest.type); + } + fillClientCapabilities(capabilities) { + const documentLinkCapabilities = (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'textDocument'), 'documentLink'); + documentLinkCapabilities.dynamicRegistration = true; + documentLinkCapabilities.tooltipSupport = true; + } + initialize(capabilities, documentSelector) { + const options = this.getRegistrationOptions(documentSelector, capabilities.documentLinkProvider); + if (!options) { + return; + } + this.register({ id: UUID.generateUuid(), registerOptions: options }); + } + registerLanguageProvider(options) { + const selector = options.documentSelector; + const provider = { + provideDocumentLinks: (document, token) => { + const client = this._client; + const provideDocumentLinks = (document, token) => { + return client.sendRequest(vscode_languageserver_protocol_1.DocumentLinkRequest.type, client.code2ProtocolConverter.asDocumentLinkParams(document), token).then((result) => { + if (token.isCancellationRequested) { + return null; + } + return client.protocol2CodeConverter.asDocumentLinks(result, token); + }, (error) => { + return client.handleFailedRequest(vscode_languageserver_protocol_1.DocumentLinkRequest.type, token, error, null); + }); + }; + const middleware = client.middleware; + return middleware.provideDocumentLinks + ? middleware.provideDocumentLinks(document, token, provideDocumentLinks) + : provideDocumentLinks(document, token); + }, + resolveDocumentLink: options.resolveProvider + ? (link, token) => { + const client = this._client; + const resolveDocumentLink = (link, token) => { + return client.sendRequest(vscode_languageserver_protocol_1.DocumentLinkResolveRequest.type, client.code2ProtocolConverter.asDocumentLink(link), token).then((result) => { + if (token.isCancellationRequested) { + return link; + } + return client.protocol2CodeConverter.asDocumentLink(result); + }, (error) => { + return client.handleFailedRequest(vscode_languageserver_protocol_1.DocumentLinkResolveRequest.type, token, error, link); + }); + }; + const middleware = client.middleware; + return middleware.resolveDocumentLink + ? middleware.resolveDocumentLink(link, token, resolveDocumentLink) + : resolveDocumentLink(link, token); + } + : undefined + }; + return [vscode_1.languages.registerDocumentLinkProvider(this._client.protocol2CodeConverter.asDocumentSelector(selector), provider), provider]; + } +} +exports.DocumentLinkFeature = DocumentLinkFeature; + + +}, +"./node_modules/vscode-languageclient/lib/common/documentSymbol.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DocumentSymbolFeature = exports.SupportedSymbolTags = exports.SupportedSymbolKinds = void 0; +const vscode_1 = __webpack_require__("vscode"); +const vscode_languageserver_protocol_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js"); +const features_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/features.js"); +const UUID = __importStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/utils/uuid.js")); +exports.SupportedSymbolKinds = [ + vscode_languageserver_protocol_1.SymbolKind.File, + vscode_languageserver_protocol_1.SymbolKind.Module, + vscode_languageserver_protocol_1.SymbolKind.Namespace, + vscode_languageserver_protocol_1.SymbolKind.Package, + vscode_languageserver_protocol_1.SymbolKind.Class, + vscode_languageserver_protocol_1.SymbolKind.Method, + vscode_languageserver_protocol_1.SymbolKind.Property, + vscode_languageserver_protocol_1.SymbolKind.Field, + vscode_languageserver_protocol_1.SymbolKind.Constructor, + vscode_languageserver_protocol_1.SymbolKind.Enum, + vscode_languageserver_protocol_1.SymbolKind.Interface, + vscode_languageserver_protocol_1.SymbolKind.Function, + vscode_languageserver_protocol_1.SymbolKind.Variable, + vscode_languageserver_protocol_1.SymbolKind.Constant, + vscode_languageserver_protocol_1.SymbolKind.String, + vscode_languageserver_protocol_1.SymbolKind.Number, + vscode_languageserver_protocol_1.SymbolKind.Boolean, + vscode_languageserver_protocol_1.SymbolKind.Array, + vscode_languageserver_protocol_1.SymbolKind.Object, + vscode_languageserver_protocol_1.SymbolKind.Key, + vscode_languageserver_protocol_1.SymbolKind.Null, + vscode_languageserver_protocol_1.SymbolKind.EnumMember, + vscode_languageserver_protocol_1.SymbolKind.Struct, + vscode_languageserver_protocol_1.SymbolKind.Event, + vscode_languageserver_protocol_1.SymbolKind.Operator, + vscode_languageserver_protocol_1.SymbolKind.TypeParameter +]; +exports.SupportedSymbolTags = [ + vscode_languageserver_protocol_1.SymbolTag.Deprecated +]; +class DocumentSymbolFeature extends features_1.TextDocumentLanguageFeature { + constructor(client) { + super(client, vscode_languageserver_protocol_1.DocumentSymbolRequest.type); + } + fillClientCapabilities(capabilities) { + const symbolCapabilities = (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'textDocument'), 'documentSymbol'); + symbolCapabilities.dynamicRegistration = true; + symbolCapabilities.symbolKind = { + valueSet: exports.SupportedSymbolKinds + }; + symbolCapabilities.hierarchicalDocumentSymbolSupport = true; + symbolCapabilities.tagSupport = { + valueSet: exports.SupportedSymbolTags + }; + symbolCapabilities.labelSupport = true; + } + initialize(capabilities, documentSelector) { + const options = this.getRegistrationOptions(documentSelector, capabilities.documentSymbolProvider); + if (!options) { + return; + } + this.register({ id: UUID.generateUuid(), registerOptions: options }); + } + registerLanguageProvider(options) { + const selector = options.documentSelector; + const provider = { + provideDocumentSymbols: (document, token) => { + const client = this._client; + const _provideDocumentSymbols = async (document, token) => { + try { + const data = await client.sendRequest(vscode_languageserver_protocol_1.DocumentSymbolRequest.type, client.code2ProtocolConverter.asDocumentSymbolParams(document), token); + if (token.isCancellationRequested || data === undefined || data === null) { + return null; + } + if (data.length === 0) { + return []; + } + else { + const first = data[0]; + if (vscode_languageserver_protocol_1.DocumentSymbol.is(first)) { + return await client.protocol2CodeConverter.asDocumentSymbols(data, token); + } + else { + return await client.protocol2CodeConverter.asSymbolInformations(data, token); + } + } + } + catch (error) { + return client.handleFailedRequest(vscode_languageserver_protocol_1.DocumentSymbolRequest.type, token, error, null); + } + }; + const middleware = client.middleware; + return middleware.provideDocumentSymbols + ? middleware.provideDocumentSymbols(document, token, _provideDocumentSymbols) + : _provideDocumentSymbols(document, token); + } + }; + const metaData = options.label !== undefined ? { label: options.label } : undefined; + return [vscode_1.languages.registerDocumentSymbolProvider(this._client.protocol2CodeConverter.asDocumentSelector(selector), provider, metaData), provider]; + } +} +exports.DocumentSymbolFeature = DocumentSymbolFeature; + + +}, +"./node_modules/vscode-languageclient/lib/common/executeCommand.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ExecuteCommandFeature = void 0; +const vscode_1 = __webpack_require__("vscode"); +const vscode_languageserver_protocol_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js"); +const UUID = __importStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/utils/uuid.js")); +const features_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/features.js"); +class ExecuteCommandFeature { + _client; + _commands; + constructor(client) { + this._client = client; + this._commands = new Map(); + } + getState() { + return { kind: 'workspace', id: this.registrationType.method, registrations: this._commands.size > 0 }; + } + get registrationType() { + return vscode_languageserver_protocol_1.ExecuteCommandRequest.type; + } + fillClientCapabilities(capabilities) { + (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'workspace'), 'executeCommand').dynamicRegistration = true; + } + initialize(capabilities) { + if (!capabilities.executeCommandProvider) { + return; + } + this.register({ + id: UUID.generateUuid(), + registerOptions: Object.assign({}, capabilities.executeCommandProvider) + }); + } + register(data) { + const client = this._client; + const middleware = client.middleware; + const executeCommand = (command, args) => { + const params = { + command, + arguments: args + }; + return client.sendRequest(vscode_languageserver_protocol_1.ExecuteCommandRequest.type, params).then(undefined, (error) => { + return client.handleFailedRequest(vscode_languageserver_protocol_1.ExecuteCommandRequest.type, undefined, error, undefined); + }); + }; + if (data.registerOptions.commands) { + const disposables = []; + for (const command of data.registerOptions.commands) { + disposables.push(vscode_1.commands.registerCommand(command, (...args) => { + return middleware.executeCommand + ? middleware.executeCommand(command, args, executeCommand) + : executeCommand(command, args); + })); + } + this._commands.set(data.id, disposables); + } + } + unregister(id) { + const disposables = this._commands.get(id); + if (disposables) { + this._commands.delete(id); + disposables.forEach(disposable => disposable.dispose()); + } + } + clear() { + this._commands.forEach((value) => { + value.forEach(disposable => disposable.dispose()); + }); + this._commands.clear(); + } +} +exports.ExecuteCommandFeature = ExecuteCommandFeature; + + +}, +"./node_modules/vscode-languageclient/lib/common/features.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DefaultDiagnosticCollectionProvider = exports.DiagnosticCollectionSource = exports.WorkspaceFeature = exports.TextDocumentLanguageFeature = exports.TextDocumentEventFeature = exports.DynamicDocumentFeature = exports.DynamicFeature = exports.StaticFeature = exports.LSPCancellationError = void 0; +exports.ensure = ensure; +const vscode_1 = __webpack_require__("vscode"); +const vscode_languageserver_protocol_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js"); +const Is = __importStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/utils/is.js")); +const UUID = __importStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/utils/uuid.js")); +class LSPCancellationError extends vscode_1.CancellationError { + data; + constructor(data) { + super(); + this.data = data; + } +} +exports.LSPCancellationError = LSPCancellationError; +function ensure(target, key) { + if (target[key] === undefined) { + target[key] = {}; + } + return target[key]; +} +var StaticFeature; +(function (StaticFeature) { + function is(value) { + const candidate = value; + return candidate !== undefined && candidate !== null && + Is.func(candidate.fillClientCapabilities) && Is.func(candidate.initialize) && Is.func(candidate.getState) && Is.func(candidate.clear) && + (candidate.fillInitializeParams === undefined || Is.func(candidate.fillInitializeParams)); + } + StaticFeature.is = is; +})(StaticFeature || (exports.StaticFeature = StaticFeature = {})); +var DynamicFeature; +(function (DynamicFeature) { + function is(value) { + const candidate = value; + return candidate !== undefined && candidate !== null && + Is.func(candidate.fillClientCapabilities) && Is.func(candidate.initialize) && Is.func(candidate.getState) && Is.func(candidate.clear) && + (candidate.fillInitializeParams === undefined || Is.func(candidate.fillInitializeParams)) && Is.func(candidate.register) && + Is.func(candidate.unregister) && candidate.registrationType !== undefined; + } + DynamicFeature.is = is; +})(DynamicFeature || (exports.DynamicFeature = DynamicFeature = {})); +/** + * An abstract dynamic feature implementation that operates on documents (e.g. text + * documents or notebooks). + */ +class DynamicDocumentFeature { + _client; + constructor(client) { + this._client = client; + } + /** + * Returns the state the feature is in. + */ + getState() { + const selectors = this.getDocumentSelectors(); + let count = 0; + for (const selector of selectors) { + count++; + for (const document of vscode_1.workspace.textDocuments) { + if (vscode_1.languages.match(selector, document) > 0) { + return { kind: 'document', id: this.registrationType.method, registrations: true, matches: true }; + } + } + } + const registrations = count > 0; + return { kind: 'document', id: this.registrationType.method, registrations, matches: false }; + } +} +exports.DynamicDocumentFeature = DynamicDocumentFeature; +/** + * An abstract base class to implement features that react to events + * emitted from text documents. + */ +class TextDocumentEventFeature extends DynamicDocumentFeature { + _event; + _type; + _middleware; + _createParams; + _textDocument; + _selectorFilter; + _listener; + _selectors; + _onAboutToSendNotification; + _onNotificationSent; + static textDocumentFilter(selectors, textDocument) { + for (const selector of selectors) { + if (vscode_1.languages.match(selector, textDocument) > 0) { + return true; + } + } + return false; + } + constructor(client, event, type, middleware, createParams, textDocument, selectorFilter) { + super(client); + this._event = event; + this._type = type; + this._middleware = middleware; + this._createParams = createParams; + this._textDocument = textDocument; + this._selectorFilter = selectorFilter; + this._selectors = new Map(); + this._onAboutToSendNotification = new vscode_1.EventEmitter(); + this._onNotificationSent = new vscode_1.EventEmitter(); + } + getStateInfo() { + return [this._selectors.values(), false]; + } + getDocumentSelectors() { + return this._selectors.values(); + } + register(data) { + if (!data.registerOptions.documentSelector) { + return; + } + if (!this._listener) { + this._listener = this._event((data) => { + this.callback(data).catch((error) => { + this._client.error(`Sending document notification ${this._type.method} failed.`, error); + }); + }); + } + this._selectors.set(data.id, this._client.protocol2CodeConverter.asDocumentSelector(data.registerOptions.documentSelector)); + } + async callback(data) { + const doSend = async (data) => { + const textDocument = this.getTextDocument(data); + const params = this._createParams(data); + this.aboutToSendNotification(textDocument, this._type, params); + await this._client.sendNotification(this._type, params); + this.notificationSent(textDocument, this._type, params); + }; + if (this.matches(data)) { + const middleware = this._middleware(); + return middleware ? middleware(data, (data) => doSend(data)) : doSend(data); + } + } + matches(data) { + if (this._client.hasDedicatedTextSynchronizationFeature(this._textDocument(data))) { + return false; + } + return !this._selectorFilter || this._selectorFilter(this._selectors.values(), data); + } + get onAboutToSendNotification() { + return this._onAboutToSendNotification.event; + } + aboutToSendNotification(textDocument, type, params) { + this._onAboutToSendNotification.fire({ textDocument, type, params }); + } + get onNotificationSent() { + return this._onNotificationSent.event; + } + notificationSent(textDocument, type, params) { + this._onNotificationSent.fire({ textDocument, type, params }); + } + unregister(id) { + this._selectors.delete(id); + if (this._selectors.size === 0 && this._listener) { + this._listener.dispose(); + this._listener = undefined; + } + } + clear() { + this._selectors.clear(); + this._onNotificationSent.dispose(); + this._onNotificationSent = new vscode_1.EventEmitter(); + if (this._listener) { + this._listener.dispose(); + this._listener = undefined; + } + } + getProvider(document) { + for (const selector of this._selectors.values()) { + if (vscode_1.languages.match(selector, document) > 0) { + return { + send: (data) => { + return this.callback(data); + } + }; + } + } + return undefined; + } +} +exports.TextDocumentEventFeature = TextDocumentEventFeature; +/** + * A abstract feature implementation that registers language providers + * for text documents using a given document selector. + */ +class TextDocumentLanguageFeature extends DynamicDocumentFeature { + _registrationType; + _registrations; + constructor(client, registrationType) { + super(client); + this._registrationType = registrationType; + this._registrations = new Map(); + } + *getDocumentSelectors() { + for (const registration of this._registrations.values()) { + const selector = registration.data.registerOptions.documentSelector; + if (selector === null) { + continue; + } + yield this._client.protocol2CodeConverter.asDocumentSelector(selector); + } + } + get registrationType() { + return this._registrationType; + } + register(data) { + if (!data.registerOptions.documentSelector) { + return; + } + const registration = this.registerLanguageProvider(data.registerOptions, data.id); + this._registrations.set(data.id, { disposable: registration[0], data, provider: registration[1] }); + } + unregister(id) { + const registration = this._registrations.get(id); + if (registration !== undefined) { + this._registrations.delete(id); + registration.disposable.dispose(); + } + } + clear() { + this._registrations.forEach((value) => { + value.disposable.dispose(); + }); + this._registrations.clear(); + } + getRegistration(documentSelector, capability) { + if (!capability) { + return [undefined, undefined]; + } + else if (vscode_languageserver_protocol_1.TextDocumentRegistrationOptions.is(capability)) { + const id = vscode_languageserver_protocol_1.StaticRegistrationOptions.hasId(capability) ? capability.id : UUID.generateUuid(); + const selector = capability.documentSelector ?? documentSelector; + if (selector) { + return [id, Object.assign({}, capability, { documentSelector: selector })]; + } + } + else if (Is.boolean(capability) && capability === true || vscode_languageserver_protocol_1.WorkDoneProgressOptions.is(capability)) { + if (!documentSelector) { + return [undefined, undefined]; + } + const options = (Is.boolean(capability) && capability === true ? { documentSelector } : Object.assign({}, capability, { documentSelector })); + return [UUID.generateUuid(), options]; + } + return [undefined, undefined]; + } + getRegistrationOptions(documentSelector, capability) { + if (!documentSelector || !capability) { + return undefined; + } + return (Is.boolean(capability) && capability === true ? { documentSelector } : Object.assign({}, capability, { documentSelector })); + } + getProvider(textDocument) { + for (const registration of this._registrations.values()) { + const selector = registration.data.registerOptions.documentSelector; + if (selector !== null && vscode_1.languages.match(this._client.protocol2CodeConverter.asDocumentSelector(selector), textDocument) > 0) { + return registration.provider; + } + } + return undefined; + } + getAllProviders() { + const result = []; + for (const item of this._registrations.values()) { + result.push(item.provider); + } + return result; + } +} +exports.TextDocumentLanguageFeature = TextDocumentLanguageFeature; +class WorkspaceFeature { + _client; + _registrationType; + _registrations; + constructor(client, registrationType) { + this._client = client; + this._registrationType = registrationType; + this._registrations = new Map(); + } + getState() { + const registrations = this._registrations.size > 0; + return { kind: 'workspace', id: this._registrationType.method, registrations }; + } + get registrationType() { + return this._registrationType; + } + register(data) { + const registration = this.registerLanguageProvider(data.registerOptions); + this._registrations.set(data.id, { disposable: registration[0], provider: registration[1] }); + } + unregister(id) { + const registration = this._registrations.get(id); + if (registration !== undefined) { + this._registrations.delete(id); + registration.disposable.dispose(); + } + } + clear() { + this._registrations.forEach((registration) => { + registration.disposable.dispose(); + }); + this._registrations.clear(); + } + getProviders() { + const result = []; + for (const registration of this._registrations.values()) { + result.push(registration.provider); + } + return result; + } +} +exports.WorkspaceFeature = WorkspaceFeature; +var DiagnosticCollectionSource; +(function (DiagnosticCollectionSource) { + DiagnosticCollectionSource["push"] = "push"; + DiagnosticCollectionSource["pull"] = "pull"; +})(DiagnosticCollectionSource || (exports.DiagnosticCollectionSource = DiagnosticCollectionSource = {})); +/** + * The default {@link DiagnosticCollectionProvider}. It never shares a diagnostic + * collection between the push and the pull model. Every call to {@link create} + * returns a new collection and {@link dispose} disposes it directly. + */ +class DefaultDiagnosticCollectionProvider { + create(name, _source) { + return name !== undefined + ? vscode_1.languages.createDiagnosticCollection(name) + : vscode_1.languages.createDiagnosticCollection(); + } + dispose(collection, _source) { + collection.dispose(); + } +} +exports.DefaultDiagnosticCollectionProvider = DefaultDiagnosticCollectionProvider; + + +}, +"./node_modules/vscode-languageclient/lib/common/fileOperations.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.WillDeleteFilesFeature = exports.WillRenameFilesFeature = exports.WillCreateFilesFeature = exports.DidDeleteFilesFeature = exports.DidRenameFilesFeature = exports.DidCreateFilesFeature = void 0; +const code = __importStar(__webpack_require__("vscode")); +const minimatch = __importStar(__webpack_require__("./node_modules/minimatch/dist/commonjs/index.js")); +const proto = __importStar(__webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js")); +const UUID = __importStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/utils/uuid.js")); +function ensure(target, key) { + if (target[key] === void 0) { + target[key] = {}; + } + return target[key]; +} +function access(target, key) { + return target[key]; +} +function assign(target, key, value) { + target[key] = value; +} +class FileOperationFeature { + _client; + _event; + _registrationType; + _clientCapability; + _serverCapability; + _listener; + // This property must stay private. Otherwise the type `minimatch.IMinimatch` becomes public and as a consequence we would need to + // ship the d.ts files for minimatch to make the compiler happy when compiling against the vscode-languageclient library + _filters; + constructor(client, event, registrationType, clientCapability, serverCapability) { + this._client = client; + this._event = event; + this._registrationType = registrationType; + this._clientCapability = clientCapability; + this._serverCapability = serverCapability; + this._filters = new Map(); + } + getState() { + return { kind: 'workspace', id: this._registrationType.method, registrations: this._filters.size > 0 }; + } + filterSize() { + return this._filters.size; + } + get registrationType() { + return this._registrationType; + } + fillClientCapabilities(capabilities) { + const value = ensure(ensure(capabilities, 'workspace'), 'fileOperations'); + // this happens n times but it is the same value so we tolerate this. + assign(value, 'dynamicRegistration', true); + assign(value, this._clientCapability, true); + } + initialize(capabilities) { + const options = capabilities.workspace?.fileOperations; + const capability = options !== undefined ? access(options, this._serverCapability) : undefined; + if (capability?.filters !== undefined) { + try { + this.register({ + id: UUID.generateUuid(), + registerOptions: { filters: capability.filters } + }); + } + catch (e) { + this._client.warn(`Ignoring invalid glob pattern for ${this._serverCapability} registration: ${e}`); + } + } + } + register(data) { + if (!this._listener) { + this._listener = this._event(this.send, this); + } + const minimatchFilter = data.registerOptions.filters.map((filter) => { + const matcher = new minimatch.Minimatch(filter.pattern.glob, FileOperationFeature.asMinimatchOptions(filter.pattern.options)); + if (!matcher.makeRe()) { + throw new Error(`Invalid pattern ${filter.pattern.glob}!`); + } + return { scheme: filter.scheme, matcher, kind: filter.pattern.matches }; + }); + this._filters.set(data.id, minimatchFilter); + } + unregister(id) { + this._filters.delete(id); + if (this._filters.size === 0 && this._listener) { + this._listener.dispose(); + this._listener = undefined; + } + } + clear() { + this._filters.clear(); + if (this._listener) { + this._listener.dispose(); + this._listener = undefined; + } + } + getFileType(uri) { + return FileOperationFeature.getFileType(uri); + } + async filter(event, prop) { + // (Asynchronously) map each file onto a boolean of whether it matches + // any of the globs. + const fileMatches = await Promise.all(event.files.map(async (item) => { + const uri = prop(item); + // Use fsPath to make this consistent with file system watchers but help + // minimatch to use '/' instead of `\\` if present. + const path = uri.fsPath.replace(/\\/g, '/'); + for (const filters of this._filters.values()) { + for (const filter of filters) { + if (filter.scheme !== undefined && filter.scheme !== uri.scheme) { + continue; + } + if (filter.matcher.match(path)) { + // The pattern matches. If kind is undefined then everything is ok + if (filter.kind === undefined) { + return true; + } + const fileType = await this.getFileType(uri); + // If we can't determine the file type than we treat it as a match. + // Dropping it would be another alternative. + if (fileType === undefined) { + this._client.info(`Unable to determine file type for ${uri.toString()}. Treating as a match.`); + return true; + } + if ((fileType === code.FileType.File && filter.kind === proto.FileOperationPatternKind.file) || (fileType === code.FileType.Directory && filter.kind === proto.FileOperationPatternKind.folder)) { + return true; + } + } + else if (filter.kind === proto.FileOperationPatternKind.folder) { + const fileType = await FileOperationFeature.getFileType(uri); + if (fileType === code.FileType.Directory && filter.matcher.match(`${path}/`)) { + return true; + } + } + } + } + return false; + })); + // Filter the files to those that matched. + const files = event.files.filter((_, index) => fileMatches[index]); + return { ...event, files }; + } + static async getFileType(uri) { + try { + return (await code.workspace.fs.stat(uri)).type; + } + catch (e) { + return undefined; + } + } + static asMinimatchOptions(options) { + // The spec doesn't state that dot files don't match. So we make + // matching those the default. + const result = { dot: true }; + if (options?.ignoreCase === true) { + result.nocase = true; + } + return result; + } +} +class NotificationFileOperationFeature extends FileOperationFeature { + _notificationType; + _accessUri; + _createParams; + constructor(client, event, notificationType, clientCapability, serverCapability, accessUri, createParams) { + super(client, event, notificationType, clientCapability, serverCapability); + this._notificationType = notificationType; + this._accessUri = accessUri; + this._createParams = createParams; + } + async send(originalEvent) { + // Create a copy of the event that has the files filtered to match what the + // server wants. + const filteredEvent = await this.filter(originalEvent, this._accessUri); + if (filteredEvent.files.length) { + const next = async (event) => { + return this._client.sendNotification(this._notificationType, this._createParams(event)); + }; + return this.doSend(filteredEvent, next); + } + } +} +class CachingNotificationFileOperationFeature extends NotificationFileOperationFeature { + _willListener; + _fsPathFileTypes = new Map(); + async getFileType(uri) { + const fsPath = uri.fsPath; + if (this._fsPathFileTypes.has(fsPath)) { + return this._fsPathFileTypes.get(fsPath); + } + const type = await FileOperationFeature.getFileType(uri); + if (type) { + this._fsPathFileTypes.set(fsPath, type); + } + return type; + } + async cacheFileTypes(event, prop) { + // Calling filter will force the matching logic to run. For any item + // that requires a getFileType lookup, the overriden getFileType will + // be called that will cache the result so that when onDidRename fires, + // it can still be checked even though the item no longer exists on disk + // in its original location. + await this.filter(event, prop); + } + clearFileTypeCache() { + this._fsPathFileTypes.clear(); + } + unregister(id) { + super.unregister(id); + if (this.filterSize() === 0 && this._willListener) { + this._willListener.dispose(); + this._willListener = undefined; + } + } + clear() { + super.clear(); + if (this._willListener) { + this._willListener.dispose(); + this._willListener = undefined; + } + } +} +class DidCreateFilesFeature extends NotificationFileOperationFeature { + constructor(client) { + super(client, code.workspace.onDidCreateFiles, proto.DidCreateFilesNotification.type, 'didCreate', 'didCreate', (i) => i, client.code2ProtocolConverter.asDidCreateFilesParams); + } + doSend(event, next) { + const middleware = this._client.middleware.workspace; + return middleware?.didCreateFiles + ? middleware.didCreateFiles(event, next) + : next(event); + } +} +exports.DidCreateFilesFeature = DidCreateFilesFeature; +class DidRenameFilesFeature extends CachingNotificationFileOperationFeature { + constructor(client) { + super(client, code.workspace.onDidRenameFiles, proto.DidRenameFilesNotification.type, 'didRename', 'didRename', (i) => i.oldUri, client.code2ProtocolConverter.asDidRenameFilesParams); + } + register(data) { + if (!this._willListener) { + this._willListener = code.workspace.onWillRenameFiles(this.willRename, this); + } + super.register(data); + } + willRename(e) { + e.waitUntil(this.cacheFileTypes(e, (i) => i.oldUri)); + } + doSend(event, next) { + this.clearFileTypeCache(); + const middleware = this._client.middleware.workspace; + return middleware?.didRenameFiles + ? middleware.didRenameFiles(event, next) + : next(event); + } +} +exports.DidRenameFilesFeature = DidRenameFilesFeature; +class DidDeleteFilesFeature extends CachingNotificationFileOperationFeature { + constructor(client) { + super(client, code.workspace.onDidDeleteFiles, proto.DidDeleteFilesNotification.type, 'didDelete', 'didDelete', (i) => i, client.code2ProtocolConverter.asDidDeleteFilesParams); + } + register(data) { + if (!this._willListener) { + this._willListener = code.workspace.onWillDeleteFiles(this.willDelete, this); + } + super.register(data); + } + willDelete(e) { + e.waitUntil(this.cacheFileTypes(e, (i) => i)); + } + doSend(event, next) { + this.clearFileTypeCache(); + const middleware = this._client.middleware.workspace; + return middleware?.didDeleteFiles + ? middleware.didDeleteFiles(event, next) + : next(event); + } +} +exports.DidDeleteFilesFeature = DidDeleteFilesFeature; +class RequestFileOperationFeature extends FileOperationFeature { + _requestType; + _accessUri; + _createParams; + constructor(client, event, requestType, clientCapability, serverCapability, accessUri, createParams) { + super(client, event, requestType, clientCapability, serverCapability); + this._requestType = requestType; + this._accessUri = accessUri; + this._createParams = createParams; + } + async send(originalEvent) { + const waitUntil = this.waitUntil(originalEvent); + originalEvent.waitUntil(waitUntil); + } + async waitUntil(originalEvent) { + // Create a copy of the event that has the files filtered to match what the + // server wants. + const filteredEvent = await this.filter(originalEvent, this._accessUri); + if (filteredEvent.files.length) { + const next = (event) => { + return this._client.sendRequest(this._requestType, this._createParams(event), event.token) + .then(this._client.protocol2CodeConverter.asWorkspaceEdit); + }; + return this.doSend(filteredEvent, next); + } + else { + return undefined; + } + } +} +class WillCreateFilesFeature extends RequestFileOperationFeature { + constructor(client) { + super(client, code.workspace.onWillCreateFiles, proto.WillCreateFilesRequest.type, 'willCreate', 'willCreate', (i) => i, client.code2ProtocolConverter.asWillCreateFilesParams); + } + doSend(event, next) { + const middleware = this._client.middleware.workspace; + return middleware?.willCreateFiles + ? middleware.willCreateFiles(event, next) + : next(event); + } +} +exports.WillCreateFilesFeature = WillCreateFilesFeature; +class WillRenameFilesFeature extends RequestFileOperationFeature { + constructor(client) { + super(client, code.workspace.onWillRenameFiles, proto.WillRenameFilesRequest.type, 'willRename', 'willRename', (i) => i.oldUri, client.code2ProtocolConverter.asWillRenameFilesParams); + } + doSend(event, next) { + const middleware = this._client.middleware.workspace; + return middleware?.willRenameFiles + ? middleware.willRenameFiles(event, next) + : next(event); + } +} +exports.WillRenameFilesFeature = WillRenameFilesFeature; +class WillDeleteFilesFeature extends RequestFileOperationFeature { + constructor(client) { + super(client, code.workspace.onWillDeleteFiles, proto.WillDeleteFilesRequest.type, 'willDelete', 'willDelete', (i) => i, client.code2ProtocolConverter.asWillDeleteFilesParams); + } + doSend(event, next) { + const middleware = this._client.middleware.workspace; + return middleware?.willDeleteFiles + ? middleware.willDeleteFiles(event, next) + : next(event); + } +} +exports.WillDeleteFilesFeature = WillDeleteFilesFeature; + + +}, +"./node_modules/vscode-languageclient/lib/common/fileSystemWatcher.js"(__unused_rspack_module, exports, __webpack_require__) { +var __rspack_unused_export; + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +__rspack_unused_export = ({ value: true }); +exports.FileSystemWatcherFeature = void 0; +const vscode_1 = __webpack_require__("vscode"); +const vscode_languageserver_protocol_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js"); +const features_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/features.js"); +class FileSystemWatcherFeature { + _client; + _notifyFileEvent; + _watchers; + constructor(client, notifyFileEvent) { + this._client = client; + this._notifyFileEvent = notifyFileEvent; + this._watchers = new Map(); + } + getState() { + return { kind: 'workspace', id: this.registrationType.method, registrations: this._watchers.size > 0 }; + } + get registrationType() { + return vscode_languageserver_protocol_1.DidChangeWatchedFilesNotification.type; + } + fillClientCapabilities(capabilities) { + (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'workspace'), 'didChangeWatchedFiles').dynamicRegistration = true; + (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'workspace'), 'didChangeWatchedFiles').relativePatternSupport = true; + } + initialize(_capabilities, _documentSelector) { + } + register(data) { + if (!Array.isArray(data.registerOptions.watchers)) { + return; + } + const disposables = []; + for (const watcher of data.registerOptions.watchers) { + const globPattern = this._client.protocol2CodeConverter.asGlobPattern(watcher.globPattern); + if (globPattern === undefined) { + continue; + } + let watchCreate = true, watchChange = true, watchDelete = true; + if (watcher.kind !== undefined && watcher.kind !== null) { + watchCreate = (watcher.kind & vscode_languageserver_protocol_1.WatchKind.Create) !== 0; + watchChange = (watcher.kind & vscode_languageserver_protocol_1.WatchKind.Change) !== 0; + watchDelete = (watcher.kind & vscode_languageserver_protocol_1.WatchKind.Delete) !== 0; + } + const fileSystemWatcher = vscode_1.workspace.createFileSystemWatcher(globPattern, !watchCreate, !watchChange, !watchDelete); + this.hookListeners(fileSystemWatcher, watchCreate, watchChange, watchDelete, disposables); + disposables.push(fileSystemWatcher); + } + this._watchers.set(data.id, disposables); + } + registerRaw(id, fileSystemWatchers) { + const disposables = []; + for (const fileSystemWatcher of fileSystemWatchers) { + this.hookListeners(fileSystemWatcher, true, true, true, disposables); + } + this._watchers.set(id, disposables); + } + hookListeners(fileSystemWatcher, watchCreate, watchChange, watchDelete, listeners) { + if (watchCreate) { + fileSystemWatcher.onDidCreate((resource) => this._notifyFileEvent({ + uri: this._client.code2ProtocolConverter.asUri(resource), + type: vscode_languageserver_protocol_1.FileChangeType.Created + }), null, listeners); + } + if (watchChange) { + fileSystemWatcher.onDidChange((resource) => this._notifyFileEvent({ + uri: this._client.code2ProtocolConverter.asUri(resource), + type: vscode_languageserver_protocol_1.FileChangeType.Changed + }), null, listeners); + } + if (watchDelete) { + fileSystemWatcher.onDidDelete((resource) => this._notifyFileEvent({ + uri: this._client.code2ProtocolConverter.asUri(resource), + type: vscode_languageserver_protocol_1.FileChangeType.Deleted + }), null, listeners); + } + } + unregister(id) { + const disposables = this._watchers.get(id); + if (disposables) { + this._watchers.delete(id); + for (const disposable of disposables) { + disposable.dispose(); + } + } + } + clear() { + this._watchers.forEach((disposables) => { + for (const disposable of disposables) { + disposable.dispose(); + } + }); + this._watchers.clear(); + } +} +exports.FileSystemWatcherFeature = FileSystemWatcherFeature; + + +}, +"./node_modules/vscode-languageclient/lib/common/foldingRange.js"(__unused_rspack_module, exports, __webpack_require__) { +var __rspack_unused_export; + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +__rspack_unused_export = ({ value: true }); +exports.FoldingRangeFeature = void 0; +const vscode_1 = __webpack_require__("vscode"); +const vscode_languageserver_protocol_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js"); +const features_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/features.js"); +class FoldingRangeFeature extends features_1.TextDocumentLanguageFeature { + constructor(client) { + super(client, vscode_languageserver_protocol_1.FoldingRangeRequest.type); + } + fillClientCapabilities(capabilities) { + const capability = (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'textDocument'), 'foldingRange'); + capability.dynamicRegistration = true; + capability.rangeLimit = 5000; + capability.lineFoldingOnly = true; + capability.foldingRangeKind = { valueSet: [vscode_languageserver_protocol_1.FoldingRangeKind.Comment, vscode_languageserver_protocol_1.FoldingRangeKind.Imports, vscode_languageserver_protocol_1.FoldingRangeKind.Region] }; + capability.foldingRange = { collapsedText: false }; + (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'workspace'), 'foldingRange').refreshSupport = true; + } + initialize(capabilities, documentSelector) { + this._client.onRequest(vscode_languageserver_protocol_1.FoldingRangeRefreshRequest.type, async () => { + for (const provider of this.getAllProviders()) { + provider.onDidChangeFoldingRange.fire(); + } + }); + const [id, options] = this.getRegistration(documentSelector, capabilities.foldingRangeProvider); + if (!id || !options) { + return; + } + this.register({ id: id, registerOptions: options }); + } + registerLanguageProvider(options) { + const selector = options.documentSelector; + const eventEmitter = new vscode_1.EventEmitter(); + const provider = { + onDidChangeFoldingRanges: eventEmitter.event, + provideFoldingRanges: (document, context, token) => { + const client = this._client; + const provideFoldingRanges = (document, _, token) => { + const requestParams = { + textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(document) + }; + return client.sendRequest(vscode_languageserver_protocol_1.FoldingRangeRequest.type, requestParams, token).then((result) => { + if (token.isCancellationRequested) { + return null; + } + return client.protocol2CodeConverter.asFoldingRanges(result, token); + }, (error) => { + return client.handleFailedRequest(vscode_languageserver_protocol_1.FoldingRangeRequest.type, token, error, null); + }); + }; + const middleware = client.middleware; + return middleware.provideFoldingRanges + ? middleware.provideFoldingRanges(document, context, token, provideFoldingRanges) + : provideFoldingRanges(document, context, token); + } + }; + return [vscode_1.languages.registerFoldingRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(selector), provider), { provider: provider, onDidChangeFoldingRange: eventEmitter }]; + } +} +exports.FoldingRangeFeature = FoldingRangeFeature; + + +}, +"./node_modules/vscode-languageclient/lib/common/formatting.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DocumentOnTypeFormattingFeature = exports.DocumentRangeFormattingFeature = exports.DocumentFormattingFeature = void 0; +const vscode_1 = __webpack_require__("vscode"); +const vscode_languageserver_protocol_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js"); +const UUID = __importStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/utils/uuid.js")); +const features_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/features.js"); +var FileFormattingOptions; +(function (FileFormattingOptions) { + function fromConfiguration(document) { + const filesConfig = vscode_1.workspace.getConfiguration('files', document); + return { + trimTrailingWhitespace: filesConfig.get('trimTrailingWhitespace'), + trimFinalNewlines: filesConfig.get('trimFinalNewlines'), + insertFinalNewline: filesConfig.get('insertFinalNewline'), + }; + } + FileFormattingOptions.fromConfiguration = fromConfiguration; +})(FileFormattingOptions || (FileFormattingOptions = {})); +class DocumentFormattingFeature extends features_1.TextDocumentLanguageFeature { + constructor(client) { + super(client, vscode_languageserver_protocol_1.DocumentFormattingRequest.type); + } + fillClientCapabilities(capabilities) { + (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'textDocument'), 'formatting').dynamicRegistration = true; + } + initialize(capabilities, documentSelector) { + const options = this.getRegistrationOptions(documentSelector, capabilities.documentFormattingProvider); + if (!options) { + return; + } + this.register({ id: UUID.generateUuid(), registerOptions: options }); + } + registerLanguageProvider(options) { + const selector = options.documentSelector; + const provider = { + provideDocumentFormattingEdits: (document, options, token) => { + const client = this._client; + const provideDocumentFormattingEdits = (document, options, token) => { + const params = { + textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(document), + options: client.code2ProtocolConverter.asFormattingOptions(options, FileFormattingOptions.fromConfiguration(document)) + }; + return client.sendRequest(vscode_languageserver_protocol_1.DocumentFormattingRequest.type, params, token).then((result) => { + if (token.isCancellationRequested) { + return null; + } + return client.protocol2CodeConverter.asTextEdits(result, token); + }, (error) => { + return client.handleFailedRequest(vscode_languageserver_protocol_1.DocumentFormattingRequest.type, token, error, null); + }); + }; + const middleware = client.middleware; + return middleware.provideDocumentFormattingEdits + ? middleware.provideDocumentFormattingEdits(document, options, token, provideDocumentFormattingEdits) + : provideDocumentFormattingEdits(document, options, token); + } + }; + return [vscode_1.languages.registerDocumentFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(selector), provider), provider]; + } +} +exports.DocumentFormattingFeature = DocumentFormattingFeature; +class DocumentRangeFormattingFeature extends features_1.TextDocumentLanguageFeature { + constructor(client) { + super(client, vscode_languageserver_protocol_1.DocumentRangeFormattingRequest.type); + } + fillClientCapabilities(capabilities) { + const capability = (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'textDocument'), 'rangeFormatting'); + capability.dynamicRegistration = true; + capability.rangesSupport = true; + } + initialize(capabilities, documentSelector) { + const options = this.getRegistrationOptions(documentSelector, capabilities.documentRangeFormattingProvider); + if (!options) { + return; + } + this.register({ id: UUID.generateUuid(), registerOptions: options }); + } + registerLanguageProvider(options) { + const selector = options.documentSelector; + const provider = { + provideDocumentRangeFormattingEdits: (document, range, options, token) => { + const client = this._client; + const provideDocumentRangeFormattingEdits = (document, range, options, token) => { + const params = { + textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(document), + range: client.code2ProtocolConverter.asRange(range), + options: client.code2ProtocolConverter.asFormattingOptions(options, FileFormattingOptions.fromConfiguration(document)) + }; + return client.sendRequest(vscode_languageserver_protocol_1.DocumentRangeFormattingRequest.type, params, token).then((result) => { + if (token.isCancellationRequested) { + return null; + } + return client.protocol2CodeConverter.asTextEdits(result, token); + }, (error) => { + return client.handleFailedRequest(vscode_languageserver_protocol_1.DocumentRangeFormattingRequest.type, token, error, null); + }); + }; + const middleware = client.middleware; + return middleware.provideDocumentRangeFormattingEdits + ? middleware.provideDocumentRangeFormattingEdits(document, range, options, token, provideDocumentRangeFormattingEdits) + : provideDocumentRangeFormattingEdits(document, range, options, token); + } + }; + if (options.rangesSupport) { + provider.provideDocumentRangesFormattingEdits = (document, ranges, options, token) => { + const client = this._client; + const provideDocumentRangesFormattingEdits = (document, ranges, options, token) => { + const params = { + textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(document), + ranges: client.code2ProtocolConverter.asRanges(ranges), + options: client.code2ProtocolConverter.asFormattingOptions(options, FileFormattingOptions.fromConfiguration(document)) + }; + return client.sendRequest(vscode_languageserver_protocol_1.DocumentRangesFormattingRequest.type, params, token).then((result) => { + if (token.isCancellationRequested) { + return null; + } + return client.protocol2CodeConverter.asTextEdits(result, token); + }, (error) => { + return client.handleFailedRequest(vscode_languageserver_protocol_1.DocumentRangesFormattingRequest.type, token, error, null); + }); + }; + const middleware = client.middleware; + return middleware.provideDocumentRangesFormattingEdits + ? middleware.provideDocumentRangesFormattingEdits(document, ranges, options, token, provideDocumentRangesFormattingEdits) + : provideDocumentRangesFormattingEdits(document, ranges, options, token); + }; + } + return [vscode_1.languages.registerDocumentRangeFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(selector), provider), provider]; + } +} +exports.DocumentRangeFormattingFeature = DocumentRangeFormattingFeature; +class DocumentOnTypeFormattingFeature extends features_1.TextDocumentLanguageFeature { + constructor(client) { + super(client, vscode_languageserver_protocol_1.DocumentOnTypeFormattingRequest.type); + } + fillClientCapabilities(capabilities) { + (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'textDocument'), 'onTypeFormatting').dynamicRegistration = true; + } + initialize(capabilities, documentSelector) { + const options = this.getRegistrationOptions(documentSelector, capabilities.documentOnTypeFormattingProvider); + if (!options) { + return; + } + this.register({ id: UUID.generateUuid(), registerOptions: options }); + } + registerLanguageProvider(options) { + const selector = options.documentSelector; + const provider = { + provideOnTypeFormattingEdits: (document, position, ch, options, token) => { + const client = this._client; + const provideOnTypeFormattingEdits = (document, position, ch, options, token) => { + const params = { + textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(document), + position: client.code2ProtocolConverter.asPosition(position), + ch: ch, + options: client.code2ProtocolConverter.asFormattingOptions(options, FileFormattingOptions.fromConfiguration(document)) + }; + return client.sendRequest(vscode_languageserver_protocol_1.DocumentOnTypeFormattingRequest.type, params, token).then((result) => { + if (token.isCancellationRequested) { + return null; + } + return client.protocol2CodeConverter.asTextEdits(result, token); + }, (error) => { + return client.handleFailedRequest(vscode_languageserver_protocol_1.DocumentOnTypeFormattingRequest.type, token, error, null); + }); + }; + const middleware = client.middleware; + return middleware.provideOnTypeFormattingEdits + ? middleware.provideOnTypeFormattingEdits(document, position, ch, options, token, provideOnTypeFormattingEdits) + : provideOnTypeFormattingEdits(document, position, ch, options, token); + } + }; + const moreTriggerCharacter = options.moreTriggerCharacter || []; + return [vscode_1.languages.registerOnTypeFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(selector), provider, options.firstTriggerCharacter, ...moreTriggerCharacter), provider]; + } +} +exports.DocumentOnTypeFormattingFeature = DocumentOnTypeFormattingFeature; + + +}, +"./node_modules/vscode-languageclient/lib/common/hover.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.HoverFeature = void 0; +const vscode_1 = __webpack_require__("vscode"); +const vscode_languageserver_protocol_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js"); +const features_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/features.js"); +const UUID = __importStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/utils/uuid.js")); +class HoverFeature extends features_1.TextDocumentLanguageFeature { + constructor(client) { + super(client, vscode_languageserver_protocol_1.HoverRequest.type); + } + fillClientCapabilities(capabilities) { + const hoverCapability = ((0, features_1.ensure)((0, features_1.ensure)(capabilities, 'textDocument'), 'hover')); + hoverCapability.dynamicRegistration = true; + hoverCapability.contentFormat = [vscode_languageserver_protocol_1.MarkupKind.Markdown, vscode_languageserver_protocol_1.MarkupKind.PlainText]; + } + initialize(capabilities, documentSelector) { + const options = this.getRegistrationOptions(documentSelector, capabilities.hoverProvider); + if (!options) { + return; + } + this.register({ + id: UUID.generateUuid(), + registerOptions: options + }); + } + registerLanguageProvider(options) { + const selector = options.documentSelector; + const provider = { + provideHover: (document, position, token) => { + const client = this._client; + const provideHover = (document, position, token) => { + return client.sendRequest(vscode_languageserver_protocol_1.HoverRequest.type, client.code2ProtocolConverter.asTextDocumentPositionParams(document, position), token).then((result) => { + if (token.isCancellationRequested) { + return null; + } + return client.protocol2CodeConverter.asHover(result); + }, (error) => { + return client.handleFailedRequest(vscode_languageserver_protocol_1.HoverRequest.type, token, error, null); + }); + }; + const middleware = client.middleware; + return middleware.provideHover + ? middleware.provideHover(document, position, token, provideHover) + : provideHover(document, position, token); + } + }; + return [this.registerProvider(selector, provider), provider]; + } + registerProvider(selector, provider) { + return vscode_1.languages.registerHoverProvider(this._client.protocol2CodeConverter.asDocumentSelector(selector), provider); + } +} +exports.HoverFeature = HoverFeature; + + +}, +"./node_modules/vscode-languageclient/lib/common/implementation.js"(__unused_rspack_module, exports, __webpack_require__) { +var __rspack_unused_export; + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +__rspack_unused_export = ({ value: true }); +exports.ImplementationFeature = void 0; +const vscode_1 = __webpack_require__("vscode"); +const vscode_languageserver_protocol_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js"); +const features_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/features.js"); +class ImplementationFeature extends features_1.TextDocumentLanguageFeature { + constructor(client) { + super(client, vscode_languageserver_protocol_1.ImplementationRequest.type); + } + fillClientCapabilities(capabilities) { + const implementationSupport = (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'textDocument'), 'implementation'); + implementationSupport.dynamicRegistration = true; + implementationSupport.linkSupport = true; + } + initialize(capabilities, documentSelector) { + const [id, options] = this.getRegistration(documentSelector, capabilities.implementationProvider); + if (!id || !options) { + return; + } + this.register({ id: id, registerOptions: options }); + } + registerLanguageProvider(options) { + const selector = options.documentSelector; + const provider = { + provideImplementation: (document, position, token) => { + const client = this._client; + const provideImplementation = (document, position, token) => { + return client.sendRequest(vscode_languageserver_protocol_1.ImplementationRequest.type, client.code2ProtocolConverter.asTextDocumentPositionParams(document, position), token).then((result) => { + if (token.isCancellationRequested) { + return null; + } + return client.protocol2CodeConverter.asDefinitionResult(result, token); + }, (error) => { + return client.handleFailedRequest(vscode_languageserver_protocol_1.ImplementationRequest.type, token, error, null); + }); + }; + const middleware = client.middleware; + return middleware.provideImplementation + ? middleware.provideImplementation(document, position, token, provideImplementation) + : provideImplementation(document, position, token); + } + }; + return [this.registerProvider(selector, provider), provider]; + } + registerProvider(selector, provider) { + return vscode_1.languages.registerImplementationProvider(this._client.protocol2CodeConverter.asDocumentSelector(selector), provider); + } +} +exports.ImplementationFeature = ImplementationFeature; + + +}, +"./node_modules/vscode-languageclient/lib/common/inlayHint.js"(__unused_rspack_module, exports, __webpack_require__) { +var __rspack_unused_export; + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +__rspack_unused_export = ({ value: true }); +exports.InlayHintsFeature = void 0; +const vscode_1 = __webpack_require__("vscode"); +const vscode_languageserver_protocol_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js"); +const features_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/features.js"); +class InlayHintsFeature extends features_1.TextDocumentLanguageFeature { + constructor(client) { + super(client, vscode_languageserver_protocol_1.InlayHintRequest.type); + } + fillClientCapabilities(capabilities) { + const inlayHint = (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'textDocument'), 'inlayHint'); + inlayHint.dynamicRegistration = true; + inlayHint.resolveSupport = { + properties: ['tooltip', 'textEdits', 'label.tooltip', 'label.location', 'label.command'] + }; + (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'workspace'), 'inlayHint').refreshSupport = true; + } + initialize(capabilities, documentSelector) { + this._client.onRequest(vscode_languageserver_protocol_1.InlayHintRefreshRequest.type, async () => { + for (const provider of this.getAllProviders()) { + provider.onDidChangeInlayHints.fire(); + } + }); + const [id, options] = this.getRegistration(documentSelector, capabilities.inlayHintProvider); + if (!id || !options) { + return; + } + this.register({ id: id, registerOptions: options }); + } + registerLanguageProvider(options) { + const selector = options.documentSelector; + const eventEmitter = new vscode_1.EventEmitter(); + const provider = { + onDidChangeInlayHints: eventEmitter.event, + provideInlayHints: (document, viewPort, token) => { + const client = this._client; + const provideInlayHints = async (document, viewPort, token) => { + const requestParams = { + textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(document), + range: client.code2ProtocolConverter.asRange(viewPort) + }; + try { + const values = await client.sendRequest(vscode_languageserver_protocol_1.InlayHintRequest.type, requestParams, token); + if (token.isCancellationRequested) { + return null; + } + return client.protocol2CodeConverter.asInlayHints(values, token); + } + catch (error) { + return client.handleFailedRequest(vscode_languageserver_protocol_1.InlayHintRequest.type, token, error, null); + } + }; + const middleware = client.middleware; + return middleware.provideInlayHints + ? middleware.provideInlayHints(document, viewPort, token, provideInlayHints) + : provideInlayHints(document, viewPort, token); + } + }; + provider.resolveInlayHint = options.resolveProvider === true + ? (hint, token) => { + const client = this._client; + const resolveInlayHint = async (item, token) => { + try { + const value = await client.sendRequest(vscode_languageserver_protocol_1.InlayHintResolveRequest.type, client.code2ProtocolConverter.asInlayHint(item), token); + if (token.isCancellationRequested) { + return null; + } + const result = client.protocol2CodeConverter.asInlayHint(value, token); + return token.isCancellationRequested ? null : result; + } + catch (error) { + return client.handleFailedRequest(vscode_languageserver_protocol_1.InlayHintResolveRequest.type, token, error, null); + } + }; + const middleware = client.middleware; + return middleware.resolveInlayHint + ? middleware.resolveInlayHint(hint, token, resolveInlayHint) + : resolveInlayHint(hint, token); + } + : undefined; + return [this.registerProvider(selector, provider), { provider: provider, onDidChangeInlayHints: eventEmitter }]; + } + registerProvider(selector, provider) { + return vscode_1.languages.registerInlayHintsProvider(this._client.protocol2CodeConverter.asDocumentSelector(selector), provider); + } +} +exports.InlayHintsFeature = InlayHintsFeature; + + +}, +"./node_modules/vscode-languageclient/lib/common/inlineCompletion.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.InlineCompletionItemFeature = void 0; +const vscode_1 = __webpack_require__("vscode"); +const vscode_languageserver_protocol_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js"); +const features_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/features.js"); +const UUID = __importStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/utils/uuid.js")); +class InlineCompletionItemFeature extends features_1.TextDocumentLanguageFeature { + constructor(client) { + super(client, vscode_languageserver_protocol_1.InlineCompletionRequest.type); + } + fillClientCapabilities(capabilities) { + const inlineCompletion = (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'textDocument'), 'inlineCompletion'); + inlineCompletion.dynamicRegistration = true; + } + initialize(capabilities, documentSelector) { + const options = this.getRegistrationOptions(documentSelector, capabilities.inlineCompletionProvider); + if (!options) { + return; + } + this.register({ + id: UUID.generateUuid(), + registerOptions: options + }); + } + registerLanguageProvider(options) { + const selector = options.documentSelector; + const provider = { + provideInlineCompletionItems: (document, position, context, token) => { + const client = this._client; + const middleware = this._client.middleware; + const provideInlineCompletionItems = (document, position, context, token) => { + return client.sendRequest(vscode_languageserver_protocol_1.InlineCompletionRequest.type, client.code2ProtocolConverter.asInlineCompletionParams(document, position, context), token).then((result) => { + if (token.isCancellationRequested) { + return null; + } + return client.protocol2CodeConverter.asInlineCompletionResult(result, token); + }, (error) => { + return client.handleFailedRequest(vscode_languageserver_protocol_1.InlineCompletionRequest.type, token, error, null); + }); + }; + return middleware.provideInlineCompletionItems + ? middleware.provideInlineCompletionItems(document, position, context, token, provideInlineCompletionItems) + : provideInlineCompletionItems(document, position, context, token); + } + }; + return [vscode_1.languages.registerInlineCompletionItemProvider(this._client.protocol2CodeConverter.asDocumentSelector(selector), provider), provider]; + } +} +exports.InlineCompletionItemFeature = InlineCompletionItemFeature; + + +}, +"./node_modules/vscode-languageclient/lib/common/inlineValue.js"(__unused_rspack_module, exports, __webpack_require__) { +var __rspack_unused_export; + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +__rspack_unused_export = ({ value: true }); +exports.InlineValueFeature = void 0; +const vscode_1 = __webpack_require__("vscode"); +const vscode_languageserver_protocol_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js"); +const features_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/features.js"); +class InlineValueFeature extends features_1.TextDocumentLanguageFeature { + constructor(client) { + super(client, vscode_languageserver_protocol_1.InlineValueRequest.type); + } + fillClientCapabilities(capabilities) { + (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'textDocument'), 'inlineValue').dynamicRegistration = true; + (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'workspace'), 'inlineValue').refreshSupport = true; + } + initialize(capabilities, documentSelector) { + this._client.onRequest(vscode_languageserver_protocol_1.InlineValueRefreshRequest.type, async () => { + for (const provider of this.getAllProviders()) { + provider.onDidChangeInlineValues.fire(); + } + }); + const [id, options] = this.getRegistration(documentSelector, capabilities.inlineValueProvider); + if (!id || !options) { + return; + } + this.register({ id: id, registerOptions: options }); + } + registerLanguageProvider(options) { + const selector = options.documentSelector; + const eventEmitter = new vscode_1.EventEmitter(); + const provider = { + onDidChangeInlineValues: eventEmitter.event, + provideInlineValues: (document, viewPort, context, token) => { + const client = this._client; + const provideInlineValues = (document, viewPort, context, token) => { + const requestParams = { + textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(document), + range: client.code2ProtocolConverter.asRange(viewPort), + context: client.code2ProtocolConverter.asInlineValueContext(context) + }; + return client.sendRequest(vscode_languageserver_protocol_1.InlineValueRequest.type, requestParams, token).then((values) => { + if (token.isCancellationRequested) { + return null; + } + return client.protocol2CodeConverter.asInlineValues(values, token); + }, (error) => { + return client.handleFailedRequest(vscode_languageserver_protocol_1.InlineValueRequest.type, token, error, null); + }); + }; + const middleware = client.middleware; + return middleware.provideInlineValues + ? middleware.provideInlineValues(document, viewPort, context, token, provideInlineValues) + : provideInlineValues(document, viewPort, context, token); + } + }; + return [this.registerProvider(selector, provider), { provider: provider, onDidChangeInlineValues: eventEmitter }]; + } + registerProvider(selector, provider) { + return vscode_1.languages.registerInlineValuesProvider(this._client.protocol2CodeConverter.asDocumentSelector(selector), provider); + } +} +exports.InlineValueFeature = InlineValueFeature; + + +}, +"./node_modules/vscode-languageclient/lib/common/linkedEditingRange.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.LinkedEditingFeature = void 0; +const code = __importStar(__webpack_require__("vscode")); +const proto = __importStar(__webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js")); +const features_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/features.js"); +class LinkedEditingFeature extends features_1.TextDocumentLanguageFeature { + constructor(client) { + super(client, proto.LinkedEditingRangeRequest.type); + } + fillClientCapabilities(capabilities) { + const linkedEditingSupport = (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'textDocument'), 'linkedEditingRange'); + linkedEditingSupport.dynamicRegistration = true; + } + initialize(capabilities, documentSelector) { + const [id, options] = this.getRegistration(documentSelector, capabilities.linkedEditingRangeProvider); + if (!id || !options) { + return; + } + this.register({ id: id, registerOptions: options }); + } + registerLanguageProvider(options) { + const selector = options.documentSelector; + const provider = { + provideLinkedEditingRanges: (document, position, token) => { + const client = this._client; + const provideLinkedEditing = (document, position, token) => { + return client.sendRequest(proto.LinkedEditingRangeRequest.type, client.code2ProtocolConverter.asTextDocumentPositionParams(document, position), token).then((result) => { + if (token.isCancellationRequested) { + return null; + } + return client.protocol2CodeConverter.asLinkedEditingRanges(result, token); + }, (error) => { + return client.handleFailedRequest(proto.LinkedEditingRangeRequest.type, token, error, null); + }); + }; + const middleware = client.middleware; + return middleware.provideLinkedEditingRange + ? middleware.provideLinkedEditingRange(document, position, token, provideLinkedEditing) + : provideLinkedEditing(document, position, token); + } + }; + return [this.registerProvider(selector, provider), provider]; + } + registerProvider(selector, provider) { + return code.languages.registerLinkedEditingRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(selector), provider); + } +} +exports.LinkedEditingFeature = LinkedEditingFeature; + + +}, +"./node_modules/vscode-languageclient/lib/common/notebook.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NotebookDocumentSyncFeature = void 0; +const vscode = __importStar(__webpack_require__("vscode")); +const proto = __importStar(__webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js")); +const UUID = __importStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/utils/uuid.js")); +const Is = __importStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/utils/is.js")); +const globPattern_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/utils/globPattern.js"); +function ensure(target, key) { + if (target[key] === void 0) { + target[key] = {}; + } + return target[key]; +} +var Converter; +(function (Converter) { + let c2p; + (function (c2p) { + function asVersionedNotebookDocumentIdentifier(notebookDocument, base) { + return { + version: notebookDocument.version, + uri: base.asUri(notebookDocument.uri) + }; + } + c2p.asVersionedNotebookDocumentIdentifier = asVersionedNotebookDocumentIdentifier; + function asNotebookDocument(notebookDocument, cells, base) { + const result = proto.NotebookDocument.create(base.asUri(notebookDocument.uri), notebookDocument.notebookType, notebookDocument.version, asNotebookCells(cells, base)); + if (Object.keys(notebookDocument.metadata).length > 0) { + result.metadata = asMetadata(notebookDocument.metadata); + } + return result; + } + c2p.asNotebookDocument = asNotebookDocument; + function asNotebookCells(cells, base) { + return cells.map(cell => asNotebookCell(cell, base)); + } + c2p.asNotebookCells = asNotebookCells; + function asMetadata(metadata) { + const seen = new Set(); + return deepCopy(seen, metadata); + } + c2p.asMetadata = asMetadata; + function asNotebookCell(cell, base) { + const result = proto.NotebookCell.create(asNotebookCellKind(cell.kind), base.asUri(cell.document.uri)); + if (Object.keys(cell.metadata).length > 0) { + result.metadata = asMetadata(cell.metadata); + } + if (cell.executionSummary !== undefined && (Is.number(cell.executionSummary.executionOrder) && Is.boolean(cell.executionSummary.success))) { + result.executionSummary = { + executionOrder: cell.executionSummary.executionOrder, + success: cell.executionSummary.success + }; + } + return result; + } + c2p.asNotebookCell = asNotebookCell; + function asNotebookCellKind(kind) { + switch (kind) { + case vscode.NotebookCellKind.Markup: + return proto.NotebookCellKind.Markup; + case vscode.NotebookCellKind.Code: + return proto.NotebookCellKind.Code; + } + } + function deepCopy(seen, value) { + if (seen.has(value)) { + throw new Error(`Can't deep copy cyclic structures.`); + } + if (Array.isArray(value)) { + const result = []; + for (const elem of value) { + if (elem !== null && typeof elem === 'object' || Array.isArray(elem)) { + result.push(deepCopy(seen, elem)); + } + else { + if (elem instanceof RegExp) { + throw new Error(`Can't transfer regular expressions to the server`); + } + result.push(elem); + } + } + return result; + } + else { + const props = Object.keys(value); + const result = Object.create(null); + for (const prop of props) { + const elem = value[prop]; + if (elem !== null && typeof elem === 'object' || Array.isArray(elem)) { + result[prop] = deepCopy(seen, elem); + } + else { + if (elem instanceof RegExp) { + throw new Error(`Can't transfer regular expressions to the server`); + } + result[prop] = elem; + } + } + return result; + } + } + function asTextContentChange(event, base) { + const params = base.asChangeTextDocumentParams(event, event.document.uri, event.document.version); + return { document: params.textDocument, changes: params.contentChanges }; + } + c2p.asTextContentChange = asTextContentChange; + function asNotebookDocumentChangeEvent(event, base) { + const result = Object.create(null); + if (event.metadata) { + result.metadata = Converter.c2p.asMetadata(event.metadata); + } + if (event.cells !== undefined) { + const cells = Object.create(null); + const changedCells = event.cells; + if (changedCells.structure) { + cells.structure = { + array: { + start: changedCells.structure.array.start, + deleteCount: changedCells.structure.array.deleteCount, + cells: changedCells.structure.array.cells !== undefined ? changedCells.structure.array.cells.map(cell => Converter.c2p.asNotebookCell(cell, base)) : undefined + }, + didOpen: changedCells.structure.didOpen !== undefined + ? changedCells.structure.didOpen.map(cell => base.asOpenTextDocumentParams(cell.document).textDocument) + : undefined, + didClose: changedCells.structure.didClose !== undefined + ? changedCells.structure.didClose.map(cell => base.asCloseTextDocumentParams(cell.document).textDocument) + : undefined + }; + } + if (changedCells.data !== undefined) { + cells.data = changedCells.data.map(cell => Converter.c2p.asNotebookCell(cell, base)); + } + if (changedCells.textContent !== undefined) { + cells.textContent = changedCells.textContent.map(event => Converter.c2p.asTextContentChange(event, base)); + } + if (Object.keys(cells).length > 0) { + result.cells = cells; + } + } + return result; + } + c2p.asNotebookDocumentChangeEvent = asNotebookDocumentChangeEvent; + })(c2p = Converter.c2p || (Converter.c2p = {})); +})(Converter || (Converter = {})); +var $NotebookCell; +(function ($NotebookCell) { + function computeDiff(originalCells, modifiedCells, compareMetadata) { + const originalLength = originalCells.length; + const modifiedLength = modifiedCells.length; + let startIndex = 0; + while (startIndex < modifiedLength && startIndex < originalLength && equals(originalCells[startIndex], modifiedCells[startIndex], compareMetadata)) { + startIndex++; + } + if (startIndex < modifiedLength && startIndex < originalLength) { + let originalEndIndex = originalLength - 1; + let modifiedEndIndex = modifiedLength - 1; + while (originalEndIndex >= 0 && modifiedEndIndex >= 0 && equals(originalCells[originalEndIndex], modifiedCells[modifiedEndIndex], compareMetadata)) { + originalEndIndex--; + modifiedEndIndex--; + } + const deleteCount = (originalEndIndex + 1) - startIndex; + const newCells = startIndex === modifiedEndIndex + 1 ? undefined : modifiedCells.slice(startIndex, modifiedEndIndex + 1); + return newCells !== undefined ? { start: startIndex, deleteCount, cells: newCells } : { start: startIndex, deleteCount }; + } + else if (startIndex < modifiedLength) { + return { start: startIndex, deleteCount: 0, cells: modifiedCells.slice(startIndex) }; + } + else if (startIndex < originalLength) { + return { start: startIndex, deleteCount: originalLength - startIndex }; + } + else { + // The two arrays are the same. + return undefined; + } + } + $NotebookCell.computeDiff = computeDiff; + /** + * We only sync kind, document, execution and metadata to the server. So we only need to compare those. + */ + function equals(one, other, compareMetaData = true) { + if (one.kind !== other.kind || one.document.uri.toString() !== other.document.uri.toString() || one.document.languageId !== other.document.languageId || + !equalsExecution(one.executionSummary, other.executionSummary)) { + return false; + } + return !compareMetaData || (compareMetaData && equalsMetadata(one.metadata, other.metadata)); + } + function equalsExecution(one, other) { + if (one === other) { + return true; + } + if (one === undefined || other === undefined) { + return false; + } + return one.executionOrder === other.executionOrder && one.success === other.success && equalsTiming(one.timing, other.timing); + } + function equalsTiming(one, other) { + if (one === other) { + return true; + } + if (one === undefined || other === undefined) { + return false; + } + return one.startTime === other.startTime && one.endTime === other.endTime; + } + function equalsMetadata(one, other) { + if (one === other) { + return true; + } + if (one === null || one === undefined || other === null || other === undefined) { + return false; + } + if (typeof one !== typeof other) { + return false; + } + if (typeof one !== 'object') { + return false; + } + const oneArray = Array.isArray(one); + const otherArray = Array.isArray(other); + if (oneArray !== otherArray) { + return false; + } + if (oneArray && otherArray) { + if (one.length !== other.length) { + return false; + } + for (let i = 0; i < one.length; i++) { + if (!equalsMetadata(one[i], other[i])) { + return false; + } + } + } + if (isObjectLiteral(one) && isObjectLiteral(other)) { + const oneKeys = Object.keys(one); + const otherKeys = Object.keys(other); + if (oneKeys.length !== otherKeys.length) { + return false; + } + oneKeys.sort(); + otherKeys.sort(); + if (!equalsMetadata(oneKeys, otherKeys)) { + return false; + } + for (let i = 0; i < oneKeys.length; i++) { + const prop = oneKeys[i]; + if (!equalsMetadata(one[prop], other[prop])) { + return false; + } + } + return true; + } + return false; + } + function isObjectLiteral(value) { + return value !== null && typeof value === 'object'; + } + $NotebookCell.isObjectLiteral = isObjectLiteral; +})($NotebookCell || ($NotebookCell = {})); +var $NotebookDocumentFilter; +(function ($NotebookDocumentFilter) { + function matchNotebook(filter, notebookDocument) { + if (typeof filter === 'string') { + return filter === '*' || notebookDocument.notebookType === filter; + } + if (filter.notebookType !== undefined && filter.notebookType !== '*' && notebookDocument.notebookType !== filter.notebookType) { + return false; + } + const uri = notebookDocument.uri; + if (filter.scheme !== undefined && filter.scheme !== '*' && uri.scheme !== filter.scheme) { + return false; + } + if (filter.pattern !== undefined) { + if (!(0, globPattern_1.matchGlobPattern)(filter.pattern, uri)) { + return false; + } + } + return true; + } + $NotebookDocumentFilter.matchNotebook = matchNotebook; +})($NotebookDocumentFilter || ($NotebookDocumentFilter = {})); +var $NotebookDocumentSyncOptions; +(function ($NotebookDocumentSyncOptions) { + function asDocumentSelector(options) { + const selector = options.notebookSelector; + const result = []; + for (const element of selector) { + const notebookType = (typeof element.notebook === 'string' ? element.notebook : element.notebook?.notebookType) ?? '*'; + const scheme = (typeof element.notebook === 'string') ? undefined : element.notebook?.scheme; + const pattern = (typeof element.notebook === 'string') ? undefined : element.notebook?.pattern; + if (element.cells !== undefined) { + for (const cell of element.cells) { + result.push(asDocumentFilter(notebookType, scheme, pattern, cell.language)); + } + } + else { + result.push(asDocumentFilter(notebookType, scheme, pattern, undefined)); + } + } + return result; + } + $NotebookDocumentSyncOptions.asDocumentSelector = asDocumentSelector; + function asDocumentFilter(notebookType, scheme, pattern, language) { + return scheme === undefined && pattern === undefined + ? { notebook: notebookType, language } + : { notebook: { notebookType, scheme, pattern }, language }; + } +})($NotebookDocumentSyncOptions || ($NotebookDocumentSyncOptions = {})); +var SyncInfo; +(function (SyncInfo) { + function create(cells) { + return { + cells, + uris: new Set(cells.map(cell => cell.document.uri.toString())) + }; + } + SyncInfo.create = create; +})(SyncInfo || (SyncInfo = {})); +class NotebookDocumentSyncFeatureProvider { + client; + options; + notebookSyncInfo; + notebookDidOpen; + disposables; + selector; + onChangeNotificationSent; + onOpenNotificationSent; + onCloseNotificationSent; + onSaveNotificationSent; + constructor(client, options, onChangeNotificationSent, onOpenNotificationSent, onCloseNotificationSent, onSaveNotificationSent) { + this.client = client; + this.options = options; + this.notebookSyncInfo = new Map(); + this.notebookDidOpen = new Set(); + this.disposables = []; + this.selector = client.protocol2CodeConverter.asDocumentSelector($NotebookDocumentSyncOptions.asDocumentSelector(options)); + this.onChangeNotificationSent = onChangeNotificationSent; + this.onOpenNotificationSent = onOpenNotificationSent; + this.onCloseNotificationSent = onCloseNotificationSent; + this.onSaveNotificationSent = onSaveNotificationSent; + // open + vscode.workspace.onDidOpenNotebookDocument((notebookDocument) => { + this.notebookDidOpen.add(notebookDocument.uri.toString()); + this.didOpen(notebookDocument); + }, undefined, this.disposables); + for (const notebookDocument of vscode.workspace.notebookDocuments) { + this.notebookDidOpen.add(notebookDocument.uri.toString()); + this.didOpen(notebookDocument); + } + // Notebook document changed. + vscode.workspace.onDidChangeNotebookDocument(event => this.didChangeNotebookDocument(event), undefined, this.disposables); + //save + if (this.options.save === true) { + vscode.workspace.onDidSaveNotebookDocument(notebookDocument => this.didSave(notebookDocument), undefined, this.disposables); + } + // close + vscode.workspace.onDidCloseNotebookDocument((notebookDocument) => { + this.didClose(notebookDocument); + this.notebookDidOpen.delete(notebookDocument.uri.toString()); + }, undefined, this.disposables); + } + getState() { + for (const notebook of vscode.workspace.notebookDocuments) { + const matchingCells = this.getMatchingCellsConsideringSyncInfo(notebook); + if (matchingCells !== undefined) { + return { kind: 'document', id: '$internal', registrations: true, matches: true }; + } + } + return { kind: 'document', id: '$internal', registrations: true, matches: false }; + } + get mode() { + return 'notebook'; + } + handles(textDocument) { + if (vscode.languages.match(this.selector, textDocument) > 0) { + return true; + } + // Work around for https://github.com/microsoft/vscode/issues/202163 + const key = textDocument.uri.toString(); + for (const syncInfo of this.notebookSyncInfo.values()) { + if (syncInfo.uris.has(key)) { + return true; + } + } + return false; + } + didOpenNotebookCellTextDocument(notebookDocument, cell) { + if (vscode.languages.match(this.selector, cell.document) === 0) { + return; + } + if (!this.notebookDidOpen.has(notebookDocument.uri.toString())) { + // We have never received an open notification for the notebook document. + // VS Code guarantees that we first get cell document open and then + // notebook open. So simply wait for the notebook open. + return; + } + const syncInfo = this.getSyncInfo(notebookDocument); + // In VS Code we receive a notebook open before a cell document open. + // The document and the cell is synced. + const cellMatches = this.cellMatches(notebookDocument, cell); + if (syncInfo !== undefined) { + const cellIsSynced = syncInfo.uris.has(cell.document.uri.toString()); + if ((cellMatches && cellIsSynced) || (!cellMatches && !cellIsSynced)) { + // The cell doesn't match and was not synced or it matches and is synced. + // In both cases nothing to do. + // + // Note that if the language mode of a document changes we remove the + // cell and add it back to update the language mode on the server side. + return; + } + if (cellMatches) { + // don't use cells from above since there might be more matching cells in the notebook + // Since we had a matching cell above we will have matching cells now. + const matchingCells = this.mergeCells(notebookDocument, syncInfo, [cell]); + if (matchingCells !== undefined) { + const event = this.asNotebookDocumentChangeEvent(notebookDocument, undefined, syncInfo, matchingCells); + if (event !== undefined) { + this.doSendChange(event, matchingCells).catch(() => { }); + } + } + } + } + else { + // No sync info. But we have a open event for the notebook document + // itself. If the cell matches then we need to send an open with + // exactly that cell. + if (cellMatches) { + this.doSendOpen(notebookDocument, [cell]).catch(() => { }); + } + } + } + didChangeNotebookCellTextDocument(notebookDocument, cell, event) { + // No match with the selector + if (vscode.languages.match(this.selector, event.document) === 0) { + return; + } + const syncInfo = this.getSyncInfo(notebookDocument); + // Notebook got never synced. So it doesn't matter if a cell document changes. + if (syncInfo === undefined || !syncInfo.uris.has(cell.document.uri.toString())) { + return; + } + this.doSendChange({ + notebook: notebookDocument, + cells: { textContent: [event] } + }, syncInfo.cells).catch(() => { }); + } + didCloseNotebookCellTextDocument(notebookDocument, cell) { + const syncInfo = this.getSyncInfo(notebookDocument); + if (syncInfo === undefined) { + // The notebook document got never synced. So it doesn't matter if a cell + // document closes. + return; + } + const cellUri = cell.document.uri; + const index = syncInfo.cells.findIndex((item) => item.document.uri.toString() === cellUri.toString()); + if (index === -1) { + // The cell never got synced or it got deleted and we now received the document + // close event. + return; + } + if (index === 0 && syncInfo.cells.length === 1) { + // The last cell. Close the notebook document in the server. + this.doSendClose(notebookDocument, syncInfo.cells).catch(() => { }); + } + else { + const newCells = syncInfo.cells.slice(); + const deleted = newCells.splice(index, 1); + this.doSendChange({ + notebook: notebookDocument, + cells: { + structure: { + array: { start: index, deleteCount: 1 }, + didClose: deleted + } + } + }, newCells).catch(() => { }); + } + } + dispose() { + for (const disposable of this.disposables) { + disposable.dispose(); + } + } + didOpen(notebookDocument, matchingCells, syncInfo = this.getSyncInfo(notebookDocument)) { + if (syncInfo !== undefined) { + if (matchingCells === undefined) { + matchingCells = syncInfo.cells.slice(); + } + if (matchingCells !== undefined) { + const event = this.asNotebookDocumentChangeEvent(notebookDocument, undefined, syncInfo, matchingCells); + if (event !== undefined) { + this.doSendChange(event, matchingCells).catch(() => { }); + } + } + else { + this.doSendClose(notebookDocument, []).catch(() => { }); + } + } + else { + matchingCells = this.getMatchingCells(notebookDocument); + // Check if we need to sync the notebook document. + if (matchingCells === undefined) { + return; + } + this.doSendOpen(notebookDocument, matchingCells).catch(() => { }); + } + } + didChangeNotebookDocument(event) { + const notebookDocument = event.notebook; + const syncInfo = this.getSyncInfo(notebookDocument); + if (syncInfo === undefined) { + // We have no changes to the cells. Since the notebook wasn't synced + // it will not be synced now. + if (event.contentChanges.length === 0) { + return; + } + // Check if we have new matching cells. + const cells = this.getMatchingCells(notebookDocument); + // No matching cells and the notebook never synced. So still no need + // to sync it. + if (cells === undefined) { + return; + } + // Open the notebook document and ignore the rest of the changes + // this the notebooks will be synced with the correct settings. + this.didOpen(notebookDocument, cells, syncInfo); + } + else { + // The notebook is synced. First check if we have no matching + // cells anymore and if so close the notebook + const cells = this.getMatchingCellsFromEvent(notebookDocument, syncInfo, event); + if (cells === undefined) { + this.didClose(notebookDocument, syncInfo); + return; + } + const newEvent = this.asNotebookDocumentChangeEvent(event.notebook, event, syncInfo, cells); + if (newEvent !== undefined) { + this.doSendChange(newEvent, cells).catch(() => { }); + } + } + } + didSave(notebookDocument) { + const syncInfo = this.getSyncInfo(notebookDocument); + if (syncInfo === undefined) { + return; + } + this.doSendSave(notebookDocument).catch(() => { }); + } + didClose(notebookDocument, syncInfo = this.getSyncInfo(notebookDocument)) { + if (syncInfo === undefined) { + return; + } + const syncedCells = notebookDocument.getCells().filter(cell => syncInfo.uris.has(cell.document.uri.toString())); + this.doSendClose(notebookDocument, syncedCells).catch(() => { }); + } + async sendDidOpenNotebookDocument(notebookDocument) { + const syncInfo = this.getSyncInfo(notebookDocument); + if (syncInfo !== undefined) { + throw new Error(`Notebook document ${notebookDocument.uri.toString()} is already open`); + } + const cells = this.getMatchingCells(notebookDocument); + if (cells === undefined) { + return; + } + return this.doSendOpen(notebookDocument, cells); + } + async doSendOpen(notebookDocument, cells) { + const send = async (notebookDocument, cells) => { + const cellDocuments = cells.map(cell => this.client.code2ProtocolConverter.asTextDocumentItem(cell.document)); + try { + await this.client.sendNotification(proto.DidOpenNotebookDocumentNotification.type, { + notebookDocument: Converter.c2p.asNotebookDocument(notebookDocument, cells, this.client.code2ProtocolConverter), + cellTextDocuments: cellDocuments + }); + this.onOpenNotificationSent.fire(notebookDocument); + } + catch (error) { + this.client.error('Sending DidOpenNotebookDocumentNotification failed', error); + throw error; + } + }; + const middleware = this.client.middleware?.notebooks; + this.notebookSyncInfo.set(notebookDocument.uri.toString(), SyncInfo.create(cells)); + return middleware?.didOpen !== undefined ? middleware.didOpen(notebookDocument, cells, send) : send(notebookDocument, cells); + } + async sendDidChangeNotebookDocument(event) { + const cells = this.getMatchingCellsFromSyncInfo(event.notebook); + if (cells === undefined) { + throw new Error(`Received changed event for un-synced notebook ${event.notebook.uri.toString()}`); + } + return this.doSendChange(event, cells); + } + async doSendChange(event, cells) { + const send = async (event) => { + try { + await this.client.sendNotification(proto.DidChangeNotebookDocumentNotification.type, { + notebookDocument: Converter.c2p.asVersionedNotebookDocumentIdentifier(event.notebook, this.client.code2ProtocolConverter), + change: Converter.c2p.asNotebookDocumentChangeEvent(event, this.client.code2ProtocolConverter) + }); + this.onChangeNotificationSent.fire(event); + } + catch (error) { + this.client.error('Sending DidChangeNotebookDocumentNotification failed', error); + throw error; + } + }; + const middleware = this.client.middleware?.notebooks; + if (event.cells?.structure !== undefined) { + this.notebookSyncInfo.set(event.notebook.uri.toString(), SyncInfo.create(cells)); + } + return middleware?.didChange !== undefined ? middleware?.didChange(event, send) : send(event); + } + async sendDidSaveNotebookDocument(notebookDocument) { + return this.doSendSave(notebookDocument); + } + async doSendSave(notebookDocument) { + const send = async (notebookDocument) => { + try { + await this.client.sendNotification(proto.DidSaveNotebookDocumentNotification.type, { + notebookDocument: { uri: this.client.code2ProtocolConverter.asUri(notebookDocument.uri) } + }); + this.onSaveNotificationSent.fire(notebookDocument); + } + catch (error) { + this.client.error('Sending DidSaveNotebookDocumentNotification failed', error); + throw error; + } + }; + const middleware = this.client.middleware?.notebooks; + return middleware?.didSave !== undefined ? middleware.didSave(notebookDocument, send) : send(notebookDocument); + } + async sendDidCloseNotebookDocument(notebookDocument) { + const cells = this.getMatchingCellsFromSyncInfo(notebookDocument); + if (cells === undefined) { + throw new Error(`Received close event for un-synced notebook ${notebookDocument.uri.toString()}`); + } + return this.doSendClose(notebookDocument, cells); + } + async doSendClose(notebookDocument, cells) { + const send = async (notebookDocument, cells) => { + try { + await this.client.sendNotification(proto.DidCloseNotebookDocumentNotification.type, { + notebookDocument: { uri: this.client.code2ProtocolConverter.asUri(notebookDocument.uri) }, + cellTextDocuments: cells.map(cell => this.client.code2ProtocolConverter.asTextDocumentIdentifier(cell.document)) + }); + this.onCloseNotificationSent.fire(notebookDocument); + } + catch (error) { + this.client.error('Sending DidCloseNotebookDocumentNotification failed', error); + throw error; + } + }; + const middleware = this.client.middleware?.notebooks; + this.notebookSyncInfo.delete(notebookDocument.uri.toString()); + return middleware?.didClose !== undefined ? middleware.didClose(notebookDocument, cells, send) : send(notebookDocument, cells); + } + getSynchronizedCells(notebookDocument) { + const syncInfo = this.getSyncInfo(notebookDocument); + return syncInfo?.cells; + } + asNotebookDocumentChangeEvent(notebook, event, syncInfo, matchingCells) { + if (event !== undefined && event.notebook !== notebook) { + throw new Error('Notebook must be identical'); + } + const result = { + notebook: notebook + }; + if (event?.metadata !== undefined) { + result.metadata = Converter.c2p.asMetadata(event.metadata); + } + let matchingCellsSet; + if (event?.cellChanges !== undefined && event.cellChanges.length > 0) { + const data = []; + // Only consider the new matching cells. + matchingCellsSet = new Set(matchingCells.map(cell => cell.document.uri.toString())); + for (const cellChange of event.cellChanges) { + if (matchingCellsSet.has(cellChange.cell.document.uri.toString()) && (cellChange.executionSummary !== undefined || cellChange.metadata !== undefined)) { + data.push(cellChange.cell); + } + } + if (data.length > 0) { + result.cells = result.cells ?? {}; + result.cells.data = data; + } + } + if (((event?.contentChanges !== undefined && event.contentChanges.length > 0) || event === undefined) && syncInfo !== undefined && matchingCells !== undefined) { + // We still have matching cells. Check if the cell changes + // affect the notebook on the server side. + const oldCells = syncInfo.cells; + const newCells = matchingCells; + // meta data changes are reported using on the cell itself. So we can ignore comparing + // it which has a positive effect on performance. + const diff = $NotebookCell.computeDiff(oldCells, newCells, false); + let addedCells; + let removedCells; + if (diff !== undefined) { + addedCells = diff.cells === undefined + ? new Map() + : new Map(diff.cells.map(cell => [cell.document.uri.toString(), cell])); + removedCells = diff.deleteCount === 0 + ? new Map() + : new Map(oldCells.slice(diff.start, diff.start + diff.deleteCount).map(cell => [cell.document.uri.toString(), cell])); + // Remove the onces that got deleted and inserted again. + for (const key of Array.from(removedCells.keys())) { + if (addedCells.has(key)) { + removedCells.delete(key); + addedCells.delete(key); + } + } + result.cells = result.cells ?? {}; + const didOpen = []; + const didClose = []; + if (addedCells.size > 0 || removedCells.size > 0) { + for (const cell of addedCells.values()) { + didOpen.push(cell); + } + for (const cell of removedCells.values()) { + didClose.push(cell); + } + } + result.cells.structure = { + array: diff, + didOpen, + didClose + }; + } + } + // The notebook is a property as well. + return Object.keys(result).length > 1 ? result : undefined; + } + getMatchingCells(notebookDocument, cells = notebookDocument.getCells()) { + if (this.options.notebookSelector === undefined) { + return undefined; + } + for (const item of this.options.notebookSelector) { + if (item.notebook === undefined || $NotebookDocumentFilter.matchNotebook(item.notebook, notebookDocument)) { + const filtered = this.filterCells(notebookDocument, cells, item.cells); + return filtered.length === 0 ? undefined : filtered; + } + } + return undefined; + } + getMatchingCellsFromEvent(notebookDocument, syncInfo, event) { + if (this.options.notebookSelector === undefined) { + return undefined; + } + let selector; + for (const item of this.options.notebookSelector) { + if (item.notebook === undefined || $NotebookDocumentFilter.matchNotebook(item.notebook, notebookDocument)) { + selector = item; + break; + } + } + if (selector === undefined) { + return undefined; + } + if ((event.cellChanges === undefined || event.cellChanges.length === 0) && (event.contentChanges === undefined || event.contentChanges.length === 0)) { + return syncInfo.cells; + } + let cells; + if (event.cellChanges !== undefined && event.cellChanges.length > 0) { + const changedCells = event.cellChanges.map(item => item.cell); + const filtered = this.filterCells(notebookDocument, changedCells, selector.cells); + if (filtered.length !== changedCells.length) { + cells = new Set(syncInfo.uris); + for (const cell of changedCells) { + cells.delete(cell.document.uri.toString()); + } + for (const cell of filtered) { + cells.add(cell.document.uri.toString()); + } + } + } + if (event.contentChanges !== undefined && event.contentChanges.length > 0) { + if (cells === undefined) { + cells = new Set(syncInfo.uris); + } + for (const item of event.contentChanges) { + for (const cell of item.removedCells) { + cells.delete(cell.document.uri.toString()); + } + const filtered = this.filterCells(notebookDocument, new Array(...item.addedCells), selector.cells); + for (const cell of filtered) { + cells.add(cell.document.uri.toString()); + } + } + } + if (cells === undefined) { + return syncInfo.cells; + } + // Only return the cells that are still in the set, but keep the order + // as present in the current notebook. + const result = []; + const current = notebookDocument.getCells(); + for (const cell of current) { + if (cells.has(cell.document.uri.toString())) { + result.push(cell); + } + } + return result; + } + getMatchingCellsFromSyncInfo(notebook) { + const syncInfo = this.getSyncInfo(notebook); + return syncInfo !== undefined ? syncInfo.cells : undefined; + } + getMatchingCellsConsideringSyncInfo(notebook) { + const syncInfo = this.getSyncInfo(notebook); + return syncInfo !== undefined ? syncInfo.cells : this.getMatchingCells(notebook); + } + mergeCells(notebookDocument, syncInfo, cells) { + const result = []; + const merged = new Set(syncInfo.uris); + for (const cell of cells) { + merged.add(cell.document.uri.toString()); + } + // Keep the cell order of the current notebook. + for (const cell of notebookDocument.getCells()) { + if (merged.has(cell.document.uri.toString())) { + result.push(cell); + } + } + return result; + } + cellMatches(notebookDocument, cell) { + const cells = this.getMatchingCells(notebookDocument, [cell]); + return cells !== undefined && cells[0] === cell; + } + filterCells(notebookDocument, cells, cellSelector) { + const filtered = cellSelector !== undefined ? cells.filter((cell) => { + const cellLanguage = cell.document.languageId; + return cellSelector.some((filter => (filter.language === '*' || cellLanguage === filter.language))); + }) : cells; + return typeof this.client.clientOptions.notebookDocumentOptions?.filterCells === 'function' + ? this.client.clientOptions.notebookDocumentOptions.filterCells(notebookDocument, filtered) + : filtered; + } + getSyncInfo(notebook) { + return this.notebookSyncInfo.get(notebook.uri.toString()); + } +} +class NotebookDocumentSyncFeature { + static CellScheme = 'vscode-notebook-cell'; + client; + registrations; + dedicatedChannel; + _onChangeNotificationSent; + _onOpenNotificationSent; + _onCloseNotificationSent; + _onSaveNotificationSent; + constructor(client) { + this.client = client; + this.registrations = new Map(); + this.registrationType = proto.NotebookDocumentSyncRegistrationType.type; + this._onChangeNotificationSent = new vscode.EventEmitter(); + this._onOpenNotificationSent = new vscode.EventEmitter(); + this._onCloseNotificationSent = new vscode.EventEmitter(); + this._onSaveNotificationSent = new vscode.EventEmitter(); + // We don't receive an event for cells where the document changes its language mode + // Since we allow servers to filter on the language mode we fire such an event ourselves. + vscode.workspace.onDidOpenTextDocument((textDocument) => { + if (textDocument.uri.scheme !== NotebookDocumentSyncFeature.CellScheme) { + return; + } + const [notebookDocument, notebookCell] = this.findNotebookDocumentAndCell(textDocument); + if (notebookDocument === undefined || notebookCell === undefined) { + return; + } + for (const provider of this.registrations.values()) { + if (provider instanceof NotebookDocumentSyncFeatureProvider) { + provider.didOpenNotebookCellTextDocument(notebookDocument, notebookCell); + } + } + }); + vscode.workspace.onDidChangeTextDocument((event) => { + if (event.contentChanges.length === 0) { + return; + } + const textDocument = event.document; + if (textDocument.uri.scheme !== NotebookDocumentSyncFeature.CellScheme) { + return; + } + const [notebookDocument, cell] = this.findNotebookDocumentAndCell(textDocument); + if (notebookDocument === undefined || cell === undefined) { + return; + } + for (const provider of this.registrations.values()) { + if (provider instanceof NotebookDocumentSyncFeatureProvider) { + provider.didChangeNotebookCellTextDocument(notebookDocument, cell, event); + } + } + }); + vscode.workspace.onDidCloseTextDocument((textDocument) => { + if (textDocument.uri.scheme !== NotebookDocumentSyncFeature.CellScheme) { + return; + } + // There are two cases when we receive a close for a text document + // 1: the cell got removed. This is handled in `onDidChangeNotebookCells` + // 2: the language mode of a cell changed. This keeps the URI stable so + // we will still find the cell and the notebook document. + const [notebookDocument, notebookCell] = this.findNotebookDocumentAndCell(textDocument); + if (notebookDocument === undefined || notebookCell === undefined) { + return; + } + for (const provider of this.registrations.values()) { + if (provider instanceof NotebookDocumentSyncFeatureProvider) { + provider.didCloseNotebookCellTextDocument(notebookDocument, notebookCell); + } + } + }); + } + getState() { + if (this.registrations.size === 0) { + return { kind: 'document', id: this.registrationType.method, registrations: false, matches: false }; + } + for (const provider of this.registrations.values()) { + const state = provider.getState(); + if (state.kind === 'document' && state.registrations === true && state.matches === true) { + return { kind: 'document', id: this.registrationType.method, registrations: true, matches: true }; + } + } + return { kind: 'document', id: this.registrationType.method, registrations: true, matches: false }; + } + registrationType; + get onOpenNotificationSent() { + return this._onOpenNotificationSent.event; + } + get onChangeNotificationSent() { + return this._onChangeNotificationSent.event; + } + get onCloseNotificationSent() { + return this._onCloseNotificationSent.event; + } + get onSaveNotificationSent() { + return this._onSaveNotificationSent.event; + } + fillClientCapabilities(capabilities) { + const synchronization = ensure(ensure(capabilities, 'notebookDocument'), 'synchronization'); + synchronization.dynamicRegistration = true; + synchronization.executionSummarySupport = true; + } + preInitialize(capabilities) { + const options = capabilities.notebookDocumentSync; + if (options === undefined) { + return; + } + this.dedicatedChannel = this.client.protocol2CodeConverter.asDocumentSelector($NotebookDocumentSyncOptions.asDocumentSelector(options)); + } + initialize(capabilities) { + const options = capabilities.notebookDocumentSync; + if (options === undefined) { + return; + } + const id = options.id ?? UUID.generateUuid(); + this.register({ id, registerOptions: options }); + } + register(data) { + const provider = new NotebookDocumentSyncFeatureProvider(this.client, data.registerOptions, this._onChangeNotificationSent, this._onOpenNotificationSent, this._onCloseNotificationSent, this._onSaveNotificationSent); + this.registrations.set(data.id, provider); + } + unregister(id) { + const provider = this.registrations.get(id); + if (provider !== undefined) { + this.registrations.delete(id); + provider.dispose(); + } + } + clear() { + for (const provider of this.registrations.values()) { + provider.dispose(); + } + this.registrations.clear(); + this._onChangeNotificationSent.dispose(); + this._onChangeNotificationSent = new vscode.EventEmitter(); + this._onOpenNotificationSent.dispose(); + this._onOpenNotificationSent = new vscode.EventEmitter(); + this._onCloseNotificationSent.dispose(); + this._onCloseNotificationSent = new vscode.EventEmitter(); + this._onSaveNotificationSent.dispose(); + this._onSaveNotificationSent = new vscode.EventEmitter(); + } + handles(textDocument) { + if (textDocument.uri.scheme !== NotebookDocumentSyncFeature.CellScheme) { + return false; + } + if (this.dedicatedChannel !== undefined && vscode.languages.match(this.dedicatedChannel, textDocument) > 0) { + return true; + } + for (const provider of this.registrations.values()) { + if (provider.handles(textDocument)) { + return true; + } + } + return false; + } + getProvider(notebookCell) { + for (const provider of this.registrations.values()) { + if (provider.handles(notebookCell.document)) { + return provider; + } + } + return undefined; + } + findNotebookDocumentAndCell(textDocument) { + const uri = textDocument.uri.toString(); + for (const notebookDocument of vscode.workspace.notebookDocuments) { + for (const cell of notebookDocument.getCells()) { + if (cell.document.uri.toString() === uri) { + return [notebookDocument, cell]; + } + } + } + return [undefined, undefined]; + } +} +exports.NotebookDocumentSyncFeature = NotebookDocumentSyncFeature; + + +}, +"./node_modules/vscode-languageclient/lib/common/progress.js"(__unused_rspack_module, exports, __webpack_require__) { +var __rspack_unused_export; + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +__rspack_unused_export = ({ value: true }); +exports.ProgressFeature = void 0; +const vscode_languageserver_protocol_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js"); +const progressPart_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/progressPart.js"); +function ensure(target, key) { + if (target[key] === void 0) { + target[key] = Object.create(null); + } + return target[key]; +} +class ProgressFeature { + _client; + activeParts; + constructor(_client) { + this._client = _client; + this.activeParts = new Set(); + } + getState() { + return { kind: 'window', id: vscode_languageserver_protocol_1.WorkDoneProgressCreateRequest.method, registrations: this.activeParts.size > 0 }; + } + fillClientCapabilities(capabilities) { + ensure(capabilities, 'window').workDoneProgress = true; + } + initialize() { + const client = this._client; + const deleteHandler = (part) => { + this.activeParts.delete(part); + }; + const createHandler = (params) => { + this.activeParts.add(new progressPart_1.ProgressPart(this._client, params.token, deleteHandler)); + }; + client.onRequest(vscode_languageserver_protocol_1.WorkDoneProgressCreateRequest.type, createHandler); + } + clear() { + for (const part of this.activeParts) { + part.done(); + } + this.activeParts.clear(); + } +} +exports.ProgressFeature = ProgressFeature; + + +}, +"./node_modules/vscode-languageclient/lib/common/progressPart.js"(__unused_rspack_module, exports, __webpack_require__) { + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ProgressPart = void 0; +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +const vscode_1 = __webpack_require__("vscode"); +const vscode_languageserver_protocol_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js"); +const Is = __importStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/utils/is.js")); +class ProgressPart { + _client; + _token; + _infinite; + _reported; + // listener for LSP progress messages. Set in constructor. + _lspProgressDisposable; + // VS Code progress state. Set in Window.withProgress callback. + _progress; + _cancellationToken; + _tokenDisposable; + _resolve; + _reject; + constructor(_client, _token, done) { + this._client = _client; + this._token = _token; + this._reported = 0; + this._infinite = false; + this._lspProgressDisposable = this._client.onProgress(vscode_languageserver_protocol_1.WorkDoneProgress.type, this._token, (value) => { + switch (value.kind) { + case 'begin': + this.begin(value); + break; + case 'report': + this.report(value); + break; + case 'end': + this.done(); + done && done(this); + break; + } + }); + } + begin(params) { + this._infinite = params.percentage === undefined; + // the progress as already been marked as done / canceled. Ignore begin call + if (this._lspProgressDisposable === undefined) { + return; + } + // Since we don't use commands this will be a silent window progress with a hidden notification. + void vscode_1.window.withProgress({ location: vscode_1.ProgressLocation.Window, cancellable: params.cancellable, title: params.title }, async (progress, cancellationToken) => { + // the progress as already been marked as done / canceled. Ignore begin call + if (this._lspProgressDisposable === undefined) { + return; + } + this._progress = progress; + this._cancellationToken = cancellationToken; + this._tokenDisposable = this._cancellationToken.onCancellationRequested(() => { + this._client.sendNotification(vscode_languageserver_protocol_1.WorkDoneProgressCancelNotification.type, { token: this._token }); + }); + this.report(params); + return new Promise((resolve, reject) => { + this._resolve = resolve; + this._reject = reject; + }); + }); + } + report(params) { + if (this._infinite && Is.string(params.message)) { + this._progress !== undefined && this._progress.report({ message: params.message }); + } + else if (Is.number(params.percentage)) { + const percentage = Math.max(0, Math.min(params.percentage, 100)); + const delta = Math.max(0, percentage - this._reported); + this._reported += delta; + this._progress !== undefined && this._progress.report({ message: params.message, increment: delta }); + } + } + cancel() { + this.cleanup(); + if (this._reject !== undefined) { + this._reject(); + this._resolve = undefined; + this._reject = undefined; + } + } + done() { + this.cleanup(); + if (this._resolve !== undefined) { + this._resolve(); + this._resolve = undefined; + this._reject = undefined; + } + } + cleanup() { + if (this._lspProgressDisposable !== undefined) { + this._lspProgressDisposable.dispose(); + this._lspProgressDisposable = undefined; + } + if (this._tokenDisposable !== undefined) { + this._tokenDisposable.dispose(); + this._tokenDisposable = undefined; + } + this._progress = undefined; + this._cancellationToken = undefined; + } +} +exports.ProgressPart = ProgressPart; + + +}, +"./node_modules/vscode-languageclient/lib/common/protocolCallHierarchyItem.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +const code = __importStar(__webpack_require__("vscode")); +class ProtocolCallHierarchyItem extends code.CallHierarchyItem { + data; + constructor(kind, name, detail, uri, range, selectionRange, data) { + super(kind, name, detail, uri, range, selectionRange); + if (data !== undefined) { + this.data = data; + } + } +} +exports["default"] = ProtocolCallHierarchyItem; + + +}, +"./node_modules/vscode-languageclient/lib/common/protocolCodeAction.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +const vscode = __importStar(__webpack_require__("vscode")); +class ProtocolCodeAction extends vscode.CodeAction { + data; + constructor(title, data) { + super(title); + this.data = data; + } +} +exports["default"] = ProtocolCodeAction; + + +}, +"./node_modules/vscode-languageclient/lib/common/protocolCodeLens.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +const code = __importStar(__webpack_require__("vscode")); +class ProtocolCodeLens extends code.CodeLens { + data; + constructor(range) { + super(range); + } +} +exports["default"] = ProtocolCodeLens; + + +}, +"./node_modules/vscode-languageclient/lib/common/protocolCompletionItem.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +const code = __importStar(__webpack_require__("vscode")); +class ProtocolCompletionItem extends code.CompletionItem { + data; + fromEdit; + documentationFormat; + originalItemKind; + deprecated; + insertTextMode; + constructor(label) { + super(label); + } +} +exports["default"] = ProtocolCompletionItem; + + +}, +"./node_modules/vscode-languageclient/lib/common/protocolConverter.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +/// +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createConverter = createConverter; +const code = __importStar(__webpack_require__("vscode")); +const ls = __importStar(__webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js")); +const Is = __importStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/utils/is.js")); +const async = __importStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/utils/async.js")); +const protocolCompletionItem_1 = __importDefault(__webpack_require__("./node_modules/vscode-languageclient/lib/common/protocolCompletionItem.js")); +const protocolCodeLens_1 = __importDefault(__webpack_require__("./node_modules/vscode-languageclient/lib/common/protocolCodeLens.js")); +const protocolDocumentLink_1 = __importDefault(__webpack_require__("./node_modules/vscode-languageclient/lib/common/protocolDocumentLink.js")); +const protocolCodeAction_1 = __importDefault(__webpack_require__("./node_modules/vscode-languageclient/lib/common/protocolCodeAction.js")); +const protocolDiagnostic_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/protocolDiagnostic.js"); +const protocolCallHierarchyItem_1 = __importDefault(__webpack_require__("./node_modules/vscode-languageclient/lib/common/protocolCallHierarchyItem.js")); +const protocolTypeHierarchyItem_1 = __importDefault(__webpack_require__("./node_modules/vscode-languageclient/lib/common/protocolTypeHierarchyItem.js")); +const protocolWorkspaceSymbol_1 = __importDefault(__webpack_require__("./node_modules/vscode-languageclient/lib/common/protocolWorkspaceSymbol.js")); +const protocolInlayHint_1 = __importDefault(__webpack_require__("./node_modules/vscode-languageclient/lib/common/protocolInlayHint.js")); +const vscode_languageserver_protocol_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js"); +var CodeBlock; +(function (CodeBlock) { + function is(value) { + const candidate = value; + return candidate && Is.string(candidate.language) && Is.string(candidate.value); + } + CodeBlock.is = is; +})(CodeBlock || (CodeBlock = {})); +function createConverter(uriConverter, trustMarkdown, supportHtml, supportThemeIcons) { + const nullConverter = (value) => code.Uri.parse(value); + const _uriConverter = uriConverter || nullConverter; + function asUri(value) { + return _uriConverter(value); + } + function asDocumentSelector(selector) { + const result = []; + for (const filter of selector) { + if (typeof filter === 'string') { + result.push(filter); + } + else if (vscode_languageserver_protocol_1.NotebookCellTextDocumentFilter.is(filter)) { + // We first need to check for the notebook cell filter since a TextDocumentFilter would + // match both (e.g. the notebook is optional). + if (typeof filter.notebook === 'string') { + result.push({ notebookType: filter.notebook, language: filter.language }); + } + else { + const notebookType = filter.notebook.notebookType ?? '*'; + result.push({ notebookType: notebookType, scheme: filter.notebook.scheme, pattern: asGlobPattern(filter.notebook.pattern), language: filter.language }); + } + } + else if (vscode_languageserver_protocol_1.TextDocumentFilter.is(filter)) { + result.push({ language: filter.language, scheme: filter.scheme, pattern: asGlobPattern(filter.pattern) }); + } + } + return result; + } + async function asDiagnostics(diagnostics, token) { + return async.map(diagnostics, asDiagnostic, token); + } + function asDiagnosticsSync(diagnostics) { + const result = new Array(diagnostics.length); + for (let i = 0; i < diagnostics.length; i++) { + result[i] = asDiagnostic(diagnostics[i]); + } + return result; + } + function asDiagnostic(diagnostic) { + const message = typeof diagnostic.message === 'string' + ? diagnostic.message + : diagnostic.message.kind === 'plaintext' + ? diagnostic.message.value + : 'Received a markup diagnostic message but the client does not support it.'; + const result = new protocolDiagnostic_1.ProtocolDiagnostic(asRange(diagnostic.range), message, asDiagnosticSeverity(diagnostic.severity), diagnostic.data); + if (diagnostic.code !== undefined) { + if (typeof diagnostic.code === 'string' || typeof diagnostic.code === 'number') { + if (ls.CodeDescription.is(diagnostic.codeDescription)) { + result.code = { + value: diagnostic.code, + target: asUri(diagnostic.codeDescription.href) + }; + } + else { + result.code = diagnostic.code; + } + } + else if (protocolDiagnostic_1.DiagnosticCode.is(diagnostic.code)) { + // This is for backwards compatibility of a proposed API. + // We should remove this at some point. + result.hasDiagnosticCode = true; + const diagnosticCode = diagnostic.code; + result.code = { + value: diagnosticCode.value, + target: asUri(diagnosticCode.target) + }; + } + } + if (diagnostic.source) { + result.source = diagnostic.source; + } + if (diagnostic.relatedInformation) { + result.relatedInformation = asRelatedInformation(diagnostic.relatedInformation); + } + if (Array.isArray(diagnostic.tags)) { + result.tags = asDiagnosticTags(diagnostic.tags); + } + return result; + } + function asRelatedInformation(relatedInformation) { + const result = new Array(relatedInformation.length); + for (let i = 0; i < relatedInformation.length; i++) { + const info = relatedInformation[i]; + result[i] = new code.DiagnosticRelatedInformation(asLocation(info.location), info.message); + } + return result; + } + function asDiagnosticTags(tags) { + if (!tags) { + return undefined; + } + const result = []; + for (const tag of tags) { + const converted = asDiagnosticTag(tag); + if (converted !== undefined) { + result.push(converted); + } + } + return result.length > 0 ? result : undefined; + } + function asDiagnosticTag(tag) { + switch (tag) { + case ls.DiagnosticTag.Unnecessary: + return code.DiagnosticTag.Unnecessary; + case ls.DiagnosticTag.Deprecated: + return code.DiagnosticTag.Deprecated; + default: + return undefined; + } + } + function asPosition(value) { + return value ? new code.Position(value.line, value.character) : undefined; + } + function asRange(value) { + return value ? new code.Range(value.start.line, value.start.character, value.end.line, value.end.character) : undefined; + } + async function asRanges(items, token) { + return async.map(items, (range) => { + return new code.Range(range.start.line, range.start.character, range.end.line, range.end.character); + }, token); + } + function asDiagnosticSeverity(value) { + if (value === undefined || value === null) { + return code.DiagnosticSeverity.Error; + } + switch (value) { + case ls.DiagnosticSeverity.Error: + return code.DiagnosticSeverity.Error; + case ls.DiagnosticSeverity.Warning: + return code.DiagnosticSeverity.Warning; + case ls.DiagnosticSeverity.Information: + return code.DiagnosticSeverity.Information; + case ls.DiagnosticSeverity.Hint: + return code.DiagnosticSeverity.Hint; + } + return code.DiagnosticSeverity.Error; + } + function asHoverContent(value) { + if (Is.string(value)) { + return asMarkdownString(value); + } + else if (CodeBlock.is(value)) { + const result = asMarkdownString(); + return result.appendCodeblock(value.value, value.language); + } + else if (Array.isArray(value)) { + const result = []; + for (const element of value) { + const item = asMarkdownString(); + if (CodeBlock.is(element)) { + item.appendCodeblock(element.value, element.language); + } + else { + item.appendMarkdown(element); + } + result.push(item); + } + return result; + } + else { + return asMarkdownString(value); + } + } + function asDocumentation(value) { + if (Is.string(value)) { + return value; + } + else { + switch (value.kind) { + case ls.MarkupKind.Markdown: + return asMarkdownString(value.value); + case ls.MarkupKind.PlainText: + return value.value; + default: + return `Unsupported Markup content received. Kind is: ${value.kind}`; + } + } + } + function asMarkdownString(value) { + let result; + if (value === undefined || typeof value === 'string') { + result = new code.MarkdownString(value); + } + else { + switch (value.kind) { + case ls.MarkupKind.Markdown: + result = new code.MarkdownString(value.value); + break; + case ls.MarkupKind.PlainText: + result = new code.MarkdownString(); + result.appendText(value.value); + break; + default: + result = new code.MarkdownString(); + result.appendText(`Unsupported Markup content received. Kind is: ${value.kind}`); + break; + } + } + result.isTrusted = trustMarkdown; + result.supportHtml = supportHtml; + result.supportThemeIcons = supportThemeIcons; + return result; + } + function asHover(hover) { + if (!hover) { + return undefined; + } + return new code.Hover(asHoverContent(hover.contents), asRange(hover.range)); + } + async function asCompletionResult(value, allCommitCharacters, token) { + if (!value) { + return undefined; + } + if (Array.isArray(value)) { + return async.map(value, (item) => asCompletionItem(item, allCommitCharacters), token); + } + const list = value; + const { defaultRange, commitCharacters } = getCompletionItemDefaults(list, allCommitCharacters); + const converted = await async.map(list.items, (item) => { + return asCompletionItem(item, commitCharacters, list.applyKind?.commitCharacters, defaultRange, list.itemDefaults?.insertTextMode, list.itemDefaults?.insertTextFormat, list.itemDefaults?.data, list.applyKind?.data); + }, token); + return new code.CompletionList(converted, list.isIncomplete); + } + function getCompletionItemDefaults(list, allCommitCharacters) { + const rangeDefaults = list.itemDefaults?.editRange; + const commitCharacters = list.itemDefaults?.commitCharacters ?? allCommitCharacters; + return ls.Range.is(rangeDefaults) + ? { defaultRange: asRange(rangeDefaults), commitCharacters } + : rangeDefaults !== undefined + ? { defaultRange: { inserting: asRange(rangeDefaults.insert), replacing: asRange(rangeDefaults.replace) }, commitCharacters } + : { defaultRange: undefined, commitCharacters }; + } + function asCompletionItemKind(value) { + // Protocol item kind is 1 based, codes item kind is zero based. + if (ls.CompletionItemKind.Text <= value && value <= ls.CompletionItemKind.TypeParameter) { + return [value - 1, undefined]; + } + return [code.CompletionItemKind.Text, value]; + } + function asCompletionItemTag(tag) { + switch (tag) { + case ls.CompletionItemTag.Deprecated: + return code.CompletionItemTag.Deprecated; + } + return undefined; + } + function asCompletionItemTags(tags) { + if (tags === undefined || tags === null) { + return []; + } + const result = []; + for (const tag of tags) { + const converted = asCompletionItemTag(tag); + if (converted !== undefined) { + result.push(converted); + } + } + return result; + } + function asCompletionItem(item, defaultCommitCharacters, commitCharactersApplyKind, defaultRange, defaultInsertTextMode, defaultInsertTextFormat, defaultData, dataApplyKind) { + const tags = asCompletionItemTags(item.tags); + const label = asCompletionItemLabel(item); + const result = new protocolCompletionItem_1.default(label); + if (item.detail) { + result.detail = item.detail; + } + if (item.documentation) { + result.documentation = asDocumentation(item.documentation); + result.documentationFormat = Is.string(item.documentation) ? '$string' : item.documentation.kind; + } + if (item.filterText) { + result.filterText = item.filterText; + } + const insertText = asCompletionInsertText(item, defaultRange, defaultInsertTextFormat); + if (insertText) { + result.insertText = insertText.text; + result.range = insertText.range; + result.fromEdit = insertText.fromEdit; + } + if (Is.number(item.kind)) { + const [itemKind, original] = asCompletionItemKind(item.kind); + result.kind = itemKind; + if (original) { + result.originalItemKind = original; + } + } + if (item.sortText) { + result.sortText = item.sortText; + } + if (item.additionalTextEdits) { + result.additionalTextEdits = asTextEditsSync(item.additionalTextEdits); + } + const commitCharacters = applyCommitCharacters(item, defaultCommitCharacters, commitCharactersApplyKind); + if (commitCharacters) { + result.commitCharacters = commitCharacters.slice(); + } + if (item.command) { + result.command = asCommand(item.command); + } + if (item.deprecated === true || item.deprecated === false) { + result.deprecated = item.deprecated; + if (item.deprecated === true) { + tags.push(code.CompletionItemTag.Deprecated); + } + } + if (item.preselect === true || item.preselect === false) { + result.preselect = item.preselect; + } + const data = applyData(item, defaultData, dataApplyKind); + if (data !== undefined) { + result.data = data; + } + if (tags.length > 0) { + result.tags = tags; + } + const insertTextMode = item.insertTextMode ?? defaultInsertTextMode; + if (insertTextMode !== undefined) { + result.insertTextMode = insertTextMode; + if (insertTextMode === ls.InsertTextMode.asIs) { + result.keepWhitespace = true; + } + } + return result; + } + function applyCommitCharacters(item, defaultCommitCharacters, applyKind) { + if (applyKind === ls.ApplyKind.Merge) { + if (!defaultCommitCharacters && !item.commitCharacters) { + return undefined; + } + const set = new Set(); + if (defaultCommitCharacters) { + for (const char of defaultCommitCharacters) { + set.add(char); + } + } + if (Is.stringArray(item.commitCharacters)) { + for (const char of item.commitCharacters) { + set.add(char); + } + } + return Array.from(set); + } + return item.commitCharacters !== undefined + ? Is.stringArray(item.commitCharacters) ? item.commitCharacters : undefined + : defaultCommitCharacters; + } + function applyData(item, defaultData, applyKind) { + if (applyKind === ls.ApplyKind.Merge) { + const data = { + ...defaultData, + }; + if (item.data) { + Object.entries(item.data).forEach(([key, value]) => { + if (value !== undefined && value !== null) { + data[key] = value; + } + }); + } + return data; + } + return item.data ?? defaultData; + } + function asCompletionItemLabel(item) { + if (ls.CompletionItemLabelDetails.is(item.labelDetails)) { + return { + label: item.label, + detail: item.labelDetails.detail, + description: item.labelDetails.description + }; + } + else { + return item.label; + } + } + function asCompletionInsertText(item, defaultRange, defaultInsertTextFormat) { + const insertTextFormat = item.insertTextFormat ?? defaultInsertTextFormat; + if (item.textEdit !== undefined || defaultRange !== undefined) { + const [range, newText] = item.textEdit !== undefined + ? getCompletionRangeAndText(item.textEdit) + : [defaultRange, item.textEditText ?? item.label]; + if (insertTextFormat === ls.InsertTextFormat.Snippet) { + return { text: new code.SnippetString(newText), range: range, fromEdit: true }; + } + else { + return { text: newText, range: range, fromEdit: true }; + } + } + else if (item.insertText) { + if (insertTextFormat === ls.InsertTextFormat.Snippet) { + return { text: new code.SnippetString(item.insertText), fromEdit: false }; + } + else { + return { text: item.insertText, fromEdit: false }; + } + } + else { + return undefined; + } + } + function getCompletionRangeAndText(value) { + if (ls.InsertReplaceEdit.is(value)) { + return [{ inserting: asRange(value.insert), replacing: asRange(value.replace) }, value.newText]; + } + else { + return [asRange(value.range), value.newText]; + } + } + function asTextEdit(edit) { + if (!edit) { + return undefined; + } + return new code.TextEdit(asRange(edit.range), edit.newText); + } + async function asTextEdits(items, token) { + if (!items) { + return undefined; + } + return async.map(items, asTextEdit, token); + } + function asTextEditsSync(items) { + if (!items) { + return undefined; + } + const result = new Array(items.length); + for (let i = 0; i < items.length; i++) { + result[i] = asTextEdit(items[i]); + } + return result; + } + async function asSignatureHelp(item, token) { + if (!item) { + return undefined; + } + const result = new code.SignatureHelp(); + if (Is.number(item.activeSignature)) { + result.activeSignature = item.activeSignature; + } + else { + // activeSignature was optional in the past + result.activeSignature = 0; + } + if (Is.number(item.activeParameter)) { + result.activeParameter = item.activeParameter; + } + else if (item.activeParameter === null) { + result.activeParameter = -1; + } + else { + // activeParameter was optional in the past + result.activeParameter = 0; + } + if (item.signatures) { + result.signatures = await asSignatureInformations(item.signatures, token); + } + return result; + } + async function asSignatureInformations(items, token) { + return async.mapAsync(items, asSignatureInformation, token); + } + async function asSignatureInformation(item, token) { + const result = new code.SignatureInformation(item.label); + if (item.documentation !== undefined) { + result.documentation = asDocumentation(item.documentation); + } + if (item.parameters !== undefined) { + result.parameters = await asParameterInformations(item.parameters, token); + } + if (item.activeParameter !== undefined) { + result.activeParameter = item.activeParameter ?? -1; + } + { + return result; + } + } + function asParameterInformations(items, token) { + return async.map(items, asParameterInformation, token); + } + function asParameterInformation(item) { + const result = new code.ParameterInformation(item.label); + if (item.documentation) { + result.documentation = asDocumentation(item.documentation); + } + return result; + } + function asLocation(item) { + return item ? new code.Location(_uriConverter(item.uri), asRange(item.range)) : undefined; + } + async function asDeclarationResult(item, token) { + if (!item) { + return undefined; + } + return asLocationResult(item, token); + } + async function asDefinitionResult(item, token) { + if (!item) { + return undefined; + } + return asLocationResult(item, token); + } + function asLocationLink(item) { + if (!item) { + return undefined; + } + const result = { + targetUri: _uriConverter(item.targetUri), + targetRange: asRange(item.targetRange), // See issue: https://github.com/Microsoft/vscode/issues/58649 + originSelectionRange: asRange(item.originSelectionRange), + targetSelectionRange: asRange(item.targetSelectionRange) + }; + if (!result.targetSelectionRange) { + throw new Error(`targetSelectionRange must not be undefined or null`); + } + return result; + } + async function asLocationResult(item, token) { + if (!item) { + return undefined; + } + if (Is.array(item)) { + if (item.length === 0) { + return []; + } + else if (ls.LocationLink.is(item[0])) { + const links = item; + return async.map(links, asLocationLink, token); + } + else { + const locations = item; + return async.map(locations, asLocation, token); + } + } + else if (ls.LocationLink.is(item)) { + return [asLocationLink(item)]; + } + else { + return asLocation(item); + } + } + async function asReferences(values, token) { + if (!values) { + return undefined; + } + return async.map(values, asLocation, token); + } + async function asDocumentHighlights(values, token) { + if (!values) { + return undefined; + } + return async.map(values, asDocumentHighlight, token); + } + function asDocumentHighlight(item) { + const result = new code.DocumentHighlight(asRange(item.range)); + if (Is.number(item.kind)) { + result.kind = asDocumentHighlightKind(item.kind); + } + return result; + } + function asDocumentHighlightKind(item) { + switch (item) { + case ls.DocumentHighlightKind.Text: + return code.DocumentHighlightKind.Text; + case ls.DocumentHighlightKind.Read: + return code.DocumentHighlightKind.Read; + case ls.DocumentHighlightKind.Write: + return code.DocumentHighlightKind.Write; + } + return code.DocumentHighlightKind.Text; + } + async function asSymbolInformations(values, token) { + if (!values) { + return undefined; + } + return async.map(values, asSymbolInformation, token); + } + function asSymbolKind(item) { + if (item <= ls.SymbolKind.TypeParameter) { + // Symbol kind is one based in the protocol and zero based in code. + return item - 1; + } + return code.SymbolKind.Property; + } + function asSymbolTag(value) { + switch (value) { + case ls.SymbolTag.Deprecated: + return code.SymbolTag.Deprecated; + default: + return undefined; + } + } + function asSymbolTags(items) { + if (items === undefined || items === null) { + return undefined; + } + const result = []; + for (const item of items) { + const converted = asSymbolTag(item); + if (converted !== undefined) { + result.push(converted); + } + } + return result.length === 0 ? undefined : result; + } + function asSymbolInformation(item) { + const data = item.data; + const location = item.location; + const result = location.range === undefined || data !== undefined + ? new protocolWorkspaceSymbol_1.default(item.name, asSymbolKind(item.kind), item.containerName ?? '', location.range === undefined ? _uriConverter(location.uri) : new code.Location(_uriConverter(item.location.uri), asRange(location.range)), data) + : new code.SymbolInformation(item.name, asSymbolKind(item.kind), item.containerName ?? '', new code.Location(_uriConverter(item.location.uri), asRange(location.range))); + fillTags(result, item); + return result; + } + async function asDocumentSymbols(values, token) { + if (values === undefined || values === null) { + return undefined; + } + return async.map(values, asDocumentSymbol, token); + } + function asDocumentSymbol(value) { + const result = new code.DocumentSymbol(value.name, value.detail || '', asSymbolKind(value.kind), asRange(value.range), asRange(value.selectionRange)); + fillTags(result, value); + if (value.children !== undefined && value.children.length > 0) { + const children = []; + for (const child of value.children) { + children.push(asDocumentSymbol(child)); + } + result.children = children; + } + return result; + } + function fillTags(result, value) { + result.tags = asSymbolTags(value.tags); + if (value.deprecated) { + if (!result.tags) { + result.tags = [code.SymbolTag.Deprecated]; + } + else { + if (!result.tags.includes(code.SymbolTag.Deprecated)) { + result.tags = result.tags.concat(code.SymbolTag.Deprecated); + } + } + } + } + function asCommand(item) { + const result = { title: item.title, command: item.command }; + if (item.tooltip) { + result.tooltip = item.tooltip; + } + if (item.arguments) { + result.arguments = item.arguments; + } + return result; + } + async function asCommands(items, token) { + if (!items) { + return undefined; + } + return async.map(items, asCommand, token); + } + const kindMapping = new Map(); + kindMapping.set(ls.CodeActionKind.Empty, code.CodeActionKind.Empty); + kindMapping.set(ls.CodeActionKind.QuickFix, code.CodeActionKind.QuickFix); + kindMapping.set(ls.CodeActionKind.Refactor, code.CodeActionKind.Refactor); + kindMapping.set(ls.CodeActionKind.RefactorExtract, code.CodeActionKind.RefactorExtract); + kindMapping.set(ls.CodeActionKind.RefactorInline, code.CodeActionKind.RefactorInline); + kindMapping.set(ls.CodeActionKind.RefactorRewrite, code.CodeActionKind.RefactorRewrite); + kindMapping.set(ls.CodeActionKind.Source, code.CodeActionKind.Source); + kindMapping.set(ls.CodeActionKind.SourceOrganizeImports, code.CodeActionKind.SourceOrganizeImports); + function asCodeActionKind(item) { + if (item === undefined || item === null) { + return undefined; + } + let result = kindMapping.get(item); + if (result) { + return result; + } + const parts = item.split('.'); + result = code.CodeActionKind.Empty; + for (const part of parts) { + result = result.append(part); + } + return result; + } + function asCodeActionKinds(items) { + if (items === undefined || items === null) { + return undefined; + } + return items.map(kind => asCodeActionKind(kind)); + } + function asCodeActionDocumentations(items) { + if (items === undefined || items === null) { + return undefined; + } + return items.map(doc => ({ kind: asCodeActionKind(doc.kind), command: asCommand(doc.command) })); + } + async function asCodeAction(item, token) { + if (item === undefined || item === null) { + return undefined; + } + const result = new protocolCodeAction_1.default(item.title, item.data); + if (item.kind !== undefined) { + result.kind = asCodeActionKind(item.kind); + } + if (item.diagnostics !== undefined) { + result.diagnostics = asDiagnosticsSync(item.diagnostics); + } + if (item.edit !== undefined) { + result.edit = await asWorkspaceEdit(item.edit, token); + } + if (item.command !== undefined) { + result.command = asCommand(item.command); + } + if (item.isPreferred !== undefined) { + result.isPreferred = item.isPreferred; + } + if (item.disabled !== undefined) { + result.disabled = { reason: item.disabled.reason }; + } + if (item.tags?.includes(ls.CodeActionTag.LLMGenerated)) { + result.isAI = true; + } + return result; + } + function asCodeActionResult(items, token) { + return async.mapAsync(items, async (item) => { + if (ls.Command.is(item)) { + return asCommand(item); + } + else { + return asCodeAction(item, token); + } + }, token); + } + function asCodeLens(item) { + if (!item) { + return undefined; + } + const result = new protocolCodeLens_1.default(asRange(item.range)); + if (item.command) { + result.command = asCommand(item.command); + } + if (item.data !== undefined && item.data !== null) { + result.data = item.data; + } + return result; + } + async function asCodeLenses(items, token) { + if (!items) { + return undefined; + } + return async.map(items, asCodeLens, token); + } + async function asWorkspaceEdit(item, token) { + if (!item) { + return undefined; + } + const sharedMetadata = new Map(); + if (item.changeAnnotations !== undefined) { + const changeAnnotations = item.changeAnnotations; + await async.forEach(Object.keys(changeAnnotations), (key) => { + const metaData = asWorkspaceEditEntryMetadata(changeAnnotations[key]); + sharedMetadata.set(key, metaData); + }, token); + } + const asMetadata = (annotation) => { + if (annotation === undefined) { + return undefined; + } + else { + return sharedMetadata.get(annotation); + } + }; + const result = new code.WorkspaceEdit(); + if (item.documentChanges) { + const documentChanges = item.documentChanges; + await async.forEach(documentChanges, (change) => { + if (ls.CreateFile.is(change)) { + result.createFile(_uriConverter(change.uri), change.options, asMetadata(change.annotationId)); + } + else if (ls.RenameFile.is(change)) { + result.renameFile(_uriConverter(change.oldUri), _uriConverter(change.newUri), change.options, asMetadata(change.annotationId)); + } + else if (ls.DeleteFile.is(change)) { + result.deleteFile(_uriConverter(change.uri), change.options, asMetadata(change.annotationId)); + } + else if (ls.TextDocumentEdit.is(change)) { + const uri = _uriConverter(change.textDocument.uri); + const edits = []; + for (const edit of change.edits) { + if (ls.AnnotatedTextEdit.is(edit)) { + edits.push([new code.TextEdit(asRange(edit.range), edit.newText), asMetadata(edit.annotationId)]); + } + else if (ls.SnippetTextEdit.is(edit)) { + edits.push([new code.SnippetTextEdit(asRange(edit.range), new code.SnippetString(edit.snippet.value)), asMetadata(edit.annotationId)]); + } + else { + edits.push([new code.TextEdit(asRange(edit.range), edit.newText), undefined]); + } + } + result.set(uri, edits); + } + else { + throw new Error(`Unknown workspace edit change received:\n${JSON.stringify(change, undefined, 4)}`); + } + }, token); + } + else if (item.changes) { + const changes = item.changes; + await async.forEach(Object.keys(changes), (key) => { + result.set(_uriConverter(key), asTextEditsSync(changes[key])); + }, token); + } + return result; + } + function asWorkspaceEditEntryMetadata(annotation) { + if (annotation === undefined) { + return undefined; + } + return { label: annotation.label, needsConfirmation: !!annotation.needsConfirmation, description: annotation.description }; + } + function asDocumentLink(item) { + const range = asRange(item.range); + const target = item.target ? asUri(item.target) : undefined; + // target must be optional in DocumentLink + const link = new protocolDocumentLink_1.default(range, target); + if (item.tooltip !== undefined) { + link.tooltip = item.tooltip; + } + if (item.data !== undefined && item.data !== null) { + link.data = item.data; + } + return link; + } + async function asDocumentLinks(items, token) { + if (!items) { + return undefined; + } + return async.map(items, asDocumentLink, token); + } + function asColor(color) { + return new code.Color(color.red, color.green, color.blue, color.alpha); + } + function asColorInformation(ci) { + return new code.ColorInformation(asRange(ci.range), asColor(ci.color)); + } + async function asColorInformations(colorInformation, token) { + if (!colorInformation) { + return undefined; + } + return async.map(colorInformation, asColorInformation, token); + } + function asColorPresentation(cp) { + const presentation = new code.ColorPresentation(cp.label); + presentation.additionalTextEdits = asTextEditsSync(cp.additionalTextEdits); + if (cp.textEdit) { + presentation.textEdit = asTextEdit(cp.textEdit); + } + return presentation; + } + async function asColorPresentations(colorPresentations, token) { + if (!colorPresentations) { + return undefined; + } + return async.map(colorPresentations, asColorPresentation, token); + } + function asFoldingRangeKind(kind) { + if (kind) { + switch (kind) { + case ls.FoldingRangeKind.Comment: + return code.FoldingRangeKind.Comment; + case ls.FoldingRangeKind.Imports: + return code.FoldingRangeKind.Imports; + case ls.FoldingRangeKind.Region: + return code.FoldingRangeKind.Region; + } + } + return undefined; + } + function asFoldingRange(r) { + return new code.FoldingRange(r.startLine, r.endLine, asFoldingRangeKind(r.kind)); + } + async function asFoldingRanges(foldingRanges, token) { + if (!foldingRanges) { + return undefined; + } + return async.map(foldingRanges, asFoldingRange, token); + } + function asSelectionRange(selectionRange) { + return new code.SelectionRange(asRange(selectionRange.range), selectionRange.parent ? asSelectionRange(selectionRange.parent) : undefined); + } + async function asSelectionRanges(selectionRanges, token) { + if (!Array.isArray(selectionRanges)) { + return []; + } + return async.map(selectionRanges, asSelectionRange, token); + } + function asInlineValue(inlineValue) { + if (ls.InlineValueText.is(inlineValue)) { + return new code.InlineValueText(asRange(inlineValue.range), inlineValue.text); + } + else if (ls.InlineValueVariableLookup.is(inlineValue)) { + return new code.InlineValueVariableLookup(asRange(inlineValue.range), inlineValue.variableName, inlineValue.caseSensitiveLookup); + } + else { + return new code.InlineValueEvaluatableExpression(asRange(inlineValue.range), inlineValue.expression); + } + } + async function asInlineValues(inlineValues, token) { + if (!Array.isArray(inlineValues)) { + return []; + } + return async.map(inlineValues, asInlineValue, token); + } + async function asInlayHint(value, token) { + const label = typeof value.label === 'string' + ? value.label + : await async.map(value.label, asInlayHintLabelPart, token); + const result = new protocolInlayHint_1.default(asPosition(value.position), label); + if (value.kind !== undefined) { + result.kind = value.kind; + } + if (value.textEdits !== undefined) { + result.textEdits = await asTextEdits(value.textEdits, token); + } + if (value.tooltip !== undefined) { + result.tooltip = asTooltip(value.tooltip); + } + if (value.paddingLeft !== undefined) { + result.paddingLeft = value.paddingLeft; + } + if (value.paddingRight !== undefined) { + result.paddingRight = value.paddingRight; + } + if (value.data !== undefined) { + result.data = value.data; + } + return result; + } + function asInlayHintLabelPart(part) { + const result = new code.InlayHintLabelPart(part.value); + if (part.location !== undefined) { + result.location = asLocation(part.location); + } + if (part.tooltip !== undefined) { + result.tooltip = asTooltip(part.tooltip); + } + if (part.command !== undefined) { + result.command = asCommand(part.command); + } + return result; + } + function asTooltip(value) { + if (typeof value === 'string') { + return value; + } + return asMarkdownString(value); + } + async function asInlayHints(values, token) { + if (!Array.isArray(values)) { + return undefined; + } + return async.mapAsync(values, asInlayHint, token); + } + function asCallHierarchyItem(item) { + if (item === null) { + return undefined; + } + const result = new protocolCallHierarchyItem_1.default(asSymbolKind(item.kind), item.name, item.detail || '', asUri(item.uri), asRange(item.range), asRange(item.selectionRange), item.data); + if (item.tags !== undefined) { + result.tags = asSymbolTags(item.tags); + } + return result; + } + async function asCallHierarchyItems(items, token) { + if (items === null) { + return undefined; + } + return async.map(items, asCallHierarchyItem, token); + } + async function asCallHierarchyIncomingCall(item, token) { + return new code.CallHierarchyIncomingCall(asCallHierarchyItem(item.from), await asRanges(item.fromRanges, token)); + } + async function asCallHierarchyIncomingCalls(items, token) { + if (items === null) { + return undefined; + } + return async.mapAsync(items, asCallHierarchyIncomingCall, token); + } + async function asCallHierarchyOutgoingCall(item, token) { + return new code.CallHierarchyOutgoingCall(asCallHierarchyItem(item.to), await asRanges(item.fromRanges, token)); + } + async function asCallHierarchyOutgoingCalls(items, token) { + if (items === null) { + return undefined; + } + return async.mapAsync(items, asCallHierarchyOutgoingCall, token); + } + async function asSemanticTokens(value, _token) { + if (value === undefined || value === null) { + return undefined; + } + return new code.SemanticTokens(new Uint32Array(value.data), value.resultId); + } + function asSemanticTokensEdit(value) { + return new code.SemanticTokensEdit(value.start, value.deleteCount, value.data !== undefined ? new Uint32Array(value.data) : undefined); + } + async function asSemanticTokensEdits(value, _token) { + if (value === undefined || value === null) { + return undefined; + } + return new code.SemanticTokensEdits(value.edits.map(asSemanticTokensEdit), value.resultId); + } + function asSemanticTokensLegend(value) { + return value; + } + async function asLinkedEditingRanges(value, token) { + if (value === null || value === undefined) { + return undefined; + } + return new code.LinkedEditingRanges(await asRanges(value.ranges, token), asRegularExpression(value.wordPattern)); + } + function asRegularExpression(value) { + if (value === null || value === undefined) { + return undefined; + } + return new RegExp(value); + } + function asTypeHierarchyItem(item) { + if (item === null) { + return undefined; + } + const result = new protocolTypeHierarchyItem_1.default(asSymbolKind(item.kind), item.name, item.detail || '', asUri(item.uri), asRange(item.range), asRange(item.selectionRange), item.data); + if (item.tags !== undefined) { + result.tags = asSymbolTags(item.tags); + } + return result; + } + async function asTypeHierarchyItems(items, token) { + if (items === null) { + return undefined; + } + return async.map(items, asTypeHierarchyItem, token); + } + function asGlobPattern(pattern) { + if (Is.string(pattern)) { + return pattern; + } + if (ls.RelativePattern.is(pattern)) { + if (ls.URI.is(pattern.baseUri)) { + return new code.RelativePattern(asUri(pattern.baseUri), pattern.pattern); + } + else if (ls.WorkspaceFolder.is(pattern.baseUri)) { + const workspaceFolder = code.workspace.getWorkspaceFolder(asUri(pattern.baseUri.uri)); + return workspaceFolder !== undefined ? new code.RelativePattern(workspaceFolder, pattern.pattern) : undefined; + } + } + return undefined; + } + async function asInlineCompletionResult(value, token) { + if (!value) { + return undefined; + } + if (Array.isArray(value)) { + return async.map(value, (item) => asInlineCompletionItem(item), token); + } + const list = value; + const converted = await async.map(list.items, (item) => { + return asInlineCompletionItem(item); + }, token); + return new code.InlineCompletionList(converted); + } + function asInlineCompletionItem(item) { + let insertText; + if (typeof item.insertText === 'string') { + insertText = item.insertText; + } + else { + insertText = new code.SnippetString(item.insertText.value); + } + let command = undefined; + if (item.command) { + command = asCommand(item.command); + } + const inlineCompletionItem = new code.InlineCompletionItem(insertText, asRange(item.range), command); + if (item.filterText) { + inlineCompletionItem.filterText = item.filterText; + } + return inlineCompletionItem; + } + return { + asUri, + asDocumentSelector, + asDiagnostics, + asDiagnostic, + asRange, + asRanges, + asPosition, + asDiagnosticSeverity, + asDiagnosticTag, + asHover, + asCompletionResult, + asCompletionItem, + asTextEdit, + asTextEdits, + asSignatureHelp, + asSignatureInformations, + asSignatureInformation, + asParameterInformations, + asParameterInformation, + asDeclarationResult, + asDefinitionResult, + asLocation, + asReferences, + asDocumentHighlights, + asDocumentHighlight, + asDocumentHighlightKind, + asSymbolKind, + asSymbolTag, + asSymbolTags, + asSymbolInformations, + asSymbolInformation, + asDocumentSymbols, + asDocumentSymbol, + asCommand, + asCommands, + asCodeAction, + asCodeActionKind, + asCodeActionKinds, + asCodeActionDocumentations, + asCodeActionResult, + asCodeLens, + asCodeLenses, + asWorkspaceEdit, + asDocumentLink, + asDocumentLinks, + asFoldingRangeKind, + asFoldingRange, + asFoldingRanges, + asColor, + asColorInformation, + asColorInformations, + asColorPresentation, + asColorPresentations, + asSelectionRange, + asSelectionRanges, + asInlineValue, + asInlineValues, + asInlayHint, + asInlayHints, + asSemanticTokensLegend, + asSemanticTokens, + asSemanticTokensEdit, + asSemanticTokensEdits, + asCallHierarchyItem, + asCallHierarchyItems, + asCallHierarchyIncomingCall, + asCallHierarchyIncomingCalls, + asCallHierarchyOutgoingCall, + asCallHierarchyOutgoingCalls, + asLinkedEditingRanges: asLinkedEditingRanges, + asTypeHierarchyItem, + asTypeHierarchyItems, + asGlobPattern, + asInlineCompletionResult, + asInlineCompletionItem + }; +} + + +}, +"./node_modules/vscode-languageclient/lib/common/protocolDiagnostic.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ProtocolDiagnostic = exports.DiagnosticCode = void 0; +const vscode = __importStar(__webpack_require__("vscode")); +const Is = __importStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/utils/is.js")); +var DiagnosticCode; +(function (DiagnosticCode) { + function is(value) { + const candidate = value; + return candidate !== undefined && candidate !== null && (Is.number(candidate.value) || Is.string(candidate.value)) && Is.string(candidate.target); + } + DiagnosticCode.is = is; +})(DiagnosticCode || (exports.DiagnosticCode = DiagnosticCode = {})); +class ProtocolDiagnostic extends vscode.Diagnostic { + data; + hasDiagnosticCode; + constructor(range, message, severity, data) { + super(range, message, severity); + this.data = data; + this.hasDiagnosticCode = false; + } +} +exports.ProtocolDiagnostic = ProtocolDiagnostic; + + +}, +"./node_modules/vscode-languageclient/lib/common/protocolDocumentLink.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +const code = __importStar(__webpack_require__("vscode")); +class ProtocolDocumentLink extends code.DocumentLink { + data; + constructor(range, target) { + super(range, target); + } +} +exports["default"] = ProtocolDocumentLink; + + +}, +"./node_modules/vscode-languageclient/lib/common/protocolInlayHint.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +const code = __importStar(__webpack_require__("vscode")); +class ProtocolInlayHint extends code.InlayHint { + data; + constructor(position, label, kind) { + super(position, label, kind); + } +} +exports["default"] = ProtocolInlayHint; + + +}, +"./node_modules/vscode-languageclient/lib/common/protocolTypeHierarchyItem.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +const code = __importStar(__webpack_require__("vscode")); +class ProtocolTypeHierarchyItem extends code.TypeHierarchyItem { + data; + constructor(kind, name, detail, uri, range, selectionRange, data) { + super(kind, name, detail, uri, range, selectionRange); + if (data !== undefined) { + this.data = data; + } + } +} +exports["default"] = ProtocolTypeHierarchyItem; + + +}, +"./node_modules/vscode-languageclient/lib/common/protocolWorkspaceSymbol.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +const code = __importStar(__webpack_require__("vscode")); +class WorkspaceSymbol extends code.SymbolInformation { + data; + hasRange; + constructor(name, kind, containerName, locationOrUri, data) { + const hasRange = !(locationOrUri instanceof code.Uri); + super(name, kind, containerName, hasRange ? locationOrUri : new code.Location(locationOrUri, new code.Range(0, 0, 0, 0))); + this.hasRange = hasRange; + if (data !== undefined) { + this.data = data; + } + } +} +exports["default"] = WorkspaceSymbol; + + +}, +"./node_modules/vscode-languageclient/lib/common/reference.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ReferencesFeature = void 0; +const vscode_1 = __webpack_require__("vscode"); +const vscode_languageserver_protocol_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js"); +const features_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/features.js"); +const UUID = __importStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/utils/uuid.js")); +class ReferencesFeature extends features_1.TextDocumentLanguageFeature { + constructor(client) { + super(client, vscode_languageserver_protocol_1.ReferencesRequest.type); + } + fillClientCapabilities(capabilities) { + (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'textDocument'), 'references').dynamicRegistration = true; + } + initialize(capabilities, documentSelector) { + const options = this.getRegistrationOptions(documentSelector, capabilities.referencesProvider); + if (!options) { + return; + } + this.register({ id: UUID.generateUuid(), registerOptions: options }); + } + registerLanguageProvider(options) { + const selector = options.documentSelector; + const provider = { + provideReferences: (document, position, options, token) => { + const client = this._client; + const _providerReferences = (document, position, options, token) => { + return client.sendRequest(vscode_languageserver_protocol_1.ReferencesRequest.type, client.code2ProtocolConverter.asReferenceParams(document, position, options), token).then((result) => { + if (token.isCancellationRequested) { + return null; + } + return client.protocol2CodeConverter.asReferences(result, token); + }, (error) => { + return client.handleFailedRequest(vscode_languageserver_protocol_1.ReferencesRequest.type, token, error, null); + }); + }; + const middleware = client.middleware; + return middleware.provideReferences + ? middleware.provideReferences(document, position, options, token, _providerReferences) + : _providerReferences(document, position, options, token); + } + }; + return [this.registerProvider(selector, provider), provider]; + } + registerProvider(selector, provider) { + return vscode_1.languages.registerReferenceProvider(this._client.protocol2CodeConverter.asDocumentSelector(selector), provider); + } +} +exports.ReferencesFeature = ReferencesFeature; + + +}, +"./node_modules/vscode-languageclient/lib/common/rename.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.RenameFeature = void 0; +const vscode_1 = __webpack_require__("vscode"); +const vscode_languageserver_protocol_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js"); +const UUID = __importStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/utils/uuid.js")); +const Is = __importStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/utils/is.js")); +const features_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/features.js"); +class RenameFeature extends features_1.TextDocumentLanguageFeature { + constructor(client) { + super(client, vscode_languageserver_protocol_1.RenameRequest.type); + } + fillClientCapabilities(capabilities) { + const rename = (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'textDocument'), 'rename'); + rename.dynamicRegistration = true; + rename.prepareSupport = true; + rename.prepareSupportDefaultBehavior = vscode_languageserver_protocol_1.PrepareSupportDefaultBehavior.Identifier; + rename.honorsChangeAnnotations = true; + } + initialize(capabilities, documentSelector) { + const options = this.getRegistrationOptions(documentSelector, capabilities.renameProvider); + if (!options) { + return; + } + if (Is.boolean(capabilities.renameProvider)) { + options.prepareProvider = false; + } + this.register({ id: UUID.generateUuid(), registerOptions: options }); + } + registerLanguageProvider(options) { + const selector = options.documentSelector; + const provider = { + provideRenameEdits: (document, position, newName, token) => { + const client = this._client; + const provideRenameEdits = async (document, position, newName, token) => { + const params = { + textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(document), + position: client.code2ProtocolConverter.asPosition(position), + newName: newName + }; + let result = null; + try { + result = await client.sendRequest(vscode_languageserver_protocol_1.RenameRequest.type, params, token); + } + catch (error) { + return client.handleFailedRequest(vscode_languageserver_protocol_1.RenameRequest.type, token, error, null, false); + } + if (token.isCancellationRequested || result === null) { + return null; + } + const converted = await client.protocol2CodeConverter.asWorkspaceEdit(result, token); + if (token.isCancellationRequested) { + return null; + } + if (!client.validateWorkspaceEdit(result)) { + throw new Error(`The rename edit returned from the server is not valid anymore and cannot be applied.`); + } + return converted; + }; + const middleware = client.middleware; + return middleware.provideRenameEdits + ? middleware.provideRenameEdits(document, position, newName, token, provideRenameEdits) + : provideRenameEdits(document, position, newName, token); + }, + prepareRename: options.prepareProvider + ? (document, position, token) => { + const client = this._client; + const prepareRename = (document, position, token) => { + const params = { + textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(document), + position: client.code2ProtocolConverter.asPosition(position), + }; + return client.sendRequest(vscode_languageserver_protocol_1.PrepareRenameRequest.type, params, token).then((result) => { + if (token.isCancellationRequested) { + return null; + } + if (vscode_languageserver_protocol_1.Range.is(result)) { + return client.protocol2CodeConverter.asRange(result); + } + else if (this.isDefaultBehavior(result)) { + return result.defaultBehavior === true + ? null + : Promise.reject(new Error(`The element can't be renamed.`)); + } + else if (result && vscode_languageserver_protocol_1.Range.is(result.range)) { + return { + range: client.protocol2CodeConverter.asRange(result.range), + placeholder: result.placeholder + }; + } + // To cancel the rename vscode API expects a rejected promise. + return Promise.reject(new Error(`The element can't be renamed.`)); + }, (error) => { + if (typeof error.message === 'string') { + throw new Error(error.message); + } + else { + throw new Error(`The element can't be renamed.`); + } + }); + }; + const middleware = client.middleware; + return middleware.prepareRename + ? middleware.prepareRename(document, position, token, prepareRename) + : prepareRename(document, position, token); + } + : undefined + }; + return [this.registerProvider(selector, provider), provider]; + } + registerProvider(selector, provider) { + return vscode_1.languages.registerRenameProvider(this._client.protocol2CodeConverter.asDocumentSelector(selector), provider); + } + isDefaultBehavior(value) { + const candidate = value; + return candidate && Is.boolean(candidate.defaultBehavior); + } +} +exports.RenameFeature = RenameFeature; + + +}, +"./node_modules/vscode-languageclient/lib/common/selectionRange.js"(__unused_rspack_module, exports, __webpack_require__) { +var __rspack_unused_export; + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +__rspack_unused_export = ({ value: true }); +exports.SelectionRangeFeature = void 0; +const vscode_1 = __webpack_require__("vscode"); +const vscode_languageserver_protocol_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js"); +const features_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/features.js"); +class SelectionRangeFeature extends features_1.TextDocumentLanguageFeature { + constructor(client) { + super(client, vscode_languageserver_protocol_1.SelectionRangeRequest.type); + } + fillClientCapabilities(capabilities) { + const capability = (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'textDocument'), 'selectionRange'); + capability.dynamicRegistration = true; + } + initialize(capabilities, documentSelector) { + const [id, options] = this.getRegistration(documentSelector, capabilities.selectionRangeProvider); + if (!id || !options) { + return; + } + this.register({ id: id, registerOptions: options }); + } + registerLanguageProvider(options) { + const selector = options.documentSelector; + const provider = { + provideSelectionRanges: (document, positions, token) => { + const client = this._client; + const provideSelectionRanges = async (document, positions, token) => { + const requestParams = { + textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(document), + positions: client.code2ProtocolConverter.asPositionsSync(positions, token) + }; + return client.sendRequest(vscode_languageserver_protocol_1.SelectionRangeRequest.type, requestParams, token).then((ranges) => { + if (token.isCancellationRequested) { + return null; + } + return client.protocol2CodeConverter.asSelectionRanges(ranges, token); + }, (error) => { + return client.handleFailedRequest(vscode_languageserver_protocol_1.SelectionRangeRequest.type, token, error, null); + }); + }; + const middleware = client.middleware; + return middleware.provideSelectionRanges + ? middleware.provideSelectionRanges(document, positions, token, provideSelectionRanges) + : provideSelectionRanges(document, positions, token); + } + }; + return [this.registerProvider(selector, provider), provider]; + } + registerProvider(selector, provider) { + return vscode_1.languages.registerSelectionRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(selector), provider); + } +} +exports.SelectionRangeFeature = SelectionRangeFeature; + + +}, +"./node_modules/vscode-languageclient/lib/common/semanticTokens.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SemanticTokensFeature = void 0; +const vscode = __importStar(__webpack_require__("vscode")); +const vscode_languageserver_protocol_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js"); +const features_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/features.js"); +const Is = __importStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/utils/is.js")); +class SemanticTokensFeature extends features_1.TextDocumentLanguageFeature { + constructor(client) { + super(client, vscode_languageserver_protocol_1.SemanticTokensRegistrationType.type); + } + fillClientCapabilities(capabilities) { + const capability = (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'textDocument'), 'semanticTokens'); + capability.dynamicRegistration = true; + capability.tokenTypes = [ + vscode_languageserver_protocol_1.SemanticTokenTypes.namespace, + vscode_languageserver_protocol_1.SemanticTokenTypes.type, + vscode_languageserver_protocol_1.SemanticTokenTypes.class, + vscode_languageserver_protocol_1.SemanticTokenTypes.enum, + vscode_languageserver_protocol_1.SemanticTokenTypes.interface, + vscode_languageserver_protocol_1.SemanticTokenTypes.struct, + vscode_languageserver_protocol_1.SemanticTokenTypes.typeParameter, + vscode_languageserver_protocol_1.SemanticTokenTypes.parameter, + vscode_languageserver_protocol_1.SemanticTokenTypes.variable, + vscode_languageserver_protocol_1.SemanticTokenTypes.property, + vscode_languageserver_protocol_1.SemanticTokenTypes.enumMember, + vscode_languageserver_protocol_1.SemanticTokenTypes.event, + vscode_languageserver_protocol_1.SemanticTokenTypes.function, + vscode_languageserver_protocol_1.SemanticTokenTypes.method, + vscode_languageserver_protocol_1.SemanticTokenTypes.macro, + vscode_languageserver_protocol_1.SemanticTokenTypes.keyword, + vscode_languageserver_protocol_1.SemanticTokenTypes.comment, + vscode_languageserver_protocol_1.SemanticTokenTypes.string, + vscode_languageserver_protocol_1.SemanticTokenTypes.number, + vscode_languageserver_protocol_1.SemanticTokenTypes.regexp, + vscode_languageserver_protocol_1.SemanticTokenTypes.operator, + vscode_languageserver_protocol_1.SemanticTokenTypes.decorator, + vscode_languageserver_protocol_1.SemanticTokenTypes.label + ]; + capability.tokenModifiers = [ + vscode_languageserver_protocol_1.SemanticTokenModifiers.declaration, + vscode_languageserver_protocol_1.SemanticTokenModifiers.definition, + vscode_languageserver_protocol_1.SemanticTokenModifiers.readonly, + vscode_languageserver_protocol_1.SemanticTokenModifiers.static, + vscode_languageserver_protocol_1.SemanticTokenModifiers.deprecated, + vscode_languageserver_protocol_1.SemanticTokenModifiers.abstract, + vscode_languageserver_protocol_1.SemanticTokenModifiers.async, + vscode_languageserver_protocol_1.SemanticTokenModifiers.modification, + vscode_languageserver_protocol_1.SemanticTokenModifiers.documentation, + vscode_languageserver_protocol_1.SemanticTokenModifiers.defaultLibrary + ]; + capability.formats = [vscode_languageserver_protocol_1.TokenFormat.Relative]; + capability.requests = { + range: true, + full: { + delta: true + } + }; + capability.multilineTokenSupport = false; + capability.overlappingTokenSupport = false; + capability.serverCancelSupport = true; + capability.augmentsSyntaxTokens = true; + (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'workspace'), 'semanticTokens').refreshSupport = true; + } + initialize(capabilities, documentSelector) { + const client = this._client; + client.onRequest(vscode_languageserver_protocol_1.SemanticTokensRefreshRequest.type, async () => { + for (const provider of this.getAllProviders()) { + provider.onDidChangeSemanticTokensEmitter.fire(); + } + }); + const [id, options] = this.getRegistration(documentSelector, capabilities.semanticTokensProvider); + if (!id || !options) { + return; + } + this.register({ id: id, registerOptions: options }); + } + registerLanguageProvider(options) { + const selector = options.documentSelector; + const fullProvider = Is.boolean(options.full) ? options.full : options.full !== undefined; + const hasEditProvider = options.full !== undefined && typeof options.full !== 'boolean' && options.full.delta === true; + const eventEmitter = new vscode.EventEmitter(); + const documentProvider = fullProvider + ? { + onDidChangeSemanticTokens: eventEmitter.event, + provideDocumentSemanticTokens: (document, token) => { + const client = this._client; + const middleware = client.middleware; + const provideDocumentSemanticTokens = (document, token) => { + const params = { + textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(document) + }; + return client.sendRequest(vscode_languageserver_protocol_1.SemanticTokensRequest.type, params, token).then((result) => { + if (token.isCancellationRequested) { + return null; + } + return client.protocol2CodeConverter.asSemanticTokens(result, token); + }, (error) => { + return client.handleFailedRequest(vscode_languageserver_protocol_1.SemanticTokensRequest.type, token, error, null); + }); + }; + return middleware.provideDocumentSemanticTokens + ? middleware.provideDocumentSemanticTokens(document, token, provideDocumentSemanticTokens) + : provideDocumentSemanticTokens(document, token); + }, + provideDocumentSemanticTokensEdits: hasEditProvider + ? (document, previousResultId, token) => { + const client = this._client; + const middleware = client.middleware; + const provideDocumentSemanticTokensEdits = (document, previousResultId, token) => { + const params = { + textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(document), + previousResultId + }; + return client.sendRequest(vscode_languageserver_protocol_1.SemanticTokensDeltaRequest.type, params, token).then(async (result) => { + if (token.isCancellationRequested) { + return null; + } + if (vscode_languageserver_protocol_1.SemanticTokens.is(result)) { + return await client.protocol2CodeConverter.asSemanticTokens(result, token); + } + else { + return await client.protocol2CodeConverter.asSemanticTokensEdits(result, token); + } + }, (error) => { + return client.handleFailedRequest(vscode_languageserver_protocol_1.SemanticTokensDeltaRequest.type, token, error, null); + }); + }; + return middleware.provideDocumentSemanticTokensEdits + ? middleware.provideDocumentSemanticTokensEdits(document, previousResultId, token, provideDocumentSemanticTokensEdits) + : provideDocumentSemanticTokensEdits(document, previousResultId, token); + } + : undefined + } + : undefined; + const hasRangeProvider = options.range === true; + const rangeProvider = hasRangeProvider + ? { + onDidChangeSemanticTokens: eventEmitter.event, + provideDocumentRangeSemanticTokens: (document, range, token) => { + const client = this._client; + const middleware = client.middleware; + const provideDocumentRangeSemanticTokens = (document, range, token) => { + const params = { + textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(document), + range: client.code2ProtocolConverter.asRange(range) + }; + return client.sendRequest(vscode_languageserver_protocol_1.SemanticTokensRangeRequest.type, params, token).then((result) => { + if (token.isCancellationRequested) { + return null; + } + return client.protocol2CodeConverter.asSemanticTokens(result, token); + }, (error) => { + return client.handleFailedRequest(vscode_languageserver_protocol_1.SemanticTokensRangeRequest.type, token, error, null); + }); + }; + return middleware.provideDocumentRangeSemanticTokens + ? middleware.provideDocumentRangeSemanticTokens(document, range, token, provideDocumentRangeSemanticTokens) + : provideDocumentRangeSemanticTokens(document, range, token); + } + } + : undefined; + const disposables = []; + const client = this._client; + const legend = client.protocol2CodeConverter.asSemanticTokensLegend(options.legend); + const documentSelector = client.protocol2CodeConverter.asDocumentSelector(selector); + if (documentProvider !== undefined) { + disposables.push(vscode.languages.registerDocumentSemanticTokensProvider(documentSelector, documentProvider, legend)); + } + if (rangeProvider !== undefined) { + disposables.push(vscode.languages.registerDocumentRangeSemanticTokensProvider(documentSelector, rangeProvider, legend)); + } + return [new vscode.Disposable(() => disposables.forEach(item => item.dispose())), { range: rangeProvider, full: documentProvider, onDidChangeSemanticTokensEmitter: eventEmitter }]; + } +} +exports.SemanticTokensFeature = SemanticTokensFeature; + + +}, +"./node_modules/vscode-languageclient/lib/common/signatureHelp.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SignatureHelpFeature = void 0; +const vscode_1 = __webpack_require__("vscode"); +const vscode_languageserver_protocol_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js"); +const features_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/features.js"); +const UUID = __importStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/utils/uuid.js")); +class SignatureHelpFeature extends features_1.TextDocumentLanguageFeature { + constructor(client) { + super(client, vscode_languageserver_protocol_1.SignatureHelpRequest.type); + } + fillClientCapabilities(capabilities) { + const config = (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'textDocument'), 'signatureHelp'); + config.dynamicRegistration = true; + config.signatureInformation = { documentationFormat: [vscode_languageserver_protocol_1.MarkupKind.Markdown, vscode_languageserver_protocol_1.MarkupKind.PlainText] }; + config.signatureInformation.parameterInformation = { labelOffsetSupport: true }; + config.signatureInformation.activeParameterSupport = true; + config.signatureInformation.noActiveParameterSupport = true; + config.contextSupport = true; + } + initialize(capabilities, documentSelector) { + const options = this.getRegistrationOptions(documentSelector, capabilities.signatureHelpProvider); + if (!options) { + return; + } + this.register({ + id: UUID.generateUuid(), + registerOptions: options + }); + } + registerLanguageProvider(options) { + const provider = { + provideSignatureHelp: (document, position, token, context) => { + const client = this._client; + const providerSignatureHelp = (document, position, context, token) => { + return client.sendRequest(vscode_languageserver_protocol_1.SignatureHelpRequest.type, client.code2ProtocolConverter.asSignatureHelpParams(document, position, context), token).then((result) => { + if (token.isCancellationRequested) { + return null; + } + return client.protocol2CodeConverter.asSignatureHelp(result, token); + }, (error) => { + return client.handleFailedRequest(vscode_languageserver_protocol_1.SignatureHelpRequest.type, token, error, null); + }); + }; + const middleware = client.middleware; + return middleware.provideSignatureHelp + ? middleware.provideSignatureHelp(document, position, context, token, providerSignatureHelp) + : providerSignatureHelp(document, position, context, token); + } + }; + return [this.registerProvider(options, provider), provider]; + } + registerProvider(options, provider) { + const selector = this._client.protocol2CodeConverter.asDocumentSelector(options.documentSelector); + if (options.retriggerCharacters === undefined) { + const triggerCharacters = options.triggerCharacters || []; + return vscode_1.languages.registerSignatureHelpProvider(selector, provider, ...triggerCharacters); + } + else { + const metaData = { + triggerCharacters: options.triggerCharacters || [], + retriggerCharacters: options.retriggerCharacters || [] + }; + return vscode_1.languages.registerSignatureHelpProvider(selector, provider, metaData); + } + } +} +exports.SignatureHelpFeature = SignatureHelpFeature; + + +}, +"./node_modules/vscode-languageclient/lib/common/textDocumentContent.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.TextDocumentContentFeature = void 0; +const vscode = __importStar(__webpack_require__("vscode")); +const vscode_languageserver_protocol_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js"); +const features_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/features.js"); +const UUID = __importStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/utils/uuid.js")); +class TextDocumentContentFeature { + _client; + _registrations = new Map(); + constructor(client) { + this._client = client; + } + getState() { + const registrations = this._registrations.size > 0; + return { kind: 'workspace', id: vscode_languageserver_protocol_1.TextDocumentContentRequest.method, registrations }; + } + get registrationType() { + return vscode_languageserver_protocol_1.TextDocumentContentRequest.type; + } + getProviders() { + const result = []; + for (const registration of this._registrations.values()) { + result.push(...registration.providers); + } + return result; + } + fillClientCapabilities(capabilities) { + const textDocumentContent = (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'workspace'), 'textDocumentContent'); + textDocumentContent.dynamicRegistration = true; + } + initialize(capabilities) { + const client = this._client; + client.onRequest(vscode_languageserver_protocol_1.TextDocumentContentRefreshRequest.type, async (params) => { + const uri = client.protocol2CodeConverter.asUri(params.uri); + for (const registrations of this._registrations.values()) { + for (const provider of registrations.providers) { + if (provider.scheme === uri.scheme) { + provider.onDidChangeEmitter.fire(uri); + } + } + } + }); + if (!capabilities?.workspace?.textDocumentContent) { + return; + } + const capability = capabilities.workspace.textDocumentContent; + const id = vscode_languageserver_protocol_1.StaticRegistrationOptions.hasId(capability) ? capability.id : UUID.generateUuid(); + this.register({ + id: id, + registerOptions: capability + }); + } + register(data) { + const registrations = []; + const disposables = []; + for (const scheme of data.registerOptions.schemes) { + const [disposable, registration] = this.registerTextDocumentContentProvider(scheme); + registrations.push(registration); + disposables.push(disposable); + } + this._registrations.set(data.id, { disposable: vscode.Disposable.from(...disposables), providers: registrations }); + } + registerTextDocumentContentProvider(scheme) { + const eventEmitter = new vscode.EventEmitter(); + const provider = { + onDidChange: eventEmitter.event, + provideTextDocumentContent: (uri, token) => { + const client = this._client; + const provideTextDocumentContent = (uri, token) => { + const params = { + uri: client.code2ProtocolConverter.asUri(uri) + }; + return client.sendRequest(vscode_languageserver_protocol_1.TextDocumentContentRequest.type, params, token).then((result) => { + if (token.isCancellationRequested) { + return null; + } + return result.text; + }, (error) => { + return client.handleFailedRequest(vscode_languageserver_protocol_1.TextDocumentContentRequest.type, token, error, null); + }); + }; + const middleware = client.middleware; + return middleware.provideTextDocumentContent + ? middleware.provideTextDocumentContent(uri, token, provideTextDocumentContent) + : provideTextDocumentContent(uri, token); + } + }; + return [vscode.workspace.registerTextDocumentContentProvider(scheme, provider), { scheme, onDidChangeEmitter: eventEmitter, provider }]; + } + unregister(id) { + const registration = this._registrations.get(id); + if (registration !== undefined) { + this._registrations.delete(id); + registration.disposable.dispose(); + } + } + clear() { + this._registrations.forEach((registration) => { + registration.disposable.dispose(); + }); + this._registrations.clear(); + } +} +exports.TextDocumentContentFeature = TextDocumentContentFeature; + + +}, +"./node_modules/vscode-languageclient/lib/common/textSynchronization.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DidSaveTextDocumentFeature = exports.WillSaveWaitUntilFeature = exports.WillSaveFeature = exports.DidChangeTextDocumentFeature = exports.DidCloseTextDocumentFeature = exports.DidOpenTextDocumentFeature = void 0; +const vscode_1 = __webpack_require__("vscode"); +const vscode_languageserver_protocol_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js"); +const features_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/features.js"); +const UUID = __importStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/utils/uuid.js")); +const vscode_languageserver_textdocument_1 = __webpack_require__("./node_modules/vscode-languageserver-textdocument/lib/esm/main.js"); +class DidOpenTextDocumentFeature extends features_1.TextDocumentEventFeature { + _syncedDocuments; + _pendingOpenNotifications; + _delayOpen; + _pendingOpenListeners; + constructor(client, syncedDocuments) { + super(client, vscode_1.workspace.onDidOpenTextDocument, vscode_languageserver_protocol_1.DidOpenTextDocumentNotification.type, () => client.middleware.didOpen, (textDocument) => client.code2ProtocolConverter.asOpenTextDocumentParams(textDocument), (data) => data, features_1.TextDocumentEventFeature.textDocumentFilter); + this._syncedDocuments = syncedDocuments; + this._pendingOpenNotifications = new Map(); + this._delayOpen = client.clientOptions.textSynchronization?.delayOpenNotifications ?? false; + } + async callback(document) { + if (!this._delayOpen) { + return super.callback(document); + } + else { + if (!this.matches(document)) { + return; + } + const visibleDocuments = this._client.visibleDocuments; + if (visibleDocuments.isVisible(document)) { + return super.callback(document); + } + else { + // Snapshot the text document so that when we send the delayed + // notification it is based on the content/version at the time + // it would've been sent, and not the updated version. + // + // See https://github.com/microsoft/vscode-languageserver-node/issues/1695 + const snapshot = new TextDocumentSnapshot(document); + this._pendingOpenNotifications.set(snapshot.uri.toString(), snapshot); + } + } + } + get openDocuments() { + return this._syncedDocuments.values(); + } + fillClientCapabilities(capabilities) { + (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'textDocument'), 'synchronization').dynamicRegistration = true; + } + initialize(capabilities, documentSelector) { + const textDocumentSyncOptions = capabilities.resolvedTextDocumentSync; + if (documentSelector && textDocumentSyncOptions && textDocumentSyncOptions.openClose) { + this.register({ id: UUID.generateUuid(), registerOptions: { documentSelector: documentSelector } }); + } + } + get registrationType() { + return vscode_languageserver_protocol_1.DidOpenTextDocumentNotification.type; + } + register(data) { + super.register(data); + if (!data.registerOptions.documentSelector) { + return; + } + const documentSelector = this._client.protocol2CodeConverter.asDocumentSelector(data.registerOptions.documentSelector); + vscode_1.workspace.textDocuments.forEach((textDocument) => { + const uri = textDocument.uri.toString(); + if (this._syncedDocuments.has(uri)) { + return; + } + if (vscode_1.languages.match(documentSelector, textDocument) > 0 && !this._client.hasDedicatedTextSynchronizationFeature(textDocument)) { + const visibleDocuments = this._client.visibleDocuments; + if (visibleDocuments.isVisible(textDocument)) { + const middleware = this._client.middleware; + const didOpen = (textDocument) => { + return this._client.sendNotification(this._type, this._createParams(textDocument)); + }; + (middleware.didOpen ? middleware.didOpen(textDocument, didOpen) : didOpen(textDocument)).catch((error) => { + this._client.error(`Sending document notification ${this._type.method} failed`, error); + }); + this._syncedDocuments.set(uri, textDocument); + } + else { + this._pendingOpenNotifications.set(uri, textDocument); + } + } + }); + if (this._delayOpen && this._pendingOpenListeners === undefined) { + this._pendingOpenListeners = []; + const visibleDocuments = this._client.visibleDocuments; + this._pendingOpenListeners.push(visibleDocuments.onClose((closed) => { + for (const uri of closed) { + this._pendingOpenNotifications.delete(uri.toString()); + } + })); + this._pendingOpenListeners.push(visibleDocuments.onOpen((opened) => { + for (const uri of opened) { + const document = this._pendingOpenNotifications.get(uri.toString()); + if (document !== undefined) { + super.callback(document).catch(((error) => { + this._client.error(`Sending document notification ${this._type.method} failed`, error); + })); + this._pendingOpenNotifications.delete(uri.toString()); + } + } + })); + this._pendingOpenListeners.push(vscode_1.workspace.onDidCloseTextDocument((document) => { + this._pendingOpenNotifications.delete(document.uri.toString()); + })); + } + } + /** + * Sends any pending open notifications unless they are for the document + * being closed. + * + * @param closingDocument The document being closed. + * @returns Whether a pending open notification was dropped because it was + * for the closing document. + */ + async sendPendingOpenNotifications(closingDocument) { + const notifications = Array.from(this._pendingOpenNotifications.values()); + this._pendingOpenNotifications.clear(); + let didDropOpenNotification = false; + for (const notification of notifications) { + if (closingDocument !== undefined && notification.uri.toString() === closingDocument) { + didDropOpenNotification = true; + continue; + } + await super.callback(notification); + } + return didDropOpenNotification; + } + getTextDocument(data) { + return data; + } + notificationSent(textDocument, type, params) { + this._syncedDocuments.set(textDocument.uri.toString(), textDocument); + super.notificationSent(textDocument, type, params); + } + clear() { + this._pendingOpenNotifications.clear(); + if (this._pendingOpenListeners !== undefined) { + for (const listener of this._pendingOpenListeners) { + listener.dispose(); + } + this._pendingOpenListeners = undefined; + } + super.clear(); + } +} +exports.DidOpenTextDocumentFeature = DidOpenTextDocumentFeature; +class DidCloseTextDocumentFeature extends features_1.TextDocumentEventFeature { + _syncedDocuments; + _pendingTextDocumentChanges; + constructor(client, syncedDocuments, pendingTextDocumentChanges) { + super(client, vscode_1.workspace.onDidCloseTextDocument, vscode_languageserver_protocol_1.DidCloseTextDocumentNotification.type, () => client.middleware.didClose, (textDocument) => client.code2ProtocolConverter.asCloseTextDocumentParams(textDocument), (data) => data, features_1.TextDocumentEventFeature.textDocumentFilter); + this._syncedDocuments = syncedDocuments; + this._pendingTextDocumentChanges = pendingTextDocumentChanges; + } + get registrationType() { + return vscode_languageserver_protocol_1.DidCloseTextDocumentNotification.type; + } + fillClientCapabilities(capabilities) { + (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'textDocument'), 'synchronization').dynamicRegistration = true; + } + initialize(capabilities, documentSelector) { + const textDocumentSyncOptions = capabilities.resolvedTextDocumentSync; + if (documentSelector && textDocumentSyncOptions && textDocumentSyncOptions.openClose) { + this.register({ id: UUID.generateUuid(), registerOptions: { documentSelector: documentSelector } }); + } + } + async callback(data) { + await super.callback(data); + this._pendingTextDocumentChanges.delete(data.uri.toString()); + } + getTextDocument(data) { + return data; + } + notificationSent(textDocument, type, params) { + this._syncedDocuments.delete(textDocument.uri.toString()); + super.notificationSent(textDocument, type, params); + } + unregister(id) { + const selector = this._selectors.get(id); + if (selector === undefined) { + return; + } + // The super call removed the selector from the map + // of selectors. + super.unregister(id); + const selectors = this._selectors.values(); + this._syncedDocuments.forEach((textDocument) => { + if (vscode_1.languages.match(selector, textDocument) > 0 && !this._selectorFilter(selectors, textDocument) && !this._client.hasDedicatedTextSynchronizationFeature(textDocument)) { + const middleware = this._client.middleware; + const didClose = (textDocument) => { + return this._client.sendNotification(this._type, this._createParams(textDocument)); + }; + this._syncedDocuments.delete(textDocument.uri.toString()); + (middleware.didClose ? middleware.didClose(textDocument, didClose) : didClose(textDocument)).catch((error) => { + this._client.error(`Sending document notification ${this._type.method} failed`, error); + }); + } + }); + } +} +exports.DidCloseTextDocumentFeature = DidCloseTextDocumentFeature; +class DidChangeTextDocumentFeature extends features_1.DynamicDocumentFeature { + _listener; + _changeData; + _onAboutToSendNotification; + _onNotificationSent; + _onPendingChangeAdded; + _pendingTextDocumentChanges; + _syncKind; + constructor(client, pendingTextDocumentChanges) { + super(client); + this._changeData = new Map(); + this._onAboutToSendNotification = new vscode_1.EventEmitter(); + this._onNotificationSent = new vscode_1.EventEmitter(); + this._onPendingChangeAdded = new vscode_1.EventEmitter(); + this._pendingTextDocumentChanges = pendingTextDocumentChanges; + this._syncKind = vscode_languageserver_protocol_1.TextDocumentSyncKind.None; + } + get onAboutToSendNotification() { + return this._onAboutToSendNotification.event; + } + get onNotificationSent() { + return this._onNotificationSent.event; + } + get onPendingChangeAdded() { + return this._onPendingChangeAdded.event; + } + get syncKind() { + return this._syncKind; + } + get registrationType() { + return vscode_languageserver_protocol_1.DidChangeTextDocumentNotification.type; + } + fillClientCapabilities(capabilities) { + (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'textDocument'), 'synchronization').dynamicRegistration = true; + } + initialize(capabilities, documentSelector) { + const textDocumentSyncOptions = capabilities.resolvedTextDocumentSync; + if (documentSelector && textDocumentSyncOptions && textDocumentSyncOptions.change !== undefined && textDocumentSyncOptions.change !== vscode_languageserver_protocol_1.TextDocumentSyncKind.None) { + this.register({ + id: UUID.generateUuid(), + registerOptions: Object.assign({}, { documentSelector: documentSelector }, { syncKind: textDocumentSyncOptions.change }) + }); + } + } + register(data) { + if (!data.registerOptions.documentSelector) { + return; + } + if (!this._listener) { + this._listener = vscode_1.workspace.onDidChangeTextDocument(this.callback, this); + } + this._changeData.set(data.id, { + syncKind: data.registerOptions.syncKind, + documentSelector: this._client.protocol2CodeConverter.asDocumentSelector(data.registerOptions.documentSelector), + }); + this.updateSyncKind(data.registerOptions.syncKind); + } + *getDocumentSelectors() { + for (const data of this._changeData.values()) { + yield data.documentSelector; + } + } + async callback(event) { + // Text document changes are send for dirty changes as well. We don't + // have dirty / un-dirty events in the LSP so we ignore content changes + // with length zero. + if (event.contentChanges.length === 0) { + return; + } + // We need to capture the URI and version here since they might change on the text document + // until we reach did `didChange` call since the middleware support async execution. + const uri = event.document.uri; + const version = event.document.version; + const promises = []; + for (const changeData of this._changeData.values()) { + if (vscode_1.languages.match(changeData.documentSelector, event.document) > 0 && !this._client.hasDedicatedTextSynchronizationFeature(event.document)) { + const middleware = this._client.middleware; + if (changeData.syncKind === vscode_languageserver_protocol_1.TextDocumentSyncKind.Incremental) { + const didChange = async (event) => { + const params = this._client.code2ProtocolConverter.asChangeTextDocumentParams(event, uri, version); + this.aboutToSendNotification(event.document, vscode_languageserver_protocol_1.DidChangeTextDocumentNotification.type, params); + await this._client.sendNotification(vscode_languageserver_protocol_1.DidChangeTextDocumentNotification.type, params); + this.notificationSent(event.document, vscode_languageserver_protocol_1.DidChangeTextDocumentNotification.type, params); + }; + promises.push(middleware.didChange ? middleware.didChange(event, event => didChange(event)) : didChange(event)); + } + else if (changeData.syncKind === vscode_languageserver_protocol_1.TextDocumentSyncKind.Full) { + const didChange = async (event) => { + const eventUri = event.document.uri.toString(); + this._pendingTextDocumentChanges.set(eventUri, event.document); + this._onPendingChangeAdded.fire(); + }; + promises.push(middleware.didChange ? middleware.didChange(event, event => didChange(event)) : didChange(event)); + } + } + } + return Promise.all(promises).then(undefined, (error) => { + this._client.error(`Sending document notification ${vscode_languageserver_protocol_1.DidChangeTextDocumentNotification.type.method} failed`, error); + throw error; + }); + } + aboutToSendNotification(textDocument, type, params) { + this._onAboutToSendNotification.fire({ textDocument, type, params }); + } + notificationSent(textDocument, type, params) { + this._onNotificationSent.fire({ textDocument, type, params }); + } + unregister(id) { + this._changeData.delete(id); + if (this._changeData.size === 0) { + if (this._listener) { + this._listener.dispose(); + this._listener = undefined; + } + this._syncKind = vscode_languageserver_protocol_1.TextDocumentSyncKind.None; + } + else { + this._syncKind = vscode_languageserver_protocol_1.TextDocumentSyncKind.None; + for (const changeData of this._changeData.values()) { + this.updateSyncKind(changeData.syncKind); + if (this._syncKind === vscode_languageserver_protocol_1.TextDocumentSyncKind.Full) { + break; + } + } + } + } + clear() { + this._pendingTextDocumentChanges.clear(); + this._changeData.clear(); + this._syncKind = vscode_languageserver_protocol_1.TextDocumentSyncKind.None; + if (this._listener) { + this._listener.dispose(); + this._listener = undefined; + } + } + getPendingDocumentChanges(excludes) { + if (this._pendingTextDocumentChanges.size === 0) { + return []; + } + let result; + if (excludes.size === 0) { + result = Array.from(this._pendingTextDocumentChanges.values()); + this._pendingTextDocumentChanges.clear(); + } + else { + result = []; + for (const entry of this._pendingTextDocumentChanges) { + if (!excludes.has(entry[0])) { + result.push(entry[1]); + this._pendingTextDocumentChanges.delete(entry[0]); + } + } + } + return result; + } + getProvider(document) { + for (const changeData of this._changeData.values()) { + if (vscode_1.languages.match(changeData.documentSelector, document) > 0) { + return { + send: (event) => { + return this.callback(event); + } + }; + } + } + return undefined; + } + updateSyncKind(syncKind) { + if (this._syncKind === vscode_languageserver_protocol_1.TextDocumentSyncKind.Full) { + return; + } + switch (syncKind) { + case vscode_languageserver_protocol_1.TextDocumentSyncKind.Full: + this._syncKind = syncKind; + break; + case vscode_languageserver_protocol_1.TextDocumentSyncKind.Incremental: + if (this._syncKind === vscode_languageserver_protocol_1.TextDocumentSyncKind.None) { + this._syncKind = vscode_languageserver_protocol_1.TextDocumentSyncKind.Incremental; + } + break; + } + } +} +exports.DidChangeTextDocumentFeature = DidChangeTextDocumentFeature; +class WillSaveFeature extends features_1.TextDocumentEventFeature { + constructor(client) { + super(client, vscode_1.workspace.onWillSaveTextDocument, vscode_languageserver_protocol_1.WillSaveTextDocumentNotification.type, () => client.middleware.willSave, (willSaveEvent) => client.code2ProtocolConverter.asWillSaveTextDocumentParams(willSaveEvent), (event) => event.document, (selectors, willSaveEvent) => features_1.TextDocumentEventFeature.textDocumentFilter(selectors, willSaveEvent.document)); + } + get registrationType() { + return vscode_languageserver_protocol_1.WillSaveTextDocumentNotification.type; + } + fillClientCapabilities(capabilities) { + const value = (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'textDocument'), 'synchronization'); + value.willSave = true; + } + initialize(capabilities, documentSelector) { + const textDocumentSyncOptions = capabilities.resolvedTextDocumentSync; + if (documentSelector && textDocumentSyncOptions && textDocumentSyncOptions.willSave) { + this.register({ + id: UUID.generateUuid(), + registerOptions: { documentSelector: documentSelector } + }); + } + } + getTextDocument(data) { + return data.document; + } +} +exports.WillSaveFeature = WillSaveFeature; +class WillSaveWaitUntilFeature extends features_1.DynamicDocumentFeature { + _listener; + _selectors; + constructor(client) { + super(client); + this._selectors = new Map(); + } + getDocumentSelectors() { + return this._selectors.values(); + } + get registrationType() { + return vscode_languageserver_protocol_1.WillSaveTextDocumentWaitUntilRequest.type; + } + fillClientCapabilities(capabilities) { + const value = (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'textDocument'), 'synchronization'); + value.willSaveWaitUntil = true; + } + initialize(capabilities, documentSelector) { + const textDocumentSyncOptions = capabilities.resolvedTextDocumentSync; + if (documentSelector && textDocumentSyncOptions && textDocumentSyncOptions.willSaveWaitUntil) { + this.register({ + id: UUID.generateUuid(), + registerOptions: { documentSelector: documentSelector } + }); + } + } + register(data) { + if (!data.registerOptions.documentSelector) { + return; + } + if (!this._listener) { + this._listener = vscode_1.workspace.onWillSaveTextDocument(this.callback, this); + } + this._selectors.set(data.id, this._client.protocol2CodeConverter.asDocumentSelector(data.registerOptions.documentSelector)); + } + callback(event) { + if (features_1.TextDocumentEventFeature.textDocumentFilter(this._selectors.values(), event.document) && !this._client.hasDedicatedTextSynchronizationFeature(event.document)) { + const middleware = this._client.middleware; + const willSaveWaitUntil = (event) => { + return this._client.sendRequest(vscode_languageserver_protocol_1.WillSaveTextDocumentWaitUntilRequest.type, this._client.code2ProtocolConverter.asWillSaveTextDocumentParams(event)).then(async (edits) => { + const vEdits = await this._client.protocol2CodeConverter.asTextEdits(edits); + return vEdits === undefined ? [] : vEdits; + }); + }; + event.waitUntil(middleware.willSaveWaitUntil + ? middleware.willSaveWaitUntil(event, willSaveWaitUntil) + : willSaveWaitUntil(event)); + } + } + unregister(id) { + this._selectors.delete(id); + if (this._selectors.size === 0 && this._listener) { + this._listener.dispose(); + this._listener = undefined; + } + } + clear() { + this._selectors.clear(); + if (this._listener) { + this._listener.dispose(); + this._listener = undefined; + } + } +} +exports.WillSaveWaitUntilFeature = WillSaveWaitUntilFeature; +class DidSaveTextDocumentFeature extends features_1.TextDocumentEventFeature { + _includeText; + constructor(client) { + super(client, vscode_1.workspace.onDidSaveTextDocument, vscode_languageserver_protocol_1.DidSaveTextDocumentNotification.type, () => client.middleware.didSave, (textDocument) => client.code2ProtocolConverter.asSaveTextDocumentParams(textDocument, this._includeText), (data) => data, features_1.TextDocumentEventFeature.textDocumentFilter); + this._includeText = false; + } + get registrationType() { + return vscode_languageserver_protocol_1.DidSaveTextDocumentNotification.type; + } + fillClientCapabilities(capabilities) { + (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'textDocument'), 'synchronization').didSave = true; + } + initialize(capabilities, documentSelector) { + const textDocumentSyncOptions = capabilities.resolvedTextDocumentSync; + if (documentSelector && textDocumentSyncOptions && textDocumentSyncOptions.save) { + const saveOptions = typeof textDocumentSyncOptions.save === 'boolean' + ? { includeText: false } + : { includeText: !!textDocumentSyncOptions.save.includeText }; + this.register({ + id: UUID.generateUuid(), + registerOptions: Object.assign({}, { documentSelector: documentSelector }, saveOptions) + }); + } + } + register(data) { + this._includeText = !!data.registerOptions.includeText; + super.register(data); + } + getTextDocument(data) { + return data; + } +} +exports.DidSaveTextDocumentFeature = DidSaveTextDocumentFeature; +// Copied from https://github.com/microsoft/vscode/src/vs/editor/common/core/wordHelper.ts +const USUAL_WORD_SEPARATORS = '`~!@#$%^&*()-=+[{]}\\|;:\'",.<>/?'; +/** + * Create a word definition regular expression based on default word separators. + * Optionally provide allowed separators that should be included in words. + * + * The default would look like this: + * /(-?\d*\.\d\w*)|([^\`\~\!\@\#\$\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g + */ +function createWordRegExp(allowInWords = '') { + let source = '(-?\\d*\\.\\d\\w*)|([^'; + for (const sep of USUAL_WORD_SEPARATORS) { + if (allowInWords.indexOf(sep) >= 0) { + continue; + } + source += '\\' + sep; + } + source += '\\s]+)'; + return new RegExp(source, 'g'); +} +// catches numbers (including floating numbers) in the first group, and alphanum in the second +const DEFAULT_WORD_REGEXP = createWordRegExp(); +class TextDocumentSnapshot { + _extTextDocument; + _capturedTextDocument; + _content; + _uri; + _fileName; + _languageId; + _version; + _eol; + _isUntitled; + _encoding; + _isDirty; + _isClosed; + constructor(textDocument) { + this._extTextDocument = textDocument; + this._content = textDocument.getText(); + this._uri = textDocument.uri; + this._fileName = textDocument.fileName; + this._languageId = textDocument.languageId; + this._version = textDocument.version; + this._eol = textDocument.eol; + this._isUntitled = textDocument.isUntitled; + this._encoding = textDocument.encoding; + this._isDirty = textDocument.isDirty; + this._isClosed = textDocument.isClosed; + this._capturedTextDocument = vscode_languageserver_textdocument_1.TextDocument.create(this._uri.toString(), this._languageId, this._version, this._content); + } + get uri() { + return this._uri; + } + get languageId() { + return this._languageId; + } + get version() { + return this._version; + } + get eol() { + return this._eol; + } + get isUntitled() { + return this._isUntitled; + } + get encoding() { + return this._encoding; + } + get fileName() { + return this._fileName; + } + get isDirty() { + return this._isDirty; + } + get isClosed() { + return this._isClosed; + } + save() { + return this.version === this._extTextDocument.version + ? this._extTextDocument.save() + : Promise.resolve(false); + } + get lineCount() { + return this._capturedTextDocument.lineCount; + } + offsetAt(position) { + return this._capturedTextDocument.offsetAt(position); + } + positionAt(offset) { + const position = this._capturedTextDocument.positionAt(offset); + return new vscode_1.Position(position.line, position.character); + } + getText(range) { + return this._capturedTextDocument.getText(range); + } + lineAt(lineOrPosition) { + const line = typeof lineOrPosition === 'number' ? lineOrPosition : this.validatePosition(lineOrPosition).line; + if (line < 0 || line >= this.lineCount) { + throw new RangeError(`Illegal value for line: ${line}`); + } + const lineRange = this._capturedTextDocument.getLineRange(line); + const text = this._capturedTextDocument.getText(lineRange); + const firstNonWhitespaceCharacterIndex = text.search(/\S/); + const range = new vscode_1.Range(lineRange.start.line, lineRange.start.character, lineRange.end.line, lineRange.end.character); + const rangeIncludingLineBreak = line + 1 < this.lineCount + ? new vscode_1.Range(range.start.line, range.start.character, line + 1, 0) + : range; + return { + lineNumber: line, + text, + range, + rangeIncludingLineBreak, + firstNonWhitespaceCharacterIndex: firstNonWhitespaceCharacterIndex === -1 ? text.length : firstNonWhitespaceCharacterIndex, + isEmptyOrWhitespace: firstNonWhitespaceCharacterIndex === -1 + }; + } + getWordRangeAtPosition(position, regex) { + const lineNumber = this.validatePosition(position).line; + const lineText = this.lineAt(lineNumber).text; + const wordRegex = TextDocumentSnapshot.getWordRegExp(regex); + let match; + wordRegex.lastIndex = 0; + while ((match = wordRegex.exec(lineText)) !== null) { + if (match.index <= position.character && wordRegex.lastIndex >= position.character) { + return new vscode_1.Range(lineNumber, match.index, lineNumber, wordRegex.lastIndex); + } + } + return undefined; + } + validateRange(range) { + const start = this.validatePosition(range.start); + const end = this.validatePosition(range.end); + if (start === range.start && end === range.end) { + return range; + } + return new vscode_1.Range(start.line, start.character, end.line, end.character); + } + validatePosition(position) { + const line = Math.min(Math.max(position.line, 0), this.lineCount - 1); + const lineRange = this._capturedTextDocument.getLineRange(line); + const character = Math.min(Math.max(position.character, 0), lineRange.end.character); + if (line === position.line && character === position.character) { + return position; + } + return new vscode_1.Position(line, character); + } + static getWordRegExp(regex) { + const result = regex ?? DEFAULT_WORD_REGEXP; + if (result.flags.includes('g')) { + return result; + } + const flags = `${result.flags}g`; + return new RegExp(result.source, flags); + } +} + + +}, +"./node_modules/vscode-languageclient/lib/common/typeDefinition.js"(__unused_rspack_module, exports, __webpack_require__) { +var __rspack_unused_export; + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +__rspack_unused_export = ({ value: true }); +exports.TypeDefinitionFeature = void 0; +const vscode_1 = __webpack_require__("vscode"); +const vscode_languageserver_protocol_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js"); +const features_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/features.js"); +class TypeDefinitionFeature extends features_1.TextDocumentLanguageFeature { + constructor(client) { + super(client, vscode_languageserver_protocol_1.TypeDefinitionRequest.type); + } + fillClientCapabilities(capabilities) { + (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'textDocument'), 'typeDefinition').dynamicRegistration = true; + const typeDefinitionSupport = (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'textDocument'), 'typeDefinition'); + typeDefinitionSupport.dynamicRegistration = true; + typeDefinitionSupport.linkSupport = true; + } + initialize(capabilities, documentSelector) { + const [id, options] = this.getRegistration(documentSelector, capabilities.typeDefinitionProvider); + if (!id || !options) { + return; + } + this.register({ id: id, registerOptions: options }); + } + registerLanguageProvider(options) { + const selector = options.documentSelector; + const provider = { + provideTypeDefinition: (document, position, token) => { + const client = this._client; + const provideTypeDefinition = (document, position, token) => { + return client.sendRequest(vscode_languageserver_protocol_1.TypeDefinitionRequest.type, client.code2ProtocolConverter.asTextDocumentPositionParams(document, position), token).then((result) => { + if (token.isCancellationRequested) { + return null; + } + return client.protocol2CodeConverter.asDefinitionResult(result, token); + }, (error) => { + return client.handleFailedRequest(vscode_languageserver_protocol_1.TypeDefinitionRequest.type, token, error, null); + }); + }; + const middleware = client.middleware; + return middleware.provideTypeDefinition + ? middleware.provideTypeDefinition(document, position, token, provideTypeDefinition) + : provideTypeDefinition(document, position, token); + } + }; + return [this.registerProvider(selector, provider), provider]; + } + registerProvider(selector, provider) { + return vscode_1.languages.registerTypeDefinitionProvider(this._client.protocol2CodeConverter.asDocumentSelector(selector), provider); + } +} +exports.TypeDefinitionFeature = TypeDefinitionFeature; + + +}, +"./node_modules/vscode-languageclient/lib/common/typeHierarchy.js"(__unused_rspack_module, exports, __webpack_require__) { +var __rspack_unused_export; + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +__rspack_unused_export = ({ value: true }); +exports.TypeHierarchyFeature = void 0; +const vscode_1 = __webpack_require__("vscode"); +const vscode_languageserver_protocol_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js"); +const features_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/features.js"); +class TypeHierarchyProvider { + client; + middleware; + constructor(client) { + this.client = client; + this.middleware = client.middleware; + } + prepareTypeHierarchy(document, position, token) { + const client = this.client; + const middleware = this.middleware; + const prepareTypeHierarchy = (document, position, token) => { + const params = client.code2ProtocolConverter.asTextDocumentPositionParams(document, position); + return client.sendRequest(vscode_languageserver_protocol_1.TypeHierarchyPrepareRequest.type, params, token).then((result) => { + if (token.isCancellationRequested) { + return null; + } + return client.protocol2CodeConverter.asTypeHierarchyItems(result, token); + }, (error) => { + return client.handleFailedRequest(vscode_languageserver_protocol_1.TypeHierarchyPrepareRequest.type, token, error, null); + }); + }; + return middleware.prepareTypeHierarchy + ? middleware.prepareTypeHierarchy(document, position, token, prepareTypeHierarchy) + : prepareTypeHierarchy(document, position, token); + } + provideTypeHierarchySupertypes(item, token) { + const client = this.client; + const middleware = this.middleware; + const provideTypeHierarchySupertypes = (item, token) => { + const params = { + item: client.code2ProtocolConverter.asTypeHierarchyItem(item) + }; + return client.sendRequest(vscode_languageserver_protocol_1.TypeHierarchySupertypesRequest.type, params, token).then((result) => { + if (token.isCancellationRequested) { + return null; + } + return client.protocol2CodeConverter.asTypeHierarchyItems(result, token); + }, (error) => { + return client.handleFailedRequest(vscode_languageserver_protocol_1.TypeHierarchySupertypesRequest.type, token, error, null); + }); + }; + return middleware.provideTypeHierarchySupertypes + ? middleware.provideTypeHierarchySupertypes(item, token, provideTypeHierarchySupertypes) + : provideTypeHierarchySupertypes(item, token); + } + provideTypeHierarchySubtypes(item, token) { + const client = this.client; + const middleware = this.middleware; + const provideTypeHierarchySubtypes = (item, token) => { + const params = { + item: client.code2ProtocolConverter.asTypeHierarchyItem(item) + }; + return client.sendRequest(vscode_languageserver_protocol_1.TypeHierarchySubtypesRequest.type, params, token).then((result) => { + if (token.isCancellationRequested) { + return null; + } + return client.protocol2CodeConverter.asTypeHierarchyItems(result, token); + }, (error) => { + return client.handleFailedRequest(vscode_languageserver_protocol_1.TypeHierarchySubtypesRequest.type, token, error, null); + }); + }; + return middleware.provideTypeHierarchySubtypes + ? middleware.provideTypeHierarchySubtypes(item, token, provideTypeHierarchySubtypes) + : provideTypeHierarchySubtypes(item, token); + } +} +class TypeHierarchyFeature extends features_1.TextDocumentLanguageFeature { + constructor(client) { + super(client, vscode_languageserver_protocol_1.TypeHierarchyPrepareRequest.type); + } + fillClientCapabilities(capabilities) { + const capability = (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'textDocument'), 'typeHierarchy'); + capability.dynamicRegistration = true; + } + initialize(capabilities, documentSelector) { + const [id, options] = this.getRegistration(documentSelector, capabilities.typeHierarchyProvider); + if (!id || !options) { + return; + } + this.register({ id: id, registerOptions: options }); + } + registerLanguageProvider(options) { + const client = this._client; + const provider = new TypeHierarchyProvider(client); + return [vscode_1.languages.registerTypeHierarchyProvider(client.protocol2CodeConverter.asDocumentSelector(options.documentSelector), provider), provider]; + } +} +exports.TypeHierarchyFeature = TypeHierarchyFeature; + + +}, +"./node_modules/vscode-languageclient/lib/common/utils/async.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Semaphore = exports.Delayer = void 0; +exports.setTestMode = setTestMode; +exports.clearTestMode = clearTestMode; +exports.map = map; +exports.mapAsync = mapAsync; +exports.forEach = forEach; +const vscode_languageserver_protocol_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js"); +class Delayer { + defaultDelay; + timeout; + completionPromise; + onSuccess; + task; + constructor(defaultDelay) { + this.defaultDelay = defaultDelay; + this.timeout = undefined; + this.completionPromise = undefined; + this.onSuccess = undefined; + this.task = undefined; + } + trigger(task, delay = this.defaultDelay) { + this.task = task; + if (delay >= 0) { + this.cancelTimeout(); + } + if (!this.completionPromise) { + this.completionPromise = new Promise((resolve) => { + this.onSuccess = resolve; + }).then(() => { + this.completionPromise = undefined; + this.onSuccess = undefined; + const result = this.task(); + this.task = undefined; + return result; + }); + } + if (delay >= 0 || this.timeout === void 0) { + this.timeout = (0, vscode_languageserver_protocol_1.RAL)().timer.setTimeout(() => { + this.timeout = undefined; + this.onSuccess(undefined); + }, delay >= 0 ? delay : this.defaultDelay); + } + return this.completionPromise; + } + forceDelivery() { + if (!this.completionPromise) { + return undefined; + } + this.cancelTimeout(); + const result = this.task(); + this.completionPromise = undefined; + this.onSuccess = undefined; + this.task = undefined; + return result; + } + isTriggered() { + return this.timeout !== undefined; + } + cancel() { + this.cancelTimeout(); + this.completionPromise = undefined; + } + cancelTimeout() { + if (this.timeout !== undefined) { + this.timeout.dispose(); + this.timeout = undefined; + } + } +} +exports.Delayer = Delayer; +class Semaphore { + _capacity; + _active; + _waiting; + constructor(capacity = 1) { + if (capacity <= 0) { + throw new Error('Capacity must be greater than 0'); + } + this._capacity = capacity; + this._active = 0; + this._waiting = []; + } + lock(thunk) { + return new Promise((resolve, reject) => { + this._waiting.push({ thunk, resolve, reject }); + this.runNext(); + }); + } + get active() { + return this._active; + } + runNext() { + if (this._waiting.length === 0 || this._active === this._capacity) { + return; + } + (0, vscode_languageserver_protocol_1.RAL)().timer.setImmediate(() => this.doRunNext()); + } + doRunNext() { + if (this._waiting.length === 0 || this._active === this._capacity) { + return; + } + const next = this._waiting.shift(); + this._active++; + if (this._active > this._capacity) { + throw new Error(`To many thunks active`); + } + try { + const result = next.thunk(); + if (result instanceof Promise) { + result.then((value) => { + this._active--; + next.resolve(value); + this.runNext(); + }, (err) => { + this._active--; + next.reject(err); + this.runNext(); + }); + } + else { + this._active--; + next.resolve(result); + this.runNext(); + } + } + catch (err) { + this._active--; + next.reject(err); + this.runNext(); + } + } +} +exports.Semaphore = Semaphore; +let $test = false; +function setTestMode() { + $test = true; +} +function clearTestMode() { + $test = false; +} +const defaultYieldTimeout = 15 /*ms*/; +class Timer { + yieldAfter; + startTime; + counter; + total; + counterInterval; + constructor(yieldAfter = defaultYieldTimeout) { + this.yieldAfter = $test === true ? Math.max(yieldAfter, 2) : Math.max(yieldAfter, defaultYieldTimeout); + this.startTime = Date.now(); + this.counter = 0; + this.total = 0; + // start with a counter interval of 1. + this.counterInterval = 1; + } + start() { + this.counter = 0; + this.total = 0; + this.counterInterval = 1; + this.startTime = Date.now(); + } + shouldYield() { + if (++this.counter >= this.counterInterval) { + const timeTaken = Date.now() - this.startTime; + const timeLeft = Math.max(0, this.yieldAfter - timeTaken); + this.total += this.counter; + this.counter = 0; + if (timeTaken >= this.yieldAfter || timeLeft <= 1) { + // Yield also if time left <= 1 since we compute the counter + // for max < 2 ms. + // Start with interval 1 again. We could do some calculation + // with using 80% of the last counter however other things (GC) + // affect the timing heavily since we have small timings (1 - 15ms). + this.counterInterval = 1; + this.total = 0; + return true; + } + else { + // Only increase the counter until we have spent <= 2 ms. Increasing + // the counter further is very fragile since timing is influenced + // by other things and can increase the counter too much. This will result + // that we yield in average after [14 - 16]ms. + switch (timeTaken) { + case 0: + case 1: + this.counterInterval = this.total * 2; + break; + } + } + } + return false; + } +} +async function map(items, func, token, options) { + if (items.length === 0) { + return []; + } + const result = new Array(items.length); + const timer = new Timer(options?.yieldAfter); + function convertBatch(start) { + timer.start(); + for (let i = start; i < items.length; i++) { + result[i] = func(items[i]); + if (timer.shouldYield()) { + options?.yieldCallback && options.yieldCallback(); + return i + 1; + } + } + return -1; + } + // Convert the first batch sync on the same frame. + let index = convertBatch(0); + while (index !== -1) { + if (token !== undefined && token.isCancellationRequested) { + break; + } + index = await new Promise((resolve) => { + (0, vscode_languageserver_protocol_1.RAL)().timer.setImmediate(() => { + if (token !== undefined && token.isCancellationRequested) { + resolve(-1); + } + else { + resolve(convertBatch(index)); + } + }); + }); + } + return result; +} +async function mapAsync(items, func, token, options) { + if (items.length === 0) { + return []; + } + const result = new Array(items.length); + const timer = new Timer(options?.yieldAfter); + async function convertBatch(start) { + timer.start(); + for (let i = start; i < items.length; i++) { + result[i] = await func(items[i], token); + if (timer.shouldYield()) { + options?.yieldCallback && options.yieldCallback(); + return i + 1; + } + } + return -1; + } + let index = await convertBatch(0); + while (index !== -1) { + if (token !== undefined && token.isCancellationRequested) { + break; + } + index = await new Promise((resolve) => { + (0, vscode_languageserver_protocol_1.RAL)().timer.setImmediate(() => { + if (token !== undefined && token.isCancellationRequested) { + resolve(-1); + } + else { + resolve(convertBatch(index)); + } + }); + }); + } + return result; +} +async function forEach(items, func, token, options) { + if (items.length === 0) { + return; + } + const timer = new Timer(options?.yieldAfter); + function runBatch(start) { + timer.start(); + for (let i = start; i < items.length; i++) { + func(items[i]); + if (timer.shouldYield()) { + options?.yieldCallback && options.yieldCallback(); + return i + 1; + } + } + return -1; + } + // Convert the first batch sync on the same frame. + let index = runBatch(0); + while (index !== -1) { + if (token !== undefined && token.isCancellationRequested) { + break; + } + index = await new Promise((resolve) => { + (0, vscode_languageserver_protocol_1.RAL)().timer.setImmediate(() => { + if (token !== undefined && token.isCancellationRequested) { + resolve(-1); + } + else { + resolve(runBatch(index)); + } + }); + }); + } +} + + +}, +"./node_modules/vscode-languageclient/lib/common/utils/globPattern.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.matchGlobPattern = matchGlobPattern; +const minimatch = __importStar(__webpack_require__("./node_modules/minimatch/dist/commonjs/index.js")); +const vscode_1 = __webpack_require__("vscode"); +function matchGlobPattern(pattern, resource) { + let miniMatchPattern; + if (typeof pattern === 'string') { + miniMatchPattern = pattern.replace(/\\/g, '/'); + } + else { + try { + const baseUri = vscode_1.Uri.parse(typeof pattern.baseUri === 'string' ? pattern.baseUri : pattern.baseUri.uri); + miniMatchPattern = baseUri.with({ path: baseUri.path + '/' + pattern.pattern }).fsPath.replace(/\\/g, '/'); + } + catch (error) { + return false; + } + } + const matcher = new minimatch.Minimatch(miniMatchPattern, { noext: true }); + if (!matcher.makeRe()) { + return false; + } + return matcher.match(resource.fsPath); +} + + +}, +"./node_modules/vscode-languageclient/lib/common/utils/is.js"(__unused_rspack_module, exports) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.boolean = boolean; +exports.string = string; +exports.number = number; +exports.error = error; +exports.func = func; +exports.array = array; +exports.stringArray = stringArray; +exports.typedArray = typedArray; +exports.thenable = thenable; +exports.asPromise = asPromise; +function boolean(value) { + return value === true || value === false; +} +function string(value) { + return typeof value === 'string' || value instanceof String; +} +function number(value) { + return typeof value === 'number' || value instanceof Number; +} +function error(value) { + return value instanceof Error; +} +function func(value) { + return typeof value === 'function'; +} +function array(value) { + return Array.isArray(value); +} +function stringArray(value) { + return array(value) && value.every(elem => string(elem)); +} +function typedArray(value, check) { + return Array.isArray(value) && value.every(check); +} +function thenable(value) { + return value && func(value.then); +} +function asPromise(value) { + if (value instanceof Promise) { + return value; + } + else if (thenable(value)) { + return new Promise((resolve, reject) => { + value.then((resolved) => resolve(resolved), (error) => reject(error)); + }); + } + else { + return Promise.resolve(value); + } +} + + +}, +"./node_modules/vscode-languageclient/lib/common/utils/uuid.js"(__unused_rspack_module, exports) { + +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.empty = void 0; +exports.v4 = v4; +exports.isUUID = isUUID; +exports.parse = parse; +exports.generateUuid = generateUuid; +class ValueUUID { + _value; + constructor(_value) { + this._value = _value; + // empty + } + asHex() { + return this._value; + } + equals(other) { + return this.asHex() === other.asHex(); + } +} +class V4UUID extends ValueUUID { + static _chars = ['0', '1', '2', '3', '4', '5', '6', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f']; + static _timeHighBits = ['8', '9', 'a', 'b']; + static _oneOf(array) { + return array[Math.floor(array.length * Math.random())]; + } + static _randomHex() { + return V4UUID._oneOf(V4UUID._chars); + } + constructor() { + super([ + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + '-', + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + '-', + '4', + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + '-', + V4UUID._oneOf(V4UUID._timeHighBits), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + '-', + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + V4UUID._randomHex(), + ].join('')); + } +} +/** + * An empty UUID that contains only zeros. + */ +exports.empty = new ValueUUID('00000000-0000-0000-0000-000000000000'); +function v4() { + return new V4UUID(); +} +const _UUIDPattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i; +function isUUID(value) { + return _UUIDPattern.test(value); +} +/** + * Parses a UUID that is of the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. + * @param value A uuid string. + */ +function parse(value) { + if (!isUUID(value)) { + throw new Error('invalid uuid'); + } + return new ValueUUID(value); +} +function generateUuid() { + return v4().asHex(); +} + + +}, +"./node_modules/vscode-languageclient/lib/common/workspaceFolder.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.WorkspaceFoldersFeature = void 0; +exports.arrayDiff = arrayDiff; +const UUID = __importStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/utils/uuid.js")); +const vscode_1 = __webpack_require__("vscode"); +const vscode_languageserver_protocol_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js"); +function access(target, key) { + if (target === undefined || target === null) { + return undefined; + } + return target[key]; +} +function arrayDiff(left, right) { + return left.filter(element => right.indexOf(element) < 0); +} +class WorkspaceFoldersFeature { + _client; + _listeners; + _initialFolders; + constructor(client) { + this._client = client; + this._listeners = new Map(); + } + getState() { + return { kind: 'workspace', id: this.registrationType.method, registrations: this._listeners.size > 0 }; + } + get registrationType() { + return vscode_languageserver_protocol_1.DidChangeWorkspaceFoldersNotification.type; + } + fillInitializeParams(params) { + const folders = vscode_1.workspace.workspaceFolders; + this.initializeWithFolders(folders); + if (folders === void 0) { + params.workspaceFolders = null; + } + else { + params.workspaceFolders = folders.map(folder => this.asProtocol(folder)); + } + } + initializeWithFolders(currentWorkspaceFolders) { + this._initialFolders = currentWorkspaceFolders; + } + fillClientCapabilities(capabilities) { + capabilities.workspace = capabilities.workspace || {}; + capabilities.workspace.workspaceFolders = true; + } + initialize(capabilities) { + const client = this._client; + client.onRequest(vscode_languageserver_protocol_1.WorkspaceFoldersRequest.type, (token) => { + const workspaceFolders = () => { + const folders = vscode_1.workspace.workspaceFolders; + if (folders === undefined) { + return null; + } + const result = folders.map((folder) => { + return this.asProtocol(folder); + }); + return result; + }; + const middleware = client.middleware.workspace; + return middleware && middleware.workspaceFolders + ? middleware.workspaceFolders(token, workspaceFolders) + : workspaceFolders(token); + }); + const value = access(access(access(capabilities, 'workspace'), 'workspaceFolders'), 'changeNotifications'); + let id; + if (typeof value === 'string') { + id = value; + } + else if (value === true) { + id = UUID.generateUuid(); + } + if (id) { + this.register({ id: id, registerOptions: undefined }); + } + } + sendInitialEvent(currentWorkspaceFolders) { + let promise; + if (this._initialFolders && currentWorkspaceFolders) { + const removed = arrayDiff(this._initialFolders, currentWorkspaceFolders); + const added = arrayDiff(currentWorkspaceFolders, this._initialFolders); + if (added.length > 0 || removed.length > 0) { + promise = this.doSendEvent(added, removed); + } + } + else if (this._initialFolders) { + promise = this.doSendEvent([], this._initialFolders); + } + else if (currentWorkspaceFolders) { + promise = this.doSendEvent(currentWorkspaceFolders, []); + } + if (promise !== undefined) { + promise.catch((error) => { + this._client.error(`Sending notification ${vscode_languageserver_protocol_1.DidChangeWorkspaceFoldersNotification.type.method} failed`, error); + }); + } + } + doSendEvent(addedFolders, removedFolders) { + const params = { + event: { + added: addedFolders.map(folder => this.asProtocol(folder)), + removed: removedFolders.map(folder => this.asProtocol(folder)) + } + }; + return this._client.sendNotification(vscode_languageserver_protocol_1.DidChangeWorkspaceFoldersNotification.type, params); + } + register(data) { + const id = data.id; + const client = this._client; + const disposable = vscode_1.workspace.onDidChangeWorkspaceFolders((event) => { + const didChangeWorkspaceFolders = (event) => { + return this.doSendEvent(event.added, event.removed); + }; + const middleware = client.middleware.workspace; + const promise = middleware && middleware.didChangeWorkspaceFolders + ? middleware.didChangeWorkspaceFolders(event, didChangeWorkspaceFolders) + : didChangeWorkspaceFolders(event); + promise.catch((error) => { + this._client.error(`Sending notification ${vscode_languageserver_protocol_1.DidChangeWorkspaceFoldersNotification.type.method} failed`, error); + }); + }); + this._listeners.set(id, disposable); + this.sendInitialEvent(vscode_1.workspace.workspaceFolders); + } + unregister(id) { + const disposable = this._listeners.get(id); + if (disposable === void 0) { + return; + } + this._listeners.delete(id); + disposable.dispose(); + } + clear() { + for (const disposable of this._listeners.values()) { + disposable.dispose(); + } + this._listeners.clear(); + } + asProtocol(workspaceFolder) { + if (workspaceFolder === void 0) { + return null; + } + return { uri: this._client.code2ProtocolConverter.asUri(workspaceFolder.uri), name: workspaceFolder.name }; + } +} +exports.WorkspaceFoldersFeature = WorkspaceFoldersFeature; + + +}, +"./node_modules/vscode-languageclient/lib/common/workspaceSymbol.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.WorkspaceSymbolFeature = void 0; +const vscode_1 = __webpack_require__("vscode"); +const vscode_languageserver_protocol_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js"); +const features_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/features.js"); +const documentSymbol_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/documentSymbol.js"); +const UUID = __importStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/utils/uuid.js")); +class WorkspaceSymbolFeature extends features_1.WorkspaceFeature { + constructor(client) { + super(client, vscode_languageserver_protocol_1.WorkspaceSymbolRequest.type); + } + fillClientCapabilities(capabilities) { + const symbolCapabilities = (0, features_1.ensure)((0, features_1.ensure)(capabilities, 'workspace'), 'symbol'); + symbolCapabilities.dynamicRegistration = true; + symbolCapabilities.symbolKind = { + valueSet: documentSymbol_1.SupportedSymbolKinds + }; + symbolCapabilities.tagSupport = { + valueSet: documentSymbol_1.SupportedSymbolTags + }; + symbolCapabilities.resolveSupport = { properties: ['location.range'] }; + } + initialize(capabilities) { + if (!capabilities.workspaceSymbolProvider) { + return; + } + this.register({ + id: UUID.generateUuid(), + registerOptions: capabilities.workspaceSymbolProvider === true ? { workDoneProgress: false } : capabilities.workspaceSymbolProvider + }); + } + registerLanguageProvider(options) { + const provider = { + provideWorkspaceSymbols: (query, token) => { + const client = this._client; + const provideWorkspaceSymbols = (query, token) => { + return client.sendRequest(vscode_languageserver_protocol_1.WorkspaceSymbolRequest.type, { query }, token).then((result) => { + if (token.isCancellationRequested) { + return null; + } + return client.protocol2CodeConverter.asSymbolInformations(result, token); + }, (error) => { + return client.handleFailedRequest(vscode_languageserver_protocol_1.WorkspaceSymbolRequest.type, token, error, null); + }); + }; + const middleware = client.middleware; + return middleware.provideWorkspaceSymbols + ? middleware.provideWorkspaceSymbols(query, token, provideWorkspaceSymbols) + : provideWorkspaceSymbols(query, token); + }, + resolveWorkspaceSymbol: options.resolveProvider === true + ? (item, token) => { + const client = this._client; + const resolveWorkspaceSymbol = (item, token) => { + return client.sendRequest(vscode_languageserver_protocol_1.WorkspaceSymbolResolveRequest.type, client.code2ProtocolConverter.asWorkspaceSymbol(item), token).then((result) => { + if (token.isCancellationRequested) { + return null; + } + return client.protocol2CodeConverter.asSymbolInformation(result); + }, (error) => { + return client.handleFailedRequest(vscode_languageserver_protocol_1.WorkspaceSymbolResolveRequest.type, token, error, null); + }); + }; + const middleware = client.middleware; + return middleware.resolveWorkspaceSymbol + ? middleware.resolveWorkspaceSymbol(item, token, resolveWorkspaceSymbol) + : resolveWorkspaceSymbol(item, token); + } + : undefined + }; + return [vscode_1.languages.registerWorkspaceSymbolProvider(provider), provider]; + } +} +exports.WorkspaceSymbolFeature = WorkspaceSymbolFeature; + + +}, +"./node_modules/vscode-languageclient/lib/node/main.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SettingMonitor = exports.LanguageClient = exports.TransportKind = void 0; +const cp = __importStar(__webpack_require__("child_process")); +const fs = __importStar(__webpack_require__("fs")); +const path = __importStar(__webpack_require__("path")); +const readline = __importStar(__webpack_require__("readline")); +const vscode_1 = __webpack_require__("vscode"); +const Is = __importStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/utils/is.js")); +const client_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/common/client.js"); +const processes_1 = __webpack_require__("./node_modules/vscode-languageclient/lib/node/processes.js"); +const node_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/node/main.js"); +// Import SemVer functions individually to avoid circular dependencies in SemVer +const semverParse = __webpack_require__("./node_modules/semver/functions/parse.js"); +const semverSatisfies = __webpack_require__("./node_modules/semver/functions/satisfies.js"); +__exportStar(__webpack_require__("./node_modules/vscode-languageserver-protocol/lib/node/main.js"), exports); +__exportStar(__webpack_require__("./node_modules/vscode-languageclient/lib/common/api.js"), exports); +const REQUIRED_VSCODE_VERSION = '^1.91.0'; // do not change format, updated by `updateVSCode` script +var TransportKind; +(function (TransportKind) { + TransportKind[TransportKind["stdio"] = 0] = "stdio"; + TransportKind[TransportKind["ipc"] = 1] = "ipc"; + TransportKind[TransportKind["pipe"] = 2] = "pipe"; + TransportKind[TransportKind["socket"] = 3] = "socket"; +})(TransportKind || (exports.TransportKind = TransportKind = {})); +var Transport; +(function (Transport) { + function isSocket(value) { + const candidate = value; + return candidate && candidate.kind === TransportKind.socket && Is.number(candidate.port); + } + Transport.isSocket = isSocket; +})(Transport || (Transport = {})); +var Executable; +(function (Executable) { + function is(value) { + return Is.string(value.command); + } + Executable.is = is; +})(Executable || (Executable = {})); +var NodeModule; +(function (NodeModule) { + function is(value) { + return Is.string(value.module); + } + NodeModule.is = is; +})(NodeModule || (NodeModule = {})); +var StreamInfo; +(function (StreamInfo) { + function is(value) { + const candidate = value; + return candidate && candidate.writer !== undefined && candidate.reader !== undefined; + } + StreamInfo.is = is; +})(StreamInfo || (StreamInfo = {})); +var ChildProcessInfo; +(function (ChildProcessInfo) { + function is(value) { + const candidate = value; + return candidate && candidate.process !== undefined && typeof candidate.detached === 'boolean'; + } + ChildProcessInfo.is = is; +})(ChildProcessInfo || (ChildProcessInfo = {})); +class LanguageClient extends client_1.BaseLanguageClient { + _serverOptions; + _forceDebug; + _serverProcess; + _isDetached; + _isInDebugMode; + constructor(arg1, arg2, arg3, arg4, arg5) { + let id; + let name; + let serverOptions; + let clientOptions; + let forceDebug; + if (Is.string(arg2)) { + id = arg1; + name = arg2; + serverOptions = arg3; + clientOptions = arg4; + forceDebug = !!arg5; + } + else { + id = arg1.toLowerCase(); + name = arg1; + serverOptions = arg2; + clientOptions = arg3; + forceDebug = arg4; + } + if (forceDebug === undefined) { + forceDebug = false; + } + super(id, name, clientOptions); + this._serverOptions = serverOptions; + this._forceDebug = forceDebug; + this._isInDebugMode = forceDebug; + try { + this.checkVersion(); + } + catch (error) { + if (Is.string(error.message)) { + this.outputChannel.appendLine(error.message); + } + throw error; + } + } + checkVersion() { + const codeVersion = semverParse(vscode_1.version); + if (!codeVersion) { + throw new Error(`No valid VS Code version detected. Version string is: ${vscode_1.version}`); + } + // Remove the insider pre-release since we stay API compatible. + if (codeVersion.prerelease && codeVersion.prerelease.length > 0) { + codeVersion.prerelease = []; + } + if (!semverSatisfies(codeVersion, REQUIRED_VSCODE_VERSION)) { + throw new Error(`The language client requires VS Code version ${REQUIRED_VSCODE_VERSION} but received version ${vscode_1.version}`); + } + } + get isInDebugMode() { + return this._isInDebugMode; + } + get serverProcess() { + return this._serverProcess; + } + async restart() { + await this.stop(); + // We are in debug mode. Wait a little before we restart + // so that the debug port can be freed. We can safely ignore + // the disposable returned from start since it will call + // stop on the same client instance. + if (this.isInDebugMode) { + await new Promise((resolve) => setTimeout(resolve, 1000)); + await this.start(); + } + else { + await this.start(); + } + } + shutdown(mode, timeout = 2000) { + return super.shutdown(mode, timeout).finally(() => { + if (this._serverProcess) { + const toCheck = this._serverProcess; + this._serverProcess = undefined; + if (this._isDetached === undefined || !this._isDetached) { + this.checkProcessDied(toCheck); + } + this._isDetached = undefined; + } + }); + } + checkProcessDied(childProcess) { + if (!childProcess || childProcess.pid === undefined) { + return; + } + setTimeout(() => { + // Test if the process is still alive. Throws an exception if not + try { + if (childProcess.pid !== undefined) { + process.kill(childProcess.pid, 0); + (0, processes_1.terminate)(childProcess); + } + } + catch (error) { + // All is fine. + } + }, 2000); + } + handleConnectionClosed() { + this._serverProcess = undefined; + return super.handleConnectionClosed(); + } + fillInitializeParams(params) { + super.fillInitializeParams(params); + if (params.processId === null) { + params.processId = process.pid; + } + } + createMessageTransports(_encoding) { + function getEnvironment(env, fork) { + if (!env && !fork) { + return undefined; + } + const result = Object.create(null); + Object.keys(process.env).forEach(key => result[key] = process.env[key]); + if (fork) { + result['ELECTRON_RUN_AS_NODE'] = '1'; + result['ELECTRON_NO_ASAR'] = '1'; + } + if (env) { + Object.keys(env).forEach(key => result[key] = env[key]); + } + return result; + } + const debugStartWith = ['--debug=', '--debug-brk=', '--inspect=', '--inspect-brk=']; + const debugEquals = ['--debug', '--debug-brk', '--inspect', '--inspect-brk']; + function startedInDebugMode() { + const args = process.execArgv; + if (args) { + return args.some((arg) => { + return debugStartWith.some(value => arg.startsWith(value)) || + debugEquals.some(value => arg === value); + }); + } + return false; + } + function assertStdio(process) { + if (process.stdin === null || process.stdout === null || process.stderr === null) { + throw new Error('Process created without stdio streams'); + } + } + function pipeStdoutToLogOutputChannel(input, outputChannel) { + readline.createInterface({ + input: input, + crlfDelay: Infinity, + terminal: false, + historySize: 0, + }).on('line', data => outputChannel.info(data)); + } + function pipeStderrToLogOutputChannel(input, outputChannel) { + readline.createInterface({ + input: input, + crlfDelay: Infinity, + terminal: false, + historySize: 0, + }).on('line', data => outputChannel.error(data)); + } + const server = this._serverOptions; + // We got a function. + if (Is.func(server)) { + return server().then((result) => { + if (client_1.MessageTransports.is(result)) { + this._isDetached = !!result.detached; + return result; + } + else if (StreamInfo.is(result)) { + this._isDetached = !!result.detached; + return { reader: new node_1.StreamMessageReader(result.reader), writer: new node_1.StreamMessageWriter(result.writer) }; + } + else { + let cp; + if (ChildProcessInfo.is(result)) { + cp = result.process; + this._isDetached = result.detached; + } + else { + cp = result; + this._isDetached = false; + } + pipeStderrToLogOutputChannel(cp.stderr, this.outputChannel); + return { reader: new node_1.StreamMessageReader(cp.stdout), writer: new node_1.StreamMessageWriter(cp.stdin) }; + } + }); + } + let json; + const runDebug = server; + if (runDebug.run || runDebug.debug) { + if (this._forceDebug || startedInDebugMode()) { + json = runDebug.debug; + this._isInDebugMode = true; + } + else { + json = runDebug.run; + this._isInDebugMode = false; + } + } + else { + json = server; + } + return this._getServerWorkingDir(json.options).then(serverWorkingDir => { + if (NodeModule.is(json) && json.module) { + const node = json; + const transport = node.transport || TransportKind.stdio; + if (node.runtime) { + const args = []; + const options = node.options ?? Object.create(null); + if (options.execArgv) { + options.execArgv.forEach(element => args.push(element)); + } + args.push(node.module); + if (node.args) { + node.args.forEach(element => args.push(element)); + } + const execOptions = Object.create(null); + execOptions.cwd = serverWorkingDir; + execOptions.env = getEnvironment(options.env, false); + const runtime = this._getRuntimePath(node.runtime, serverWorkingDir); + let pipeName = undefined; + if (transport === TransportKind.ipc) { + // exec options not correctly typed in lib + execOptions.stdio = [null, null, null, 'ipc']; + args.push('--node-ipc'); + } + else if (transport === TransportKind.stdio) { + args.push('--stdio'); + } + else if (transport === TransportKind.pipe) { + pipeName = (0, node_1.generateRandomPipeName)(); + args.push(`--pipe=${pipeName}`); + } + else if (Transport.isSocket(transport)) { + args.push(`--socket=${transport.port}`); + } + args.push(`--clientProcessId=${process.pid.toString()}`); + if (transport === TransportKind.ipc || transport === TransportKind.stdio) { + const serverProcess = cp.spawn(runtime, args, execOptions); + if (!serverProcess || !serverProcess.pid) { + return handleChildProcessStartError(serverProcess, `Launching server using runtime ${runtime} failed.`); + } + this._serverProcess = serverProcess; + pipeStderrToLogOutputChannel(serverProcess.stderr, this.outputChannel); + if (transport === TransportKind.ipc) { + pipeStdoutToLogOutputChannel(serverProcess.stdout, this.outputChannel); + return Promise.resolve({ reader: new node_1.IPCMessageReader(serverProcess), writer: new node_1.IPCMessageWriter(serverProcess) }); + } + else { + return Promise.resolve({ reader: new node_1.StreamMessageReader(serverProcess.stdout), writer: new node_1.StreamMessageWriter(serverProcess.stdin) }); + } + } + else if (transport === TransportKind.pipe) { + return (0, node_1.createClientPipeTransport)(pipeName).then((transport) => { + const process = cp.spawn(runtime, args, execOptions); + if (!process || !process.pid) { + return handleChildProcessStartError(process, `Launching server using runtime ${runtime} failed.`); + } + this._serverProcess = process; + pipeStderrToLogOutputChannel(process.stderr, this.outputChannel); + pipeStdoutToLogOutputChannel(process.stdout, this.outputChannel); + return transport.onConnected().then((protocol) => { + return { reader: protocol[0], writer: protocol[1] }; + }); + }); + } + else if (Transport.isSocket(transport)) { + return (0, node_1.createClientSocketTransport)(transport.port).then((transport) => { + const process = cp.spawn(runtime, args, execOptions); + if (!process || !process.pid) { + return handleChildProcessStartError(process, `Launching server using runtime ${runtime} failed.`); + } + this._serverProcess = process; + pipeStderrToLogOutputChannel(process.stderr, this.outputChannel); + pipeStdoutToLogOutputChannel(process.stdout, this.outputChannel); + return transport.onConnected().then((protocol) => { + return { reader: protocol[0], writer: protocol[1] }; + }); + }); + } + } + else { + let pipeName = undefined; + return new Promise((resolve, reject) => { + const args = (node.args && node.args.slice()) ?? []; + if (transport === TransportKind.ipc) { + args.push('--node-ipc'); + } + else if (transport === TransportKind.stdio) { + args.push('--stdio'); + } + else if (transport === TransportKind.pipe) { + pipeName = (0, node_1.generateRandomPipeName)(); + args.push(`--pipe=${pipeName}`); + } + else if (Transport.isSocket(transport)) { + args.push(`--socket=${transport.port}`); + } + args.push(`--clientProcessId=${process.pid.toString()}`); + const options = node.options ? { ...node.options } : Object.create(null); + options.env = getEnvironment(options.env, true); + options.execArgv = options.execArgv || []; + options.cwd = serverWorkingDir; + options.silent = true; + if (transport === TransportKind.ipc || transport === TransportKind.stdio) { + const sp = cp.fork(node.module, args || [], options); + assertStdio(sp); + this._serverProcess = sp; + pipeStderrToLogOutputChannel(sp.stderr, this.outputChannel); + if (transport === TransportKind.ipc) { + pipeStdoutToLogOutputChannel(sp.stdout, this.outputChannel); + resolve({ reader: new node_1.IPCMessageReader(this._serverProcess), writer: new node_1.IPCMessageWriter(this._serverProcess) }); + } + else { + resolve({ reader: new node_1.StreamMessageReader(sp.stdout), writer: new node_1.StreamMessageWriter(sp.stdin) }); + } + } + else if (transport === TransportKind.pipe) { + (0, node_1.createClientPipeTransport)(pipeName).then((transport) => { + const sp = cp.fork(node.module, args || [], options); + assertStdio(sp); + this._serverProcess = sp; + pipeStderrToLogOutputChannel(sp.stderr, this.outputChannel); + pipeStdoutToLogOutputChannel(sp.stdout, this.outputChannel); + transport.onConnected().then((protocol) => { + resolve({ reader: protocol[0], writer: protocol[1] }); + }, reject); + }, reject); + } + else if (Transport.isSocket(transport)) { + (0, node_1.createClientSocketTransport)(transport.port).then((transport) => { + const sp = cp.fork(node.module, args || [], options); + assertStdio(sp); + this._serverProcess = sp; + pipeStderrToLogOutputChannel(sp.stderr, this.outputChannel); + pipeStdoutToLogOutputChannel(sp.stdout, this.outputChannel); + transport.onConnected().then((protocol) => { + resolve({ reader: protocol[0], writer: protocol[1] }); + }, reject); + }, reject); + } + }); + } + } + else if (Executable.is(json) && json.command) { + const command = json; + const args = json.args !== undefined ? json.args.slice(0) : []; + let pipeName = undefined; + const transport = json.transport; + if (transport === TransportKind.stdio) { + args.push('--stdio'); + } + else if (transport === TransportKind.pipe) { + pipeName = (0, node_1.generateRandomPipeName)(); + args.push(`--pipe=${pipeName}`); + } + else if (Transport.isSocket(transport)) { + args.push(`--socket=${transport.port}`); + } + else if (transport === TransportKind.ipc) { + throw new Error(`Transport kind ipc is not support for command executable`); + } + const options = Object.assign({}, command.options); + options.cwd = options.cwd || serverWorkingDir; + if (transport === undefined || transport === TransportKind.stdio) { + const serverProcess = cp.spawn(command.command, args, options); + if (!serverProcess || !serverProcess.pid) { + return handleChildProcessStartError(serverProcess, `Launching server using command ${command.command} failed.`); + } + pipeStderrToLogOutputChannel(serverProcess.stderr, this.outputChannel); + this._serverProcess = serverProcess; + this._isDetached = !!options.detached; + return Promise.resolve({ reader: new node_1.StreamMessageReader(serverProcess.stdout), writer: new node_1.StreamMessageWriter(serverProcess.stdin) }); + } + else if (transport === TransportKind.pipe) { + return (0, node_1.createClientPipeTransport)(pipeName).then((transport) => { + const serverProcess = cp.spawn(command.command, args, options); + if (!serverProcess || !serverProcess.pid) { + return handleChildProcessStartError(serverProcess, `Launching server using command ${command.command} failed.`); + } + this._serverProcess = serverProcess; + this._isDetached = !!options.detached; + pipeStderrToLogOutputChannel(serverProcess.stderr, this.outputChannel); + pipeStdoutToLogOutputChannel(serverProcess.stdout, this.outputChannel); + return transport.onConnected().then((protocol) => { + return { reader: protocol[0], writer: protocol[1] }; + }); + }); + } + else if (Transport.isSocket(transport)) { + return (0, node_1.createClientSocketTransport)(transport.port).then((transport) => { + const serverProcess = cp.spawn(command.command, args, options); + if (!serverProcess || !serverProcess.pid) { + return handleChildProcessStartError(serverProcess, `Launching server using command ${command.command} failed.`); + } + this._serverProcess = serverProcess; + this._isDetached = !!options.detached; + pipeStderrToLogOutputChannel(serverProcess.stderr, this.outputChannel); + pipeStdoutToLogOutputChannel(serverProcess.stdout, this.outputChannel); + return transport.onConnected().then((protocol) => { + return { reader: protocol[0], writer: protocol[1] }; + }); + }); + } + } + return Promise.reject(new Error(`Unsupported server configuration ` + JSON.stringify(server, null, 4))); + }).finally(() => { + if (this._serverProcess !== undefined) { + this._serverProcess.on('exit', (code, signal) => { + if (code === 0) { + this.info('Server process exited successfully', undefined, false); + } + else if (code !== null) { + this.error(`Server process exited with code ${code}.`, undefined, false); + } + if (signal !== null) { + this.error(`Server process exited with signal ${signal}.`, undefined, false); + } + }); + } + }); + } + _getRuntimePath(runtime, serverWorkingDirectory) { + if (path.isAbsolute(runtime)) { + return runtime; + } + const mainRootPath = this._mainGetRootPath(); + if (mainRootPath !== undefined) { + const result = path.join(mainRootPath, runtime); + if (fs.existsSync(result)) { + return result; + } + } + if (serverWorkingDirectory !== undefined) { + const result = path.join(serverWorkingDirectory, runtime); + if (fs.existsSync(result)) { + return result; + } + } + return runtime; + } + _mainGetRootPath() { + const folders = vscode_1.workspace.workspaceFolders; + if (!folders || folders.length === 0) { + return undefined; + } + const folder = folders[0]; + if (folder.uri.scheme === 'file') { + return folder.uri.fsPath; + } + return undefined; + } + _getServerWorkingDir(options) { + let cwd = options && options.cwd; + if (!cwd) { + cwd = this.clientOptions.workspaceFolder + ? this.clientOptions.workspaceFolder.uri.fsPath + : this._mainGetRootPath(); + } + if (cwd) { + // make sure the folder exists otherwise creating the process will fail + return new Promise(s => { + fs.lstat(cwd, (err, stats) => { + s(!err && stats.isDirectory() ? cwd : undefined); + }); + }); + } + return Promise.resolve(undefined); + } +} +exports.LanguageClient = LanguageClient; +class SettingMonitor { + _client; + _setting; + _listeners; + constructor(_client, _setting) { + this._client = _client; + this._setting = _setting; + this._listeners = []; + } + start() { + vscode_1.workspace.onDidChangeConfiguration(this.onDidChangeConfiguration, this, this._listeners); + this.onDidChangeConfiguration(); + return new vscode_1.Disposable(() => { + if (this._client.needsStop()) { + void this._client.stop(); + } + }); + } + onDidChangeConfiguration() { + const index = this._setting.indexOf('.'); + const primary = index >= 0 ? this._setting.substr(0, index) : this._setting; + const rest = index >= 0 ? this._setting.substr(index + 1) : undefined; + const enabled = rest ? vscode_1.workspace.getConfiguration(primary).get(rest, false) : vscode_1.workspace.getConfiguration(primary); + if (enabled && this._client.needsStart()) { + this._client.start().catch((error) => this._client.error('Start failed after configuration change', error, 'force')); + } + else if (!enabled && this._client.needsStop()) { + void this._client.stop().catch((error) => this._client.error('Stop failed after configuration change', error, 'force')); + } + } +} +exports.SettingMonitor = SettingMonitor; +function handleChildProcessStartError(process, message) { + if (process === null) { + return Promise.reject(message); + } + return new Promise((_, reject) => { + process.on('error', (err) => { + reject(`${message} ${err}`); + }); + // the error event should always be run immediately, + // but race on it just in case + setImmediate(() => reject(message)); + }); +} + + +}, +"./node_modules/vscode-languageclient/lib/node/processes.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.terminate = terminate; +const cp = __importStar(__webpack_require__("child_process")); +const isWindows = (process.platform === 'win32'); +const isMacintosh = (process.platform === 'darwin'); +const isLinux = (process.platform === 'linux'); +function terminate(process, cwd) { + if (isWindows) { + try { + // This we run in Atom execFileSync is available. + // Ignore stderr since this is otherwise piped to parent.stderr + // which might be already closed. + const options = { + stdio: ['pipe', 'pipe', 'ignore'] + }; + if (cwd) { + options.cwd = cwd; + } + cp.execFileSync('taskkill', ['/T', '/F', '/PID', process.pid.toString()], options); + return true; + } + catch (err) { + return false; + } + } + else if (isLinux || isMacintosh) { + try { + const pid = process.pid.toString(); + if (!/^\d+$/.test(pid)) { + return false; + } + const script = ` +terminateTree() { + for cpid in $(pgrep -P "$1"); do + terminateTree "$cpid" + done + kill -9 "$1" > /dev/null 2>&1 +} + +terminateTree "${pid}" +`; + const result = cp.spawnSync('/bin/sh', [], { + input: script, + stdio: ['pipe', 'inherit', 'inherit'] + }); + return result.error ? false : true; + } + catch (err) { + return false; + } + } + else { + process.kill('SIGKILL'); + return true; + } +} + + +}, +"./node_modules/vscode-languageserver-protocol/lib/common/api.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.LSPErrorCodes = exports.createProtocolConnection = void 0; +__exportStar(__webpack_require__("./node_modules/vscode-jsonrpc/lib/common/api.js"), exports); +__exportStar(__webpack_require__("./node_modules/vscode-languageserver-types/lib/esm/main.js"), exports); +__exportStar(__webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/messages.js"), exports); +__exportStar(__webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/protocol.js"), exports); +var connection_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/connection.js"); +Object.defineProperty(exports, "createProtocolConnection", ({ enumerable: true, get: function () { return connection_1.createProtocolConnection; } })); +var LSPErrorCodes; +(function (LSPErrorCodes) { + /** + * This is the start range of LSP reserved error codes. + * It doesn't denote a real error code. + * + * @since 3.16.0 + */ + LSPErrorCodes.lspReservedErrorRangeStart = -32899; + /** + * A request failed but it was syntactically correct, e.g the + * method name was known and the parameters were valid. The error + * message should contain human readable information about why + * the request failed. + * + * @since 3.17.0 + */ + LSPErrorCodes.RequestFailed = -32803; + /** + * The server cancelled the request. This error code should + * only be used for requests that explicitly support being + * server cancellable. + * + * @since 3.17.0 + */ + LSPErrorCodes.ServerCancelled = -32802; + /** + * The server detected that the content of a document got + * modified outside normal conditions. A server should + * NOT send this error code if it detects a content change + * in it unprocessed messages. The result even computed + * on an older state might still be useful for the client. + * + * If a client decides that a result is not of any use anymore + * the client should cancel the request. + */ + LSPErrorCodes.ContentModified = -32801; + /** + * The client has canceled a request and a server has detected + * the cancel. + */ + LSPErrorCodes.RequestCancelled = -32800; + /** + * This is the end range of LSP reserved error codes. + * It doesn't denote a real error code. + * + * @since 3.16.0 + */ + LSPErrorCodes.lspReservedErrorRangeEnd = -32800; +})(LSPErrorCodes || (exports.LSPErrorCodes = LSPErrorCodes = {})); + + +}, +"./node_modules/vscode-languageserver-protocol/lib/common/connection.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createProtocolConnection = createProtocolConnection; +const vscode_jsonrpc_1 = __webpack_require__("./node_modules/vscode-jsonrpc/lib/common/api.js"); +function createProtocolConnection(input, output, logger, options) { + if (vscode_jsonrpc_1.ConnectionStrategy.is(options)) { + options = { connectionStrategy: options }; + } + return (0, vscode_jsonrpc_1.createMessageConnection)(input, output, logger, options); +} + + +}, +"./node_modules/vscode-languageserver-protocol/lib/common/messages.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CM = exports.ProtocolNotificationType = exports.ProtocolNotificationType0 = exports.ProtocolRequestType = exports.ProtocolRequestType0 = exports.RegistrationType = exports.MessageDirection = void 0; +const vscode_jsonrpc_1 = __webpack_require__("./node_modules/vscode-jsonrpc/lib/common/api.js"); +var MessageDirection; +(function (MessageDirection) { + MessageDirection["clientToServer"] = "clientToServer"; + MessageDirection["serverToClient"] = "serverToClient"; + MessageDirection["both"] = "both"; +})(MessageDirection || (exports.MessageDirection = MessageDirection = {})); +class RegistrationType { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + ____; + method; + constructor(method) { + this.method = method; + } +} +exports.RegistrationType = RegistrationType; +class ProtocolRequestType0 extends vscode_jsonrpc_1.RequestType0 { + /** + * Clients must not use these properties. They are here to ensure correct typing. + * in TypeScript + */ + __; + ___; + ____; + _pr; + constructor(method) { + super(method); + } +} +exports.ProtocolRequestType0 = ProtocolRequestType0; +class ProtocolRequestType extends vscode_jsonrpc_1.RequestType { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + __; + ___; + ____; + _pr; + constructor(method) { + super(method, vscode_jsonrpc_1.ParameterStructures.byName); + } +} +exports.ProtocolRequestType = ProtocolRequestType; +class ProtocolNotificationType0 extends vscode_jsonrpc_1.NotificationType0 { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + ___; + ____; + constructor(method) { + super(method); + } +} +exports.ProtocolNotificationType0 = ProtocolNotificationType0; +class ProtocolNotificationType extends vscode_jsonrpc_1.NotificationType { + /** + * Clients must not use this property. It is here to ensure correct typing. + */ + ___; + ____; + constructor(method) { + super(method, vscode_jsonrpc_1.ParameterStructures.byName); + } +} +exports.ProtocolNotificationType = ProtocolNotificationType; +var CM; +(function (CM) { + function create(client, server) { + return { client, server }; + } + CM.create = create; +})(CM || (exports.CM = CM = {})); + + +}, +"./node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js"(__unused_rspack_module, exports, __webpack_require__) { +var __rspack_unused_export; + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) TypeFox, Microsoft and others. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +__rspack_unused_export = ({ value: true }); +exports.CallHierarchyOutgoingCallsRequest = exports.CallHierarchyIncomingCallsRequest = exports.CallHierarchyPrepareRequest = void 0; +const messages_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/messages.js"); +/** + * A request to result a `CallHierarchyItem` in a document at a given position. + * Can be used as an input to an incoming or outgoing call hierarchy. + * + * @since 3.16.0 + */ +var CallHierarchyPrepareRequest; +(function (CallHierarchyPrepareRequest) { + CallHierarchyPrepareRequest.method = 'textDocument/prepareCallHierarchy'; + CallHierarchyPrepareRequest.messageDirection = messages_1.MessageDirection.clientToServer; + CallHierarchyPrepareRequest.type = new messages_1.ProtocolRequestType(CallHierarchyPrepareRequest.method); + CallHierarchyPrepareRequest.capabilities = messages_1.CM.create('textDocument.callHierarchy', 'callHierarchyProvider'); +})(CallHierarchyPrepareRequest || (exports.CallHierarchyPrepareRequest = CallHierarchyPrepareRequest = {})); +/** + * A request to resolve the incoming calls for a given `CallHierarchyItem`. + * + * @since 3.16.0 + */ +var CallHierarchyIncomingCallsRequest; +(function (CallHierarchyIncomingCallsRequest) { + CallHierarchyIncomingCallsRequest.method = 'callHierarchy/incomingCalls'; + CallHierarchyIncomingCallsRequest.messageDirection = messages_1.MessageDirection.clientToServer; + CallHierarchyIncomingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyIncomingCallsRequest.method); + CallHierarchyIncomingCallsRequest.capabilities = messages_1.CM.create('textDocument.callHierarchy', 'callHierarchyProvider'); +})(CallHierarchyIncomingCallsRequest || (exports.CallHierarchyIncomingCallsRequest = CallHierarchyIncomingCallsRequest = {})); +/** + * A request to resolve the outgoing calls for a given `CallHierarchyItem`. + * + * @since 3.16.0 + */ +var CallHierarchyOutgoingCallsRequest; +(function (CallHierarchyOutgoingCallsRequest) { + CallHierarchyOutgoingCallsRequest.method = 'callHierarchy/outgoingCalls'; + CallHierarchyOutgoingCallsRequest.messageDirection = messages_1.MessageDirection.clientToServer; + CallHierarchyOutgoingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyOutgoingCallsRequest.method); + CallHierarchyOutgoingCallsRequest.capabilities = messages_1.CM.create('textDocument.callHierarchy', 'callHierarchyProvider'); +})(CallHierarchyOutgoingCallsRequest || (exports.CallHierarchyOutgoingCallsRequest = CallHierarchyOutgoingCallsRequest = {})); + + +}, +"./node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js"(__unused_rspack_module, exports, __webpack_require__) { +var __rspack_unused_export; + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +__rspack_unused_export = ({ value: true }); +exports.ColorPresentationRequest = exports.DocumentColorRequest = void 0; +const messages_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/messages.js"); +/** + * A request to list all color symbols found in a given text document. The request's + * parameter is of type {@link DocumentColorParams} the + * response is of type {@link ColorInformation ColorInformation[]} or a Thenable + * that resolves to such. + */ +var DocumentColorRequest; +(function (DocumentColorRequest) { + DocumentColorRequest.method = 'textDocument/documentColor'; + DocumentColorRequest.messageDirection = messages_1.MessageDirection.clientToServer; + DocumentColorRequest.type = new messages_1.ProtocolRequestType(DocumentColorRequest.method); + DocumentColorRequest.capabilities = messages_1.CM.create('textDocument.colorProvider', 'colorProvider'); +})(DocumentColorRequest || (exports.DocumentColorRequest = DocumentColorRequest = {})); +/** + * A request to list all presentation for a color. The request's + * parameter is of type {@link ColorPresentationParams} the + * response is of type {@link ColorPresentation ColorPresentation[]} or a Thenable + * that resolves to such. + */ +var ColorPresentationRequest; +(function (ColorPresentationRequest) { + ColorPresentationRequest.method = 'textDocument/colorPresentation'; + ColorPresentationRequest.messageDirection = messages_1.MessageDirection.clientToServer; + ColorPresentationRequest.type = new messages_1.ProtocolRequestType(ColorPresentationRequest.method); + ColorPresentationRequest.capabilities = messages_1.CM.create('textDocument.colorProvider', 'colorProvider'); +})(ColorPresentationRequest || (exports.ColorPresentationRequest = ColorPresentationRequest = {})); + + +}, +"./node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js"(__unused_rspack_module, exports, __webpack_require__) { +var __rspack_unused_export; + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +__rspack_unused_export = ({ value: true }); +exports.ConfigurationRequest = void 0; +const messages_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/messages.js"); +//---- Get Configuration request ---- +/** + * The 'workspace/configuration' request is sent from the server to the client to fetch a certain + * configuration setting. + * + * This pull model replaces the old push model were the client signaled configuration change via an + * event. If the server still needs to react to configuration changes (since the server caches the + * result of `workspace/configuration` requests) the server should register for an empty configuration + * change event and empty the cache if such an event is received. + */ +var ConfigurationRequest; +(function (ConfigurationRequest) { + ConfigurationRequest.method = 'workspace/configuration'; + ConfigurationRequest.messageDirection = messages_1.MessageDirection.serverToClient; + ConfigurationRequest.type = new messages_1.ProtocolRequestType(ConfigurationRequest.method); + ConfigurationRequest.capabilities = messages_1.CM.create('workspace.configuration', undefined); +})(ConfigurationRequest || (exports.ConfigurationRequest = ConfigurationRequest = {})); + + +}, +"./node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js"(__unused_rspack_module, exports, __webpack_require__) { +var __rspack_unused_export; + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +__rspack_unused_export = ({ value: true }); +exports.DeclarationRequest = void 0; +const messages_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/messages.js"); +// @ts-ignore: to avoid inlining LocationLink as dynamic import +let __noDynamicImport; +/** + * A request to resolve the type definition locations of a symbol at a given text + * document position. The request's parameter is of type {@link TextDocumentPositionParams} + * the response is of type {@link Declaration} or a typed array of {@link DeclarationLink} + * or a Thenable that resolves to such. + */ +var DeclarationRequest; +(function (DeclarationRequest) { + DeclarationRequest.method = 'textDocument/declaration'; + DeclarationRequest.messageDirection = messages_1.MessageDirection.clientToServer; + DeclarationRequest.type = new messages_1.ProtocolRequestType(DeclarationRequest.method); + DeclarationRequest.capabilities = messages_1.CM.create('textDocument.declaration', 'declarationProvider'); +})(DeclarationRequest || (exports.DeclarationRequest = DeclarationRequest = {})); + + +}, +"./node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DiagnosticRefreshRequest = exports.WorkspaceDiagnosticRequest = exports.DocumentDiagnosticRequest = exports.DocumentDiagnosticReportKind = exports.DiagnosticServerCancellationData = void 0; +const vscode_jsonrpc_1 = __webpack_require__("./node_modules/vscode-jsonrpc/lib/common/api.js"); +const Is = __importStar(__webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/utils/is.js")); +const messages_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/messages.js"); +/** + * @since 3.17.0 + */ +var DiagnosticServerCancellationData; +(function (DiagnosticServerCancellationData) { + function is(value) { + const candidate = value; + return candidate && Is.boolean(candidate.retriggerRequest); + } + DiagnosticServerCancellationData.is = is; +})(DiagnosticServerCancellationData || (exports.DiagnosticServerCancellationData = DiagnosticServerCancellationData = {})); +/** + * The document diagnostic report kinds. + * + * @since 3.17.0 + */ +var DocumentDiagnosticReportKind; +(function (DocumentDiagnosticReportKind) { + /** + * A diagnostic report with a full + * set of problems. + */ + DocumentDiagnosticReportKind.Full = 'full'; + /** + * A report indicating that the last + * returned report is still accurate. + */ + DocumentDiagnosticReportKind.Unchanged = 'unchanged'; +})(DocumentDiagnosticReportKind || (exports.DocumentDiagnosticReportKind = DocumentDiagnosticReportKind = {})); +/** + * The document diagnostic request definition. + * + * + * @since 3.17.0 + */ +var DocumentDiagnosticRequest; +(function (DocumentDiagnosticRequest) { + DocumentDiagnosticRequest.method = 'textDocument/diagnostic'; + DocumentDiagnosticRequest.messageDirection = messages_1.MessageDirection.clientToServer; + DocumentDiagnosticRequest.type = new messages_1.ProtocolRequestType(DocumentDiagnosticRequest.method); + DocumentDiagnosticRequest.partialResult = new vscode_jsonrpc_1.ProgressType(); + DocumentDiagnosticRequest.capabilities = messages_1.CM.create('textDocument.diagnostic', 'diagnosticProvider'); +})(DocumentDiagnosticRequest || (exports.DocumentDiagnosticRequest = DocumentDiagnosticRequest = {})); +/** + * The workspace diagnostic request definition. + * + * @since 3.17.0 + */ +var WorkspaceDiagnosticRequest; +(function (WorkspaceDiagnosticRequest) { + WorkspaceDiagnosticRequest.method = 'workspace/diagnostic'; + WorkspaceDiagnosticRequest.messageDirection = messages_1.MessageDirection.clientToServer; + WorkspaceDiagnosticRequest.type = new messages_1.ProtocolRequestType(WorkspaceDiagnosticRequest.method); + WorkspaceDiagnosticRequest.partialResult = new vscode_jsonrpc_1.ProgressType(); + WorkspaceDiagnosticRequest.capabilities = messages_1.CM.create('workspace.diagnostics', 'diagnosticProvider.workspaceDiagnostics'); +})(WorkspaceDiagnosticRequest || (exports.WorkspaceDiagnosticRequest = WorkspaceDiagnosticRequest = {})); +/** + * The diagnostic refresh request definition. + * + * @since 3.17.0 + */ +var DiagnosticRefreshRequest; +(function (DiagnosticRefreshRequest) { + DiagnosticRefreshRequest.method = `workspace/diagnostic/refresh`; + DiagnosticRefreshRequest.messageDirection = messages_1.MessageDirection.serverToClient; + DiagnosticRefreshRequest.type = new messages_1.ProtocolRequestType0(DiagnosticRefreshRequest.method); + DiagnosticRefreshRequest.capabilities = messages_1.CM.create('workspace.diagnostics.refreshSupport', undefined); +})(DiagnosticRefreshRequest || (exports.DiagnosticRefreshRequest = DiagnosticRefreshRequest = {})); + + +}, +"./node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js"(__unused_rspack_module, exports, __webpack_require__) { +var __rspack_unused_export; + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +__rspack_unused_export = ({ value: true }); +exports.WillDeleteFilesRequest = exports.DidDeleteFilesNotification = exports.DidRenameFilesNotification = exports.WillRenameFilesRequest = exports.DidCreateFilesNotification = exports.WillCreateFilesRequest = exports.FileOperationPatternKind = void 0; +const messages_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/messages.js"); +/** + * A pattern kind describing if a glob pattern matches a file a folder or + * both. + * + * @since 3.16.0 + */ +var FileOperationPatternKind; +(function (FileOperationPatternKind) { + /** + * The pattern matches a file only. + */ + FileOperationPatternKind.file = 'file'; + /** + * The pattern matches a folder only. + */ + FileOperationPatternKind.folder = 'folder'; +})(FileOperationPatternKind || (exports.FileOperationPatternKind = FileOperationPatternKind = {})); +/** + * The will create files request is sent from the client to the server before files are actually + * created as long as the creation is triggered from within the client. + * + * The request can return a `WorkspaceEdit` which will be applied to workspace before the + * files are created. Hence the `WorkspaceEdit` can not manipulate the content of the file + * to be created. + * + * @since 3.16.0 + */ +var WillCreateFilesRequest; +(function (WillCreateFilesRequest) { + WillCreateFilesRequest.method = 'workspace/willCreateFiles'; + WillCreateFilesRequest.messageDirection = messages_1.MessageDirection.clientToServer; + WillCreateFilesRequest.type = new messages_1.ProtocolRequestType(WillCreateFilesRequest.method); + WillCreateFilesRequest.capabilities = messages_1.CM.create('workspace.fileOperations.willCreate', 'workspace.fileOperations.willCreate'); +})(WillCreateFilesRequest || (exports.WillCreateFilesRequest = WillCreateFilesRequest = {})); +/** + * The did create files notification is sent from the client to the server when + * files were created from within the client. + * + * @since 3.16.0 + */ +var DidCreateFilesNotification; +(function (DidCreateFilesNotification) { + DidCreateFilesNotification.method = 'workspace/didCreateFiles'; + DidCreateFilesNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidCreateFilesNotification.type = new messages_1.ProtocolNotificationType(DidCreateFilesNotification.method); + DidCreateFilesNotification.capabilities = messages_1.CM.create('workspace.fileOperations.didCreate', 'workspace.fileOperations.didCreate'); +})(DidCreateFilesNotification || (exports.DidCreateFilesNotification = DidCreateFilesNotification = {})); +/** + * The will rename files request is sent from the client to the server before files are actually + * renamed as long as the rename is triggered from within the client. + * + * @since 3.16.0 + */ +var WillRenameFilesRequest; +(function (WillRenameFilesRequest) { + WillRenameFilesRequest.method = 'workspace/willRenameFiles'; + WillRenameFilesRequest.messageDirection = messages_1.MessageDirection.clientToServer; + WillRenameFilesRequest.type = new messages_1.ProtocolRequestType(WillRenameFilesRequest.method); + WillRenameFilesRequest.capabilities = messages_1.CM.create('workspace.fileOperations.willRename', 'workspace.fileOperations.willRename'); +})(WillRenameFilesRequest || (exports.WillRenameFilesRequest = WillRenameFilesRequest = {})); +/** + * The did rename files notification is sent from the client to the server when + * files were renamed from within the client. + * + * @since 3.16.0 + */ +var DidRenameFilesNotification; +(function (DidRenameFilesNotification) { + DidRenameFilesNotification.method = 'workspace/didRenameFiles'; + DidRenameFilesNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidRenameFilesNotification.type = new messages_1.ProtocolNotificationType(DidRenameFilesNotification.method); + DidRenameFilesNotification.capabilities = messages_1.CM.create('workspace.fileOperations.didRename', 'workspace.fileOperations.didRename'); +})(DidRenameFilesNotification || (exports.DidRenameFilesNotification = DidRenameFilesNotification = {})); +/** + * The will delete files request is sent from the client to the server before files are actually + * deleted as long as the deletion is triggered from within the client. + * + * @since 3.16.0 + */ +var DidDeleteFilesNotification; +(function (DidDeleteFilesNotification) { + DidDeleteFilesNotification.method = 'workspace/didDeleteFiles'; + DidDeleteFilesNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidDeleteFilesNotification.type = new messages_1.ProtocolNotificationType(DidDeleteFilesNotification.method); + DidDeleteFilesNotification.capabilities = messages_1.CM.create('workspace.fileOperations.didDelete', 'workspace.fileOperations.didDelete'); +})(DidDeleteFilesNotification || (exports.DidDeleteFilesNotification = DidDeleteFilesNotification = {})); +/** + * The did delete files notification is sent from the client to the server when + * files were deleted from within the client. + * + * @since 3.16.0 + */ +var WillDeleteFilesRequest; +(function (WillDeleteFilesRequest) { + WillDeleteFilesRequest.method = 'workspace/willDeleteFiles'; + WillDeleteFilesRequest.messageDirection = messages_1.MessageDirection.clientToServer; + WillDeleteFilesRequest.type = new messages_1.ProtocolRequestType(WillDeleteFilesRequest.method); + WillDeleteFilesRequest.capabilities = messages_1.CM.create('workspace.fileOperations.willDelete', 'workspace.fileOperations.willDelete'); +})(WillDeleteFilesRequest || (exports.WillDeleteFilesRequest = WillDeleteFilesRequest = {})); + + +}, +"./node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js"(__unused_rspack_module, exports, __webpack_require__) { +var __rspack_unused_export; + +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +__rspack_unused_export = ({ value: true }); +exports.FoldingRangeRefreshRequest = exports.FoldingRangeRequest = void 0; +const messages_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/messages.js"); +/** + * A request to provide folding ranges in a document. The request's + * parameter is of type {@link FoldingRangeParams}, the + * response is of type {@link FoldingRangeList} or a Thenable + * that resolves to such. + */ +var FoldingRangeRequest; +(function (FoldingRangeRequest) { + FoldingRangeRequest.method = 'textDocument/foldingRange'; + FoldingRangeRequest.messageDirection = messages_1.MessageDirection.clientToServer; + FoldingRangeRequest.type = new messages_1.ProtocolRequestType(FoldingRangeRequest.method); + FoldingRangeRequest.capabilities = messages_1.CM.create('textDocument.foldingRange', 'foldingRangeProvider'); +})(FoldingRangeRequest || (exports.FoldingRangeRequest = FoldingRangeRequest = {})); +/** + * A request to refresh the folding ranges in a document. + * + * @since 3.18.0 + */ +var FoldingRangeRefreshRequest; +(function (FoldingRangeRefreshRequest) { + FoldingRangeRefreshRequest.method = `workspace/foldingRange/refresh`; + FoldingRangeRefreshRequest.messageDirection = messages_1.MessageDirection.serverToClient; + FoldingRangeRefreshRequest.type = new messages_1.ProtocolRequestType0(FoldingRangeRefreshRequest.method); + FoldingRangeRefreshRequest.capabilities = messages_1.CM.create('workspace.foldingRange.refreshSupport', undefined); +})(FoldingRangeRefreshRequest || (exports.FoldingRangeRefreshRequest = FoldingRangeRefreshRequest = {})); + + +}, +"./node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js"(__unused_rspack_module, exports, __webpack_require__) { +var __rspack_unused_export; + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +__rspack_unused_export = ({ value: true }); +exports.ImplementationRequest = void 0; +const messages_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/messages.js"); +// @ts-ignore: to avoid inlining LocationLink as dynamic import +let __noDynamicImport; +/** + * A request to resolve the implementation locations of a symbol at a given text + * document position. The request's parameter is of type {@link TextDocumentPositionParams} + * the response is of type {@link Definition} or a Thenable that resolves to such. + */ +var ImplementationRequest; +(function (ImplementationRequest) { + ImplementationRequest.method = 'textDocument/implementation'; + ImplementationRequest.messageDirection = messages_1.MessageDirection.clientToServer; + ImplementationRequest.type = new messages_1.ProtocolRequestType(ImplementationRequest.method); + ImplementationRequest.capabilities = messages_1.CM.create('textDocument.implementation', 'implementationProvider'); +})(ImplementationRequest || (exports.ImplementationRequest = ImplementationRequest = {})); + + +}, +"./node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js"(__unused_rspack_module, exports, __webpack_require__) { +var __rspack_unused_export; + +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +__rspack_unused_export = ({ value: true }); +exports.InlayHintRefreshRequest = exports.InlayHintResolveRequest = exports.InlayHintRequest = void 0; +const messages_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/messages.js"); +/** + * A request to provide inlay hints in a document. The request's parameter is of + * type {@link InlayHintsParams}, the response is of type + * {@link InlayHint InlayHint[]} or a Thenable that resolves to such. + * + * @since 3.17.0 + */ +var InlayHintRequest; +(function (InlayHintRequest) { + InlayHintRequest.method = 'textDocument/inlayHint'; + InlayHintRequest.messageDirection = messages_1.MessageDirection.clientToServer; + InlayHintRequest.type = new messages_1.ProtocolRequestType(InlayHintRequest.method); + InlayHintRequest.capabilities = messages_1.CM.create('textDocument.inlayHint', 'inlayHintProvider'); +})(InlayHintRequest || (exports.InlayHintRequest = InlayHintRequest = {})); +/** + * A request to resolve additional properties for an inlay hint. + * The request's parameter is of type {@link InlayHint}, the response is + * of type {@link InlayHint} or a Thenable that resolves to such. + * + * @since 3.17.0 + */ +var InlayHintResolveRequest; +(function (InlayHintResolveRequest) { + InlayHintResolveRequest.method = 'inlayHint/resolve'; + InlayHintResolveRequest.messageDirection = messages_1.MessageDirection.clientToServer; + InlayHintResolveRequest.type = new messages_1.ProtocolRequestType(InlayHintResolveRequest.method); + InlayHintResolveRequest.capabilities = messages_1.CM.create('textDocument.inlayHint.resolveSupport', 'inlayHintProvider.resolveProvider'); +})(InlayHintResolveRequest || (exports.InlayHintResolveRequest = InlayHintResolveRequest = {})); +/** + * @since 3.17.0 + */ +var InlayHintRefreshRequest; +(function (InlayHintRefreshRequest) { + InlayHintRefreshRequest.method = `workspace/inlayHint/refresh`; + InlayHintRefreshRequest.messageDirection = messages_1.MessageDirection.serverToClient; + InlayHintRefreshRequest.type = new messages_1.ProtocolRequestType0(InlayHintRefreshRequest.method); + InlayHintRefreshRequest.capabilities = messages_1.CM.create('workspace.inlayHint.refreshSupport', undefined); +})(InlayHintRefreshRequest || (exports.InlayHintRefreshRequest = InlayHintRefreshRequest = {})); + + +}, +"./node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js"(__unused_rspack_module, exports, __webpack_require__) { +var __rspack_unused_export; + +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +__rspack_unused_export = ({ value: true }); +exports.InlineCompletionRequest = void 0; +const messages_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/messages.js"); +/** + * A request to provide inline completions in a document. The request's parameter is of + * type {@link InlineCompletionParams}, the response is of type + * {@link InlineCompletion InlineCompletion[]} or a Thenable that resolves to such. + * + * @since 3.18.0 + */ +var InlineCompletionRequest; +(function (InlineCompletionRequest) { + InlineCompletionRequest.method = 'textDocument/inlineCompletion'; + InlineCompletionRequest.messageDirection = messages_1.MessageDirection.clientToServer; + InlineCompletionRequest.type = new messages_1.ProtocolRequestType(InlineCompletionRequest.method); + InlineCompletionRequest.capabilities = messages_1.CM.create('textDocument.inlineCompletion', 'inlineCompletionProvider'); +})(InlineCompletionRequest || (exports.InlineCompletionRequest = InlineCompletionRequest = {})); + + +}, +"./node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js"(__unused_rspack_module, exports, __webpack_require__) { +var __rspack_unused_export; + +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +__rspack_unused_export = ({ value: true }); +exports.InlineValueRefreshRequest = exports.InlineValueRequest = void 0; +const messages_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/messages.js"); +/** + * A request to provide inline values in a document. The request's parameter is of + * type {@link InlineValueParams}, the response is of type + * {@link InlineValue InlineValue[]} or a Thenable that resolves to such. + * + * @since 3.17.0 + */ +var InlineValueRequest; +(function (InlineValueRequest) { + InlineValueRequest.method = 'textDocument/inlineValue'; + InlineValueRequest.messageDirection = messages_1.MessageDirection.clientToServer; + InlineValueRequest.type = new messages_1.ProtocolRequestType(InlineValueRequest.method); + InlineValueRequest.capabilities = messages_1.CM.create('textDocument.inlineValue', 'inlineValueProvider'); +})(InlineValueRequest || (exports.InlineValueRequest = InlineValueRequest = {})); +/** + * @since 3.17.0 + */ +var InlineValueRefreshRequest; +(function (InlineValueRefreshRequest) { + InlineValueRefreshRequest.method = `workspace/inlineValue/refresh`; + InlineValueRefreshRequest.messageDirection = messages_1.MessageDirection.serverToClient; + InlineValueRefreshRequest.type = new messages_1.ProtocolRequestType0(InlineValueRefreshRequest.method); + InlineValueRefreshRequest.capabilities = messages_1.CM.create('workspace.inlineValue.refreshSupport', undefined); +})(InlineValueRefreshRequest || (exports.InlineValueRefreshRequest = InlineValueRefreshRequest = {})); + + +}, +"./node_modules/vscode-languageserver-protocol/lib/common/protocol.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CodeActionRequest = exports.DocumentSymbolRequest = exports.DocumentHighlightRequest = exports.ReferencesRequest = exports.DefinitionRequest = exports.SignatureHelpRequest = exports.SignatureHelpTriggerKind = exports.HoverRequest = exports.CompletionResolveRequest = exports.CompletionRequest = exports.CompletionTriggerKind = exports.PublishDiagnosticsNotification = exports.WatchKind = exports.GlobPattern = exports.RelativePattern = exports.FileChangeType = exports.DidChangeWatchedFilesNotification = exports.WillSaveTextDocumentWaitUntilRequest = exports.WillSaveTextDocumentNotification = exports.TextDocumentSaveReason = exports.DidSaveTextDocumentNotification = exports.DidCloseTextDocumentNotification = exports.DidChangeTextDocumentNotification = exports.TextDocumentContentChangeEvent = exports.DidOpenTextDocumentNotification = exports.TextDocumentSyncKind = exports.TelemetryEventNotification = exports.LogMessageNotification = exports.ShowMessageRequest = exports.ShowMessageNotification = exports.MessageType = exports.DidChangeConfigurationNotification = exports.ExitNotification = exports.ShutdownRequest = exports.InitializedNotification = exports.InitializeErrorCodes = exports.InitializeRequest = exports.WorkDoneProgressOptions = exports.TextDocumentRegistrationOptions = exports.StaticRegistrationOptions = exports.PositionEncodingKind = exports.RegularExpressionEngineKind = exports.FailureHandlingKind = exports.ResourceOperationKind = exports.UnregistrationRequest = exports.RegistrationRequest = exports.DocumentSelector = exports.NotebookCellTextDocumentFilter = exports.NotebookDocumentFilter = exports.TextDocumentFilter = void 0; +exports.UniquenessLevel = exports.WillDeleteFilesRequest = exports.DidDeleteFilesNotification = exports.WillRenameFilesRequest = exports.DidRenameFilesNotification = exports.WillCreateFilesRequest = exports.DidCreateFilesNotification = exports.FileOperationPatternKind = exports.LinkedEditingRangeRequest = exports.ShowDocumentRequest = exports.SemanticTokensRegistrationType = exports.SemanticTokensRefreshRequest = exports.SemanticTokensRangeRequest = exports.SemanticTokensDeltaRequest = exports.SemanticTokensRequest = exports.TokenFormat = exports.CallHierarchyPrepareRequest = exports.CallHierarchyOutgoingCallsRequest = exports.CallHierarchyIncomingCallsRequest = exports.WorkDoneProgressCancelNotification = exports.WorkDoneProgressCreateRequest = exports.WorkDoneProgress = exports.SelectionRangeRequest = exports.DeclarationRequest = exports.FoldingRangeRefreshRequest = exports.FoldingRangeRequest = exports.ColorPresentationRequest = exports.DocumentColorRequest = exports.ConfigurationRequest = exports.DidChangeWorkspaceFoldersNotification = exports.WorkspaceFoldersRequest = exports.TypeDefinitionRequest = exports.ImplementationRequest = exports.ApplyWorkspaceEditRequest = exports.ExecuteCommandRequest = exports.PrepareRenameRequest = exports.RenameRequest = exports.PrepareSupportDefaultBehavior = exports.DocumentOnTypeFormattingRequest = exports.DocumentRangesFormattingRequest = exports.DocumentRangeFormattingRequest = exports.DocumentFormattingRequest = exports.DocumentLinkResolveRequest = exports.DocumentLinkRequest = exports.CodeLensRefreshRequest = exports.CodeLensResolveRequest = exports.CodeLensRequest = exports.WorkspaceSymbolResolveRequest = exports.WorkspaceSymbolRequest = exports.CodeActionResolveRequest = void 0; +exports.TextDocumentContentRefreshRequest = exports.TextDocumentContentRequest = exports.InlineCompletionRequest = exports.DidCloseNotebookDocumentNotification = exports.DidSaveNotebookDocumentNotification = exports.DidChangeNotebookDocumentNotification = exports.NotebookCellArrayChange = exports.DidOpenNotebookDocumentNotification = exports.NotebookDocumentSyncRegistrationType = exports.NotebookDocument = exports.NotebookCell = exports.ExecutionSummary = exports.NotebookCellKind = exports.DiagnosticRefreshRequest = exports.WorkspaceDiagnosticRequest = exports.DocumentDiagnosticRequest = exports.DocumentDiagnosticReportKind = exports.DiagnosticServerCancellationData = exports.InlayHintRefreshRequest = exports.InlayHintResolveRequest = exports.InlayHintRequest = exports.InlineValueRefreshRequest = exports.InlineValueRequest = exports.TypeHierarchySupertypesRequest = exports.TypeHierarchySubtypesRequest = exports.TypeHierarchyPrepareRequest = exports.MonikerRequest = exports.MonikerKind = void 0; +const messages_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/messages.js"); +const vscode_languageserver_types_1 = __webpack_require__("./node_modules/vscode-languageserver-types/lib/esm/main.js"); +const Is = __importStar(__webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/utils/is.js")); +const protocol_implementation_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js"); +Object.defineProperty(exports, "ImplementationRequest", ({ enumerable: true, get: function () { return protocol_implementation_1.ImplementationRequest; } })); +const protocol_typeDefinition_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js"); +Object.defineProperty(exports, "TypeDefinitionRequest", ({ enumerable: true, get: function () { return protocol_typeDefinition_1.TypeDefinitionRequest; } })); +const protocol_workspaceFolder_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js"); +Object.defineProperty(exports, "WorkspaceFoldersRequest", ({ enumerable: true, get: function () { return protocol_workspaceFolder_1.WorkspaceFoldersRequest; } })); +Object.defineProperty(exports, "DidChangeWorkspaceFoldersNotification", ({ enumerable: true, get: function () { return protocol_workspaceFolder_1.DidChangeWorkspaceFoldersNotification; } })); +const protocol_configuration_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js"); +Object.defineProperty(exports, "ConfigurationRequest", ({ enumerable: true, get: function () { return protocol_configuration_1.ConfigurationRequest; } })); +const protocol_colorProvider_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js"); +Object.defineProperty(exports, "DocumentColorRequest", ({ enumerable: true, get: function () { return protocol_colorProvider_1.DocumentColorRequest; } })); +Object.defineProperty(exports, "ColorPresentationRequest", ({ enumerable: true, get: function () { return protocol_colorProvider_1.ColorPresentationRequest; } })); +const protocol_foldingRange_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js"); +Object.defineProperty(exports, "FoldingRangeRequest", ({ enumerable: true, get: function () { return protocol_foldingRange_1.FoldingRangeRequest; } })); +Object.defineProperty(exports, "FoldingRangeRefreshRequest", ({ enumerable: true, get: function () { return protocol_foldingRange_1.FoldingRangeRefreshRequest; } })); +const protocol_declaration_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js"); +Object.defineProperty(exports, "DeclarationRequest", ({ enumerable: true, get: function () { return protocol_declaration_1.DeclarationRequest; } })); +const protocol_selectionRange_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js"); +Object.defineProperty(exports, "SelectionRangeRequest", ({ enumerable: true, get: function () { return protocol_selectionRange_1.SelectionRangeRequest; } })); +const protocol_progress_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js"); +Object.defineProperty(exports, "WorkDoneProgress", ({ enumerable: true, get: function () { return protocol_progress_1.WorkDoneProgress; } })); +Object.defineProperty(exports, "WorkDoneProgressCreateRequest", ({ enumerable: true, get: function () { return protocol_progress_1.WorkDoneProgressCreateRequest; } })); +Object.defineProperty(exports, "WorkDoneProgressCancelNotification", ({ enumerable: true, get: function () { return protocol_progress_1.WorkDoneProgressCancelNotification; } })); +const protocol_callHierarchy_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js"); +Object.defineProperty(exports, "CallHierarchyIncomingCallsRequest", ({ enumerable: true, get: function () { return protocol_callHierarchy_1.CallHierarchyIncomingCallsRequest; } })); +Object.defineProperty(exports, "CallHierarchyOutgoingCallsRequest", ({ enumerable: true, get: function () { return protocol_callHierarchy_1.CallHierarchyOutgoingCallsRequest; } })); +Object.defineProperty(exports, "CallHierarchyPrepareRequest", ({ enumerable: true, get: function () { return protocol_callHierarchy_1.CallHierarchyPrepareRequest; } })); +const protocol_semanticTokens_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js"); +Object.defineProperty(exports, "TokenFormat", ({ enumerable: true, get: function () { return protocol_semanticTokens_1.TokenFormat; } })); +Object.defineProperty(exports, "SemanticTokensRequest", ({ enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRequest; } })); +Object.defineProperty(exports, "SemanticTokensDeltaRequest", ({ enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensDeltaRequest; } })); +Object.defineProperty(exports, "SemanticTokensRangeRequest", ({ enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRangeRequest; } })); +Object.defineProperty(exports, "SemanticTokensRefreshRequest", ({ enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRefreshRequest; } })); +Object.defineProperty(exports, "SemanticTokensRegistrationType", ({ enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRegistrationType; } })); +const protocol_showDocument_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js"); +Object.defineProperty(exports, "ShowDocumentRequest", ({ enumerable: true, get: function () { return protocol_showDocument_1.ShowDocumentRequest; } })); +const protocol_linkedEditingRange_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js"); +Object.defineProperty(exports, "LinkedEditingRangeRequest", ({ enumerable: true, get: function () { return protocol_linkedEditingRange_1.LinkedEditingRangeRequest; } })); +const protocol_fileOperations_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js"); +Object.defineProperty(exports, "FileOperationPatternKind", ({ enumerable: true, get: function () { return protocol_fileOperations_1.FileOperationPatternKind; } })); +Object.defineProperty(exports, "DidCreateFilesNotification", ({ enumerable: true, get: function () { return protocol_fileOperations_1.DidCreateFilesNotification; } })); +Object.defineProperty(exports, "WillCreateFilesRequest", ({ enumerable: true, get: function () { return protocol_fileOperations_1.WillCreateFilesRequest; } })); +Object.defineProperty(exports, "DidRenameFilesNotification", ({ enumerable: true, get: function () { return protocol_fileOperations_1.DidRenameFilesNotification; } })); +Object.defineProperty(exports, "WillRenameFilesRequest", ({ enumerable: true, get: function () { return protocol_fileOperations_1.WillRenameFilesRequest; } })); +Object.defineProperty(exports, "DidDeleteFilesNotification", ({ enumerable: true, get: function () { return protocol_fileOperations_1.DidDeleteFilesNotification; } })); +Object.defineProperty(exports, "WillDeleteFilesRequest", ({ enumerable: true, get: function () { return protocol_fileOperations_1.WillDeleteFilesRequest; } })); +const protocol_moniker_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js"); +Object.defineProperty(exports, "UniquenessLevel", ({ enumerable: true, get: function () { return protocol_moniker_1.UniquenessLevel; } })); +Object.defineProperty(exports, "MonikerKind", ({ enumerable: true, get: function () { return protocol_moniker_1.MonikerKind; } })); +Object.defineProperty(exports, "MonikerRequest", ({ enumerable: true, get: function () { return protocol_moniker_1.MonikerRequest; } })); +const protocol_typeHierarchy_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js"); +Object.defineProperty(exports, "TypeHierarchyPrepareRequest", ({ enumerable: true, get: function () { return protocol_typeHierarchy_1.TypeHierarchyPrepareRequest; } })); +Object.defineProperty(exports, "TypeHierarchySubtypesRequest", ({ enumerable: true, get: function () { return protocol_typeHierarchy_1.TypeHierarchySubtypesRequest; } })); +Object.defineProperty(exports, "TypeHierarchySupertypesRequest", ({ enumerable: true, get: function () { return protocol_typeHierarchy_1.TypeHierarchySupertypesRequest; } })); +const protocol_inlineValue_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js"); +Object.defineProperty(exports, "InlineValueRequest", ({ enumerable: true, get: function () { return protocol_inlineValue_1.InlineValueRequest; } })); +Object.defineProperty(exports, "InlineValueRefreshRequest", ({ enumerable: true, get: function () { return protocol_inlineValue_1.InlineValueRefreshRequest; } })); +const protocol_inlayHint_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js"); +Object.defineProperty(exports, "InlayHintRequest", ({ enumerable: true, get: function () { return protocol_inlayHint_1.InlayHintRequest; } })); +Object.defineProperty(exports, "InlayHintResolveRequest", ({ enumerable: true, get: function () { return protocol_inlayHint_1.InlayHintResolveRequest; } })); +Object.defineProperty(exports, "InlayHintRefreshRequest", ({ enumerable: true, get: function () { return protocol_inlayHint_1.InlayHintRefreshRequest; } })); +const protocol_diagnostic_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js"); +Object.defineProperty(exports, "DiagnosticServerCancellationData", ({ enumerable: true, get: function () { return protocol_diagnostic_1.DiagnosticServerCancellationData; } })); +Object.defineProperty(exports, "DocumentDiagnosticReportKind", ({ enumerable: true, get: function () { return protocol_diagnostic_1.DocumentDiagnosticReportKind; } })); +Object.defineProperty(exports, "DocumentDiagnosticRequest", ({ enumerable: true, get: function () { return protocol_diagnostic_1.DocumentDiagnosticRequest; } })); +Object.defineProperty(exports, "WorkspaceDiagnosticRequest", ({ enumerable: true, get: function () { return protocol_diagnostic_1.WorkspaceDiagnosticRequest; } })); +Object.defineProperty(exports, "DiagnosticRefreshRequest", ({ enumerable: true, get: function () { return protocol_diagnostic_1.DiagnosticRefreshRequest; } })); +const protocol_notebook_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js"); +Object.defineProperty(exports, "NotebookCellKind", ({ enumerable: true, get: function () { return protocol_notebook_1.NotebookCellKind; } })); +Object.defineProperty(exports, "ExecutionSummary", ({ enumerable: true, get: function () { return protocol_notebook_1.ExecutionSummary; } })); +Object.defineProperty(exports, "NotebookCell", ({ enumerable: true, get: function () { return protocol_notebook_1.NotebookCell; } })); +Object.defineProperty(exports, "NotebookDocument", ({ enumerable: true, get: function () { return protocol_notebook_1.NotebookDocument; } })); +Object.defineProperty(exports, "NotebookDocumentSyncRegistrationType", ({ enumerable: true, get: function () { return protocol_notebook_1.NotebookDocumentSyncRegistrationType; } })); +Object.defineProperty(exports, "DidOpenNotebookDocumentNotification", ({ enumerable: true, get: function () { return protocol_notebook_1.DidOpenNotebookDocumentNotification; } })); +Object.defineProperty(exports, "NotebookCellArrayChange", ({ enumerable: true, get: function () { return protocol_notebook_1.NotebookCellArrayChange; } })); +Object.defineProperty(exports, "DidChangeNotebookDocumentNotification", ({ enumerable: true, get: function () { return protocol_notebook_1.DidChangeNotebookDocumentNotification; } })); +Object.defineProperty(exports, "DidSaveNotebookDocumentNotification", ({ enumerable: true, get: function () { return protocol_notebook_1.DidSaveNotebookDocumentNotification; } })); +Object.defineProperty(exports, "DidCloseNotebookDocumentNotification", ({ enumerable: true, get: function () { return protocol_notebook_1.DidCloseNotebookDocumentNotification; } })); +const protocol_inlineCompletion_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js"); +Object.defineProperty(exports, "InlineCompletionRequest", ({ enumerable: true, get: function () { return protocol_inlineCompletion_1.InlineCompletionRequest; } })); +const protocol_textDocumentContent_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/protocol.textDocumentContent.js"); +Object.defineProperty(exports, "TextDocumentContentRequest", ({ enumerable: true, get: function () { return protocol_textDocumentContent_1.TextDocumentContentRequest; } })); +Object.defineProperty(exports, "TextDocumentContentRefreshRequest", ({ enumerable: true, get: function () { return protocol_textDocumentContent_1.TextDocumentContentRefreshRequest; } })); +// @ts-ignore: to avoid inlining LocationLink as dynamic import +let __noDynamicImport; +/** + * The TextDocumentFilter namespace provides helper functions to work with + * {@link TextDocumentFilter} literals. + * + * @since 3.17.0 + */ +var TextDocumentFilter; +(function (TextDocumentFilter) { + function is(value) { + const candidate = value; + return Is.string(candidate) || (Is.string(candidate.language) || Is.string(candidate.scheme) || GlobPattern.is(candidate.pattern)); + } + TextDocumentFilter.is = is; +})(TextDocumentFilter || (exports.TextDocumentFilter = TextDocumentFilter = {})); +/** + * The NotebookDocumentFilter namespace provides helper functions to work with + * {@link NotebookDocumentFilter} literals. + * + * @since 3.17.0 + */ +var NotebookDocumentFilter; +(function (NotebookDocumentFilter) { + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && (Is.string(candidate.notebookType) || Is.string(candidate.scheme) || Is.string(candidate.pattern)); + } + NotebookDocumentFilter.is = is; +})(NotebookDocumentFilter || (exports.NotebookDocumentFilter = NotebookDocumentFilter = {})); +/** + * The NotebookCellTextDocumentFilter namespace provides helper functions to work with + * {@link NotebookCellTextDocumentFilter} literals. + * + * @since 3.17.0 + */ +var NotebookCellTextDocumentFilter; +(function (NotebookCellTextDocumentFilter) { + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) + && (Is.string(candidate.notebook) || NotebookDocumentFilter.is(candidate.notebook)) + && (candidate.language === undefined || Is.string(candidate.language)); + } + NotebookCellTextDocumentFilter.is = is; +})(NotebookCellTextDocumentFilter || (exports.NotebookCellTextDocumentFilter = NotebookCellTextDocumentFilter = {})); +/** + * The DocumentSelector namespace provides helper functions to work with + * {@link DocumentSelector}s. + */ +var DocumentSelector; +(function (DocumentSelector) { + function is(value) { + if (!Array.isArray(value)) { + return false; + } + for (const elem of value) { + if (!Is.string(elem) && !TextDocumentFilter.is(elem) && !NotebookCellTextDocumentFilter.is(elem)) { + return false; + } + } + return true; + } + DocumentSelector.is = is; +})(DocumentSelector || (exports.DocumentSelector = DocumentSelector = {})); +/** + * The `client/registerCapability` request is sent from the server to the client to register a new capability + * handler on the client side. + */ +var RegistrationRequest; +(function (RegistrationRequest) { + RegistrationRequest.method = 'client/registerCapability'; + RegistrationRequest.messageDirection = messages_1.MessageDirection.serverToClient; + RegistrationRequest.type = new messages_1.ProtocolRequestType(RegistrationRequest.method); +})(RegistrationRequest || (exports.RegistrationRequest = RegistrationRequest = {})); +/** + * The `client/unregisterCapability` request is sent from the server to the client to unregister a previously registered capability + * handler on the client side. + */ +var UnregistrationRequest; +(function (UnregistrationRequest) { + UnregistrationRequest.method = 'client/unregisterCapability'; + UnregistrationRequest.messageDirection = messages_1.MessageDirection.serverToClient; + UnregistrationRequest.type = new messages_1.ProtocolRequestType(UnregistrationRequest.method); +})(UnregistrationRequest || (exports.UnregistrationRequest = UnregistrationRequest = {})); +var ResourceOperationKind; +(function (ResourceOperationKind) { + /** + * Supports creating new files and folders. + */ + ResourceOperationKind.Create = 'create'; + /** + * Supports renaming existing files and folders. + */ + ResourceOperationKind.Rename = 'rename'; + /** + * Supports deleting existing files and folders. + */ + ResourceOperationKind.Delete = 'delete'; +})(ResourceOperationKind || (exports.ResourceOperationKind = ResourceOperationKind = {})); +var FailureHandlingKind; +(function (FailureHandlingKind) { + /** + * Applying the workspace change is simply aborted if one of the changes provided + * fails. All operations executed before the failing operation stay executed. + */ + FailureHandlingKind.Abort = 'abort'; + /** + * All operations are executed transactional. That means they either all + * succeed or no changes at all are applied to the workspace. + */ + FailureHandlingKind.Transactional = 'transactional'; + /** + * If the workspace edit contains only textual file changes they are executed transactional. + * If resource changes (create, rename or delete file) are part of the change the failure + * handling strategy is abort. + */ + FailureHandlingKind.TextOnlyTransactional = 'textOnlyTransactional'; + /** + * The client tries to undo the operations already executed. But there is no + * guarantee that this is succeeding. + */ + FailureHandlingKind.Undo = 'undo'; +})(FailureHandlingKind || (exports.FailureHandlingKind = FailureHandlingKind = {})); +/** + * Regular Expression Engines + * + * @since 3.18.0 + */ +var RegularExpressionEngineKind; +(function (RegularExpressionEngineKind) { + RegularExpressionEngineKind.ES2020 = 'ES2020'; +})(RegularExpressionEngineKind || (exports.RegularExpressionEngineKind = RegularExpressionEngineKind = {})); +/** + * A set of predefined position encoding kinds. + * + * @since 3.17.0 + */ +var PositionEncodingKind; +(function (PositionEncodingKind) { + /** + * Character offsets count UTF-8 code units (e.g. bytes). + */ + PositionEncodingKind.UTF8 = 'utf-8'; + /** + * Character offsets count UTF-16 code units. + * + * This is the default and must always be supported + * by servers + */ + PositionEncodingKind.UTF16 = 'utf-16'; + /** + * Character offsets count UTF-32 code units. + * + * Implementation note: these are the same as Unicode codepoints, + * so this `PositionEncodingKind` may also be used for an + * encoding-agnostic representation of character offsets. + */ + PositionEncodingKind.UTF32 = 'utf-32'; +})(PositionEncodingKind || (exports.PositionEncodingKind = PositionEncodingKind = {})); +/** + * The StaticRegistrationOptions namespace provides helper functions to work with + * {@link StaticRegistrationOptions} literals. + */ +var StaticRegistrationOptions; +(function (StaticRegistrationOptions) { + function hasId(value) { + const candidate = value; + return candidate && Is.string(candidate.id) && candidate.id.length > 0; + } + StaticRegistrationOptions.hasId = hasId; +})(StaticRegistrationOptions || (exports.StaticRegistrationOptions = StaticRegistrationOptions = {})); +/** + * The TextDocumentRegistrationOptions namespace provides helper functions to work with + * {@link TextDocumentRegistrationOptions} literals. + */ +var TextDocumentRegistrationOptions; +(function (TextDocumentRegistrationOptions) { + function is(value) { + const candidate = value; + return candidate && (candidate.documentSelector === null || DocumentSelector.is(candidate.documentSelector)); + } + TextDocumentRegistrationOptions.is = is; +})(TextDocumentRegistrationOptions || (exports.TextDocumentRegistrationOptions = TextDocumentRegistrationOptions = {})); +/** + * The WorkDoneProgressOptions namespace provides helper functions to work with + * {@link WorkDoneProgressOptions} literals. + */ +var WorkDoneProgressOptions; +(function (WorkDoneProgressOptions) { + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && (candidate.workDoneProgress === undefined || Is.boolean(candidate.workDoneProgress)); + } + WorkDoneProgressOptions.is = is; + function hasWorkDoneProgress(value) { + const candidate = value; + return candidate && Is.boolean(candidate.workDoneProgress); + } + WorkDoneProgressOptions.hasWorkDoneProgress = hasWorkDoneProgress; +})(WorkDoneProgressOptions || (exports.WorkDoneProgressOptions = WorkDoneProgressOptions = {})); +/** + * The initialize request is sent from the client to the server. + * It is sent once as the request after starting up the server. + * The requests parameter is of type {@link InitializeParams} + * the response if of type {@link InitializeResult} of a Thenable that + * resolves to such. + */ +var InitializeRequest; +(function (InitializeRequest) { + InitializeRequest.method = 'initialize'; + InitializeRequest.messageDirection = messages_1.MessageDirection.clientToServer; + InitializeRequest.type = new messages_1.ProtocolRequestType(InitializeRequest.method); +})(InitializeRequest || (exports.InitializeRequest = InitializeRequest = {})); +/** + * Known error codes for an `InitializeErrorCodes`; + */ +var InitializeErrorCodes; +(function (InitializeErrorCodes) { + /** + * If the protocol version provided by the client can't be handled by the server. + * + * @deprecated This initialize error got replaced by client capabilities. There is + * no version handshake in version 3.0x + */ + InitializeErrorCodes.unknownProtocolVersion = 1; +})(InitializeErrorCodes || (exports.InitializeErrorCodes = InitializeErrorCodes = {})); +/** + * The initialized notification is sent from the client to the + * server after the client is fully initialized and the server + * is allowed to send requests from the server to the client. + */ +var InitializedNotification; +(function (InitializedNotification) { + InitializedNotification.method = 'initialized'; + InitializedNotification.messageDirection = messages_1.MessageDirection.clientToServer; + InitializedNotification.type = new messages_1.ProtocolNotificationType(InitializedNotification.method); +})(InitializedNotification || (exports.InitializedNotification = InitializedNotification = {})); +//---- Shutdown Method ---- +/** + * A shutdown request is sent from the client to the server. + * It is sent once when the client decides to shutdown the + * server. The only notification that is sent after a shutdown request + * is the exit event. + */ +var ShutdownRequest; +(function (ShutdownRequest) { + ShutdownRequest.method = 'shutdown'; + ShutdownRequest.messageDirection = messages_1.MessageDirection.clientToServer; + ShutdownRequest.type = new messages_1.ProtocolRequestType0(ShutdownRequest.method); +})(ShutdownRequest || (exports.ShutdownRequest = ShutdownRequest = {})); +//---- Exit Notification ---- +/** + * The exit event is sent from the client to the server to + * ask the server to exit its process. + */ +var ExitNotification; +(function (ExitNotification) { + ExitNotification.method = 'exit'; + ExitNotification.messageDirection = messages_1.MessageDirection.clientToServer; + ExitNotification.type = new messages_1.ProtocolNotificationType0(ExitNotification.method); +})(ExitNotification || (exports.ExitNotification = ExitNotification = {})); +/** + * The configuration change notification is sent from the client to the server + * when the client's configuration has changed. The notification contains + * the changed configuration as defined by the language client. + */ +var DidChangeConfigurationNotification; +(function (DidChangeConfigurationNotification) { + DidChangeConfigurationNotification.method = 'workspace/didChangeConfiguration'; + DidChangeConfigurationNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidChangeConfigurationNotification.type = new messages_1.ProtocolNotificationType(DidChangeConfigurationNotification.method); + DidChangeConfigurationNotification.capabilities = messages_1.CM.create('workspace.didChangeConfiguration', undefined); +})(DidChangeConfigurationNotification || (exports.DidChangeConfigurationNotification = DidChangeConfigurationNotification = {})); +//---- Message show and log notifications ---- +/** + * The message type + */ +var MessageType; +(function (MessageType) { + /** + * An error message. + */ + MessageType.Error = 1; + /** + * A warning message. + */ + MessageType.Warning = 2; + /** + * An information message. + */ + MessageType.Info = 3; + /** + * A log message. + */ + MessageType.Log = 4; + /** + * A debug message. + * + * @since 3.18.0 + */ + MessageType.Debug = 5; +})(MessageType || (exports.MessageType = MessageType = {})); +/** + * The show message notification is sent from a server to a client to ask + * the client to display a particular message in the user interface. + */ +var ShowMessageNotification; +(function (ShowMessageNotification) { + ShowMessageNotification.method = 'window/showMessage'; + ShowMessageNotification.messageDirection = messages_1.MessageDirection.serverToClient; + ShowMessageNotification.type = new messages_1.ProtocolNotificationType(ShowMessageNotification.method); + ShowMessageNotification.capabilities = messages_1.CM.create('window.showMessage', undefined); +})(ShowMessageNotification || (exports.ShowMessageNotification = ShowMessageNotification = {})); +/** + * The show message request is sent from the server to the client to show a message + * and a set of options actions to the user. + */ +var ShowMessageRequest; +(function (ShowMessageRequest) { + ShowMessageRequest.method = 'window/showMessageRequest'; + ShowMessageRequest.messageDirection = messages_1.MessageDirection.serverToClient; + ShowMessageRequest.type = new messages_1.ProtocolRequestType(ShowMessageRequest.method); + ShowMessageRequest.capabilities = messages_1.CM.create('window.showMessage', undefined); +})(ShowMessageRequest || (exports.ShowMessageRequest = ShowMessageRequest = {})); +/** + * The log message notification is sent from the server to the client to ask + * the client to log a particular message. + */ +var LogMessageNotification; +(function (LogMessageNotification) { + LogMessageNotification.method = 'window/logMessage'; + LogMessageNotification.messageDirection = messages_1.MessageDirection.serverToClient; + LogMessageNotification.type = new messages_1.ProtocolNotificationType(LogMessageNotification.method); +})(LogMessageNotification || (exports.LogMessageNotification = LogMessageNotification = {})); +//---- Telemetry notification +/** + * The telemetry event notification is sent from the server to the client to ask + * the client to log telemetry data. + */ +var TelemetryEventNotification; +(function (TelemetryEventNotification) { + TelemetryEventNotification.method = 'telemetry/event'; + TelemetryEventNotification.messageDirection = messages_1.MessageDirection.serverToClient; + TelemetryEventNotification.type = new messages_1.ProtocolNotificationType(TelemetryEventNotification.method); +})(TelemetryEventNotification || (exports.TelemetryEventNotification = TelemetryEventNotification = {})); +/** + * Defines how the host (editor) should sync + * document changes to the language server. + */ +var TextDocumentSyncKind; +(function (TextDocumentSyncKind) { + /** + * Documents should not be synced at all. + */ + TextDocumentSyncKind.None = 0; + /** + * Documents are synced by always sending the full content + * of the document. + */ + TextDocumentSyncKind.Full = 1; + /** + * Documents are synced by sending the full content on open. + * After that only incremental updates to the document are + * send. + */ + TextDocumentSyncKind.Incremental = 2; +})(TextDocumentSyncKind || (exports.TextDocumentSyncKind = TextDocumentSyncKind = {})); +/** + * The document open notification is sent from the client to the server to signal + * newly opened text documents. The document's truth is now managed by the client + * and the server must not try to read the document's truth using the document's + * uri. Open in this sense means it is managed by the client. It doesn't necessarily + * mean that its content is presented in an editor. An open notification must not + * be sent more than once without a corresponding close notification send before. + * This means open and close notification must be balanced and the max open count + * is one. + */ +var DidOpenTextDocumentNotification; +(function (DidOpenTextDocumentNotification) { + DidOpenTextDocumentNotification.method = 'textDocument/didOpen'; + DidOpenTextDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidOpenTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidOpenTextDocumentNotification.method); + DidOpenTextDocumentNotification.capabilities = messages_1.CM.create('textDocument.synchronization', 'textDocumentSync.openClose'); +})(DidOpenTextDocumentNotification || (exports.DidOpenTextDocumentNotification = DidOpenTextDocumentNotification = {})); +var TextDocumentContentChangeEvent; +(function (TextDocumentContentChangeEvent) { + /** + * Checks whether the information describes a delta event. + */ + function isIncremental(event) { + const candidate = event; + return candidate !== undefined && candidate !== null && + typeof candidate.text === 'string' && candidate.range !== undefined && + (candidate.rangeLength === undefined || typeof candidate.rangeLength === 'number'); + } + TextDocumentContentChangeEvent.isIncremental = isIncremental; + /** + * Checks whether the information describes a full replacement event. + */ + function isFull(event) { + const candidate = event; + return candidate !== undefined && candidate !== null && + typeof candidate.text === 'string' && candidate.range === undefined && candidate.rangeLength === undefined; + } + TextDocumentContentChangeEvent.isFull = isFull; +})(TextDocumentContentChangeEvent || (exports.TextDocumentContentChangeEvent = TextDocumentContentChangeEvent = {})); +/** + * The document change notification is sent from the client to the server to signal + * changes to a text document. + */ +var DidChangeTextDocumentNotification; +(function (DidChangeTextDocumentNotification) { + DidChangeTextDocumentNotification.method = 'textDocument/didChange'; + DidChangeTextDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidChangeTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidChangeTextDocumentNotification.method); + DidChangeTextDocumentNotification.capabilities = messages_1.CM.create('textDocument.synchronization', 'textDocumentSync'); +})(DidChangeTextDocumentNotification || (exports.DidChangeTextDocumentNotification = DidChangeTextDocumentNotification = {})); +/** + * The document close notification is sent from the client to the server when + * the document got closed in the client. The document's truth now exists where + * the document's uri points to (e.g. if the document's uri is a file uri the + * truth now exists on disk). As with the open notification the close notification + * is about managing the document's content. Receiving a close notification + * doesn't mean that the document was open in an editor before. A close + * notification requires a previous open notification to be sent. + */ +var DidCloseTextDocumentNotification; +(function (DidCloseTextDocumentNotification) { + DidCloseTextDocumentNotification.method = 'textDocument/didClose'; + DidCloseTextDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidCloseTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidCloseTextDocumentNotification.method); + DidCloseTextDocumentNotification.capabilities = messages_1.CM.create('textDocument.synchronization', 'textDocumentSync.openClose'); +})(DidCloseTextDocumentNotification || (exports.DidCloseTextDocumentNotification = DidCloseTextDocumentNotification = {})); +/** + * The document save notification is sent from the client to the server when + * the document got saved in the client. + */ +var DidSaveTextDocumentNotification; +(function (DidSaveTextDocumentNotification) { + DidSaveTextDocumentNotification.method = 'textDocument/didSave'; + DidSaveTextDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidSaveTextDocumentNotification.method); + DidSaveTextDocumentNotification.capabilities = messages_1.CM.create('textDocument.synchronization.didSave', 'textDocumentSync.save'); +})(DidSaveTextDocumentNotification || (exports.DidSaveTextDocumentNotification = DidSaveTextDocumentNotification = {})); +/** + * Represents reasons why a text document is saved. + */ +var TextDocumentSaveReason; +(function (TextDocumentSaveReason) { + /** + * Manually triggered, e.g. by the user pressing save, by starting debugging, + * or by an API call. + */ + TextDocumentSaveReason.Manual = 1; + /** + * Automatic after a delay. + */ + TextDocumentSaveReason.AfterDelay = 2; + /** + * When the editor lost focus. + */ + TextDocumentSaveReason.FocusOut = 3; +})(TextDocumentSaveReason || (exports.TextDocumentSaveReason = TextDocumentSaveReason = {})); +/** + * A document will save notification is sent from the client to the server before + * the document is actually saved. + */ +var WillSaveTextDocumentNotification; +(function (WillSaveTextDocumentNotification) { + WillSaveTextDocumentNotification.method = 'textDocument/willSave'; + WillSaveTextDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer; + WillSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(WillSaveTextDocumentNotification.method); + WillSaveTextDocumentNotification.capabilities = messages_1.CM.create('textDocument.synchronization.willSave', 'textDocumentSync.willSave'); +})(WillSaveTextDocumentNotification || (exports.WillSaveTextDocumentNotification = WillSaveTextDocumentNotification = {})); +/** + * A document will save request is sent from the client to the server before + * the document is actually saved. The request can return an array of TextEdits + * which will be applied to the text document before it is saved. Please note that + * clients might drop results if computing the text edits took too long or if a + * server constantly fails on this request. This is done to keep the save fast and + * reliable. + */ +var WillSaveTextDocumentWaitUntilRequest; +(function (WillSaveTextDocumentWaitUntilRequest) { + WillSaveTextDocumentWaitUntilRequest.method = 'textDocument/willSaveWaitUntil'; + WillSaveTextDocumentWaitUntilRequest.messageDirection = messages_1.MessageDirection.clientToServer; + WillSaveTextDocumentWaitUntilRequest.type = new messages_1.ProtocolRequestType(WillSaveTextDocumentWaitUntilRequest.method); + WillSaveTextDocumentWaitUntilRequest.capabilities = messages_1.CM.create('textDocument.synchronization.willSaveWaitUntil', 'textDocumentSync.willSaveWaitUntil'); +})(WillSaveTextDocumentWaitUntilRequest || (exports.WillSaveTextDocumentWaitUntilRequest = WillSaveTextDocumentWaitUntilRequest = {})); +/** + * The watched files notification is sent from the client to the server when + * the client detects changes to file watched by the language client. + */ +var DidChangeWatchedFilesNotification; +(function (DidChangeWatchedFilesNotification) { + DidChangeWatchedFilesNotification.method = 'workspace/didChangeWatchedFiles'; + DidChangeWatchedFilesNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidChangeWatchedFilesNotification.type = new messages_1.ProtocolNotificationType(DidChangeWatchedFilesNotification.method); + DidChangeWatchedFilesNotification.capabilities = messages_1.CM.create('workspace.didChangeWatchedFiles', undefined); +})(DidChangeWatchedFilesNotification || (exports.DidChangeWatchedFilesNotification = DidChangeWatchedFilesNotification = {})); +/** + * The file event type + */ +var FileChangeType; +(function (FileChangeType) { + /** + * The file got created. + */ + FileChangeType.Created = 1; + /** + * The file got changed. + */ + FileChangeType.Changed = 2; + /** + * The file got deleted. + */ + FileChangeType.Deleted = 3; +})(FileChangeType || (exports.FileChangeType = FileChangeType = {})); +var RelativePattern; +(function (RelativePattern) { + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && (vscode_languageserver_types_1.URI.is(candidate.baseUri) || vscode_languageserver_types_1.WorkspaceFolder.is(candidate.baseUri)) && Is.string(candidate.pattern); + } + RelativePattern.is = is; +})(RelativePattern || (exports.RelativePattern = RelativePattern = {})); +var GlobPattern; +(function (GlobPattern) { + function is(value) { + const candidate = value; + return Is.string(candidate) || RelativePattern.is(candidate); + } + GlobPattern.is = is; +})(GlobPattern || (exports.GlobPattern = GlobPattern = {})); +var WatchKind; +(function (WatchKind) { + /** + * Interested in create events. + */ + WatchKind.Create = 1; + /** + * Interested in change events + */ + WatchKind.Change = 2; + /** + * Interested in delete events + */ + WatchKind.Delete = 4; +})(WatchKind || (exports.WatchKind = WatchKind = {})); +/** + * Diagnostics notification are sent from the server to the client to signal + * results of validation runs. + */ +var PublishDiagnosticsNotification; +(function (PublishDiagnosticsNotification) { + PublishDiagnosticsNotification.method = 'textDocument/publishDiagnostics'; + PublishDiagnosticsNotification.messageDirection = messages_1.MessageDirection.serverToClient; + PublishDiagnosticsNotification.type = new messages_1.ProtocolNotificationType(PublishDiagnosticsNotification.method); + PublishDiagnosticsNotification.capabilities = messages_1.CM.create('textDocument.publishDiagnostics', undefined); +})(PublishDiagnosticsNotification || (exports.PublishDiagnosticsNotification = PublishDiagnosticsNotification = {})); +/** + * How a completion was triggered + */ +var CompletionTriggerKind; +(function (CompletionTriggerKind) { + /** + * Completion was triggered by typing an identifier (24x7 code + * complete), manual invocation (e.g Ctrl+Space) or via API. + */ + CompletionTriggerKind.Invoked = 1; + /** + * Completion was triggered by a trigger character specified by + * the `triggerCharacters` properties of the `CompletionRegistrationOptions`. + */ + CompletionTriggerKind.TriggerCharacter = 2; + /** + * Completion was re-triggered as current completion list is incomplete + */ + CompletionTriggerKind.TriggerForIncompleteCompletions = 3; +})(CompletionTriggerKind || (exports.CompletionTriggerKind = CompletionTriggerKind = {})); +/** + * Request to request completion at a given text document position. The request's + * parameter is of type {@link TextDocumentPosition} the response + * is of type {@link CompletionItem CompletionItem[]} or {@link CompletionList} + * or a Thenable that resolves to such. + * + * The request can delay the computation of the {@link CompletionItem.detail `detail`} + * and {@link CompletionItem.documentation `documentation`} properties to the `completionItem/resolve` + * request. However, properties that are needed for the initial sorting and filtering, like `sortText`, + * `filterText`, `insertText`, and `textEdit`, must not be changed during resolve. + */ +var CompletionRequest; +(function (CompletionRequest) { + CompletionRequest.method = 'textDocument/completion'; + CompletionRequest.messageDirection = messages_1.MessageDirection.clientToServer; + CompletionRequest.type = new messages_1.ProtocolRequestType(CompletionRequest.method); + CompletionRequest.capabilities = messages_1.CM.create('textDocument.completion', 'completionProvider'); +})(CompletionRequest || (exports.CompletionRequest = CompletionRequest = {})); +/** + * Request to resolve additional information for a given completion item.The request's + * parameter is of type {@link CompletionItem} the response + * is of type {@link CompletionItem} or a Thenable that resolves to such. + */ +var CompletionResolveRequest; +(function (CompletionResolveRequest) { + CompletionResolveRequest.method = 'completionItem/resolve'; + CompletionResolveRequest.messageDirection = messages_1.MessageDirection.clientToServer; + CompletionResolveRequest.type = new messages_1.ProtocolRequestType(CompletionResolveRequest.method); + CompletionResolveRequest.capabilities = messages_1.CM.create('textDocument.completion.completionItem.resolveSupport', 'completionProvider.resolveProvider'); +})(CompletionResolveRequest || (exports.CompletionResolveRequest = CompletionResolveRequest = {})); +/** + * Request to request hover information at a given text document position. The request's + * parameter is of type {@link TextDocumentPosition} the response is of + * type {@link Hover} or a Thenable that resolves to such. + */ +var HoverRequest; +(function (HoverRequest) { + HoverRequest.method = 'textDocument/hover'; + HoverRequest.messageDirection = messages_1.MessageDirection.clientToServer; + HoverRequest.type = new messages_1.ProtocolRequestType(HoverRequest.method); + HoverRequest.capabilities = messages_1.CM.create('textDocument.hover', 'hoverProvider'); +})(HoverRequest || (exports.HoverRequest = HoverRequest = {})); +/** + * How a signature help was triggered. + * + * @since 3.15.0 + */ +var SignatureHelpTriggerKind; +(function (SignatureHelpTriggerKind) { + /** + * Signature help was invoked manually by the user or by a command. + */ + SignatureHelpTriggerKind.Invoked = 1; + /** + * Signature help was triggered by a trigger character. + */ + SignatureHelpTriggerKind.TriggerCharacter = 2; + /** + * Signature help was triggered by the cursor moving or by the document content changing. + */ + SignatureHelpTriggerKind.ContentChange = 3; +})(SignatureHelpTriggerKind || (exports.SignatureHelpTriggerKind = SignatureHelpTriggerKind = {})); +var SignatureHelpRequest; +(function (SignatureHelpRequest) { + SignatureHelpRequest.method = 'textDocument/signatureHelp'; + SignatureHelpRequest.messageDirection = messages_1.MessageDirection.clientToServer; + SignatureHelpRequest.type = new messages_1.ProtocolRequestType(SignatureHelpRequest.method); + SignatureHelpRequest.capabilities = messages_1.CM.create('textDocument.signatureHelp', 'signatureHelpProvider'); +})(SignatureHelpRequest || (exports.SignatureHelpRequest = SignatureHelpRequest = {})); +/** + * A request to resolve the definition location of a symbol at a given text + * document position. The request's parameter is of type {@link TextDocumentPosition} + * the response is of either type {@link Definition} or a typed array of + * {@link DefinitionLink} or a Thenable that resolves to such. + */ +var DefinitionRequest; +(function (DefinitionRequest) { + DefinitionRequest.method = 'textDocument/definition'; + DefinitionRequest.messageDirection = messages_1.MessageDirection.clientToServer; + DefinitionRequest.type = new messages_1.ProtocolRequestType(DefinitionRequest.method); + DefinitionRequest.capabilities = messages_1.CM.create('textDocument.definition', 'definitionProvider'); +})(DefinitionRequest || (exports.DefinitionRequest = DefinitionRequest = {})); +/** + * A request to resolve project-wide references for the symbol denoted + * by the given text document position. The request's parameter is of + * type {@link ReferenceParams} the response is of type + * {@link Location Location[]} or a Thenable that resolves to such. + */ +var ReferencesRequest; +(function (ReferencesRequest) { + ReferencesRequest.method = 'textDocument/references'; + ReferencesRequest.messageDirection = messages_1.MessageDirection.clientToServer; + ReferencesRequest.type = new messages_1.ProtocolRequestType(ReferencesRequest.method); + ReferencesRequest.capabilities = messages_1.CM.create('textDocument.references', 'referencesProvider'); +})(ReferencesRequest || (exports.ReferencesRequest = ReferencesRequest = {})); +/** + * Request to resolve a {@link DocumentHighlight} for a given + * text document position. The request's parameter is of type {@link TextDocumentPosition} + * the request response is an array of type {@link DocumentHighlight} + * or a Thenable that resolves to such. + */ +var DocumentHighlightRequest; +(function (DocumentHighlightRequest) { + DocumentHighlightRequest.method = 'textDocument/documentHighlight'; + DocumentHighlightRequest.messageDirection = messages_1.MessageDirection.clientToServer; + DocumentHighlightRequest.type = new messages_1.ProtocolRequestType(DocumentHighlightRequest.method); + DocumentHighlightRequest.capabilities = messages_1.CM.create('textDocument.documentHighlight', 'documentHighlightProvider'); +})(DocumentHighlightRequest || (exports.DocumentHighlightRequest = DocumentHighlightRequest = {})); +/** + * A request to list all symbols found in a given text document. The request's + * parameter is of type {@link TextDocumentIdentifier} the + * response is of type {@link SymbolInformation SymbolInformation[]} or a Thenable + * that resolves to such. + */ +var DocumentSymbolRequest; +(function (DocumentSymbolRequest) { + DocumentSymbolRequest.method = 'textDocument/documentSymbol'; + DocumentSymbolRequest.messageDirection = messages_1.MessageDirection.clientToServer; + DocumentSymbolRequest.type = new messages_1.ProtocolRequestType(DocumentSymbolRequest.method); + DocumentSymbolRequest.capabilities = messages_1.CM.create('textDocument.documentSymbol', 'documentSymbolProvider'); +})(DocumentSymbolRequest || (exports.DocumentSymbolRequest = DocumentSymbolRequest = {})); +/** + * A request to provide commands for the given text document and range. + */ +var CodeActionRequest; +(function (CodeActionRequest) { + CodeActionRequest.method = 'textDocument/codeAction'; + CodeActionRequest.messageDirection = messages_1.MessageDirection.clientToServer; + CodeActionRequest.type = new messages_1.ProtocolRequestType(CodeActionRequest.method); + CodeActionRequest.capabilities = messages_1.CM.create('textDocument.codeAction', 'codeActionProvider'); +})(CodeActionRequest || (exports.CodeActionRequest = CodeActionRequest = {})); +/** + * Request to resolve additional information for a given code action.The request's + * parameter is of type {@link CodeAction} the response + * is of type {@link CodeAction} or a Thenable that resolves to such. + */ +var CodeActionResolveRequest; +(function (CodeActionResolveRequest) { + CodeActionResolveRequest.method = 'codeAction/resolve'; + CodeActionResolveRequest.messageDirection = messages_1.MessageDirection.clientToServer; + CodeActionResolveRequest.type = new messages_1.ProtocolRequestType(CodeActionResolveRequest.method); + CodeActionResolveRequest.capabilities = messages_1.CM.create('textDocument.codeAction.resolveSupport', 'codeActionProvider.resolveProvider'); +})(CodeActionResolveRequest || (exports.CodeActionResolveRequest = CodeActionResolveRequest = {})); +/** + * A request to list project-wide symbols matching the query string given + * by the {@link WorkspaceSymbolParams}. The response is + * of type {@link SymbolInformation SymbolInformation[]} or a Thenable that + * resolves to such. + * + * @since 3.17.0 - support for WorkspaceSymbol in the returned data. Clients + * need to advertise support for WorkspaceSymbols via the client capability + * `workspace.symbol.resolveSupport`. + * + */ +var WorkspaceSymbolRequest; +(function (WorkspaceSymbolRequest) { + WorkspaceSymbolRequest.method = 'workspace/symbol'; + WorkspaceSymbolRequest.messageDirection = messages_1.MessageDirection.clientToServer; + WorkspaceSymbolRequest.type = new messages_1.ProtocolRequestType(WorkspaceSymbolRequest.method); + WorkspaceSymbolRequest.capabilities = messages_1.CM.create('workspace.symbol', 'workspaceSymbolProvider'); +})(WorkspaceSymbolRequest || (exports.WorkspaceSymbolRequest = WorkspaceSymbolRequest = {})); +/** + * A request to resolve the range inside the workspace + * symbol's location. + * + * @since 3.17.0 + */ +var WorkspaceSymbolResolveRequest; +(function (WorkspaceSymbolResolveRequest) { + WorkspaceSymbolResolveRequest.method = 'workspaceSymbol/resolve'; + WorkspaceSymbolResolveRequest.messageDirection = messages_1.MessageDirection.clientToServer; + WorkspaceSymbolResolveRequest.type = new messages_1.ProtocolRequestType(WorkspaceSymbolResolveRequest.method); + WorkspaceSymbolResolveRequest.capabilities = messages_1.CM.create('workspace.symbol.resolveSupport', 'workspaceSymbolProvider.resolveProvider'); +})(WorkspaceSymbolResolveRequest || (exports.WorkspaceSymbolResolveRequest = WorkspaceSymbolResolveRequest = {})); +/** + * A request to provide code lens for the given text document. + */ +var CodeLensRequest; +(function (CodeLensRequest) { + CodeLensRequest.method = 'textDocument/codeLens'; + CodeLensRequest.messageDirection = messages_1.MessageDirection.clientToServer; + CodeLensRequest.type = new messages_1.ProtocolRequestType(CodeLensRequest.method); + CodeLensRequest.capabilities = messages_1.CM.create('textDocument.codeLens', 'codeLensProvider'); +})(CodeLensRequest || (exports.CodeLensRequest = CodeLensRequest = {})); +/** + * A request to resolve a command for a given code lens. + */ +var CodeLensResolveRequest; +(function (CodeLensResolveRequest) { + CodeLensResolveRequest.method = 'codeLens/resolve'; + CodeLensResolveRequest.messageDirection = messages_1.MessageDirection.clientToServer; + CodeLensResolveRequest.type = new messages_1.ProtocolRequestType(CodeLensResolveRequest.method); + CodeLensResolveRequest.capabilities = messages_1.CM.create('textDocument.codeLens.resolveSupport', 'codeLensProvider.resolveProvider'); +})(CodeLensResolveRequest || (exports.CodeLensResolveRequest = CodeLensResolveRequest = {})); +/** + * A request to refresh all code actions + * + * @since 3.16.0 + */ +var CodeLensRefreshRequest; +(function (CodeLensRefreshRequest) { + CodeLensRefreshRequest.method = `workspace/codeLens/refresh`; + CodeLensRefreshRequest.messageDirection = messages_1.MessageDirection.serverToClient; + CodeLensRefreshRequest.type = new messages_1.ProtocolRequestType0(CodeLensRefreshRequest.method); + CodeLensRefreshRequest.capabilities = messages_1.CM.create('workspace.codeLens', undefined); +})(CodeLensRefreshRequest || (exports.CodeLensRefreshRequest = CodeLensRefreshRequest = {})); +/** + * A request to provide document links + */ +var DocumentLinkRequest; +(function (DocumentLinkRequest) { + DocumentLinkRequest.method = 'textDocument/documentLink'; + DocumentLinkRequest.messageDirection = messages_1.MessageDirection.clientToServer; + DocumentLinkRequest.type = new messages_1.ProtocolRequestType(DocumentLinkRequest.method); + DocumentLinkRequest.capabilities = messages_1.CM.create('textDocument.documentLink', 'documentLinkProvider'); +})(DocumentLinkRequest || (exports.DocumentLinkRequest = DocumentLinkRequest = {})); +/** + * Request to resolve additional information for a given document link. The request's + * parameter is of type {@link DocumentLink} the response + * is of type {@link DocumentLink} or a Thenable that resolves to such. + */ +var DocumentLinkResolveRequest; +(function (DocumentLinkResolveRequest) { + DocumentLinkResolveRequest.method = 'documentLink/resolve'; + DocumentLinkResolveRequest.messageDirection = messages_1.MessageDirection.clientToServer; + DocumentLinkResolveRequest.type = new messages_1.ProtocolRequestType(DocumentLinkResolveRequest.method); + DocumentLinkResolveRequest.capabilities = messages_1.CM.create('textDocument.documentLink', 'documentLinkProvider.resolveProvider'); +})(DocumentLinkResolveRequest || (exports.DocumentLinkResolveRequest = DocumentLinkResolveRequest = {})); +/** + * A request to format a whole document. + */ +var DocumentFormattingRequest; +(function (DocumentFormattingRequest) { + DocumentFormattingRequest.method = 'textDocument/formatting'; + DocumentFormattingRequest.messageDirection = messages_1.MessageDirection.clientToServer; + DocumentFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentFormattingRequest.method); + DocumentFormattingRequest.capabilities = messages_1.CM.create('textDocument.formatting', 'documentFormattingProvider'); +})(DocumentFormattingRequest || (exports.DocumentFormattingRequest = DocumentFormattingRequest = {})); +/** + * A request to format a range in a document. + */ +var DocumentRangeFormattingRequest; +(function (DocumentRangeFormattingRequest) { + DocumentRangeFormattingRequest.method = 'textDocument/rangeFormatting'; + DocumentRangeFormattingRequest.messageDirection = messages_1.MessageDirection.clientToServer; + DocumentRangeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentRangeFormattingRequest.method); + DocumentRangeFormattingRequest.capabilities = messages_1.CM.create('textDocument.rangeFormatting', 'documentRangeFormattingProvider'); +})(DocumentRangeFormattingRequest || (exports.DocumentRangeFormattingRequest = DocumentRangeFormattingRequest = {})); +/** + * A request to format ranges in a document. + * + * @since 3.18.0 + */ +var DocumentRangesFormattingRequest; +(function (DocumentRangesFormattingRequest) { + DocumentRangesFormattingRequest.method = 'textDocument/rangesFormatting'; + DocumentRangesFormattingRequest.messageDirection = messages_1.MessageDirection.clientToServer; + DocumentRangesFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentRangesFormattingRequest.method); + DocumentRangesFormattingRequest.capabilities = messages_1.CM.create('textDocument.rangeFormatting.rangesSupport', 'documentRangeFormattingProvider.rangesSupport'); +})(DocumentRangesFormattingRequest || (exports.DocumentRangesFormattingRequest = DocumentRangesFormattingRequest = {})); +/** + * A request to format a document on type. + */ +var DocumentOnTypeFormattingRequest; +(function (DocumentOnTypeFormattingRequest) { + DocumentOnTypeFormattingRequest.method = 'textDocument/onTypeFormatting'; + DocumentOnTypeFormattingRequest.messageDirection = messages_1.MessageDirection.clientToServer; + DocumentOnTypeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentOnTypeFormattingRequest.method); + DocumentOnTypeFormattingRequest.capabilities = messages_1.CM.create('textDocument.onTypeFormatting', 'documentOnTypeFormattingProvider'); +})(DocumentOnTypeFormattingRequest || (exports.DocumentOnTypeFormattingRequest = DocumentOnTypeFormattingRequest = {})); +//---- Rename ---------------------------------------------- +var PrepareSupportDefaultBehavior; +(function (PrepareSupportDefaultBehavior) { + /** + * The client's default behavior is to select the identifier + * according the to language's syntax rule. + */ + PrepareSupportDefaultBehavior.Identifier = 1; +})(PrepareSupportDefaultBehavior || (exports.PrepareSupportDefaultBehavior = PrepareSupportDefaultBehavior = {})); +/** + * A request to rename a symbol. + */ +var RenameRequest; +(function (RenameRequest) { + RenameRequest.method = 'textDocument/rename'; + RenameRequest.messageDirection = messages_1.MessageDirection.clientToServer; + RenameRequest.type = new messages_1.ProtocolRequestType(RenameRequest.method); + RenameRequest.capabilities = messages_1.CM.create('textDocument.rename', 'renameProvider'); +})(RenameRequest || (exports.RenameRequest = RenameRequest = {})); +/** + * A request to test and perform the setup necessary for a rename. + * + * @since 3.16 - support for default behavior + */ +var PrepareRenameRequest; +(function (PrepareRenameRequest) { + PrepareRenameRequest.method = 'textDocument/prepareRename'; + PrepareRenameRequest.messageDirection = messages_1.MessageDirection.clientToServer; + PrepareRenameRequest.type = new messages_1.ProtocolRequestType(PrepareRenameRequest.method); + PrepareRenameRequest.capabilities = messages_1.CM.create('textDocument.rename.prepareSupport', 'renameProvider.prepareProvider'); +})(PrepareRenameRequest || (exports.PrepareRenameRequest = PrepareRenameRequest = {})); +/** + * A request send from the client to the server to execute a command. The request might return + * a workspace edit which the client will apply to the workspace. + */ +var ExecuteCommandRequest; +(function (ExecuteCommandRequest) { + ExecuteCommandRequest.method = 'workspace/executeCommand'; + ExecuteCommandRequest.messageDirection = messages_1.MessageDirection.clientToServer; + ExecuteCommandRequest.type = new messages_1.ProtocolRequestType(ExecuteCommandRequest.method); + ExecuteCommandRequest.capabilities = messages_1.CM.create('workspace.executeCommand', 'executeCommandProvider'); +})(ExecuteCommandRequest || (exports.ExecuteCommandRequest = ExecuteCommandRequest = {})); +/** + * A request sent from the server to the client to modified certain resources. + */ +var ApplyWorkspaceEditRequest; +(function (ApplyWorkspaceEditRequest) { + ApplyWorkspaceEditRequest.method = 'workspace/applyEdit'; + ApplyWorkspaceEditRequest.messageDirection = messages_1.MessageDirection.serverToClient; + ApplyWorkspaceEditRequest.type = new messages_1.ProtocolRequestType('workspace/applyEdit'); + ApplyWorkspaceEditRequest.capabilities = messages_1.CM.create('workspace.applyEdit', undefined); +})(ApplyWorkspaceEditRequest || (exports.ApplyWorkspaceEditRequest = ApplyWorkspaceEditRequest = {})); + + +}, +"./node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js"(__unused_rspack_module, exports, __webpack_require__) { +var __rspack_unused_export; + +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +__rspack_unused_export = ({ value: true }); +exports.LinkedEditingRangeRequest = void 0; +const messages_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/messages.js"); +/** + * A request to provide ranges that can be edited together. + * + * @since 3.16.0 + */ +var LinkedEditingRangeRequest; +(function (LinkedEditingRangeRequest) { + LinkedEditingRangeRequest.method = 'textDocument/linkedEditingRange'; + LinkedEditingRangeRequest.messageDirection = messages_1.MessageDirection.clientToServer; + LinkedEditingRangeRequest.type = new messages_1.ProtocolRequestType(LinkedEditingRangeRequest.method); + LinkedEditingRangeRequest.capabilities = messages_1.CM.create('textDocument.linkedEditingRange', 'linkedEditingRangeProvider'); +})(LinkedEditingRangeRequest || (exports.LinkedEditingRangeRequest = LinkedEditingRangeRequest = {})); + + +}, +"./node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js"(__unused_rspack_module, exports, __webpack_require__) { +var __rspack_unused_export; + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +__rspack_unused_export = ({ value: true }); +exports.MonikerRequest = exports.MonikerKind = exports.UniquenessLevel = void 0; +const messages_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/messages.js"); +/** + * Moniker uniqueness level to define scope of the moniker. + * + * @since 3.16.0 + */ +var UniquenessLevel; +(function (UniquenessLevel) { + /** + * The moniker is only unique inside a document + */ + UniquenessLevel.document = 'document'; + /** + * The moniker is unique inside a project for which a dump got created + */ + UniquenessLevel.project = 'project'; + /** + * The moniker is unique inside the group to which a project belongs + */ + UniquenessLevel.group = 'group'; + /** + * The moniker is unique inside the moniker scheme. + */ + UniquenessLevel.scheme = 'scheme'; + /** + * The moniker is globally unique + */ + UniquenessLevel.global = 'global'; +})(UniquenessLevel || (exports.UniquenessLevel = UniquenessLevel = {})); +/** + * The moniker kind. + * + * @since 3.16.0 + */ +var MonikerKind; +(function (MonikerKind) { + /** + * The moniker represent a symbol that is imported into a project + */ + MonikerKind.$import = 'import'; + /** + * The moniker represents a symbol that is exported from a project + */ + MonikerKind.$export = 'export'; + /** + * The moniker represents a symbol that is local to a project (e.g. a local + * variable of a function, a class not visible outside the project, ...) + */ + MonikerKind.local = 'local'; +})(MonikerKind || (exports.MonikerKind = MonikerKind = {})); +/** + * A request to get the moniker of a symbol at a given text document position. + * The request parameter is of type {@link TextDocumentPositionParams}. + * The response is of type {@link Moniker Moniker[]} or `null`. + */ +var MonikerRequest; +(function (MonikerRequest) { + MonikerRequest.method = 'textDocument/moniker'; + MonikerRequest.messageDirection = messages_1.MessageDirection.clientToServer; + MonikerRequest.type = new messages_1.ProtocolRequestType(MonikerRequest.method); + MonikerRequest.capabilities = messages_1.CM.create('textDocument.moniker', 'monikerProvider'); +})(MonikerRequest || (exports.MonikerRequest = MonikerRequest = {})); + + +}, +"./node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DidCloseNotebookDocumentNotification = exports.DidSaveNotebookDocumentNotification = exports.DidChangeNotebookDocumentNotification = exports.NotebookCellArrayChange = exports.DidOpenNotebookDocumentNotification = exports.NotebookDocumentSyncRegistrationType = exports.NotebookDocument = exports.NotebookCell = exports.ExecutionSummary = exports.NotebookCellKind = void 0; +const vscode_languageserver_types_1 = __webpack_require__("./node_modules/vscode-languageserver-types/lib/esm/main.js"); +const Is = __importStar(__webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/utils/is.js")); +const messages_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/messages.js"); +/** + * A notebook cell kind. + * + * @since 3.17.0 + */ +var NotebookCellKind; +(function (NotebookCellKind) { + /** + * A markup-cell is formatted source that is used for display. + */ + NotebookCellKind.Markup = 1; + /** + * A code-cell is source code. + */ + NotebookCellKind.Code = 2; + function is(value) { + return value === 1 || value === 2; + } + NotebookCellKind.is = is; +})(NotebookCellKind || (exports.NotebookCellKind = NotebookCellKind = {})); +var ExecutionSummary; +(function (ExecutionSummary) { + function create(executionOrder, success) { + const result = { executionOrder }; + if (success === true || success === false) { + result.success = success; + } + return result; + } + ExecutionSummary.create = create; + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && vscode_languageserver_types_1.uinteger.is(candidate.executionOrder) && (candidate.success === undefined || Is.boolean(candidate.success)); + } + ExecutionSummary.is = is; + function equals(one, other) { + if (one === other) { + return true; + } + if (one === null || one === undefined || other === null || other === undefined) { + return false; + } + return one.executionOrder === other.executionOrder && one.success === other.success; + } + ExecutionSummary.equals = equals; +})(ExecutionSummary || (exports.ExecutionSummary = ExecutionSummary = {})); +var NotebookCell; +(function (NotebookCell) { + function create(kind, document) { + return { kind, document }; + } + NotebookCell.create = create; + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && NotebookCellKind.is(candidate.kind) && vscode_languageserver_types_1.DocumentUri.is(candidate.document) && + (candidate.metadata === undefined || Is.objectLiteral(candidate.metadata)); + } + NotebookCell.is = is; + function diff(one, two) { + const result = new Set(); + if (one.document !== two.document) { + result.add('document'); + } + if (one.kind !== two.kind) { + result.add('kind'); + } + if (one.executionSummary !== two.executionSummary) { + result.add('executionSummary'); + } + if ((one.metadata !== undefined || two.metadata !== undefined) && !equalsMetadata(one.metadata, two.metadata)) { + result.add('metadata'); + } + if ((one.executionSummary !== undefined || two.executionSummary !== undefined) && !ExecutionSummary.equals(one.executionSummary, two.executionSummary)) { + result.add('executionSummary'); + } + return result; + } + NotebookCell.diff = diff; + function equalsMetadata(one, other) { + if (one === other) { + return true; + } + if (one === null || one === undefined || other === null || other === undefined) { + return false; + } + if (typeof one !== typeof other) { + return false; + } + if (typeof one !== 'object') { + return false; + } + const oneArray = Array.isArray(one); + const otherArray = Array.isArray(other); + if (oneArray !== otherArray) { + return false; + } + if (oneArray && otherArray) { + if (one.length !== other.length) { + return false; + } + for (let i = 0; i < one.length; i++) { + if (!equalsMetadata(one[i], other[i])) { + return false; + } + } + } + if (Is.objectLiteral(one) && Is.objectLiteral(other)) { + const oneKeys = Object.keys(one); + const otherKeys = Object.keys(other); + if (oneKeys.length !== otherKeys.length) { + return false; + } + oneKeys.sort(); + otherKeys.sort(); + if (!equalsMetadata(oneKeys, otherKeys)) { + return false; + } + for (let i = 0; i < oneKeys.length; i++) { + const prop = oneKeys[i]; + if (!equalsMetadata(one[prop], other[prop])) { + return false; + } + } + } + return true; + } +})(NotebookCell || (exports.NotebookCell = NotebookCell = {})); +var NotebookDocument; +(function (NotebookDocument) { + function create(uri, notebookType, version, cells) { + return { uri, notebookType, version, cells }; + } + NotebookDocument.create = create; + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && Is.string(candidate.uri) && vscode_languageserver_types_1.integer.is(candidate.version) && Is.typedArray(candidate.cells, NotebookCell.is); + } + NotebookDocument.is = is; +})(NotebookDocument || (exports.NotebookDocument = NotebookDocument = {})); +var NotebookDocumentSyncRegistrationType; +(function (NotebookDocumentSyncRegistrationType) { + NotebookDocumentSyncRegistrationType.method = 'notebookDocument/sync'; + NotebookDocumentSyncRegistrationType.messageDirection = messages_1.MessageDirection.clientToServer; + NotebookDocumentSyncRegistrationType.type = new messages_1.RegistrationType(NotebookDocumentSyncRegistrationType.method); +})(NotebookDocumentSyncRegistrationType || (exports.NotebookDocumentSyncRegistrationType = NotebookDocumentSyncRegistrationType = {})); +/** + * A notification sent when a notebook opens. + * + * @since 3.17.0 + */ +var DidOpenNotebookDocumentNotification; +(function (DidOpenNotebookDocumentNotification) { + DidOpenNotebookDocumentNotification.method = 'notebookDocument/didOpen'; + DidOpenNotebookDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidOpenNotebookDocumentNotification.type = new messages_1.ProtocolNotificationType(DidOpenNotebookDocumentNotification.method); + DidOpenNotebookDocumentNotification.registrationMethod = NotebookDocumentSyncRegistrationType.method; +})(DidOpenNotebookDocumentNotification || (exports.DidOpenNotebookDocumentNotification = DidOpenNotebookDocumentNotification = {})); +var NotebookCellArrayChange; +(function (NotebookCellArrayChange) { + function is(value) { + const candidate = value; + return Is.objectLiteral(candidate) && vscode_languageserver_types_1.uinteger.is(candidate.start) && vscode_languageserver_types_1.uinteger.is(candidate.deleteCount) && (candidate.cells === undefined || Is.typedArray(candidate.cells, NotebookCell.is)); + } + NotebookCellArrayChange.is = is; + function create(start, deleteCount, cells) { + const result = { start, deleteCount }; + if (cells !== undefined) { + result.cells = cells; + } + return result; + } + NotebookCellArrayChange.create = create; +})(NotebookCellArrayChange || (exports.NotebookCellArrayChange = NotebookCellArrayChange = {})); +var DidChangeNotebookDocumentNotification; +(function (DidChangeNotebookDocumentNotification) { + DidChangeNotebookDocumentNotification.method = 'notebookDocument/didChange'; + DidChangeNotebookDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidChangeNotebookDocumentNotification.type = new messages_1.ProtocolNotificationType(DidChangeNotebookDocumentNotification.method); + DidChangeNotebookDocumentNotification.registrationMethod = NotebookDocumentSyncRegistrationType.method; +})(DidChangeNotebookDocumentNotification || (exports.DidChangeNotebookDocumentNotification = DidChangeNotebookDocumentNotification = {})); +/** + * A notification sent when a notebook document is saved. + * + * @since 3.17.0 + */ +var DidSaveNotebookDocumentNotification; +(function (DidSaveNotebookDocumentNotification) { + DidSaveNotebookDocumentNotification.method = 'notebookDocument/didSave'; + DidSaveNotebookDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidSaveNotebookDocumentNotification.type = new messages_1.ProtocolNotificationType(DidSaveNotebookDocumentNotification.method); + DidSaveNotebookDocumentNotification.registrationMethod = NotebookDocumentSyncRegistrationType.method; +})(DidSaveNotebookDocumentNotification || (exports.DidSaveNotebookDocumentNotification = DidSaveNotebookDocumentNotification = {})); +/** + * A notification sent when a notebook closes. + * + * @since 3.17.0 + */ +var DidCloseNotebookDocumentNotification; +(function (DidCloseNotebookDocumentNotification) { + DidCloseNotebookDocumentNotification.method = 'notebookDocument/didClose'; + DidCloseNotebookDocumentNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidCloseNotebookDocumentNotification.type = new messages_1.ProtocolNotificationType(DidCloseNotebookDocumentNotification.method); + DidCloseNotebookDocumentNotification.registrationMethod = NotebookDocumentSyncRegistrationType.method; +})(DidCloseNotebookDocumentNotification || (exports.DidCloseNotebookDocumentNotification = DidCloseNotebookDocumentNotification = {})); + + +}, +"./node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js"(__unused_rspack_module, exports, __webpack_require__) { +var __rspack_unused_export; + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +__rspack_unused_export = ({ value: true }); +exports.WorkDoneProgressCancelNotification = exports.WorkDoneProgressCreateRequest = exports.WorkDoneProgress = void 0; +const vscode_jsonrpc_1 = __webpack_require__("./node_modules/vscode-jsonrpc/lib/common/api.js"); +const messages_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/messages.js"); +var WorkDoneProgress; +(function (WorkDoneProgress) { + WorkDoneProgress.type = new vscode_jsonrpc_1.ProgressType(); + function is(value) { + return value === WorkDoneProgress.type; + } + WorkDoneProgress.is = is; +})(WorkDoneProgress || (exports.WorkDoneProgress = WorkDoneProgress = {})); +/** + * The `window/workDoneProgress/create` request is sent from the server to the client to initiate progress + * reporting from the server. + */ +var WorkDoneProgressCreateRequest; +(function (WorkDoneProgressCreateRequest) { + WorkDoneProgressCreateRequest.method = 'window/workDoneProgress/create'; + WorkDoneProgressCreateRequest.messageDirection = messages_1.MessageDirection.serverToClient; + WorkDoneProgressCreateRequest.type = new messages_1.ProtocolRequestType(WorkDoneProgressCreateRequest.method); + WorkDoneProgressCreateRequest.capabilities = messages_1.CM.create('window.workDoneProgress', undefined); +})(WorkDoneProgressCreateRequest || (exports.WorkDoneProgressCreateRequest = WorkDoneProgressCreateRequest = {})); +/** + * The `window/workDoneProgress/cancel` notification is sent from the client to the server to cancel a progress + * initiated on the server side. + */ +var WorkDoneProgressCancelNotification; +(function (WorkDoneProgressCancelNotification) { + WorkDoneProgressCancelNotification.method = 'window/workDoneProgress/cancel'; + WorkDoneProgressCancelNotification.messageDirection = messages_1.MessageDirection.clientToServer; + WorkDoneProgressCancelNotification.type = new messages_1.ProtocolNotificationType(WorkDoneProgressCancelNotification.method); +})(WorkDoneProgressCancelNotification || (exports.WorkDoneProgressCancelNotification = WorkDoneProgressCancelNotification = {})); + + +}, +"./node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js"(__unused_rspack_module, exports, __webpack_require__) { +var __rspack_unused_export; + +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +__rspack_unused_export = ({ value: true }); +exports.SelectionRangeRequest = void 0; +const messages_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/messages.js"); +/** + * A request to provide selection ranges in a document. The request's + * parameter is of type {@link SelectionRangeParams}, the + * response is of type {@link SelectionRange SelectionRange[]} or a Thenable + * that resolves to such. + */ +var SelectionRangeRequest; +(function (SelectionRangeRequest) { + SelectionRangeRequest.method = 'textDocument/selectionRange'; + SelectionRangeRequest.messageDirection = messages_1.MessageDirection.clientToServer; + SelectionRangeRequest.type = new messages_1.ProtocolRequestType(SelectionRangeRequest.method); + SelectionRangeRequest.capabilities = messages_1.CM.create('textDocument.selectionRange', 'selectionRangeProvider'); +})(SelectionRangeRequest || (exports.SelectionRangeRequest = SelectionRangeRequest = {})); + + +}, +"./node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js"(__unused_rspack_module, exports, __webpack_require__) { +var __rspack_unused_export; + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +__rspack_unused_export = ({ value: true }); +exports.SemanticTokensRefreshRequest = exports.SemanticTokensRangeRequest = exports.SemanticTokensDeltaRequest = exports.SemanticTokensRequest = exports.SemanticTokensRegistrationType = exports.TokenFormat = void 0; +const messages_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/messages.js"); +//------- 'textDocument/semanticTokens' ----- +var TokenFormat; +(function (TokenFormat) { + TokenFormat.Relative = 'relative'; +})(TokenFormat || (exports.TokenFormat = TokenFormat = {})); +var SemanticTokensRegistrationType; +(function (SemanticTokensRegistrationType) { + SemanticTokensRegistrationType.method = 'textDocument/semanticTokens'; + SemanticTokensRegistrationType.type = new messages_1.RegistrationType(SemanticTokensRegistrationType.method); +})(SemanticTokensRegistrationType || (exports.SemanticTokensRegistrationType = SemanticTokensRegistrationType = {})); +/** + * @since 3.16.0 + */ +var SemanticTokensRequest; +(function (SemanticTokensRequest) { + SemanticTokensRequest.method = 'textDocument/semanticTokens/full'; + SemanticTokensRequest.messageDirection = messages_1.MessageDirection.clientToServer; + SemanticTokensRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRequest.method); + SemanticTokensRequest.registrationMethod = SemanticTokensRegistrationType.method; + SemanticTokensRequest.capabilities = messages_1.CM.create('textDocument.semanticTokens', 'semanticTokensProvider'); +})(SemanticTokensRequest || (exports.SemanticTokensRequest = SemanticTokensRequest = {})); +/** + * @since 3.16.0 + */ +var SemanticTokensDeltaRequest; +(function (SemanticTokensDeltaRequest) { + SemanticTokensDeltaRequest.method = 'textDocument/semanticTokens/full/delta'; + SemanticTokensDeltaRequest.messageDirection = messages_1.MessageDirection.clientToServer; + SemanticTokensDeltaRequest.type = new messages_1.ProtocolRequestType(SemanticTokensDeltaRequest.method); + SemanticTokensDeltaRequest.registrationMethod = SemanticTokensRegistrationType.method; + SemanticTokensDeltaRequest.capabilities = messages_1.CM.create('textDocument.semanticTokens.requests.full.delta', 'semanticTokensProvider.full.delta'); +})(SemanticTokensDeltaRequest || (exports.SemanticTokensDeltaRequest = SemanticTokensDeltaRequest = {})); +/** + * @since 3.16.0 + */ +var SemanticTokensRangeRequest; +(function (SemanticTokensRangeRequest) { + SemanticTokensRangeRequest.method = 'textDocument/semanticTokens/range'; + SemanticTokensRangeRequest.messageDirection = messages_1.MessageDirection.clientToServer; + SemanticTokensRangeRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRangeRequest.method); + SemanticTokensRangeRequest.registrationMethod = SemanticTokensRegistrationType.method; + SemanticTokensRangeRequest.capabilities = messages_1.CM.create('textDocument.semanticTokens.requests.range', 'semanticTokensProvider.range'); +})(SemanticTokensRangeRequest || (exports.SemanticTokensRangeRequest = SemanticTokensRangeRequest = {})); +/** + * @since 3.16.0 + */ +var SemanticTokensRefreshRequest; +(function (SemanticTokensRefreshRequest) { + SemanticTokensRefreshRequest.method = `workspace/semanticTokens/refresh`; + SemanticTokensRefreshRequest.messageDirection = messages_1.MessageDirection.serverToClient; + SemanticTokensRefreshRequest.type = new messages_1.ProtocolRequestType0(SemanticTokensRefreshRequest.method); + SemanticTokensRefreshRequest.capabilities = messages_1.CM.create('workspace.semanticTokens.refreshSupport', undefined); +})(SemanticTokensRefreshRequest || (exports.SemanticTokensRefreshRequest = SemanticTokensRefreshRequest = {})); + + +}, +"./node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js"(__unused_rspack_module, exports, __webpack_require__) { +var __rspack_unused_export; + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +__rspack_unused_export = ({ value: true }); +exports.ShowDocumentRequest = void 0; +const messages_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/messages.js"); +/** + * A request to show a document. This request might open an + * external program depending on the value of the URI to open. + * For example a request to open `https://code.visualstudio.com/` + * will very likely open the URI in a WEB browser. + * + * @since 3.16.0 +*/ +var ShowDocumentRequest; +(function (ShowDocumentRequest) { + ShowDocumentRequest.method = 'window/showDocument'; + ShowDocumentRequest.messageDirection = messages_1.MessageDirection.serverToClient; + ShowDocumentRequest.type = new messages_1.ProtocolRequestType(ShowDocumentRequest.method); + ShowDocumentRequest.capabilities = messages_1.CM.create('window.showDocument.support', undefined); +})(ShowDocumentRequest || (exports.ShowDocumentRequest = ShowDocumentRequest = {})); + + +}, +"./node_modules/vscode-languageserver-protocol/lib/common/protocol.textDocumentContent.js"(__unused_rspack_module, exports, __webpack_require__) { +var __rspack_unused_export; + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +__rspack_unused_export = ({ value: true }); +exports.TextDocumentContentRefreshRequest = exports.TextDocumentContentRequest = void 0; +const messages_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/messages.js"); +/** + * The `workspace/textDocumentContent` request is sent from the client to the + * server to request the content of a text document. + * + * @since 3.18.0 + */ +var TextDocumentContentRequest; +(function (TextDocumentContentRequest) { + TextDocumentContentRequest.method = 'workspace/textDocumentContent'; + TextDocumentContentRequest.messageDirection = messages_1.MessageDirection.clientToServer; + TextDocumentContentRequest.type = new messages_1.ProtocolRequestType(TextDocumentContentRequest.method); + TextDocumentContentRequest.capabilities = messages_1.CM.create('workspace.textDocumentContent', 'workspace.textDocumentContent'); +})(TextDocumentContentRequest || (exports.TextDocumentContentRequest = TextDocumentContentRequest = {})); +/** + * The `workspace/textDocumentContent` request is sent from the server to the client to refresh + * the content of a specific text document. + * + * @since 3.18.0 + */ +var TextDocumentContentRefreshRequest; +(function (TextDocumentContentRefreshRequest) { + TextDocumentContentRefreshRequest.method = `workspace/textDocumentContent/refresh`; + TextDocumentContentRefreshRequest.messageDirection = messages_1.MessageDirection.serverToClient; + TextDocumentContentRefreshRequest.type = new messages_1.ProtocolRequestType(TextDocumentContentRefreshRequest.method); +})(TextDocumentContentRefreshRequest || (exports.TextDocumentContentRefreshRequest = TextDocumentContentRefreshRequest = {})); + + +}, +"./node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js"(__unused_rspack_module, exports, __webpack_require__) { +var __rspack_unused_export; + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +__rspack_unused_export = ({ value: true }); +exports.TypeDefinitionRequest = void 0; +const messages_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/messages.js"); +// @ts-ignore: to avoid inlining LocationLink as dynamic import +let __noDynamicImport; +/** + * A request to resolve the type definition locations of a symbol at a given text + * document position. The request's parameter is of type {@link TextDocumentPositionParams} + * the response is of type {@link Definition} or a Thenable that resolves to such. + */ +var TypeDefinitionRequest; +(function (TypeDefinitionRequest) { + TypeDefinitionRequest.method = 'textDocument/typeDefinition'; + TypeDefinitionRequest.messageDirection = messages_1.MessageDirection.clientToServer; + TypeDefinitionRequest.type = new messages_1.ProtocolRequestType(TypeDefinitionRequest.method); + TypeDefinitionRequest.capabilities = messages_1.CM.create('textDocument.typeDefinition', 'typeDefinitionProvider'); +})(TypeDefinitionRequest || (exports.TypeDefinitionRequest = TypeDefinitionRequest = {})); + + +}, +"./node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js"(__unused_rspack_module, exports, __webpack_require__) { +var __rspack_unused_export; + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) TypeFox, Microsoft and others. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +__rspack_unused_export = ({ value: true }); +exports.TypeHierarchySubtypesRequest = exports.TypeHierarchySupertypesRequest = exports.TypeHierarchyPrepareRequest = void 0; +const messages_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/messages.js"); +/** + * A request to result a `TypeHierarchyItem` in a document at a given position. + * Can be used as an input to a subtypes or supertypes type hierarchy. + * + * @since 3.17.0 + */ +var TypeHierarchyPrepareRequest; +(function (TypeHierarchyPrepareRequest) { + TypeHierarchyPrepareRequest.method = 'textDocument/prepareTypeHierarchy'; + TypeHierarchyPrepareRequest.messageDirection = messages_1.MessageDirection.clientToServer; + TypeHierarchyPrepareRequest.type = new messages_1.ProtocolRequestType(TypeHierarchyPrepareRequest.method); + TypeHierarchyPrepareRequest.capabilities = messages_1.CM.create('textDocument.typeHierarchy', 'typeHierarchyProvider'); +})(TypeHierarchyPrepareRequest || (exports.TypeHierarchyPrepareRequest = TypeHierarchyPrepareRequest = {})); +/** + * A request to resolve the supertypes for a given `TypeHierarchyItem`. + * + * @since 3.17.0 + */ +var TypeHierarchySupertypesRequest; +(function (TypeHierarchySupertypesRequest) { + TypeHierarchySupertypesRequest.method = 'typeHierarchy/supertypes'; + TypeHierarchySupertypesRequest.messageDirection = messages_1.MessageDirection.clientToServer; + TypeHierarchySupertypesRequest.type = new messages_1.ProtocolRequestType(TypeHierarchySupertypesRequest.method); +})(TypeHierarchySupertypesRequest || (exports.TypeHierarchySupertypesRequest = TypeHierarchySupertypesRequest = {})); +/** + * A request to resolve the subtypes for a given `TypeHierarchyItem`. + * + * @since 3.17.0 + */ +var TypeHierarchySubtypesRequest; +(function (TypeHierarchySubtypesRequest) { + TypeHierarchySubtypesRequest.method = 'typeHierarchy/subtypes'; + TypeHierarchySubtypesRequest.messageDirection = messages_1.MessageDirection.clientToServer; + TypeHierarchySubtypesRequest.type = new messages_1.ProtocolRequestType(TypeHierarchySubtypesRequest.method); +})(TypeHierarchySubtypesRequest || (exports.TypeHierarchySubtypesRequest = TypeHierarchySubtypesRequest = {})); + + +}, +"./node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js"(__unused_rspack_module, exports, __webpack_require__) { +var __rspack_unused_export; + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +__rspack_unused_export = ({ value: true }); +exports.DidChangeWorkspaceFoldersNotification = exports.WorkspaceFoldersRequest = void 0; +const messages_1 = __webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/messages.js"); +/** + * The `workspace/workspaceFolders` is sent from the server to the client to fetch the open workspace folders. + */ +var WorkspaceFoldersRequest; +(function (WorkspaceFoldersRequest) { + WorkspaceFoldersRequest.method = 'workspace/workspaceFolders'; + WorkspaceFoldersRequest.messageDirection = messages_1.MessageDirection.serverToClient; + WorkspaceFoldersRequest.type = new messages_1.ProtocolRequestType0(WorkspaceFoldersRequest.method); + WorkspaceFoldersRequest.capabilities = messages_1.CM.create('workspace.workspaceFolders', 'workspace.workspaceFolders'); +})(WorkspaceFoldersRequest || (exports.WorkspaceFoldersRequest = WorkspaceFoldersRequest = {})); +/** + * The `workspace/didChangeWorkspaceFolders` notification is sent from the client to the server when the workspace + * folder configuration changes. + */ +var DidChangeWorkspaceFoldersNotification; +(function (DidChangeWorkspaceFoldersNotification) { + DidChangeWorkspaceFoldersNotification.method = 'workspace/didChangeWorkspaceFolders'; + DidChangeWorkspaceFoldersNotification.messageDirection = messages_1.MessageDirection.clientToServer; + DidChangeWorkspaceFoldersNotification.type = new messages_1.ProtocolNotificationType(DidChangeWorkspaceFoldersNotification.method); + DidChangeWorkspaceFoldersNotification.capabilities = messages_1.CM.create(undefined, 'workspace.workspaceFolders.changeNotifications'); +})(DidChangeWorkspaceFoldersNotification || (exports.DidChangeWorkspaceFoldersNotification = DidChangeWorkspaceFoldersNotification = {})); + + +}, +"./node_modules/vscode-languageserver-protocol/lib/common/utils/is.js"(__unused_rspack_module, exports) { +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.boolean = boolean; +exports.string = string; +exports.number = number; +exports.error = error; +exports.func = func; +exports.array = array; +exports.stringArray = stringArray; +exports.typedArray = typedArray; +exports.objectLiteral = objectLiteral; +function boolean(value) { + return value === true || value === false; +} +function string(value) { + return typeof value === 'string' || value instanceof String; +} +function number(value) { + return typeof value === 'number' || value instanceof Number; +} +function error(value) { + return value instanceof Error; +} +function func(value) { + return typeof value === 'function'; +} +function array(value) { + return Array.isArray(value); +} +function stringArray(value) { + return array(value) && value.every(elem => string(elem)); +} +function typedArray(value, check) { + return Array.isArray(value) && value.every(check); +} +function objectLiteral(value) { + // Strictly speaking class instances pass this check as well. Since the LSP + // doesn't use classes we ignore this for now. If we do we need to add something + // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null` + return value !== null && typeof value === 'object'; +} + + +}, +"./node_modules/vscode-languageserver-protocol/lib/node/main.js"(__unused_rspack_module, exports, __webpack_require__) { + +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createProtocolConnection = createProtocolConnection; +const node_1 = __webpack_require__("./node_modules/vscode-jsonrpc/lib/node/main.js"); +__exportStar(__webpack_require__("./node_modules/vscode-jsonrpc/lib/node/main.js"), exports); +__exportStar(__webpack_require__("./node_modules/vscode-languageserver-protocol/lib/common/api.js"), exports); +function createProtocolConnection(input, output, logger, options) { + return (0, node_1.createMessageConnection)(input, output, logger, options); +} + + +}, +"child_process"(module) { +module.exports = require("child_process"); + +}, +"crypto"(module) { +module.exports = require("crypto"); + +}, +"fs"(module) { +module.exports = require("fs"); + +}, +"net"(module) { +module.exports = require("net"); + +}, +"os"(module) { +module.exports = require("os"); + +}, +"path"(module) { +module.exports = require("path"); + +}, +"readline"(module) { +module.exports = require("readline"); + +}, +"util"(module) { +module.exports = require("util"); + +}, +"vscode"(module) { +module.exports = require("vscode"); + +}, +"./node_modules/balanced-match/dist/commonjs/index.js"(__unused_rspack_module, exports) { +var __rspack_unused_export; + +__rspack_unused_export = ({ value: true }); +exports.y = exports.balanced = void 0; +const balanced = (a, b, str) => { + const ma = a instanceof RegExp ? maybeMatch(a, str) : a; + const mb = b instanceof RegExp ? maybeMatch(b, str) : b; + const r = ma !== null && mb != null && (0, exports.y)(ma, mb, str); + return (r && { + start: r[0], + end: r[1], + pre: str.slice(0, r[0]), + body: str.slice(r[0] + ma.length, r[1]), + post: str.slice(r[1] + mb.length), + }); +}; +exports.balanced = balanced; +const maybeMatch = (reg, str) => { + const m = str.match(reg); + return m ? m[0] : null; +}; +const range = (a, b, str) => { + let begs, beg, left, right = undefined, result; + let ai = str.indexOf(a); + let bi = str.indexOf(b, ai + 1); + let i = ai; + if (ai >= 0 && bi > 0) { + if (a === b) { + return [ai, bi]; + } + begs = []; + left = str.length; + while (i >= 0 && !result) { + if (i === ai) { + begs.push(i); + ai = str.indexOf(a, i + 1); + } + else if (begs.length === 1) { + const r = begs.pop(); + if (r !== undefined) + result = [r, bi]; + } + else { + beg = begs.pop(); + if (beg !== undefined && beg < left) { + left = beg; + right = bi; + } + bi = str.indexOf(b, i + 1); + } + i = ai < bi && ai >= 0 ? ai : bi; + } + if (begs.length && right !== undefined) { + result = [left, right]; + } + } + return result; +}; +exports.y = range; +//# sourceMappingURL=index.js.map + +}, +"./node_modules/brace-expansion/dist/commonjs/index.js"(__unused_rspack_module, exports, __webpack_require__) { +var __rspack_unused_export; + +__rspack_unused_export = ({ value: true }); +exports.M9 = exports.T4 = void 0; +exports.expand = expand; +const balanced_match_1 = __webpack_require__("./node_modules/balanced-match/dist/commonjs/index.js"); +const escSlash = '\0SLASH' + Math.random() + '\0'; +const escOpen = '\0OPEN' + Math.random() + '\0'; +const escClose = '\0CLOSE' + Math.random() + '\0'; +const escComma = '\0COMMA' + Math.random() + '\0'; +const escPeriod = '\0PERIOD' + Math.random() + '\0'; +const escSlashPattern = new RegExp(escSlash, 'g'); +const escOpenPattern = new RegExp(escOpen, 'g'); +const escClosePattern = new RegExp(escClose, 'g'); +const escCommaPattern = new RegExp(escComma, 'g'); +const escPeriodPattern = new RegExp(escPeriod, 'g'); +const slashPattern = /\\\\/g; +const openPattern = /\\{/g; +const closePattern = /\\}/g; +const commaPattern = /\\,/g; +const periodPattern = /\\\./g; +exports.T4 = 100_000; +// `EXPANSION_MAX` caps the *number* of expansions, but not their length. An +// input like `'{a,b}'.repeat(1500)` stays under that count - its output is +// truncated to 100k results - while making every result ~1500 characters +// long. The result set, and the intermediate arrays built while combining +// brace sets, then grow large enough to exhaust memory and crash the process +// (CVE-2026-14257). `EXPANSION_MAX_LENGTH` bounds the total number of +// characters the accumulator may hold at any point, so memory stays flat no +// matter how many brace groups are chained. The limit sits well above any +// realistic expansion (100k results hitting `EXPANSION_MAX` measure ~1M +// characters) so legitimate input is unaffected. +exports.M9 = 4_000_000; +function numeric(str) { + return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0); +} +function escapeBraces(str) { + return str + .replace(slashPattern, escSlash) + .replace(openPattern, escOpen) + .replace(closePattern, escClose) + .replace(commaPattern, escComma) + .replace(periodPattern, escPeriod); +} +function unescapeBraces(str) { + return str + .replace(escSlashPattern, '\\') + .replace(escOpenPattern, '{') + .replace(escClosePattern, '}') + .replace(escCommaPattern, ',') + .replace(escPeriodPattern, '.'); +} +/** + * Basically just str.split(","), but handling cases + * where we have nested braced sections, which should be + * treated as individual members, like {a,{b,c},d} + */ +function parseCommaParts(str) { + if (!str) { + return ['']; + } + const parts = []; + const m = (0, balanced_match_1.balanced)('{', '}', str); + if (!m) { + return str.split(','); + } + const { pre, body, post } = m; + const p = pre.split(','); + p[p.length - 1] += '{' + body + '}'; + const postParts = parseCommaParts(post); + if (post.length) { + ; + p[p.length - 1] += postParts.shift(); + p.push.apply(p, postParts); + } + parts.push.apply(parts, p); + return parts; +} +function expand(str, options = {}) { + if (!str) { + return []; + } + const { max = exports.T4, maxLength = exports.M9 } = options; + // I don't know why Bash 4.3 does this, but it does. + // Anything starting with {} will have the first two bytes preserved + // but *only* at the top level, so {},a}b will not expand to anything, + // but a{},b}c will be expanded to [a}c,abc]. + // One could argue that this is a bug in Bash, but since the goal of + // this module is to match Bash's rules, we escape a leading {} + if (str.slice(0, 2) === '{}') { + str = '\\{\\}' + str.slice(2); + } + return expand_(escapeBraces(str), max, maxLength, true).map(unescapeBraces); +} +function embrace(str) { + return '{' + str + '}'; +} +function isPadded(el) { + return /^-?0\d/.test(el); +} +function lte(i, y) { + return i <= y; +} +function gte(i, y) { + return i >= y; +} +// Build `{ acc[a] + pre + values[v] }` for every combination, capping the +// number of results at `max` and the total number of characters at `maxLength`. +// This is the one place output grows, so bounding it here keeps the single +// accumulator - and therefore memory - flat regardless of how many brace groups +// are combined (CVE-2026-14257). +function combine(acc, pre, values, max, maxLength, dropEmpties) { + const out = []; + let length = 0; + for (let a = 0; a < acc.length; a++) { + for (let v = 0; v < values.length; v++) { + if (out.length >= max) + return out; + const expansion = acc[a] + pre + values[v]; + // Bash drops empty results at the top level. Skip them before they count + // against `max`, so `max` bounds the number of *kept* results. + if (dropEmpties && !expansion) + continue; + if (length + expansion.length > maxLength) + return out; + out.push(expansion); + length += expansion.length; + } + } + return out; +} +// The expansion values of a single numeric (`1..5`) or alphabetic (`a..e..2`) +// sequence body. +function expandSequence(body, isAlphaSequence, max, maxLength) { + const n = body.split(/\.\./); + const N = []; + // A sequence body always splits into two or three parts, but the compiler + // can't know that. + /* c8 ignore start */ + if (n[0] === undefined || n[1] === undefined) { + return N; + } + /* c8 ignore stop */ + const x = numeric(n[0]); + const y = numeric(n[1]); + const width = Math.max(n[0].length, n[1].length); + let incr = n.length === 3 && n[2] !== undefined ? + Math.max(Math.abs(numeric(n[2])), 1) + : 1; + let test = lte; + const reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + const pad = n.some(isPadded); + let length = 0; + for (let i = x; test(i, y) && N.length < max; i += incr) { + let c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') { + c = ''; + } + } + else { + c = String(i); + if (pad) { + const need = width - c.length; + if (need > 0) { + const z = new Array(need + 1).join('0'); + if (i < 0) { + c = '-' + z + c.slice(1); + } + else { + c = z + c; + } + } + } + } + if (length + c.length > maxLength) + break; + N.push(c); + length += c.length; + } + return N; +} +function expand_(str, max, maxLength, isTop) { + // Consume the string's top-level brace groups left to right, threading a + // running set of combined prefixes (`acc`). Expanding the tail iteratively - + // rather than recursing on `m.post` once per group - keeps the native stack + // depth constant, so deeply chained input (`'{a,b}'.repeat(3000)`) can no + // longer overflow the stack, and leaves a single accumulator whose size + // `maxLength` bounds directly (CVE-2026-14257). + let acc = ['']; + // Bash drops empty results, but only when the *first* top-level group is a + // comma set - a sequence like `{a..\}` may legitimately yield ''. The drop + // is on the final strings, so it is applied to whichever `combine` produces + // them (the one with no brace set left in the tail). + let dropEmpties = false; + let firstGroup = true; + for (;;) { + const m = (0, balanced_match_1.balanced)('{', '}', str); + // No brace set left: the rest of the string is literal. + if (!m) { + return combine(acc, str, [''], max, maxLength, dropEmpties); + } + // no need to expand pre, since it is guaranteed to be free of brace-sets + const pre = m.pre; + if (/\$$/.test(pre)) { + acc = combine(acc, pre + '{' + m.body + '}', [''], max, maxLength, dropEmpties && !m.post.length); + firstGroup = false; + if (!m.post.length) + break; + str = m.post; + continue; + } + const isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + const isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + const isSequence = isNumericSequence || isAlphaSequence; + const isOptions = m.body.indexOf(',') >= 0; + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,(?!,).*\}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + isTop = true; + continue; + } + // Nothing here expands, so the whole remaining string is literal. + return combine(acc, pre + '{' + m.body + '}' + m.post, [''], max, maxLength, dropEmpties); + } + if (firstGroup) { + dropEmpties = isTop && !isSequence; + firstGroup = false; + } + let values; + if (isSequence) { + values = expandSequence(m.body, isAlphaSequence, max, maxLength); + } + else { + let n = parseCommaParts(m.body); + if (n.length === 1 && n[0] !== undefined) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand_(n[0], max, maxLength, false).map(embrace); + //XXX is this necessary? Can't seem to hit it in tests. + /* c8 ignore start */ + if (n.length === 1) { + acc = combine(acc, pre + n[0], [''], max, maxLength, dropEmpties && !m.post.length); + if (!m.post.length) + break; + str = m.post; + continue; + } + /* c8 ignore stop */ + } + // Values that `combine` is going to drop as empty produce no result, so + // they must not count against `max` - otherwise `{a,,b}` with `max: 2` + // would stop at `['a', '']` and yield one result instead of two. Skipping + // them outright keeps `values` bounded while leaving `max` a bound on + // *kept* results. + let dropsEmpties = dropEmpties && !m.post.length && !pre; + for (let d = 0; dropsEmpties && d < acc.length; d++) { + if (acc[d]) { + dropsEmpties = false; + } + } + values = []; + let valuesLength = 0; + outer: for (let j = 0; j < n.length; j++) { + const expanded = expand_(n[j], max, maxLength, false); + for (let k = 0; k < expanded.length; k++) { + const v = expanded[k]; + if (dropsEmpties && !v) + continue; + if (values.length >= max || valuesLength + v.length > maxLength) { + break outer; + } + values.push(v); + valuesLength += v.length; + } + } + } + acc = combine(acc, pre, values, max, maxLength, dropEmpties && !m.post.length); + if (!m.post.length) + break; + str = m.post; + } + return acc; +} +//# sourceMappingURL=index.js.map + +}, +"./node_modules/minimatch/dist/commonjs/assert-valid-pattern.js"(__unused_rspack_module, exports) { +var __rspack_unused_export; + +__rspack_unused_export = ({ value: true }); +exports.assertValidPattern = void 0; +const MAX_PATTERN_LENGTH = 1024 * 64; +const assertValidPattern = (pattern) => { + if (typeof pattern !== 'string') { + throw new TypeError('invalid pattern'); + } + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError('pattern is too long'); + } +}; +exports.assertValidPattern = assertValidPattern; +//# sourceMappingURL=assert-valid-pattern.js.map + +}, +"./node_modules/minimatch/dist/commonjs/ast.js"(__unused_rspack_module, exports, __webpack_require__) { + +// parse a single path portion +var _a; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AST = void 0; +const brace_expressions_js_1 = __webpack_require__("./node_modules/minimatch/dist/commonjs/brace-expressions.js"); +const unescape_js_1 = __webpack_require__("./node_modules/minimatch/dist/commonjs/unescape.js"); +const types = new Set(['!', '?', '+', '*', '@']); +const isExtglobType = (c) => types.has(c); +const isExtglobAST = (c) => isExtglobType(c.type); +// Map of which extglob types can adopt the children of a nested extglob +// +// anything but ! can adopt a matching type: +// +(a|+(b|c)|d) => +(a|b|c|d) +// *(a|*(b|c)|d) => *(a|b|c|d) +// @(a|@(b|c)|d) => @(a|b|c|d) +// ?(a|?(b|c)|d) => ?(a|b|c|d) +// +// * can adopt anything, because 0 or repetition is allowed +// *(a|?(b|c)|d) => *(a|b|c|d) +// *(a|+(b|c)|d) => *(a|b|c|d) +// *(a|@(b|c)|d) => *(a|b|c|d) +// +// + can adopt @, because 1 or repetition is allowed +// +(a|@(b|c)|d) => +(a|b|c|d) +// +// + and @ CANNOT adopt *, because 0 would be allowed +// +(a|*(b|c)|d) => would match "", on *(b|c) +// @(a|*(b|c)|d) => would match "", on *(b|c) +// +// + and @ CANNOT adopt ?, because 0 would be allowed +// +(a|?(b|c)|d) => would match "", on ?(b|c) +// @(a|?(b|c)|d) => would match "", on ?(b|c) +// +// ? can adopt @, because 0 or 1 is allowed +// ?(a|@(b|c)|d) => ?(a|b|c|d) +// +// ? and @ CANNOT adopt * or +, because >1 would be allowed +// ?(a|*(b|c)|d) => would match bbb on *(b|c) +// @(a|*(b|c)|d) => would match bbb on *(b|c) +// ?(a|+(b|c)|d) => would match bbb on +(b|c) +// @(a|+(b|c)|d) => would match bbb on +(b|c) +// +// ! CANNOT adopt ! (nothing else can either) +// !(a|!(b|c)|d) => !(a|b|c|d) would fail to match on b (not not b|c) +// +// ! can adopt @ +// !(a|@(b|c)|d) => !(a|b|c|d) +// +// ! CANNOT adopt * +// !(a|*(b|c)|d) => !(a|b|c|d) would match on bbb, not allowed +// +// ! CANNOT adopt + +// !(a|+(b|c)|d) => !(a|b|c|d) would match on bbb, not allowed +// +// ! CANNOT adopt ? +// x!(a|?(b|c)|d) => x!(a|b|c|d) would fail to match "x" +const adoptionMap = new Map([ + ['!', ['@']], + ['?', ['?', '@']], + ['@', ['@']], + ['*', ['*', '+', '?', '@']], + ['+', ['+', '@']], +]); +// nested extglobs that can be adopted in, but with the addition of +// a blank '' element. +const adoptionWithSpaceMap = new Map([ + ['!', ['?']], + ['@', ['?']], + ['+', ['?', '*']], +]); +// union of the previous two maps +const adoptionAnyMap = new Map([ + ['!', ['?', '@']], + ['?', ['?', '@']], + ['@', ['?', '@']], + ['*', ['*', '+', '?', '@']], + ['+', ['+', '@', '?', '*']], +]); +// Extglobs that can take over their parent if they are the only child +// the key is parent, value maps child to resulting extglob parent type +// '@' is omitted because it's a special case. An `@` extglob with a single +// member can always be usurped by that subpattern. +const usurpMap = new Map([ + ['!', new Map([['!', '@']])], + [ + '?', + new Map([ + ['*', '*'], + ['+', '*'], + ]), + ], + [ + '@', + new Map([ + ['!', '!'], + ['?', '?'], + ['@', '@'], + ['*', '*'], + ['+', '+'], + ]), + ], + [ + '+', + new Map([ + ['?', '*'], + ['*', '*'], + ]), + ], +]); +// Patterns that get prepended to bind to the start of either the +// entire string, or just a single path portion, to prevent dots +// and/or traversal patterns, when needed. +// Exts don't need the ^ or / bit, because the root binds that already. +const startNoTraversal = '(?!(?:^|/)\\.\\.?(?:$|/))'; +const startNoDot = '(?!\\.)'; +// characters that indicate a start of pattern needs the "no dots" bit, +// because a dot *might* be matched. ( is not in the list, because in +// the case of a child extglob, it will handle the prevention itself. +const addPatternStart = new Set(['[', '.']); +// cases where traversal is A-OK, no dot prevention needed +const justDots = new Set(['..', '.']); +const reSpecials = new Set('().*{}+?[]^$\\!'); +const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); +// any single thing other than / +const qmark = '[^/]'; +// * => any number of characters +const star = qmark + '*?'; +// use + when we need to ensure that *something* matches, because the * is +// the only thing in the path portion. +const starNoEmpty = qmark + '+?'; +// remove the \ chars that we added if we end up doing a nonmagic compare +// const deslash = (s: string) => s.replace(/\\(.)/g, '$1') +let ID = 0; +class AST { + type; + #root; + #hasMagic; + #uflag = false; + #parts = []; + #parent; + #parentIndex; + #negs; + #filledNegs = false; + #options; + #toString; + // set to true if it's an extglob with no children + // (which really means one child of '') + #emptyExt = false; + id = ++ID; + get depth() { + return (this.#parent?.depth ?? -1) + 1; + } + [Symbol.for('nodejs.util.inspect.custom')]() { + return { + '@@type': 'AST', + id: this.id, + type: this.type, + root: this.#root.id, + parent: this.#parent?.id, + depth: this.depth, + partsLength: this.#parts.length, + parts: this.#parts, + }; + } + constructor(type, parent, options = {}) { + this.type = type; + // extglobs are inherently magical + if (type) + this.#hasMagic = true; + this.#parent = parent; + this.#root = this.#parent ? this.#parent.#root : this; + this.#options = this.#root === this ? options : this.#root.#options; + this.#negs = this.#root === this ? [] : this.#root.#negs; + if (type === '!' && !this.#root.#filledNegs) + this.#negs.push(this); + this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0; + } + get hasMagic() { + /* c8 ignore start */ + if (this.#hasMagic !== undefined) + return this.#hasMagic; + /* c8 ignore stop */ + for (const p of this.#parts) { + if (typeof p === 'string') + continue; + if (p.type || p.hasMagic) + return (this.#hasMagic = true); + } + // note: will be undefined until we generate the regexp src and find out + return this.#hasMagic; + } + // reconstructs the pattern + toString() { + return (this.#toString !== undefined ? this.#toString + : !this.type ? + (this.#toString = this.#parts.map(p => String(p)).join('')) + : (this.#toString = + this.type + + '(' + + this.#parts.map(p => String(p)).join('|') + + ')')); + } + #fillNegs() { + /* c8 ignore start */ + if (this !== this.#root) + throw new Error('should only call on root'); + if (this.#filledNegs) + return this; + /* c8 ignore stop */ + // call toString() once to fill this out + this.toString(); + this.#filledNegs = true; + let n; + while ((n = this.#negs.pop())) { + if (n.type !== '!') + continue; + // walk up the tree, appending everthing that comes AFTER parentIndex + let p = n; + let pp = p.#parent; + while (pp) { + for (let i = p.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++) { + for (const part of n.#parts) { + /* c8 ignore start */ + if (typeof part === 'string') { + throw new Error('string part in extglob AST??'); + } + /* c8 ignore stop */ + part.copyIn(pp.#parts[i]); + } + } + p = pp; + pp = p.#parent; + } + } + return this; + } + push(...parts) { + for (const p of parts) { + if (p === '') + continue; + /* c8 ignore start */ + if (typeof p !== 'string' && + !(p instanceof _a && p.#parent === this)) { + throw new Error('invalid part: ' + p); + } + /* c8 ignore stop */ + this.#parts.push(p); + } + } + toJSON() { + const ret = this.type === null ? + this.#parts + .slice() + .map(p => (typeof p === 'string' ? p : p.toJSON())) + : [this.type, ...this.#parts.map(p => p.toJSON())]; + if (this.isStart() && !this.type) + ret.unshift([]); + if (this.isEnd() && + (this === this.#root || + (this.#root.#filledNegs && this.#parent?.type === '!'))) { + ret.push({}); + } + return ret; + } + isStart() { + if (this.#root === this) + return true; + // if (this.type) return !!this.#parent?.isStart() + if (!this.#parent?.isStart()) + return false; + if (this.#parentIndex === 0) + return true; + // if everything AHEAD of this is a negation, then it's still the "start" + const p = this.#parent; + for (let i = 0; i < this.#parentIndex; i++) { + const pp = p.#parts[i]; + if (!(pp instanceof _a && pp.type === '!')) { + return false; + } + } + return true; + } + isEnd() { + if (this.#root === this) + return true; + if (this.#parent?.type === '!') + return true; + if (!this.#parent?.isEnd()) + return false; + if (!this.type) + return this.#parent?.isEnd(); + // if not root, it'll always have a parent + /* c8 ignore start */ + const pl = this.#parent ? this.#parent.#parts.length : 0; + /* c8 ignore stop */ + return this.#parentIndex === pl - 1; + } + copyIn(part) { + if (typeof part === 'string') + this.push(part); + else + this.push(part.clone(this)); + } + clone(parent) { + const c = new _a(this.type, parent); + for (const p of this.#parts) { + c.copyIn(p); + } + return c; + } + static #parseAST(str, ast, pos, opt, extDepth) { + const maxDepth = opt.maxExtglobRecursion ?? 2; + let escaping = false; + let inBrace = false; + let braceStart = -1; + let braceNeg = false; + if (ast.type === null) { + // outside of a extglob, append until we find a start + let i = pos; + let acc = ''; + while (i < str.length) { + const c = str.charAt(i++); + // still accumulate escapes at this point, but we do ignore + // starts that are escaped + if (escaping || c === '\\') { + escaping = !escaping; + acc += c; + continue; + } + if (inBrace) { + if (i === braceStart + 1) { + if (c === '^' || c === '!') { + braceNeg = true; + } + } + else if (c === ']' && !(i === braceStart + 2 && braceNeg)) { + inBrace = false; + } + acc += c; + continue; + } + else if (c === '[') { + inBrace = true; + braceStart = i; + braceNeg = false; + acc += c; + continue; + } + // we don't have to check for adoption here, because that's + // done at the other recursion point. + const doRecurse = !opt.noext && + isExtglobType(c) && + str.charAt(i) === '(' && + extDepth <= maxDepth; + if (doRecurse) { + ast.push(acc); + acc = ''; + const ext = new _a(c, ast); + i = _a.#parseAST(str, ext, i, opt, extDepth + 1); + ast.push(ext); + continue; + } + acc += c; + } + ast.push(acc); + return i; + } + // some kind of extglob, pos is at the ( + // find the next | or ) + let i = pos + 1; + let part = new _a(null, ast); + const parts = []; + let acc = ''; + while (i < str.length) { + const c = str.charAt(i++); + // still accumulate escapes at this point, but we do ignore + // starts that are escaped + if (escaping || c === '\\') { + escaping = !escaping; + acc += c; + continue; + } + if (inBrace) { + if (i === braceStart + 1) { + if (c === '^' || c === '!') { + braceNeg = true; + } + } + else if (c === ']' && !(i === braceStart + 2 && braceNeg)) { + inBrace = false; + } + acc += c; + continue; + } + else if (c === '[') { + inBrace = true; + braceStart = i; + braceNeg = false; + acc += c; + continue; + } + const doRecurse = !opt.noext && + isExtglobType(c) && + str.charAt(i) === '(' && + /* c8 ignore start - the maxDepth is sufficient here */ + (extDepth <= maxDepth || (ast && ast.#canAdoptType(c))); + /* c8 ignore stop */ + if (doRecurse) { + const depthAdd = ast && ast.#canAdoptType(c) ? 0 : 1; + part.push(acc); + acc = ''; + const ext = new _a(c, part); + part.push(ext); + i = _a.#parseAST(str, ext, i, opt, extDepth + depthAdd); + continue; + } + if (c === '|') { + part.push(acc); + acc = ''; + parts.push(part); + part = new _a(null, ast); + continue; + } + if (c === ')') { + if (acc === '' && ast.#parts.length === 0) { + ast.#emptyExt = true; + } + part.push(acc); + acc = ''; + ast.push(...parts, part); + return i; + } + acc += c; + } + // unfinished extglob + // if we got here, it was a malformed extglob! not an extglob, but + // maybe something else in there. + ast.type = null; + ast.#hasMagic = undefined; + ast.#parts = [str.substring(pos - 1)]; + return i; + } + #canAdoptWithSpace(child) { + return this.#canAdopt(child, adoptionWithSpaceMap); + } + #canAdopt(child, map = adoptionMap) { + if (!child || + typeof child !== 'object' || + child.type !== null || + child.#parts.length !== 1 || + this.type === null) { + return false; + } + const gc = child.#parts[0]; + if (!gc || typeof gc !== 'object' || gc.type === null) { + return false; + } + return this.#canAdoptType(gc.type, map); + } + #canAdoptType(c, map = adoptionAnyMap) { + return !!map.get(this.type)?.includes(c); + } + #adoptWithSpace(child, index) { + const gc = child.#parts[0]; + const blank = new _a(null, gc, this.options); + blank.#parts.push(''); + gc.push(blank); + this.#adopt(child, index); + } + #adopt(child, index) { + const gc = child.#parts[0]; + this.#parts.splice(index, 1, ...gc.#parts); + for (const p of gc.#parts) { + if (typeof p === 'object') + p.#parent = this; + } + this.#toString = undefined; + } + #canUsurpType(c) { + const m = usurpMap.get(this.type); + return !!m?.has(c); + } + #canUsurp(child) { + if (!child || + typeof child !== 'object' || + child.type !== null || + child.#parts.length !== 1 || + this.type === null || + this.#parts.length !== 1) { + return false; + } + const gc = child.#parts[0]; + if (!gc || typeof gc !== 'object' || gc.type === null) { + return false; + } + return this.#canUsurpType(gc.type); + } + #usurp(child) { + const m = usurpMap.get(this.type); + const gc = child.#parts[0]; + const nt = m?.get(gc.type); + /* c8 ignore start - impossible */ + if (!nt) + return false; + /* c8 ignore stop */ + this.#parts = gc.#parts; + for (const p of this.#parts) { + if (typeof p === 'object') { + p.#parent = this; + } + } + this.type = nt; + this.#toString = undefined; + this.#emptyExt = false; + } + static fromGlob(pattern, options = {}) { + const ast = new _a(null, undefined, options); + _a.#parseAST(pattern, ast, 0, options, 0); + return ast; + } + // returns the regular expression if there's magic, or the unescaped + // string if not. + toMMPattern() { + // should only be called on root + /* c8 ignore start */ + if (this !== this.#root) + return this.#root.toMMPattern(); + /* c8 ignore stop */ + const glob = this.toString(); + const [re, body, hasMagic, uflag] = this.toRegExpSource(); + // if we're in nocase mode, and not nocaseMagicOnly, then we do + // still need a regular expression if we have to case-insensitively + // match capital/lowercase characters. + const anyMagic = hasMagic || + this.#hasMagic || + (this.#options.nocase && + !this.#options.nocaseMagicOnly && + glob.toUpperCase() !== glob.toLowerCase()); + if (!anyMagic) { + return body; + } + const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : ''); + return Object.assign(new RegExp(`^${re}$`, flags), { + _src: re, + _glob: glob, + }); + } + get options() { + return this.#options; + } + // returns the string match, the regexp source, whether there's magic + // in the regexp (so a regular expression is required) and whether or + // not the uflag is needed for the regular expression (for posix classes) + // TODO: instead of injecting the start/end at this point, just return + // the BODY of the regexp, along with the start/end portions suitable + // for binding the start/end in either a joined full-path makeRe context + // (where we bind to (^|/), or a standalone matchPart context (where + // we bind to ^, and not /). Otherwise slashes get duped! + // + // In part-matching mode, the start is: + // - if not isStart: nothing + // - if traversal possible, but not allowed: ^(?!\.\.?$) + // - if dots allowed or not possible: ^ + // - if dots possible and not allowed: ^(?!\.) + // end is: + // - if not isEnd(): nothing + // - else: $ + // + // In full-path matching mode, we put the slash at the START of the + // pattern, so start is: + // - if first pattern: same as part-matching mode + // - if not isStart(): nothing + // - if traversal possible, but not allowed: /(?!\.\.?(?:$|/)) + // - if dots allowed or not possible: / + // - if dots possible and not allowed: /(?!\.) + // end is: + // - if last pattern, same as part-matching mode + // - else nothing + // + // Always put the (?:$|/) on negated tails, though, because that has to be + // there to bind the end of the negated pattern portion, and it's easier to + // just stick it in now rather than try to inject it later in the middle of + // the pattern. + // + // We can just always return the same end, and leave it up to the caller + // to know whether it's going to be used joined or in parts. + // And, if the start is adjusted slightly, can do the same there: + // - if not isStart: nothing + // - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$) + // - if dots allowed or not possible: (?:/|^) + // - if dots possible and not allowed: (?:/|^)(?!\.) + // + // But it's better to have a simpler binding without a conditional, for + // performance, so probably better to return both start options. + // + // Then the caller just ignores the end if it's not the first pattern, + // and the start always gets applied. + // + // But that's always going to be $ if it's the ending pattern, or nothing, + // so the caller can just attach $ at the end of the pattern when building. + // + // So the todo is: + // - better detect what kind of start is needed + // - return both flavors of starting pattern + // - attach $ at the end of the pattern when creating the actual RegExp + // + // Ah, but wait, no, that all only applies to the root when the first pattern + // is not an extglob. If the first pattern IS an extglob, then we need all + // that dot prevention biz to live in the extglob portions, because eg + // +(*|.x*) can match .xy but not .yx. + // + // So, return the two flavors if it's #root and the first child is not an + // AST, otherwise leave it to the child AST to handle it, and there, + // use the (?:^|/) style of start binding. + // + // Even simplified further: + // - Since the start for a join is eg /(?!\.) and the start for a part + // is ^(?!\.), we can just prepend (?!\.) to the pattern (either root + // or start or whatever) and prepend ^ or / at the Regexp construction. + toRegExpSource(allowDot) { + const dot = allowDot ?? !!this.#options.dot; + if (this.#root === this) { + this.#flatten(); + this.#fillNegs(); + } + if (!isExtglobAST(this)) { + const noEmpty = this.isStart() && + this.isEnd() && + !this.#parts.some(s => typeof s !== 'string'); + const src = this.#parts + .map(p => { + const [re, _, hasMagic, uflag] = typeof p === 'string' ? + _a.#parseGlob(p, this.#hasMagic, noEmpty) + : p.toRegExpSource(allowDot); + this.#hasMagic = this.#hasMagic || hasMagic; + this.#uflag = this.#uflag || uflag; + return re; + }) + .join(''); + let start = ''; + if (this.isStart()) { + if (typeof this.#parts[0] === 'string') { + // this is the string that will match the start of the pattern, + // so we need to protect against dots and such. + // '.' and '..' cannot match unless the pattern is that exactly, + // even if it starts with . or dot:true is set. + const dotTravAllowed = this.#parts.length === 1 && justDots.has(this.#parts[0]); + if (!dotTravAllowed) { + const aps = addPatternStart; + // check if we have a possibility of matching . or .., + // and prevent that. + const needNoTrav = + // dots are allowed, and the pattern starts with [ or . + (dot && aps.has(src.charAt(0))) || + // the pattern starts with \., and then [ or . + (src.startsWith('\\.') && aps.has(src.charAt(2))) || + // the pattern starts with \.\., and then [ or . + (src.startsWith('\\.\\.') && aps.has(src.charAt(4))); + // no need to prevent dots if it can't match a dot, or if a + // sub-pattern will be preventing it anyway. + const needNoDot = !dot && !allowDot && aps.has(src.charAt(0)); + start = + needNoTrav ? startNoTraversal + : needNoDot ? startNoDot + : ''; + } + } + } + // append the "end of path portion" pattern to negation tails + let end = ''; + if (this.isEnd() && + this.#root.#filledNegs && + this.#parent?.type === '!') { + end = '(?:$|\\/)'; + } + const final = start + src + end; + return [ + final, + (0, unescape_js_1.unescape)(src), + (this.#hasMagic = !!this.#hasMagic), + this.#uflag, + ]; + } + // We need to calculate the body *twice* if it's a repeat pattern + // at the start, once in nodot mode, then again in dot mode, so a + // pattern like *(?) can match 'x.y' + const repeated = this.type === '*' || this.type === '+'; + // some kind of extglob + const start = this.type === '!' ? '(?:(?!(?:' : '(?:'; + let body = this.#partsToRegExp(dot); + if (this.isStart() && this.isEnd() && !body && this.type !== '!') { + // invalid extglob, has to at least be *something* present, if it's + // the entire path portion. + const s = this.toString(); + const me = this; + me.#parts = [s]; + me.type = null; + me.#hasMagic = undefined; + return [s, (0, unescape_js_1.unescape)(this.toString()), false, false]; + } + let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot ? + '' + : this.#partsToRegExp(true); + if (bodyDotAllowed === body) { + bodyDotAllowed = ''; + } + if (bodyDotAllowed) { + body = `(?:${body})(?:${bodyDotAllowed})*?`; + } + // an empty !() is exactly equivalent to a starNoEmpty + let final = ''; + if (this.type === '!' && this.#emptyExt) { + final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty; + } + else { + const close = this.type === '!' ? + // !() must match something,but !(x) can match '' + '))' + + (this.isStart() && !dot && !allowDot ? startNoDot : '') + + star + + ')' + : this.type === '@' ? ')' + : this.type === '?' ? ')?' + : this.type === '+' && bodyDotAllowed ? ')' + : this.type === '*' && bodyDotAllowed ? `)?` + : `)${this.type}`; + final = start + body + close; + } + return [ + final, + (0, unescape_js_1.unescape)(body), + (this.#hasMagic = !!this.#hasMagic), + this.#uflag, + ]; + } + #flatten() { + if (!isExtglobAST(this)) { + for (const p of this.#parts) { + if (typeof p === 'object') { + p.#flatten(); + } + } + } + else { + // do up to 10 passes to flatten as much as possible + let iterations = 0; + let done = false; + do { + done = true; + for (let i = 0; i < this.#parts.length; i++) { + const c = this.#parts[i]; + if (typeof c === 'object') { + c.#flatten(); + if (this.#canAdopt(c)) { + done = false; + this.#adopt(c, i); + } + else if (this.#canAdoptWithSpace(c)) { + done = false; + this.#adoptWithSpace(c, i); + } + else if (this.#canUsurp(c)) { + done = false; + this.#usurp(c); + } + } + } + } while (!done && ++iterations < 10); + } + this.#toString = undefined; + } + #partsToRegExp(dot) { + return this.#parts + .map(p => { + // extglob ASTs should only contain parent ASTs + /* c8 ignore start */ + if (typeof p === 'string') { + throw new Error('string type in extglob ast??'); + } + /* c8 ignore stop */ + // can ignore hasMagic, because extglobs are already always magic + const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot); + this.#uflag = this.#uflag || uflag; + return re; + }) + .filter(p => !(this.isStart() && this.isEnd()) || !!p) + .join('|'); + } + static #parseGlob(glob, hasMagic, noEmpty = false) { + let escaping = false; + let re = ''; + let uflag = false; + // multiple stars that aren't globstars coalesce into one * + let inStar = false; + for (let i = 0; i < glob.length; i++) { + const c = glob.charAt(i); + if (escaping) { + escaping = false; + re += (reSpecials.has(c) ? '\\' : '') + c; + continue; + } + if (c === '*') { + if (inStar) + continue; + inStar = true; + re += noEmpty && /^[*]+$/.test(glob) ? starNoEmpty : star; + hasMagic = true; + continue; + } + else { + inStar = false; + } + if (c === '\\') { + if (i === glob.length - 1) { + re += '\\\\'; + } + else { + escaping = true; + } + continue; + } + if (c === '[') { + const [src, needUflag, consumed, magic] = (0, brace_expressions_js_1.parseClass)(glob, i); + if (consumed) { + re += src; + uflag = uflag || needUflag; + i += consumed - 1; + hasMagic = hasMagic || magic; + continue; + } + } + if (c === '?') { + re += qmark; + hasMagic = true; + continue; + } + re += regExpEscape(c); + } + return [re, (0, unescape_js_1.unescape)(glob), !!hasMagic, uflag]; + } +} +exports.AST = AST; +_a = AST; +//# sourceMappingURL=ast.js.map + +}, +"./node_modules/minimatch/dist/commonjs/brace-expressions.js"(__unused_rspack_module, exports) { +var __rspack_unused_export; + +// translate the various posix character classes into unicode properties +// this works across all unicode locales +__rspack_unused_export = ({ value: true }); +exports.parseClass = void 0; +// { : [, /u flag required, negated] +const posixClasses = { + '[:alnum:]': ['\\p{L}\\p{Nl}\\p{Nd}', true], + '[:alpha:]': ['\\p{L}\\p{Nl}', true], + '[:ascii:]': ['\\x' + '00-\\x' + '7f', false], + '[:blank:]': ['\\p{Zs}\\t', true], + '[:cntrl:]': ['\\p{Cc}', true], + '[:digit:]': ['\\p{Nd}', true], + '[:graph:]': ['\\p{Z}\\p{C}', true, true], + '[:lower:]': ['\\p{Ll}', true], + '[:print:]': ['\\p{C}', true], + '[:punct:]': ['\\p{P}', true], + '[:space:]': ['\\p{Z}\\t\\r\\n\\v\\f', true], + '[:upper:]': ['\\p{Lu}', true], + '[:word:]': ['\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}', true], + '[:xdigit:]': ['A-Fa-f0-9', false], +}; +// only need to escape a few things inside of brace expressions +// escapes: [ \ ] - +const braceEscape = (s) => s.replace(/[[\]\\-]/g, '\\$&'); +// escape all regexp magic characters +const regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); +// everything has already been escaped, we just have to join +const rangesToString = (ranges) => ranges.join(''); +// takes a glob string at a posix brace expression, and returns +// an equivalent regular expression source, and boolean indicating +// whether the /u flag needs to be applied, and the number of chars +// consumed to parse the character class. +// This also removes out of order ranges, and returns ($.) if the +// entire class just no good. +const parseClass = (glob, position) => { + const pos = position; + /* c8 ignore start */ + if (glob.charAt(pos) !== '[') { + throw new Error('not in a brace expression'); + } + /* c8 ignore stop */ + const ranges = []; + const negs = []; + let i = pos + 1; + let sawStart = false; + let uflag = false; + let escaping = false; + let negate = false; + let endPos = pos; + let rangeStart = ''; + WHILE: while (i < glob.length) { + const c = glob.charAt(i); + if ((c === '!' || c === '^') && i === pos + 1) { + negate = true; + i++; + continue; + } + if (c === ']' && sawStart && !escaping) { + endPos = i + 1; + break; + } + sawStart = true; + if (c === '\\') { + if (!escaping) { + escaping = true; + i++; + continue; + } + // escaped \ char, fall through and treat like normal char + } + if (c === '[' && !escaping) { + // either a posix class, a collation equivalent, or just a [ + for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) { + if (glob.startsWith(cls, i)) { + // invalid, [a-[] is fine, but not [a-[:alpha]] + if (rangeStart) { + return ['$.', false, glob.length - pos, true]; + } + i += cls.length; + if (neg) + negs.push(unip); + else + ranges.push(unip); + uflag = uflag || u; + continue WHILE; + } + } + } + // now it's just a normal character, effectively + escaping = false; + if (rangeStart) { + // throw this range away if it's not valid, but others + // can still match. + if (c > rangeStart) { + ranges.push(braceEscape(rangeStart) + '-' + braceEscape(c)); + } + else if (c === rangeStart) { + ranges.push(braceEscape(c)); + } + rangeStart = ''; + i++; + continue; + } + // now might be the start of a range. + // can be either c-d or c-] or c] or c] at this point + if (glob.startsWith('-]', i + 1)) { + ranges.push(braceEscape(c + '-')); + i += 2; + continue; + } + if (glob.startsWith('-', i + 1)) { + rangeStart = c; + i += 2; + continue; + } + // not the start of a range, just a single character + ranges.push(braceEscape(c)); + i++; + } + if (endPos < i) { + // didn't see the end of the class, not a valid class, + // but might still be valid as a literal match. + return ['', false, 0, false]; + } + // if we got no ranges and no negates, then we have a range that + // cannot possibly match anything, and that poisons the whole glob + if (!ranges.length && !negs.length) { + return ['$.', false, glob.length - pos, true]; + } + // if we got one positive range, and it's a single character, then that's + // not actually a magic pattern, it's just that one literal character. + // we should not treat that as "magic", we should just return the literal + // character. [_] is a perfectly valid way to escape glob magic chars. + if (negs.length === 0 && + ranges.length === 1 && + /^\\?.$/.test(ranges[0]) && + !negate) { + const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0]; + return [regexpEscape(r), false, endPos - pos, false]; + } + const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']'; + const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']'; + const comb = ranges.length && negs.length ? '(' + sranges + '|' + snegs + ')' + : ranges.length ? sranges + : snegs; + return [comb, uflag, endPos - pos, true]; +}; +exports.parseClass = parseClass; +//# sourceMappingURL=brace-expressions.js.map + +}, +"./node_modules/minimatch/dist/commonjs/escape.js"(__unused_rspack_module, exports) { + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.escape = void 0; +/** + * Escape all magic characters in a glob pattern. + * + * If the {@link MinimatchOptions.windowsPathsNoEscape} + * option is used, then characters are escaped by wrapping in `[]`, because + * a magic character wrapped in a character class can only be satisfied by + * that exact character. In this mode, `\` is _not_ escaped, because it is + * not interpreted as a magic character, but instead as a path separator. + * + * If the {@link MinimatchOptions.magicalBraces} option is used, + * then braces (`{` and `}`) will be escaped. + */ +const escape = (s, { windowsPathsNoEscape = false, magicalBraces = false, } = {}) => { + // don't need to escape +@! because we escape the parens + // that make those magic, and escaping ! as [!] isn't valid, + // because [!]] is a valid glob class meaning not ']'. + if (magicalBraces) { + return windowsPathsNoEscape ? + s.replace(/[?*()[\]{}]/g, '[$&]') + : s.replace(/[?*()[\]\\{}]/g, '\\$&'); + } + return windowsPathsNoEscape ? + s.replace(/[?*()[\]]/g, '[$&]') + : s.replace(/[?*()[\]\\]/g, '\\$&'); +}; +exports.escape = escape; +//# sourceMappingURL=escape.js.map + +}, +"./node_modules/minimatch/dist/commonjs/index.js"(__unused_rspack_module, exports, __webpack_require__) { + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.unescape = exports.escape = exports.AST = exports.Minimatch = exports.match = exports.makeRe = exports.braceExpand = exports.defaults = exports.filter = exports.GLOBSTAR = exports.sep = exports.minimatch = void 0; +const brace_expansion_1 = __webpack_require__("./node_modules/brace-expansion/dist/commonjs/index.js"); +const assert_valid_pattern_js_1 = __webpack_require__("./node_modules/minimatch/dist/commonjs/assert-valid-pattern.js"); +const ast_js_1 = __webpack_require__("./node_modules/minimatch/dist/commonjs/ast.js"); +const escape_js_1 = __webpack_require__("./node_modules/minimatch/dist/commonjs/escape.js"); +const unescape_js_1 = __webpack_require__("./node_modules/minimatch/dist/commonjs/unescape.js"); +const minimatch = (p, pattern, options = {}) => { + (0, assert_valid_pattern_js_1.assertValidPattern)(pattern); + // shortcut: comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + return false; + } + return new Minimatch(pattern, options).match(p); +}; +exports.minimatch = minimatch; +// Optimized checking for the most common glob patterns. +const starDotExtRE = /^\*+([^+@!?*[(]*)$/; +const starDotExtTest = (ext) => (f) => !f.startsWith('.') && f.endsWith(ext); +const starDotExtTestDot = (ext) => (f) => f.endsWith(ext); +const starDotExtTestNocase = (ext) => { + ext = ext.toLowerCase(); + return (f) => !f.startsWith('.') && f.toLowerCase().endsWith(ext); +}; +const starDotExtTestNocaseDot = (ext) => { + ext = ext.toLowerCase(); + return (f) => f.toLowerCase().endsWith(ext); +}; +const starDotStarRE = /^\*+\.\*+$/; +const starDotStarTest = (f) => !f.startsWith('.') && f.includes('.'); +const starDotStarTestDot = (f) => f !== '.' && f !== '..' && f.includes('.'); +const dotStarRE = /^\.\*+$/; +const dotStarTest = (f) => f !== '.' && f !== '..' && f.startsWith('.'); +const starRE = /^\*+$/; +const starTest = (f) => f.length !== 0 && !f.startsWith('.'); +const starTestDot = (f) => f.length !== 0 && f !== '.' && f !== '..'; +const qmarksRE = /^\?+([^+@!?*[(]*)?$/; +const qmarksTestNocase = ([$0, ext = '']) => { + const noext = qmarksTestNoExt([$0]); + if (!ext) + return noext; + ext = ext.toLowerCase(); + return (f) => noext(f) && f.toLowerCase().endsWith(ext); +}; +const qmarksTestNocaseDot = ([$0, ext = '']) => { + const noext = qmarksTestNoExtDot([$0]); + if (!ext) + return noext; + ext = ext.toLowerCase(); + return (f) => noext(f) && f.toLowerCase().endsWith(ext); +}; +const qmarksTestDot = ([$0, ext = '']) => { + const noext = qmarksTestNoExtDot([$0]); + return !ext ? noext : (f) => noext(f) && f.endsWith(ext); +}; +const qmarksTest = ([$0, ext = '']) => { + const noext = qmarksTestNoExt([$0]); + return !ext ? noext : (f) => noext(f) && f.endsWith(ext); +}; +const qmarksTestNoExt = ([$0]) => { + const len = $0.length; + return (f) => f.length === len && !f.startsWith('.'); +}; +const qmarksTestNoExtDot = ([$0]) => { + const len = $0.length; + return (f) => f.length === len && f !== '.' && f !== '..'; +}; +/* c8 ignore start */ +const defaultPlatform = (typeof process === 'object' && process ? + (typeof process.env === 'object' && + process.env && + process.env.__MINIMATCH_TESTING_PLATFORM__) || + process.platform + : 'posix'); +const path = { + win32: { sep: '\\' }, + posix: { sep: '/' }, +}; +/* c8 ignore stop */ +exports.sep = defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep; +exports.minimatch.sep = exports.sep; +exports.GLOBSTAR = Symbol('globstar **'); +exports.minimatch.GLOBSTAR = exports.GLOBSTAR; +// any single thing other than / +// don't need to escape / when using new RegExp() +const qmark = '[^/]'; +// * => any number of characters +const star = qmark + '*?'; +// ** when dots are allowed. Anything goes, except .. and . +// not (^ or / followed by one or two dots followed by $ or /), +// followed by anything, any number of times. +const twoStarDot = '(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?'; +// not a ^ or / followed by a dot, +// followed by anything, any number of times. +const twoStarNoDot = '(?:(?!(?:\\/|^)\\.).)*?'; +const filter = (pattern, options = {}) => (p) => (0, exports.minimatch)(p, pattern, options); +exports.filter = filter; +exports.minimatch.filter = exports.filter; +const ext = (a, b = {}) => Object.assign({}, a, b); +const defaults = (def) => { + if (!def || typeof def !== 'object' || !Object.keys(def).length) { + return exports.minimatch; + } + const orig = exports.minimatch; + const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options)); + return Object.assign(m, { + Minimatch: class Minimatch extends orig.Minimatch { + constructor(pattern, options = {}) { + super(pattern, ext(def, options)); + } + static defaults(options) { + return orig.defaults(ext(def, options)).Minimatch; + } + }, + AST: class AST extends orig.AST { + /* c8 ignore start */ + constructor(type, parent, options = {}) { + super(type, parent, ext(def, options)); + } + /* c8 ignore stop */ + static fromGlob(pattern, options = {}) { + return orig.AST.fromGlob(pattern, ext(def, options)); + } + }, + unescape: (s, options = {}) => orig.unescape(s, ext(def, options)), + escape: (s, options = {}) => orig.escape(s, ext(def, options)), + filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)), + defaults: (options) => orig.defaults(ext(def, options)), + makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)), + braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)), + match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)), + sep: orig.sep, + GLOBSTAR: exports.GLOBSTAR, + }); +}; +exports.defaults = defaults; +exports.minimatch.defaults = exports.defaults; +// Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c +const braceExpand = (pattern, options = {}) => { + (0, assert_valid_pattern_js_1.assertValidPattern)(pattern); + // Thanks to Yeting Li for + // improving this regexp to avoid a ReDOS vulnerability. + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { + // shortcut. no need to expand. + return [pattern]; + } + return (0, brace_expansion_1.expand)(pattern, { max: options.braceExpandMax }); +}; +exports.braceExpand = braceExpand; +exports.minimatch.braceExpand = exports.braceExpand; +// parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. +const makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe(); +exports.makeRe = makeRe; +exports.minimatch.makeRe = exports.makeRe; +const match = (list, pattern, options = {}) => { + const mm = new Minimatch(pattern, options); + list = list.filter(f => mm.match(f)); + if (mm.options.nonull && !list.length) { + list.push(pattern); + } + return list; +}; +exports.match = match; +exports.minimatch.match = exports.match; +// replace stuff like \* with * +const globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/; +const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); +class Minimatch { + options; + set; + pattern; + windowsPathsNoEscape; + nonegate; + negate; + comment; + empty; + preserveMultipleSlashes; + partial; + globSet; + globParts; + nocase; + isWindows; + platform; + windowsNoMagicRoot; + maxGlobstarRecursion; + regexp; + constructor(pattern, options = {}) { + (0, assert_valid_pattern_js_1.assertValidPattern)(pattern); + options = options || {}; + this.options = options; + this.maxGlobstarRecursion = options.maxGlobstarRecursion ?? 200; + this.pattern = pattern; + this.platform = options.platform || defaultPlatform; + this.isWindows = this.platform === 'win32'; + // avoid the annoying deprecation flag lol + const awe = ('allowWindow' + 'sEscape'); + this.windowsPathsNoEscape = + !!options.windowsPathsNoEscape || options[awe] === false; + if (this.windowsPathsNoEscape) { + this.pattern = this.pattern.replace(/\\/g, '/'); + } + this.preserveMultipleSlashes = !!options.preserveMultipleSlashes; + this.regexp = null; + this.negate = false; + this.nonegate = !!options.nonegate; + this.comment = false; + this.empty = false; + this.partial = !!options.partial; + this.nocase = !!this.options.nocase; + this.windowsNoMagicRoot = + options.windowsNoMagicRoot !== undefined ? + options.windowsNoMagicRoot + : !!(this.isWindows && this.nocase); + this.globSet = []; + this.globParts = []; + this.set = []; + // make the set of regexps etc. + this.make(); + } + hasMagic() { + if (this.options.magicalBraces && this.set.length > 1) { + return true; + } + for (const pattern of this.set) { + for (const part of pattern) { + if (typeof part !== 'string') + return true; + } + } + return false; + } + debug(..._) { } + make() { + const pattern = this.pattern; + const options = this.options; + // empty patterns and comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + this.comment = true; + return; + } + if (!pattern) { + this.empty = true; + return; + } + // step 1: figure out negation, etc. + this.parseNegate(); + // step 2: expand braces + this.globSet = [...new Set(this.braceExpand())]; + if (options.debug) { + //oxlint-disable-next-line no-console + this.debug = (...args) => console.error(...args); + } + this.debug(this.pattern, this.globSet); + // step 3: now we have a set, so turn each one into a series of + // path-portion matching patterns. + // These will be regexps, except in the case of "**", which is + // set to the GLOBSTAR object for globstar behavior, + // and will not contain any / characters + // + // First, we preprocess to make the glob pattern sets a bit simpler + // and deduped. There are some perf-killing patterns that can cause + // problems with a glob walk, but we can simplify them down a bit. + const rawGlobParts = this.globSet.map(s => this.slashSplit(s)); + this.globParts = this.preprocess(rawGlobParts); + this.debug(this.pattern, this.globParts); + // glob --> regexps + let set = this.globParts.map((s, _, __) => { + if (this.isWindows && this.windowsNoMagicRoot) { + // check if it's a drive or unc path. + const isUNC = s[0] === '' && + s[1] === '' && + (s[2] === '?' || !globMagic.test(s[2])) && + !globMagic.test(s[3]); + const isDrive = /^[a-z]:/i.test(s[0]); + if (isUNC) { + return [ + ...s.slice(0, 4), + ...s.slice(4).map(ss => this.parse(ss)), + ]; + } + else if (isDrive) { + return [s[0], ...s.slice(1).map(ss => this.parse(ss))]; + } + } + return s.map(ss => this.parse(ss)); + }); + this.debug(this.pattern, set); + // filter out everything that didn't compile properly. + this.set = set.filter(s => s.indexOf(false) === -1); + // do not treat the ? in UNC paths as magic + if (this.isWindows) { + for (let i = 0; i < this.set.length; i++) { + const p = this.set[i]; + if (p[0] === '' && + p[1] === '' && + this.globParts[i][2] === '?' && + typeof p[3] === 'string' && + /^[a-z]:$/i.test(p[3])) { + p[2] = '?'; + } + } + } + this.debug(this.pattern, this.set); + } + // various transforms to equivalent pattern sets that are + // faster to process in a filesystem walk. The goal is to + // eliminate what we can, and push all ** patterns as far + // to the right as possible, even if it increases the number + // of patterns that we have to process. + preprocess(globParts) { + // if we're not in globstar mode, then turn ** into * + if (this.options.noglobstar) { + for (const partset of globParts) { + for (let j = 0; j < partset.length; j++) { + if (partset[j] === '**') { + partset[j] = '*'; + } + } + } + } + const { optimizationLevel = 1 } = this.options; + if (optimizationLevel >= 2) { + // aggressive optimization for the purpose of fs walking + globParts = this.firstPhasePreProcess(globParts); + globParts = this.secondPhasePreProcess(globParts); + } + else if (optimizationLevel >= 1) { + // just basic optimizations to remove some .. parts + globParts = this.levelOneOptimize(globParts); + } + else { + // just collapse multiple ** portions into one + globParts = this.adjascentGlobstarOptimize(globParts); + } + return globParts; + } + // just get rid of adjascent ** portions + adjascentGlobstarOptimize(globParts) { + return globParts.map(parts => { + let gs = -1; + while (-1 !== (gs = parts.indexOf('**', gs + 1))) { + let i = gs; + while (parts[i + 1] === '**') { + i++; + } + if (i !== gs) { + parts.splice(gs, i - gs); + } + } + return parts; + }); + } + // get rid of adjascent ** and resolve .. portions + levelOneOptimize(globParts) { + return globParts.map(parts => { + parts = parts.reduce((set, part) => { + const prev = set[set.length - 1]; + if (part === '**' && prev === '**') { + return set; + } + if (part === '..') { + if (prev && prev !== '..' && prev !== '.' && prev !== '**') { + set.pop(); + return set; + } + } + set.push(part); + return set; + }, []); + return parts.length === 0 ? [''] : parts; + }); + } + levelTwoFileOptimize(parts) { + if (!Array.isArray(parts)) { + parts = this.slashSplit(parts); + } + let didSomething = false; + do { + didSomething = false; + //
// -> 
/
+            if (!this.preserveMultipleSlashes) {
+                for (let i = 1; i < parts.length - 1; i++) {
+                    const p = parts[i];
+                    // don't squeeze out UNC patterns
+                    if (i === 1 && p === '' && parts[0] === '')
+                        continue;
+                    if (p === '.' || p === '') {
+                        didSomething = true;
+                        parts.splice(i, 1);
+                        i--;
+                    }
+                }
+                if (parts[0] === '.' &&
+                    parts.length === 2 &&
+                    (parts[1] === '.' || parts[1] === '')) {
+                    didSomething = true;
+                    parts.pop();
+                }
+            }
+            // 
/

/../ ->

/
+            let dd = 0;
+            while (-1 !== (dd = parts.indexOf('..', dd + 1))) {
+                const p = parts[dd - 1];
+                if (p &&
+                    p !== '.' &&
+                    p !== '..' &&
+                    p !== '**' &&
+                    !(this.isWindows && /^[a-z]:$/i.test(p))) {
+                    didSomething = true;
+                    parts.splice(dd - 1, 2);
+                    dd -= 2;
+                }
+            }
+        } while (didSomething);
+        return parts.length === 0 ? [''] : parts;
+    }
+    // First phase: single-pattern processing
+    // 
 is 1 or more portions
+    //  is 1 or more portions
+    // 

is any portion other than ., .., '', or ** + // is . or '' + // + // **/.. is *brutal* for filesystem walking performance, because + // it effectively resets the recursive walk each time it occurs, + // and ** cannot be reduced out by a .. pattern part like a regexp + // or most strings (other than .., ., and '') can be. + // + //

/**/../

/

/ -> {

/../

/

/,

/**/

/

/} + //

// -> 
/
+    // 
/

/../ ->

/
+    // **/**/ -> **/
+    //
+    // **/*/ -> */**/ <== not valid because ** doesn't follow
+    // this WOULD be allowed if ** did follow symlinks, or * didn't
+    firstPhasePreProcess(globParts) {
+        let didSomething = false;
+        do {
+            didSomething = false;
+            // 
/**/../

/

/ -> {

/../

/

/,

/**/

/

/} + for (let parts of globParts) { + let gs = -1; + while (-1 !== (gs = parts.indexOf('**', gs + 1))) { + let gss = gs; + while (parts[gss + 1] === '**') { + //

/**/**/ -> 
/**/
+                        gss++;
+                    }
+                    // eg, if gs is 2 and gss is 4, that means we have 3 **
+                    // parts, and can remove 2 of them.
+                    if (gss > gs) {
+                        parts.splice(gs + 1, gss - gs);
+                    }
+                    let next = parts[gs + 1];
+                    const p = parts[gs + 2];
+                    const p2 = parts[gs + 3];
+                    if (next !== '..')
+                        continue;
+                    if (!p ||
+                        p === '.' ||
+                        p === '..' ||
+                        !p2 ||
+                        p2 === '.' ||
+                        p2 === '..') {
+                        continue;
+                    }
+                    didSomething = true;
+                    // edit parts in place, and push the new one
+                    parts.splice(gs, 1);
+                    const other = parts.slice(0);
+                    other[gs] = '**';
+                    globParts.push(other);
+                    gs--;
+                }
+                // 
// -> 
/
+                if (!this.preserveMultipleSlashes) {
+                    for (let i = 1; i < parts.length - 1; i++) {
+                        const p = parts[i];
+                        // don't squeeze out UNC patterns
+                        if (i === 1 && p === '' && parts[0] === '')
+                            continue;
+                        if (p === '.' || p === '') {
+                            didSomething = true;
+                            parts.splice(i, 1);
+                            i--;
+                        }
+                    }
+                    if (parts[0] === '.' &&
+                        parts.length === 2 &&
+                        (parts[1] === '.' || parts[1] === '')) {
+                        didSomething = true;
+                        parts.pop();
+                    }
+                }
+                // 
/

/../ ->

/
+                let dd = 0;
+                while (-1 !== (dd = parts.indexOf('..', dd + 1))) {
+                    const p = parts[dd - 1];
+                    if (p && p !== '.' && p !== '..' && p !== '**') {
+                        didSomething = true;
+                        const needDot = dd === 1 && parts[dd + 1] === '**';
+                        const splin = needDot ? ['.'] : [];
+                        parts.splice(dd - 1, 2, ...splin);
+                        if (parts.length === 0)
+                            parts.push('');
+                        dd -= 2;
+                    }
+                }
+            }
+        } while (didSomething);
+        return globParts;
+    }
+    // second phase: multi-pattern dedupes
+    // {
/*/,
/

/} ->

/*/
+    // {
/,
/} -> 
/
+    // {
/**/,
/} -> 
/**/
+    //
+    // {
/**/,
/**/

/} ->

/**/
+    // ^-- not valid because ** doens't follow symlinks
+    secondPhasePreProcess(globParts) {
+        for (let i = 0; i < globParts.length - 1; i++) {
+            for (let j = i + 1; j < globParts.length; j++) {
+                const matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes);
+                if (matched) {
+                    globParts[i] = [];
+                    globParts[j] = matched;
+                    break;
+                }
+            }
+        }
+        return globParts.filter(gs => gs.length);
+    }
+    partsMatch(a, b, emptyGSMatch = false) {
+        let ai = 0;
+        let bi = 0;
+        let result = [];
+        let which = '';
+        while (ai < a.length && bi < b.length) {
+            if (a[ai] === b[bi]) {
+                result.push(which === 'b' ? b[bi] : a[ai]);
+                ai++;
+                bi++;
+            }
+            else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) {
+                result.push(a[ai]);
+                ai++;
+            }
+            else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) {
+                result.push(b[bi]);
+                bi++;
+            }
+            else if (a[ai] === '*' &&
+                b[bi] &&
+                (this.options.dot || !b[bi].startsWith('.')) &&
+                b[bi] !== '**') {
+                if (which === 'b')
+                    return false;
+                which = 'a';
+                result.push(a[ai]);
+                ai++;
+                bi++;
+            }
+            else if (b[bi] === '*' &&
+                a[ai] &&
+                (this.options.dot || !a[ai].startsWith('.')) &&
+                a[ai] !== '**') {
+                if (which === 'a')
+                    return false;
+                which = 'b';
+                result.push(b[bi]);
+                ai++;
+                bi++;
+            }
+            else {
+                return false;
+            }
+        }
+        // if we fall out of the loop, it means they two are identical
+        // as long as their lengths match
+        return a.length === b.length && result;
+    }
+    parseNegate() {
+        if (this.nonegate)
+            return;
+        const pattern = this.pattern;
+        let negate = false;
+        let negateOffset = 0;
+        for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {
+            negate = !negate;
+            negateOffset++;
+        }
+        if (negateOffset)
+            this.pattern = pattern.slice(negateOffset);
+        this.negate = negate;
+    }
+    // set partial to true to test if, for example,
+    // "/a/b" matches the start of "/*/b/*/d"
+    // Partial means, if you run out of file before you run
+    // out of pattern, then that's fine, as long as all
+    // the parts match.
+    matchOne(file, pattern, partial = false) {
+        let fileStartIndex = 0;
+        let patternStartIndex = 0;
+        // UNC paths like //?/X:/... can match X:/... and vice versa
+        // Drive letters in absolute drive or unc paths are always compared
+        // case-insensitively.
+        if (this.isWindows) {
+            const fileDrive = typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0]);
+            const fileUNC = !fileDrive &&
+                file[0] === '' &&
+                file[1] === '' &&
+                file[2] === '?' &&
+                /^[a-z]:$/i.test(file[3]);
+            const patternDrive = typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0]);
+            const patternUNC = !patternDrive &&
+                pattern[0] === '' &&
+                pattern[1] === '' &&
+                pattern[2] === '?' &&
+                typeof pattern[3] === 'string' &&
+                /^[a-z]:$/i.test(pattern[3]);
+            const fdi = fileUNC ? 3
+                : fileDrive ? 0
+                    : undefined;
+            const pdi = patternUNC ? 3
+                : patternDrive ? 0
+                    : undefined;
+            if (typeof fdi === 'number' && typeof pdi === 'number') {
+                const [fd, pd] = [
+                    file[fdi],
+                    pattern[pdi],
+                ];
+                // start matching at the drive letter index of each
+                if (fd.toLowerCase() === pd.toLowerCase()) {
+                    pattern[pdi] = fd;
+                    patternStartIndex = pdi;
+                    fileStartIndex = fdi;
+                }
+            }
+        }
+        // resolve and reduce . and .. portions in the file as well.
+        // don't need to do the second phase, because it's only one string[]
+        const { optimizationLevel = 1 } = this.options;
+        if (optimizationLevel >= 2) {
+            file = this.levelTwoFileOptimize(file);
+        }
+        if (pattern.includes(exports.GLOBSTAR)) {
+            return this.#matchGlobstar(file, pattern, partial, fileStartIndex, patternStartIndex);
+        }
+        return this.#matchOne(file, pattern, partial, fileStartIndex, patternStartIndex);
+    }
+    #matchGlobstar(file, pattern, partial, fileIndex, patternIndex) {
+        // split the pattern into head, tail, and middle of ** delimited parts
+        const firstgs = pattern.indexOf(exports.GLOBSTAR, patternIndex);
+        const lastgs = pattern.lastIndexOf(exports.GLOBSTAR);
+        // split the pattern up into globstar-delimited sections
+        // the tail has to be at the end, and the others just have
+        // to be found in order from the head.
+        const [head, body, tail] = partial ?
+            [
+                pattern.slice(patternIndex, firstgs),
+                pattern.slice(firstgs + 1),
+                [],
+            ]
+            : [
+                pattern.slice(patternIndex, firstgs),
+                pattern.slice(firstgs + 1, lastgs),
+                pattern.slice(lastgs + 1),
+            ];
+        // check the head, from the current file/pattern index.
+        if (head.length) {
+            const fileHead = file.slice(fileIndex, fileIndex + head.length);
+            if (!this.#matchOne(fileHead, head, partial, 0, 0)) {
+                return false;
+            }
+            fileIndex += head.length;
+            patternIndex += head.length;
+        }
+        // now we know the head matches!
+        // if the last portion is not empty, it MUST match the end
+        // check the tail
+        let fileTailMatch = 0;
+        if (tail.length) {
+            // if head + tail > file, then we cannot possibly match
+            if (tail.length + fileIndex > file.length)
+                return false;
+            // try to match the tail
+            let tailStart = file.length - tail.length;
+            if (this.#matchOne(file, tail, partial, tailStart, 0)) {
+                fileTailMatch = tail.length;
+            }
+            else {
+                // affordance for stuff like a/**/* matching a/b/
+                // if the last file portion is '', and there's more to the pattern
+                // then try without the '' bit.
+                if (file[file.length - 1] !== '' ||
+                    fileIndex + tail.length === file.length) {
+                    return false;
+                }
+                tailStart--;
+                if (!this.#matchOne(file, tail, partial, tailStart, 0)) {
+                    return false;
+                }
+                fileTailMatch = tail.length + 1;
+            }
+        }
+        // now we know the tail matches!
+        // the middle is zero or more portions wrapped in **, possibly
+        // containing more ** sections.
+        // so a/**/b/**/c/**/d has become **/b/**/c/**
+        // if it's empty, it means a/**/b, just verify we have no bad dots
+        // if there's no tail, so it ends on /**, then we must have *something*
+        // after the head, or it's not a matc
+        if (!body.length) {
+            let sawSome = !!fileTailMatch;
+            for (let i = fileIndex; i < file.length - fileTailMatch; i++) {
+                const f = String(file[i]);
+                sawSome = true;
+                if (f === '.' ||
+                    f === '..' ||
+                    (!this.options.dot && f.startsWith('.'))) {
+                    return false;
+                }
+            }
+            // in partial mode, we just need to get past all file parts
+            return partial || sawSome;
+        }
+        // now we know that there's one or more body sections, which can
+        // be matched anywhere from the 0 index (because the head was pruned)
+        // through to the length-fileTailMatch index.
+        // split the body up into sections, and note the minimum index it can
+        // be found at (start with the length of all previous segments)
+        // [section, before, after]
+        const bodySegments = [[[], 0]];
+        let currentBody = bodySegments[0];
+        let nonGsParts = 0;
+        const nonGsPartsSums = [0];
+        for (const b of body) {
+            if (b === exports.GLOBSTAR) {
+                nonGsPartsSums.push(nonGsParts);
+                currentBody = [[], 0];
+                bodySegments.push(currentBody);
+            }
+            else {
+                currentBody[0].push(b);
+                nonGsParts++;
+            }
+        }
+        let i = bodySegments.length - 1;
+        const fileLength = file.length - fileTailMatch;
+        for (const b of bodySegments) {
+            b[1] = fileLength - (nonGsPartsSums[i--] + b[0].length);
+        }
+        return !!this.#matchGlobStarBodySections(file, bodySegments, fileIndex, 0, partial, 0, !!fileTailMatch);
+    }
+    // return false for "nope, not matching"
+    // return null for "not matching, cannot keep trying"
+    #matchGlobStarBodySections(file, 
+    // pattern section, last possible position for it
+    bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail) {
+        // take the first body segment, and walk from fileIndex to its "after"
+        // value at the end
+        // If it doesn't match at that position, we increment, until we hit
+        // that final possible position, and give up.
+        // If it does match, then advance and try to rest.
+        // If any of them fail we keep walking forward.
+        // this is still a bit recursively painful, but it's more constrained
+        // than previous implementations, because we never test something that
+        // can't possibly be a valid matching condition.
+        const bs = bodySegments[bodyIndex];
+        if (!bs) {
+            // just make sure that there's no bad dots
+            for (let i = fileIndex; i < file.length; i++) {
+                sawTail = true;
+                const f = file[i];
+                if (f === '.' ||
+                    f === '..' ||
+                    (!this.options.dot && f.startsWith('.'))) {
+                    return false;
+                }
+            }
+            return sawTail;
+        }
+        // have a non-globstar body section to test
+        const [body, after] = bs;
+        while (fileIndex <= after) {
+            const m = this.#matchOne(file.slice(0, fileIndex + body.length), body, partial, fileIndex, 0);
+            // if limit exceeded, no match. intentional false negative,
+            // acceptable break in correctness for security.
+            if (m && globStarDepth < this.maxGlobstarRecursion) {
+                // match! see if the rest match. if so, we're done!
+                const sub = this.#matchGlobStarBodySections(file, bodySegments, fileIndex + body.length, bodyIndex + 1, partial, globStarDepth + 1, sawTail);
+                if (sub !== false) {
+                    return sub;
+                }
+            }
+            const f = file[fileIndex];
+            if (f === '.' ||
+                f === '..' ||
+                (!this.options.dot && f.startsWith('.'))) {
+                return false;
+            }
+            fileIndex++;
+        }
+        // walked off. no point continuing
+        return partial || null;
+    }
+    #matchOne(file, pattern, partial, fileIndex, patternIndex) {
+        let fi;
+        let pi;
+        let pl;
+        let fl;
+        for (fi = fileIndex,
+            pi = patternIndex,
+            fl = file.length,
+            pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
+            this.debug('matchOne loop');
+            let p = pattern[pi];
+            let f = file[fi];
+            this.debug(pattern, p, f);
+            // should be impossible.
+            // some invalid regexp stuff in the set.
+            /* c8 ignore start */
+            if (p === false || p === exports.GLOBSTAR) {
+                return false;
+            }
+            /* c8 ignore stop */
+            // something other than **
+            // non-magic patterns just have to match exactly
+            // patterns with magic have been turned into regexps.
+            let hit;
+            if (typeof p === 'string') {
+                hit = f === p;
+                this.debug('string match', p, f, hit);
+            }
+            else {
+                hit = p.test(f);
+                this.debug('pattern match', p, f, hit);
+            }
+            if (!hit)
+                return false;
+        }
+        // Note: ending in / means that we'll get a final ""
+        // at the end of the pattern.  This can only match a
+        // corresponding "" at the end of the file.
+        // If the file ends in /, then it can only match a
+        // a pattern that ends in /, unless the pattern just
+        // doesn't have any more for it. But, a/b/ should *not*
+        // match "a/b/*", even though "" matches against the
+        // [^/]*? pattern, except in partial mode, where it might
+        // simply not be reached yet.
+        // However, a/b/ should still satisfy a/*
+        // now either we fell off the end of the pattern, or we're done.
+        if (fi === fl && pi === pl) {
+            // ran out of pattern and filename at the same time.
+            // an exact hit!
+            return true;
+        }
+        else if (fi === fl) {
+            // ran out of file, but still had pattern left.
+            // this is ok if we're doing the match as part of
+            // a glob fs traversal.
+            return partial;
+        }
+        else if (pi === pl) {
+            // ran out of pattern, still have file left.
+            // this is only acceptable if we're on the very last
+            // empty segment of a file with a trailing slash.
+            // a/* should match a/b/
+            return fi === fl - 1 && file[fi] === '';
+            /* c8 ignore start */
+        }
+        else {
+            // should be unreachable.
+            throw new Error('wtf?');
+        }
+        /* c8 ignore stop */
+    }
+    braceExpand() {
+        return (0, exports.braceExpand)(this.pattern, this.options);
+    }
+    parse(pattern) {
+        (0, assert_valid_pattern_js_1.assertValidPattern)(pattern);
+        const options = this.options;
+        // shortcuts
+        if (pattern === '**')
+            return exports.GLOBSTAR;
+        if (pattern === '')
+            return '';
+        // far and away, the most common glob pattern parts are
+        // *, *.*, and *.  Add a fast check method for those.
+        let m;
+        let fastTest = null;
+        if ((m = pattern.match(starRE))) {
+            fastTest = options.dot ? starTestDot : starTest;
+        }
+        else if ((m = pattern.match(starDotExtRE))) {
+            fastTest = (options.nocase ?
+                options.dot ?
+                    starDotExtTestNocaseDot
+                    : starDotExtTestNocase
+                : options.dot ? starDotExtTestDot
+                    : starDotExtTest)(m[1]);
+        }
+        else if ((m = pattern.match(qmarksRE))) {
+            fastTest = (options.nocase ?
+                options.dot ?
+                    qmarksTestNocaseDot
+                    : qmarksTestNocase
+                : options.dot ? qmarksTestDot
+                    : qmarksTest)(m);
+        }
+        else if ((m = pattern.match(starDotStarRE))) {
+            fastTest = options.dot ? starDotStarTestDot : starDotStarTest;
+        }
+        else if ((m = pattern.match(dotStarRE))) {
+            fastTest = dotStarTest;
+        }
+        const re = ast_js_1.AST.fromGlob(pattern, this.options).toMMPattern();
+        if (fastTest && typeof re === 'object') {
+            // Avoids overriding in frozen environments
+            Reflect.defineProperty(re, 'test', { value: fastTest });
+        }
+        return re;
+    }
+    makeRe() {
+        if (this.regexp || this.regexp === false)
+            return this.regexp;
+        // at this point, this.set is a 2d array of partial
+        // pattern strings, or "**".
+        //
+        // It's better to use .match().  This function shouldn't
+        // be used, really, but it's pretty convenient sometimes,
+        // when you just want to work with a regex.
+        const set = this.set;
+        if (!set.length) {
+            this.regexp = false;
+            return this.regexp;
+        }
+        const options = this.options;
+        const twoStar = options.noglobstar ? star
+            : options.dot ? twoStarDot
+                : twoStarNoDot;
+        const flags = new Set(options.nocase ? ['i'] : []);
+        // regexpify non-globstar patterns
+        // if ** is only item, then we just do one twoStar
+        // if ** is first, and there are more, prepend (\/|twoStar\/)? to next
+        // if ** is last, append (\/twoStar|) to previous
+        // if ** is in the middle, append (\/|\/twoStar\/) to previous
+        // then filter out GLOBSTAR symbols
+        let re = set
+            .map(pattern => {
+            const pp = pattern.map(p => {
+                if (p instanceof RegExp) {
+                    for (const f of p.flags.split(''))
+                        flags.add(f);
+                }
+                return (typeof p === 'string' ? regExpEscape(p)
+                    : p === exports.GLOBSTAR ? exports.GLOBSTAR
+                        : p._src);
+            });
+            pp.forEach((p, i) => {
+                const next = pp[i + 1];
+                const prev = pp[i - 1];
+                if (p !== exports.GLOBSTAR || prev === exports.GLOBSTAR) {
+                    return;
+                }
+                if (prev === undefined) {
+                    if (next !== undefined && next !== exports.GLOBSTAR) {
+                        pp[i + 1] = '(?:\\/|' + twoStar + '\\/)?' + next;
+                    }
+                    else {
+                        pp[i] = twoStar;
+                    }
+                }
+                else if (next === undefined) {
+                    pp[i - 1] = prev + '(?:\\/|\\/' + twoStar + ')?';
+                }
+                else if (next !== exports.GLOBSTAR) {
+                    pp[i - 1] = prev + '(?:\\/|\\/' + twoStar + '\\/)' + next;
+                    pp[i + 1] = exports.GLOBSTAR;
+                }
+            });
+            const filtered = pp.filter(p => p !== exports.GLOBSTAR);
+            // For partial matches, we need to make the pattern match
+            // any prefix of the full path. We do this by generating
+            // alternative patterns that match progressively longer prefixes.
+            if (this.partial && filtered.length >= 1) {
+                const prefixes = [];
+                for (let i = 1; i <= filtered.length; i++) {
+                    prefixes.push(filtered.slice(0, i).join('/'));
+                }
+                return '(?:' + prefixes.join('|') + ')';
+            }
+            return filtered.join('/');
+        })
+            .join('|');
+        // need to wrap in parens if we had more than one thing with |,
+        // otherwise only the first will be anchored to ^ and the last to $
+        const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', ''];
+        // must match entire pattern
+        // ending in a * or ** will make it less strict.
+        re = '^' + open + re + close + '$';
+        // In partial mode, '/' should always match as it's a valid prefix for any pattern
+        if (this.partial) {
+            re = '^(?:\\/|' + open + re.slice(1, -1) + close + ')$';
+        }
+        // can match anything, as long as it's not this.
+        if (this.negate)
+            re = '^(?!' + re + ').+$';
+        try {
+            this.regexp = new RegExp(re, [...flags].join(''));
+            /* c8 ignore start */
+        }
+        catch {
+            // should be impossible
+            this.regexp = false;
+        }
+        /* c8 ignore stop */
+        return this.regexp;
+    }
+    slashSplit(p) {
+        // if p starts with // on windows, we preserve that
+        // so that UNC paths aren't broken.  Otherwise, any number of
+        // / characters are coalesced into one, unless
+        // preserveMultipleSlashes is set to true.
+        if (this.preserveMultipleSlashes) {
+            return p.split('/');
+        }
+        else if (this.isWindows && /^\/\/[^/]+/.test(p)) {
+            // add an extra '' for the one we lose
+            return ['', ...p.split(/\/+/)];
+        }
+        else {
+            return p.split(/\/+/);
+        }
+    }
+    match(f, partial = this.partial) {
+        this.debug('match', f, this.pattern);
+        // short-circuit in the case of busted things.
+        // comments, etc.
+        if (this.comment) {
+            return false;
+        }
+        if (this.empty) {
+            return f === '';
+        }
+        if (f === '/' && partial) {
+            return true;
+        }
+        const options = this.options;
+        // windows: need to use /, not \
+        if (this.isWindows) {
+            f = f.split('\\').join('/');
+        }
+        // treat the test path as a set of pathparts.
+        const ff = this.slashSplit(f);
+        this.debug(this.pattern, 'split', ff);
+        // just ONE of the pattern sets in this.set needs to match
+        // in order for it to be valid.  If negating, then just one
+        // match means that we have failed.
+        // Either way, return on the first hit.
+        const set = this.set;
+        this.debug(this.pattern, 'set', set);
+        // Find the basename of the path by looking for the last non-empty segment
+        let filename = ff[ff.length - 1];
+        if (!filename) {
+            for (let i = ff.length - 2; !filename && i >= 0; i--) {
+                filename = ff[i];
+            }
+        }
+        for (const pattern of set) {
+            let file = ff;
+            if (options.matchBase && pattern.length === 1) {
+                file = [filename];
+            }
+            const hit = this.matchOne(file, pattern, partial);
+            if (hit) {
+                if (options.flipNegate) {
+                    return true;
+                }
+                return !this.negate;
+            }
+        }
+        // didn't get any hits.  this is success if it's a negative
+        // pattern, failure otherwise.
+        if (options.flipNegate) {
+            return false;
+        }
+        return this.negate;
+    }
+    static defaults(def) {
+        return exports.minimatch.defaults(def).Minimatch;
+    }
+}
+exports.Minimatch = Minimatch;
+/* c8 ignore start */
+var ast_js_2 = __webpack_require__("./node_modules/minimatch/dist/commonjs/ast.js");
+Object.defineProperty(exports, "AST", ({ enumerable: true, get: function () { return ast_js_2.AST; } }));
+var escape_js_2 = __webpack_require__("./node_modules/minimatch/dist/commonjs/escape.js");
+Object.defineProperty(exports, "escape", ({ enumerable: true, get: function () { return escape_js_2.escape; } }));
+var unescape_js_2 = __webpack_require__("./node_modules/minimatch/dist/commonjs/unescape.js");
+Object.defineProperty(exports, "unescape", ({ enumerable: true, get: function () { return unescape_js_2.unescape; } }));
+/* c8 ignore stop */
+exports.minimatch.AST = ast_js_1.AST;
+exports.minimatch.Minimatch = Minimatch;
+exports.minimatch.escape = escape_js_1.escape;
+exports.minimatch.unescape = unescape_js_1.unescape;
+//# sourceMappingURL=index.js.map
+
+},
+"./node_modules/minimatch/dist/commonjs/unescape.js"(__unused_rspack_module, exports) {
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.unescape = void 0;
+/**
+ * Un-escape a string that has been escaped with {@link escape}.
+ *
+ * If the {@link MinimatchOptions.windowsPathsNoEscape} option is used, then
+ * square-bracket escapes are removed, but not backslash escapes.
+ *
+ * For example, it will turn the string `'[*]'` into `*`, but it will not
+ * turn `'\\*'` into `'*'`, because `\` is a path separator in
+ * `windowsPathsNoEscape` mode.
+ *
+ * When `windowsPathsNoEscape` is not set, then both square-bracket escapes and
+ * backslash escapes are removed.
+ *
+ * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped
+ * or unescaped.
+ *
+ * When `magicalBraces` is not set, escapes of braces (`{` and `}`) will not be
+ * unescaped.
+ */
+const unescape = (s, { windowsPathsNoEscape = false, magicalBraces = true, } = {}) => {
+    if (magicalBraces) {
+        return windowsPathsNoEscape ?
+            s.replace(/\[([^/\\])\]/g, '$1')
+            : s
+                .replace(/((?!\\).|^)\[([^/\\])\]/g, '$1$2')
+                .replace(/\\([^/])/g, '$1');
+    }
+    return windowsPathsNoEscape ?
+        s.replace(/\[([^/\\{}])\]/g, '$1')
+        : s
+            .replace(/((?!\\).|^)\[([^/\\{}])\]/g, '$1$2')
+            .replace(/\\([^/{}])/g, '$1');
+};
+exports.unescape = unescape;
+//# sourceMappingURL=unescape.js.map
+
+},
+"./node_modules/vscode-languageserver-textdocument/lib/esm/main.js"(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+
+class FullTextDocument {
+    constructor(uri, languageId, version, content) {
+        this._uri = uri;
+        this._languageId = languageId;
+        this._version = version;
+        this._content = content;
+        this._lineOffsets = undefined;
+    }
+    get uri() {
+        return this._uri;
+    }
+    get languageId() {
+        return this._languageId;
+    }
+    get version() {
+        return this._version;
+    }
+    getText(range) {
+        if (range) {
+            const start = this.offsetAt(range.start);
+            const end = this.offsetAt(range.end);
+            return this._content.substring(start, end);
+        }
+        return this._content;
+    }
+    update(changes, version) {
+        for (const change of changes) {
+            if (FullTextDocument.isIncremental(change)) {
+                // makes sure start is before end
+                const range = getWellformedRange(change.range);
+                // update content
+                const startOffset = this.offsetAt(range.start);
+                const endOffset = this.offsetAt(range.end);
+                this._content = this._content.substring(0, startOffset) + change.text + this._content.substring(endOffset, this._content.length);
+                // update the offsets
+                const startLine = Math.max(range.start.line, 0);
+                const endLine = Math.max(range.end.line, 0);
+                let lineOffsets = this._lineOffsets;
+                const addedLineOffsets = computeLineOffsets(change.text, false, startOffset);
+                if (endLine - startLine === addedLineOffsets.length) {
+                    for (let i = 0, len = addedLineOffsets.length; i < len; i++) {
+                        lineOffsets[i + startLine + 1] = addedLineOffsets[i];
+                    }
+                }
+                else {
+                    if (addedLineOffsets.length < 10000) {
+                        lineOffsets.splice(startLine + 1, endLine - startLine, ...addedLineOffsets);
+                    }
+                    else { // avoid too many arguments for splice
+                        this._lineOffsets = lineOffsets = lineOffsets.slice(0, startLine + 1).concat(addedLineOffsets, lineOffsets.slice(endLine + 1));
+                    }
+                }
+                const diff = change.text.length - (endOffset - startOffset);
+                if (diff !== 0) {
+                    for (let i = startLine + 1 + addedLineOffsets.length, len = lineOffsets.length; i < len; i++) {
+                        lineOffsets[i] = lineOffsets[i] + diff;
+                    }
+                }
+            }
+            else if (FullTextDocument.isFull(change)) {
+                this._content = change.text;
+                this._lineOffsets = undefined;
+            }
+            else {
+                throw new Error('Unknown change event received');
+            }
+        }
+        this._version = version;
+    }
+    getLineOffsets() {
+        if (this._lineOffsets === undefined) {
+            this._lineOffsets = computeLineOffsets(this._content, true);
+        }
+        return this._lineOffsets;
+    }
+    positionAt(offset) {
+        offset = Math.max(Math.min(offset, this._content.length), 0);
+        const lineOffsets = this.getLineOffsets();
+        let low = 0, high = lineOffsets.length;
+        if (high === 0) {
+            return { line: 0, character: offset };
+        }
+        while (low < high) {
+            const mid = Math.floor((low + high) / 2);
+            if (lineOffsets[mid] > offset) {
+                high = mid;
+            }
+            else {
+                low = mid + 1;
+            }
+        }
+        // low is the least x for which the line offset is larger than the current offset
+        // or array.length if no line offset is larger than the current offset
+        const line = low - 1;
+        offset = this.ensureBeforeEOL(offset, lineOffsets[line]);
+        return { line, character: offset - lineOffsets[line] };
+    }
+    offsetAt(position) {
+        const lineOffsets = this.getLineOffsets();
+        if (position.line >= lineOffsets.length) {
+            return this._content.length;
+        }
+        else if (position.line < 0) {
+            return 0;
+        }
+        const lineOffset = lineOffsets[position.line];
+        if (position.character <= 0) {
+            return lineOffset;
+        }
+        const nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;
+        const offset = Math.min(lineOffset + position.character, nextLineOffset);
+        return this.ensureBeforeEOL(offset, lineOffset);
+    }
+    getLineRange(line) {
+        const lineOffsets = this.getLineOffsets();
+        if (line >= lineOffsets.length) {
+            const lastLine = lineOffsets.length - 1;
+            return { start: { line: lastLine, character: 0 }, end: { line: lastLine, character: this._content.length - lineOffsets[lastLine] } };
+        }
+        else if (line < 0) {
+            return { start: { line: 0, character: 0 }, end: { line: 0, character: 0 } };
+        }
+        const startOffset = lineOffsets[line];
+        const nextLineOffset = (line + 1 < lineOffsets.length) ? lineOffsets[line + 1] : this._content.length;
+        const endOffset = this.ensureBeforeEOL(nextLineOffset, startOffset);
+        return { start: { line, character: 0 }, end: { line, character: endOffset - startOffset } };
+    }
+    getEOLCharacters(line) {
+        const lineOffsets = this.getLineOffsets();
+        if (line >= lineOffsets.length) {
+            return '';
+        }
+        else if (line < 0) {
+            return '';
+        }
+        const nextLineOffset = (line + 1 < lineOffsets.length) ? lineOffsets[line + 1] : this._content.length;
+        const eolOffset = this.ensureBeforeEOL(nextLineOffset, lineOffsets[line]);
+        return this._content.substring(eolOffset, nextLineOffset);
+    }
+    ensureBeforeEOL(offset, lineOffset) {
+        while (offset > lineOffset && isEOL(this._content.charCodeAt(offset - 1))) {
+            offset--;
+        }
+        return offset;
+    }
+    get lineCount() {
+        return this.getLineOffsets().length;
+    }
+    static isIncremental(event) {
+        const candidate = event;
+        return candidate !== undefined && candidate !== null &&
+            typeof candidate.text === 'string' && candidate.range !== undefined &&
+            (candidate.rangeLength === undefined || typeof candidate.rangeLength === 'number');
+    }
+    static isFull(event) {
+        const candidate = event;
+        return candidate !== undefined && candidate !== null &&
+            typeof candidate.text === 'string' && candidate.range === undefined && candidate.rangeLength === undefined;
+    }
+}
+var TextDocument;
+(function (TextDocument) {
+    /**
+     * Creates a new text document.
+     *
+     * @param uri The document's uri.
+     * @param languageId  The document's language Id.
+     * @param version The document's initial version number.
+     * @param content The document's content.
+     */
+    function create(uri, languageId, version, content) {
+        return new FullTextDocument(uri, languageId, version, content);
+    }
+    TextDocument.create = create;
+    /**
+     * Updates a TextDocument by modifying its content.
+     *
+     * @param document the document to update. Only documents created by TextDocument.create are valid inputs.
+     * @param changes the changes to apply to the document.
+     * @param version the changes version for the document.
+     * @returns The updated TextDocument. Note: That's the same document instance passed in as first parameter.
+     *
+     */
+    function update(document, changes, version) {
+        if (document instanceof FullTextDocument) {
+            document.update(changes, version);
+            return document;
+        }
+        else {
+            throw new Error('TextDocument.update: document must be created by TextDocument.create');
+        }
+    }
+    TextDocument.update = update;
+    function applyEdits(document, edits) {
+        const text = document.getText();
+        const sortedEdits = mergeSort(edits.map(getWellformedEdit), (a, b) => {
+            const diff = a.range.start.line - b.range.start.line;
+            if (diff === 0) {
+                return a.range.start.character - b.range.start.character;
+            }
+            return diff;
+        });
+        let lastModifiedOffset = 0;
+        const spans = [];
+        for (const e of sortedEdits) {
+            const startOffset = document.offsetAt(e.range.start);
+            if (startOffset < lastModifiedOffset) {
+                throw new Error('Overlapping edit');
+            }
+            else if (startOffset > lastModifiedOffset) {
+                spans.push(text.substring(lastModifiedOffset, startOffset));
+            }
+            if (e.newText.length) {
+                spans.push(e.newText);
+            }
+            lastModifiedOffset = document.offsetAt(e.range.end);
+        }
+        spans.push(text.substr(lastModifiedOffset));
+        return spans.join('');
+    }
+    TextDocument.applyEdits = applyEdits;
+})(TextDocument || (TextDocument = {}));
+function mergeSort(data, compare) {
+    if (data.length <= 1) {
+        // sorted
+        return data;
+    }
+    const p = (data.length / 2) | 0;
+    const left = data.slice(0, p);
+    const right = data.slice(p);
+    mergeSort(left, compare);
+    mergeSort(right, compare);
+    let leftIdx = 0;
+    let rightIdx = 0;
+    let i = 0;
+    while (leftIdx < left.length && rightIdx < right.length) {
+        const ret = compare(left[leftIdx], right[rightIdx]);
+        if (ret <= 0) {
+            // smaller_equal -> take left to preserve order
+            data[i++] = left[leftIdx++];
+        }
+        else {
+            // greater -> take right
+            data[i++] = right[rightIdx++];
+        }
+    }
+    while (leftIdx < left.length) {
+        data[i++] = left[leftIdx++];
+    }
+    while (rightIdx < right.length) {
+        data[i++] = right[rightIdx++];
+    }
+    return data;
+}
+function computeLineOffsets(text, isAtLineStart, textOffset = 0) {
+    const result = isAtLineStart ? [textOffset] : [];
+    for (let i = 0; i < text.length; i++) {
+        const ch = text.charCodeAt(i);
+        if (isEOL(ch)) {
+            if (ch === 13 /* CharCode.CarriageReturn */ && i + 1 < text.length && text.charCodeAt(i + 1) === 10 /* CharCode.LineFeed */) {
+                i++;
+            }
+            result.push(textOffset + i + 1);
+        }
+    }
+    return result;
+}
+function isEOL(char) {
+    return char === 13 /* CharCode.CarriageReturn */ || char === 10 /* CharCode.LineFeed */;
+}
+function getWellformedRange(range) {
+    const start = range.start;
+    const end = range.end;
+    if (start.line > end.line || (start.line === end.line && start.character > end.character)) {
+        return { start: end, end: start };
+    }
+    return range;
+}
+function getWellformedEdit(textEdit) {
+    const range = getWellformedRange(textEdit.range);
+    if (range !== textEdit.range) {
+        return { newText: textEdit.newText, range };
+    }
+    return textEdit;
+}
+
+__webpack_require__.d(__webpack_exports__, {
+  TextDocument: () => (TextDocument)
+});
+
+
+},
+"./node_modules/vscode-languageserver-types/lib/esm/main.js"(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
+__webpack_require__.r(__webpack_exports__);
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+
+var DocumentUri;
+(function (DocumentUri) {
+    function is(value) {
+        return typeof value === 'string';
+    }
+    DocumentUri.is = is;
+})(DocumentUri || (DocumentUri = {}));
+var URI;
+(function (URI) {
+    function is(value) {
+        return typeof value === 'string';
+    }
+    URI.is = is;
+})(URI || (URI = {}));
+var integer;
+(function (integer) {
+    integer.MIN_VALUE = -2147483648;
+    integer.MAX_VALUE = 2147483647;
+    function is(value) {
+        return typeof value === 'number' && integer.MIN_VALUE <= value && value <= integer.MAX_VALUE;
+    }
+    integer.is = is;
+})(integer || (integer = {}));
+var uinteger;
+(function (uinteger) {
+    uinteger.MIN_VALUE = 0;
+    uinteger.MAX_VALUE = 2147483647;
+    function is(value) {
+        return typeof value === 'number' && uinteger.MIN_VALUE <= value && value <= uinteger.MAX_VALUE;
+    }
+    uinteger.is = is;
+})(uinteger || (uinteger = {}));
+/**
+ * The Position namespace provides helper functions to work with
+ * {@link Position} literals.
+ */
+var Position;
+(function (Position) {
+    /**
+     * Creates a new Position literal from the given line and character.
+     * @param line The position's line.
+     * @param character The position's character.
+     */
+    function create(line, character) {
+        if (line === Number.MAX_VALUE) {
+            line = uinteger.MAX_VALUE;
+        }
+        if (character === Number.MAX_VALUE) {
+            character = uinteger.MAX_VALUE;
+        }
+        return { line, character };
+    }
+    Position.create = create;
+    /**
+     * Checks whether the given literal conforms to the {@link Position} interface.
+     */
+    function is(value) {
+        const candidate = value;
+        return Is.objectLiteral(candidate) && Is.uinteger(candidate.line) && Is.uinteger(candidate.character);
+    }
+    Position.is = is;
+})(Position || (Position = {}));
+/**
+ * The Range namespace provides helper functions to work with
+ * {@link Range} literals.
+ */
+var Range;
+(function (Range) {
+    function create(one, two, three, four) {
+        if (Is.uinteger(one) && Is.uinteger(two) && Is.uinteger(three) && Is.uinteger(four)) {
+            return { start: Position.create(one, two), end: Position.create(three, four) };
+        }
+        else if (Position.is(one) && Position.is(two)) {
+            return { start: one, end: two };
+        }
+        else {
+            throw new Error(`Range#create called with invalid arguments[${one}, ${two}, ${three}, ${four}]`);
+        }
+    }
+    Range.create = create;
+    /**
+     * Checks whether the given literal conforms to the {@link Range} interface.
+     */
+    function is(value) {
+        const candidate = value;
+        return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);
+    }
+    Range.is = is;
+})(Range || (Range = {}));
+/**
+ * The Location namespace provides helper functions to work with
+ * {@link Location} literals.
+ */
+var Location;
+(function (Location) {
+    /**
+     * Creates a Location literal.
+     * @param uri The location's uri.
+     * @param range The location's range.
+     */
+    function create(uri, range) {
+        return { uri, range };
+    }
+    Location.create = create;
+    /**
+     * Checks whether the given literal conforms to the {@link Location} interface.
+     */
+    function is(value) {
+        const candidate = value;
+        return Is.objectLiteral(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri));
+    }
+    Location.is = is;
+})(Location || (Location = {}));
+/**
+ * The LocationLink namespace provides helper functions to work with
+ * {@link LocationLink} literals.
+ */
+var LocationLink;
+(function (LocationLink) {
+    /**
+     * Creates a LocationLink literal.
+     * @param targetUri The definition's uri.
+     * @param targetRange The full range of the definition.
+     * @param targetSelectionRange The span of the symbol definition at the target.
+     * @param originSelectionRange The span of the symbol being defined in the originating source file.
+     */
+    function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) {
+        return { targetUri, targetRange, targetSelectionRange, originSelectionRange };
+    }
+    LocationLink.create = create;
+    /**
+     * Checks whether the given literal conforms to the {@link LocationLink} interface.
+     */
+    function is(value) {
+        const candidate = value;
+        return Is.objectLiteral(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri)
+            && Range.is(candidate.targetSelectionRange)
+            && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange));
+    }
+    LocationLink.is = is;
+})(LocationLink || (LocationLink = {}));
+/**
+ * The Color namespace provides helper functions to work with
+ * {@link Color} literals.
+ */
+var Color;
+(function (Color) {
+    /**
+     * Creates a new Color literal.
+     */
+    function create(red, green, blue, alpha) {
+        return {
+            red,
+            green,
+            blue,
+            alpha,
+        };
+    }
+    Color.create = create;
+    /**
+     * Checks whether the given literal conforms to the {@link Color} interface.
+     */
+    function is(value) {
+        const candidate = value;
+        return Is.objectLiteral(candidate) && Is.numberRange(candidate.red, 0, 1)
+            && Is.numberRange(candidate.green, 0, 1)
+            && Is.numberRange(candidate.blue, 0, 1)
+            && Is.numberRange(candidate.alpha, 0, 1);
+    }
+    Color.is = is;
+})(Color || (Color = {}));
+/**
+ * The ColorInformation namespace provides helper functions to work with
+ * {@link ColorInformation} literals.
+ */
+var ColorInformation;
+(function (ColorInformation) {
+    /**
+     * Creates a new ColorInformation literal.
+     */
+    function create(range, color) {
+        return {
+            range,
+            color,
+        };
+    }
+    ColorInformation.create = create;
+    /**
+     * Checks whether the given literal conforms to the {@link ColorInformation} interface.
+     */
+    function is(value) {
+        const candidate = value;
+        return Is.objectLiteral(candidate) && Range.is(candidate.range) && Color.is(candidate.color);
+    }
+    ColorInformation.is = is;
+})(ColorInformation || (ColorInformation = {}));
+/**
+ * The Color namespace provides helper functions to work with
+ * {@link ColorPresentation} literals.
+ */
+var ColorPresentation;
+(function (ColorPresentation) {
+    /**
+     * Creates a new ColorInformation literal.
+     */
+    function create(label, textEdit, additionalTextEdits) {
+        return {
+            label,
+            textEdit,
+            additionalTextEdits,
+        };
+    }
+    ColorPresentation.create = create;
+    /**
+     * Checks whether the given literal conforms to the {@link ColorInformation} interface.
+     */
+    function is(value) {
+        const candidate = value;
+        return Is.objectLiteral(candidate) && Is.string(candidate.label)
+            && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate))
+            && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is));
+    }
+    ColorPresentation.is = is;
+})(ColorPresentation || (ColorPresentation = {}));
+/**
+ * A set of predefined range kinds.
+ */
+var FoldingRangeKind;
+(function (FoldingRangeKind) {
+    /**
+     * Folding range for a comment
+     */
+    FoldingRangeKind.Comment = 'comment';
+    /**
+     * Folding range for an import or include
+     */
+    FoldingRangeKind.Imports = 'imports';
+    /**
+     * Folding range for a region (e.g. `#region`)
+     */
+    FoldingRangeKind.Region = 'region';
+})(FoldingRangeKind || (FoldingRangeKind = {}));
+/**
+ * The folding range namespace provides helper functions to work with
+ * {@link FoldingRange} literals.
+ */
+var FoldingRange;
+(function (FoldingRange) {
+    /**
+     * Creates a new FoldingRange literal.
+     */
+    function create(startLine, endLine, startCharacter, endCharacter, kind, collapsedText) {
+        const result = {
+            startLine,
+            endLine
+        };
+        if (Is.defined(startCharacter)) {
+            result.startCharacter = startCharacter;
+        }
+        if (Is.defined(endCharacter)) {
+            result.endCharacter = endCharacter;
+        }
+        if (Is.defined(kind)) {
+            result.kind = kind;
+        }
+        if (Is.defined(collapsedText)) {
+            result.collapsedText = collapsedText;
+        }
+        return result;
+    }
+    FoldingRange.create = create;
+    /**
+     * Checks whether the given literal conforms to the {@link FoldingRange} interface.
+     */
+    function is(value) {
+        const candidate = value;
+        return Is.objectLiteral(candidate) && Is.uinteger(candidate.startLine) && Is.uinteger(candidate.startLine)
+            && (Is.undefined(candidate.startCharacter) || Is.uinteger(candidate.startCharacter))
+            && (Is.undefined(candidate.endCharacter) || Is.uinteger(candidate.endCharacter))
+            && (Is.undefined(candidate.kind) || Is.string(candidate.kind));
+    }
+    FoldingRange.is = is;
+})(FoldingRange || (FoldingRange = {}));
+/**
+ * The DiagnosticRelatedInformation namespace provides helper functions to work with
+ * {@link DiagnosticRelatedInformation} literals.
+ */
+var DiagnosticRelatedInformation;
+(function (DiagnosticRelatedInformation) {
+    /**
+     * Creates a new DiagnosticRelatedInformation literal.
+     */
+    function create(location, message) {
+        return {
+            location,
+            message
+        };
+    }
+    DiagnosticRelatedInformation.create = create;
+    /**
+     * Checks whether the given literal conforms to the {@link DiagnosticRelatedInformation} interface.
+     */
+    function is(value) {
+        const candidate = value;
+        return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message);
+    }
+    DiagnosticRelatedInformation.is = is;
+})(DiagnosticRelatedInformation || (DiagnosticRelatedInformation = {}));
+/**
+ * The diagnostic's severity.
+ */
+var DiagnosticSeverity;
+(function (DiagnosticSeverity) {
+    /**
+     * Reports an error.
+     */
+    DiagnosticSeverity.Error = 1;
+    /**
+     * Reports a warning.
+     */
+    DiagnosticSeverity.Warning = 2;
+    /**
+     * Reports an information.
+     */
+    DiagnosticSeverity.Information = 3;
+    /**
+     * Reports a hint.
+     */
+    DiagnosticSeverity.Hint = 4;
+})(DiagnosticSeverity || (DiagnosticSeverity = {}));
+/**
+ * The diagnostic tags.
+ *
+ * @since 3.15.0
+ */
+var DiagnosticTag;
+(function (DiagnosticTag) {
+    /**
+     * Unused or unnecessary code.
+     *
+     * Clients are allowed to render diagnostics with this tag faded out instead of having
+     * an error squiggle.
+     */
+    DiagnosticTag.Unnecessary = 1;
+    /**
+     * Deprecated or obsolete code.
+     *
+     * Clients are allowed to rendered diagnostics with this tag strike through.
+     */
+    DiagnosticTag.Deprecated = 2;
+})(DiagnosticTag || (DiagnosticTag = {}));
+/**
+ * The CodeDescription namespace provides functions to deal with descriptions for diagnostic codes.
+ *
+ * @since 3.16.0
+ */
+var CodeDescription;
+(function (CodeDescription) {
+    function is(value) {
+        const candidate = value;
+        return Is.objectLiteral(candidate) && Is.string(candidate.href);
+    }
+    CodeDescription.is = is;
+})(CodeDescription || (CodeDescription = {}));
+/**
+ * The Diagnostic namespace provides helper functions to work with
+ * {@link Diagnostic} literals.
+ */
+var Diagnostic;
+(function (Diagnostic) {
+    /**
+     * Creates a new Diagnostic literal.
+     */
+    function create(range, message, severity, code, source, relatedInformation) {
+        const result = { range, message };
+        if (Is.defined(severity)) {
+            result.severity = severity;
+        }
+        if (Is.defined(code)) {
+            result.code = code;
+        }
+        if (Is.defined(source)) {
+            result.source = source;
+        }
+        if (Is.defined(relatedInformation)) {
+            result.relatedInformation = relatedInformation;
+        }
+        return result;
+    }
+    Diagnostic.create = create;
+    /**
+     * Checks whether the given literal conforms to the {@link Diagnostic} interface.
+     */
+    function is(value) {
+        var _a;
+        const candidate = value;
+        return Is.defined(candidate)
+            && Range.is(candidate.range)
+            && (Is.string(candidate.message) || MarkupContent.is(candidate.message))
+            && (Is.number(candidate.severity) || Is.undefined(candidate.severity))
+            && (Is.integer(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code))
+            && (Is.undefined(candidate.codeDescription) || (Is.string((_a = candidate.codeDescription) === null || _a === void 0 ? void 0 : _a.href)))
+            && (Is.string(candidate.source) || Is.undefined(candidate.source))
+            && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is));
+    }
+    Diagnostic.is = is;
+    /**
+     * Checks whether the given diagnostic's message conforms to the 3.17.0
+     * version of the protocol where the message is a string.
+     *
+     * @param value the diagnostic
+     * @returns true if the diagnostic's message is a string, false otherwise.
+     */
+    function is3_17(value) {
+        return Is.string(value.message);
+    }
+    Diagnostic.is3_17 = is3_17;
+    /**
+     * Gets the message string of a diagnostic. If the message is already a
+     * string, it is returned as is. If the message is a MarkupContent,
+     * the value of the MarkupContent is returned. Otherwise an error is thrown.
+     *
+     * @param diagnostic the diagnostic to get the message string from.
+     * @returns the message string of the given diagnostic.
+     */
+    function getMessageString(diagnostic) {
+        if (Is.string(diagnostic.message)) {
+            return diagnostic.message;
+        }
+        else if (MarkupContent.is(diagnostic.message)) {
+            return diagnostic.message.value;
+        }
+        else {
+            throw new Error(`Unknown message type ${typeof diagnostic.message}`);
+        }
+    }
+    Diagnostic.getMessageString = getMessageString;
+})(Diagnostic || (Diagnostic = {}));
+/**
+ * The Command namespace provides helper functions to work with
+ * {@link Command} literals.
+ */
+var Command;
+(function (Command) {
+    /**
+     * Creates a new Command literal.
+     */
+    function create(title, command, ...args) {
+        const result = { title, command };
+        if (Is.defined(args) && args.length > 0) {
+            result.arguments = args;
+        }
+        return result;
+    }
+    Command.create = create;
+    /**
+     * Checks whether the given literal conforms to the {@link Command} interface.
+     */
+    function is(value) {
+        const candidate = value;
+        return Is.defined(candidate) && Is.string(candidate.title) && (candidate.tooltip === undefined || Is.string(candidate.tooltip)) && Is.string(candidate.command);
+    }
+    Command.is = is;
+})(Command || (Command = {}));
+/**
+ * The TextEdit namespace provides helper function to create replace,
+ * insert and delete edits more easily.
+ */
+var TextEdit;
+(function (TextEdit) {
+    /**
+     * Creates a replace text edit.
+     * @param range The range of text to be replaced.
+     * @param newText The new text.
+     */
+    function replace(range, newText) {
+        return { range, newText };
+    }
+    TextEdit.replace = replace;
+    /**
+     * Creates an insert text edit.
+     * @param position The position to insert the text at.
+     * @param newText The text to be inserted.
+     */
+    function insert(position, newText) {
+        return { range: { start: position, end: position }, newText };
+    }
+    TextEdit.insert = insert;
+    /**
+     * Creates a delete text edit.
+     * @param range The range of text to be deleted.
+     */
+    function del(range) {
+        return { range, newText: '' };
+    }
+    TextEdit.del = del;
+    function is(value) {
+        const candidate = value;
+        return Is.objectLiteral(candidate)
+            && Is.string(candidate.newText)
+            && Range.is(candidate.range);
+    }
+    TextEdit.is = is;
+})(TextEdit || (TextEdit = {}));
+var ChangeAnnotation;
+(function (ChangeAnnotation) {
+    function create(label, needsConfirmation, description) {
+        const result = { label };
+        if (needsConfirmation !== undefined) {
+            result.needsConfirmation = needsConfirmation;
+        }
+        if (description !== undefined) {
+            result.description = description;
+        }
+        return result;
+    }
+    ChangeAnnotation.create = create;
+    function is(value) {
+        const candidate = value;
+        return Is.objectLiteral(candidate) && Is.string(candidate.label) &&
+            (Is.boolean(candidate.needsConfirmation) || candidate.needsConfirmation === undefined) &&
+            (Is.string(candidate.description) || candidate.description === undefined);
+    }
+    ChangeAnnotation.is = is;
+})(ChangeAnnotation || (ChangeAnnotation = {}));
+var ChangeAnnotationIdentifier;
+(function (ChangeAnnotationIdentifier) {
+    function is(value) {
+        const candidate = value;
+        return Is.string(candidate);
+    }
+    ChangeAnnotationIdentifier.is = is;
+})(ChangeAnnotationIdentifier || (ChangeAnnotationIdentifier = {}));
+var AnnotatedTextEdit;
+(function (AnnotatedTextEdit) {
+    /**
+     * Creates an annotated replace text edit.
+     *
+     * @param range The range of text to be replaced.
+     * @param newText The new text.
+     * @param annotation The annotation.
+     */
+    function replace(range, newText, annotation) {
+        return { range, newText, annotationId: annotation };
+    }
+    AnnotatedTextEdit.replace = replace;
+    /**
+     * Creates an annotated insert text edit.
+     *
+     * @param position The position to insert the text at.
+     * @param newText The text to be inserted.
+     * @param annotation The annotation.
+     */
+    function insert(position, newText, annotation) {
+        return { range: { start: position, end: position }, newText, annotationId: annotation };
+    }
+    AnnotatedTextEdit.insert = insert;
+    /**
+     * Creates an annotated delete text edit.
+     *
+     * @param range The range of text to be deleted.
+     * @param annotation The annotation.
+     */
+    function del(range, annotation) {
+        return { range, newText: '', annotationId: annotation };
+    }
+    AnnotatedTextEdit.del = del;
+    function is(value) {
+        const candidate = value;
+        return TextEdit.is(candidate) && (ChangeAnnotation.is(candidate.annotationId) || ChangeAnnotationIdentifier.is(candidate.annotationId));
+    }
+    AnnotatedTextEdit.is = is;
+})(AnnotatedTextEdit || (AnnotatedTextEdit = {}));
+/**
+ * The TextDocumentEdit namespace provides helper function to create
+ * an edit that manipulates a text document.
+ */
+var TextDocumentEdit;
+(function (TextDocumentEdit) {
+    /**
+     * Creates a new `TextDocumentEdit`
+     */
+    function create(textDocument, edits) {
+        return { textDocument, edits };
+    }
+    TextDocumentEdit.create = create;
+    function is(value) {
+        const candidate = value;
+        return Is.defined(candidate)
+            && OptionalVersionedTextDocumentIdentifier.is(candidate.textDocument)
+            && Array.isArray(candidate.edits);
+    }
+    TextDocumentEdit.is = is;
+})(TextDocumentEdit || (TextDocumentEdit = {}));
+var CreateFile;
+(function (CreateFile) {
+    function create(uri, options, annotation) {
+        const result = {
+            kind: 'create',
+            uri
+        };
+        if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {
+            result.options = options;
+        }
+        if (annotation !== undefined) {
+            result.annotationId = annotation;
+        }
+        return result;
+    }
+    CreateFile.create = create;
+    function is(value) {
+        const candidate = value;
+        return candidate && candidate.kind === 'create' && Is.string(candidate.uri) && (candidate.options === undefined ||
+            ((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
+    }
+    CreateFile.is = is;
+})(CreateFile || (CreateFile = {}));
+var RenameFile;
+(function (RenameFile) {
+    function create(oldUri, newUri, options, annotation) {
+        const result = {
+            kind: 'rename',
+            oldUri,
+            newUri
+        };
+        if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {
+            result.options = options;
+        }
+        if (annotation !== undefined) {
+            result.annotationId = annotation;
+        }
+        return result;
+    }
+    RenameFile.create = create;
+    function is(value) {
+        const candidate = value;
+        return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) && (candidate.options === undefined ||
+            ((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
+    }
+    RenameFile.is = is;
+})(RenameFile || (RenameFile = {}));
+var DeleteFile;
+(function (DeleteFile) {
+    function create(uri, options, annotation) {
+        const result = {
+            kind: 'delete',
+            uri
+        };
+        if (options !== undefined && (options.recursive !== undefined || options.ignoreIfNotExists !== undefined)) {
+            result.options = options;
+        }
+        if (annotation !== undefined) {
+            result.annotationId = annotation;
+        }
+        return result;
+    }
+    DeleteFile.create = create;
+    function is(value) {
+        const candidate = value;
+        return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) && (candidate.options === undefined ||
+            ((candidate.options.recursive === undefined || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === undefined || Is.boolean(candidate.options.ignoreIfNotExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
+    }
+    DeleteFile.is = is;
+})(DeleteFile || (DeleteFile = {}));
+var WorkspaceEdit;
+(function (WorkspaceEdit) {
+    function is(value) {
+        const candidate = value;
+        return candidate &&
+            (candidate.changes !== undefined || candidate.documentChanges !== undefined) &&
+            (candidate.documentChanges === undefined || candidate.documentChanges.every((change) => {
+                if (Is.string(change.kind)) {
+                    return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change);
+                }
+                else {
+                    return TextDocumentEdit.is(change);
+                }
+            }));
+    }
+    WorkspaceEdit.is = is;
+})(WorkspaceEdit || (WorkspaceEdit = {}));
+class TextEditChangeImpl {
+    constructor(edits, changeAnnotations) {
+        this.edits = edits;
+        this.changeAnnotations = changeAnnotations;
+    }
+    insert(position, newText, annotation) {
+        let edit;
+        let id;
+        if (annotation === undefined) {
+            edit = TextEdit.insert(position, newText);
+        }
+        else if (ChangeAnnotationIdentifier.is(annotation)) {
+            id = annotation;
+            edit = AnnotatedTextEdit.insert(position, newText, annotation);
+        }
+        else {
+            this.assertChangeAnnotations(this.changeAnnotations);
+            id = this.changeAnnotations.manage(annotation);
+            edit = AnnotatedTextEdit.insert(position, newText, id);
+        }
+        this.edits.push(edit);
+        if (id !== undefined) {
+            return id;
+        }
+    }
+    replace(range, newText, annotation) {
+        let edit;
+        let id;
+        if (annotation === undefined) {
+            edit = TextEdit.replace(range, newText);
+        }
+        else if (ChangeAnnotationIdentifier.is(annotation)) {
+            id = annotation;
+            edit = AnnotatedTextEdit.replace(range, newText, annotation);
+        }
+        else {
+            this.assertChangeAnnotations(this.changeAnnotations);
+            id = this.changeAnnotations.manage(annotation);
+            edit = AnnotatedTextEdit.replace(range, newText, id);
+        }
+        this.edits.push(edit);
+        if (id !== undefined) {
+            return id;
+        }
+    }
+    delete(range, annotation) {
+        let edit;
+        let id;
+        if (annotation === undefined) {
+            edit = TextEdit.del(range);
+        }
+        else if (ChangeAnnotationIdentifier.is(annotation)) {
+            id = annotation;
+            edit = AnnotatedTextEdit.del(range, annotation);
+        }
+        else {
+            this.assertChangeAnnotations(this.changeAnnotations);
+            id = this.changeAnnotations.manage(annotation);
+            edit = AnnotatedTextEdit.del(range, id);
+        }
+        this.edits.push(edit);
+        if (id !== undefined) {
+            return id;
+        }
+    }
+    add(edit) {
+        this.edits.push(edit);
+    }
+    all() {
+        return this.edits;
+    }
+    clear() {
+        this.edits.splice(0, this.edits.length);
+    }
+    assertChangeAnnotations(value) {
+        if (value === undefined) {
+            throw new Error(`Text edit change is not configured to manage change annotations.`);
+        }
+    }
+}
+var SnippetTextEdit;
+(function (SnippetTextEdit) {
+    function is(value) {
+        const candidate = value;
+        return Is.objectLiteral(candidate)
+            && Range.is(candidate.range)
+            && StringValue.isSnippet(candidate.snippet)
+            && (candidate.annotationId === undefined ||
+                (ChangeAnnotation.is(candidate.annotationId) || ChangeAnnotationIdentifier.is(candidate.annotationId)));
+    }
+    SnippetTextEdit.is = is;
+})(SnippetTextEdit || (SnippetTextEdit = {}));
+/**
+ * A helper class
+ */
+class ChangeAnnotations {
+    constructor(annotations) {
+        this._annotations = annotations === undefined ? Object.create(null) : annotations;
+        this._counter = 0;
+        this._size = 0;
+    }
+    all() {
+        return this._annotations;
+    }
+    get size() {
+        return this._size;
+    }
+    manage(idOrAnnotation, annotation) {
+        let id;
+        if (ChangeAnnotationIdentifier.is(idOrAnnotation)) {
+            id = idOrAnnotation;
+        }
+        else {
+            id = this.nextId();
+            annotation = idOrAnnotation;
+        }
+        if (this._annotations[id] !== undefined) {
+            throw new Error(`Id ${id} is already in use.`);
+        }
+        if (annotation === undefined) {
+            throw new Error(`No annotation provided for id ${id}`);
+        }
+        this._annotations[id] = annotation;
+        this._size++;
+        return id;
+    }
+    nextId() {
+        this._counter++;
+        return this._counter.toString();
+    }
+}
+/**
+ * A workspace change helps constructing changes to a workspace.
+ */
+class WorkspaceChange {
+    constructor(workspaceEdit) {
+        this._textEditChanges = Object.create(null);
+        if (workspaceEdit !== undefined) {
+            this._workspaceEdit = workspaceEdit;
+            if (workspaceEdit.documentChanges) {
+                this._changeAnnotations = new ChangeAnnotations(workspaceEdit.changeAnnotations);
+                workspaceEdit.changeAnnotations = this._changeAnnotations.all();
+                workspaceEdit.documentChanges.forEach((change) => {
+                    if (TextDocumentEdit.is(change)) {
+                        const textEditChange = new TextEditChangeImpl(change.edits, this._changeAnnotations);
+                        this._textEditChanges[change.textDocument.uri] = textEditChange;
+                    }
+                });
+            }
+            else if (workspaceEdit.changes) {
+                Object.keys(workspaceEdit.changes).forEach((key) => {
+                    const textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]);
+                    this._textEditChanges[key] = textEditChange;
+                });
+            }
+        }
+        else {
+            this._workspaceEdit = {};
+        }
+    }
+    /**
+     * Returns the underlying {@link WorkspaceEdit} literal
+     * use to be returned from a workspace edit operation like rename.
+     */
+    get edit() {
+        this.initDocumentChanges();
+        if (this._changeAnnotations !== undefined) {
+            if (this._changeAnnotations.size === 0) {
+                this._workspaceEdit.changeAnnotations = undefined;
+            }
+            else {
+                this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();
+            }
+        }
+        return this._workspaceEdit;
+    }
+    getTextEditChange(key) {
+        if (OptionalVersionedTextDocumentIdentifier.is(key)) {
+            this.initDocumentChanges();
+            if (this._workspaceEdit.documentChanges === undefined) {
+                throw new Error('Workspace edit is not configured for document changes.');
+            }
+            const textDocument = { uri: key.uri, version: key.version };
+            let result = this._textEditChanges[textDocument.uri];
+            if (!result) {
+                const edits = [];
+                const textDocumentEdit = {
+                    textDocument,
+                    edits
+                };
+                this._workspaceEdit.documentChanges.push(textDocumentEdit);
+                result = new TextEditChangeImpl(edits, this._changeAnnotations);
+                this._textEditChanges[textDocument.uri] = result;
+            }
+            return result;
+        }
+        else {
+            this.initChanges();
+            if (this._workspaceEdit.changes === undefined) {
+                throw new Error('Workspace edit is not configured for normal text edit changes.');
+            }
+            let result = this._textEditChanges[key];
+            if (!result) {
+                const edits = [];
+                this._workspaceEdit.changes[key] = edits;
+                result = new TextEditChangeImpl(edits);
+                this._textEditChanges[key] = result;
+            }
+            return result;
+        }
+    }
+    initDocumentChanges() {
+        if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) {
+            this._changeAnnotations = new ChangeAnnotations();
+            this._workspaceEdit.documentChanges = [];
+            this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();
+        }
+    }
+    initChanges() {
+        if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) {
+            this._workspaceEdit.changes = Object.create(null);
+        }
+    }
+    createFile(uri, optionsOrAnnotation, options) {
+        this.initDocumentChanges();
+        if (this._workspaceEdit.documentChanges === undefined) {
+            throw new Error('Workspace edit is not configured for document changes.');
+        }
+        let annotation;
+        if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
+            annotation = optionsOrAnnotation;
+        }
+        else {
+            options = optionsOrAnnotation;
+        }
+        let operation;
+        let id;
+        if (annotation === undefined) {
+            operation = CreateFile.create(uri, options);
+        }
+        else {
+            id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
+            operation = CreateFile.create(uri, options, id);
+        }
+        this._workspaceEdit.documentChanges.push(operation);
+        if (id !== undefined) {
+            return id;
+        }
+    }
+    renameFile(oldUri, newUri, optionsOrAnnotation, options) {
+        this.initDocumentChanges();
+        if (this._workspaceEdit.documentChanges === undefined) {
+            throw new Error('Workspace edit is not configured for document changes.');
+        }
+        let annotation;
+        if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
+            annotation = optionsOrAnnotation;
+        }
+        else {
+            options = optionsOrAnnotation;
+        }
+        let operation;
+        let id;
+        if (annotation === undefined) {
+            operation = RenameFile.create(oldUri, newUri, options);
+        }
+        else {
+            id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
+            operation = RenameFile.create(oldUri, newUri, options, id);
+        }
+        this._workspaceEdit.documentChanges.push(operation);
+        if (id !== undefined) {
+            return id;
+        }
+    }
+    deleteFile(uri, optionsOrAnnotation, options) {
+        this.initDocumentChanges();
+        if (this._workspaceEdit.documentChanges === undefined) {
+            throw new Error('Workspace edit is not configured for document changes.');
+        }
+        let annotation;
+        if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
+            annotation = optionsOrAnnotation;
+        }
+        else {
+            options = optionsOrAnnotation;
+        }
+        let operation;
+        let id;
+        if (annotation === undefined) {
+            operation = DeleteFile.create(uri, options);
+        }
+        else {
+            id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
+            operation = DeleteFile.create(uri, options, id);
+        }
+        this._workspaceEdit.documentChanges.push(operation);
+        if (id !== undefined) {
+            return id;
+        }
+    }
+}
+/**
+ * The TextDocumentIdentifier namespace provides helper functions to work with
+ * {@link TextDocumentIdentifier} literals.
+ */
+var TextDocumentIdentifier;
+(function (TextDocumentIdentifier) {
+    /**
+     * Creates a new TextDocumentIdentifier literal.
+     * @param uri The document's uri.
+     */
+    function create(uri) {
+        return { uri };
+    }
+    TextDocumentIdentifier.create = create;
+    /**
+     * Checks whether the given literal conforms to the {@link TextDocumentIdentifier} interface.
+     */
+    function is(value) {
+        const candidate = value;
+        return Is.defined(candidate) && Is.string(candidate.uri);
+    }
+    TextDocumentIdentifier.is = is;
+})(TextDocumentIdentifier || (TextDocumentIdentifier = {}));
+/**
+ * The VersionedTextDocumentIdentifier namespace provides helper functions to work with
+ * {@link VersionedTextDocumentIdentifier} literals.
+ */
+var VersionedTextDocumentIdentifier;
+(function (VersionedTextDocumentIdentifier) {
+    /**
+     * Creates a new VersionedTextDocumentIdentifier literal.
+     * @param uri The document's uri.
+     * @param version The document's version.
+     */
+    function create(uri, version) {
+        return { uri, version };
+    }
+    VersionedTextDocumentIdentifier.create = create;
+    /**
+     * Checks whether the given literal conforms to the {@link VersionedTextDocumentIdentifier} interface.
+     */
+    function is(value) {
+        const candidate = value;
+        return Is.defined(candidate) && Is.string(candidate.uri) && Is.integer(candidate.version);
+    }
+    VersionedTextDocumentIdentifier.is = is;
+})(VersionedTextDocumentIdentifier || (VersionedTextDocumentIdentifier = {}));
+/**
+ * The OptionalVersionedTextDocumentIdentifier namespace provides helper functions to work with
+ * {@link OptionalVersionedTextDocumentIdentifier} literals.
+ */
+var OptionalVersionedTextDocumentIdentifier;
+(function (OptionalVersionedTextDocumentIdentifier) {
+    /**
+     * Creates a new OptionalVersionedTextDocumentIdentifier literal.
+     * @param uri The document's uri.
+     * @param version The document's version.
+     */
+    function create(uri, version) {
+        return { uri, version };
+    }
+    OptionalVersionedTextDocumentIdentifier.create = create;
+    /**
+     * Checks whether the given literal conforms to the {@link OptionalVersionedTextDocumentIdentifier} interface.
+     */
+    function is(value) {
+        const candidate = value;
+        return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.integer(candidate.version));
+    }
+    OptionalVersionedTextDocumentIdentifier.is = is;
+})(OptionalVersionedTextDocumentIdentifier || (OptionalVersionedTextDocumentIdentifier = {}));
+/**
+ * Predefined Language kinds
+ * @since 3.18.0
+ */
+var LanguageKind;
+(function (LanguageKind) {
+    LanguageKind.ABAP = 'abap';
+    LanguageKind.WindowsBat = 'bat';
+    LanguageKind.BibTeX = 'bibtex';
+    LanguageKind.Clojure = 'clojure';
+    LanguageKind.Coffeescript = 'coffeescript';
+    LanguageKind.C = 'c';
+    LanguageKind.CPP = 'cpp';
+    LanguageKind.CSharp = 'csharp';
+    LanguageKind.CSS = 'css';
+    /**
+     * @since 3.18.0
+     */
+    LanguageKind.D = 'd';
+    /**
+     * @since 3.18.0
+     */
+    LanguageKind.Delphi = 'pascal';
+    LanguageKind.Diff = 'diff';
+    LanguageKind.Dart = 'dart';
+    LanguageKind.Dockerfile = 'dockerfile';
+    LanguageKind.Elixir = 'elixir';
+    LanguageKind.Erlang = 'erlang';
+    LanguageKind.FSharp = 'fsharp';
+    LanguageKind.GitCommit = 'git-commit';
+    LanguageKind.GitRebase = 'git-rebase';
+    LanguageKind.Go = 'go';
+    LanguageKind.Groovy = 'groovy';
+    LanguageKind.Handlebars = 'handlebars';
+    LanguageKind.Haskell = 'haskell';
+    LanguageKind.HTML = 'html';
+    LanguageKind.Ini = 'ini';
+    LanguageKind.Java = 'java';
+    LanguageKind.JavaScript = 'javascript';
+    LanguageKind.JavaScriptReact = 'javascriptreact';
+    LanguageKind.JSON = 'json';
+    LanguageKind.LaTeX = 'latex';
+    LanguageKind.Less = 'less';
+    LanguageKind.Lua = 'lua';
+    LanguageKind.Makefile = 'makefile';
+    LanguageKind.Markdown = 'markdown';
+    LanguageKind.ObjectiveC = 'objective-c';
+    LanguageKind.ObjectiveCPP = 'objective-cpp';
+    /**
+     * @since 3.18.0
+     */
+    LanguageKind.Pascal = 'pascal';
+    LanguageKind.Perl = 'perl';
+    LanguageKind.Perl6 = 'perl6';
+    LanguageKind.PHP = 'php';
+    LanguageKind.Plaintext = 'plaintext';
+    LanguageKind.Powershell = 'powershell';
+    LanguageKind.Pug = 'jade';
+    LanguageKind.Python = 'python';
+    LanguageKind.R = 'r';
+    LanguageKind.Razor = 'razor';
+    LanguageKind.Ruby = 'ruby';
+    LanguageKind.Rust = 'rust';
+    LanguageKind.SCSS = 'scss';
+    LanguageKind.SASS = 'sass';
+    LanguageKind.Scala = 'scala';
+    LanguageKind.ShaderLab = 'shaderlab';
+    LanguageKind.ShellScript = 'shellscript';
+    LanguageKind.SQL = 'sql';
+    LanguageKind.Swift = 'swift';
+    LanguageKind.TypeScript = 'typescript';
+    LanguageKind.TypeScriptReact = 'typescriptreact';
+    LanguageKind.TeX = 'tex';
+    LanguageKind.VisualBasic = 'vb';
+    LanguageKind.XML = 'xml';
+    LanguageKind.XSL = 'xsl';
+    LanguageKind.YAML = 'yaml';
+})(LanguageKind || (LanguageKind = {}));
+/**
+ * The TextDocumentItem namespace provides helper functions to work with
+ * {@link TextDocumentItem} literals.
+ */
+var TextDocumentItem;
+(function (TextDocumentItem) {
+    /**
+     * Creates a new TextDocumentItem literal.
+     * @param uri The document's uri.
+     * @param languageId The document's language identifier.
+     * @param version The document's version number.
+     * @param text The document's text.
+     */
+    function create(uri, languageId, version, text) {
+        return { uri, languageId, version, text };
+    }
+    TextDocumentItem.create = create;
+    /**
+     * Checks whether the given literal conforms to the {@link TextDocumentItem} interface.
+     */
+    function is(value) {
+        const candidate = value;
+        return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.integer(candidate.version) && Is.string(candidate.text);
+    }
+    TextDocumentItem.is = is;
+})(TextDocumentItem || (TextDocumentItem = {}));
+/**
+ * Describes the content type that a client supports in various
+ * result literals like `Hover`, `ParameterInfo` or `CompletionItem`.
+ *
+ * Please note that `MarkupKinds` must not start with a `$`. This kinds
+ * are reserved for internal usage.
+ */
+var MarkupKind;
+(function (MarkupKind) {
+    /**
+     * Plain text is supported as a content format
+     */
+    MarkupKind.PlainText = 'plaintext';
+    /**
+     * Markdown is supported as a content format
+     */
+    MarkupKind.Markdown = 'markdown';
+    /**
+     * Checks whether the given value is a value of the {@link MarkupKind} type.
+     */
+    function is(value) {
+        const candidate = value;
+        return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown;
+    }
+    MarkupKind.is = is;
+})(MarkupKind || (MarkupKind = {}));
+var MarkupContent;
+(function (MarkupContent) {
+    /**
+     * Checks whether the given value conforms to the {@link MarkupContent} interface.
+     */
+    function is(value) {
+        const candidate = value;
+        return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);
+    }
+    MarkupContent.is = is;
+})(MarkupContent || (MarkupContent = {}));
+/**
+ * The kind of a completion entry.
+ */
+var CompletionItemKind;
+(function (CompletionItemKind) {
+    CompletionItemKind.Text = 1;
+    CompletionItemKind.Method = 2;
+    CompletionItemKind.Function = 3;
+    CompletionItemKind.Constructor = 4;
+    CompletionItemKind.Field = 5;
+    CompletionItemKind.Variable = 6;
+    CompletionItemKind.Class = 7;
+    CompletionItemKind.Interface = 8;
+    CompletionItemKind.Module = 9;
+    CompletionItemKind.Property = 10;
+    CompletionItemKind.Unit = 11;
+    CompletionItemKind.Value = 12;
+    CompletionItemKind.Enum = 13;
+    CompletionItemKind.Keyword = 14;
+    CompletionItemKind.Snippet = 15;
+    CompletionItemKind.Color = 16;
+    CompletionItemKind.File = 17;
+    CompletionItemKind.Reference = 18;
+    CompletionItemKind.Folder = 19;
+    CompletionItemKind.EnumMember = 20;
+    CompletionItemKind.Constant = 21;
+    CompletionItemKind.Struct = 22;
+    CompletionItemKind.Event = 23;
+    CompletionItemKind.Operator = 24;
+    CompletionItemKind.TypeParameter = 25;
+})(CompletionItemKind || (CompletionItemKind = {}));
+/**
+ * Defines whether the insert text in a completion item should be interpreted as
+ * plain text or a snippet.
+ */
+var InsertTextFormat;
+(function (InsertTextFormat) {
+    /**
+     * The primary text to be inserted is treated as a plain string.
+     */
+    InsertTextFormat.PlainText = 1;
+    /**
+     * The primary text to be inserted is treated as a snippet.
+     *
+     * A snippet can define tab stops and placeholders with `$1`, `$2`
+     * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
+     * the end of the snippet. Placeholders with equal identifiers are linked,
+     * that is typing in one will update others too.
+     *
+     * See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax
+     */
+    InsertTextFormat.Snippet = 2;
+})(InsertTextFormat || (InsertTextFormat = {}));
+/**
+ * Completion item tags are extra annotations that tweak the rendering of a completion
+ * item.
+ *
+ * @since 3.15.0
+ */
+var CompletionItemTag;
+(function (CompletionItemTag) {
+    /**
+     * Render a completion as obsolete, usually using a strike-out.
+     */
+    CompletionItemTag.Deprecated = 1;
+})(CompletionItemTag || (CompletionItemTag = {}));
+/**
+ * The InsertReplaceEdit namespace provides functions to deal with insert / replace edits.
+ *
+ * @since 3.16.0
+ */
+var InsertReplaceEdit;
+(function (InsertReplaceEdit) {
+    /**
+     * Creates a new insert / replace edit
+     */
+    function create(newText, insert, replace) {
+        return { newText, insert, replace };
+    }
+    InsertReplaceEdit.create = create;
+    /**
+     * Checks whether the given literal conforms to the {@link InsertReplaceEdit} interface.
+     */
+    function is(value) {
+        const candidate = value;
+        return candidate && Is.string(candidate.newText) && Range.is(candidate.insert) && Range.is(candidate.replace);
+    }
+    InsertReplaceEdit.is = is;
+})(InsertReplaceEdit || (InsertReplaceEdit = {}));
+/**
+ * How whitespace and indentation is handled during completion
+ * item insertion.
+ *
+ * @since 3.16.0
+ */
+var InsertTextMode;
+(function (InsertTextMode) {
+    /**
+     * The insertion or replace strings is taken as it is. If the
+     * value is multi line the lines below the cursor will be
+     * inserted using the indentation defined in the string value.
+     * The client will not apply any kind of adjustments to the
+     * string.
+     */
+    InsertTextMode.asIs = 1;
+    /**
+     * The editor adjusts leading whitespace of new lines so that
+     * they match the indentation up to the cursor of the line for
+     * which the item is accepted.
+     *
+     * Consider a line like this: <2tabs><3tabs>foo. Accepting a
+     * multi line completion item is indented using 2 tabs and all
+     * following lines inserted will be indented using 2 tabs as well.
+     */
+    InsertTextMode.adjustIndentation = 2;
+})(InsertTextMode || (InsertTextMode = {}));
+/**
+ * Defines how values from a set of defaults and an individual item will be
+ * merged.
+ *
+ * @since 3.18.0
+ */
+var ApplyKind;
+(function (ApplyKind) {
+    /**
+     * The value from the individual item (if provided and not `null`) will be
+     * used instead of the default.
+     */
+    ApplyKind.Replace = 1;
+    /**
+     * The value from the item will be merged with the default.
+     *
+     * The specific rules for mergeing values are defined against each field
+     * that supports merging.
+     */
+    ApplyKind.Merge = 2;
+})(ApplyKind || (ApplyKind = {}));
+var CompletionItemLabelDetails;
+(function (CompletionItemLabelDetails) {
+    function is(value) {
+        const candidate = value;
+        return candidate && (Is.string(candidate.detail) || candidate.detail === undefined) &&
+            (Is.string(candidate.description) || candidate.description === undefined);
+    }
+    CompletionItemLabelDetails.is = is;
+})(CompletionItemLabelDetails || (CompletionItemLabelDetails = {}));
+/**
+ * The CompletionItem namespace provides functions to deal with
+ * completion items.
+ */
+var CompletionItem;
+(function (CompletionItem) {
+    /**
+     * Create a completion item and seed it with a label.
+     * @param label The completion item's label
+     */
+    function create(label) {
+        return { label };
+    }
+    CompletionItem.create = create;
+})(CompletionItem || (CompletionItem = {}));
+/**
+ * The CompletionList namespace provides functions to deal with
+ * completion lists.
+ */
+var CompletionList;
+(function (CompletionList) {
+    /**
+     * Creates a new completion list.
+     *
+     * @param items The completion items.
+     * @param isIncomplete The list is not complete.
+     */
+    function create(items, isIncomplete) {
+        return { items: items ? items : [], isIncomplete: !!isIncomplete };
+    }
+    CompletionList.create = create;
+})(CompletionList || (CompletionList = {}));
+var MarkedString;
+(function (MarkedString) {
+    /**
+     * Creates a marked string from plain text.
+     *
+     * @param plainText The plain text.
+     */
+    function fromPlainText(plainText) {
+        return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
+    }
+    MarkedString.fromPlainText = fromPlainText;
+    /**
+     * Checks whether the given value conforms to the {@link MarkedString} type.
+     */
+    function is(value) {
+        const candidate = value;
+        return Is.string(candidate) || (Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value));
+    }
+    MarkedString.is = is;
+})(MarkedString || (MarkedString = {}));
+var Hover;
+(function (Hover) {
+    /**
+     * Checks whether the given value conforms to the {@link Hover} interface.
+     */
+    function is(value) {
+        const candidate = value;
+        return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) ||
+            MarkedString.is(candidate.contents) ||
+            Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === undefined || Range.is(value.range));
+    }
+    Hover.is = is;
+})(Hover || (Hover = {}));
+/**
+ * The ParameterInformation namespace provides helper functions to work with
+ * {@link ParameterInformation} literals.
+ */
+var ParameterInformation;
+(function (ParameterInformation) {
+    /**
+     * Creates a new parameter information literal.
+     *
+     * @param label A label string.
+     * @param documentation A doc string.
+     */
+    function create(label, documentation) {
+        return documentation ? { label, documentation } : { label };
+    }
+    ParameterInformation.create = create;
+})(ParameterInformation || (ParameterInformation = {}));
+/**
+ * The SignatureInformation namespace provides helper functions to work with
+ * {@link SignatureInformation} literals.
+ */
+var SignatureInformation;
+(function (SignatureInformation) {
+    function create(label, documentation, ...parameters) {
+        const result = { label };
+        if (Is.defined(documentation)) {
+            result.documentation = documentation;
+        }
+        if (Is.defined(parameters)) {
+            result.parameters = parameters;
+        }
+        else {
+            result.parameters = [];
+        }
+        return result;
+    }
+    SignatureInformation.create = create;
+})(SignatureInformation || (SignatureInformation = {}));
+/**
+ * A document highlight kind.
+ */
+var DocumentHighlightKind;
+(function (DocumentHighlightKind) {
+    /**
+     * A textual occurrence.
+     */
+    DocumentHighlightKind.Text = 1;
+    /**
+     * Read-access of a symbol, like reading a variable.
+     */
+    DocumentHighlightKind.Read = 2;
+    /**
+     * Write-access of a symbol, like writing to a variable.
+     */
+    DocumentHighlightKind.Write = 3;
+})(DocumentHighlightKind || (DocumentHighlightKind = {}));
+/**
+ * DocumentHighlight namespace to provide helper functions to work with
+ * {@link DocumentHighlight} literals.
+ */
+var DocumentHighlight;
+(function (DocumentHighlight) {
+    /**
+     * Create a DocumentHighlight object.
+     * @param range The range the highlight applies to.
+     * @param kind The highlight kind
+     */
+    function create(range, kind) {
+        const result = { range };
+        if (Is.number(kind)) {
+            result.kind = kind;
+        }
+        return result;
+    }
+    DocumentHighlight.create = create;
+})(DocumentHighlight || (DocumentHighlight = {}));
+/**
+ * A symbol kind.
+ */
+var SymbolKind;
+(function (SymbolKind) {
+    SymbolKind.File = 1;
+    SymbolKind.Module = 2;
+    SymbolKind.Namespace = 3;
+    SymbolKind.Package = 4;
+    SymbolKind.Class = 5;
+    SymbolKind.Method = 6;
+    SymbolKind.Property = 7;
+    SymbolKind.Field = 8;
+    SymbolKind.Constructor = 9;
+    SymbolKind.Enum = 10;
+    SymbolKind.Interface = 11;
+    SymbolKind.Function = 12;
+    SymbolKind.Variable = 13;
+    SymbolKind.Constant = 14;
+    SymbolKind.String = 15;
+    SymbolKind.Number = 16;
+    SymbolKind.Boolean = 17;
+    SymbolKind.Array = 18;
+    SymbolKind.Object = 19;
+    SymbolKind.Key = 20;
+    SymbolKind.Null = 21;
+    SymbolKind.EnumMember = 22;
+    SymbolKind.Struct = 23;
+    SymbolKind.Event = 24;
+    SymbolKind.Operator = 25;
+    SymbolKind.TypeParameter = 26;
+})(SymbolKind || (SymbolKind = {}));
+/**
+ * Symbol tags are extra annotations that tweak the rendering of a symbol.
+ *
+ * @since 3.16
+ */
+var SymbolTag;
+(function (SymbolTag) {
+    /**
+     * Render a symbol as obsolete, usually using a strike-out.
+     */
+    SymbolTag.Deprecated = 1;
+})(SymbolTag || (SymbolTag = {}));
+var SymbolInformation;
+(function (SymbolInformation) {
+    /**
+     * Creates a new symbol information literal.
+     *
+     * @param name The name of the symbol.
+     * @param kind The kind of the symbol.
+     * @param range The range of the location of the symbol.
+     * @param uri The resource of the location of symbol.
+     * @param containerName The name of the symbol containing the symbol.
+     */
+    function create(name, kind, range, uri, containerName) {
+        const result = {
+            name,
+            kind,
+            location: { uri, range }
+        };
+        if (containerName) {
+            result.containerName = containerName;
+        }
+        return result;
+    }
+    SymbolInformation.create = create;
+})(SymbolInformation || (SymbolInformation = {}));
+var WorkspaceSymbol;
+(function (WorkspaceSymbol) {
+    /**
+     * Create a new workspace symbol.
+     *
+     * @param name The name of the symbol.
+     * @param kind The kind of the symbol.
+     * @param uri The resource of the location of the symbol.
+     * @param range An options range of the location.
+     * @returns A WorkspaceSymbol.
+     */
+    function create(name, kind, uri, range) {
+        return range !== undefined
+            ? { name, kind, location: { uri, range } }
+            : { name, kind, location: { uri } };
+    }
+    WorkspaceSymbol.create = create;
+})(WorkspaceSymbol || (WorkspaceSymbol = {}));
+var DocumentSymbol;
+(function (DocumentSymbol) {
+    /**
+     * Creates a new symbol information literal.
+     *
+     * @param name The name of the symbol.
+     * @param detail The detail of the symbol.
+     * @param kind The kind of the symbol.
+     * @param range The range of the symbol.
+     * @param selectionRange The selectionRange of the symbol.
+     * @param children Children of the symbol.
+     */
+    function create(name, detail, kind, range, selectionRange, children) {
+        const result = {
+            name,
+            detail,
+            kind,
+            range,
+            selectionRange
+        };
+        if (children !== undefined) {
+            result.children = children;
+        }
+        return result;
+    }
+    DocumentSymbol.create = create;
+    /**
+     * Checks whether the given literal conforms to the {@link DocumentSymbol} interface.
+     */
+    function is(value) {
+        const candidate = value;
+        return candidate &&
+            Is.string(candidate.name) && Is.number(candidate.kind) &&
+            Range.is(candidate.range) && Range.is(candidate.selectionRange) &&
+            (candidate.detail === undefined || Is.string(candidate.detail)) &&
+            (candidate.deprecated === undefined || Is.boolean(candidate.deprecated)) &&
+            (candidate.children === undefined || Array.isArray(candidate.children)) &&
+            (candidate.tags === undefined || Array.isArray(candidate.tags));
+    }
+    DocumentSymbol.is = is;
+})(DocumentSymbol || (DocumentSymbol = {}));
+/**
+ * A set of predefined code action kinds
+ */
+var CodeActionKind;
+(function (CodeActionKind) {
+    /**
+     * Empty kind.
+     */
+    CodeActionKind.Empty = '';
+    /**
+     * Base kind for quickfix actions: 'quickfix'
+     */
+    CodeActionKind.QuickFix = 'quickfix';
+    /**
+     * Base kind for refactoring actions: 'refactor'
+     */
+    CodeActionKind.Refactor = 'refactor';
+    /**
+     * Base kind for refactoring extraction actions: 'refactor.extract'
+     *
+     * Example extract actions:
+     *
+     * - Extract method
+     * - Extract function
+     * - Extract variable
+     * - Extract interface from class
+     * - ...
+     */
+    CodeActionKind.RefactorExtract = 'refactor.extract';
+    /**
+     * Base kind for refactoring inline actions: 'refactor.inline'
+     *
+     * Example inline actions:
+     *
+     * - Inline function
+     * - Inline variable
+     * - Inline constant
+     * - ...
+     */
+    CodeActionKind.RefactorInline = 'refactor.inline';
+    /**
+     * Base kind for refactoring move actions: `refactor.move`
+     *
+     * Example move actions:
+     *
+     * - Move a function to a new file
+     * - Move a property between classes
+     * - Move method to base class
+     * - ...
+     *
+     * @since 3.18.0
+     */
+    CodeActionKind.RefactorMove = 'refactor.move';
+    /**
+     * Base kind for refactoring rewrite actions: 'refactor.rewrite'
+     *
+     * Example rewrite actions:
+     *
+     * - Convert JavaScript function to class
+     * - Add or remove parameter
+     * - Encapsulate field
+     * - Make method static
+     * - Move method to base class
+     * - ...
+     */
+    CodeActionKind.RefactorRewrite = 'refactor.rewrite';
+    /**
+     * Base kind for source actions: `source`
+     *
+     * Source code actions apply to the entire file.
+     */
+    CodeActionKind.Source = 'source';
+    /**
+     * Base kind for an organize imports source action: `source.organizeImports`
+     */
+    CodeActionKind.SourceOrganizeImports = 'source.organizeImports';
+    /**
+     * Base kind for auto-fix source actions: `source.fixAll`.
+     *
+     * Fix all actions automatically fix errors that have a clear fix that do not require user input.
+     * They should not suppress errors or perform unsafe fixes such as generating new types or classes.
+     *
+     * @since 3.15.0
+     */
+    CodeActionKind.SourceFixAll = 'source.fixAll';
+    /**
+     * Base kind for all code actions applying to the entire notebook's scope. CodeActionKinds using
+     * this should always begin with `notebook.`
+     *
+     * @since 3.18.0
+     */
+    CodeActionKind.Notebook = 'notebook';
+})(CodeActionKind || (CodeActionKind = {}));
+/**
+ * The reason why code actions were requested.
+ *
+ * @since 3.17.0
+ */
+var CodeActionTriggerKind;
+(function (CodeActionTriggerKind) {
+    /**
+     * Code actions were explicitly requested by the user or by an extension.
+     */
+    CodeActionTriggerKind.Invoked = 1;
+    /**
+     * Code actions were requested automatically.
+     *
+     * This typically happens when current selection in a file changes, but can
+     * also be triggered when file content changes.
+     */
+    CodeActionTriggerKind.Automatic = 2;
+})(CodeActionTriggerKind || (CodeActionTriggerKind = {}));
+/**
+ * The CodeActionContext namespace provides helper functions to work with
+ * {@link CodeActionContext} literals.
+ */
+var CodeActionContext;
+(function (CodeActionContext) {
+    /**
+     * Creates a new CodeActionContext literal.
+     */
+    function create(diagnostics, only, triggerKind) {
+        const result = { diagnostics };
+        if (only !== undefined && only !== null) {
+            result.only = only;
+        }
+        if (triggerKind !== undefined && triggerKind !== null) {
+            result.triggerKind = triggerKind;
+        }
+        return result;
+    }
+    CodeActionContext.create = create;
+    /**
+     * Checks whether the given literal conforms to the {@link CodeActionContext} interface.
+     */
+    function is(value) {
+        const candidate = value;
+        return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is)
+            && (candidate.only === undefined || Is.typedArray(candidate.only, Is.string))
+            && (candidate.triggerKind === undefined || candidate.triggerKind === CodeActionTriggerKind.Invoked || candidate.triggerKind === CodeActionTriggerKind.Automatic);
+    }
+    CodeActionContext.is = is;
+})(CodeActionContext || (CodeActionContext = {}));
+/**
+ * Code action tags are extra annotations that tweak the behavior of a code action.
+ *
+ * @since 3.18.0 - proposed
+ */
+var CodeActionTag;
+(function (CodeActionTag) {
+    /**
+     * Marks the code action as LLM-generated.
+     */
+    CodeActionTag.LLMGenerated = 1;
+    /**
+     * Checks whether the given literal conforms to the {@link CodeActionTag} interface.
+     */
+    function is(value) {
+        return Is.defined(value) && value === CodeActionTag.LLMGenerated;
+    }
+    CodeActionTag.is = is;
+})(CodeActionTag || (CodeActionTag = {}));
+var CodeAction;
+(function (CodeAction) {
+    function create(title, kindOrCommandOrEdit, kind) {
+        const result = { title };
+        let checkKind = true;
+        if (typeof kindOrCommandOrEdit === 'string') {
+            checkKind = false;
+            result.kind = kindOrCommandOrEdit;
+        }
+        else if (Command.is(kindOrCommandOrEdit)) {
+            result.command = kindOrCommandOrEdit;
+        }
+        else {
+            result.edit = kindOrCommandOrEdit;
+        }
+        if (checkKind && kind !== undefined) {
+            result.kind = kind;
+        }
+        return result;
+    }
+    CodeAction.create = create;
+    function is(value) {
+        const candidate = value;
+        return candidate && Is.string(candidate.title) &&
+            (candidate.diagnostics === undefined || Is.typedArray(candidate.diagnostics, Diagnostic.is)) &&
+            (candidate.kind === undefined || Is.string(candidate.kind)) &&
+            (candidate.edit !== undefined || candidate.command !== undefined) &&
+            (candidate.command === undefined || Command.is(candidate.command)) &&
+            (candidate.isPreferred === undefined || Is.boolean(candidate.isPreferred)) &&
+            (candidate.edit === undefined || WorkspaceEdit.is(candidate.edit)) &&
+            (candidate.tags === undefined || Is.typedArray(candidate.tags, CodeActionTag.is));
+    }
+    CodeAction.is = is;
+})(CodeAction || (CodeAction = {}));
+/**
+ * The CodeLens namespace provides helper functions to work with
+ * {@link CodeLens} literals.
+ */
+var CodeLens;
+(function (CodeLens) {
+    /**
+     * Creates a new CodeLens literal.
+     */
+    function create(range, data) {
+        const result = { range };
+        if (Is.defined(data)) {
+            result.data = data;
+        }
+        return result;
+    }
+    CodeLens.create = create;
+    /**
+     * Checks whether the given literal conforms to the {@link CodeLens} interface.
+     */
+    function is(value) {
+        const candidate = value;
+        return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command));
+    }
+    CodeLens.is = is;
+})(CodeLens || (CodeLens = {}));
+/**
+ * The FormattingOptions namespace provides helper functions to work with
+ * {@link FormattingOptions} literals.
+ */
+var FormattingOptions;
+(function (FormattingOptions) {
+    /**
+     * Creates a new FormattingOptions literal.
+     */
+    function create(tabSize, insertSpaces) {
+        return { tabSize, insertSpaces };
+    }
+    FormattingOptions.create = create;
+    /**
+     * Checks whether the given literal conforms to the {@link FormattingOptions} interface.
+     */
+    function is(value) {
+        const candidate = value;
+        return Is.defined(candidate) && Is.uinteger(candidate.tabSize) && Is.boolean(candidate.insertSpaces);
+    }
+    FormattingOptions.is = is;
+})(FormattingOptions || (FormattingOptions = {}));
+/**
+ * The DocumentLink namespace provides helper functions to work with
+ * {@link DocumentLink} literals.
+ */
+var DocumentLink;
+(function (DocumentLink) {
+    /**
+     * Creates a new DocumentLink literal.
+     */
+    function create(range, target, data) {
+        return { range, target, data };
+    }
+    DocumentLink.create = create;
+    /**
+     * Checks whether the given literal conforms to the {@link DocumentLink} interface.
+     */
+    function is(value) {
+        const candidate = value;
+        return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target));
+    }
+    DocumentLink.is = is;
+})(DocumentLink || (DocumentLink = {}));
+/**
+ * The SelectionRange namespace provides helper function to work with
+ * SelectionRange literals.
+ */
+var SelectionRange;
+(function (SelectionRange) {
+    /**
+     * Creates a new SelectionRange
+     * @param range the range.
+     * @param parent an optional parent.
+     */
+    function create(range, parent) {
+        return { range, parent };
+    }
+    SelectionRange.create = create;
+    function is(value) {
+        const candidate = value;
+        return Is.objectLiteral(candidate) && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent));
+    }
+    SelectionRange.is = is;
+})(SelectionRange || (SelectionRange = {}));
+/**
+ * A set of predefined token types. This set is not fixed
+ * an clients can specify additional token types via the
+ * corresponding client capabilities.
+ *
+ * @since 3.16.0
+ */
+var SemanticTokenTypes;
+(function (SemanticTokenTypes) {
+    SemanticTokenTypes["namespace"] = "namespace";
+    /**
+     * Represents a generic type. Acts as a fallback for types which can't be mapped to
+     * a specific type like class or enum.
+     */
+    SemanticTokenTypes["type"] = "type";
+    SemanticTokenTypes["class"] = "class";
+    SemanticTokenTypes["enum"] = "enum";
+    SemanticTokenTypes["interface"] = "interface";
+    SemanticTokenTypes["struct"] = "struct";
+    SemanticTokenTypes["typeParameter"] = "typeParameter";
+    SemanticTokenTypes["parameter"] = "parameter";
+    SemanticTokenTypes["variable"] = "variable";
+    SemanticTokenTypes["property"] = "property";
+    SemanticTokenTypes["enumMember"] = "enumMember";
+    SemanticTokenTypes["event"] = "event";
+    SemanticTokenTypes["function"] = "function";
+    SemanticTokenTypes["method"] = "method";
+    SemanticTokenTypes["macro"] = "macro";
+    SemanticTokenTypes["keyword"] = "keyword";
+    SemanticTokenTypes["modifier"] = "modifier";
+    SemanticTokenTypes["comment"] = "comment";
+    SemanticTokenTypes["string"] = "string";
+    SemanticTokenTypes["number"] = "number";
+    SemanticTokenTypes["regexp"] = "regexp";
+    SemanticTokenTypes["operator"] = "operator";
+    /**
+     * @since 3.17.0
+     */
+    SemanticTokenTypes["decorator"] = "decorator";
+    /**
+     * @since 3.18.0
+     */
+    SemanticTokenTypes["label"] = "label";
+})(SemanticTokenTypes || (SemanticTokenTypes = {}));
+/**
+ * A set of predefined token modifiers. This set is not fixed
+ * an clients can specify additional token types via the
+ * corresponding client capabilities.
+ *
+ * @since 3.16.0
+ */
+var SemanticTokenModifiers;
+(function (SemanticTokenModifiers) {
+    SemanticTokenModifiers["declaration"] = "declaration";
+    SemanticTokenModifiers["definition"] = "definition";
+    SemanticTokenModifiers["readonly"] = "readonly";
+    SemanticTokenModifiers["static"] = "static";
+    SemanticTokenModifiers["deprecated"] = "deprecated";
+    SemanticTokenModifiers["abstract"] = "abstract";
+    SemanticTokenModifiers["async"] = "async";
+    SemanticTokenModifiers["modification"] = "modification";
+    SemanticTokenModifiers["documentation"] = "documentation";
+    SemanticTokenModifiers["defaultLibrary"] = "defaultLibrary";
+})(SemanticTokenModifiers || (SemanticTokenModifiers = {}));
+/**
+ * @since 3.16.0
+ */
+var SemanticTokens;
+(function (SemanticTokens) {
+    function is(value) {
+        const candidate = value;
+        return Is.objectLiteral(candidate) && (candidate.resultId === undefined || typeof candidate.resultId === 'string') &&
+            Array.isArray(candidate.data) && (candidate.data.length === 0 || typeof candidate.data[0] === 'number');
+    }
+    SemanticTokens.is = is;
+})(SemanticTokens || (SemanticTokens = {}));
+/**
+ * The InlineValueText namespace provides functions to deal with InlineValueTexts.
+ *
+ * @since 3.17.0
+ */
+var InlineValueText;
+(function (InlineValueText) {
+    /**
+     * Creates a new InlineValueText literal.
+     */
+    function create(range, text) {
+        return { range, text };
+    }
+    InlineValueText.create = create;
+    function is(value) {
+        const candidate = value;
+        return candidate !== undefined && candidate !== null && Range.is(candidate.range) && Is.string(candidate.text);
+    }
+    InlineValueText.is = is;
+})(InlineValueText || (InlineValueText = {}));
+/**
+ * The InlineValueVariableLookup namespace provides functions to
+ * deal with InlineValueVariableLookups.
+ *
+ * @since 3.17.0
+ */
+var InlineValueVariableLookup;
+(function (InlineValueVariableLookup) {
+    /**
+     * Creates a new InlineValueText literal.
+     */
+    function create(range, variableName, caseSensitiveLookup) {
+        return { range, variableName, caseSensitiveLookup };
+    }
+    InlineValueVariableLookup.create = create;
+    function is(value) {
+        const candidate = value;
+        return candidate !== undefined && candidate !== null && Range.is(candidate.range) && Is.boolean(candidate.caseSensitiveLookup)
+            && (Is.string(candidate.variableName) || candidate.variableName === undefined);
+    }
+    InlineValueVariableLookup.is = is;
+})(InlineValueVariableLookup || (InlineValueVariableLookup = {}));
+/**
+ * The InlineValueEvaluatableExpression namespace provides functions to deal with InlineValueEvaluatableExpression.
+ *
+ * @since 3.17.0
+ */
+var InlineValueEvaluatableExpression;
+(function (InlineValueEvaluatableExpression) {
+    /**
+     * Creates a new InlineValueEvaluatableExpression literal.
+     */
+    function create(range, expression) {
+        return { range, expression };
+    }
+    InlineValueEvaluatableExpression.create = create;
+    function is(value) {
+        const candidate = value;
+        return candidate !== undefined && candidate !== null && Range.is(candidate.range)
+            && (Is.string(candidate.expression) || candidate.expression === undefined);
+    }
+    InlineValueEvaluatableExpression.is = is;
+})(InlineValueEvaluatableExpression || (InlineValueEvaluatableExpression = {}));
+/**
+ * The InlineValueContext namespace provides helper functions to work with
+ * {@link InlineValueContext} literals.
+ *
+ * @since 3.17.0
+ */
+var InlineValueContext;
+(function (InlineValueContext) {
+    /**
+     * Creates a new InlineValueContext literal.
+     */
+    function create(frameId, stoppedLocation) {
+        return { frameId, stoppedLocation };
+    }
+    InlineValueContext.create = create;
+    /**
+     * Checks whether the given literal conforms to the {@link InlineValueContext} interface.
+     */
+    function is(value) {
+        const candidate = value;
+        return Is.defined(candidate) && Range.is(value.stoppedLocation);
+    }
+    InlineValueContext.is = is;
+})(InlineValueContext || (InlineValueContext = {}));
+/**
+ * Inlay hint kinds.
+ *
+ * @since 3.17.0
+ */
+var InlayHintKind;
+(function (InlayHintKind) {
+    /**
+     * An inlay hint that for a type annotation.
+     */
+    InlayHintKind.Type = 1;
+    /**
+     * An inlay hint that is for a parameter.
+     */
+    InlayHintKind.Parameter = 2;
+    function is(value) {
+        return value === 1 || value === 2;
+    }
+    InlayHintKind.is = is;
+})(InlayHintKind || (InlayHintKind = {}));
+var InlayHintLabelPart;
+(function (InlayHintLabelPart) {
+    function create(value) {
+        return { value };
+    }
+    InlayHintLabelPart.create = create;
+    function is(value) {
+        const candidate = value;
+        return Is.objectLiteral(candidate)
+            && (candidate.tooltip === undefined || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip))
+            && (candidate.location === undefined || Location.is(candidate.location))
+            && (candidate.command === undefined || Command.is(candidate.command));
+    }
+    InlayHintLabelPart.is = is;
+})(InlayHintLabelPart || (InlayHintLabelPart = {}));
+var InlayHint;
+(function (InlayHint) {
+    function create(position, label, kind) {
+        const result = { position, label };
+        if (kind !== undefined) {
+            result.kind = kind;
+        }
+        return result;
+    }
+    InlayHint.create = create;
+    function is(value) {
+        const candidate = value;
+        return Is.objectLiteral(candidate) && Position.is(candidate.position)
+            && (Is.string(candidate.label) || Is.typedArray(candidate.label, InlayHintLabelPart.is))
+            && (candidate.kind === undefined || InlayHintKind.is(candidate.kind))
+            && (candidate.textEdits === undefined) || Is.typedArray(candidate.textEdits, TextEdit.is)
+            && (candidate.tooltip === undefined || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip))
+            && (candidate.paddingLeft === undefined || Is.boolean(candidate.paddingLeft))
+            && (candidate.paddingRight === undefined || Is.boolean(candidate.paddingRight));
+    }
+    InlayHint.is = is;
+})(InlayHint || (InlayHint = {}));
+var StringValue;
+(function (StringValue) {
+    function createSnippet(value) {
+        return { kind: 'snippet', value };
+    }
+    StringValue.createSnippet = createSnippet;
+    function isSnippet(value) {
+        const candidate = value;
+        return Is.objectLiteral(candidate)
+            && candidate.kind === 'snippet'
+            && Is.string(candidate.value);
+    }
+    StringValue.isSnippet = isSnippet;
+})(StringValue || (StringValue = {}));
+var InlineCompletionItem;
+(function (InlineCompletionItem) {
+    function create(insertText, filterText, range, command) {
+        return { insertText, filterText, range, command };
+    }
+    InlineCompletionItem.create = create;
+})(InlineCompletionItem || (InlineCompletionItem = {}));
+var InlineCompletionList;
+(function (InlineCompletionList) {
+    function create(items) {
+        return { items };
+    }
+    InlineCompletionList.create = create;
+})(InlineCompletionList || (InlineCompletionList = {}));
+/**
+ * Describes how an {@link InlineCompletionItemProvider inline completion provider} was triggered.
+ *
+ * @since 3.18.0
+ */
+var InlineCompletionTriggerKind;
+(function (InlineCompletionTriggerKind) {
+    /**
+     * Completion was triggered explicitly by a user gesture.
+     */
+    InlineCompletionTriggerKind.Invoked = 1;
+    /**
+     * Completion was triggered automatically while editing.
+     */
+    InlineCompletionTriggerKind.Automatic = 2;
+})(InlineCompletionTriggerKind || (InlineCompletionTriggerKind = {}));
+var SelectedCompletionInfo;
+(function (SelectedCompletionInfo) {
+    function create(range, text) {
+        return { range, text };
+    }
+    SelectedCompletionInfo.create = create;
+})(SelectedCompletionInfo || (SelectedCompletionInfo = {}));
+var InlineCompletionContext;
+(function (InlineCompletionContext) {
+    function create(triggerKind, selectedCompletionInfo) {
+        return { triggerKind, selectedCompletionInfo };
+    }
+    InlineCompletionContext.create = create;
+})(InlineCompletionContext || (InlineCompletionContext = {}));
+var WorkspaceFolder;
+(function (WorkspaceFolder) {
+    function is(value) {
+        const candidate = value;
+        return Is.objectLiteral(candidate) && URI.is(candidate.uri) && Is.string(candidate.name);
+    }
+    WorkspaceFolder.is = is;
+})(WorkspaceFolder || (WorkspaceFolder = {}));
+const EOL = ['\n', '\r\n', '\r'];
+/**
+ * @deprecated Use the text document from the new vscode-languageserver-textdocument package.
+ */
+var TextDocument;
+(function (TextDocument) {
+    /**
+     * Creates a new ITextDocument literal from the given uri and content.
+     * @param uri The document's uri.
+     * @param languageId The document's language Id.
+     * @param version The document's version.
+     * @param content The document's content.
+     */
+    function create(uri, languageId, version, content) {
+        return new FullTextDocument(uri, languageId, version, content);
+    }
+    TextDocument.create = create;
+    /**
+     * Checks whether the given literal conforms to the {@link ITextDocument} interface.
+     */
+    function is(value) {
+        const candidate = value;
+        return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.uinteger(candidate.lineCount)
+            && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false;
+    }
+    TextDocument.is = is;
+    function applyEdits(document, edits) {
+        let text = document.getText();
+        const sortedEdits = mergeSort(edits, (a, b) => {
+            const diff = a.range.start.line - b.range.start.line;
+            if (diff === 0) {
+                return a.range.start.character - b.range.start.character;
+            }
+            return diff;
+        });
+        let lastModifiedOffset = text.length;
+        for (let i = sortedEdits.length - 1; i >= 0; i--) {
+            const e = sortedEdits[i];
+            const startOffset = document.offsetAt(e.range.start);
+            const endOffset = document.offsetAt(e.range.end);
+            if (endOffset <= lastModifiedOffset) {
+                text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);
+            }
+            else {
+                throw new Error('Overlapping edit');
+            }
+            lastModifiedOffset = startOffset;
+        }
+        return text;
+    }
+    TextDocument.applyEdits = applyEdits;
+    function mergeSort(data, compare) {
+        if (data.length <= 1) {
+            // sorted
+            return data;
+        }
+        const p = (data.length / 2) | 0;
+        const left = data.slice(0, p);
+        const right = data.slice(p);
+        mergeSort(left, compare);
+        mergeSort(right, compare);
+        let leftIdx = 0;
+        let rightIdx = 0;
+        let i = 0;
+        while (leftIdx < left.length && rightIdx < right.length) {
+            const ret = compare(left[leftIdx], right[rightIdx]);
+            if (ret <= 0) {
+                // smaller_equal -> take left to preserve order
+                data[i++] = left[leftIdx++];
+            }
+            else {
+                // greater -> take right
+                data[i++] = right[rightIdx++];
+            }
+        }
+        while (leftIdx < left.length) {
+            data[i++] = left[leftIdx++];
+        }
+        while (rightIdx < right.length) {
+            data[i++] = right[rightIdx++];
+        }
+        return data;
+    }
+})(TextDocument || (TextDocument = {}));
+/**
+ * @deprecated Use the text document from the new vscode-languageserver-textdocument package.
+ */
+class FullTextDocument {
+    constructor(uri, languageId, version, content) {
+        this._uri = uri;
+        this._languageId = languageId;
+        this._version = version;
+        this._content = content;
+        this._lineOffsets = undefined;
+    }
+    get uri() {
+        return this._uri;
+    }
+    get languageId() {
+        return this._languageId;
+    }
+    get version() {
+        return this._version;
+    }
+    getText(range) {
+        if (range) {
+            const start = this.offsetAt(range.start);
+            const end = this.offsetAt(range.end);
+            return this._content.substring(start, end);
+        }
+        return this._content;
+    }
+    update(event, version) {
+        this._content = event.text;
+        this._version = version;
+        this._lineOffsets = undefined;
+    }
+    getLineOffsets() {
+        if (this._lineOffsets === undefined) {
+            const lineOffsets = [];
+            const text = this._content;
+            let isLineStart = true;
+            for (let i = 0; i < text.length; i++) {
+                if (isLineStart) {
+                    lineOffsets.push(i);
+                    isLineStart = false;
+                }
+                const ch = text.charAt(i);
+                isLineStart = (ch === '\r' || ch === '\n');
+                if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') {
+                    i++;
+                }
+            }
+            if (isLineStart && text.length > 0) {
+                lineOffsets.push(text.length);
+            }
+            this._lineOffsets = lineOffsets;
+        }
+        return this._lineOffsets;
+    }
+    positionAt(offset) {
+        offset = Math.max(Math.min(offset, this._content.length), 0);
+        const lineOffsets = this.getLineOffsets();
+        let low = 0, high = lineOffsets.length;
+        if (high === 0) {
+            return Position.create(0, offset);
+        }
+        while (low < high) {
+            const mid = Math.floor((low + high) / 2);
+            if (lineOffsets[mid] > offset) {
+                high = mid;
+            }
+            else {
+                low = mid + 1;
+            }
+        }
+        // low is the least x for which the line offset is larger than the current offset
+        // or array.length if no line offset is larger than the current offset
+        const line = low - 1;
+        return Position.create(line, offset - lineOffsets[line]);
+    }
+    offsetAt(position) {
+        const lineOffsets = this.getLineOffsets();
+        if (position.line >= lineOffsets.length) {
+            return this._content.length;
+        }
+        else if (position.line < 0) {
+            return 0;
+        }
+        const lineOffset = lineOffsets[position.line];
+        const nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;
+        return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);
+    }
+    get lineCount() {
+        return this.getLineOffsets().length;
+    }
+}
+var Is;
+(function (Is) {
+    const toString = Object.prototype.toString;
+    function defined(value) {
+        return typeof value !== 'undefined';
+    }
+    Is.defined = defined;
+    function undefined(value) {
+        return typeof value === 'undefined';
+    }
+    Is.undefined = undefined;
+    function boolean(value) {
+        return value === true || value === false;
+    }
+    Is.boolean = boolean;
+    function string(value) {
+        return toString.call(value) === '[object String]';
+    }
+    Is.string = string;
+    function number(value) {
+        return toString.call(value) === '[object Number]';
+    }
+    Is.number = number;
+    function numberRange(value, min, max) {
+        return toString.call(value) === '[object Number]' && min <= value && value <= max;
+    }
+    Is.numberRange = numberRange;
+    function integer(value) {
+        return toString.call(value) === '[object Number]' && -2147483648 <= value && value <= 2147483647;
+    }
+    Is.integer = integer;
+    function uinteger(value) {
+        return toString.call(value) === '[object Number]' && 0 <= value && value <= 2147483647;
+    }
+    Is.uinteger = uinteger;
+    function func(value) {
+        return toString.call(value) === '[object Function]';
+    }
+    Is.func = func;
+    function objectLiteral(value) {
+        // Strictly speaking class instances pass this check as well. Since the LSP
+        // doesn't use classes we ignore this for now. If we do we need to add something
+        // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`
+        return value !== null && typeof value === 'object';
+    }
+    Is.objectLiteral = objectLiteral;
+    function typedArray(value, check) {
+        return Array.isArray(value) && value.every(check);
+    }
+    Is.typedArray = typedArray;
+})(Is || (Is = {}));
+
+__webpack_require__.d(__webpack_exports__, {
+  AnnotatedTextEdit: () => (AnnotatedTextEdit),
+  ApplyKind: () => (ApplyKind),
+  ChangeAnnotation: () => (ChangeAnnotation),
+  ChangeAnnotationIdentifier: () => (ChangeAnnotationIdentifier),
+  CodeAction: () => (CodeAction),
+  CodeActionContext: () => (CodeActionContext),
+  CodeActionKind: () => (CodeActionKind),
+  CodeActionTag: () => (CodeActionTag),
+  CodeActionTriggerKind: () => (CodeActionTriggerKind),
+  CodeDescription: () => (CodeDescription),
+  CodeLens: () => (CodeLens),
+  Color: () => (Color),
+  ColorInformation: () => (ColorInformation),
+  ColorPresentation: () => (ColorPresentation),
+  Command: () => (Command),
+  CompletionItem: () => (CompletionItem),
+  CompletionItemKind: () => (CompletionItemKind),
+  CompletionItemLabelDetails: () => (CompletionItemLabelDetails),
+  CompletionItemTag: () => (CompletionItemTag),
+  CompletionList: () => (CompletionList),
+  CreateFile: () => (CreateFile),
+  DeleteFile: () => (DeleteFile),
+  Diagnostic: () => (Diagnostic),
+  DiagnosticRelatedInformation: () => (DiagnosticRelatedInformation),
+  DiagnosticSeverity: () => (DiagnosticSeverity),
+  DiagnosticTag: () => (DiagnosticTag),
+  DocumentHighlight: () => (DocumentHighlight),
+  DocumentHighlightKind: () => (DocumentHighlightKind),
+  DocumentLink: () => (DocumentLink),
+  DocumentSymbol: () => (DocumentSymbol),
+  DocumentUri: () => (DocumentUri),
+  FoldingRange: () => (FoldingRange),
+  FoldingRangeKind: () => (FoldingRangeKind),
+  FormattingOptions: () => (FormattingOptions),
+  Hover: () => (Hover),
+  InlayHint: () => (InlayHint),
+  InlayHintKind: () => (InlayHintKind),
+  InlayHintLabelPart: () => (InlayHintLabelPart),
+  InlineCompletionContext: () => (InlineCompletionContext),
+  InlineCompletionItem: () => (InlineCompletionItem),
+  InlineCompletionList: () => (InlineCompletionList),
+  InlineCompletionTriggerKind: () => (InlineCompletionTriggerKind),
+  InlineValueContext: () => (InlineValueContext),
+  InlineValueEvaluatableExpression: () => (InlineValueEvaluatableExpression),
+  InlineValueText: () => (InlineValueText),
+  InlineValueVariableLookup: () => (InlineValueVariableLookup),
+  InsertReplaceEdit: () => (InsertReplaceEdit),
+  InsertTextFormat: () => (InsertTextFormat),
+  InsertTextMode: () => (InsertTextMode),
+  LanguageKind: () => (LanguageKind),
+  Location: () => (Location),
+  LocationLink: () => (LocationLink),
+  MarkedString: () => (MarkedString),
+  MarkupContent: () => (MarkupContent),
+  MarkupKind: () => (MarkupKind),
+  OptionalVersionedTextDocumentIdentifier: () => (OptionalVersionedTextDocumentIdentifier),
+  ParameterInformation: () => (ParameterInformation),
+  Position: () => (Position),
+  Range: () => (Range),
+  RenameFile: () => (RenameFile),
+  SelectedCompletionInfo: () => (SelectedCompletionInfo),
+  SelectionRange: () => (SelectionRange),
+  SemanticTokenModifiers: () => (SemanticTokenModifiers),
+  SemanticTokenTypes: () => (SemanticTokenTypes),
+  SemanticTokens: () => (SemanticTokens),
+  SignatureInformation: () => (SignatureInformation),
+  SnippetTextEdit: () => (SnippetTextEdit),
+  StringValue: () => (StringValue),
+  SymbolInformation: () => (SymbolInformation),
+  SymbolKind: () => (SymbolKind),
+  SymbolTag: () => (SymbolTag),
+  TextDocument: () => (TextDocument),
+  TextDocumentEdit: () => (TextDocumentEdit),
+  TextDocumentIdentifier: () => (TextDocumentIdentifier),
+  TextDocumentItem: () => (TextDocumentItem),
+  TextEdit: () => (TextEdit),
+  URI: () => (URI),
+  VersionedTextDocumentIdentifier: () => (VersionedTextDocumentIdentifier),
+  WorkspaceChange: () => (WorkspaceChange),
+  WorkspaceEdit: () => (WorkspaceEdit),
+  WorkspaceFolder: () => (WorkspaceFolder),
+  WorkspaceSymbol: () => (WorkspaceSymbol),
+  integer: () => (integer),
+  uinteger: () => (uinteger)
+}, {
+  EOL: EOL
+});
+
+
+},
+
+});
+// The module cache
+var __webpack_module_cache__ = {};
+
+// The require function
+function __webpack_require__(moduleId) {
+
+// Check if module is in cache
+var cachedModule = __webpack_module_cache__[moduleId];
+if (cachedModule !== undefined) {
+return cachedModule.exports;
+}
+// Create a new module (and put it into the cache)
+var module = (__webpack_module_cache__[moduleId] = {
+exports: {}
+});
+// Execute the module function
+__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+
+// Return the exports of the module
+return module.exports;
+
+}
+
+// webpack/runtime/define_property_getters
+(() => {
+__webpack_require__.d = (exports, getters, values) => {
+	var define = (defs, kind) => {
+		for(var key in defs) {
+			if(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {
+				Object.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });
+			}
+		}
+	};
+	define(getters, "get");
+	define(values, "value");
+};
+})();
+// webpack/runtime/has_own_property
+(() => {
+__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
+})();
+// webpack/runtime/make_namespace_object
+(() => {
+// define __esModule on exports
+__webpack_require__.r = (exports) => {
+	if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
+		Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
+	}
+	Object.defineProperty(exports, '__esModule', { value: true });
+};
+})();
+var __webpack_exports__ = {};
+// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk.
+(() => {
+// ESM COMPAT FLAG
+__webpack_require__.r(__webpack_exports__);
+
+// EXPORTS
+__webpack_require__.d(__webpack_exports__, {
+  activate: () => (/* binding */ activate),
+  deactivate: () => (/* binding */ deactivate)
+});
+
+// EXTERNAL MODULE: external "vscode"
+var external_vscode_ = __webpack_require__("vscode");
+// EXTERNAL MODULE: ./node_modules/vscode-languageclient/lib/node/main.js
+var main = __webpack_require__("./node_modules/vscode-languageclient/lib/node/main.js");
+;// CONCATENATED MODULE: ./src/nativeDiagnostics.ts
+const MAX_NATIVE_DIAGNOSTICS_PER_DOCUMENT = 100;
+const MAX_NATIVE_DIAGNOSTIC_MESSAGE_BYTES = 512;
+const MAX_NATIVE_DIAGNOSTIC_DOCUMENTS_PER_EVENT = 32;
+const MAX_NATIVE_DIAGNOSTIC_METADATA_BYTES = 256;
+const SAFE_DIAGNOSTIC_DATA_FIELDS = [
+    "category",
+    "href",
+    "kind",
+    "ruleId",
+    "url"
+];
+const PACKAGED_TRACEDECAY_BINARY = "__TRACEDECAY_BIN__";
+function admitNativeWorkspace(trusted, roots) {
+    if (!trusted) {
+        return {
+            state: "unavailable",
+            reason: "workspace_untrusted",
+            expectedRootCount: 1,
+            actualRootCount: roots.length
+        };
+    }
+    if (roots.length !== 1) {
+        return {
+            state: "unavailable",
+            reason: "workspace_root_count",
+            expectedRootCount: 1,
+            actualRootCount: roots.length
+        };
+    }
+    return {
+        state: "supported",
+        root: roots[0]
+    };
+}
+function traceDecayInitializationOptions() {
+    return {
+        tracedecay: {
+            context: true,
+            mode: "cursor-native"
+        }
+    };
+}
+function toLspDiagnosticSeverity(vscodeSeverity) {
+    switch(vscodeSeverity){
+        case 0:
+            return 1;
+        case 1:
+            return 2;
+        case 2:
+            return 3;
+        case 3:
+            return 4;
+        default:
+            return undefined;
+    }
+}
+function resolveInstalledTraceDecayBinary(configuredBinary, environmentBinary, packagedBinary = PACKAGED_TRACEDECAY_BINARY) {
+    for (const candidate of [
+        configuredBinary,
+        environmentBinary,
+        packagedBinary.startsWith("__TRACEDECAY_") ? undefined : packagedBinary
+    ]){
+        const binary = candidate?.trim();
+        if (binary !== undefined && binary.length > 0) {
+            return binary;
+        }
+    }
+    return "tracedecay";
+}
+function limitAdmittedNativeDiagnosticDocuments(documents, isAdmitted) {
+    return documents.filter(isAdmitted).slice(0, MAX_NATIVE_DIAGNOSTIC_DOCUMENTS_PER_EVENT);
+}
+function createNativeDiagnosticsPayload(uri, version, diagnostics) {
+    return {
+        uri,
+        version: Number.isSafeInteger(version) ? version : 0,
+        diagnostics: diagnostics.slice(0, MAX_NATIVE_DIAGNOSTICS_PER_DOCUMENT).map((diagnostic)=>{
+            const code = diagnostic.code === undefined ? undefined : truncateUtf8(String(diagnostic.code), MAX_NATIVE_DIAGNOSTIC_METADATA_BYTES);
+            const message = truncateUtf8(diagnostic.message, MAX_NATIVE_DIAGNOSTIC_MESSAGE_BYTES) || "Cursor diagnostic";
+            return {
+                range: diagnostic.range,
+                ...diagnostic.severity === undefined ? {} : {
+                    severity: diagnostic.severity
+                },
+                ...code === undefined || code.length === 0 ? {} : {
+                    code
+                },
+                source: truncateUtf8(diagnostic.source || "cursor", MAX_NATIVE_DIAGNOSTIC_METADATA_BYTES),
+                message,
+                data: sanitizeDiagnosticData(diagnostic.data)
+            };
+        })
+    };
+}
+function sanitizeDiagnosticData(data) {
+    if (!isRecord(data)) {
+        return null;
+    }
+    const safe = {};
+    for (const field of SAFE_DIAGNOSTIC_DATA_FIELDS){
+        const value = data[field];
+        if (typeof value === "boolean") {
+            safe[field] = value;
+        } else if (typeof value === "number" && Number.isFinite(value)) {
+            safe[field] = value;
+        } else if (typeof value === "string") {
+            safe[field] = truncateUtf8(value, MAX_NATIVE_DIAGNOSTIC_METADATA_BYTES);
+        }
+    }
+    return Object.keys(safe).length === 0 ? null : safe;
+}
+function isRecord(value) {
+    return typeof value === "object" && value !== null && !Array.isArray(value);
+}
+function truncateUtf8(value, maximumBytes) {
+    if (Buffer.byteLength(value, "utf8") <= maximumBytes) {
+        return value;
+    }
+    let result = "";
+    let byteLength = 0;
+    for (const character of value){
+        const characterBytes = Buffer.byteLength(character, "utf8");
+        if (byteLength + characterBytes > maximumBytes) {
+            break;
+        }
+        result += character;
+        byteLength += characterBytes;
+    }
+    return result;
+}
+
+;// CONCATENATED MODULE: ./src/extension.ts
+
+
+
+const TRACEDECAY_NATIVE_DIAGNOSTICS_METHOD = "tracedecay/nativeDiagnostics";
+const TRACEDECAY_CONTEXT_PROJECTIONS = [
+    {
+        kind: "diagnostics",
+        revision: 1
+    },
+    {
+        kind: "postEditImpact",
+        revision: 1
+    },
+    {
+        kind: "affectedTests",
+        revision: 1
+    },
+    {
+        kind: "testRunResults",
+        revision: 1
+    }
+];
+let activeController;
+async function activate(context) {
+    if (!isCursorDesktop()) {
+        return;
+    }
+    const controller = new CursorNativeDiagnosticsController();
+    activeController = controller;
+    context.subscriptions.push(controller);
+    context.subscriptions.push(external_vscode_.workspace.onDidChangeWorkspaceFolders(()=>{
+        void controller.reconcile();
+    }));
+    context.subscriptions.push(external_vscode_.workspace.onDidGrantWorkspaceTrust(()=>{
+        void controller.reconcile();
+    }));
+    await controller.reconcile();
+}
+async function deactivate() {
+    await activeController?.stop();
+    activeController = undefined;
+}
+class CursorNativeDiagnosticsController {
+    disposed = false;
+    queue = Promise.resolve();
+    session;
+    reconcile() {
+        return this.enqueue(async ()=>{
+            await this.session?.stop();
+            this.session = undefined;
+            if (this.disposed) {
+                return;
+            }
+            const admission = admitNativeWorkspace(external_vscode_.workspace.isTrusted, external_vscode_.workspace.workspaceFolders ?? []);
+            if (admission.state === "unavailable") {
+                if (admission.reason === "workspace_root_count") {
+                    void external_vscode_.window.showWarningMessage("TraceDecay native diagnostics require exactly one workspace folder; multi-root workspaces are not supported yet.");
+                }
+                return;
+            }
+            try {
+                this.session = await CursorNativeDiagnosticsSession.start(admission.root);
+            } catch (error) {
+                void external_vscode_.window.showWarningMessage(`TraceDecay native diagnostics could not start: ${String(error)}`);
+            }
+        });
+    }
+    stop() {
+        this.disposed = true;
+        return this.enqueue(async ()=>{
+            await this.session?.stop();
+            this.session = undefined;
+        });
+    }
+    dispose() {
+        void this.stop();
+    }
+    enqueue(operation) {
+        this.queue = this.queue.catch(()=>undefined).then(operation);
+        return this.queue;
+    }
+}
+class CursorNativeDiagnosticsSession {
+    client;
+    workspaceFolder;
+    disposed = false;
+    diagnosticsSubscription;
+    documentSubscription;
+    stateSubscription;
+    constructor(client, workspaceFolder){
+        this.client = client;
+        this.workspaceFolder = workspaceFolder;
+        this.diagnosticsSubscription = external_vscode_.languages.onDidChangeDiagnostics((event)=>{
+            this.sendChangedDiagnostics(event.uris);
+        });
+        this.documentSubscription = external_vscode_.workspace.onDidOpenTextDocument((document)=>{
+            this.sendChangedDiagnostics([
+                document.uri
+            ]);
+        });
+        this.stateSubscription = client.onDidChangeState((event)=>{
+            if (event.newState === main.State.Running) {
+                this.sendCurrentDiagnostics();
+            }
+        });
+    }
+    static async start(workspaceFolder) {
+        const serverOptions = {
+            command: resolveTraceDecayBinary(),
+            args: [
+                "lsp",
+                "bridge",
+                "--stdio"
+            ],
+            options: {
+                cwd: workspaceFolder.uri.fsPath
+            }
+        };
+        const clientOptions = {
+            documentSelector: [
+                {
+                    scheme: "file",
+                    pattern: `${workspaceFolder.uri.fsPath.replaceAll("\\", "/")}/**`
+                }
+            ],
+            initializationOptions: traceDecayInitializationOptions,
+            workspaceFolder
+        };
+        const client = new TraceDecayLanguageClient("tracedecayCursorNative", "TraceDecay Cursor Native Diagnostics", serverOptions, clientOptions);
+        await client.start();
+        const session = new CursorNativeDiagnosticsSession(client, workspaceFolder);
+        session.sendCurrentDiagnostics();
+        return session;
+    }
+    async stop() {
+        await this.disposeAsync();
+    }
+    dispose() {
+        void this.disposeAsync();
+    }
+    async disposeAsync() {
+        if (this.disposed) {
+            return;
+        }
+        this.disposed = true;
+        this.diagnosticsSubscription.dispose();
+        this.documentSubscription.dispose();
+        this.stateSubscription.dispose();
+        await this.client.stop();
+    }
+    sendCurrentDiagnostics() {
+        const uris = external_vscode_.languages.getDiagnostics().map(([uri])=>uri);
+        this.sendChangedDiagnostics(uris);
+    }
+    sendChangedDiagnostics(uris) {
+        if (this.disposed) {
+            return;
+        }
+        for (const uri of limitAdmittedNativeDiagnosticDocuments(uris, (candidate)=>isAdmittedWorkspaceDocument(candidate, this.workspaceFolder))){
+            const document = external_vscode_.workspace.textDocuments.find((candidate)=>candidate.uri.toString() === uri.toString());
+            if (document === undefined) {
+                continue;
+            }
+            const payload = createNativeDiagnosticsPayload(uri.toString(), document.version, external_vscode_.languages.getDiagnostics(uri).map(toNativeDiagnosticInput));
+            void this.client.sendNotification(TRACEDECAY_NATIVE_DIAGNOSTICS_METHOD, payload).catch((error)=>{
+                this.client.warn(`TraceDecay native diagnostic notification was not delivered: ${String(error)}`);
+            });
+        }
+    }
+}
+class TraceDecayLanguageClient extends main.LanguageClient {
+    fillInitializeParams(params) {
+        super.fillInitializeParams(params);
+        const capabilities = params.capabilities;
+        capabilities.experimental = {
+            ...capabilities.experimental,
+            tracedecay: {
+                opaqueExpansion: true,
+                projections: TRACEDECAY_CONTEXT_PROJECTIONS,
+                revision: 1
+            }
+        };
+    }
+}
+function isCursorDesktop() {
+    return external_vscode_.env.appName.toLocaleLowerCase().includes("cursor");
+}
+function resolveTraceDecayBinary() {
+    const configured = external_vscode_.workspace.getConfiguration("tracedecay").get("binaryPath")?.trim();
+    return resolveInstalledTraceDecayBinary(configured, process.env.TRACEDECAY_BIN);
+}
+function isAdmittedWorkspaceDocument(uri, workspaceFolder) {
+    return uri.scheme === "file" && external_vscode_.workspace.getWorkspaceFolder(uri)?.uri.toString() === workspaceFolder.uri.toString();
+}
+function toNativeDiagnosticInput(diagnostic) {
+    const source = diagnostic.source?.trim();
+    const code = diagnostic.code;
+    const severity = toLspDiagnosticSeverity(diagnostic.severity);
+    return {
+        range: {
+            start: diagnostic.range.start,
+            end: diagnostic.range.end
+        },
+        ...severity === undefined ? {} : {
+            severity
+        },
+        ...code === undefined ? {} : {
+            code: diagnosticCode(code)
+        },
+        ...source === undefined || source.length === 0 ? {} : {
+            source
+        },
+        message: diagnostic.message,
+        data: diagnostic.tags?.length ? {
+            category: diagnostic.tags.join(",")
+        } : undefined
+    };
+}
+function diagnosticCode(code) {
+    return typeof code === "object" ? code.value : code;
+}
+
+})();
+
+exports.activate = __webpack_exports__.activate;
+exports.deactivate = __webpack_exports__.deactivate;
+for(var __rspack_i in __webpack_exports__) {
+  if(["activate","deactivate"].indexOf(__rspack_i) === -1) {
+    exports[__rspack_i] = __webpack_exports__[__rspack_i];
+  }
+}
+Object.defineProperty(exports, '__esModule', { value: true });
diff --git a/plugin/cursor-native-extension/package-lock.json b/plugin/cursor-native-extension/package-lock.json
new file mode 100644
index 0000000000..d1ab8aad98
--- /dev/null
+++ b/plugin/cursor-native-extension/package-lock.json
@@ -0,0 +1,1621 @@
+{
+  "name": "cursor-native",
+  "version": "0.0.0",
+  "lockfileVersion": 3,
+  "requires": true,
+  "packages": {
+    "": {
+      "name": "cursor-native",
+      "version": "0.0.0",
+      "dependencies": {
+        "vscode-languageclient": "^10.1.0"
+      },
+      "devDependencies": {
+        "@rslib/core": "^0.23.2",
+        "@types/node": "^26.1.1",
+        "@types/vscode": "^1.125.0",
+        "tsx": "^4.23.1",
+        "typescript": "^7.0.2"
+      },
+      "engines": {
+        "vscode": "^1.125.0"
+      }
+    },
+    "node_modules/@ast-grep/napi": {
+      "version": "0.37.0",
+      "resolved": "https://registry.npmjs.org/@ast-grep/napi/-/napi-0.37.0.tgz",
+      "integrity": "sha512-Hb4o6h1Pf6yRUAX07DR4JVY7dmQw+RVQMW5/m55GoiAT/VRoKCWBtIUPPOnqDVhbx1Cjfil9b6EDrgJsUAujEQ==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">= 10"
+      },
+      "optionalDependencies": {
+        "@ast-grep/napi-darwin-arm64": "0.37.0",
+        "@ast-grep/napi-darwin-x64": "0.37.0",
+        "@ast-grep/napi-linux-arm64-gnu": "0.37.0",
+        "@ast-grep/napi-linux-arm64-musl": "0.37.0",
+        "@ast-grep/napi-linux-x64-gnu": "0.37.0",
+        "@ast-grep/napi-linux-x64-musl": "0.37.0",
+        "@ast-grep/napi-win32-arm64-msvc": "0.37.0",
+        "@ast-grep/napi-win32-ia32-msvc": "0.37.0",
+        "@ast-grep/napi-win32-x64-msvc": "0.37.0"
+      }
+    },
+    "node_modules/@ast-grep/napi-darwin-arm64": {
+      "version": "0.37.0",
+      "resolved": "https://registry.npmjs.org/@ast-grep/napi-darwin-arm64/-/napi-darwin-arm64-0.37.0.tgz",
+      "integrity": "sha512-QAiIiaAbLvMEg/yBbyKn+p1gX2/FuaC0SMf7D7capm/oG4xGMzdeaQIcSosF4TCxxV+hIH4Bz9e4/u7w6Bnk3Q==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "darwin"
+      ],
+      "engines": {
+        "node": ">= 10"
+      }
+    },
+    "node_modules/@ast-grep/napi-darwin-x64": {
+      "version": "0.37.0",
+      "resolved": "https://registry.npmjs.org/@ast-grep/napi-darwin-x64/-/napi-darwin-x64-0.37.0.tgz",
+      "integrity": "sha512-zvcvdgekd4ySV3zUbUp8HF5nk5zqwiMXTuVzTUdl/w08O7JjM6XPOIVT+d2o/MqwM9rsXdzdergY5oY2RdhSPA==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "darwin"
+      ],
+      "engines": {
+        "node": ">= 10"
+      }
+    },
+    "node_modules/@ast-grep/napi-linux-arm64-gnu": {
+      "version": "0.37.0",
+      "resolved": "https://registry.npmjs.org/@ast-grep/napi-linux-arm64-gnu/-/napi-linux-arm64-gnu-0.37.0.tgz",
+      "integrity": "sha512-L7Sj0lXy8X+BqSMgr1LB8cCoWk0rericdeu+dC8/c8zpsav5Oo2IQKY1PmiZ7H8IHoFBbURLf8iklY9wsD+cyA==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">= 10"
+      }
+    },
+    "node_modules/@ast-grep/napi-linux-arm64-musl": {
+      "version": "0.37.0",
+      "resolved": "https://registry.npmjs.org/@ast-grep/napi-linux-arm64-musl/-/napi-linux-arm64-musl-0.37.0.tgz",
+      "integrity": "sha512-LF9sAvYy6es/OdyJDO3RwkX3I82Vkfsng1sqUBcoWC1jVb1wX5YVzHtpQox9JrEhGl+bNp7FYxB4Qba9OdA5GA==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">= 10"
+      }
+    },
+    "node_modules/@ast-grep/napi-linux-x64-gnu": {
+      "version": "0.37.0",
+      "resolved": "https://registry.npmjs.org/@ast-grep/napi-linux-x64-gnu/-/napi-linux-x64-gnu-0.37.0.tgz",
+      "integrity": "sha512-TViz5/klqre6aSmJzswEIjApnGjJzstG/SE8VDWsrftMBMYt2PTu3MeluZVwzSqDao8doT/P+6U11dU05UOgxw==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">= 10"
+      }
+    },
+    "node_modules/@ast-grep/napi-linux-x64-musl": {
+      "version": "0.37.0",
+      "resolved": "https://registry.npmjs.org/@ast-grep/napi-linux-x64-musl/-/napi-linux-x64-musl-0.37.0.tgz",
+      "integrity": "sha512-/BcCH33S9E3ovOAEoxYngUNXgb+JLg991sdyiNP2bSoYd30a9RHrG7CYwW6fMgua3ijQ474eV6cq9yZO1bCpXg==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">= 10"
+      }
+    },
+    "node_modules/@ast-grep/napi-win32-arm64-msvc": {
+      "version": "0.37.0",
+      "resolved": "https://registry.npmjs.org/@ast-grep/napi-win32-arm64-msvc/-/napi-win32-arm64-msvc-0.37.0.tgz",
+      "integrity": "sha512-TjQA4cFoIEW2bgjLkaL9yqT4XWuuLa5MCNd0VCDhGRDMNQ9+rhwi9eLOWRaap3xzT7g+nlbcEHL3AkVCD2+b3A==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "win32"
+      ],
+      "engines": {
+        "node": ">= 10"
+      }
+    },
+    "node_modules/@ast-grep/napi-win32-ia32-msvc": {
+      "version": "0.37.0",
+      "resolved": "https://registry.npmjs.org/@ast-grep/napi-win32-ia32-msvc/-/napi-win32-ia32-msvc-0.37.0.tgz",
+      "integrity": "sha512-uNmVka8fJCdYsyOlF9aZqQMLTatEYBynjChVTzUfFMDfmZ0bihs/YTqJVbkSm8TZM7CUX82apvn50z/dX5iWRA==",
+      "cpu": [
+        "ia32"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "win32"
+      ],
+      "engines": {
+        "node": ">= 10"
+      }
+    },
+    "node_modules/@ast-grep/napi-win32-x64-msvc": {
+      "version": "0.37.0",
+      "resolved": "https://registry.npmjs.org/@ast-grep/napi-win32-x64-msvc/-/napi-win32-x64-msvc-0.37.0.tgz",
+      "integrity": "sha512-vCiFOT3hSCQuHHfZ933GAwnPzmL0G04JxQEsBRfqONywyT8bSdDc/ECpAfr3S9VcS4JZ9/F6tkePKW/Om2Dq2g==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "win32"
+      ],
+      "engines": {
+        "node": ">= 10"
+      }
+    },
+    "node_modules/@emnapi/core": {
+      "version": "1.11.3",
+      "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.11.3.tgz",
+      "integrity": "sha512-zLpS5asjEb7lq8jYLq37N6XKaE41DIexlY1rF/z4/tIl3wo13Sqm28fRyfIsKZD+NZ8mM5RoKkpW/rBcuoSZSg==",
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "dependencies": {
+        "@emnapi/wasi-threads": "1.2.3",
+        "tslib": "^2.4.0"
+      }
+    },
+    "node_modules/@emnapi/runtime": {
+      "version": "1.11.3",
+      "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.3.tgz",
+      "integrity": "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA==",
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "dependencies": {
+        "tslib": "^2.4.0"
+      }
+    },
+    "node_modules/@emnapi/wasi-threads": {
+      "version": "1.2.3",
+      "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.3.tgz",
+      "integrity": "sha512-ELEBe8PsLvvJ6QMr0zLt8ffvOHW/dc1m3CEzNMg7aJUv3bMaoDtw2TXyDAwkYBuroxxuHEwhRTLJSe5sya547g==",
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "dependencies": {
+        "tslib": "^2.4.0"
+      }
+    },
+    "node_modules/@esbuild/aix-ppc64": {
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.1.tgz",
+      "integrity": "sha512-Svl7tq8k/08+p6CXPpRjQ1fKX+1odH/BQbb48fV6fj3CWHhsoIOoY87w1oHXm0qEpkIK3ZfVgp0hed3XBXzXMQ==",
+      "cpu": [
+        "ppc64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "aix"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/android-arm": {
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.1.tgz",
+      "integrity": "sha512-0k2F129Xdio1TdJfzJ8sy1Q47vUD2NnwdhiAf7drUN1EBTfPf4hsFCtmMgu/6m8JSzsBrlmVjudMBQqOfG8usQ==",
+      "cpu": [
+        "arm"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "android"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/android-arm64": {
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.1.tgz",
+      "integrity": "sha512-34EGEbCIAgosYz6goLcopX6Mo7NyGv9tfwEM2/7Ce2VcVRk568iSvniGWcUXIy7wEDR1wzolcxcriFVrWYcwBg==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "android"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/android-x64": {
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.1.tgz",
+      "integrity": "sha512-dbwY7ltSMDWsRatcRpCnES4F+im88OCUgGZjy52shC7GqHRE/cYlxNbB4Z4UpJswpcc4Qxd2oE/ufM0p61IKng==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "android"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/darwin-arm64": {
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.1.tgz",
+      "integrity": "sha512-TZbWkQY7kvTAXbXUT7uVACR5cMHsDiSz9z7ZKAX/RTq/WJEk3QyRr0wZpNhBDX+/0CtdqUIJlOiodQcta6tY3Q==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "darwin"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/darwin-x64": {
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.1.tgz",
+      "integrity": "sha512-zfdzgK9ACBNZLI/CyHTOx81SyNbM6YXn7rxSgX97VjyiPl9W1i4Ka4fgKECEoFCKGpvBj5qArWIGgQjOwkgskQ==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "darwin"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/freebsd-arm64": {
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.1.tgz",
+      "integrity": "sha512-wG2EA8ENdEI0qhkSZMjfqrdY+ziCYCPMmtZjjIwOmXFjmyzEHn+UUxk5of+SYsjtfs3VpnlC7QLzSI5hY/rOAw==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "freebsd"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/freebsd-x64": {
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.1.tgz",
+      "integrity": "sha512-i7dZ9vQgnvSCzi/rYCXNgtF/U+eKZNJBzu3eTQbRgHnM7tNSizLOkRFAl3qzVc/Op/u5YkHHa4pf/3DOYHthLQ==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "freebsd"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/linux-arm": {
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.1.tgz",
+      "integrity": "sha512-qVXBOHQS+d5Y722GwJzJUtOLlX7km3CraOaGormF1pDtPd2C/l1SHRPgjLunLGe51Sh5YYWKMFDyV4SxgMQYTQ==",
+      "cpu": [
+        "arm"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/linux-arm64": {
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.1.tgz",
+      "integrity": "sha512-yHs+0uc8+nvEAfAfxrWQKK5peSNzBc4PegcMO0EJ2hT71uA7vB8Ihg2e77R2P7SG5uYjPbHlLLmve4LLLRCf0g==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/linux-ia32": {
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.1.tgz",
+      "integrity": "sha512-d1z4ZuP0ajrfz/FhGT4vv278rX8KnPPJx8i5+AtK7TYbx9Le9F1hyzurZpkEyjkGa9dUGhQow4C1NmeGvqxN2w==",
+      "cpu": [
+        "ia32"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/linux-loong64": {
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.1.tgz",
+      "integrity": "sha512-M5sRjUVZrkm1OAPR3dlOYzNmN+loZKGVi1VUQGrwuqLcbR6qeAz+famMhjASeH3YVKvZz+zT1jlh/keC3Rj/lg==",
+      "cpu": [
+        "loong64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/linux-mips64el": {
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.1.tgz",
+      "integrity": "sha512-mRObBZeHh2OxcBFPWE/FjylkRgZdYuiTR3vaTozquCGOH14iP9oN4x4Ge81CoIDYQrXmIxpFumJBu5MtZpnQJQ==",
+      "cpu": [
+        "mips64el"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/linux-ppc64": {
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.1.tgz",
+      "integrity": "sha512-slScBsMAb3GFDcdrCgLwZtPYRoH2H/youv10QiZyRjmsP48fznoveWytSgCI/R0ZcUgpc0ZhIUEx6LHts8yrfQ==",
+      "cpu": [
+        "ppc64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/linux-riscv64": {
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.1.tgz",
+      "integrity": "sha512-kw0owk1o0GFETUJyW0jc0G4Yzs0BHZn0JDZ8JRT088vjJYX777BAs1fDGxAC+q831qOs2DTC96mNsG2opdfyyQ==",
+      "cpu": [
+        "riscv64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/linux-s390x": {
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.1.tgz",
+      "integrity": "sha512-/lAIjX8aYFRByhh6L5rYtPEDRqa9de/4V/juOXcta5frjvzXO4/sqEtyytse0g3zZFuWu5cDN0MkLz2qRDD2Ag==",
+      "cpu": [
+        "s390x"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/linux-x64": {
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.1.tgz",
+      "integrity": "sha512-u/anNYF2mmVOEDwLtnQ1wOr3EZ9sTNGLWrsYGYwHWzGA3Si84IOkHXlbWTD1NB+9/1lcnweYKO54uhxZydNzfA==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/netbsd-arm64": {
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.1.tgz",
+      "integrity": "sha512-oks0DYbLwWMmaakTsCb+zL4E+aHRVLom9IJZOAthMQEPiQmydXHkziYEsGYRx0uNV/IjEKGAV941JzH02pflqw==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "netbsd"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/netbsd-x64": {
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.1.tgz",
+      "integrity": "sha512-aeL6lAnN89Hz43Mlh1G8ARasbuoYvSITDEx0tHh5b7jJnHcssqgjy9Yx430GDpmCa6OyrKoS0aNRjKundRizGg==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "netbsd"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/openbsd-arm64": {
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.1.tgz",
+      "integrity": "sha512-MEFJe5C3R8pwXdZ5Y21oo6m7ePiS0d9pWucn99O/wvyJZChoIQKrQDxKrGeW8F5+T0okTHesAmDeiHDTIq0V/Q==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "openbsd"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/openbsd-x64": {
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.1.tgz",
+      "integrity": "sha512-i/ZLIOafE0Z8cI/XANJAixoJL/uRAoS2xOA3rb0xN+KK0K177cMAsQYkzHtBrtMXAKuAc7HGgcWiZ/sRC1Nxgw==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "openbsd"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/openharmony-arm64": {
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.1.tgz",
+      "integrity": "sha512-ge+Z7EXFNt2BO1oAMsVpiQ8EwndV9i1xXerAeTIK7AtPs3bKFXQM7nlRxDSIUIMeueR1CNXxqztLzdNeReKBJg==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "openharmony"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/sunos-x64": {
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.1.tgz",
+      "integrity": "sha512-BEjgtECkL3vY+SaSQ6nzVfiALUeFxpawyp8Jmf5PtYhf1Ug40N1h/hxlhts+f1FvSvarEigdxS3BlSMI2PJLcQ==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "sunos"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/win32-arm64": {
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.1.tgz",
+      "integrity": "sha512-lCv9eK/H6ZJWbE7bh2nw54CZ9M2nupBxJcTsdk/QQnWkdSjKGuxmmH8/GWrlT1eMmZfn4dGcCjRte397WqfQXA==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "win32"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/win32-ia32": {
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.1.tgz",
+      "integrity": "sha512-zvb/mB2bSCoJOpoCBgYKKpX6YM6mJBlBUVUtVj41DlZJVEB6/0CKlRYxP5wWl1C1ILiCoAU5wZZ4q1P3qeS6Eg==",
+      "cpu": [
+        "ia32"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "win32"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/win32-x64": {
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.1.tgz",
+      "integrity": "sha512-bm4Mowrv+GXMlpWX++EcXw/iLyd1o3+bJkC2DkWXYVvgZCqD/bSj9ctZeAMC3cIxgjRVR2Dufaiu4YPxr5gW1A==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "win32"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@napi-rs/wasm-runtime": {
+      "version": "1.1.6",
+      "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.6.tgz",
+      "integrity": "sha512-ZLv/JdUfkvOy9eCnnBaGfiO+XimbjebAeO+MRQqD/B+FR1tnRN0tpKSJHRbE8sFfS6aqsXZ67TQjfwfsxULVbg==",
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "dependencies": {
+        "@tybys/wasm-util": "^0.10.3"
+      },
+      "funding": {
+        "type": "github",
+        "url": "https://github.com/sponsors/Brooooooklyn"
+      },
+      "peerDependencies": {
+        "@emnapi/core": "^1.7.1",
+        "@emnapi/runtime": "^1.7.1"
+      }
+    },
+    "node_modules/@rsbuild/core": {
+      "version": "2.1.13",
+      "resolved": "https://registry.npmjs.org/@rsbuild/core/-/core-2.1.13.tgz",
+      "integrity": "sha512-Z+6MzmjOio4+bFZQ24k+7ge/oNCOdXIunAssrswTNE8AIf6mcyXpJZevRXRiOEMZasRPA8VNyh+9JngQLg729Q==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "@rspack/core": "~2.1.10",
+        "@swc/helpers": "^0.5.23"
+      },
+      "bin": {
+        "rsbuild": "bin/rsbuild.js"
+      },
+      "engines": {
+        "node": "^20.19.0 || >=22.12.0"
+      },
+      "peerDependencies": {
+        "core-js": ">= 3.0.0"
+      },
+      "peerDependenciesMeta": {
+        "core-js": {
+          "optional": true
+        }
+      }
+    },
+    "node_modules/@rslib/core": {
+      "version": "0.23.2",
+      "resolved": "https://registry.npmjs.org/@rslib/core/-/core-0.23.2.tgz",
+      "integrity": "sha512-KxSp+/y0BJ1O4oKwxX4ydBY7/ZVeJCUpWAmQniCIct8mTxIQFPGO/ibKbKq2IxZYqRuRpM8g+Dtyq0VbEQf9HQ==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "@rsbuild/core": "~2.1.4",
+        "rsbuild-plugin-dts": "0.23.2"
+      },
+      "bin": {
+        "rslib": "bin/rslib.js"
+      },
+      "engines": {
+        "node": "^20.19.0 || >=22.12.0"
+      },
+      "peerDependencies": {
+        "@microsoft/api-extractor": "^7",
+        "typescript": "^5 || ^6 || ^7.0.1-0"
+      },
+      "peerDependenciesMeta": {
+        "@microsoft/api-extractor": {
+          "optional": true
+        },
+        "typescript": {
+          "optional": true
+        }
+      }
+    },
+    "node_modules/@rspack/binding": {
+      "version": "2.1.10",
+      "resolved": "https://registry.npmjs.org/@rspack/binding/-/binding-2.1.10.tgz",
+      "integrity": "sha512-vnu/UP5HnrND15lO9+VeG6eUrbTyycHNQNQ3XEiRiFojuoiGZkIZC3Hbzr8qQH44C6vScPODEPvvIVvLcO2LpQ==",
+      "dev": true,
+      "license": "MIT",
+      "optionalDependencies": {
+        "@rspack/binding-darwin-arm64": "2.1.10",
+        "@rspack/binding-darwin-x64": "2.1.10",
+        "@rspack/binding-linux-arm64-gnu": "2.1.10",
+        "@rspack/binding-linux-arm64-musl": "2.1.10",
+        "@rspack/binding-linux-ppc64-gnu": "2.1.10",
+        "@rspack/binding-linux-riscv64-gnu": "2.1.10",
+        "@rspack/binding-linux-riscv64-musl": "2.1.10",
+        "@rspack/binding-linux-s390x-gnu": "2.1.10",
+        "@rspack/binding-linux-x64-gnu": "2.1.10",
+        "@rspack/binding-linux-x64-musl": "2.1.10",
+        "@rspack/binding-wasm32-wasi": "2.1.10",
+        "@rspack/binding-win32-arm64-msvc": "2.1.10",
+        "@rspack/binding-win32-ia32-msvc": "2.1.10",
+        "@rspack/binding-win32-x64-msvc": "2.1.10"
+      }
+    },
+    "node_modules/@rspack/binding-darwin-arm64": {
+      "version": "2.1.10",
+      "resolved": "https://registry.npmjs.org/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-2.1.10.tgz",
+      "integrity": "sha512-DZlcTpbIb2mjeS1aSG4k01UH33Zj7T+k8ZylPK6HmsKs4JvK4wgpWFC78WVv3p/Aj3MZS6DwtDLwpZ2Ihj/fpg==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "darwin"
+      ]
+    },
+    "node_modules/@rspack/binding-darwin-x64": {
+      "version": "2.1.10",
+      "resolved": "https://registry.npmjs.org/@rspack/binding-darwin-x64/-/binding-darwin-x64-2.1.10.tgz",
+      "integrity": "sha512-my/0h2LwxCRT6cg3oDDC2e0ZOxQLVajAdIcv0fqnQk5JRNvVuL89PuTutitnSqie1A0/JSL8OQz5XHwmoS3kow==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "darwin"
+      ]
+    },
+    "node_modules/@rspack/binding-linux-arm64-gnu": {
+      "version": "2.1.10",
+      "resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-2.1.10.tgz",
+      "integrity": "sha512-laevn9g+E5PAUEGqiKe6Ju5KApsuQYp+bPI17XS3Lkl8eqL5pS/BmHYU7QMlst4GzV8+wlruVTMh//+st6Vqzg==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ]
+    },
+    "node_modules/@rspack/binding-linux-arm64-musl": {
+      "version": "2.1.10",
+      "resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-2.1.10.tgz",
+      "integrity": "sha512-V71+Qz5G72+ROZXrJn5zxOszdG1AEbO8pcC/itXXtf4yRR6a3bVHKNKGhipBNxb8eI6cnD/01FH1h3ZG655jLw==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ]
+    },
+    "node_modules/@rspack/binding-linux-ppc64-gnu": {
+      "version": "2.1.10",
+      "resolved": "https://registry.npmjs.org/@rspack/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-2.1.10.tgz",
+      "integrity": "sha512-U7HlNzHcDtZ+LYOtOJmtx67kHEybZzUUAaP7aEXjGYO5WTCgh/176sW2UYP0rmZLrgUNFUuzn+B98RLaClNaVg==",
+      "cpu": [
+        "ppc64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ]
+    },
+    "node_modules/@rspack/binding-linux-riscv64-gnu": {
+      "version": "2.1.10",
+      "resolved": "https://registry.npmjs.org/@rspack/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-2.1.10.tgz",
+      "integrity": "sha512-GMGTJpy9/ecE+5F5IfxZH4bXv0Wx/b2TiehTlCbTksbL+pKpLHYy0rwGdjWDKbmBkhxMMqPiC7PDnn9LbdnnLA==",
+      "cpu": [
+        "riscv64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ]
+    },
+    "node_modules/@rspack/binding-linux-riscv64-musl": {
+      "version": "2.1.10",
+      "resolved": "https://registry.npmjs.org/@rspack/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-2.1.10.tgz",
+      "integrity": "sha512-rkurnAWc04vIbzG1QCrPBWSJadZvaOt1mazFH3EdiJO8VUiu0I1T9zdiwuDOPrd50lOKIZlcTXbd5aaAkWEnvQ==",
+      "cpu": [
+        "riscv64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ]
+    },
+    "node_modules/@rspack/binding-linux-s390x-gnu": {
+      "version": "2.1.10",
+      "resolved": "https://registry.npmjs.org/@rspack/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-2.1.10.tgz",
+      "integrity": "sha512-X+DyxkriZEAF/wihI7ERDv+CAS0mbMv36aEuQ+vXzTlvS6cSmpou/r29AHbvIF3NlG1UeAbDVlOs9QrMBZjpUQ==",
+      "cpu": [
+        "s390x"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ]
+    },
+    "node_modules/@rspack/binding-linux-x64-gnu": {
+      "version": "2.1.10",
+      "resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-2.1.10.tgz",
+      "integrity": "sha512-Fat09V6jUuyo9qG7Wyj9cQ31VDfLmokXyBtGqKxY5OvSWHereB7QUub5btbPXHwbp6Iq4aAQyUbbLTzvR1YaBw==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ]
+    },
+    "node_modules/@rspack/binding-linux-x64-musl": {
+      "version": "2.1.10",
+      "resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-2.1.10.tgz",
+      "integrity": "sha512-lhHOnIJ4ClpIlA1f1L8aoxEZivYLjnjq5A6jKKz7BKsm+cHK8kqqEm6lO5KqA5xQT0Lonq1o28bmKHEj6JHInw==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ]
+    },
+    "node_modules/@rspack/binding-wasm32-wasi": {
+      "version": "2.1.10",
+      "resolved": "https://registry.npmjs.org/@rspack/binding-wasm32-wasi/-/binding-wasm32-wasi-2.1.10.tgz",
+      "integrity": "sha512-KY5YbWbuvYcoaLXnV+vzZOvGRCeb6jt4EpVpKdph1h1IJjwX/ju15EQ+GOe3iecZEdf0OttQcNVcwBkLkFT9ag==",
+      "cpu": [
+        "wasm32"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "dependencies": {
+        "@emnapi/core": "1.11.3",
+        "@emnapi/runtime": "1.11.3",
+        "@napi-rs/wasm-runtime": "1.1.6"
+      }
+    },
+    "node_modules/@rspack/binding-win32-arm64-msvc": {
+      "version": "2.1.10",
+      "resolved": "https://registry.npmjs.org/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-2.1.10.tgz",
+      "integrity": "sha512-z4GWzMLofaDGpAt9Z+MlN88LlUBDm+zM6R2GdOOPM6/4g/h3/+47OP7casmSL3AwTGYBEJqogwt08sRSosB6Cg==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "win32"
+      ]
+    },
+    "node_modules/@rspack/binding-win32-ia32-msvc": {
+      "version": "2.1.10",
+      "resolved": "https://registry.npmjs.org/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-2.1.10.tgz",
+      "integrity": "sha512-7qcWdsZ+GuGtzKjqgy7wTN7Dso/ezIY8yhx1r2yIbcczdmXj4FhaEampMDp/25HwtKwIGBBoh6HHSt3JWxpTUg==",
+      "cpu": [
+        "ia32"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "win32"
+      ]
+    },
+    "node_modules/@rspack/binding-win32-x64-msvc": {
+      "version": "2.1.10",
+      "resolved": "https://registry.npmjs.org/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-2.1.10.tgz",
+      "integrity": "sha512-pgp23pLrzfhGnKycxzr7ifP17lAbWZEfnx1bX8gXtYrnpJ66DRNyTKSzxB6sa/HBWjS1L8PX5TjMZ44WfPydqQ==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "win32"
+      ]
+    },
+    "node_modules/@rspack/core": {
+      "version": "2.1.10",
+      "resolved": "https://registry.npmjs.org/@rspack/core/-/core-2.1.10.tgz",
+      "integrity": "sha512-YSS2/Xxz8uiG/KXDkqOoA3dTetNo/vysk7bAexQOrU8iuq7JuzDTTAwLKvWZnwmvME8M8m5wcM4YvfIwYmidHA==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "@rspack/binding": "2.1.10"
+      },
+      "engines": {
+        "node": "^20.19.0 || >=22.12.0"
+      },
+      "peerDependencies": {
+        "@module-federation/runtime-tools": "^0.24.1 || ^2.0.0",
+        "@swc/helpers": "^0.5.23"
+      },
+      "peerDependenciesMeta": {
+        "@module-federation/runtime-tools": {
+          "optional": true
+        },
+        "@swc/helpers": {
+          "optional": true
+        }
+      }
+    },
+    "node_modules/@swc/helpers": {
+      "version": "0.5.23",
+      "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.23.tgz",
+      "integrity": "sha512-5lSsMOTXURePglDfvuAQUqkGek9Hg2kksOYay2m0+XR++b2NWYL/4sWyuvVBIs8oKnJaxkdi9whaL/sqN13afw==",
+      "dev": true,
+      "license": "Apache-2.0",
+      "dependencies": {
+        "tslib": "^2.8.0"
+      }
+    },
+    "node_modules/@tybys/wasm-util": {
+      "version": "0.10.3",
+      "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.3.tgz",
+      "integrity": "sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==",
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "dependencies": {
+        "tslib": "^2.4.0"
+      }
+    },
+    "node_modules/@types/node": {
+      "version": "26.1.1",
+      "resolved": "https://registry.npmjs.org/@types/node/-/node-26.1.1.tgz",
+      "integrity": "sha512-nxAkRSVkN1Y0JC1W8ky/fTfkGsMmcrRsbx+3XoZE+rMOX71kLYTV7fLXpqud1GpbpP5TuffXFqfX7fH2GgZREw==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "undici-types": "~8.3.0"
+      }
+    },
+    "node_modules/@types/vscode": {
+      "version": "1.125.0",
+      "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.125.0.tgz",
+      "integrity": "sha512-0icm/ZQAaism87P0ekHqi4/Ju9du+Tm0RUW+y7vqRsxY2cY0FNRX1nAnaW7nT6npPt2tfHiheZ55Zm9UhqonFA==",
+      "dev": true,
+      "license": "MIT"
+    },
+    "node_modules/@typescript/typescript-aix-ppc64": {
+      "version": "7.0.2",
+      "resolved": "https://registry.npmjs.org/@typescript/typescript-aix-ppc64/-/typescript-aix-ppc64-7.0.2.tgz",
+      "integrity": "sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==",
+      "cpu": [
+        "ppc64"
+      ],
+      "dev": true,
+      "license": "Apache-2.0",
+      "optional": true,
+      "os": [
+        "aix"
+      ],
+      "engines": {
+        "node": ">=16.20.0"
+      }
+    },
+    "node_modules/@typescript/typescript-darwin-arm64": {
+      "version": "7.0.2",
+      "resolved": "https://registry.npmjs.org/@typescript/typescript-darwin-arm64/-/typescript-darwin-arm64-7.0.2.tgz",
+      "integrity": "sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "license": "Apache-2.0",
+      "optional": true,
+      "os": [
+        "darwin"
+      ],
+      "engines": {
+        "node": ">=16.20.0"
+      }
+    },
+    "node_modules/@typescript/typescript-darwin-x64": {
+      "version": "7.0.2",
+      "resolved": "https://registry.npmjs.org/@typescript/typescript-darwin-x64/-/typescript-darwin-x64-7.0.2.tgz",
+      "integrity": "sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "license": "Apache-2.0",
+      "optional": true,
+      "os": [
+        "darwin"
+      ],
+      "engines": {
+        "node": ">=16.20.0"
+      }
+    },
+    "node_modules/@typescript/typescript-freebsd-arm64": {
+      "version": "7.0.2",
+      "resolved": "https://registry.npmjs.org/@typescript/typescript-freebsd-arm64/-/typescript-freebsd-arm64-7.0.2.tgz",
+      "integrity": "sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "license": "Apache-2.0",
+      "optional": true,
+      "os": [
+        "freebsd"
+      ],
+      "engines": {
+        "node": ">=16.20.0"
+      }
+    },
+    "node_modules/@typescript/typescript-freebsd-x64": {
+      "version": "7.0.2",
+      "resolved": "https://registry.npmjs.org/@typescript/typescript-freebsd-x64/-/typescript-freebsd-x64-7.0.2.tgz",
+      "integrity": "sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "license": "Apache-2.0",
+      "optional": true,
+      "os": [
+        "freebsd"
+      ],
+      "engines": {
+        "node": ">=16.20.0"
+      }
+    },
+    "node_modules/@typescript/typescript-linux-arm": {
+      "version": "7.0.2",
+      "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-arm/-/typescript-linux-arm-7.0.2.tgz",
+      "integrity": "sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==",
+      "cpu": [
+        "arm"
+      ],
+      "dev": true,
+      "license": "Apache-2.0",
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">=16.20.0"
+      }
+    },
+    "node_modules/@typescript/typescript-linux-arm64": {
+      "version": "7.0.2",
+      "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-arm64/-/typescript-linux-arm64-7.0.2.tgz",
+      "integrity": "sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "license": "Apache-2.0",
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">=16.20.0"
+      }
+    },
+    "node_modules/@typescript/typescript-linux-loong64": {
+      "version": "7.0.2",
+      "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-loong64/-/typescript-linux-loong64-7.0.2.tgz",
+      "integrity": "sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==",
+      "cpu": [
+        "loong64"
+      ],
+      "dev": true,
+      "license": "Apache-2.0",
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">=16.20.0"
+      }
+    },
+    "node_modules/@typescript/typescript-linux-mips64el": {
+      "version": "7.0.2",
+      "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-mips64el/-/typescript-linux-mips64el-7.0.2.tgz",
+      "integrity": "sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==",
+      "cpu": [
+        "mips64el"
+      ],
+      "dev": true,
+      "license": "Apache-2.0",
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">=16.20.0"
+      }
+    },
+    "node_modules/@typescript/typescript-linux-ppc64": {
+      "version": "7.0.2",
+      "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-ppc64/-/typescript-linux-ppc64-7.0.2.tgz",
+      "integrity": "sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==",
+      "cpu": [
+        "ppc64"
+      ],
+      "dev": true,
+      "license": "Apache-2.0",
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">=16.20.0"
+      }
+    },
+    "node_modules/@typescript/typescript-linux-riscv64": {
+      "version": "7.0.2",
+      "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-riscv64/-/typescript-linux-riscv64-7.0.2.tgz",
+      "integrity": "sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==",
+      "cpu": [
+        "riscv64"
+      ],
+      "dev": true,
+      "license": "Apache-2.0",
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">=16.20.0"
+      }
+    },
+    "node_modules/@typescript/typescript-linux-s390x": {
+      "version": "7.0.2",
+      "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-s390x/-/typescript-linux-s390x-7.0.2.tgz",
+      "integrity": "sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==",
+      "cpu": [
+        "s390x"
+      ],
+      "dev": true,
+      "license": "Apache-2.0",
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">=16.20.0"
+      }
+    },
+    "node_modules/@typescript/typescript-linux-x64": {
+      "version": "7.0.2",
+      "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-x64/-/typescript-linux-x64-7.0.2.tgz",
+      "integrity": "sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "license": "Apache-2.0",
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">=16.20.0"
+      }
+    },
+    "node_modules/@typescript/typescript-netbsd-arm64": {
+      "version": "7.0.2",
+      "resolved": "https://registry.npmjs.org/@typescript/typescript-netbsd-arm64/-/typescript-netbsd-arm64-7.0.2.tgz",
+      "integrity": "sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "license": "Apache-2.0",
+      "optional": true,
+      "os": [
+        "netbsd"
+      ],
+      "engines": {
+        "node": ">=16.20.0"
+      }
+    },
+    "node_modules/@typescript/typescript-netbsd-x64": {
+      "version": "7.0.2",
+      "resolved": "https://registry.npmjs.org/@typescript/typescript-netbsd-x64/-/typescript-netbsd-x64-7.0.2.tgz",
+      "integrity": "sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "license": "Apache-2.0",
+      "optional": true,
+      "os": [
+        "netbsd"
+      ],
+      "engines": {
+        "node": ">=16.20.0"
+      }
+    },
+    "node_modules/@typescript/typescript-openbsd-arm64": {
+      "version": "7.0.2",
+      "resolved": "https://registry.npmjs.org/@typescript/typescript-openbsd-arm64/-/typescript-openbsd-arm64-7.0.2.tgz",
+      "integrity": "sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "license": "Apache-2.0",
+      "optional": true,
+      "os": [
+        "openbsd"
+      ],
+      "engines": {
+        "node": ">=16.20.0"
+      }
+    },
+    "node_modules/@typescript/typescript-openbsd-x64": {
+      "version": "7.0.2",
+      "resolved": "https://registry.npmjs.org/@typescript/typescript-openbsd-x64/-/typescript-openbsd-x64-7.0.2.tgz",
+      "integrity": "sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "license": "Apache-2.0",
+      "optional": true,
+      "os": [
+        "openbsd"
+      ],
+      "engines": {
+        "node": ">=16.20.0"
+      }
+    },
+    "node_modules/@typescript/typescript-sunos-x64": {
+      "version": "7.0.2",
+      "resolved": "https://registry.npmjs.org/@typescript/typescript-sunos-x64/-/typescript-sunos-x64-7.0.2.tgz",
+      "integrity": "sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "license": "Apache-2.0",
+      "optional": true,
+      "os": [
+        "sunos"
+      ],
+      "engines": {
+        "node": ">=16.20.0"
+      }
+    },
+    "node_modules/@typescript/typescript-win32-arm64": {
+      "version": "7.0.2",
+      "resolved": "https://registry.npmjs.org/@typescript/typescript-win32-arm64/-/typescript-win32-arm64-7.0.2.tgz",
+      "integrity": "sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "license": "Apache-2.0",
+      "optional": true,
+      "os": [
+        "win32"
+      ],
+      "engines": {
+        "node": ">=16.20.0"
+      }
+    },
+    "node_modules/@typescript/typescript-win32-x64": {
+      "version": "7.0.2",
+      "resolved": "https://registry.npmjs.org/@typescript/typescript-win32-x64/-/typescript-win32-x64-7.0.2.tgz",
+      "integrity": "sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "license": "Apache-2.0",
+      "optional": true,
+      "os": [
+        "win32"
+      ],
+      "engines": {
+        "node": ">=16.20.0"
+      }
+    },
+    "node_modules/balanced-match": {
+      "version": "4.0.4",
+      "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
+      "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",
+      "license": "MIT",
+      "engines": {
+        "node": "18 || 20 || >=22"
+      }
+    },
+    "node_modules/brace-expansion": {
+      "version": "5.0.9",
+      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz",
+      "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==",
+      "license": "MIT",
+      "dependencies": {
+        "balanced-match": "^4.0.2"
+      },
+      "engines": {
+        "node": "20 || >=22"
+      }
+    },
+    "node_modules/esbuild": {
+      "version": "0.28.1",
+      "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.1.tgz",
+      "integrity": "sha512-HrJrvZv5ayxBzPfwphOoNzkzOIIlifzk0KJrGK2c8R4+LKpMtpYLQeUdjnwjWv/LZlkH2laZk+4w78pi99D4Vw==",
+      "dev": true,
+      "hasInstallScript": true,
+      "license": "MIT",
+      "bin": {
+        "esbuild": "bin/esbuild"
+      },
+      "engines": {
+        "node": ">=18"
+      },
+      "optionalDependencies": {
+        "@esbuild/aix-ppc64": "0.28.1",
+        "@esbuild/android-arm": "0.28.1",
+        "@esbuild/android-arm64": "0.28.1",
+        "@esbuild/android-x64": "0.28.1",
+        "@esbuild/darwin-arm64": "0.28.1",
+        "@esbuild/darwin-x64": "0.28.1",
+        "@esbuild/freebsd-arm64": "0.28.1",
+        "@esbuild/freebsd-x64": "0.28.1",
+        "@esbuild/linux-arm": "0.28.1",
+        "@esbuild/linux-arm64": "0.28.1",
+        "@esbuild/linux-ia32": "0.28.1",
+        "@esbuild/linux-loong64": "0.28.1",
+        "@esbuild/linux-mips64el": "0.28.1",
+        "@esbuild/linux-ppc64": "0.28.1",
+        "@esbuild/linux-riscv64": "0.28.1",
+        "@esbuild/linux-s390x": "0.28.1",
+        "@esbuild/linux-x64": "0.28.1",
+        "@esbuild/netbsd-arm64": "0.28.1",
+        "@esbuild/netbsd-x64": "0.28.1",
+        "@esbuild/openbsd-arm64": "0.28.1",
+        "@esbuild/openbsd-x64": "0.28.1",
+        "@esbuild/openharmony-arm64": "0.28.1",
+        "@esbuild/sunos-x64": "0.28.1",
+        "@esbuild/win32-arm64": "0.28.1",
+        "@esbuild/win32-ia32": "0.28.1",
+        "@esbuild/win32-x64": "0.28.1"
+      }
+    },
+    "node_modules/fsevents": {
+      "version": "2.3.3",
+      "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
+      "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
+      "dev": true,
+      "hasInstallScript": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "darwin"
+      ],
+      "engines": {
+        "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+      }
+    },
+    "node_modules/minimatch": {
+      "version": "10.2.5",
+      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz",
+      "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==",
+      "license": "BlueOak-1.0.0",
+      "dependencies": {
+        "brace-expansion": "^5.0.5"
+      },
+      "engines": {
+        "node": "18 || 20 || >=22"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/isaacs"
+      }
+    },
+    "node_modules/rsbuild-plugin-dts": {
+      "version": "0.23.2",
+      "resolved": "https://registry.npmjs.org/rsbuild-plugin-dts/-/rsbuild-plugin-dts-0.23.2.tgz",
+      "integrity": "sha512-Ve8WOSPyTBjxH40O/6fChJtflL7yqcUtt5zbF0eHDM4hIt35jqLocRlSdCxFJdQm0blTjl6+hkmPa/vNI06ArA==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "@ast-grep/napi": "0.37.0"
+      },
+      "engines": {
+        "node": "^20.19.0 || >=22.12.0"
+      },
+      "peerDependencies": {
+        "@microsoft/api-extractor": "^7",
+        "@rsbuild/core": "^1.0.0 || ^2.0.0-0",
+        "@typescript/native-preview": "^7.0.0-0",
+        "typescript": "^5 || ^6 || ^7.0.1-0"
+      },
+      "peerDependenciesMeta": {
+        "@microsoft/api-extractor": {
+          "optional": true
+        },
+        "@typescript/native-preview": {
+          "optional": true
+        },
+        "typescript": {
+          "optional": true
+        }
+      }
+    },
+    "node_modules/semver": {
+      "version": "7.8.5",
+      "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz",
+      "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==",
+      "license": "ISC",
+      "bin": {
+        "semver": "bin/semver.js"
+      },
+      "engines": {
+        "node": ">=10"
+      }
+    },
+    "node_modules/tslib": {
+      "version": "2.8.1",
+      "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
+      "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
+      "dev": true,
+      "license": "0BSD"
+    },
+    "node_modules/tsx": {
+      "version": "4.23.1",
+      "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.23.1.tgz",
+      "integrity": "sha512-GQHnkIfxyx1wYCOS/wonik5MVRZU9hi1TEZmzGZSCJB1y9YgoZ8H6itNE/u4suE+yLmOzuE4E5S4TZ/ZX2wcWQ==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "esbuild": "~0.28.0"
+      },
+      "bin": {
+        "tsx": "dist/cli.mjs"
+      },
+      "engines": {
+        "node": ">=18.0.0"
+      },
+      "optionalDependencies": {
+        "fsevents": "~2.3.3"
+      }
+    },
+    "node_modules/typescript": {
+      "version": "7.0.2",
+      "resolved": "https://registry.npmjs.org/typescript/-/typescript-7.0.2.tgz",
+      "integrity": "sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==",
+      "dev": true,
+      "license": "Apache-2.0",
+      "bin": {
+        "tsc": "bin/tsc"
+      },
+      "engines": {
+        "node": ">=16.20.0"
+      },
+      "optionalDependencies": {
+        "@typescript/typescript-aix-ppc64": "7.0.2",
+        "@typescript/typescript-darwin-arm64": "7.0.2",
+        "@typescript/typescript-darwin-x64": "7.0.2",
+        "@typescript/typescript-freebsd-arm64": "7.0.2",
+        "@typescript/typescript-freebsd-x64": "7.0.2",
+        "@typescript/typescript-linux-arm": "7.0.2",
+        "@typescript/typescript-linux-arm64": "7.0.2",
+        "@typescript/typescript-linux-loong64": "7.0.2",
+        "@typescript/typescript-linux-mips64el": "7.0.2",
+        "@typescript/typescript-linux-ppc64": "7.0.2",
+        "@typescript/typescript-linux-riscv64": "7.0.2",
+        "@typescript/typescript-linux-s390x": "7.0.2",
+        "@typescript/typescript-linux-x64": "7.0.2",
+        "@typescript/typescript-netbsd-arm64": "7.0.2",
+        "@typescript/typescript-netbsd-x64": "7.0.2",
+        "@typescript/typescript-openbsd-arm64": "7.0.2",
+        "@typescript/typescript-openbsd-x64": "7.0.2",
+        "@typescript/typescript-sunos-x64": "7.0.2",
+        "@typescript/typescript-win32-arm64": "7.0.2",
+        "@typescript/typescript-win32-x64": "7.0.2"
+      }
+    },
+    "node_modules/undici-types": {
+      "version": "8.3.0",
+      "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.3.0.tgz",
+      "integrity": "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==",
+      "dev": true,
+      "license": "MIT"
+    },
+    "node_modules/vscode-jsonrpc": {
+      "version": "9.0.1",
+      "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-9.0.1.tgz",
+      "integrity": "sha512-rfuA6T75H6m5EkbhtEPzre9pT0HPcDI2MMy4+nPFIBks5J8JBAUHD4tRYSgaBOijIEC7SRkC1kKyXTLqbmh9jw==",
+      "license": "MIT",
+      "engines": {
+        "node": ">=14.0.0"
+      }
+    },
+    "node_modules/vscode-languageclient": {
+      "version": "10.1.0",
+      "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-10.1.0.tgz",
+      "integrity": "sha512-XXRx6lqVitQy/oOLr9MfNYRG+MbQkhXkDaxbQMiKxEm8zZNfheRFUKNb8UYNh2stn9btl2wQM5wZFJjJvoc+jA==",
+      "license": "MIT",
+      "dependencies": {
+        "minimatch": "^10.2.5",
+        "semver": "^7.8.1",
+        "vscode-languageserver-protocol": "3.18.2",
+        "vscode-languageserver-textdocument": "1.0.13"
+      },
+      "engines": {
+        "vscode": "^1.91.0"
+      }
+    },
+    "node_modules/vscode-languageserver-protocol": {
+      "version": "3.18.2",
+      "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.18.2.tgz",
+      "integrity": "sha512-XRyDbT0Pp3sSNti3JmxVEUMySWCSi1hhM+/KUlCy1hV1zmrqpM1OwO12EAki8blhmLuIMpaJrYbo0OzGVfK2Qg==",
+      "license": "MIT",
+      "dependencies": {
+        "vscode-jsonrpc": "9.0.1",
+        "vscode-languageserver-types": "3.18.0"
+      }
+    },
+    "node_modules/vscode-languageserver-textdocument": {
+      "version": "1.0.13",
+      "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.13.tgz",
+      "integrity": "sha512-nx0ZHwMGIsVkzFG3/VLeJYBLTaFBRuNdGDvevvjuoayU5EOS2fEYazOhtCM3PI9ClMMg5igc0uwXtAq4tJj+Dw==",
+      "license": "MIT"
+    },
+    "node_modules/vscode-languageserver-types": {
+      "version": "3.18.0",
+      "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.18.0.tgz",
+      "integrity": "sha512-8TsGPNMIMiiBdkORgRSvLjuiEIiAFtO+KssmYWxQ+uSVvlf7RjK8YKCOjPzZ+YA04jXEV7+7LvkSmHkhpNS99g==",
+      "license": "MIT"
+    }
+  }
+}
diff --git a/plugin/cursor-native-extension/package.json b/plugin/cursor-native-extension/package.json
new file mode 100644
index 0000000000..f9ae266a27
--- /dev/null
+++ b/plugin/cursor-native-extension/package.json
@@ -0,0 +1,46 @@
+{
+  "name": "cursor-native",
+  "displayName": "TraceDecay Cursor Native Diagnostics",
+  "description": "Bridges Cursor's native diagnostics into the TraceDecay LSP gateway.",
+  "publisher": "tracedecay",
+  "version": "0.0.0",
+  "private": true,
+  "engines": {
+    "vscode": "^1.125.0"
+  },
+  "categories": [
+    "Other"
+  ],
+  "activationEvents": [
+    "onStartupFinished"
+  ],
+  "main": "./dist/extension.js",
+  "contributes": {
+    "configuration": {
+      "title": "TraceDecay",
+      "properties": {
+        "tracedecay.binaryPath": {
+          "type": "string",
+          "default": "",
+          "description": "Absolute path to the TraceDecay executable. Leave empty to use TRACEDECAY_BIN or tracedecay from PATH."
+        }
+      }
+    }
+  },
+  "scripts": {
+    "build": "node scripts/build-extension.mjs",
+    "check:embedded": "node scripts/build-extension.mjs --check",
+    "check": "tsc --noEmit",
+    "test": "tsx --test test/*.test.ts"
+  },
+  "dependencies": {
+    "vscode-languageclient": "^10.1.0"
+  },
+  "devDependencies": {
+    "@rslib/core": "^0.23.2",
+    "@types/node": "^26.1.1",
+    "@types/vscode": "^1.125.0",
+    "tsx": "^4.23.1",
+    "typescript": "^7.0.2"
+  }
+}
diff --git a/plugin/cursor-native-extension/scripts/build-extension.mjs b/plugin/cursor-native-extension/scripts/build-extension.mjs
new file mode 100644
index 0000000000..a302124951
--- /dev/null
+++ b/plugin/cursor-native-extension/scripts/build-extension.mjs
@@ -0,0 +1,64 @@
+import { constants } from 'node:fs';
+import { access, mkdir, mkdtemp, readFile, rm, writeFile } from 'node:fs/promises';
+import { tmpdir } from 'node:os';
+import { dirname, join } from 'node:path';
+import { fileURLToPath } from 'node:url';
+import { createRslib } from '@rslib/core';
+
+const extensionRoot = dirname(dirname(fileURLToPath(import.meta.url)));
+const embeddedPath = join(extensionRoot, 'embedded', 'extension.js');
+const check = process.argv.slice(2).includes('--check');
+
+// Build into a throwaway directory so --check never touches the committed
+// bytes, then byte-compare/copy. Output must stay deterministic: no minify,
+// no source maps, no content hashes, only `vscode` external (the language
+// client is bundled so the embedded asset is self-contained).
+const outDir = await mkdtemp(join(tmpdir(), 'tracedecay-cursor-ext-'));
+let compiled;
+try {
+  const rslib = await createRslib({
+    cwd: extensionRoot,
+    config: {
+      root: extensionRoot,
+      lib: [
+        {
+          format: 'cjs',
+          syntax: ['node 20'],
+          bundle: true,
+          autoExternal: false,
+          source: {
+            entry: { extension: join(extensionRoot, 'src', 'extension.ts') },
+          },
+          output: {
+            target: 'node',
+            distPath: { root: outDir },
+            filename: { js: '[name].js' },
+            externals: { vscode: 'commonjs vscode' },
+            minify: false,
+            sourceMap: false,
+          },
+        },
+      ],
+    },
+  });
+  await rslib.build();
+  compiled = await readFile(join(outDir, 'extension.js'));
+} finally {
+  await rm(outDir, { recursive: true, force: true });
+}
+if (compiled.length === 0) {
+  throw new Error('rslib produced no Cursor extension JavaScript');
+}
+
+if (check) {
+  await access(embeddedPath, constants.R_OK);
+  const embedded = await readFile(embeddedPath);
+  if (!embedded.equals(compiled)) {
+    throw new Error(
+      'embedded/extension.js is stale; run npm run build and commit the result',
+    );
+  }
+} else {
+  await mkdir(dirname(embeddedPath), { recursive: true });
+  await writeFile(embeddedPath, compiled);
+}
diff --git a/plugin/cursor-native-extension/src/extension.ts b/plugin/cursor-native-extension/src/extension.ts
new file mode 100644
index 0000000000..82f8f02dee
--- /dev/null
+++ b/plugin/cursor-native-extension/src/extension.ts
@@ -0,0 +1,286 @@
+import * as vscode from "vscode";
+import {
+  LanguageClient,
+  State,
+  type InitializeParams,
+  type LanguageClientOptions,
+  type ServerOptions,
+} from "vscode-languageclient/node";
+
+import {
+  type NativeDiagnosticInput,
+  admitNativeWorkspace,
+  createNativeDiagnosticsPayload,
+  batchAdmittedNativeDiagnosticDocuments,
+  resolveInstalledTraceDecayBinary,
+  traceDecayInitializationOptions,
+  toLspDiagnosticSeverity,
+} from "./nativeDiagnostics.js";
+
+const TRACEDECAY_NATIVE_DIAGNOSTICS_METHOD = "tracedecay/nativeDiagnostics";
+const TRACEDECAY_CONTEXT_PROJECTIONS = [
+  { kind: "diagnostics", revision: 1 },
+  { kind: "postEditImpact", revision: 1 },
+  { kind: "affectedTests", revision: 1 },
+  { kind: "testRunResults", revision: 1 },
+];
+
+let activeController: CursorNativeDiagnosticsController | undefined;
+
+export async function activate(context: vscode.ExtensionContext): Promise {
+  if (!isCursorDesktop()) {
+    return;
+  }
+
+  const controller = new CursorNativeDiagnosticsController();
+  activeController = controller;
+  context.subscriptions.push(controller);
+  context.subscriptions.push(
+    vscode.workspace.onDidChangeWorkspaceFolders(() => {
+      void controller.reconcile();
+    }),
+  );
+  context.subscriptions.push(
+    vscode.workspace.onDidGrantWorkspaceTrust(() => {
+      void controller.reconcile();
+    }),
+  );
+
+  await controller.reconcile();
+}
+
+export async function deactivate(): Promise {
+  await activeController?.stop();
+  activeController = undefined;
+}
+
+class CursorNativeDiagnosticsController implements vscode.Disposable {
+  private disposed = false;
+  private queue: Promise = Promise.resolve();
+  private session: CursorNativeDiagnosticsSession | undefined;
+
+  public reconcile(): Promise {
+    return this.enqueue(async () => {
+      await this.session?.stop();
+      this.session = undefined;
+
+      if (this.disposed) {
+        return;
+      }
+
+      const admission = admitNativeWorkspace(
+        vscode.workspace.isTrusted,
+        vscode.workspace.workspaceFolders ?? [],
+      );
+      if (admission.state === "unavailable") {
+        if (admission.reason === "workspace_root_count") {
+          void vscode.window.showWarningMessage(
+            "TraceDecay native diagnostics require exactly one workspace folder; multi-root workspaces are not supported yet.",
+          );
+        }
+        return;
+      }
+
+      try {
+        this.session = await CursorNativeDiagnosticsSession.start(admission.root);
+      } catch (error) {
+        void vscode.window.showWarningMessage(
+          `TraceDecay native diagnostics could not start: ${String(error)}`,
+        );
+      }
+    });
+  }
+
+  public stop(): Promise {
+    this.disposed = true;
+    return this.enqueue(async () => {
+      await this.session?.stop();
+      this.session = undefined;
+    });
+  }
+
+  public dispose(): void {
+    void this.stop();
+  }
+
+  private enqueue(operation: () => Promise): Promise {
+    this.queue = this.queue.catch(() => undefined).then(operation);
+    return this.queue;
+  }
+}
+
+class CursorNativeDiagnosticsSession implements vscode.Disposable {
+  private disposed = false;
+  private readonly diagnosticsSubscription: vscode.Disposable;
+  private readonly documentSubscription: vscode.Disposable;
+  private readonly stateSubscription: vscode.Disposable;
+
+  private constructor(
+    private readonly client: LanguageClient,
+    private readonly workspaceFolder: vscode.WorkspaceFolder,
+  ) {
+    this.diagnosticsSubscription = vscode.languages.onDidChangeDiagnostics((event) => {
+      this.sendChangedDiagnostics(event.uris);
+    });
+    this.documentSubscription = vscode.workspace.onDidOpenTextDocument((document) => {
+      this.sendChangedDiagnostics([document.uri]);
+    });
+    this.stateSubscription = client.onDidChangeState((event) => {
+      if (event.newState === State.Running) {
+        this.sendCurrentDiagnostics();
+      }
+    });
+  }
+
+  public static async start(
+    workspaceFolder: vscode.WorkspaceFolder,
+  ): Promise {
+    const serverOptions: ServerOptions = {
+      command: resolveTraceDecayBinary(),
+      args: ["lsp", "bridge", "--stdio"],
+      options: {
+        cwd: workspaceFolder.uri.fsPath,
+      },
+    };
+    const clientOptions: LanguageClientOptions = {
+      documentSelector: [
+        {
+          scheme: "file",
+          pattern: `${workspaceFolder.uri.fsPath.replaceAll("\\", "/")}/**`,
+        },
+      ],
+      initializationOptions: traceDecayInitializationOptions,
+      workspaceFolder,
+    };
+    const client = new TraceDecayLanguageClient(
+      "tracedecayCursorNative",
+      "TraceDecay Cursor Native Diagnostics",
+      serverOptions,
+      clientOptions,
+    );
+    await client.start();
+
+    const session = new CursorNativeDiagnosticsSession(client, workspaceFolder);
+    session.sendCurrentDiagnostics();
+    return session;
+  }
+
+  public async stop(): Promise {
+    await this.disposeAsync();
+  }
+
+  public dispose(): void {
+    void this.disposeAsync();
+  }
+
+  private async disposeAsync(): Promise {
+    if (this.disposed) {
+      return;
+    }
+    this.disposed = true;
+    this.diagnosticsSubscription.dispose();
+    this.documentSubscription.dispose();
+    this.stateSubscription.dispose();
+    await this.client.stop();
+  }
+
+  private sendCurrentDiagnostics(): void {
+    const uris = vscode.languages.getDiagnostics().map(([uri]) => uri);
+    this.sendChangedDiagnostics(uris);
+  }
+
+  private sendChangedDiagnostics(uris: readonly vscode.Uri[]): void {
+    if (this.disposed) {
+      return;
+    }
+    for (const batch of batchAdmittedNativeDiagnosticDocuments(
+      uris,
+      (candidate) => isAdmittedWorkspaceDocument(candidate, this.workspaceFolder),
+    )) {
+      for (const uri of batch) {
+        const document = vscode.workspace.textDocuments.find(
+          (candidate) => candidate.uri.toString() === uri.toString(),
+        );
+        if (document === undefined) {
+          continue;
+        }
+        const payload = createNativeDiagnosticsPayload(
+          uri.toString(),
+          document.version,
+          vscode.languages.getDiagnostics(uri).map(toNativeDiagnosticInput),
+        );
+        void this.client
+          .sendNotification(TRACEDECAY_NATIVE_DIAGNOSTICS_METHOD, payload)
+          .catch((error: unknown) => {
+            this.client.warn(
+              `TraceDecay native diagnostic notification was not delivered: ${String(error)}`,
+            );
+          });
+      }
+    }
+  }
+}
+
+class TraceDecayLanguageClient extends LanguageClient {
+  protected override fillInitializeParams(params: InitializeParams): void {
+    super.fillInitializeParams(params);
+    const capabilities = params.capabilities as typeof params.capabilities & {
+      experimental?: Record;
+    };
+    capabilities.experimental = {
+      ...capabilities.experimental,
+      tracedecay: {
+        opaqueExpansion: true,
+        projections: TRACEDECAY_CONTEXT_PROJECTIONS,
+        revision: 1,
+      },
+    };
+  }
+}
+
+function isCursorDesktop(): boolean {
+  return vscode.env.appName.toLocaleLowerCase().includes("cursor");
+}
+
+function resolveTraceDecayBinary(): string {
+  const configured = vscode.workspace
+    .getConfiguration("tracedecay")
+    .get("binaryPath")
+    ?.trim();
+  return resolveInstalledTraceDecayBinary(configured, process.env.TRACEDECAY_BIN);
+}
+
+function isAdmittedWorkspaceDocument(
+  uri: vscode.Uri,
+  workspaceFolder: vscode.WorkspaceFolder,
+): boolean {
+  return (
+    uri.scheme === "file" &&
+    vscode.workspace.getWorkspaceFolder(uri)?.uri.toString() === workspaceFolder.uri.toString()
+  );
+}
+
+function toNativeDiagnosticInput(diagnostic: vscode.Diagnostic): NativeDiagnosticInput {
+  const source = diagnostic.source?.trim();
+  const code = diagnostic.code;
+  const severity = toLspDiagnosticSeverity(diagnostic.severity);
+  return {
+    range: {
+      start: diagnostic.range.start,
+      end: diagnostic.range.end,
+    },
+    ...(severity === undefined ? {} : { severity }),
+    ...(code === undefined ? {} : { code: diagnosticCode(code) }),
+    ...(source === undefined || source.length === 0 ? {} : { source }),
+    message: diagnostic.message,
+    data: diagnostic.tags?.length
+      ? { category: diagnostic.tags.join(",") }
+      : undefined,
+  };
+}
+
+function diagnosticCode(
+  code: Exclude,
+): string | number {
+  return typeof code === "object" ? code.value : code;
+}
diff --git a/plugin/cursor-native-extension/src/nativeDiagnostics.ts b/plugin/cursor-native-extension/src/nativeDiagnostics.ts
new file mode 100644
index 0000000000..c6bedfef0e
--- /dev/null
+++ b/plugin/cursor-native-extension/src/nativeDiagnostics.ts
@@ -0,0 +1,225 @@
+export const MAX_NATIVE_DIAGNOSTICS_PER_DOCUMENT = 100;
+export const MAX_NATIVE_DIAGNOSTIC_MESSAGE_BYTES = 512;
+export const MAX_NATIVE_DIAGNOSTIC_DOCUMENTS_PER_EVENT = 32;
+
+const MAX_NATIVE_DIAGNOSTIC_METADATA_BYTES = 256;
+const SAFE_DIAGNOSTIC_DATA_FIELDS = ["category", "href", "kind", "ruleId", "url"] as const;
+const PACKAGED_TRACEDECAY_BINARY = "__TRACEDECAY_BIN__";
+
+export interface NativePosition {
+  line: number;
+  character: number;
+}
+
+export interface NativeRange {
+  start: NativePosition;
+  end: NativePosition;
+}
+
+export interface NativeDiagnosticInput {
+  range: NativeRange;
+  severity?: number;
+  code?: string | number;
+  source?: string;
+  message: string;
+  data?: unknown;
+}
+
+export interface NativeDiagnostic {
+  range: NativeRange;
+  severity?: number;
+  code?: string | number;
+  source: string;
+  message: string;
+  data: Record | null;
+}
+
+export interface NativeDiagnosticsPayload {
+  uri: string;
+  version: number;
+  diagnostics: NativeDiagnostic[];
+}
+
+export type NativeWorkspaceAdmission =
+  | { state: "supported"; root: Root }
+  | {
+      state: "unavailable";
+      reason: "workspace_untrusted" | "workspace_root_count";
+      expectedRootCount: 1;
+      actualRootCount: number;
+    };
+
+export function admitNativeWorkspace(
+  trusted: boolean,
+  roots: readonly Root[],
+): NativeWorkspaceAdmission {
+  if (!trusted) {
+    return {
+      state: "unavailable",
+      reason: "workspace_untrusted",
+      expectedRootCount: 1,
+      actualRootCount: roots.length,
+    };
+  }
+  if (roots.length !== 1) {
+    return {
+      state: "unavailable",
+      reason: "workspace_root_count",
+      expectedRootCount: 1,
+      actualRootCount: roots.length,
+    };
+  }
+  return { state: "supported", root: roots[0]! };
+}
+
+export function traceDecayInitializationOptions(): {
+  tracedecay: { context: true; mode: "cursor-native" };
+} {
+  return {
+    tracedecay: {
+      context: true,
+      mode: "cursor-native",
+    },
+  };
+}
+
+export function toLspDiagnosticSeverity(
+  vscodeSeverity: number,
+): 1 | 2 | 3 | 4 | undefined {
+  switch (vscodeSeverity) {
+    case 0:
+      return 1;
+    case 1:
+      return 2;
+    case 2:
+      return 3;
+    case 3:
+      return 4;
+    default:
+      return undefined;
+  }
+}
+
+export function resolveInstalledTraceDecayBinary(
+  configuredBinary: string | undefined,
+  environmentBinary: string | undefined,
+  packagedBinary = PACKAGED_TRACEDECAY_BINARY,
+): string {
+  for (const candidate of [
+    configuredBinary,
+    environmentBinary,
+    packagedBinary.startsWith("__TRACEDECAY_") ? undefined : packagedBinary,
+  ]) {
+    const binary = candidate?.trim();
+    if (binary !== undefined && binary.length > 0) {
+      return binary;
+    }
+  }
+  return "tracedecay";
+}
+
+export function limitAdmittedNativeDiagnosticDocuments(
+  documents: readonly T[],
+  isAdmitted: (document: T) => boolean,
+): T[] {
+  return documents
+    .filter(isAdmitted)
+    .slice(0, MAX_NATIVE_DIAGNOSTIC_DOCUMENTS_PER_EVENT);
+}
+
+/** Split admitted documents into per-event batches at the notification cap. */
+export function batchAdmittedNativeDiagnosticDocuments(
+  documents: readonly T[],
+  isAdmitted: (document: T) => boolean,
+): T[][] {
+  const admitted = documents.filter(isAdmitted);
+  const batches: T[][] = [];
+  for (
+    let offset = 0;
+    offset < admitted.length;
+    offset += MAX_NATIVE_DIAGNOSTIC_DOCUMENTS_PER_EVENT
+  ) {
+    batches.push(
+      admitted.slice(offset, offset + MAX_NATIVE_DIAGNOSTIC_DOCUMENTS_PER_EVENT),
+    );
+  }
+  return batches;
+}
+
+export function createNativeDiagnosticsPayload(
+  uri: string,
+  version: number,
+  diagnostics: readonly NativeDiagnosticInput[],
+): NativeDiagnosticsPayload {
+  return {
+    uri,
+    version: Number.isSafeInteger(version) ? version : 0,
+    diagnostics: diagnostics
+      .slice(0, MAX_NATIVE_DIAGNOSTICS_PER_DOCUMENT)
+      .map((diagnostic) => {
+        const code =
+          diagnostic.code === undefined
+            ? undefined
+            : truncateUtf8(
+                String(diagnostic.code),
+                MAX_NATIVE_DIAGNOSTIC_METADATA_BYTES,
+              );
+        const message =
+          truncateUtf8(diagnostic.message, MAX_NATIVE_DIAGNOSTIC_MESSAGE_BYTES) ||
+          "Cursor diagnostic";
+        return {
+          range: diagnostic.range,
+          ...(diagnostic.severity === undefined ? {} : { severity: diagnostic.severity }),
+          ...(code === undefined || code.length === 0 ? {} : { code }),
+          source: truncateUtf8(
+            diagnostic.source || "cursor",
+            MAX_NATIVE_DIAGNOSTIC_METADATA_BYTES,
+          ),
+          message,
+          data: sanitizeDiagnosticData(diagnostic.data),
+        };
+      }),
+  };
+}
+
+function sanitizeDiagnosticData(data: unknown): Record | null {
+  if (!isRecord(data)) {
+    return null;
+  }
+
+  const safe: Record = {};
+  for (const field of SAFE_DIAGNOSTIC_DATA_FIELDS) {
+    const value = data[field];
+    if (typeof value === "boolean") {
+      safe[field] = value;
+    } else if (typeof value === "number" && Number.isFinite(value)) {
+      safe[field] = value;
+    } else if (typeof value === "string") {
+      safe[field] = truncateUtf8(value, MAX_NATIVE_DIAGNOSTIC_METADATA_BYTES);
+    }
+  }
+
+  return Object.keys(safe).length === 0 ? null : safe;
+}
+
+function isRecord(value: unknown): value is Record {
+  return typeof value === "object" && value !== null && !Array.isArray(value);
+}
+
+function truncateUtf8(value: string, maximumBytes: number): string {
+  if (Buffer.byteLength(value, "utf8") <= maximumBytes) {
+    return value;
+  }
+
+  let result = "";
+  let byteLength = 0;
+  for (const character of value) {
+    const characterBytes = Buffer.byteLength(character, "utf8");
+    if (byteLength + characterBytes > maximumBytes) {
+      break;
+    }
+    result += character;
+    byteLength += characterBytes;
+  }
+  return result;
+}
diff --git a/plugin/cursor-native-extension/test/nativeDiagnostics.test.ts b/plugin/cursor-native-extension/test/nativeDiagnostics.test.ts
new file mode 100644
index 0000000000..9e1294dedf
--- /dev/null
+++ b/plugin/cursor-native-extension/test/nativeDiagnostics.test.ts
@@ -0,0 +1,165 @@
+import assert from "node:assert/strict";
+import test from "node:test";
+
+import {
+  MAX_NATIVE_DIAGNOSTIC_DOCUMENTS_PER_EVENT,
+  MAX_NATIVE_DIAGNOSTICS_PER_DOCUMENT,
+  MAX_NATIVE_DIAGNOSTIC_MESSAGE_BYTES,
+  admitNativeWorkspace,
+  createNativeDiagnosticsPayload,
+  batchAdmittedNativeDiagnosticDocuments,
+  limitAdmittedNativeDiagnosticDocuments,
+  resolveInstalledTraceDecayBinary,
+  traceDecayInitializationOptions,
+  toLspDiagnosticSeverity,
+} from "../src/nativeDiagnostics.js";
+
+test("serializes bounded native diagnostics without raw diagnostic data", () => {
+  const payload = createNativeDiagnosticsPayload(
+    "file:///workspace/src/example.ts",
+    7,
+    [
+      {
+        range: {
+          start: { line: 1, character: 2 },
+          end: { line: 1, character: 6 },
+        },
+        severity: 1,
+        code: "no-explicit-any",
+        source: "eslint",
+        message: "Unexpected any.",
+        data: {
+          ruleId: "@typescript-eslint/no-explicit-any",
+          category: "style",
+          text: "const secret = 'must not cross the bridge'",
+        },
+      },
+    ],
+  );
+
+  assert.deepEqual(payload, {
+    uri: "file:///workspace/src/example.ts",
+    version: 7,
+    diagnostics: [
+      {
+        range: {
+          start: { line: 1, character: 2 },
+          end: { line: 1, character: 6 },
+        },
+        severity: 1,
+        code: "no-explicit-any",
+        source: "eslint",
+        message: "Unexpected any.",
+        data: {
+          category: "style",
+          ruleId: "@typescript-eslint/no-explicit-any",
+        },
+      },
+    ],
+  });
+});
+
+test("caps diagnostic count and message size", () => {
+  const payload = createNativeDiagnosticsPayload(
+    "file:///workspace/src/example.ts",
+    8,
+    Array.from({ length: MAX_NATIVE_DIAGNOSTICS_PER_DOCUMENT + 1 }, (_, index) => ({
+      range: {
+        start: { line: index, character: 0 },
+        end: { line: index, character: 1 },
+      },
+      message: "🦀".repeat(MAX_NATIVE_DIAGNOSTIC_MESSAGE_BYTES),
+    })),
+  );
+
+  assert.equal(payload.diagnostics.length, MAX_NATIVE_DIAGNOSTICS_PER_DOCUMENT);
+  assert.ok(
+    payload.diagnostics.every(
+      (diagnostic) =>
+        Buffer.byteLength(diagnostic.message, "utf8") <=
+        MAX_NATIVE_DIAGNOSTIC_MESSAGE_BYTES,
+    ),
+  );
+});
+
+test("prioritizes admitted documents before the notification cap", () => {
+  const documents = [
+    ...Array.from(
+      { length: MAX_NATIVE_DIAGNOSTIC_DOCUMENTS_PER_EVENT },
+      (_, index) => `file:///outside/${index}.ts`,
+    ),
+    "file:///workspace/first.ts",
+    "file:///workspace/second.ts",
+  ];
+
+  assert.deepEqual(
+    limitAdmittedNativeDiagnosticDocuments(
+      documents,
+      (document) => document.startsWith("file:///workspace/"),
+    ),
+    ["file:///workspace/first.ts", "file:///workspace/second.ts"],
+  );
+});
+
+test("batches startup documents instead of dropping the tail", () => {
+  const documents = Array.from(
+    { length: MAX_NATIVE_DIAGNOSTIC_DOCUMENTS_PER_EVENT + 3 },
+    (_, index) => `file:///workspace/${index}.ts`,
+  );
+
+  assert.deepEqual(
+    batchAdmittedNativeDiagnosticDocuments(documents, () => true),
+    [
+      documents.slice(0, MAX_NATIVE_DIAGNOSTIC_DOCUMENTS_PER_EVENT),
+      documents.slice(MAX_NATIVE_DIAGNOSTIC_DOCUMENTS_PER_EVENT),
+    ],
+  );
+});
+
+test("declares Cursor-native mode and TraceDecay context support", () => {
+  assert.deepEqual(traceDecayInitializationOptions(), {
+    tracedecay: {
+      context: true,
+      mode: "cursor-native",
+    },
+  });
+});
+
+test("returns typed unavailable state for multi-root workspaces", () => {
+  assert.deepEqual(admitNativeWorkspace(true, ["file:///one", "file:///two"]), {
+    state: "unavailable",
+    reason: "workspace_root_count",
+    expectedRootCount: 1,
+    actualRootCount: 2,
+  });
+});
+
+test("converts VS Code diagnostic severities to LSP severities", () => {
+  assert.deepEqual(
+    [0, 1, 2, 3, 99].map(toLspDiagnosticSeverity),
+    [1, 2, 3, 4, undefined],
+  );
+});
+
+test("prefers configured and packaged TraceDecay binaries", () => {
+  assert.equal(
+    resolveInstalledTraceDecayBinary(
+      "/configured/tracedecay",
+      "/environment/tracedecay",
+      "/packaged/tracedecay",
+    ),
+    "/configured/tracedecay",
+  );
+  assert.equal(
+    resolveInstalledTraceDecayBinary(
+      "",
+      "/environment/tracedecay",
+      "/packaged/tracedecay",
+    ),
+    "/environment/tracedecay",
+  );
+  assert.equal(
+    resolveInstalledTraceDecayBinary("", "", "/packaged/tracedecay"),
+    "/packaged/tracedecay",
+  );
+});
diff --git a/plugin/cursor-native-extension/tsconfig.json b/plugin/cursor-native-extension/tsconfig.json
new file mode 100644
index 0000000000..8d4501e539
--- /dev/null
+++ b/plugin/cursor-native-extension/tsconfig.json
@@ -0,0 +1,24 @@
+{
+  "compilerOptions": {
+    "target": "ES2022",
+    "module": "Node16",
+    "moduleResolution": "Node16",
+    "lib": [
+      "ES2022"
+    ],
+    "strict": true,
+    "noUncheckedIndexedAccess": true,
+    "esModuleInterop": true,
+    "skipLibCheck": true,
+    "forceConsistentCasingInFileNames": true,
+    "outDir": "dist",
+    "types": [
+      "node",
+      "vscode"
+    ]
+  },
+  "include": [
+    "src/**/*.ts",
+    "test/**/*.ts"
+  ]
+}