Skip to content

CAP-ACC-REC-016Accept an understood problem with the required approval

Markdown

CAP-ACC-REC-016

Accept an understood problem with the required approval

Markdown
  • DocumentDraft
  • Product intentConfirmed
  • ImplementationObserved

KindCapabilityProduct areaAccountingModuleReconciliationRevision2

Read atservices-accounting f47cb263react-console baf6dae3

The Formal Contract

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

Outcomes
Independent acceptance removes a blocker only after approval.The policy reason and both decision identities remain reviewable.
Surfaces
consoleapi
Intent sources
services-accounting:docs/reconciliation/architecture.md#13.2 Workflow (Andrew's Decision 2, 2026-10-16)services-accounting:docs/milestones/plans/ACCT-M8-plan.md#D6 (architecture §3.4 U10, U12: Accept is a separate permissioned action)

Controls

31 controls apply, from the corpus control catalogue.

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

Permissions

KeyChecked atScope
accounting.reconciliation-exceptions.acceptapitenant
accounting.reconciliation-exceptions.acceptconsoletenant

Business Rules

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

IdRuleKindEnforced atProvenance
01must prove
Confirmed
A warning can be accepted immediately by one accept-authorized person who supplies a resolution, without an approver.
origin: services-accounting:docs/reconciliation/architecture.md#13.2 Workflow (Andrew's Decision 2, 2026-10-16)
policyservice, databasetest
02must prove
Confirmed
Blocker acceptance first stores a resolution request without closing the open or investigating problem; it continues to block and another pending request is rejected.
origin: services-accounting:docs/reconciliation/architecture.md#13.2 Workflow (Andrew's Decision 2, 2026-10-16)
policyservicetest
services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-exceptions.integration.spec.js#records a blocker’s acceptance request by the first user and leaves it open (`exception.acceptance-requested`); services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-exceptions.integration.spec.js#refuses a second acceptance request while one is pending (409, `acceptance_already_requested`); services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#answers 200 with the blocker still open and its acceptance requested by the caller; services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses an approvedById in the body with 400 approved_by_id_not_allowed
03must prove
Confirmed
Approval requires a different accept-authorized person and current version, refusing self-approval or approval without a pending request.
origin: services-accounting:docs/reconciliation/architecture.md#13.2 Workflow (Andrew's Decision 2, 2026-10-16)
permissionservice, databasetest
services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-exceptions.integration.spec.js#refuses the requester’s own approval (403, `second_user_required`); services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-exceptions.integration.spec.js#refuses an approval at a version that is not the exception’s (409, `stale_version`); services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-exceptions.integration.spec.js#accepts the blocker on a second user’s approval, the requester its resolver (`exception.accepted`); services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-exceptions.integration.spec.js#answers the approver’s own approval again under a new key (state idempotency); services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-exceptions.integration.spec.js#refuses the approval of a blocker with no acceptance requested (409, `no_acceptance_requested`); services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#answers 200 with the blocker accepted, the requester its resolver and the second user its approver
04must prove
Confirmed
Successful approval accepts the blocker, retains the requester as resolver and records the approver, with repeat approval by that approver returning the same result.
origin: services-accounting:docs/reconciliation/architecture.md#13.2 Workflow (Andrew's Decision 2, 2026-10-16)
lifecycleservicetest
services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-exceptions.integration.spec.js#accepts the blocker on a second user’s approval, the requester its resolver (`exception.accepted`); services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-exceptions.integration.spec.js#refuses the requester’s own approval (403, `second_user_required`); services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-exceptions.integration.spec.js#refuses an approval at a version that is not the exception’s (409, `stale_version`); services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-exceptions.integration.spec.js#answers the approver’s own approval again under a new key (state idempotency); services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-exceptions.integration.spec.js#refuses the approval of a blocker with no acceptance requested (409, `no_acceptance_requested`); services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#answers 200 with the blocker accepted, the requester its resolver and the second user its approver
05must prove
Confirmed
Clients cannot supply the approval identity; Rhythm derives it from the person performing approval.
origin: services-accounting:docs/reconciliation/architecture.md#13.2 Workflow (Andrew's Decision 2, 2026-10-16)
validationapitest
services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses an approvedById in the body with 400 approved_by_id_not_allowed; services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-exceptions.integration.spec.js#records a blocker’s acceptance request by the first user and leaves it open (`exception.acceptance-requested`); services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-exceptions.integration.spec.js#refuses a second acceptance request while one is pending (409, `acceptance_already_requested`); services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#answers 200 with the blocker still open and its acceptance requested by the caller
06must prove
Confirmed
Only the original requester can withdraw a pending acceptance, clearing the request while leaving the blocker open; absent requests cannot be withdrawn.
origin: services-accounting:docs/reconciliation/architecture.md#13.2 Workflow (Andrew's Decision 2, 2026-10-16)
policyservicetest
services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-exceptions.integration.spec.js#withdraws the request by its requester, clearing it and leaving the blocker open (`exception.acceptance-withdrawn`); services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-exceptions.integration.spec.js#refuses another user’s withdrawal (403, `acceptance_requester_only`); services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-exceptions.integration.spec.js#refuses a withdrawal with no acceptance requested (409, `no_acceptance_requested`); services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-exceptions.integration.spec.js#records each refused withdrawal as `exception.acceptance-withdrawal-refused`; services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#records the withdrawal in the exception’s history
07must prove
Confirmed
Database constraints require an accepted blocker’s request and independent approver, forbid warning approvers and reserve pending requests for blockers.
origin: services-accounting:docs/reconciliation/architecture.md#13.2 Workflow (Andrew's Decision 2, 2026-10-16)
invariantdatabasetest
08must prove
Confirmed
Human resolution or detector clearing also removes a pending acceptance request and records its removal.
lifecycleservicetest
services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-exceptions.integration.spec.js#clears a pending acceptance request when the exception is resolved, saying so in `exception.resolved`; services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-exceptions.integration.spec.js#clears a pending acceptance request when its condition is cleared
09must prove
Confirmed
Acceptance operations require replayable request keys, reject changed bodies and record refused commands in exception history.
origin: services-accounting:docs/reconciliation/architecture.md#13.2 Workflow (Andrew's Decision 2, 2026-10-16)
validationapi, servicetest
services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-exceptions.integration.spec.js#records each refused request and approval, and leaves the blocker open with its request pending; services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses a principal who may update exceptions but not accept them with 403; services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses an accept without an Idempotency-Key with 400 idempotency_key_required; services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-exceptions.integration.spec.js#refuses the request’s key sent with another request (409, `idempotency_key_reused`); services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#records each refused acceptance command in the exception’s history
10must prove
Confirmed
Accept permission, a sensitive administrator approval beyond update, governs request, approval and withdrawal.
permissionapitest
services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses a principal who may update exceptions but not accept them with 403; services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses an accept without an Idempotency-Key with 400 idempotency_key_required; services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-exceptions.integration.spec.js#refuses the request’s key sent with another request (409, `idempotency_key_reused`); services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#records each refused acceptance command in the exception’s history
11
Confirmed
The console collects an acceptance reason, identifies the pending requester and offers approval and withdrawal through accept permission checks.
policyconsoleobserved

Scenarios

IdGivenWhenThenProvenance
01The gift has an active overdue blocker.Have its requester approve acceptance, then obtain another person’s approval.Self-approval fails and independent approval records requester as resolver and the other person as approver.test
services-accounting:modules/reconciliation/tests/e2e/reconciliation-scenario.e2e.spec.js#step 11: accepts the exception on priya’s approval, marcus its resolver
02Acceptance is waiting for approval.Try withdrawal as someone else.Only the request’s owner can withdraw.test
services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses another user’s withdrawal of the request with 403 acceptance_requester_only

Edge Cases

IdGivenWhenThenProvenance
03The gift’s acceptance request remains pending.Assess October readiness.The money still blocks and the finding links its exception.test
services-accounting:modules/reconciliation/tests/e2e/reconciliation-scenario.e2e.spec.js#step 11: still blocks October on the gift, naming its exception, while the acceptance awaits approval

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.