Oko/Docs

Command reference

oko contributions report

Sends every record owed: one work.accepted event per task settled done with no standing acceptance, and one retraction, to the ledger's retractions route, per standing acceptance whose task is no longer done, naming the acceptance it reverses (`retracts`) and why (`cause`: the task's status and the reason the map gives). The ledger reverses the credit that acceptance earned once. The same work is never credited twice while it stands accepted, and is credited again once it is accepted again after a retraction; an acceptance whose only judge is its own author earns nothing.

Invocation#

Command
oko contributions report [--ledger URL] [--json]

Inputs and options#

  • Each task's history is read from what the ledger holds, one request per generation: a task's first acceptance is the event `<task>`, its retraction `<task>#retracted`, and the acceptance after a retraction `<task>#<n>` for the n-th, retracted as `<task>#<n>#retracted`. A done task with no standing acceptance owes its next acceptance; a task that is no longer done and whose acceptance stands owes its retraction.
  • --ledger URL names the contribution ledger (compute.wisent.com); without it, OKO_CONTRIBUTION_LEDGER_URL does. The bearer is read from the item playing oko-contribution-ledger under consumer oko-contribution-client.

Output and state effect#

  • Sends only what is owed. Prints `<ledger>: <n> event(s) owed (<r> retraction(s)), <held> acceptance(s) already held, <recorded> newly recorded, <refused> refused, <undated> not reported for want of a settled time`; --json prints the whole answer, each sent event with its `retracts`.

Refusals and safe exits#

  • With no ledger named (no --ledger, no OKO_CONTRIBUTION_LEDGER_URL) the report is refused by name rather than skipped.
  • `oko contributions report: the ledger refused <event>: <cause>; …` exits unsuccessfully after the rest were sent; the answer still names what was sent. The ledger's own sentences include a second acceptance of a task whose acceptance stands, and a retraction of an acceptance it already retracted.

CLI reference#