G §462: the ledger's fill call mesh/ledger.fill, answered as one buscalls.Fill

Builds: design 47 G §462, §408

Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
This commit is contained in:
2026-11-11 14:08:14 +01:00
parent ca59b685b0
commit 02bea66055
2 changed files with 10 additions and 1 deletions
+3 -1
View File
@@ -44,6 +44,8 @@ const (
LedgerHistory = "mesh/ledger.history"
LedgerWatch = "mesh/ledger.watch"
LedgerQuery = "mesh/ledger.query"
// LedgerFill is one ledger's fill against its cap, answered as a Fill (design 47 G §462).
LedgerFill = "mesh/ledger.fill"
// The ledger's repairs, which the tool runner also serves as tools of every module owning a ledger, its own
// ledgers only (design 25 § 12.5).
LedgerRebuild = "mesh/ledger.rebuild"
@@ -364,7 +366,7 @@ type ReindexRequest struct {
Index string `json:"index"`
}
// LedgerRequest names a ledger: lag.
// LedgerRequest names a ledger: lag, fill.
type LedgerRequest struct {
Ledger string `json:"ledger"`
}
+7
View File
@@ -301,6 +301,13 @@ func TestMeshSDKHoldsOnlyWhatEveryModuleShares(t *testing.T) {
if string(entry) != `{"instance":"listing/a17","sequence":3}` {
t.Errorf("an index entry is %s", entry)
}
// G §462: a ledger's fill is one call, answered as one buscalls.Fill.
if buscalls.LedgerFill != "mesh/ledger.fill" {
t.Errorf("a ledger's fill call is %q", buscalls.LedgerFill)
}
if raw, _ := json.Marshal(buscalls.Fill{Count: 3, Bytes: 10, MaxBytes: 100}); string(raw) != `{"count":3,"bytes":10,"max_bytes":100}` {
t.Errorf("a fill is %s", raw)
}
// A tool's answer reads the same whatever wraps it (buscalls.Unwrap, the lead's ruling 2026-11-04 13:12).
for _, c := range []struct {
name, raw, answer, said string