Skip to content

feat: Deadlines Incentive Plugin - Bounty #66#84

Open
zhaog100 wants to merge 4 commits into
ubiquity-os:mainfrom
zhaog100:feat/deadlines-incentive
Open

feat: Deadlines Incentive Plugin - Bounty #66#84
zhaog100 wants to merge 4 commits into
ubiquity-os:mainfrom
zhaog100:feat/deadlines-incentive

Conversation

@zhaog100
Copy link
Copy Markdown

@zhaog100 zhaog100 commented Apr 9, 2026

Deadlines Incentive

Issue: #66

Features

  • Auto deadline assignment based on priority
  • Reminder comments (24h, 1h before)
  • Incentive multiplier for early completion
  • Deadline tracking and enforcement
  • Configurable reward ratio and disqualification

Reward Formula

reward = baseTaskValue × max(0, 1 + (deadlineRewardRatio × (1 - actualTime/deadlineTime)) - penalty)

Configuration

commandDeadline:
  timezone: "UTC"
  deadlineRewardRatio: 0.25
  disqualificationEnabled: true
  projectView: null

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 9, 2026

Warning

Rate limit exceeded

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

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 59 minutes and 35 seconds.

⌛ 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.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: acc3cd62-3f3e-4244-82a2-51ab565f2540

📥 Commits

Reviewing files that changed from the base of the PR and between f762259 and c5b108c.

📒 Files selected for processing (2)
  • proposals/deadlines-incentive/src/index.ts
  • proposals/deadlines-incentive/src/scheduler.ts
📝 Walkthrough

Walkthrough

This PR introduces a new command-deadline plugin proposal under proposals/deadlines-incentive/. The plugin implements deadline tracking functionality for issues with a /deadline [date] command, reward calculation logic, automated reminder comments at 24h and 1h thresholds, deadline status label management, and an in-memory scheduler. Configuration options include timezone, reward ratio, and disqualification settings. Project structure includes TypeScript source files, npm packaging, and documentation.

Possibly related issues

  • Deadlines Incentive #66: This PR directly implements the command-deadline plugin with all specified features (deadline command, DeadlineConfig, calculateReward function, scheduler with reminders, and event handling).
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main changeset: implementing a Deadlines Incentive plugin for Bounty #66.
Description check ✅ Passed The description directly relates to the changeset, detailing features, reward formula, and configuration for the Deadlines Incentive plugin being added.
Docstring Coverage ✅ Passed Docstring coverage is 84.62% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 6

🧹 Nitpick comments (6)
proposals/deadlines-incentive/package.json (1)

6-10: Consider adding a test script.

No test infrastructure defined. For a plugin handling rewards and deadlines, tests would help prevent regressions.

proposals/deadlines-incentive/README.md (1)

19-21: Add language specifier to code block.

Per markdownlint MD040, fenced code blocks should have a language. Use text or math for formulas.

Proposed fix
-```
+```text
 reward = baseTaskValue × max(0, 1 + (deadlineRewardRatio × (1 - actualTime/deadlineTime)) - penalty)
</details>

</blockquote></details>
<details>
<summary>proposals/deadlines-incentive/src/scheduler.ts (1)</summary><blockquote>

`98-100`: **Empty catch blocks hide errors.**

Silent failures make debugging difficult. At minimum, log the error.

<details>
<summary>Proposed fix</summary>

```diff
   } catch {
-    // Label may not exist, non-critical
+    // Label may not exist, non-critical - but log for visibility
+    ctx.logger?.debug?.("Failed to add label");
   }

Also applies to: 130-132

proposals/deadlines-incentive/src/index.ts (3)

159-166: Weak typing with any[].

Use a proper type for labels to enable type-checking.

Proposed fix
-function extractTaskValue(labels: any[]): number {
+function extractTaskValue(labels: Array<string | { name?: string }>): number {

197-198: Module-level side effect.

startDeadlineScheduler() runs on import. This complicates testing and may cause issues if the module is imported multiple times.

Consider lazy initialization

Move scheduler start into the handler or export an explicit init() function that consumers call when ready.


70-75: No validation for past deadlines.

parseDeadlineCommand accepts any valid date, including dates in the past. Consider warning users or rejecting past dates.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 552e8528-d99a-49f3-a04c-266efc72293b

📥 Commits

Reviewing files that changed from the base of the PR and between edb3383 and f762259.

📒 Files selected for processing (6)
  • proposals/deadlines-incentive/README.md
  • proposals/deadlines-incentive/manifest.json
  • proposals/deadlines-incentive/package.json
  • proposals/deadlines-incentive/src/index.ts
  • proposals/deadlines-incentive/src/scheduler.ts
  • proposals/deadlines-incentive/tsconfig.json

Comment thread proposals/deadlines-incentive/src/index.ts
Comment thread proposals/deadlines-incentive/src/index.ts
Comment thread proposals/deadlines-incentive/src/index.ts
Comment thread proposals/deadlines-incentive/src/scheduler.ts
Comment thread proposals/deadlines-incentive/src/scheduler.ts Outdated
Comment thread proposals/deadlines-incentive/src/scheduler.ts Outdated
OpenClaw Bot and others added 3 commits April 13, 2026 23:54
- Register deadlines with scheduler after setting them
- Fix handleCompletion to read metadata from issue comments instead of placeholders
- Fix handleExpiry to accept user config instead of always using defaults
- Import registerDeadline in index.ts
…remove module-level side effect, error handling
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