reference
Creator compensation finalization and engagement state
Explicit performance finalization, the engagement state owner and the host-bound evidence source of creator compensation v2.
Ported from the donor creator platform source @ 07bb01cc modules/compensation/src/obligations.ts (finalizePerformance), bundles/compensation-preview/src/managed-budget-composition.ts and the engagement state of modules/engagements (FINANCE-01e).
performance.finalizeis the explicit finance command (confirmed: true) that finalizes performance of one accepted, effective version. It is refused before every window cutoff (too_early); a missing metric isunavailable, never zero; no current managed-budget reservation isunavailablewithnot_managed_budget. A finalized version stores one immutable finalization (frozen input observation ids and digest) and credits the performance obligation; a repeated command is a replay and credits nothing. FINANCE-01f: a replay recomputes the evidence; when it changed since the finalization, the stored finalization is returned with a persistedlate_evidenceadjustment record (one per command id). A first finalize that needs review persists itsadjustment_requiredrecord too. The delta is computed only from known totals; unknown is null, never zero.finalize-adjustment.confirmis the finance decision (accept_deltawith the exact recorded delta, orretain_finalization); the finalization stays immutable and nothing is credited, debited or paid.reward.accrue2.0.0 never finalizes performance itself: past the cutoff and without a finalization it reportsawaiting_finalizationand credits only fixed lines. After finalization a different input set islate_evidence.- The engagement opens
awaiting_fundingat the first acceptance and becomesactivewhen a managed-budget reservation binds it.engagement.transitioncompletes or cancels it along fixed edges;completedandcancelledare terminal. FINANCE-01f: completion stores an immutable proof (approved delivery of every accepted deliverable; for performance terms an observed publication) collected by the runtime, and is refused without it (CREATOR_COMPLETION_PROOF_MISSING).engagement.dispute.openandengagement.dispute.resolve(resumed or cancelled; FINANCE-01h: the assigned support operator through a case, see below) record actor, reason and evidence references; a disputed engagement is cancelled only through its resolution. Every edge names its proving record and the store re-checks it.reward.accrue1.0.0 and 2.0.0 refuse a non-active engagement (CREATOR_ENGAGEMENT_NOT_ACTIVE). Amendments are refused on a cancelled or disputed engagement, and a reservation release forengagement_cancelledrequires the engagement to becancelled. - FINANCE-01g (verified against the donor creator platform source @ f4cb617b
completion.ts,mode-server.tsandwork-hold.ts): completion needs the current reservation of the effective version (CREATOR_ENGAGEMENT_NOT_FUNDED) and every fixed line proved by an approved delivery already accrued (CREATOR_COMPLETION_FIXED_LINES_PENDING; the source prepares the fixed obligation in the completing transaction). Opening a dispute and aresumedresolution need that reservation too; the dispute binds the effective version and resuming after it changed isCREATOR_TERMS_CHANGED. The hold suspends work only. - FINANCE-01h (D-116a, source
modules/operations/src/case-work-hold-*.ts@ f4cb617b): only the support operator assigned to an open support case of the engagement pauses (dispute.open) or resolves it, through an injected read-only case port bound by the host to the customer-support case owner; the creator domain holds no case model. Each act names the case, its current revision (CREATOR_WORK_HOLD_CASE_STALE) and the trusted policy version; the policy allows the case category and the action (CREATOR_WORK_HOLD_POLICY); no port or policy isCREATOR_WORK_HOLD_UNAVAILABLE; a case not assigned to the actor, of another engagement, resolved or whose assignee is not an active support operator isCREATOR_WORK_HOLD_CASE_FORBIDDEN; the case is re-read before the writes and any change refuses.resumedgoes through the case that paused the work (CREATOR_WORK_HOLD_FOREIGN_CASE). Cancellation through a resolution stays a target addition (policyallowCancel); the source has no engagement cancellation writer. - Migration of the FINANCE-01f mapping (organization owner or the creator opened, owner/admin resolved): those roles no longer pause or resume; they raise a support case (the reporter), and the assigned operator acts. Disputes opened under the 01f mapping keep
opening.case = nulland are read as is; their resolution goes through any open case of the same engagement assigned to the resolving operator, which the resolution binds. Resolved 01f disputes keepresolution.case = null. Nothing is rewritten. - FINANCE-01h completion: the accepted campaign mode is bound into the accepted version (
campaignMode; null islegacy_unspecified). Publishing modes (own_audience,brand_account_operation) need every publication slot1..publicationCountacknowledged in the host publication workspace (CREATOR_COMPLETION_PUBLICATION_MISSING); content-only and legacy modes need none and record no publication. - Hosts bind the read-only evidence source to social tracking rollups (provider observed, complete, compatible, definition version), the account capability matrix (
read_metricsavailable) and delivery approvals. - Nothing here moves money: no payment, payout, transfer or provider call.