Skip to content

REQ-VISUALIZATION-008: settlement guide conflates transfer conservation with later physical source/sink flows #447

Description

@drevendev

Goal

Bring docs/reference/market-settlement-and-taxes.md into conformance with the canonical stock/flow model without changing runtime behavior or economic mechanics.

Evidence

The current public guide contains two linked statements that become false or materially misleading once later canonical milestones are considered:

  1. Under Reconciliation: Goods and Money Balance, it says: After every tick, the system checks that goods and money are conserved and then The total quantity of each good across all actors is conserved. Canonical v1 does not require aggregate goods stock to remain constant across a tick. Production creates output from typed real inputs/resources/labor/capacity; household consumption, spoilage and physical losses are explicit sinks. What is conserved during an ordinary trade is the transfer itself: seller decrement equals buyer increment, while whole-tick reconciliation must account for every typed source/sink rather than force net-zero goods change.
  2. In the following Money paragraph, the guide says later sources or sinks (production value creation, consumption value destruction, or monetary policy) will arrive. Read in that paragraph, this implies production/consumption are possible money sources/sinks. Canonically, production/consumption alter physical goods stocks; ordinary production/consumption must not create or destroy transaction money. Money creation/destruction is restricted to explicitly authorized monetary/genesis operations.

Canonical handoff rules are explicit: ordinary transactions transfer money but do not create/destroy it; goods/capital/resources/population changes require typed sources/sinks; money creation/destruction exists only in authorized monetary/genesis operations. The production contract also states that cash is a budget constraint and cannot become output or capacity directly.

Scope

Documentation-only repair in docs/reference/market-settlement-and-taxes.md:

  • distinguish transaction-level transfer conservation from whole-tick stock reconciliation;
  • say that a market sale itself is zero-sum for the traded good and transaction money (plus tax destination), while whole-tick goods totals may change through typed production/consumption/spoilage/loss flows;
  • remove any wording that can imply production or consumption create/destroy money;
  • preserve the current M3 settlement/tax examples and telemetry explanation.

Non-goals

  • No runtime, ledger schema, accounting identity, production formula, consumption rule, tax rule, phase order, acceptance threshold, or v1 scope change.
  • Do not patch docs/spec/mirror/.
  • Do not redesign the article beyond the minimum factual correction.

Acceptance criteria

  1. The article no longer claims aggregate goods quantity is conserved across every whole tick.
  2. It explicitly distinguishes trade-transfer conservation from typed physical sources/sinks across the tick.
  3. Production/consumption are described only as goods/physical stock source/sink processes, never as transaction-money creation/destruction.
  4. Money creation/destruction remains attributed only to explicitly authorized monetary/genesis operations.
  5. Existing settlement, tax, inventory-endpoint, telemetry, and atomicity explanations remain intact.
  6. Documentation/build checks remain green.

Verification

Compare the edited article against START_HERE global stock/flow rules, MASTER_IMPLEMENTATION_INDEX section 6, and the production contract's rule that output may increase only through real production inputs and cash cannot become output directly. This is public-text conformance work only.

Activity

  1. added
    priority:highImportant and time-sensitive; schedule ahead of normal work
    type:bugVerified behavior differs from the intended contract
    status:readySpecified and unblocked; safe for an agent to claim
    on Sep 11, 2026
  2. added a commit that references this issue on Sep 15, 2026
  3. added a commit that references this issue on Sep 15, 2026
  4. added a commit that references this issue on Sep 15, 2026
  5. zendev-author commented on Sep 15, 2026

    @zendev-author
    Contributor

    ROLE: AUTHOR (unattended run, 2026-09-15).

    Claim. Taking this Issue as this run's single bounded unit of work.

    Selection path (AUTHOR_RUNBOOK section 2). Items 1–2 are empty — gh pr list --state open returns no open pull requests. Item 3 is empty — no Issue carries status:blocked. At item 4 three Issues are priority:high + status:ready and not labelled policy: #482, #447, #269. docs/spec/mirror/EXECUTION_ORDER.md line 14 names M3 as the earliest milestone whose dependencies are satisfied and states that REQ-VISUALIZATION-007/008 may proceed while market-correctness repairs continue; #447 is the oldest of the three and is bounded documentation work that can be fully completed in one unit. #269 (REQ-VISUALIZATION-006) is a full Pages experience with ten acceptance criteria, and #482 is a scripts/ control-plane repair whose stated verification requires pushing an unrelated commit to master, which an AUTHOR run may never do.

    Intended scope. Documentation-only repair of docs/reference/market-settlement-and-taxes.md, exactly as Scope lists it: separate transaction-level transfer conservation from whole-tick stock reconciliation, stop claiming aggregate goods quantity is conserved across a whole tick, and remove wording that can imply production or consumption create or destroy transaction money. Existing M3 settlement/tax examples, inventory-endpoint text, telemetry explanation and atomicity text are preserved. Plus the one ledger row for REQ-VISUALIZATION-008 in docs/spec/implementation_status.csv and its regenerated table, inside the same pull request.

    Branch. claude/issue-447-settlement-conservation

    Known constraint, declared up front. The Verification section asks for comparison against START_HERE, MASTER_IMPLEMENTATION_INDEX section 6 and the production contract. Reading those three is a recursive read of the specification mirror, which AGENTS.md and AUTHOR_RUNBOOK section 4 forbid: this run may read the registry, the changelog, and the single document named by the requirement's FILE/ANCHOR columns. I will therefore read docs/spec/mirror/06 - Handoff/11 — REPOSITORY_MIGRATION_AND_MILESTONE_GATES.md only, and take the canonical stock/flow rules from this Issue's own Evidence section, which states them explicitly. That is an assumption I will record in the pull request rather than silently resolve.

    No other blocker known at claim time.

  6. added
    status:in-progressClaimed work with an active branch or pull request
    and removed
    status:readySpecified and unblocked; safe for an agent to claim
    on Sep 15, 2026
  7. added
    status:needs-reviewImplementation complete, awaiting acceptance
    and removed
    status:in-progressClaimed work with an active branch or pull request
    on Sep 15, 2026
  8. zendev-author commented on Sep 15, 2026

    @zendev-author
    Contributor

    ROLE: AUTHOR — handoff.

    Pull request. #489. Branch. claude/issue-447-settlement-conservation. Tested revision. efde005a09884e84af4a0a4b74f4d91ffe2ef815 — the branch tip; every check below was re-measured on this exact revision after the ledger commit landed, so none of the evidence is stale.

    What changed. Three paths, all documentation: docs/reference/market-settlement-and-taxes.md, docs/spec/implementation_status.csv, docs/spec/IMPLEMENTATION_STATUS.md (regenerated, not hand-edited). The reconciliation section now separates transaction-level transfer conservation from whole-tick stock accounting; production, household consumption, spoilage and physical loss appear only as typed physical sources and sinks; money creation and destruction is confined to authorized monetary and genesis operations. The settlement and tax examples, the inventory-endpoint rule, the atomicity text and the whole telemetry section are byte-identical to master.

    Checks — every one passed, measured on efde005. npm run typecheck clean; npm test 612/612 across 41 files; npm run build succeeded; implementation_status.py --check clean (29 ledger rows over 49 registry rows); pytest scripts/tests 503 passed with 239 subtests; status_lint.py --self 489 agrees; dotnet restore and dotnet build --configuration Release succeeded with 0 warnings and 0 errors; dotnet test --configuration Release 45/45, so REQ-MIGRATION-003 is maintained. policy_guard.py and scope_guard.py were also run locally against origin/master and both pass.

    Decision recorded. The ledger row for REQ-VISUALIZATION-008 moves from PARTIAL to IMPLEMENTED. PR #486 left the row open specifically pending this repair and asked for every registry ACCEPTANCE item to be re-checked before promotion; that re-check is written into the evidence cell, which also names all four contributing pull requests (#382, #405, #486, #489). MERGE_COMMIT is left empty for backfill_merge_commits.py.

    not_run, stated as such rather than promoted. This Issue's Verification section asks for comparison against START_HERE, MASTER_IMPLEMENTATION_INDEX section 6 and the production contract. Reading those three is a recursive read of the mirror, which AGENTS.md and AUTHOR_RUNBOOK section 4 forbid, so it was not done. Both corrected claims are instead each confirmed by a source this run was permitted to read: validateZeroFlowReconciliation in src/simulation/ledger.ts reconciles recorded MONEY/GOOD transfer flows and exempts PHYSICAL_LOSS as one-sided destruction (ledger.ts:183-185), and Gate M3 in the single registry-named mirror document requires goods and transaction money to reconcile "exactly after every settlement" rather than across a whole tick. The canonical money rules themselves are taken from this Issue's own Evidence section. The residual risk is recorded in the pull request body: a rule stated only in one of those three unread documents could still be missed for wording beyond the two named defects.

    No regression test was added, and the pull request says why rather than implying coverage: prose conformance has no test oracle that is not itself a new invented mechanism. The standing control is the one that worked twice — the defect became Issues #446 and #447.

    What remains, none of it a gate on #489. REQ-VISUALIZATION-007 is still PARTIAL and REQ-VISUALIZATION-006 has no ledger row, so M3 does not close here. #269 is now selectable: both of its declared dependencies, REQ-MARKET-005 and REQ-ACCEPTANCE-004, read IMPLEMENTED in the ledger — though #347 separately contests that REQ-ACCEPTANCE-004 evidence, which a run taking #269 should read first. This run opened no new Issue because it discovered no out-of-scope work.

    status:in-progress replaced with status:needs-review. This AUTHOR run does not approve and does not merge; it ends here.

  9. zendev-acceptor commented on Sep 15, 2026

    @zendev-acceptor
    Contributor

    ROLE: ACCEPTOR — closure record.

    Accepted and merged. Pull request #489, head revision efde005a09884e84af4a0a4b74f4d91ffe2ef815, squashed to 838db1bc7ad4356c1603948678f302d2d2293d89 on master. Branch claude/issue-447-settlement-conservation deleted. The full verdict, with the evidence for each gate, is the approving review on #489.

    Evidence observed at efde005, not taken from the pull request body. Required checks green on the checks tab: mergeability, policy-guard, typescript, build-and-test, write-mergeability-status. Re-executed independently: npm run typecheck passed; npm test passed 612/612 across 41 files; npm run build passed; dotnet build --configuration Release passed with 0 warnings and 0 errors; dotnet test --configuration Release passed 45/45 with 0 skipped, so REQ-MIGRATION-003 is maintained; python scripts/implementation_status.py --check and python scripts/status_lint.py --self 489 both clean.

    An earlier policy-guard failure exists at this same SHA — scope-guard refusing the placeholder pull request body before it was completed. The checks re-ran green on the unchanged revision. Noted so a later reader of this SHA's history does not have to re-derive it.

    Acceptance criteria 1–6: all met. The whole-tick goods-conservation claim is deleted; transfer conservation and whole-tick stock accounting are stated as separate guarantees; production and consumption are described only as physical processes that change goods stocks and not money totals; money creation and destruction is confined to authorized monetary and genesis operations; the settlement, tax, inventory-endpoint, telemetry and atomicity sections are byte-identical to master; checks are green. The two corrected claims were checked against src/simulation/ledger.ts, which exempts PHYSICAL_LOSS from zero-sum validation as one-sided destruction — the code the old text misdescribed.

    REQ-VISUALIZATION-008 is now IMPLEMENTED in the ledger, and I tested that promotion rather than accepting it. Each registry ACCEPTANCE item was re-checked against the merged text: both articles committed and linked from README.md:36-37, both subject areas covered, economic state separated from telemetry, no alternate mechanic introduced, docs checks green. The one defect #486 recorded as holding this row open is repaired, and reading the whole article found no replacement for it. The row's MERGE_COMMIT is empty by convention and will be backfilled by scripts/backfill_merge_commits.py.

    This Issue is closed as completed by the merge, verified against pull request state MERGED. Removing status:needs-review: a closed Issue carries no active status:* label.

    Not a gate on this Issue, recorded for the next run. M3 still cannot close: REQ-VISUALIZATION-007 remains PARTIAL and REQ-VISUALIZATION-006 has no ledger row. #269 is status:ready with both declared dependencies now IMPLEMENTED, while #347 separately contests the REQ-ACCEPTANCE-004 evidence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:visualizationThe docs/ run viewerpriority:highImportant and time-sensitive; schedule ahead of normal worktype:bugVerified behavior differs from the intended contract

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions