Skip to content

fix(OMN-13408): OCC contract — extend to tokens dimension (tokens_input/tokens_output carry) - #2901

Merged
jonahgabriel merged 3 commits into
devfrom
jonah/omn-13408-occ-tokens
Jun 22, 2026
Merged

jonahgabriel merged 3 commits into
devfrom
jonah/omn-13408-occ-tokens

Conversation

@jonahgabriel

Copy link
Copy Markdown
Contributor

OMN-13408 — OCC contract extension: tokens dimension

Sibling half of the already-landed cost_usd fix (omnimarket #1332 / OCC contract #2890 + receipt #2894). This PR additively extends the existing contracts/OMN-13408.yaml to cover the tokens_input/tokens_output dimension — it does not duplicate the ticket or create a new contract.

What changed

  • contracts/OMN-13408.yaml — title/summary now describe both dimensions; new dod-tokens evidence item binds the tokens regression test.
  • drift/dod_receipts/OMN-13408/dod-tokens/command.yaml — new paired receipt for the tokens evidence item (verifier ≠ runner; probe_stdout captured).
  • drift/dod_receipts/OMN-13408/dod-001/command.yaml + dod-occ-pr/command.yaml — re-bound contract_sha256 to the current contract hash (the contract mutated; both probes re-run, still PASS). Receipt Hardening Gate requires receipt sha to match sha256(contracts/OMN-13408.yaml).

Product PRs this contract governs (tokens dimension)

Both product PRs will pin Evidence-Source to this PR's squash merge-commit (OCC squash invalidates a pre-squash Evidence-Source SHA).

Honest scope note

The fix is the additive wire + compat carry only. An independent DEV-lane live projection readback (correlation_id badf851a, terminal topic onex.evt.omnibase-infra.delegation-failed.v1) still reads tokens_input=0/tokens_output=0 because served Gemini usage is dropped upstream before response.prompt_tokens / workflow.inference_*_tokens are read on the escalated-failed path. Threading the served usage into the canonical terminal event on that path is a separate follow-on. No buyer-facing savings claim — measured DEV proof only (OMN-12296 Integration Lock in force).

dod_evidence

  • dod-001 (cost test, re-bound) — PASS
  • dod-tokens (tokens regression test) — PASS
  • dod-occ-pr (self-binding OCC receipt, re-bound) — PASS

Receipt Honesty + Receipt Hardening gates pass locally (pre-commit run --all).

Epic: OMN-13471. Parent: OMN-12296.

…ut/tokens_output carry on canonical terminal/compat events)

Additively extends the existing OMN-13408 OCC contract (cost_usd half landed
via omnimarket #1332 / OCC #2890) to cover the sibling tokens dimension:
- omnibase_core #1300 adds additive fields tokens_input/tokens_output
  (int, default=0, ge=0) on the canonical wire DTO ModelTaskDelegatedEvent
- omnimarket #1336 populates them from served prompt/completion tokens on
  both terminal compat paths in HandlerDelegationWorkflow
New dod-tokens evidence item + paired receipt bind the tokens regression test.
Existing dod-001/dod-occ-pr receipts re-bound to the current contract sha256
(contract mutated; probes re-run, both still PASS). No new REST route, no
bespoke endpoint, no direct DB write — additive event-bus carry only.
@coderabbitai

coderabbitai Bot commented Jun 22, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

@jonahgabriel, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 34 minutes and 58 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7862bb86-6948-48d3-9102-49c77d9e362c

📥 Commits

Reviewing files that changed from the base of the PR and between 33c69fc and e062be7.

📒 Files selected for processing (4)
  • contracts/OMN-13408.yaml
  • drift/dod_receipts/OMN-13408/dod-001/command.yaml
  • drift/dod_receipts/OMN-13408/dod-occ-pr/command.yaml
  • drift/dod_receipts/OMN-13408/dod-tokens/command.yaml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jonah/omn-13408-occ-tokens

Comment @coderabbitai help to get the list of available commands and usage tips.

@jonahgabriel
jonahgabriel enabled auto-merge June 22, 2026 14:00
@jonahgabriel
jonahgabriel added this pull request to the merge queue Jun 22, 2026
Merged via the queue into dev with commit 6320043 Jun 22, 2026
38 checks passed
@jonahgabriel
jonahgabriel deleted the jonah/omn-13408-occ-tokens branch June 22, 2026 14:14
jonahgabriel added a commit that referenced this pull request Aug 25, 2026
#7134)

* evidence(OMN-16557): OCC contract for OmniNode-ai/omnibase_infra PR #2901

* evidence(OMN-16557): PASS receipts for OmniNode-ai/omnibase_infra PR #2901

* evidence(OMN-16557): add occ-self-bind for PR #7134

* evidence(OMN-16557): recompute contract_sha256 across receipts + self-bind receipt for PR #7134
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