# One question, one producer: the shared-quantity register

> Canonical: https://blazephoenix.xyz/learn/one-question-one-producer/
> License: CC BY-NC-ND 4.0 (attribution + link) · © 2026 BlazePhoenix
> Updated: 2026-11-16

Write the number down once, with the question it answers: every quantity that more than one place produces or consumes goes into a register that names its question and what binds the copies, either a single producer or a named test that asserts the producers agree. This prevents the defect a router is most exposed to, two components answering one question in two frames, such as a preview and a delivery.

## The short answer

Write the number down once, with the question it answers. Every quantity that more than one place produces or consumes goes into a register. The register states the question, and says what binds the copies: either one producer with a CI check that forbids a second, or a named test that asserts the producers agree and states what it pins. A CI check then fails the build when a row's test does not actually reach the quantity the row claims to tie.

## The failure this prevents

The defect class a router is most exposed to is not a missing check. It is two components answering one question in two frames: a planner and an executor, a preview and a delivery, a quote and a fill. Each answer can be individually right while the pair still disagree, and nothing in either component looks wrong on its own.

The project states the rule in its contributor guide as rule 3, "One question, one producer" (AGENTS.md, lines 20 and 21), and in docs/AUDIT_METHOD.md, section 4, "One question, one answer" (lines 63 to 72).

## What a row looks like

The public form of the register is Appendix D of the whitepaper: each quantity, the question it answers, and its producer. A few rows, as published:

## The two ways to bind a quantity

Single producer: the quantity is derived in one place and imported everywhere else, with a CI guard forbidding a second copy. Nothing can disagree because there is one answer.

Named agreement test: the producers stay, and a named test asserts they agree and states what it pins. The agreement tests are ordinary invariants, which is what makes them checkable. invariant_encodeAgreesWithPreview and invariant_accountingNeverDrifts tie the Quoter's preview to the encoded plan; invariant_Sq_BothSolversAnswerTheSameBytes ties the two solver paths to one answer.

The register grades each row from SINGLE (one producer, nothing to disagree) to PINNED (a named test ties the copies). Only the grading method is published in prose; read each row's status in the repository at the commit you are checking, because a status describes the day it was written.

## The totals

The count is taken over the rows of the register at those commits, so it moves when the register does. Check the commit before you compare numbers.

## The boundary, so the rule is not over-applied

Single production is for primitives: a quantity every consumer needs derived from the source. The predicates that decide acceptance keep their redundancy on purpose, because a refusal that two independent checks can each make is stronger than a refusal one check makes. That is the subject of the article on the morphism and the invariant.

## Check it yourself



**Verify it yourself:** In a clean checkout of Blaze-Phoenix-Dex at 969bcc6: sed -n 1,30p SHARED_QUANTITIES.md (the rule); grep -n -i "Floors and fees|Registry state|Identity and keys|Transient state|Measurement harness" SHARED_QUANTITIES.md (the five sections); bash .github/scripts/shared-quantities.sh (the register agrees with the tree). Same at Blaze-Phoenix-Staking c0366cf for the 37-row register. Whitepaper 2.4: section 2.5 and Appendix D.

Related: https://blazephoenix.xyz/learn/measurement-at-every-seam/ · https://blazephoenix.xyz/learn/invariant-decomposition-law/ · https://blazephoenix.xyz/learn/morphism-is-not-an-invariant/
