Skip to content

Conversation

@marcusquinn
Copy link
Owner

Summary

Phase 1 of Higgsfield automator production hardening (t236). Adds three reliability features:

  • Retry with exponential backoff: withRetry() wrapper handles transient failures (network timeouts, page load errors). Non-transient errors (content policy violations, missing assets) are not retried. Video/lipsync operations get max 1 retry due to high credit cost.
  • Credit guard: Checks cached credit balance before expensive operations. Blocks with clear error message if insufficient credits. Warns when credits are low (<3x estimated cost). Use --force to override.
  • Credit cost estimation: Maps each operation type to approximate credit cost (image:2, video:20, lipsync:10, upscale:2, pipeline:60, etc.). Adjusts for batch size, video duration, and seed bracket range.

New CLI flags

  • --force — Override credit guard (proceed even with low credits)
  • --dry-run — Navigate and configure but don't click Generate (Phase 5 will implement)
  • --no-retry — Disable automatic retry on failure

Testing

  • Credit guard blocks when credits < estimated cost: CREDIT_GUARD: Insufficient credits. Need ~2, have 1.
  • --force bypasses the guard and proceeds
  • Credit cache populated by credits command, valid for 10 minutes
  • Syntax verified, all 18 generation commands wrapped with retry

- Add withRetry() wrapper with exponential backoff for transient failures
  (network timeouts, page load errors). Non-transient errors (content policy,
  missing assets) are not retried. Video/lipsync get max 1 retry (expensive).
- Add credit cost map per operation type (image:2, video:20, lipsync:10, etc.)
- Add credit guard that checks cached credits before expensive operations.
  Blocks if insufficient credits, warns if low. Use --force to override.
- Cache credit info for 10 minutes after 'credits' command runs
- Add --force, --dry-run, --no-retry CLI flags
- Wrap all 18 generation commands with retry in main dispatch
- Free commands (login, credits, screenshot, download, assets) skip guard/retry
@marcusquinn marcusquinn merged commit a922fab into main Feb 10, 2026
5 of 6 checks passed
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 10, 2026

Warning

Rate limit exceeded

@marcusquinn has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 2 minutes and 55 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/t236.1

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, 36 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Tue Feb 10 18:13:34 UTC 2026: Code review monitoring started
Tue Feb 10 18:13:35 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 36

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 36
  • VULNERABILITIES: 0

Generated on: Tue Feb 10 18:13:37 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@sonarqubecloud
Copy link

@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!

marcusquinn added a commit that referenced this pull request Feb 10, 2026
…s-contamination

The session_id, worktree, branch, log_file, and pr_url variables in
cmd_transition() were not declared as local. When the pulse cycle calls
cmd_transition() in a loop for multiple tasks, these variables leaked
between calls via the shell's global scope. A call with --branch or
--pr-url would set the global, and subsequent calls without those flags
would still see the stale value via ${branch:-} / ${pr_url:-} checks,
overwriting unrelated tasks' DB rows.

This was the root cause of all PR cross-contamination (6 historical
duplicates, plus ongoing backlog-19 contamination where PR #962 was
linked to 5 unrelated tasks).
marcusquinn added a commit that referenced this pull request Feb 10, 2026
…s-contamination (#967)

The session_id, worktree, branch, log_file, and pr_url variables in
cmd_transition() were not declared as local. When the pulse cycle calls
cmd_transition() in a loop for multiple tasks, these variables leaked
between calls via the shell's global scope. A call with --branch or
--pr-url would set the global, and subsequent calls without those flags
would still see the stale value via ${branch:-} / ${pr_url:-} checks,
overwriting unrelated tasks' DB rows.

This was the root cause of all PR cross-contamination (6 historical
duplicates, plus ongoing backlog-19 contamination where PR #962 was
linked to 5 unrelated tasks).
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