Repository navigation
perf(sessions): skip empty JSONL scope resolution on re-offer - #4806
ScriptedAlchemy wants to merge 8 commits into
Conversation
|
Follow hosted Bazel formatting diagnostics and confine the test spy MutexGuard to its own scope. This preserves all assertions and keeps the later asynchronous cursor and re-offer checks outside the lock. Refs #4374
Reuse the production-path 16-rollout / 96-reoffer Git-scope and append-transition tests on the original issue-specific PR. Keep rewrite-completion and provider opt-in regressions already present. Refs #4374
Preserve the trace boundary when consolidating the alternate re-offer implementation and behavioral tests. Refs #4374
Ensure a failed durable rewrite-completion read remains a typed block on an unchanged empty page, leaves the accepted cursor/rows intact, and is retried without re-reading transcript frames. Refs #4374
Apply the pinned Bazel rustfmt formatting from repository gates. Preserve the failure injection and nonvacuous assertions. Refs #4374
#4374 exact-head Bazel gate repair — 2026-11-08The hosted Repository gates job on prior head Published New exact-head CI is queued. No current-head Rust/Bazel pass, independent approval, affected-macOS 2,010-rollout timing, merge, or issue closure is claimed. |
Exact-head CI blocker: external Bazel artifact download (2026-11-08)Reviewed run 42463541427 at PR head A targeted re-run of the failed Linux fleet job was attempted through GitHub Actions but rejected with HTTP 403, "The workflow run containing this job is already running". Once the current run has terminated, retry only the failed jobs via the normal Actions mechanism, without modifying CI, dependencies, or protections. Do not claim a pass/merge/issue closure until exact-head nonzero sessions Bazel tests, applicable native checks, real 2,010-rollout before/after host timings, and review are established. Refs #4374; no source change is justified by the external 504. |
#4374 — exact-head CI retry result (2026-11-08; Refs #4374)CI run 42463541427, attempt 2 on unchanged PR head Full Linux acceptance is still blocked by exactly two failing Bazel targets among 183: Source diff and review of the existing four-file #4806 optimization found no defensible additional #4374 fix without the affected-host per-rollout span distribution. In particular, do not bypass the authoritative No PR merge or #4374 closure. Still require the same 2,010-rollout macOS corpus before/after timing, restart-profile/frontier evidence, independent approval and full applicable exact-head CI/native qualification. |
Refs #4374 — focused partial performance repair
Source-backed cause and change
Even when a Codex rollout has an unchanged, fully covered durable source cursor, the shared JSONL admission code still invokes the provider initializer. Codex's initializer submits a blocking-worker task to rebuild the scope matcher and walk context, despite zero frames to classify. This adds one unnecessary blocking dispatch per unchanged rollout, including the issue's large project re-offer pass.
Codex explicitly opts in to an otherwise-disabled
with_skip_empty_initialization()admission setting. Inadmit_jsonl_observations, an opted-in no-op admission bypasses that initializer only when the durable cursor is for the same generation, the scanned window has zero new bytes/frames/skips, its starting position matches that exact durable cursor, and it is not deferred or a replacement scan. It preserves the same source-cursor validation, prefix verification, cancellation check, durablecomplete_source_rewritecall, typed error propagation, progress and tracing. A pending interrupted rewrite therefore still gets a chance to retire unoffered records; the optimization does not infer rewrite absence from an unchanged cursor. Any appended bytes, partial page, changed generation or rewrite follows the normal path.Nonvacuous behavioral regression
A real Codex rollout is admitted, then the shared admission is repeated 16 times with an initializer that deliberately returns an error if invoked. The test requires every unchanged re-offer to read zero new bytes, retain the exact durable cursor, perform zero captures, and still call the source rewrite-completion authority 16 times. It then appends a real Codex message and proves the next normal admission persists exactly one new record without losing prior provenance. The failing initializer makes the regression fail on master. A second regression requires that a provider without opt-in still executes its initializer and keeps its refusal and durable cursor unchanged; Pi's header-witness safety check is therefore unaffected.
Validation limits
1d4e01528aa2fd1434584e770d097fe12438a08a, based on master91c72aba7750a398dd28e83d64bf0c6d6fef4172. Compare shows three sessions files changed (the shared implementation, Codex opt-in and focused regressions). Follow-up fixed a cross-provider safety concern found by auditing Pi/Cursor/Kimi/Vibe callers; Pi explicitly requires header verification on a zero-frame page.bazel test //crates/tracedecay-sessions:unit_test --test_output=errorsand formatting/Clippy on this exact head; independent review is required. Never substitute Cargo.TRACEDECAY_SPAN_TIMINGS=1project/profile traces for the same 2,010-rollout corpus before/after, including store cursor/rewrite-completion cost and restart profile behavior.Boundaries / outstanding issue acceptance
This cannot yet claim elimination of the originally measured ~28 ms/file project-scope latency, or complete restart/provenance/cache acceptance. Existing #4380, #4706, #4757, #4767 remain intact. The separate #4756/#4793 owner handles historical projection backlog; no files in its PR were changed. Keep #4374 open until proven on master.
Do not merge or auto-merge held draft Kev/decision-model PRs or mixed #4776. Release #4763, other owner branches, CI protections, production, credentials, tags and infrastructure are untouched.
Consolidation of overlapping #4374 PRs (2026-11-08)
sessions.observation.codex.resolve_scopetimer. Both commits appended as nonforce fast-forwards with exact expected prior heads; no peer history was rewritten.Fail-closed regression and CI follow-up (2026-11-08)
//crates/tracedecay-sessions:unit_test(31.1 s), Repository gates, Clippy, feature gates, dashboard and harness self-tests. Its overall fleet failed: three automation scheduler tests reproduce exactly on master (master run); separate global-db and dashboard API tests timed out and MCP suite failed under that fleet run. These other suites are outside this PR's four source/test files; attribution of their CI failures is not established.