Proposed adr-002 · 2026-10-23

The wuwei Contract Is a Published Contract, Frozen by Version: Once Accepted, a Version Does Not Change, and Every Event Says Which One It Was Written Under

Context

Contract 4 (code/schemas, version "4") was changed three times inside its own number while the session view was built against it, each time because a session of the consensus found a gap before anything bound to it: the principal's warrant made required with 'Asserted { by } (specdossier), one PartyRef grammar for origin.principal and Party.ref (specdossier), and Event.contract (the principal). Changing a type inside a version was harmless only because no trace was written in production under it and no third party implemented it yet.

What it costs to change a contract is not wuwei's to define. ontoref governs it: adr-082 and its surface `release-and-version-governance` derive what a change owes from the declared dependency edge, not from the size of the diff, and for an 'OpenHostService — a published contract — "changing it IS the breakage". adr-074 says a carrier invokes the governed surface and never replicates it.

What is wuwei's: which edge its contract is, when a version stops changing, and what a later version owes the traces of an earlier one. Frames deny unknown fields and the trace on JetStream outlives the implementation that wrote it, so a type change reaches every writer and every reader: the service, each harness's adapter, the session view, any implementation the kit judges, and every trace already written.

Decision

The wuwei contract (code/schemas: the wire frames, the trace's events, the records, the Deployment; the Rust mirror wuwei-contract and the conformance kit) is a published contract: towards anyone who implements it or reads its traces it is an 'OpenHostService in ontoref's sense (adr-082), and what a change owes is ontoref's table, invoked, never restated here.

1. A version is FROZEN when the owner accepts the changes of code/ that complete it. Contract 4 is frozen by accepting, in code/, the changes up to Event.contract. From then on nothing of a frozen version changes: not a field, not a variant, not a refusal made stricter or looser.

2. Every change of a type after the freeze is a NEW VERSION. It moves `contract_version` in code/schemas/primitives.ncl — the one place the number lives; wuwei.ncl's `version` is it and Rust's CONTRACT_VERSION is held to it by test — and it says, in its own decision, how it reads the traces of the versions before it: read them as they were written, or migrate them; never decode them as if they were its own.

3. Every event carries the version it was written under (Event.contract). A reader of version N refuses an event of another version by name, never by guessing from its shape; the Rust type admits only the current version, so an implementation cannot write another.

5. NO AUTHORITY IS NECESSARY: the version is negotiated, as TLS negotiates it. A registration says the versions it speaks (Registration.speaks); the implementation takes its own when it is offered, or answers Unsupported with both ranges. Nobody imposes a version on another, and the kit's §8.12 VersionNegotiated refuses an implementation that does.

6. The agreement of a version — what it covers and what it does not — is data of the contract (schemas/wuwei.ncl `agreement`) and is named by its digest. Any carrier spreads it (the service announces it on <prefix>_agreement; a file, a forge, a dossier may as well) and none is trusted for it: a reader recomputes the digest. Endorsements are optional, independent signatures a reader's policy may ask for; none is the root of trust, so no signer's absence, failure or change of mind compromises the protocol. Two limits are part of the format (signatio, 2026-10-23): an endorsement's `by` is a claim until the reader holds its key from elsewhere (a pinned authority key, a level's witness.pub), and which agreement is IN FORCE is the reader's policy over the endorsements it trusts — `supersedes` is a claim and never wins on its own. The plurality is the agreement's: an authority's Decision or Attestation in Party.warrant stays single-issuer, worth what its signer is worth.

4. A project that implements the contract or reads its traces declares it through its bond to the domain wuwei (.domains-ontoref/wuwei/bonds.ncl); which version it follows is declared there once ontoref's bond schema carries it (proposed to ontoref, its decision).

Constraints

Alternatives considered