Skip to content

$ amend_rate_history: a signed correction applies once and is back-dated (TODO M28) - #938

Draft
MattJackson wants to merge 1 commit into
predevfrom
lane-money-amend-replay
Draft

MattJackson wants to merge 1 commit into
predevfrom
lane-money-amend-replay

Conversation

@MattJackson

Copy link
Copy Markdown
Collaborator

TODO M28 (docs/design/1.6.0-TODO.md:3827): a signed amend_rate_history can be REPLAYED and dated into the FUTURE.

Fix (crates/busbar/src/root/units_admin/mod.rs):

  • replay: a correction the history already holds (same signer, same reason hash, same window, same named figures) is refused Conflict (409); the check runs inside RootHistory::amend's apply lock, ahead of the journal seal, so nothing is recorded or appended. Re-asserting a price on purpose is a new correction with its own reason.
  • future-dated: effective_from after the arrival is refused Validation (400). Spec 1.5.5 MCP: close the anonymous front door, and make the wire match the revision it claims #79 (BUSBAR-1.6.0.md:2282): a back-dated correction is "an entry whose effective_from lies in the past"; a forward price is a configuration write.

No 1.5.5 golden: D38 amend_rate_history is 1.6.0-only (BUSBAR-1.6.0.md:2202). Ruling: owner 2026-10-14 queue rule 21.

RED (crates/busbar/src/root/units_admin/tests/units_admin.rs): a_future_dated_correction_is_refused_and_appends_nothing (whole future days and an in-day future window both applied before), a_replayed_signed_correction_is_refused_and_appends_nothing (the first body re-sent after a later correction applied before and repriced the window back). The #32 controls drop their future in-day window; the thousand-amendments volume cell signs a thousand different corrections (it re-sent one body, a replay).

File overlap: units_admin/tests/units_admin.rs is also edited by draft #870 (money-float, hunk at l.3902-3930); this PR's hunks are at l.4150-4260 and l.4380, textually disjoint.

$ PR: DRAFT per queue rule 15.

…d (TODO M28)

A signed amend_rate_history body could be replayed: the signature covers the
window, figures and reason and nothing that tells one submission from the
next, so the same bytes sent after a later correction put the earlier price
back with no new operator act. And a correction could open in the future,
standing in for a configuration write under an amendment's signature
(#79: a correction is an entry whose effective_from lies in the past).

- a correction the history already holds (same signer, reason, window,
  figures) is refused Conflict, checked under the apply lock ahead of the
  seal: nothing recorded, nothing appended
- effective_from after the arrival is refused Validation
- the #32 controls drop the future in-day window; the thousand-amendments
  volume cell signs a thousand different corrections
- RED: a_future_dated_correction_is_refused_and_appends_nothing,
  a_replayed_signed_correction_is_refused_and_appends_nothing

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant