Skip to content

fix(runtime): preserve bridge terminal accounting - #825

Merged
drewstone merged 3 commits into
mainfrom
fix/bridge-profile-ack-on-failure-20260813
Aug 13, 2026
Merged

fix(runtime): preserve bridge terminal accounting#825
drewstone merged 3 commits into
mainfrom
fix/bridge-profile-ack-on-failure-20260813

Conversation

@drewstone

Copy link
Copy Markdown
Contributor

Summary

  • Publish a validated cli-bridge profile acknowledgement when a provider error follows a terminal [DONE] receipt.
  • Emit an explicit usdKnown: false cost event when a bridge turn has no trusted billed-cost receipt.
  • Retry only the explicit candidate_grant_draining settlement state with bounded backoff until the caller deadline.
  • Release Runtime 0.133.7 and document the consumer-visible accounting behavior.

Evidence

Calibration E retained evidence showed:

  • A provider-known terminal run with 314,561 input tokens and 21,593 output tokens was recorded as usd: 0, usdKnown: true.
  • A provider failure after bridge materialization was recorded without the Runtime terminal materialization acknowledgement.
  • Candidate-grant closeout returned 409 candidate_grant_draining, leaving settlement unknown.

Checks

  • pnpm exec vitest run src/runtime/supervise/bridge-executor.test.ts --reporter=dot — 30 passed.
  • pnpm exec vitest run tests/candidate-execution-model-port.test.ts --reporter=dot — 39 passed.
  • pnpm run typecheck — passed.
  • pnpm run lint — passed.
  • pnpm run build — passed.
  • pnpm run check:version-bump — passed.
  • pnpm run check:testing-fixture — passed.
  • pnpm run docs:freshness — passed.
  • Full pnpm test — 2,593/2,600 passed; one existing timing-sensitive restart test failed under parallel suite contention and passed in isolation.

@tangletools tangletools left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Auto-approved drewstone PR — 872abe1c

This PR was opened by the trusted drewstone account.
The full PR reviewer audit still runs separately and will publish findings if it detects issues.

This approval is provisional. It rests on the audit running. If the audit cannot run — for example the CLI bridge rejects it — this approval is dismissed rather than left standing, so an unrun check never reads as a passing one.

tangletools · auto-approval · reason: drewstone_author · 2026-08-13T19:58:50Z

@drewstone
drewstone merged commit 4f6e705 into main Aug 13, 2026
4 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.

2 participants