Skip to content

Fix attribution debug self-check timeouts#1944

Open
svarlamov wants to merge 1 commit into
mainfrom
fix/debug-attr-self-check-timeout
Open

Fix attribution debug self-check timeouts#1944
svarlamov wants to merge 1 commit into
mainfrom
fix/debug-attr-self-check-timeout

Conversation

@svarlamov

@svarlamov svarlamov commented Jul 21, 2026

Copy link
Copy Markdown
Member

Summary

  • give asynchronous attribution polling a fresh bounded deadline after the synthetic commit
  • run the configured and terminal Git self-checks sequentially to avoid daemon-side contention
  • resolve self-check repositories from the active daemon home so every process recognizes them consistently
  • skip session-event recovery and agent-usage throttling for synthetic git-ai debug checkpoints
  • add a TestRepo regression that validates the daemon-home path, both self-check targets, and every expected attribution class

Root cause

The attribution self-check shared its three-second deadline between repository setup, three checkpoints, commit processing, and result polling. A new two-second post-commit session-event recovery preflight consumed most of that budget, while the two self-check repositories competed concurrently. In installed debug builds, the synthetic mock_ai checkpoint also opened the production metrics throttle database even though mock metrics are discarded.

The remaining Windows failure exposed a split-home bug in the test harness: the debug subprocess created repositories beneath its isolated process home, while the shared daemon determined the self-check root from GIT_AI_DAEMON_HOME. Because those paths differed, the daemon did not recognize the repositories as synthetic and still ran the recovery path. Windows latency then exhausted the fresh polling deadline.

Impact

git-ai debug now waits for attribution with its own bounded budget, creates diagnostic repositories beneath the active daemon's internal directory, and avoids production-only recovery and telemetry work that cannot affect the synthetic result. Normal checkpoint, recovery, and trace2 ingestion behavior is unchanged.

Validation

  • task test TEST_FILTER=attribution_self_checks_do_not_timeout
  • task test
  • task build
  • task lint
  • task fmt
  • task dev
  • installed git-ai debug smoke test: both attribution self-checks passed with untracked, known-human, and AI lines correctly classified

Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@svarlamov
svarlamov marked this pull request as ready for review July 21, 2026 15:21

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@svarlamov
svarlamov force-pushed the fix/debug-attr-self-check-timeout branch from 757a14a to 3808e14 Compare July 21, 2026 18:53
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