Skip to content

ci(oss): warn idle claims at 48 hours and release them at 72 - #552

Merged
zeshi-du merged 1 commit into
mainfrom
zeshi/claim-ttl-48-72
Oct 19, 2026
Merged

zeshi-du merged 1 commit into
mainfrom
zeshi/claim-ttl-48-72

Conversation

@zeshi-du

@zeshi-du zeshi-du commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Part of #554

What changes for contributors

  • Idle claims are warned at 48 hours and released at 72 hours (was 72 and 96). That matches the Season 4 hackathon rules published on testsprite.com/hackathon-s4, so the bot and the published rules no longer disagree mid-contest.
  • CONTRIBUTING.md now says outright that a draft PR holds the claim. The sweep has always counted drafts (there is a test for it). It just wasn't written down.

Nothing else changes. An open PR by the assignee whose description links the issue (Closes #N, Part of #N, …) still stops the clock. Claims made before 2026-09-24, maintainers and pinned issues are still skipped. The warning still says "about 24 hours", which stays true at 48/72.

Who the switch affects today

I ran evaluateClaim from this script against the live timelines of every open claim (11 claims on 10 issues, 2026-10-19 19:25 UTC), once with 72/96 and once with 48/72. No claim is warned or released by the switch: 7 are grandfathered and 4 are protected by an open linked PR.

Files

  • .github/workflows/claim-ttl.yml: CLAIM_WARN_HOURS: '48', CLAIM_TTL_HOURS: '72', header comment.
  • .github/scripts/claim-ttl.mjs: fallback defaults 48/72, so the script and the workflow agree.
  • .github/scripts/claim-ttl.test.mjs: boundaries and markers moved to 48/72, plus the workflow pin.
  • CONTRIBUTING.md: claim lifetime 48/72, and drafts count.

Tests

  • node --test '.github/scripts/*.test.mjs': 82 tests, 80 pass, 0 fail, 2 skipped (the two pre-existing org-audit skips).
  • Seen red: putting the script defaults back to 96/72 fails 14 of the 25 claim tests, and putting the workflow env back to 96/72 fails the policy-pin test.
  • npm run lint, npm run format:check, actionlint and check-pr-target-checkout.mjs are clean. Codex review found no issues.

After merge

Run Claim TTL once with dry_run: true and check the summary line.

🤖 Generated with Claude Code

https://claude.ai/code/session_01B55U1fjVffEERGXqo7FJfg

The Season 4 hackathon rules published on testsprite.com promise a 48-hour
warning and a 72-hour release for idle claims. The claim sweep was still
on 72/96, so the published rules and the bot disagreed mid-contest.

Align the bot with the published rules: the workflow env, the script
defaults, the tests and CONTRIBUTING.md all move to 48/72. CONTRIBUTING
also says outright that a draft PR holds the claim, which the sweep has
always allowed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B55U1fjVffEERGXqo7FJfg
@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

✅ This PR is linked to an issue assigned to @zeshi-du — thanks! The needs-issue label has been removed.

@github-actions github-actions Bot added the needs-issue PR not linked to an issue yet — please open one first and claim it (see CONTRIBUTING) label Oct 19, 2026
@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: TestSprite/testsprite-cli/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 029121aa-79d8-4dec-8f7a-a5dbe0185fe7
📥 Commits

Reviewing files that changed from the base of the PR and between 8a23613 and 1c47883.

📒 Files selected for processing: 4
  • .github/scripts/claim-ttl.mjs
  • .github/scripts/claim-ttl.test.mjs
  • .github/workflows/claim-ttl.yml
  • CONTRIBUTING.md

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

Walkthrough

The claim warning threshold changes from 72 to 48 hours. The claim release threshold changes from 96 to 72 hours. Tests, scheduled workflow settings, and contributor guidance reflect these thresholds.

Changes

Claim TTL policy

Layer / File(s) Summary
Update claim thresholds
.github/scripts/claim-ttl.mjs, .github/scripts/claim-ttl.test.mjs, .github/workflows/claim-ttl.yml, CONTRIBUTING.md
The default and scheduled workflow thresholds change to warnings at 48 hours and release at 72 hours. Tests use the updated boundaries and expectations. Contributor guidance adds that draft PRs count toward holding a claim while work continues.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Suggested reviewers: ruili-testsprite

Merge Risk: ⚪ Minimal · up to 1c478

The updated claim timing preserves grandfathered claims and the documented draft-PR protections; no concrete merge-blocking risk remains.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. (2 skipped: 2 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: claims will receive warnings at 48 hours and release at 72 hours.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. (2 skipped: 2 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 2
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@github-actions

Copy link
Copy Markdown

Test Coverage Report

Metric Coverage
Lines 92.27%
Statements 90.08%
Functions 83.64%
Branches 85.08%

@github-actions github-actions Bot removed the needs-issue PR not linked to an issue yet — please open one first and claim it (see CONTRIBUTING) label Oct 19, 2026
@zeshi-du
zeshi-du merged commit f1e803b into main Oct 19, 2026
26 of 28 checks passed
@zeshi-du
zeshi-du deleted the zeshi/claim-ttl-48-72 branch October 19, 2026 20:38
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.

3 participants