Skip to main content

Module platform

Module platform 

Source
Expand description

The platform API: signed op submission and view queries over HTTP.

This is the production composition the sequencer’s policy.rs test proved: signature verification (choir-identity) + cached-view CAS (choir-view) running inside the single-writer thread. The daemon fronts it with signed single and batch submission, materialized-view and log reads, workspace provisioning, and review-queue endpoints. The two core operation paths are:

  • POST /api/submit — body {"channel", "payload_hex", "key_id", "signature_hex"}; workspace remains accepted as the legacy v1 alias for channel. Payload bytes are a serialized ViewOp. Admitted ops answer {"seq", "hash"}; rejections are HTTP 400 with the policy’s reason.
  • GET /api/view — the current materialized state plus runtime-only projections for D24 T3 concentration and complete-view growth. They derive from the same coherent snapshot and never enter persisted ops or hash input.

Hex (not JSON-embedding) carries the payload because the signature covers the exact bytes the author serialized; re-encoding through a JSON tree could legally reorder/respace them and break verification.

Structs§

AuthorizedChangeCreate
Exact owner-authorized binding the node records after materializing a physical workspace.
LogWindow
Sliding window over recent admitted entries: base is the seq of the first held entry, so /api/log?from= keeps absolute semantics after old entries are dropped (full history lives in the op log).
Platform
A running platform: the sequencer plus the shared view it maintains.
RefFinding
One disagreement found by Platform::survey_git_refs.
RefReconciliation
What Platform::reconcile_git_refs did, so a caller can report it. An all-empty report is the normal case and the only silent one.
ReviewRetention
Operator-selected bound for live review detail retained in memory.

Enums§

RefState
How one ref disagrees between the log and a bare repo.

Constants§

DEFAULT_BATCH_OPS
Default maximum operations accepted in one /api/submit-batch body.

Functions§

hex_decode
Decodes lowercase/uppercase hex; None on any bad input.
hex_encode
Encodes bytes as lowercase hex (client-side convenience, used by tests and the demo).