Skip to content

t303: Distributed task ID allocation via claim-task-id.sh#1216

Merged
marcusquinn merged 3 commits intomainfrom
feature/t303
Feb 12, 2026
Merged

t303: Distributed task ID allocation via claim-task-id.sh#1216
marcusquinn merged 3 commits intomainfrom
feature/t303

Conversation

@marcusquinn
Copy link
Owner

Summary

Implements distributed task ID allocation to prevent collisions when multiple machines/sessions create tasks concurrently.

Key Features:

  • Distributed locking: Creates GitHub/GitLab issue first as atomic lock
  • Platform-agnostic: Works with GitHub (gh), GitLab (glab), and Gitea
  • Offline fallback: Allocates t(max+100) when network unavailable
  • Supervisor safety net: Phase 0.5 deduplication catches any collisions
  • Auto-integration: Wired into coderabbit-task-creator-helper.sh

Algorithm:

  1. Online mode (default):

    • Create remote issue first (distributed lock)
    • Fetch origin/main:TODO.md
    • Scan for highest tNNN
    • Allocate t(N+1)
    • Return: task_id=tNNN ref=GH#NNN
  2. Offline fallback:

    • Scan local TODO.md
    • Allocate t(N+100) to avoid collisions
    • Return: task_id=tNNN+100 ref=offline
    • Manual reconciliation when back online
  3. Supervisor dedup (Phase 0.5):

    • Detects duplicate task IDs in supervisor DB
    • Keeps oldest, cancels duplicates
    • Runs every pulse cycle as safety net

Integration:

  • coderabbit-task-creator-helper.sh now calls claim-task-id.sh for each task
  • Tasks created with proper tNNN IDs and ref:GH#NNN links
  • Supervisor Phase 0.5 catches any edge-case collisions

Testing:

  • ✅ ShellCheck zero violations
  • ✅ Dry-run mode tested (online and offline)
  • ✅ Bash compatibility verified (tr instead of ${var^^})

Ref #1175

@gemini-code-assist
Copy link

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 12, 2026

Warning

Rate limit exceeded

@marcusquinn has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 8 minutes and 33 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/t303

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 15 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Thu Feb 12 04:02:44 UTC 2026: Code review monitoring started
Thu Feb 12 04:02:44 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 15

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 15
  • VULNERABILITIES: 0

Generated on: Thu Feb 12 04:02:47 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@sonarqubecloud
Copy link

@marcusquinn marcusquinn merged commit d4d6a26 into main Feb 12, 2026
10 checks passed
@marcusquinn marcusquinn deleted the feature/t303 branch February 12, 2026 04:04
marcusquinn added a commit that referenced this pull request Feb 12, 2026
t303 (#1216) and t311.2 (#1218) were branched before t314 (#1215) merged,
so their squash-merges overwrote the timeout changes. Restoring:
- SUPERVISOR_WORKER_TIMEOUT: 1800 -> 3600 (1h)
- SUPERVISOR_WORKER_MAX_RUNTIME: 7200 -> 14400 (4h)
marcusquinn added a commit that referenced this pull request Feb 12, 2026
…es (#1219)

t303 (#1216) and t311.2 (#1218) were branched before t314 (#1215) merged,
so their squash-merges overwrote the timeout changes. Restoring:
- SUPERVISOR_WORKER_TIMEOUT: 1800 -> 3600 (1h)
- SUPERVISOR_WORKER_MAX_RUNTIME: 7200 -> 14400 (4h)
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