Skip to content

doc: cooperative timeout contract for #6002 - #8279

Merged
dezren39 merged 2 commits into
mainfrom
queue/13794-6002-timeout-contract
Nov 10, 2026
Merged

dezren39 merged 2 commits into
mainfrom
queue/13794-6002-timeout-contract

Conversation

@dezren39

@dezren39 dezren39 commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Contract specification for #6002: cooperative timeout — invocation budget, checkpoint convention, hard-kill outcomes.

Queue task 13794 (lane code-g, direct execution per #8187).

What this is

One new file, doc/2026-11-10_design_id6002_cooperative_timeout_contract.md, plus its index line in doc/README.md. No code, no implementation.

The contract in brief

  • C1 — Invocation: every invocation carries a budget bundle (fuel budget as the bound; an optional wall-clock deadline only in the cooperative single-host profile; tick identity; the binding's resume checkpoint). Self-observation (fuel_used() / time_remaining()) is contractual — the Screeps property the issue cites.
  • C2 — Checkpoints: function-initiated, host-mediated saves of function-local progress (opaque blob + host-assigned sequence + host-stamped fuel spent). A checkpoint is not a commit, never extends the budget, and survives exactly one kill as the next invocation's resume input.
  • C3 — Hard kill: exactly the id: design: per-user function mapping — bot battles, strategy hot-switching, human+AI-partner composition #5967 failure-table row — default intent, pre-tick state (no commit), strike +1 — plus an outcome record {binding, tick, kind, fuel_spent, checkpoint_offered}. Partial results are discarded; the checkpoint is the only survivor, as input, not effect.
  • C4 — Repeat offenders: the id: design: per-user function mapping — bot battles, strategy hot-switching, human+AI-partner composition #5967 strike discipline (consecutive, reset on success, suspension at the world limit, default 3), with outcome records queryable by the world author and a suspension event visible to author and user alike.

Alignment

Written against the landed #5967 mapping design (its failure table is adopted verbatim, not re-decided) and the #5966 research (Wasmtime fuel per binding as the primary bound). Enforcement mechanism, fuel costs, and budget numbers are explicitly left to their owning seams (#5966, #6001, #5962) — the spec names the seam wherever it needs a number those issues have not fixed.

Refs #6002 (the issue stays open until this contract is merged, per its acceptance).


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner November 10, 2026 21:16
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-10T21:16:07.860630Z
We couldn’t complete this review. Comment @codex review to try again.
a16fad6 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 43 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7bd7c82b-6478-43dc-9ce9-e683ab9a061d
Commits

Reviewing files that changed from the base of the PR and between c994a7e and 796ab33.

Files selected for processing: 2

  • doc/2026-11-10_design_id6002_cooperative_timeout_contract.md
  • doc/README.md
  • 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

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@dezren39
dezren39 merged commit 3809186 into main Nov 10, 2026
2 of 7 checks passed
@dezren39
dezren39 deleted the queue/13794-6002-timeout-contract branch November 10, 2026 22:22
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