Skip to content

CAP-PFM-LLM-009Recover interrupted requests and identify accounting drift

Markdown

CAP-PFM-LLM-009

Recover interrupted requests and identify accounting drift

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationObserved

KindCapabilityProduct areaPlatformModuleAI Requests, Usage and the Jazz AI TeammateRevision1

Read atservices-platform ad3f6a65

The Formal Contract

The narrative above explains; the sections below are authoritative — the rules, scenarios and tests this document binds.

Outcomes
Recovery settles eligible stranded requests and releases reservations.Stalled tasks receive an abandoned outcome.Task accounting drift is reported for investigation.
Surfaces
job
Postconditions
Eligible stranded work receives recovery outcomes.

Controls

23 controls apply, from the corpus control catalogue.

TC-AI-006 TC-AI-007 TC-AVL-001 TC-AZ-001 TC-AZ-002 TC-AZ-003 TC-AZ-004 TC-DAT-001 TC-DAT-002 TC-DAT-003 TC-LOG-005 TC-MON-001 TC-MON-002 TC-PI-001 TC-PI-005 TC-PRV-001 TC-PRV-002 TC-TEN-001 TC-TEN-002 TC-TEN-003 TC-VEN-001 TC-VEN-002 TC-VEN-003

Business Rules

7 rules, 5 to be proved before approval. A rule's product intent is derived from its origin: 0 confirmed by a product decision, the rest inheriting this capability's proposed.

IdRuleKindEnforced atProvenance
01must prove
Proposed
Hourly reconciliation visits operational organizations and settles requests older than twenty-four hours at their stored estimate without a money figure, releasing their recorded holds.
lifecycleserviceobserved
02must prove
Proposed
Requests inside the recovery window keep their state and reservations.
policyservicetest
03must prove
Proposed
Repeating successful recovery does not add another charge or another past-window alert for the same request.
invariantservice, databaseobserved
04
Proposed
Each organization’s recovery pass handles a bounded batch and defers remaining requests to another run.
policyservicetest
services-platform:modules/llm/tests/integration/services/reconciliation/llm-settlement-sweep.integration.spec.js#settles only as many as the batch allows, so one tenant cannot make a run unbounded
05must prove
Proposed
Stale running executions become abandoned with the detection time, no duration and their existing settlement totals.
lifecycleservice, databaseobserved
06must prove
Proposed
The drift check compares recently closed executions from the last seven days with settled requests, logs both figures and identities on disagreement, and changes no totals.
policyserviceobserved
07
Proposed
A request beyond the recovery window contributes a once-only alert measure, and missing reconciliation runs have a separate alarm.
policyserviceobserved

Scenarios

IdGivenWhenThenProvenance
01A worker stops after provider dispatch and leaves a reservation.Recovery processes the eligible request.Fallback settlement releases its hold and records the recovery charge.test

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.