Skip to content

Count daily caps the way the factory does - #20

Merged
angelraph merged 1 commit into
masterfrom
claude/caps-like-factory
Nov 10, 2026
Merged

angelraph merged 1 commit into
masterfrom
claude/caps-like-factory

Conversation

@angelraph

Copy link
Copy Markdown
Owner

The live desk refused a 2 mUSD job to a payee the factory would have accepted, because it kept counting expired, never-written invites and returned clauses against the day's caps.

  • committedClauses skips a cleared job once its deadline passed unwritten, or once its clause was returned, matching the factory's reservation.
  • New engine test for both cases. 227 tests pass, typecheck clean.
  • The judge run's earned-limit probe now opens its invite with a 1-minute deadline.

After merge I rerun npm run judge on the live desk for a clean pass.

🤖 Generated with Claude Code

The desk counted every cleared job against the day's caps forever,
including invites whose deadline passed before anyone wrote them on
chain and clauses that were returned to the buyer. The factory reserves
only written clauses and gives the reservation back on a return, so the
desk became stricter than the chain: after a few test runs it refused a
2 mUSD job to a payee the factory would have accepted.

committedClauses now skips a cleared job once it expired unwritten, or
once its clause was returned. A new engine test covers both.

The judge run's earned-limit probe opens its invite with a one-minute
deadline, so it stops counting almost at once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
clausehold Ready Ready Preview Nov 10, 2026 10:10am UTC
clausehold-api-mainnet Ready Ready Preview Nov 10, 2026 10:10am UTC
clausehold-api-testnet Ready Ready Preview Nov 10, 2026 10:10am UTC

@angelraph
angelraph merged commit 63af841 into master Nov 10, 2026
5 checks passed
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