Skip to content

[codex] Optimize trace2 ingestion side effects#1651

Open
svarlamov wants to merge 1 commit into
mainfrom
chore/ensure-no-spawn-trace2-june-24
Open

[codex] Optimize trace2 ingestion side effects#1651
svarlamov wants to merge 1 commit into
mainfrom
chore/ensure-no-spawn-trace2-june-24

Conversation

@svarlamov

Copy link
Copy Markdown
Member

Summary

  • Move trace2 command side effects out of the latency-sensitive ingest path and schedule them through per-family drains with bounded background concurrency.
  • Narrow reflog cursor capture to command-relevant refs instead of scanning every reflog for each mutating trace event.
  • Serialize process-local notes writes/merges per repo notes ref to avoid concurrent fast-import/update races.
  • Prevent incomplete trace roots from globally blocking unrelated repository families, with unit coverage for that fence behavior.

Root Cause

Trace2 ingestion still did too much synchronous work: broad reflog scans, inline command side effects, and broad family blocking on trace roots that had not identified a repo. Under suite load, an incomplete root could leave later checkpoints waiting behind unrelated trace state.

Validation

  • task build
  • task lint
  • task fmt
  • task test CARGO_TEST_ARGS="--lib"
  • task test CARGO_TEST_ARGS="--test daemon_mode"
  • task test CARGO_TEST_ARGS="--test integration"

Focused regression checks also passed for cold conflict rebase, pull-rebase/autostash, Cursor attribution, partial staging, subdir amend, and large stash note cases.

@svarlamov svarlamov marked this pull request as ready for review June 24, 2026 23:23
@svarlamov svarlamov force-pushed the chore/ensure-no-spawn-trace2-june-24 branch from 4488ce8 to d7d3ce0 Compare June 24, 2026 23:24
devin-ai-integration[bot]

This comment was marked as resolved.

@svarlamov svarlamov force-pushed the chore/ensure-no-spawn-trace2-june-24 branch 11 times, most recently from 198023f to 060f578 Compare June 25, 2026 11:14
@svarlamov svarlamov force-pushed the chore/ensure-no-spawn-trace2-june-24 branch from 060f578 to cd170ce Compare June 25, 2026 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant