Skip to content

Calls propose, verdicts dispose

Reading of harness/docs/decisions/calls-propose-verdicts-dispose.md. If this page and that file disagree, the source file wins.

Every input is processed map-then-reduce.

Mappers (programs) are pure: (event, fold-views, KV-snapshot) → proposals. Introducing a mapper is SAFE.

Reducers consolidate. Each takes (original, accumulated) and may override the previous reducer’s output. Introducing a reducer is a DANGEROUS operation requiring audit.

The first reduce layer is hardcoded host law. It does shape-consolidation only (e.g. array→string), and it always runs first. Plugin reducers run after it, so the LAST reducer has final say. Safety rests on the audit gate, not on host-final-say.

Audit is a dedicated hook lane. Audit hooks are themselves mappers. They produce go / no-go / Question (“here are my concerns, confirm”). The default audit reducer is hardcoded: any no-go → no-go; else concerns exist → surface for a human approved write (../runtime/approval.md); else auto-approve.

Reducer chain order is C3 linearization over plugin dependency declarations. Plugins may depend on plugins. Ties are broken by programId.

Supporting laws: post-chain shape validation treats schema-invalid reducer output as a timeout. Skip that reducer and keep the prior accumulated value. Drops/skips/timeouts are observable on the dispose series / host notices, not via a global session event monoid.

Work authority and chrome derive from PEW + SessionRoot folds, not from replaying a session event monoid. The map/reduce propose → audit → dispose law is the program path only.

Mapper-safety / reducer-danger is asymmetric because mappers cannot decide. They only propose. A buggy or malicious mapper produces a bad proposal that still has to survive the reduce chain. A reducer holds override authority. A bad reducer can silently invert an upstream verdict, which is the class of bug the audit lane exists to catch.

Host shape-consolidation runs first so that “last reducer wins” stays meaningful for plugin authors, and so the accumulated value is always well-shaped before any plugin reducer sees it.

C3 linearization is used rather than registration order or priority numbers. It is the same dependency-respecting order already used for capability-symbol composition elsewhere, so authors learn one ordering rule.

A schema-invalid reducer output is a timeout, not a crash. A malformed reducer degrades to “was skipped” instead of corrupting the accumulated verdict.