@engramx/idl 0.16.0-rc.9 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/registry.did CHANGED
@@ -24,6 +24,12 @@ type StandingLeaf =
24
24
  root: principal;
25
25
  version: nat;
26
26
  };
27
+ type SealedEntry =
28
+ record {
29
+ digest: blob;
30
+ entryHash: blob;
31
+ id: nat;
32
+ };
27
33
  type RowEnding =
28
34
  record {
29
35
  day: int;
@@ -57,113 +63,199 @@ type Role =
57
63
  type Result_9 =
58
64
  variant {
59
65
  Err: Error;
60
- Ok: Page_2;
66
+ Ok: RecoverReply;
61
67
  };
62
68
  type Result_8 =
63
69
  variant {
64
70
  Err: Error;
65
- Ok: Page_1;
71
+ Ok: RestartReply;
66
72
  };
67
73
  type Result_7 =
68
74
  variant {
69
75
  Err: Error;
70
- Ok: Page;
76
+ Ok: nat;
71
77
  };
72
78
  type Result_6 =
73
79
  variant {
74
80
  Err: Error;
75
- Ok: vec text;
81
+ Ok: record {
82
+ finishByNs: int;
83
+ updateWaiting: bool;
84
+ };
76
85
  };
77
86
  type Result_5 =
78
87
  variant {
79
88
  Err: Error;
80
- Ok: CustodyMode;
89
+ Ok: record {
90
+ repaid: nat;
91
+ stillOwed: nat;
92
+ };
81
93
  };
82
94
  type Result_4 =
83
95
  variant {
84
96
  Err: Error;
85
- Ok: nat;
97
+ Ok: MeterReading;
98
+ };
99
+ type Result_32 =
100
+ variant {
101
+ Err: Error;
102
+ Ok: AcceptedAtRegistry;
103
+ };
104
+ type Result_31 =
105
+ variant {
106
+ Err: Error;
107
+ Ok: FleetCycleHealth;
108
+ };
109
+ type Result_30 =
110
+ variant {
111
+ Err: Error;
112
+ Ok: CertifiedStanding;
86
113
  };
87
114
  type Result_3 =
88
115
  variant {
89
116
  Err: Error;
90
- Ok: MeterReading;
117
+ Ok: ControlStep;
118
+ };
119
+ type Result_29 =
120
+ variant {
121
+ Err: Error;
122
+ Ok: ChildSignInOffer;
123
+ };
124
+ type Result_28 =
125
+ variant {
126
+ Err: Error;
127
+ Ok: blob;
128
+ };
129
+ type Result_27 =
130
+ variant {
131
+ Err: Error;
132
+ Ok: PrivateMetrics;
133
+ };
134
+ type Result_26 =
135
+ variant {
136
+ Err: Error;
137
+ Ok: RestartStatus;
138
+ };
139
+ type Result_25 =
140
+ variant {
141
+ Err: Error;
142
+ Ok: OpeningCounts;
143
+ };
144
+ type Result_24 =
145
+ variant {
146
+ Err: Error;
147
+ Ok: OpenedThrough;
148
+ };
149
+ type Result_23 =
150
+ variant {
151
+ Err: Error;
152
+ Ok: ReferralCounts;
153
+ };
154
+ type Result_22 =
155
+ variant {
156
+ Err: Error;
157
+ Ok: RegistryHealth;
91
158
  };
92
159
  type Result_21 =
93
160
  variant {
94
161
  Err: Error;
95
- Ok: FleetCycleHealth;
162
+ Ok: opt text;
96
163
  };
97
164
  type Result_20 =
98
165
  variant {
99
166
  Err: Error;
100
- Ok: CertifiedStanding;
167
+ Ok: Page_6;
101
168
  };
102
169
  type Result_2 =
103
170
  variant {
104
171
  Err: Error;
105
- Ok: ControlStep;
172
+ Ok: principal;
106
173
  };
107
174
  type Result_19 =
108
175
  variant {
109
176
  Err: Error;
110
- Ok: OpenedThrough;
177
+ Ok: RecordPage;
111
178
  };
112
179
  type Result_18 =
113
180
  variant {
114
181
  Err: Error;
115
- Ok: blob;
182
+ Ok: Page_5;
116
183
  };
117
184
  type Result_17 =
118
185
  variant {
119
186
  Err: Error;
120
- Ok: PrivateMetrics;
187
+ Ok: vec OpenedEngram;
121
188
  };
122
189
  type Result_16 =
123
190
  variant {
124
191
  Err: Error;
125
- Ok: OpeningCounts;
192
+ Ok: Page_3;
126
193
  };
127
194
  type Result_15 =
128
195
  variant {
129
196
  Err: Error;
130
- Ok: ReferralCounts;
197
+ Ok: Page_2;
131
198
  };
132
199
  type Result_14 =
133
200
  variant {
134
201
  Err: Error;
135
- Ok: opt text;
202
+ Ok: Page_1;
136
203
  };
137
204
  type Result_13 =
138
205
  variant {
139
206
  Err: Error;
140
- Ok: Page_6;
207
+ Ok: Page;
141
208
  };
142
209
  type Result_12 =
143
210
  variant {
144
211
  Err: Error;
145
- Ok: Page_5;
212
+ Ok: vec text;
146
213
  };
147
214
  type Result_11 =
148
215
  variant {
149
216
  Err: Error;
150
- Ok: vec OpenedEngram;
217
+ Ok: CustodyMode;
151
218
  };
152
219
  type Result_10 =
153
220
  variant {
154
221
  Err: Error;
155
- Ok: Page_3;
222
+ Ok: EngramComputeView;
156
223
  };
157
224
  type Result_1 =
158
225
  variant {
159
226
  Err: Error;
160
- Ok: principal;
227
+ Ok: record {accepted: nat;};
161
228
  };
162
229
  type Result =
163
230
  variant {
164
231
  Err: Error;
165
232
  Ok;
166
233
  };
234
+ type RestartTotals =
235
+ record {
236
+ advanceOutstanding: nat;
237
+ advancePaid: nat;
238
+ advanceReturned: nat;
239
+ advanceWrittenOff: nat;
240
+ lent: nat;
241
+ outstanding: nat;
242
+ repaid: nat;
243
+ writtenOff: nat;
244
+ };
245
+ type RestartStatus =
246
+ record {
247
+ loanOwed: nat;
248
+ nextRestartAtNs: opt int;
249
+ openUntilNs: opt int;
250
+ };
251
+ type RestartReply =
252
+ record {
253
+ engramTold: bool;
254
+ installError: opt text;
255
+ lentCycles: nat;
256
+ securityInstalled: bool;
257
+ updateWaiting: bool;
258
+ };
167
259
  type ReserveGateConfig =
168
260
  record {
169
261
  enabled: bool;
@@ -176,6 +268,29 @@ type ReleaseClass =
176
268
  Feature;
177
269
  Security;
178
270
  };
271
+ type RegistryHealth =
272
+ record {
273
+ adminRoles: opt AdminRoles;
274
+ anchors: opt AnchorStats;
275
+ atNs: opt int;
276
+ clock: opt RegistryClockHealth;
277
+ cycleReserve:
278
+ opt record {
279
+ cycleBalance: nat;
280
+ minOperatingReserveCycles: nat;
281
+ };
282
+ };
283
+ type RegistryClockHealth =
284
+ record {
285
+ attemptTotal: opt nat;
286
+ lastAttemptAtNs: opt int;
287
+ lastError: opt text;
288
+ lastErrorAtNs: opt int;
289
+ lastOkAtNs: opt int;
290
+ nextWakeAtNs: opt int;
291
+ okTotal: opt nat;
292
+ overdue: opt nat;
293
+ };
179
294
  type ReferralCounts =
180
295
  record {
181
296
  agentsByTreesSpanned: TreesSpanned;
@@ -184,6 +299,23 @@ type ReferralCounts =
184
299
  openedThroughParentLive: nat;
185
300
  throughParent: PairedSoon;
186
301
  };
302
+ type RecoverReply =
303
+ record {
304
+ balance: nat;
305
+ billingLinked: bool;
306
+ finished: bool;
307
+ number: opt nat;
308
+ restartLoanOwed: nat;
309
+ template: text;
310
+ };
311
+ type RecordPage =
312
+ record {
313
+ hashFirstFrom: nat;
314
+ items: vec AuditEntry;
315
+ ringFloor: nat;
316
+ sealed: vec SealedEntry;
317
+ total: nat;
318
+ };
187
319
  type PrivateMetrics =
188
320
  record {
189
321
  activeEngrams: nat;
@@ -348,10 +480,31 @@ type EngramStatus =
348
480
  type EngramRecordView =
349
481
  record {
350
482
  canisterId: principal;
483
+ changesCaused: opt ChangesCaused;
351
484
  createdAtNs: int;
352
485
  owner: principal;
353
486
  status: EngramStatus;
354
487
  };
488
+ type EngramComputeView =
489
+ record {
490
+ cycles: nat;
491
+ eraseAboutNs: opt int;
492
+ erased: opt bool;
493
+ frozen: bool;
494
+ idlePerDay: nat;
495
+ line: nat;
496
+ quiet: bool;
497
+ recoverOpen: opt bool;
498
+ recoveredAtNs: opt int;
499
+ restartOpenUntilNs: opt int;
500
+ runState: variant {
501
+ running;
502
+ stopped;
503
+ stopping;
504
+ };
505
+ thresholdSecs: nat;
506
+ updateWaiting: bool;
507
+ };
355
508
  type EngagementRow =
356
509
  record {
357
510
  abandonedDay: opt int;
@@ -405,6 +558,18 @@ type ControlStep =
405
558
  EngramMustMove;
406
559
  MovedByRegistry;
407
560
  };
561
+ type ChildSignInOffer =
562
+ record {
563
+ parentActive: bool;
564
+ parentIsFirstEngram: bool;
565
+ parentOwner: opt principal;
566
+ };
567
+ type ChangesCaused =
568
+ record {
569
+ count: nat;
570
+ inFlight: nat;
571
+ sinceBirth: bool;
572
+ };
408
573
  type ChangelogEntry =
409
574
  record {
410
575
  atNs: int;
@@ -418,6 +583,11 @@ type CertifiedStanding =
418
583
  leaf: StandingLeaf;
419
584
  witness: blob;
420
585
  };
586
+ type CertifiedBirth =
587
+ record {
588
+ certificate: opt blob;
589
+ witness: blob;
590
+ };
421
591
  type CertifiedAuditHead =
422
592
  record {
423
593
  certificate: opt blob;
@@ -432,7 +602,9 @@ type CertifiedAnchorLeaf =
432
602
  conflicts: nat;
433
603
  disputed: bool;
434
604
  engram: principal;
605
+ era: opt nat;
435
606
  head: blob;
607
+ recoveredAtNs: opt int;
436
608
  refusedConflicts: nat;
437
609
  total: nat;
438
610
  version: nat;
@@ -464,6 +636,7 @@ type AnchorView =
464
636
  record {
465
637
  atNs: int;
466
638
  disputed: bool;
639
+ era: opt nat;
467
640
  head: blob;
468
641
  total: nat;
469
642
  };
@@ -494,6 +667,15 @@ type ActivationFunnel =
494
667
  spawnCeiling: nat;
495
668
  spawnsToday: nat;
496
669
  };
670
+ type AcceptedAtRegistry =
671
+ record {
672
+ custody: variant {
673
+ Managed;
674
+ Sovereign;
675
+ };
676
+ expiresAtNs: int;
677
+ from: principal;
678
+ };
497
679
  service : {
498
680
  /// Abandon the caller's engram. Owner-initiated, terminal, and NOT deletion: the record stays,
499
681
  /// stays readable, stays verifiable. It frees the owner to create ONE new engram, which will
@@ -504,7 +686,32 @@ service : {
504
686
  /// CANISTER ID, so an engram's ciphertext and wallet cannot follow it anywhere (engramx
505
687
  /// docs/ENCRYPTION-OPERATIONS.md, "Canister-id binding"). Abandoning is starting over, not
506
688
  /// migrating, and the caller must be told so before they do it.
689
+ ///
690
+ /// ⟨2026-11-02⟩ REFUSED for an engram opened through another: it is never abandoned, so it stays on
691
+ /// this registry's security updates for life; it ends by its parent's cut-off or by running dry.
692
+ ///
693
+ /// ⟨2026-11-05, the owner's ruling of 2026-11-04 — "abandoned engrams are NOT recoverable"⟩
694
+ /// WITHDRAW YOUR DIGITAL DOLLARS FIRST. Nobody pays for an abandoned engram: when its compute runs out it stops,
695
+ /// and the network erases it about 30 days later. An abandoned engram is never recovered once it is
696
+ /// erased (`recoverMyEngram` refuses it, and the biller refuses its top-ups), so whatever its wallet
697
+ /// still holds then stays at its address with no program that can move it. Withdraw it while the
698
+ /// engram runs.
507
699
  abandonMyEngram: () -> (Result);
700
+ /// ⟨2026-11-15, the same ruling⟩ THE NAMED PRINCIPAL ACCEPTS AN ENGRAM OFFERED TO THEM, as
701
+ /// themselves. This is the registry's only evidence that they agreed, and the only writer of
702
+ /// `acceptedAtNs`.
703
+ ///
704
+ /// IT STILL MOVES NOTHING. It marks the offer accepted; the record and control of the code move
705
+ /// when the caller then calls `acceptOwnership` on the engram, which reports here
706
+ /// (`sysNotifyOwnershipTransfer`). The answer says who offered it, when the offer ends, and
707
+ /// whether the engram is `#Sovereign`: a sovereign engram's code is written by its owner, not
708
+ /// installed by this registry, so the caller should check what it runs before the second call.
709
+ ///
710
+ /// Refused, with nothing changed: no open offer of that engram names the caller (one text for
711
+ /// "none", "someone else's" and "expired"); the caller already has an active engram (one engram
712
+ /// per owner; the offer stays open, and nothing of theirs is touched); the caller is opening an
713
+ /// engram right now. `declineEngramOffer` takes an acceptance back.
714
+ acceptEngramOffer: (engram: principal) -> (Result_32);
508
715
  addAuditViewer: (viewer: principal) -> (Result);
509
716
  /// Add a changelog entry (admin only)
510
717
  addChangelogEntry: (version: text, releaseNotes: text) -> (Result);
@@ -540,7 +747,14 @@ service : {
540
747
  /// ⚠ IT IS REVERSIBLE, which is the fact most worth publishing: the engram's own
541
748
  /// `returnToManaged` adds the registry back ALONGSIDE the owner. Sovereignty is a door, not a
542
749
  /// cliff.
750
+ ///
751
+ /// ⟨2026-11-02, the owner's sole-controller ruling⟩ REFUSED for an engram opened
752
+ /// through another: it stays managed by this registry for life, and its key is never a controller.
543
753
  claimSovereignty: () -> (Result);
754
+ /// ⟨2026-11-15, the same ruling⟩ The named principal declines an offer, or takes back an
755
+ /// acceptance made before `acceptOwnership` was called on the engram. The row is removed, so a
756
+ /// report of that change of owner is refused until the engram's owner offers again.
757
+ declineEngramOffer: (engram: principal) -> (Result);
544
758
  /// Assemble the pushed chunks into the engram template and install it as the current one.
545
759
  ///
546
760
  /// ⚠ THE HASH IS VERIFIED, exactly as in `setEngramWasm`: the assembled bytes are hashed and
@@ -553,7 +767,7 @@ service : {
553
767
  /// Contrast `backupFinalize`, which does NOT verify its digest. These two look like the same
554
768
  /// protocol and are not, and the difference matters most on this one: it decides what code every
555
769
  /// engram in the fleet will run.
556
- engramWasmFinalize: (hash: text) -> (Result_4);
770
+ engramWasmFinalize: (hash: text) -> (Result_7);
557
771
  /// Chunked WASM upload — for WASMs that exceed single-call ingress limits.
558
772
  /// Flow: engramWasmInit → engramWasmPushChunk (×N) → engramWasmFinalize(hash)
559
773
  /// ⟨0.16.0 — CORRECTED 2026-08-19⟩ This line named all THREE pre-rename methods, none of which
@@ -568,7 +782,7 @@ service : {
568
782
  /// and total bytes over the cap. Neither is recoverable by pushing again — call `engramWasmInit`
569
783
  /// to clear and begin afresh. The messages say so because a caller who retries a chunk against a
570
784
  /// full buffer will retry forever.
571
- engramWasmPushChunk: (chunk: blob) -> (Result_4);
785
+ engramWasmPushChunk: (chunk: blob) -> (Result_7);
572
786
  /// Fleet cycle-health scan. Admin or metrics-viewer, PAGINATED with a hard max of 50 per page —
573
787
  /// each managed engram costs one `canister_status` await, so pages stay small to bound the
574
788
  /// message. A caller must expect to iterate.
@@ -585,33 +799,34 @@ service : {
585
799
  /// its LIVE freezing reservation, which is memory-scaled, so a large engram can be low at a
586
800
  /// balance a small one would be comfortable at.
587
801
  ///
588
- /// ⟨L7⟩ UPDATE, NOT QUERY, for BOTH of the reasons this law recognises — which is why it is worth
802
+ /// ⟨update-for-read⟩ UPDATE, NOT QUERY, for BOTH of the reasons this law recognises — which is why it is worth
589
803
  /// stating rather than leaving to be inferred from a body that scans a fleet. It awaits
590
804
  /// `ic.canister_status` once per engram in the page, so no query could produce the figures at all;
591
805
  /// and it calls `denied()` on refusal, a state write a query cannot perform, so making it a query
592
- /// would also retire the record of who was turned away (ADR-0002's class, the same one
806
+ /// would also retire the record of who was turned away (the refusal-over-fabrication class, the same one
593
807
  /// `listEngrams` settled at its own declaration).
594
808
  ///
595
- /// ⟨Marker added 2026-08-23. The census row for this method already cited L7 and the site did not
596
- /// carry it — invisible to `check-update-for-read.mjs`, whose population is read-VERB names and
597
- /// this one is a noun. That gate now reads the census's L7 citations as a second population for
598
- /// exactly this blind spot.⟩
809
+ /// ⟨Marker added 2026-08-23. The 0.16.0 interface plan's row for this method already cited the
810
+ /// update-for-read rule and
811
+ /// the site did not carry it — invisible to the deploying side's update-for-read check, whose
812
+ /// population is read-VERB names and this one is a noun. That check now reads the plan's
813
+ /// update-for-read citations as a second population for exactly this blind spot.⟩
599
814
  fleetCycleHealth: (offset: nat, limit: nat, thresholdCycles: nat) ->
600
- (Result_21);
601
- /// PUBLIC: ⟨0.16.0, L2.4⟩ `fleetSummary` — the ONE public projection of this registry,
602
- /// replacing `status()` and ABSORBING `publicMetrics()`.
815
+ (Result_31);
816
+ /// PUBLIC: ⟨0.16.0, same concept, same name across canisters⟩ `fleetSummary` — the ONE public
817
+ /// projection of this registry, replacing `status()` and ABSORBING `publicMetrics()`.
603
818
  ///
604
- /// Two public aggregates of one canister was the same L2.4 defect the engram had with
819
+ /// Two public aggregates of one canister was the same naming defect the engram had with
605
820
  /// status()/metrics(): both answered "what is this registry like", they disagreed about which
606
821
  /// counters they carried (status had cycles and the wasm hash, publicMetrics had unique owners,
607
822
  /// sovereign engrams and registrySince), and a caller had to know which one held the field they
608
- /// wanted. storage-sweep.sh cross-checked one against the other to infer a fact neither stated.
823
+ /// wanted. An off-chain storage sweep cross-checked one against the other to infer a fact neither stated.
609
824
  ///
610
825
  /// Merged, not concatenated: `totalEngrams` and `activeEngrams` appeared in BOTH and are counted
611
826
  /// once here, by the same pass.
612
827
  ///
613
828
  /// Everything in it identifies nobody — counts, a version, a hash, a cycle balance — which is why
614
- /// it is ungated and marked for the L8 gate-grep.
829
+ /// it is ungated and marked for the disclosure gate's grep.
615
830
  fleetSummary: () -> (FleetSummary) query;
616
831
  /// When an engram was abandoned, if it was.
617
832
  ///
@@ -632,7 +847,8 @@ service : {
632
847
  /// PUBLIC: who holds authority here. A refusal a caller cannot attribute is a refusal they
633
848
  /// cannot appeal, so the roster is readable by everyone the roster can refuse.
634
849
  ///
635
- /// ⟨0.16.0, L2.2⟩ The shared `AdminRoles` shape, not a registry-specific record. It was
850
+ /// ⟨0.16.0, same concept, same name across canisters⟩
851
+ /// The shared `AdminRoles` shape, not a registry-specific record. It was
636
852
  /// `{ admin; wasmAdmin }`, which could not express the ROOT identity at all — the principal that
637
853
  /// bootstraps the first admin and can reclaim the role was simply absent from the published
638
854
  /// answer, so "who can take this canister back" was a fact only the source told you. A list of
@@ -678,30 +894,41 @@ service : {
678
894
  /// was meant to replace, so there is no role gate. But a record spanning fewer than
679
895
  /// `Engagements.STANDING_MIN_DISTINCT_ENGRAMS` distinct engrams is served ONLY to the agent itself:
680
896
  /// at one or two engrams the summary IS their owners' experience, which is identification by
681
- /// inference (R-6 §4.5 L4-1 — our own reading of the law, not legal advice). That refusal is
897
+ /// inference (L4-1 — our own reading of the law, not legal advice). That refusal is
682
898
  /// LOUD, names this method, and covers a record of zero engagements with the same words, so the
683
899
  /// refusal itself does not distinguish "never engaged" from "engaged in one to four engrams".
684
900
  /// The agent itself reading an empty record gets `#NotFound` — it is asking about itself, so
685
901
  /// there is nothing to hide from it.
686
902
  ///
687
- /// ⟨2026-09-28, review finding OPS-2⟩ A THIN SELF-READ IS UNCERTIFIED: below the threshold the
903
+ /// ⟨2026-09-28, a review finding⟩ A THIN SELF-READ IS UNCERTIFIED: below the threshold the
688
904
  /// record is not in the certified tree at all (its hash would leak it through every other
689
905
  /// witness), so the agent is served its summary folded from the records, with `certificate =
690
906
  /// null` and an empty `witness`. At and above the threshold every reader gets the stored bytes
691
907
  /// with their proof.
692
908
  ///
693
- /// ⟨2026-10-01, the owner's ruling of that day (2 A)⟩ The threshold counts TOPS, not engrams
909
+ /// ⟨2026-10-01, the owner's ruling of that day⟩ The threshold counts TOPS, not engrams
694
910
  /// (`Engagements.distinctTops`): engrams opened from one engram count as one, and an engram counts
695
911
  /// as one with the engrams it replaced. The refusal's sentence says so.
696
912
  ///
697
913
  /// WHAT IT NEVER DOES: score, rank, recommend, or refuse anyone work. The decision to refuse an
698
914
  /// agent belongs to the owner's own engram (L4-3).
699
915
  ///
916
+ /// ⟨2026-11-15, from an adversarial review⟩ COUNTS, NOT INDEPENDENCE — READ THIS BEFORE TRUSTING A
917
+ /// RECORD. The certificate proves that this registry holds these counts for this agent. It does NOT
918
+ /// prove that the engrams behind them belong to different people. The registry links two engrams
919
+ /// only through a parent or a predecessor; engrams opened under separate principals are unlinked,
920
+ /// and one party can open several. So one party can give its own agent a certified record with no
921
+ /// one else involved (RUN 2026-11-15 on PocketIC: a stranger was refused at one engram, and served
922
+ /// a certified record of five live engagements and no bad endings once four more engrams, opened
923
+ /// under four other principals, had paired the same root). The five-engram threshold is a privacy
924
+ /// floor (L4-1), never a defence against a made-up record. A reader must not take these counts as
925
+ /// other owners' experience of the agent.
926
+ ///
700
927
  /// ⟨2026-09-28, owner decision: one root key per agent, with an enrolled key per client⟩ `agent`
701
928
  /// is the agent's ROOT principal — the identity an owner sees as `root` on each key in their own
702
929
  /// `listAgents`. "The agent itself" is a caller holding that root key. A key for one engram has no
703
930
  /// record of its own here; asking about one gets the refusal or, from the key itself, `#NotFound`.
704
- getAgentStanding: (agent: principal) -> (Result_20) query;
931
+ getAgentStanding: (agent: principal) -> (Result_30) query;
705
932
  /// Fleet-wide anchoring liveness. Exists because ABSENCE is otherwise uninformative: an engram
706
933
  /// that never wrote, one still on a template without the push, and one whose push is broken all
707
934
  /// render as an empty getAnchors. Nothing distinguishes the first from the third, so a silently
@@ -719,7 +946,8 @@ service : {
719
946
  /// whether ENGRAMS are anchoring — an active money chain must not stand in for them.
720
947
  getAnchorStats: () -> (AnchorStats) query;
721
948
  /// PUBLIC: the chain head exists to be compared, so an external monitor can detect tampering
722
- /// without admin access (D3). A head only whoever runs this deployment can read witnesses nothing.
949
+ /// without admin access (the log is a SHA-256 hash chain whose head is public). A head only whoever
950
+ /// runs this deployment can read witnesses nothing.
723
951
  getAuditHead: () -> (AuditHead) query;
724
952
  /// An engram's LATEST witnessed anchor, certified. The leaf (Types.CertifiedAnchorLeaf, Candid —
725
953
  /// decode with to_candid's standard encoding) carries the anchor AND its conflict count, so the
@@ -731,14 +959,14 @@ service : {
731
959
  /// replace. The certificate's whole value is that a stranger can check it against the NNS root
732
960
  /// key without trusting this registry, and a stranger is exactly who cannot hold a role here.
733
961
  getCertifiedAnchor: (canisterId: principal) -> (opt CertifiedAnchor) query;
734
- /// ⟨0.16.0, L2.2⟩ RENAMED BACK to `getCertifiedAuditHead`, the fleet-wide name.
962
+ /// ⟨0.16.0, same concept, same name across canisters⟩ RENAMED BACK to `getCertifiedAuditHead`, the fleet-wide name.
735
963
  ///
736
964
  /// It was renamed AWAY from that on 2026-08-03, deliberately and for a good reason: the semantics
737
965
  /// changed (certified_data became a merkle tree root covering the head AND the anchor set, so the
738
966
  /// old certified_data == headHash byte-compare was gone), and a loud method-not-found was judged
739
967
  /// better than a stale verifier quietly reporting verified=false forever.
740
968
  ///
741
- /// THAT ARGUMENT'S PREMISE IS NOW FALSE. It protected deployed verifiers; B4 restarts every chain
969
+ /// THAT ARGUMENT'S PREMISE IS NOW FALSE. It protected deployed verifiers; every chain restarts fresh
742
970
  /// at the 0.16.0 genesis and there are none. What remains is a fleet where three canisters answer
743
971
  /// the same question under two names, which is the cost the rename was paying to avoid a hazard
744
972
  /// that no longer exists. `witness` becomes `?Blob` to match the shared type — null where a
@@ -754,14 +982,57 @@ service : {
754
982
  /// instead of trusting this replica, and a proof that requires a role to fetch rests on exactly
755
983
  /// the authority it was introduced to remove.
756
984
  getCertifiedAuditHead: () -> (CertifiedAuditHead) query;
757
- /// The ATTESTABLE custody-mode fact (agent-native model item 19): "managed" | "sovereign" |
985
+ /// The certified proof that a birth record's FINGERPRINT is in this registry's tree ⟨2026-10-26, the
986
+ /// owner's lineage ruling on certifying birth records⟩
987
+ /// — the half of an engram's birth chain the engram cannot give itself.
988
+ ///
989
+ /// PUBLIC: a proof a caller had to hold a role to fetch rests on the authority it was meant to
990
+ /// replace. It reveals only whether a fingerprint is present: the key is a salted hash (the record's
991
+ /// random secret is inside it) and the value a constant. Whoever holds the record — the engram's
992
+ /// owner, or whomever the owner showed it to — already knows the fingerprint; nobody else can ask
993
+ /// about a record they cannot guess.
994
+ ///
995
+ /// Verify as for `getCertifiedAnchor`, path ["births", <fingerprint>], leaf bytes = [0x01] (the
996
+ /// client's `verifyBirthChain` does it for a whole chain). `null` when absent, as `getCertifiedAnchor`
997
+ /// answers: there is no certified absence proof (a build choice the rulings left open). A
998
+ /// `fingerprint` that is not 32 bytes is never a fingerprint, and answers `null` before the lookup.
999
+ getCertifiedBirth: (fingerprint: blob) -> (opt CertifiedBirth) query;
1000
+ /// ⟨2026-11-02, the owner's ruling on an opened engram's own sign-in; the child build's ruled answer
1001
+ /// on the sign-in offer, with the fix its adversarial check found⟩
1002
+ /// WHAT THE KIT OFFERS AS A NEW ENGRAM'S SIGN-IN, read before it opens one
1003
+ /// through `parent`. The answer: the parent's owner — ONLY when the parent is a first engram (the
1004
+ /// kit offers that principal as the default sign-in only then, after it prints it and the person
1005
+ /// running the agent confirms it is theirs; for a parent opened through another the field is
1006
+ /// absent, so the read never discloses a key file's principal); whether the parent is a first
1007
+ /// engram; and whether it is registered, `#Active` and not abandoned (`isRegisteredActiveEngram`'s
1008
+ /// rule).
1009
+ ///
1010
+ /// CALLER: a lasting key with a LIVE engagement with `parent` at this registry, in either store
1011
+ /// (`Engagements.hasOpenEither` — the same fact `sysOpenChild`'s admission reads, so exactly the
1012
+ /// keys that may be opened an engram through `parent` may read what it offers). It discloses the
1013
+ /// parent's owner to the parent's own engaged agent, the party `getParentOf` answers once the child
1014
+ /// exists. Anyone else is REFUSED loudly (refusal over fabrication), in the same words whether or not `parent` is
1015
+ /// an engram, so a refusal tells a stranger nothing. A QUERY, so the refusal is not in the denial
1016
+ /// log (`denied` says why a query cannot write). `#NotFound` only to an engaged caller, for a
1017
+ /// parent this registry holds no owner for.
1018
+ /// Called by: the owner kit's opening of an engram through a parent, signed by the agent's lasting
1019
+ /// key, before it names the new engram's sign-in.
1020
+ getChildSignInOffer: (parent: principal) -> (Result_29) query;
1021
+ /// The consent origin every newborn engram is told — `null` until the admin sets one, and newborns are
1022
+ /// then told none (they keep the default origin).
1023
+ ///
1024
+ /// CALLER: the deployment's setup step, reading back what it set; and anyone comparing an engram's
1025
+ /// `GET /oauth/authorize` target with what its registry hands out. PUBLIC: an origin is not a secret,
1026
+ /// and every owner of this deployment is sent there.
1027
+ getConsentOrigin: () -> (opt text) query;
1028
+ /// The ATTESTABLE custody-mode fact: "managed" | "sovereign" |
758
1029
  /// "unknown", derived from the registry's OWN transition records (claimSovereignty /
759
1030
  /// returnToManaged maintain sovereignEngramIds) — NOT from a canister_status probe, which needs
760
1031
  /// controllership and traps for exactly the sovereign engrams it should describe. Public, free,
761
1032
  /// forever (free-parity): custody mode is a trust fact every warranted proof will carry —
762
1033
  /// managed = engramx.ai can warrant its own controller conduct; sovereign = registry-side facts
763
1034
  /// only. (Money-origin, by contrast, is payer-blind and never a record fact.)
764
- /// PUBLIC: ⟨0.16.0, L3⟩ Custody as a VARIANT, and the no-claim case says WHY rather than just
1035
+ /// PUBLIC: ⟨0.16.0⟩ Custody as a VARIANT, and the no-claim case says WHY rather than just
765
1036
  /// being a third string.
766
1037
  ///
767
1038
  /// ⟨CORRECTED 2026-08-24⟩ This block named an `#Unknown` ARM. There is none, and never was in
@@ -776,13 +1047,13 @@ service : {
776
1047
  ///
777
1048
  /// Derived from records, never probed: a canister_status call would trap for exactly the
778
1049
  /// canisters we are not the controller of, i.e. the sovereign ones this read exists to identify.
779
- getCustodyMode: (canisterId: principal) -> (Result_5) query;
780
- /// Cycles-health probe — slim, cycles-only shape; the money fields moved to the cashier's
781
- /// getCycleReserveStatus. Read by health-alert.mjs in registry mode.
1050
+ getCustodyMode: (canisterId: principal) -> (Result_11) query;
1051
+ /// Cycles-health probe — slim, cycles-only shape; the money fields moved to the biller's
1052
+ /// getCycleReserveStatus. scripts/audit-chain/health-alert.mjs reads it in its default cycles mode.
782
1053
  ///
783
1054
  /// PUBLIC: whether this registry can still afford to spawn is a fact every prospective owner
784
- /// depends on and none of them can otherwise observe. Cycles only, by construction — ADR-0005
785
- /// keeps the money on the cashier, so there is no balance here to withhold.
1055
+ /// depends on and none of them can otherwise observe. Cycles only, by construction — money is the biller's, cycles are the registry's
1056
+ /// keeps the money on the biller, so there is no balance here to withhold.
786
1057
  getCycleReserveStatus: () ->
787
1058
  (record {
788
1059
  cycleBalance: nat;
@@ -792,11 +1063,11 @@ service : {
792
1063
  /// fact (its assignment is in the hash-chained audit log). null = spawned before numbering
793
1064
  /// existed, or by another registry.
794
1065
  ///
795
- /// ⟨0.16.0, tier-2 ruling 2026-08-17⟩ RENAMED from `sysEngramNumberOf`. The `sys` prefix names
1066
+ /// ⟨0.16.0, the vocabulary ruling of 2026-08-17⟩ RENAMED from `sysEngramNumberOf`. The `sys` prefix names
796
1067
  /// the CALLER TIER a method was built for, and this one was never gated — it is a bare public
797
1068
  /// query, as the line above says. A prefix that reads as an authorization claim while carrying
798
1069
  /// none is worse than no prefix: it invites a reader to assume a gate that does not exist, and
799
- /// an L8 sweep grepping `sys*` would have counted this as tiered surface it is not.
1070
+ /// a disclosure sweep grepping `sys*` would have counted this as tiered surface it is not.
800
1071
  ///
801
1072
  /// PUBLIC: the spawn ordinal is a permanent, dual-recorded fact about an engram that its owner
802
1073
  /// publishes by existing — engram #7 is #7 to everyone. It identifies a canister, never a person.
@@ -806,35 +1077,50 @@ service : {
806
1077
  /// on two canisters is what a hand-written client cannot tell apart (a structural actor type
807
1078
  /// matches either target), so it gets the rule `getMarketCanister` already follows: distinct
808
1079
  /// names on distinct canisters. `…Of` says what the argument is for.
1080
+ ///
1081
+ /// ⟨2026-10-13⟩ The engram no longer serves `getEngramNumber` at all: its copy of the number went
1082
+ /// with the genesis seed, so this is the one read of an engram's number.
809
1083
  getEngramNumberOf: (canisterId: principal) -> (opt nat) query;
810
- /// ⟨2026-10-01, the owner's ruling of that day (2 A)⟩ What a lasting key opened through a parent:
1084
+ /// ⟨2026-10-01, the owner's ruling of that day⟩ What a lasting key opened through a parent:
811
1085
  /// the engram, the engram it was opened from, and the cut-off's time if there is one. GATED:
812
1086
  /// readable by the key itself (an agent asking about its own), the owner of the engram it was
813
1087
  /// opened from (whose console shows it), an admin or an audit viewer. Anyone else is REFUSED — the
814
1088
  /// same words whether or not the key opened anything, so the refusal tells a stranger nothing.
815
1089
  /// `#NotFound` only to a permitted reader, for a key that opened nothing: a true answer, like
816
1090
  /// `listMyAgentDisputes`'s empty list.
817
- getEngramOpenedThrough: (key: principal) -> (Result_19) query;
1091
+ getEngramOpenedThrough: (key: principal) -> (Result_24) query;
818
1092
  /// The i-th 1 MiB slice of the attested engram wasm (0-indexed). The caller reassembles all
819
1093
  /// chunks in order and MUST verify sha256(reassembled) == getEngramWasmHash before installing —
820
1094
  /// the hash is the attestation; the bytes are a convenience. Out-of-range index → empty blob.
821
- /// PUBLIC: ⟨0.16.0, L11⟩ An out-of-range index is `#NotFound`, not an empty blob.
1095
+ /// PUBLIC: ⟨0.16.0, the honesty rule: no fabricated empties⟩ An out-of-range index is `#NotFound`,
1096
+ /// not an empty blob.
822
1097
  ///
823
1098
  /// The empty blob was indistinguishable from a legitimately empty chunk AND from "no wasm is
824
1099
  /// staged at all" — and this is the surface a verifier walks to reassemble a template and check
825
1100
  /// its hash. A reassembler that reads `""` as end-of-stream cannot tell a finished download from
826
1101
  /// a truncated one, so it would hash a partial wasm and report a mismatch against the official
827
1102
  /// list, which reads as "this template is unofficial" rather than "I stopped reading too early".
828
- getEngramWasmChunk: (index: nat) -> (Result_18) query;
1103
+ getEngramWasmChunk: (index: nat) -> (Result_28) query;
829
1104
  /// The stored template's release class — FREE and UNGATED, because it is the checkable half of a
830
- /// promise made to people who are not our customers. Pair it with getRentStatus to verify the
831
- /// funding rule was applied: #Security funds every reachable engram; #Feature funds metered ones.
832
- /// PUBLIC: ⟨0.16.0, L3⟩ The release class as a VARIANT, not a stringly-typed enum.
1105
+ /// promise made to people who are not our customers. ⟨2026-10-25⟩ The funding rule it checks:
1106
+ /// #Security — the registry pays for the install on every running engram it can reach, any size;
1107
+ /// #Feature — the registry pays for no install, and each engram runs it on its own compute. (Was:
1108
+ /// "pair it with getRentStatus … #Feature funds metered ones" — rent no longer enters it.)
1109
+ /// PUBLIC: ⟨0.16.0⟩ The release class as a VARIANT, not a stringly-typed enum.
833
1110
  ///
834
1111
  /// It returned "security" or "feature" as `Text`, so every consumer compared strings and no
835
1112
  /// compiler anywhere could catch a typo or a third class arriving. A variant makes the set closed
836
1113
  /// and the comparison checked — and this value gates whether an upgrade is funded, so a caller
837
1114
  /// that silently fails to match "security" funds nothing and reports no error.
1115
+ /// ⟨CORRECTED 2026-10-26, later — the owner's restart choice of that day: "pay whenever the engram is
1116
+ /// missing any security release, whatever the latest release is labelled"⟩ "#Feature — the
1117
+ /// registry pays for no install" no longer holds for every engram: an engram still missing an
1118
+ /// earlier security release is paid as a security update even while this reads #Feature, because
1119
+ /// the current template carries that fix (UpgradeFunding.effectiveClass) — unless the current
1120
+ /// template is itself behind a security release (an older build re-uploaded), which cannot deliver
1121
+ /// the fix. An engram missing no security release is still never paid for a #Feature install.
1122
+ /// So this value is the declared label, not the whole funding rule: the `upgrade.topUp` audit line
1123
+ /// says `class=Security declared=Feature` when the two differ.
838
1124
  getEngramWasmClass: () -> (ReleaseClass) query;
839
1125
  /// The WASM hash of the engram template this registry will install.
840
1126
  ///
@@ -848,15 +1134,16 @@ service : {
848
1134
  /// PUBLIC: the pull path it describes is itself ungated, so a gate here would only stop a caller
849
1135
  /// planning the calls it is already permitted to make.
850
1136
  getEngramWasmInfo: () -> (EngramWasmInfo) query;
851
- /// ⟨L7⟩ UPDATE, NOT QUERY, and NOT because of a system call — this body awaits nothing. The
1137
+ /// ⟨update-for-read⟩ UPDATE, NOT QUERY, and NOT because of a system call — this body awaits nothing. The
852
1138
  /// update exists so the DENIAL IS RECORDED: `denied()` is a state write, and a query cannot
853
1139
  /// write. Exactly the argument `listEngrams` settled at its own declaration, and the same
854
1140
  /// conclusion: a query here would silently retire the record of who was refused.
855
1141
  ///
856
- /// So L7's "the denial-logging motive for update-for-read is retired by L1" does not hold at this
857
- /// site. L1 retired the motive of trapping-to-refuse; it did not give queries the ability to
1142
+ /// So the update-for-read rule's own claim, that the one-Result-shape rule retired the denial-logging
1143
+ /// motive for update-for-read, does not hold at this site. That rule retired the motive of
1144
+ /// trapping-to-refuse; it did not give queries the ability to
858
1145
  /// write, which is the thing this actually depends on.
859
- getFleetMetrics: () -> (Result_17);
1146
+ getFleetMetrics: () -> (Result_27);
860
1147
  /// PUBLIC: a genesis note that only privileged callers could read would defeat its purpose —
861
1148
  /// the reader who most needs it is the stranger deciding whether to trust this chain.
862
1149
  getGenesisNote: () -> (GenesisNote) query;
@@ -868,11 +1155,12 @@ service : {
868
1155
  /// It does NOT date the engram's running code — a re-run fleet push marches `at` forward while
869
1156
  /// nothing changes. Use `changedAt` for that: it is stamped only when code actually changed, and
870
1157
  /// is null for an engram that has never been upgraded since this field shipped.
871
- /// ⟨0.16.0, L4⟩ `atNs`/`changedAtNs`: ns timestamps carry the suffix. The honesty split the two
872
- /// fields encode is unchanged — `atNs` is when THIS registry last upgraded the canister, and
873
- /// `changedAtNs` is when its module hash last moved by any hand, so a self-upgrade or a manual
874
- /// install shows up as a change with no matching upgrade. Renaming here is free: the record is
875
- /// built at the query boundary, and the stable state it reads keeps its own spelling.
1158
+ /// ⟨0.16.0, nanosecond times named AtNs⟩ `atNs`/`changedAtNs`: ns timestamps carry the suffix. The
1159
+ /// honesty split the two fields encode is unchanged — `atNs` is when THIS registry last upgraded
1160
+ /// the canister, and `changedAtNs` is when its module hash last moved by any hand, so a
1161
+ /// self-upgrade or a manual install shows up as a change with no matching upgrade. Renaming here is
1162
+ /// free: the record is built at the query boundary, and the stable state it reads keeps its own
1163
+ /// spelling.
876
1164
  /// ⟨CORRECTED 2026-10-02: "by any hand … shows up" is false, and so is "stamped only when code
877
1165
  /// actually changed" above, read without its limit.⟩ `changedAtNs` is written at exactly two
878
1166
  /// places, both right after THIS registry's own successful install on the engram
@@ -911,6 +1199,16 @@ service : {
911
1199
  /// so a caller can hold a reservation with no engram. Seeing it here is what tells them to retry
912
1200
  /// provision rather than reserve again.
913
1201
  getMyReservation: () -> (opt ReservationView) query;
1202
+ /// CALLER: the app's restart sheet, for the owner (the surface budget: every method names its caller). What the caller's engram owes from a
1203
+ /// restart, when the next restart is allowed, and whether one is open. Refused loudly to anyone
1204
+ /// with no engram here — never "0 owed" to a caller it cannot answer for (refusal over fabrication).
1205
+ /// ⟨2026-10-26⟩ `openUntilNs` now reads the open restart's `finishByNs` (`restartsOpen`): when the
1206
+ /// call or the sweep will have started the engram. Shape unchanged.
1207
+ /// ⟨CORRECTED 2026-10-26, later — the owner's restart choice of that day: "apply the weekly limit only when
1208
+ /// we lend"⟩ "when the next restart is allowed" now reads "when the registry can next LEND to a
1209
+ /// restart": `nextRestartAtNs` is only the weekly limit on a loan. A restart on the owner's own
1210
+ /// compute is allowed now, whatever it says. Field name and shape unchanged.
1211
+ getMyRestartStatus: () -> (Result_26) query;
914
1212
  /// ⟨2026-10-02⟩ How many engrams were ever opened, and how — lifetime sizes of state this registry
915
1213
  /// never deletes, plus the two counters of refused openings (`Funnel.OpeningCounts` names each).
916
1214
  /// All O(1); a reader differences them day to day.
@@ -919,7 +1217,32 @@ service : {
919
1217
  /// grant). Anyone else is REFUSED by name with their class — never a zero, which would read as
920
1218
  /// "nothing was ever opened". A QUERY: counts only, and cheap; its refusal is not in the denial
921
1219
  /// log (`denied` says why a query cannot write).
922
- getOpeningCounts: () -> (Result_16) query;
1220
+ getOpeningCounts: () -> (Result_25) query;
1221
+ /// Where an engram was opened from ⟨2026-10-26, the owner's lineage ruling: "a child reads its own
1222
+ /// parent by its canister id"⟩: the engram, the engram it was opened from, and the cut-off's time if
1223
+ /// there is one. Closes "a handed-on child cannot read its own parent" — `getEngramOpenedThrough` is
1224
+ /// keyed by the lasting key that OPENED the engram, which a new owner does not hold.
1225
+ ///
1226
+ /// CALLER: the engram's CURRENT owner, the current owner of the engram it was opened from, or this
1227
+ /// registry's admin and audit viewers (the surface budget: every method names its caller). Reuses `parentOf`; no new state. The two owners are
1228
+ /// answered first; anyone else goes through the registry's combinator (`#adminOrViewer`), which
1229
+ /// refuses every other caller in the same words whether or not the id is an engram, so a refusal
1230
+ /// tells a stranger nothing. A QUERY, so the refusal is not written to the denial log (`denied`
1231
+ /// says why a query cannot write).
1232
+ /// `#NotFound` only to a permitted reader: a first engram has no parent (a true answer), and an id
1233
+ /// this registry never opened is said to be one, not passed off as a first engram (refusal over fabrication).
1234
+ /// The owner's lineage rulings of 2026-10-26 keep `listChildrenOf` unchanged and the change-of-owner
1235
+ /// gate unchanged.
1236
+ getParentOf: (child: principal) -> (Result_24) query;
1237
+ /// PUBLIC: CALLER: the app, the owner kit and anyone checking an engram's record (the surface budget: every method names its caller). When this
1238
+ /// registry last REINSTALLED the engram on its own id after the network erased it (`recoverMyEngram`),
1239
+ /// or null — never recovered. ⟨2026-11-04⟩ Public for `getAbandonedAtNs`'s reason: a
1240
+ /// record that restarted is a fact about the record that a stranger checking it needs, and the same date
1241
+ /// is certified in the engram's anchor leaf (`recoveredAtNs`, with its `era`).
1242
+ /// ⟨2026-11-05, beside the above⟩ Set when the reinstall BEGINS — the old record's anchors are set aside in
1243
+ /// the same message, before the install (`recoverMyEngram` says why) — so while a recover's install has not
1244
+ /// landed, the engram can read erased with this set; the compute probes' `recoverOpen` says one is open.
1245
+ getRecoveredAtNs: (canisterId: principal) -> (opt int) query;
923
1246
  /// ⟨2026-10-02⟩ How far agents reach across owners — COUNTS ONLY: agents by how many trees their
924
1247
  /// record spans (1 · 2 · 3–4 · 5+), engrams opened through a parent that are live or cut off, and
925
1248
  /// engrams that paired an agent within seven days of opening. No principal, no row, no per-agent
@@ -931,14 +1254,31 @@ service : {
931
1254
  /// CALLERS: the admin and the audit viewers (the deployment's metrics reader holds a viewer grant),
932
1255
  /// weekly. Anyone else is REFUSED by name with their class — never zeros. A QUERY: its cost grows
933
1256
  /// with the agents and engrams it walks (one pass over each), so a reader asks weekly, not hourly.
934
- getReferralCounts: (exclude: vec principal) -> (Result_15) query;
1257
+ getReferralCounts: (exclude: vec principal) -> (Result_23) query;
1258
+ /// ⟨2026-11-02, the owner's rulings that one combined health read replaces separate status
1259
+ /// questions, and "go ahead with your noticing failures changes"⟩ THE
1260
+ /// REGISTRY'S HEALTH IN ONE READ: its cycle reserve, its roster, its anchoring counts — the same
1261
+ /// answers `getCycleReserveStatus`, `getAdminRoles` and `getAnchorStats` give, which stay served
1262
+ /// unchanged for everyone who reads them one at a time — and the stamps of its clock, which wakes only
1263
+ /// at the deadlines it records (with a six-hour net) and so is silent by design: `clock.nextWakeAtNs`
1264
+ /// more than an hour behind `atNs` is a lost clock. `Types.RegistryHealth` says what each field
1265
+ /// means, and why every field is `opt` and always filled.
1266
+ ///
1267
+ /// CALLER: the deployment's monitor, once an hour, under the audit-viewer grant its daily count-of-use
1268
+ /// reading already holds (the surface budget: every method names its caller). Also the admin.
1269
+ ///
1270
+ /// GATED, LIKE THE COUNT-OF-USE READS THAT MONITOR MAKES (`getOpeningCounts`): the admin or an audit
1271
+ /// viewer; anyone else is REFUSED by name — never an empty or zero reading. A QUERY: its refusal is
1272
+ /// not in the denial log (a query cannot write; `denied` says why). One read where there were three
1273
+ /// saves the monitor and this registry two calls an hour each.
1274
+ getRegistryHealth: () -> (Result_22) query;
935
1275
  /// PUBLIC: the biller identity is an operational fact a
936
- /// payer's cashier must verify BEFORE taking money (paying into a cashier the registry does not
1276
+ /// payer's biller must verify BEFORE taking money (paying into a biller the registry does not
937
1277
  /// recognize as biller would collect funds it cannot convert into credit).
938
1278
  getRentBiller: () -> (opt principal) query;
939
1279
  /// Public transparency: is the gate armed, and which identity issuers are exempt?
940
- /// ⟨0.16.0 — census row⟩ Gains `inviteIssuer`, closing the R5 setter-without-a-getter gap
941
- /// without adding a method: `setInviteIssuer` could write a principal that nothing could read
1280
+ /// ⟨0.16.0⟩ Gains `inviteIssuer`, closing the setter-without-a-getter gap the August 2026 interface
1281
+ /// audit found, without adding a method: `setInviteIssuer` could write a principal that nothing could read
942
1282
  /// back, so "who may mint reserve invites" was unanswerable from outside.
943
1283
  ///
944
1284
  /// It serves the EFFECTIVE issuer, not the raw `?Principal`. The stored value is null until
@@ -951,11 +1291,37 @@ service : {
951
1291
  /// stranger can sign up at all. An admission rule only the admitted can read is not a rule a
952
1292
  /// prospective user can act on.
953
1293
  getReserveGateConfig: () -> (ReserveGateConfig) query;
1294
+ /// PUBLIC: CALLER: the status page (the surface budget: every method names its caller). What the registry has lent to restart stopped engrams
1295
+ /// — lent, repaid, written off, outstanding — and what engrams gave back of the compute a paid
1296
+ /// security update advanced them (returned, written off). Ungated, because a subsidy we would not
1297
+ /// publish is one we should not spend. `getUpgradeSubsidyTotal` stays the gross figure.
1298
+ /// ⟨2026-10-26, the owner's ruling "write it off, but accounting should be exact"⟩ Two exact
1299
+ /// identities hold between any two messages: lent = repaid + writtenOff + outstanding, and
1300
+ /// advancePaid = advanceReturned + advanceWrittenOff + advanceOutstanding.
1301
+ /// ⟨2026-10-26, later — the owner's restart choice of that day: "add the release name to each write-off
1302
+ /// record. This needs no new storage."⟩ These totals are fleet-wide. PER RELEASE, read the audit
1303
+ /// chain: every line that moves an advance names the release it was paid for, `template=<module
1304
+ /// hash>` (and `version=` when the release history names one) — `upgrade.topUp` (paid, `added=`),
1305
+ /// `upgrade.advance.returned` (`returned=`, `writtenOff=`) and `upgrade.advance.writtenOff`
1306
+ /// (`writtenOff=`, including the 90-day write-off of an advance left outstanding, per the owner's restart choice).
1307
+ /// Summed by `template=`, they give each release's paid, returned and written-off figures exactly;
1308
+ /// what is still out per release is paid − returned − written off. Restart-loan lines are not per
1309
+ /// release (a loan pays for no release).
1310
+ /// ⟨CORRECTED 2026-10-26, later — a review fix⟩ "exactly" holds only over a
1311
+ /// COMPLETE copy of the audit chain. The registry keeps the most recent 10,000 audit entries
1312
+ /// (AuditLog's `MAX_ENTRIES`; on overflow it drops back to 9,000, oldest first), and a give-back or
1313
+ /// a 90-day write-off can land long after its `upgrade.topUp` line was dropped. A per-release sum
1314
+ /// read from the registry alone can therefore miss lines. Exact per-release figures need an archive
1315
+ /// of the chain kept from the first line on (scripts/audit-chain/monitor.mjs `--archive`); whether
1316
+ /// such an archive is kept durably is an operator's choice, not this registry's. The fleet totals
1317
+ /// this method answers are exact regardless.
1318
+ getRestartTotals: () -> (RestartTotals) query;
954
1319
  /// PUBLIC: transparency without a doxx — how many principals the deployment currently screens (0 = seam
955
1320
  /// disarmed, the shipped default). The list itself is never enumerable publicly.
956
1321
  getScreeningDenylistSize: () -> (nat) query;
957
1322
  /// How many engram template releases this registry has declared `#Security` — the class that
958
- /// skips any delay and is funded for every engram. ⟨2026-09-28, owner decision: publish the
1323
+ /// skips any delay and whose install the registry pays for on every running engram (⟨2026-10-25⟩
1324
+ /// was "is funded for every engram"). ⟨2026-09-28, owner decision: publish the
959
1325
  /// count only; the status page shows the number.⟩ It moves only when a template's class is
960
1326
  /// declared INTO `#Security` (`setEngramWasmClass`), never on `#Feature`, never down.
961
1327
  /// ⟨CORRECTED 2026-09-29⟩ It counts TEMPLATES, not declarations: each distinct template (by its
@@ -968,8 +1334,8 @@ service : {
968
1334
  /// watch is how often we reach for the class that skips the wait. A gated count would be a check
969
1335
  /// on us that only we can read.
970
1336
  getSecurityReleaseCount: () -> (nat) query;
971
- /// ⟨2026-10-01, the owner's ruling of that day (2 A)⟩ Cumulative cycles accepted at the sponsored
972
- /// door (`sysSpawnChild`) and forwarded into engrams opened through another — cycles the calling
1337
+ /// ⟨2026-10-01, the owner's ruling of that day⟩ Cumulative cycles accepted at the sponsored
1338
+ /// door (`sysOpenChild`) and forwarded into engrams opened through another — cycles the calling
973
1339
  /// engrams attached, never the registry's own. Kept apart from the grant counter
974
1340
  /// (`totalCyclesAllocated`) so neither figure is inflated by the other.
975
1341
  ///
@@ -984,7 +1350,7 @@ service : {
984
1350
  /// its counterparty cannot be checked by anyone. A canister id is not a secret; withholding it
985
1351
  /// would leave a verifier holding an anchor with nothing to anchor it to.
986
1352
  getTreasuryAnchorId: () -> (opt principal) query;
987
- /// ⟨0.16.0, L11⟩ `null` MEANS NEVER CHOSE. It used to mean `#AutoUpdate`.
1353
+ /// ⟨0.16.0, the honesty rule against fabricated answers⟩ `null` MEANS NEVER CHOSE. It used to mean `#AutoUpdate`.
988
1354
  ///
989
1355
  /// Returning the shipped default for a caller who has never expressed a preference is a
990
1356
  /// fabricated CONSENT: the registry answered "this owner opted into automatic upgrades" when the
@@ -1012,9 +1378,15 @@ service : {
1012
1378
  /// `?Text` had to carry both "you may not ask" and "this engram was never funded for an upgrade"
1013
1379
  /// — and the second is a claim about OUR OWN SPEND, not an absence of one. `#Ok(null)` now means
1014
1380
  /// never funded, `#Err(#Refused)` means not your business, and no caller has to guess which.
1015
- getUpgradeFundedTemplate: (canisterId: principal) -> (Result_14) query;
1016
- /// Cumulative cycles the registry has granted to engrams for upgrades — the meter on the
1017
- /// never-gated pull path.
1381
+ getUpgradeFundedTemplate: (canisterId: principal) -> (Result_21) query;
1382
+ /// Cumulative cycles the registry has granted to engrams for upgrades — ⟨2026-10-25⟩ the meter on
1383
+ /// security-update funding: the registry pays only for security updates on running engrams (was:
1384
+ /// "the meter on the never-gated pull path"; the pull is still never refused, and a feature update
1385
+ /// it installs is not paid for).
1386
+ /// ⟨CORRECTED 2026-10-26, later — the owner's restart choice on paying for security updates⟩
1387
+ /// "a feature update it installs is
1388
+ /// not paid for" now excepts an engram still missing an earlier security release: that install is
1389
+ /// paid as a security update and counted here (UpgradeFunding.effectiveClass).
1018
1390
  ///
1019
1391
  /// PUBLIC: a subsidy we would not publish is one we should not spend. Free and ungated.
1020
1392
  getUpgradeSubsidyTotal: () -> (nat) query;
@@ -1051,7 +1423,7 @@ service : {
1051
1423
  /// PUBLIC: this IS the verification surface, and a verification surface nobody can call verifies
1052
1424
  /// nothing. Free and ungated for the same reason.
1053
1425
  isOfficialEngramWasm: (hash: text) -> (bool) query;
1054
- /// "Is this a registered, `#Active` engram?" — no owner argument, only a Bool. The cashier uses
1426
+ /// "Is this a registered, `#Active` engram?" — no owner argument, only a Bool. The biller uses
1055
1427
  /// it to authorize an engram funding its OWN cycles: on that path the caller IS the engram
1056
1428
  /// canister, and this confirms it is a live one.
1057
1429
  ///
@@ -1064,10 +1436,11 @@ service : {
1064
1436
  /// `[]` here is a SUBSTANTIVE CLAIM ABOUT ANOTHER PRINCIPAL'S FLEET — "this agent works
1065
1437
  /// nowhere" — handed to a caller who merely lacks a grant. Readable by an admin, an audit viewer,
1066
1438
  /// or that agent about itself.
1067
- listAgentEngrams: (agent: principal) -> (Result_12) query;
1439
+ listAgentEngrams: (agent: principal) -> (Result_18) query;
1068
1440
  /// Contradictory submissions, oldest-first. Empty is the normal case. Never trimmed.
1069
1441
  ///
1070
- /// ⟨0.16.0, L3 — PAGED 2026-08-18⟩ This returned the WHOLE list, and the list is one an engram
1442
+ /// ⟨0.16.0, every list returns one page shape — PAGED 2026-08-18⟩
1443
+ /// This returned the WHOLE list, and the list is one an engram
1071
1444
  /// can grow itself: `sysAnchorHead` appends a conflict on every contradictory submission and the
1072
1445
  /// policy is deliberately never-evict. An uncapped reply over a caller-growable list eventually
1073
1446
  /// exceeds the response limit, and an oversized Candid reply does not truncate — it fails to
@@ -1079,8 +1452,8 @@ service : {
1079
1452
  /// ⚠ THE WRITE SIDE IS STILL UNBOUNDED and is NOT fixed here. An engram can append to its own
1080
1453
  /// conflict list without limit, which is unbounded state on a shared canister paid for by the
1081
1454
  /// registry's cycles. Capping it means deciding what to drop from an evidence store whose whole
1082
- /// promise is that nothing is dropped — a retention ruling, not a shape fix. Recorded in the
1083
- /// backlog rather than decided here.
1455
+ /// promise is that nothing is dropped — a retention ruling, not a shape fix. Left open rather
1456
+ /// than decided here.
1084
1457
  /// ⟨CORRECTED 2026-09-28 — the paragraph above is no longer true: the owner ruled "never delete;
1085
1458
  /// cap submissions; publish the refusal count". Nothing is dropped; the WRITE side is now bounded
1086
1459
  /// at `AnchorConflicts.MAX_CONFLICTS_PER_ENGRAM` rows per engram, `sysAnchorHead` refuses further
@@ -1092,7 +1465,7 @@ service : {
1092
1465
  /// while keeping the evidence that two of them disagree — the fabricate-on-refusal shape aimed at
1093
1466
  /// the one reader the anchors exist for.
1094
1467
  listAnchorConflicts: (canisterId: principal, start: nat, limit: nat) ->
1095
- (Result_13) query;
1468
+ (Result_20) query;
1096
1469
  /// Witnessed heads for an engram, oldest-first. PUBLIC and ungated — an anchor a stranger cannot
1097
1470
  /// read is not an anchor (ratified: "recorded where counterparties can check them").
1098
1471
  ///
@@ -1128,8 +1501,14 @@ service : {
1128
1501
  /// anything. A cap that is part of the ratified design is not the unbounded growth paging exists
1129
1502
  /// for. WHAT WOULD MAKE THIS WRONG: the ring outgrowing one reply, or rows withheld per caller —
1130
1503
  /// then it pages, and that is a break.
1504
+ /// ⟨2026-11-04, the owner's old-record ruling⟩ EVERY ERA, oldest first. An engram the registry
1505
+ /// recovered after the network erased it has more than one record: each anchor carries `era` (0 = its
1506
+ /// first record, k = after its k-th recover), the earlier eras' anchors as they stood when each was set
1507
+ /// aside, then the current era's. Nothing is withheld or deleted. `disputed` is read against the
1508
+ /// contradictions recorded during the anchor's own era.
1131
1509
  listAnchors: (canisterId: principal) -> (vec AnchorView) query;
1132
- /// ⟨0.16.0, L1 + L2.1⟩ RENAMED from `readAuditLog`, and the refusal is now a VALUE.
1510
+ /// ⟨0.16.0, refusals are values; a list method returns a page⟩ RENAMED from `readAuditLog`, and the
1511
+ /// refusal is now a VALUE.
1133
1512
  ///
1134
1513
  /// It refused by `Debug.trap`, which was the right call when the alternative was a fabricated
1135
1514
  /// answer — and the fabrication it replaced is worth restating, because it is the sharpest one
@@ -1145,46 +1524,57 @@ service : {
1145
1524
  ///
1146
1525
  /// The inline record dies for a `Page`: `earliestId` was redundant with the ring's own paging,
1147
1526
  /// and `size`/`headHash` are `getAuditHead`'s answer, published free to everyone.
1148
- listAuditEntries: (start: nat, limit: nat) -> (Result_10) query;
1149
- /// ⟨0.16.0, L2.2⟩ RENAMED from `getMetricsViewers` — the viewer triple unifies on "audit viewer"
1527
+ ///
1528
+ /// ⟨2026-10-15, the owner's ruling of 2026-10-14 on the chained record⟩ The reply is the shared `Wire.RecordPage`,
1529
+ /// the shape every chain canister's record read now serves, so one checker reads all of them. A
1530
+ /// viewer sees every entry, so `sealed` is always empty here; what the page adds is `ringFloor`
1531
+ /// (where the ring starts — a `start` below it begins at it) and `hashFirstFrom` (where this
1532
+ /// record switched to the hash-first rule: entries below it were hashed SHA-256(prev ‖ body)).
1533
+ /// `total` is now the head counter, as everywhere else — it was the size of the 1,000-entry window
1534
+ /// this read sliced, which is not a number about the record. The gate is unchanged: hash-only rows
1535
+ /// for strangers were ruled for the engram's record, and the status console decides a signed-in
1536
+ /// visitor's tier by whether this read refuses.
1537
+ listAuditEntries: (start: nat, limit: nat) -> (Result_19) query;
1538
+ /// ⟨0.16.0, same concept, same name across canisters⟩
1539
+ /// RENAMED from `getMetricsViewers` — the viewer triple unifies on "audit viewer"
1150
1540
  /// across every canister, because a roster that grants audit reads should not be named after
1151
1541
  /// metrics on one canister and audit on another.
1152
1542
  ///
1153
1543
  /// MEASURED FABRICATION, kept in the record: this arm answered `(vec {})` to an ANONYMOUS caller
1154
1544
  /// on 2026-08-11 while viewers existed. An empty vec reads as "nobody holds read-only ops access"
1155
1545
  /// when the truth was "you are not on the roster".
1156
- listAuditViewers: () -> (Result_12) query;
1546
+ listAuditViewers: () -> (Result_18) query;
1157
1547
  /// PUBLIC: the release history, paged.
1158
1548
  ///
1159
- /// ⟨0.16.0, L2.1⟩ A `Page`, not a bare vec. The old shape returned the WHOLE changelog on every
1160
- /// call with no way to say it had been truncated — and a list that cannot say "there is more"
1161
- /// looks complete at exactly the size where it stops being so.
1549
+ /// ⟨0.16.0, a list method returns a page⟩ A `Page`, not a bare vec. The old shape returned the
1550
+ /// WHOLE changelog on every call with no way to say it had been truncated — and a list that cannot
1551
+ /// say "there is more" looks complete at exactly the size where it stops being so.
1162
1552
  listChangelogEntries: (start: nat, limit: nat) -> (Page_4) query;
1163
- /// ⟨2026-10-01, the owner's ruling of that day (2 A)⟩ The engrams opened through `engram`, each with
1553
+ /// ⟨2026-10-01, the owner's ruling of that day⟩ The engrams opened through `engram`, each with
1164
1554
  /// its owner now and its cut-off time if any. GATED: readable by `engram`'s owner, an admin or an
1165
1555
  /// audit viewer. The link says who works for whom, so it is not public (unlike the predecessor
1166
1556
  /// chain, which exists to be walked by a stranger).
1167
1557
  ///
1168
- /// REFUSED LOUDLY, never `[]`, to anyone else (ADR-0002): an empty list handed to a caller who
1558
+ /// REFUSED LOUDLY, never `[]`, to anyone else (refusal over fabrication): an empty list handed to a caller who
1169
1559
  /// merely lacks a grant would be a claim about another owner's engram. A QUERY, so the refusal is
1170
1560
  /// not in the denial log (`denied` says why a query cannot write).
1171
1561
  ///
1172
1562
  /// Built by a pass over `parentOf` rather than from a second, reverse index: one stored fact and a
1173
1563
  /// pass bounded by the number of opened engrams, instead of two facts to keep in step.
1174
- listChildrenOf: (engram: principal) -> (Result_11) query;
1564
+ listChildrenOf: (engram: principal) -> (Result_17) query;
1175
1565
  /// ⟨0.16.0⟩ RENAMED from `readDenialLog`; the refusal becomes a value.
1176
1566
  ///
1177
1567
  /// An empty denial log reads as NOBODY HAS EVER BEEN REFUSED HERE, which is the opposite of what
1178
1568
  /// this log exists to record — so "empty" was never an acceptable answer to a caller who simply
1179
1569
  /// lacks the grant. The old trap said so; this says the same thing as data.
1180
- listDenialEntries: (start: nat, limit: nat) -> (Result_10) query;
1570
+ listDenialEntries: (start: nat, limit: nat) -> (Result_16) query;
1181
1571
  /// ⟨2026-10-02⟩ ONE ROW PER ENGAGEMENT, for the deployment's own count of use — DAYS, never
1182
1572
  /// instants, and NEVER the agent's root, enrolled key or invite.
1183
1573
  ///
1184
1574
  /// CALLERS: the admin, and the audit viewers — the reader the deployment runs for this purpose
1185
1575
  /// holds a viewer grant and calls this once a day. Anyone else is REFUSED by name, with their
1186
1576
  /// class (the anonymous principal, an engram, the template key, an engram's owner, a stranger) —
1187
- /// never an empty page, which is what a lost history would also look like (ADR-0002).
1577
+ /// never an empty page, which is what a lost history would also look like (refusal over fabrication).
1188
1578
  ///
1189
1579
  /// ARGUMENTS. `sinceDay`: any instant, floored to its UTC day; a row is served when the LATEST of
1190
1580
  /// its start, its ending, its engram's abandonment and any reset since it started is on or after
@@ -1198,12 +1588,13 @@ service : {
1198
1588
  /// The reply is a page whose `total` is every engagement ever recorded here. Each row's fields
1199
1589
  /// are described at `Funnel.EngagementRow`; the walk and its cost at `Funnel.engagementRows`.
1200
1590
  ///
1201
- /// ⟨L7⟩ An UPDATE, not a query, so a refused attempt is RECORDED: `denied()` is a state write,
1591
+ /// ⟨update-for-read⟩ An UPDATE, not a query, so a refused attempt is RECORDED: `denied()` is a state write,
1202
1592
  /// and a query cannot write (the reason `listEngrams` is an update). This is the most sensitive of
1203
1593
  /// the three reads — one row per engagement — so who was turned away is worth a record.
1204
1594
  listEngagementRows: (sinceDay: int, start: nat, limit: nat, companyList:
1205
- vec principal) -> (Result_9);
1206
- /// ⟨0.16.0, L1⟩ THE `authorized : ?Bool` FLAG IS GONE, AND SO IS EVERYTHING BUILT AROUND IT.
1595
+ vec principal) -> (Result_15);
1596
+ /// ⟨0.16.0, one Result shape for every gated method⟩
1597
+ /// THE `authorized : ?Bool` FLAG IS GONE, AND SO IS EVERYTHING BUILT AROUND IT.
1207
1598
  ///
1208
1599
  /// The flag was the most carefully-argued compromise in this canister, and every word of that
1209
1600
  /// argument rested on ONE premise: this method could not refuse. It is an UPDATE because
@@ -1217,23 +1608,23 @@ service : {
1217
1608
  /// There is no masked payload left to check a flag against.
1218
1609
  ///
1219
1610
  /// What goes with it: the three-state ?true/?false/null protocol and the "a reader that collapses
1220
- /// null to false fabricates a refusal" rule; the ADR-0018 opt-from-birth ceremony this field was
1611
+ /// null to false fabricates a refusal" rule; the interface-evolution rule's opt-from-birth ceremony this field was
1221
1612
  /// the motivating example for; the fleet collector's dual-IDL split; and the cross-check against
1222
- /// the public engram count that storage-sweep.sh used as a discriminator. All of it was
1613
+ /// the public engram count that an off-chain storage sweep used as a discriminator. All of it was
1223
1614
  /// scaffolding around "we cannot say no in a value", and none of it is load-bearing once we can.
1224
1615
  ///
1225
- /// ⚠ CENSUS CONFLICT, resolved at the site. The census says "query again" — reasoning that the
1616
+ /// ⚠ A CONFLICT WITH THE 0.16.0 INTERFACE PLAN, resolved at the site. That plan says "query again" — reasoning that the
1226
1617
  /// only thing forcing an update was the masking problem. It was not: the update exists so the
1227
1618
  /// DENIAL IS RECORDED, and a query cannot write, so making this a query would silently retire
1228
1619
  /// the audit trail the original comment correctly called worth more than the false answer.
1229
1620
  /// Staying an update keeps both — the legible refusal AND the record of who was refused — which
1230
1621
  /// is strictly better than either option the old design had to choose between.
1231
1622
  ///
1232
- /// ⟨L7⟩ MARKER ADDED 2026-08-23, reasoning above UNCHANGED. This method's reason was already
1233
- /// written and correct; what it lacked was the glyph a gate can see. Its case is the one L7's
1234
- /// own text had to be corrected for — the forcing call is not a system API at all, it is
1235
- /// `denied()`, a state write. See `scripts/check-update-for-read.mjs`.
1236
- listEngrams: (offset: nat, limit: nat) -> (Result_8);
1623
+ /// ⟨update-for-read⟩ MARKER ADDED 2026-08-23, reasoning above UNCHANGED. This method's reason was already
1624
+ /// written and correct; what it lacked was the glyph a gate can see. Its case is the one the
1625
+ /// update-for-read rule's own text had to be corrected for — the forcing call is not a system API at all, it is
1626
+ /// `denied()`, a state write. (The deploying side's update-for-read check reads this marker.)
1627
+ listEngrams: (offset: nat, limit: nat) -> (Result_14);
1237
1628
  /// ⟨2026-09-28, owner decision: an agent may read its own record⟩ The caller's OWN dispute
1238
1629
  /// statements, oldest first, verbatim. Keyed by `msg.caller`, so it cannot be pointed at anyone
1239
1630
  /// else, and an empty list is a true answer about the caller ("you have appended none"), never a
@@ -1268,11 +1659,12 @@ service : {
1268
1659
  /// fresh start. Abandon-and-respawn is reputation laundering performed by our own feature unless
1269
1660
  /// a stranger can walk this, so the walk has to be answerable to a stranger.
1270
1661
  ///
1271
- /// ⟨2026-09-30, the owner's answer 3 of that date⟩ An engram can now name more than one
1272
- /// predecessor (`ControlHandover.predecessorsFor`), so the lineage is walked a generation at a time:
1273
- /// every engram this one named, then every engram those named, each listed once. A chain with one
1274
- /// predecessor per engram reads exactly as before. The walk is `ControlHandover.lineage`, where
1275
- /// test/control-handover.test.mo runs it; the `seen` rule and the length cap above still hold.
1662
+ /// ⟨2026-09-30, the owner's ruling that an abandoned engram stays in its owner's history⟩ An engram
1663
+ /// can now name more than one predecessor (`ControlHandover.predecessorsFor`), so the lineage is
1664
+ /// walked a generation at a time: every engram this one named, then every engram those named, each
1665
+ /// listed once. A chain with one predecessor per engram reads exactly as before. The walk is
1666
+ /// `ControlHandover.lineage`, where test/control-handover.test.mo runs it; the `seen` rule and the
1667
+ /// length cap above still hold.
1276
1668
  listPredecessors: (canisterId: principal) -> (vec principal) query;
1277
1669
  /// ⟨0.16.0⟩ The refusal becomes a value.
1278
1670
  ///
@@ -1280,14 +1672,15 @@ service : {
1280
1672
  /// that zero applies the SHIPPED DEFAULT — silently reversing every explicit ManualOnly consent
1281
1673
  /// choice in the fleet. That is the consequence this refusal exists to prevent, and it belongs in
1282
1674
  /// the message a caller actually receives.
1283
- listUpdatePrefs: (start: nat, limit: nat) -> (Result_7) query;
1675
+ listUpdatePrefs: (start: nat, limit: nat) -> (Result_13) query;
1284
1676
  /// Mint one-shot reserve invites (invite-issuer or admin). Codes use IC-secure randomness over a
1285
1677
  /// 32-symbol no-ambiguous alphabet (8 chars ≈ 40 bits). Batch-capped; table hard-capped.
1286
- mintReserveInvites: (count: nat) -> (Result_6);
1678
+ mintReserveInvites: (count: nat) -> (Result_12);
1287
1679
  /// The PROBED twin of `getCustodyMode`: same question, asked of the IC rather than of our
1288
1680
  /// records — hence the `probe` verb rather than a second noun.
1289
1681
  ///
1290
- /// ⟨0.16.0, L2.2⟩ RENAMED from `getSovereigntyStatus`. Both methods answer the same type,
1682
+ /// ⟨0.16.0, same concept, same name across canisters⟩
1683
+ /// RENAMED from `getSovereigntyStatus`. Both methods answer the same type,
1291
1684
  /// `Result<CustodyMode>`, so the old name introduced a SovereigntyStatus noun that no type in
1292
1685
  /// this interface has. A reader comparing the two names had to open both to learn they were
1293
1686
  /// one question; comparing the stems now shows it. What differs is HOW the answer is obtained
@@ -1295,7 +1688,7 @@ service : {
1295
1688
  /// for. The arity difference is real and stays: `getCustodyMode` answers about any canister,
1296
1689
  /// this one about the CALLER's own engram.
1297
1690
  ///
1298
- /// ⟨0.16.0, L7⟩ Both arms of the old `#Unknown` move into the envelope, and they are DIFFERENT
1691
+ /// ⟨0.16.0⟩ Both arms of the old `#Unknown` move into the envelope, and they are DIFFERENT
1299
1692
  /// facts that the single tag was flattening: "you have no engram here" is #NotFound, while
1300
1693
  /// "canister_status did not answer" is #Unavailable and means retry.
1301
1694
  ///
@@ -1305,26 +1698,93 @@ service : {
1305
1698
  /// a controller. Reporting #Sovereign there would tell an owner they had achieved sovereignty
1306
1699
  /// they do not have.
1307
1700
  ///
1308
- /// ⟨L7⟩ UPDATE, NOT QUERY, and this is the system call that forces it: the body awaits
1701
+ /// ⟨update-for-read⟩ UPDATE, NOT QUERY, and this is the system call that forces it: the body awaits
1309
1702
  /// `ic.canister_status`. That is also the whole point of the `probe` verb — the value is read
1310
1703
  /// LIVE from the management canister rather than from a stored transition record, so a query
1311
1704
  /// could not produce it at all, not merely more cheaply.
1312
- probeCustodyMode: () -> (Result_5);
1705
+ probeCustodyMode: () -> (Result_11);
1706
+ /// What YOUR OWN engram's compute is, read by the registry — the one read that works while it is
1707
+ /// frozen.
1708
+ ///
1709
+ /// CALLER: the owner, from the app's status strip, Billing and System pages (the surface budget: every method names its caller).
1710
+ /// ⟨2026-10-26, the owner's ruling that we pay nothing for a stopped engram: tell the owner, using
1711
+ /// signals that work while frozen⟩ The
1712
+ /// registry is a controller, and the network answers a controller canister's status call for a
1713
+ /// frozen engram where it refuses the owner's own (IC0207, read in the network's source by a study
1714
+ /// of stopped engrams). UPDATE, not query: it awaits the management canister (the `probe` verb, as
1715
+ /// `probeCustodyMode`).
1716
+ /// ⟨update-for-read⟩ ⟨marker added 2026-10-26; the reason above unchanged⟩ The system call that
1717
+ /// forces the update is `canister_status` on the management canister: a query cannot make an
1718
+ /// inter-canister call, so a query could not read the engram's network status at all — and that
1719
+ /// status is the only signal that still answers while the engram is frozen.
1720
+ /// No rate limit (the do-less): each call costs the registry one management
1721
+ /// call — INFERRED a few million cycles, not measured. `eraseAboutNs` is "about" and never invented:
1722
+ /// null when the network reports no idle burn.
1723
+ probeMyEngramCompute: () -> (Result_10);
1724
+ /// What an engram OPENED THROUGH ANOTHER is running on, read by the registry — for its key file and its
1725
+ /// sign-in (the person), the read `probeMyEngramCompute` is for a first engram's owner.
1726
+ ///
1727
+ /// CALLER: the app's Access page, signed in as the person, for a child row whose own `getOwnerSignIn`
1728
+ /// call is rejected (an erased child answers nothing) — and the owner kit, as the key file (the surface budget: every method names its caller).
1729
+ /// ⟨2026-11-04, the owner's ruling — "the registry starts keeping the person's sign-in for them"⟩
1730
+ /// The person may SEE, not ask and not pay: the ask (`recoverMyEngram`) and the payment (the biller's
1731
+ /// top-up, admitted only from the key file) stay the key file's. Gated to the child's key file
1732
+ /// (`canisterToOwner`) and its sign-in AS NOTED HERE (`childSignIn`); refused to everyone else — the
1733
+ /// parent's owner included — with the SAME words whether or not `child` exists or is a child at all
1734
+ /// (`getEngramOpenedThrough`'s precedent: who works for whom is not disclosed by a refusal). UPDATE, not
1735
+ /// query, for `probeMyEngramCompute`'s reason (a query cannot call the management canister).
1736
+ /// ⟨update-for-read⟩ ⟨marker added 2026-11-05, the reason above unchanged — a consumer's
1737
+ /// update-for-read check named it missing⟩ The system call that forces the update is
1738
+ /// `canister_status` on the management canister: a query cannot make an inter-canister call, so it
1739
+ /// could not read an erased child's network status at all.
1740
+ probeOpenedEngramCompute: (child: principal) -> (Result_10);
1313
1741
  /// ⟨0.16.0⟩ `Ok` CARRIES THE PRINCIPAL DIRECTLY, not a one-field record wrapping it.
1314
1742
  ///
1315
1743
  /// `#Ok : { canisterId : Principal }` was a record with nothing to disambiguate: the success of a
1316
1744
  /// spawn IS the canister it produced. The wrapper cost every caller a field access to reach the
1317
1745
  /// only thing the call returns, and invited a second field later that would belong somewhere else.
1746
+ ///
1747
+ /// ⟨2026-10-13, the owner's ruling: no genesis seed, no number copy⟩ `opts.genesis` (an optional
1748
+ /// first file, written as the canister spawned) is retired: the console creates an engram with no
1749
+ /// content (the owner's ruling of 2026-09-30 on the set-up page), the owner kit never calls this,
1750
+ /// and only test harnesses passed one. A caller still sending the field is unaffected — Candid
1751
+ /// ignores a record field the receiver does not declare.
1318
1752
  provisionEngram: (opts:
1319
- opt
1320
- record {
1321
- genesis: opt record {
1322
- content: blob;
1323
- path: text;
1324
- };
1325
- invite: opt text;
1326
- walletProof: opt blob;
1327
- }) -> (Result_1);
1753
+ opt record {
1754
+ invite: opt text;
1755
+ walletProof: opt blob;
1756
+ }) -> (Result_2);
1757
+ /// RECOVER YOUR OWN ERASED ENGRAM — reinstall it on the SAME id, so its wallet and EVM address come back.
1758
+ ///
1759
+ /// CALLER: the owner, from the app's "Recover my wallet" (a first engram), or an engram's key file through
1760
+ /// the owner kit's `--recover` (an engram an agent opened through another) — the surface budget: every method names its caller. ⟨2026-11-04, the
1761
+ /// owner's rulings of that day: no engram moves money on its own; an erased engram is reinstalled on
1762
+ /// its id, children included⟩ Recover.mo says what a recover is and
1763
+ /// what does and does not come back.
1764
+ ///
1765
+ /// THE ORDER: the owner first adds compute to the empty engram through the biller's existing top-up
1766
+ /// (each step its own tap; nothing here moves money, lends or funds); then this call reads the network's
1767
+ /// status of the engram as its controller, refuses by name unless the engram is ERASED (no module) and
1768
+ /// holds enough compute to install (`UpgradeFunding.noDipBar` — the line plus the install hold plus a
1769
+ /// margin; the exact shortfall is named), writes a durable "recover in progress" mark, installs the
1770
+ /// current template with `#install` ONLY (the network refuses it on a canister that holds a module), with
1771
+ /// the init record from this registry's own records (owner, registry, parent, the kept sign-in,
1772
+ /// `recoveredAtNs`), starts the engram if it was found stopped, sets the old record's anchors aside as an
1773
+ /// earlier era (the certified leaf says so), and re-sends what a newborn is told: its biller, market and
1774
+ /// metrics reader, a first fee line and its birth record. The mark is removed once the biller is in
1775
+ /// place; until then a second call finishes the work and answers `#Ok` with `finished = true`.
1776
+ /// ⟨CHANGED 2026-11-05, from the review of the recover-my-wallet build⟩ The old record's anchors are set aside (and
1777
+ /// `recoveredAtNs` recorded) with the mark, BEFORE the install — the record ended at the erase — and no
1778
+ /// first fee line is sent (the balance before the install is not a fee). The compute probes'
1779
+ /// `recoverOpen` says a recover is open. An upgrade that finds a recover's install landed records it first.
1780
+ ///
1781
+ /// Refused, before anything is written: not your engram (`#NotFound`); not active, or ABANDONED (the owner's ruling
1782
+ /// of 2026-11-04: an abandoned engram is not recovered — withdraw your digital dollars before you abandon an engram);
1783
+ /// sovereign; a change of owner unfinished; a restart open or
1784
+ /// a restart/recover call running; an update installing; no template; the status unreadable; NOT ERASED
1785
+ /// (`#Conflict` — "already recovered at T" when this registry recovered it, and no install); compute
1786
+ /// under the bar (`#Conflict` naming the shortfall).
1787
+ recoverMyEngram: () -> (Result_9);
1328
1788
  removeAuditViewer: (viewer: principal) -> (Result);
1329
1789
  /// ⟨0.16.0⟩ `Ok` IS THE ANSWER — the `{ reserved : Bool }` wrapper is gone.
1330
1790
  ///
@@ -1336,12 +1796,89 @@ service : {
1336
1796
  invite: opt text;
1337
1797
  walletProof: opt blob;
1338
1798
  }) -> (Result);
1799
+ /// Admin (the wasm admin): give one grown engram's working memory back, in place. The engram's
1800
+ /// stable graph is copied into its stable memory and the SAME module is reinstalled with
1801
+ /// `wasm_memory_persistence = ?#replace`, so the engram restarts in a fresh, small wasm memory with
1802
+ /// every file, version, record entry, setting and key it had (MemoryReset.mo).
1803
+ ///
1804
+ /// REFUSES, and changes nothing, when: the caller is not the wasm admin; the registry does not know
1805
+ /// the engram; a change of owner or a restart is open; its status cannot be read (a sovereign engram);
1806
+ /// it is not running; it is not on the current template; its wasm memory is under
1807
+ /// `MemoryReset.WASM_FLOOR_BYTES` (nothing to give back — and so a second reset straight after a
1808
+ /// first); its balance is short of the install hold above its own freezing line (no dip, no deposit);
1809
+ /// or one of its own calls is in flight ("Busy, try again").
1810
+ ///
1811
+ /// WHO PAYS: the engram, as for any install — `install_code` is charged to the canister it installs
1812
+ /// on, and the stabilise / rebuild steps are the engram's own messages. The registry deposits
1813
+ /// nothing; it pays only for its own calls. Two installs run: an ordinary one of the same module
1814
+ /// first, which is the network's test for a call in flight while nothing is yet at stake, then the
1815
+ /// replace.
1816
+ ///
1817
+ /// ONCE STARTED it finishes or says the engram is HELD: between the stabilise call and the replace
1818
+ /// install the engram refuses every message, so a failure there answers `#Unavailable` naming the
1819
+ /// step, and running this method again picks up where it stopped (it reads the held state from the
1820
+ /// engram itself). Do not publish a new template while a reset is held.
1821
+ ///
1822
+ /// Never run on production engrams (the owner's ruling). On the staging network, as the wasm admin,
1823
+ /// with the engram's canister id in ENGRAM:
1824
+ /// icp canister call registry-staging resetEngramMemory "(principal \"$ENGRAM\")" -e ic
1825
+ /// ⟨2026-11-15, beside "Never run on production engrams" above — from an adversarial review⟩ Both are CHECKS now, not
1826
+ /// comments. A build that carries the canonical root refuses the reset before anything is read
1827
+ /// (`MemoryReset.canonicalBuild`), and an engram whose owner chose `#ManualOnly` is refused unless an
1828
+ /// earlier reset already holds it (`MemoryReset.MANUAL_ONLY_REFUSAL`), as `pushUpgrade` refuses it.
1829
+ resetEngramMemory: (canisterId: principal) -> (Result);
1830
+ /// Restart YOUR OWN stopped engram.
1831
+ ///
1832
+ /// CALLER: the owner, from the app's restart sheet (the surface budget: every method names its caller). Afterwards the app runs the engram's
1833
+ /// own `convertEarningsToCycles` as the owner, which pays any loan back FIRST.
1834
+ ///
1835
+ /// ⟨REWRITTEN 2026-10-26, the owner's ruling of that day on restarts⟩ What it does, in this order: stops the
1836
+ /// engram; adds compute — the owner's own (already added through `stopMyEngramForRestart` and a
1837
+ /// top-up from their account), or a loan of what it still lacks to run at its OWN setting (at most
1838
+ /// 0.25T, only after the biller confirms the wallet holds enough to repay it); installs the waiting
1839
+ /// security release if the engram is behind one and the owner allows automatic updates (paid as a
1840
+ /// security update — we pay because we do not want security incidents); puts the owner's freezing
1841
+ /// setting back; and only then starts it. It never lowers the setting on a running engram. A step
1842
+ /// that fails never leaves the engram stopped: the registry's sweep finishes it within minutes.
1843
+ ///
1844
+ /// Refused BEFORE anything is stopped, saying why: not your engram; sovereign; a change of owner
1845
+ /// unfinished; restarted in the last 7 days; a loan still owed; an update installing; a restart
1846
+ /// already running; code the registry never published; running (nothing to restart); needing more
1847
+ /// than one loan; a waiting security update that this restart could not cover (it would start old
1848
+ /// code); an engram opened through another engram that would need a loan; the fleet-wide ceiling;
1849
+ /// no biller, or a wallet too low to repay. A restart that lent nothing does not spend the week.
1850
+ /// ⟨CORRECTED 2026-10-26, later — the owner's restart choices of that day on lending to children and on
1851
+ /// the weekly limit⟩ The list above is
1852
+ /// the record of the build before them. Now: "restarted in the last 7 days" and "a loan still owed"
1853
+ /// refuse ONLY a restart that would LEND (the owner's restart choice: "apply the weekly limit only when
1854
+ /// we lend") — asked once the plan knows the loan, and again after every await before the loan is made
1855
+ /// (`RestartLoan.lendGate`); a restart on the owner's own compute is never refused by them and never
1856
+ /// spends the week, which is taken only in the step that records a loan. "An engram opened through
1857
+ /// another engram that would need a loan" is GONE (the owner's restart choice: "lend to children like any
1858
+ /// other engram") —
1859
+ /// such an engram is lent to under the same ceiling, wallet check and repay-first as any other: the
1860
+ /// biller reads the engram's OWN wallet by its own id, and the engram's own Convert repays. New: a
1861
+ /// second call while one is still running for the same engram (`restartCallsRunning`), which is
1862
+ /// what now keeps two interleaved calls from both lending or both stopping and starting — the week
1863
+ /// used to double as that guard.
1864
+ /// ⟨2026-11-04, beside the lists above⟩ Also refused, first after the status
1865
+ /// read: an ERASED engram (its canister holds no program) — nothing is stopped or lent into it.
1866
+ restartMyStoppedEngram: () -> (Result_8);
1339
1867
  /// Return to managed: user calls AFTER adding registry back as controller
1868
+ ///
1869
+ /// ⟨2026-11-02⟩ Refused for an engram opened through another, which is never independent.
1340
1870
  returnToManaged: () -> (Result);
1341
1871
  /// Set admin. Authority decision lives in the pure Auth module (unit-tested); this func keeps only
1342
1872
  /// the async controller check + applies the outcome. When admin is null: REGISTRY_ROOT or a canister
1343
1873
  /// controller can set it. When admin is set: the current admin hands off, or REGISTRY_ROOT reclaims.
1344
1874
  setAdmin: (newAdmin: principal) -> (Result);
1875
+ /// Set the consent origin every engram spawned from now on is told (admin only; `null` clears it, and
1876
+ /// newborns are then told none). An https origin only — no path, query or fragment, lowercase, bounded
1877
+ /// (`ConsentOrigin.check`); anything else is `#Invalid` and nothing changes. Engrams already born keep
1878
+ /// what they were told.
1879
+ ///
1880
+ /// CALLER: the registry admin, from the deployment's setup step, before the deployment's first spawn.
1881
+ setConsentOrigin: (o: opt text) -> (Result);
1345
1882
  /// Upload the engram template in ONE message — the single-shot path. For a wasm too large to
1346
1883
  /// fit, use `engramWasmInit` → `engramWasmPushChunk` × N → `engramWasmFinalize` instead; the two
1347
1884
  /// paths produce the same result and differ only in how the bytes arrive.
@@ -1368,11 +1905,11 @@ service : {
1368
1905
  /// of it — which is exactly the power this note exists to deny.
1369
1906
  ///
1370
1907
  /// ⟨RENAMED 2026-10-02 from `sysSetGenesisPredecessor` — the sys-tier retier ruled 2026-08-24,
1371
- /// executed under the owner's 2026-10-02 ruling to carry out the pre-cut interface decisions as
1372
- /// recommended.⟩ CALLER: this registry's admin, a person, once, after the predecessor chain's
1373
- /// final head is captured. The `sys` prefix names the canister-to-canister tier, so an
1374
- /// admin-called method inside it made "a `sys` method has no human caller" false and therefore
1375
- /// uncheckable. The audit label moves with the name (`setGenesisPredecessor.denied`).
1908
+ /// executed under the owner's 2026-10-02 ruling to carry out the interface decisions reviewed
1909
+ /// before the 0.16.0 cut as recommended.⟩ CALLER: this registry's admin, a person, once, after the
1910
+ /// predecessor chain's final head is captured. The `sys` prefix names the canister-to-canister
1911
+ /// tier, so an admin-called method inside it made "a `sys` method has no human caller" false and
1912
+ /// therefore uncheckable. The audit label moves with the name (`setGenesisPredecessor.denied`).
1376
1913
  setGenesisPredecessor: (headHash: blob, size: nat) -> (Result);
1377
1914
  /// Set (or clear) the least-privilege invite-mint key (admin-only). Mirrors setWasmAdmin.
1378
1915
  setInviteIssuer: (p: opt principal) -> (Result);
@@ -1387,7 +1924,7 @@ service : {
1387
1924
  /// Flip the reserve gate (admin-only; audit-logged). OFF restores fully-open admission.
1388
1925
  setReserveGateEnabled: (enabled: bool) -> (Result);
1389
1926
  setScreeningDenylist: (list: vec principal) -> (Result);
1390
- setSpawnCeiling: (n: nat) -> (Result_4);
1927
+ setSpawnCeiling: (n: nat) -> (Result_7);
1391
1928
  setTreasuryAnchorId: (p: opt principal) -> (Result);
1392
1929
  /// Set the wallet-canister allowlist for the wallet-rooted exemption (admin-only). Small by
1393
1930
  /// design — these are identity ISSUERS (e.g. Internet Identity), not users.
@@ -1397,15 +1934,31 @@ service : {
1397
1934
  ///
1398
1935
  /// `claimSovereignty` sets this to `#ManualOnly` as a side effect, since a registry that is no
1399
1936
  /// longer a controller could not honour anything else.
1937
+ ///
1938
+ /// ⟨2026-11-02⟩ An engram opened through another is refused `#ManualOnly`: it takes this registry's
1939
+ /// updates automatically for life.
1400
1940
  setUpdatePreference: (pref: UpdatePreference) -> (Result);
1401
1941
  /// Set the spawn-ceiling dial (admin-only, audit-logged, bounded 1..SPAWN_CEILING_MAX).
1402
1942
  /// The effective daily cap stays min(ceiling, reserve-derived) — raising the dial never
1403
1943
  /// bypasses the funding constraint.
1404
1944
  /// Admin dial for the upgrade top-up floor (0 = disabled). Capped at one endowment so the dial
1405
1945
  /// itself cannot turn upgrades into an unbounded drain.
1406
- setUpgradeTopUpFloor: (n: nat) -> (Result_4);
1946
+ setUpgradeTopUpFloor: (n: nat) -> (Result_7);
1407
1947
  /// Root admin assigns the role key (pass null to clear, reverting the role to the root admin).
1408
1948
  setWasmAdmin: (p: opt principal) -> (Result);
1949
+ /// Stop YOUR OWN stopped-or-starving engram so you can add compute from your account and restart it.
1950
+ ///
1951
+ /// CALLER: the owner, from the app's "Add compute from my account" when the engram has stopped and
1952
+ /// a security update is waiting (the surface budget: every method names its caller).
1953
+ /// ⟨2026-10-26, the owner's ruling on restarts⟩ Stops the engram so that compute the owner adds
1954
+ /// next cannot wake its old code; the owner then adds compute through the biller's own top-up and
1955
+ /// calls `restartMyStoppedEngram`, which installs the waiting update and starts it. If the owner
1956
+ /// walks away, the sweep finishes it after 30 minutes: install if covered, restore, start. Never
1957
+ /// left stopped. It lends nothing, so it takes no week; it refuses an engram that is not stuck, so
1958
+ /// a healthy engram is never taken offline (a build choice the rulings left open).
1959
+ /// ⟨2026-11-04⟩ It also refuses an ERASED engram (its canister holds no
1960
+ /// program): there is nothing to restart, and nothing is stopped.
1961
+ stopMyEngramForRestart: () -> (Result_6);
1409
1962
  /// An engram witnesses its own audit head. Callable ONLY by a registered engram — msg.caller is
1410
1963
  /// the engram principal, so attribution needs no signature and cannot be forged by a third party.
1411
1964
  ///
@@ -1419,7 +1972,8 @@ service : {
1419
1972
  /// `AnchorConflicts.MAX_CONFLICTS_PER_ENGRAM` recorded contradictions gets `#Conflict` naming
1420
1973
  /// this method, and the refusal is COUNTED in its certified leaf (`refusedConflicts`). The
1421
1974
  /// evidence is not lost — the recorded ones stay forever and the count certifies that more came.
1422
- /// ⟨0.16.0, L2.3⟩ RENAMED from `anchorHead` — a mutation wearing a noun, and a `sys` edge that
1975
+ /// ⟨0.16.0, canister-to-canister methods carry the sys prefix⟩
1976
+ /// RENAMED from `anchorHead` — a mutation wearing a noun, and a `sys` edge that
1423
1977
  /// did not say so. It is called canister-to-canister (an engram or the market pushing its head
1424
1978
  /// here), never by a person, and the `sys` prefix is what tells a reader scanning the surface
1425
1979
  /// which methods are machine-to-machine.
@@ -1427,7 +1981,16 @@ service : {
1427
1981
  /// The market already calls it under this name, which is how the rename got its urgency: a
1428
1982
  /// hand-written client IDL type-checks against a method that does not exist.
1429
1983
  sysAnchorHead: (head: blob, total: nat) -> (Result);
1430
- /// ⟨2026-09-29, review PR-3: a half-finished change of owner⟩ A SOVEREIGN engram reports that it
1984
+ /// CALLER: an engram, from inside its owner's `convertEarningsToCycles`, once the conversion landed
1985
+ /// (the surface budget: every method names its caller). Attach up to what is owed: the registry accepts no more than the outstanding loan
1986
+ /// (the network returns the rest) and records it. `#NotFound` when nothing is owed (the loan was
1987
+ /// written off, or repaid): the engram then clears its own record.
1988
+ /// ⟨CHANGED 2026-10-26, the owner's ruling on restarts⟩ REPAY-ONLY. It no longer puts a freezing setting back
1989
+ /// (the restart restores it before the start) and no longer queues a security push (the restart
1990
+ /// installs it before the start; the wake watcher covers other wakes). The name and reply are
1991
+ /// unchanged, so the engram's hand client still matches.
1992
+ sysCloseRestart: () -> (Result_5);
1993
+ /// ⟨2026-09-29, a review: a half-finished change of owner⟩ A SOVEREIGN engram reports that it
1431
1994
  /// moved control of its code to `newOwner`, which ends the change of owner this registry marked
1432
1995
  /// when it moved its record (`ControlHandover.Pending`). Until this arrives the registry refuses the
1433
1996
  /// new owner's control-changing calls on the engram, because it cannot see a sovereign engram's
@@ -1445,11 +2008,21 @@ service : {
1445
2008
  /// Single-engram metering probe — the push-on-payment sizing read. Biller-gated and
1446
2009
  /// cycles-attached like the sweep; same row semantics, one engram, no heartbeat stamp
1447
2010
  /// (a single probe is not a completed round).
1448
- sysMeterEngram: (canisterId: principal) -> (Result_3);
2011
+ sysMeterEngram: (canisterId: principal) -> (Result_4);
2012
+ /// CALLER: an engram opened through another, from inside its three sign-in writers — `setOwnerSignIn`,
2013
+ /// `declineSignIn` (the sign-in's own decline) and `acceptSignIn` — BEFORE it writes its own seat
2014
+ /// (the surface budget: every method names its caller). ⟨2026-11-04, the owner's ruling that the registry
2015
+ /// keeps a child's sign-in⟩ The registry keeps the child's seated sign-in
2016
+ /// (`childSignIn` says why, and why the order is registry-first): `?p` notes `p` as the sign-in, `null`
2017
+ /// notes that none is seated. A record argument, so it can grow by opt fields (the interface-evolution rule: an argument tuple is frozen once released).
2018
+ /// Refused, with nothing written: a caller this registry did not open through another engram (a first
2019
+ /// engram has no sign-in; anything else is no engram here), and a sign-in the door would refuse at
2020
+ /// birth (`ChildDoor.signInRefusal` — the key file itself, the anonymous principal, a canister).
2021
+ sysNoteChildSignIn: (req: record {signIn: opt principal;}) -> (Result);
1449
2022
  /// ⟨2026-10-02⟩ An engram tells this registry that its owner reset it.
1450
2023
  ///
1451
2024
  /// CALLER: a registered engram, about itself — `canisterToOwner` membership, checked first
1452
- /// (ADR-0020: every `sys` method names and checks its caller). The engram sends it from its reset
2025
+ /// (the surface budget: every `sys` method names and checks its caller). The engram sends it from its reset
1453
2026
  /// path. WHY IT EXISTS: a reset purges the engram's roster, and the endings it sends reach this
1454
2027
  /// registry only for agents still active, so a reset after the last agent left reached this
1455
2028
  /// registry nowhere and the engram read as kept.
@@ -1462,7 +2035,7 @@ service : {
1462
2035
  /// ⟨0.16.0, RULED 2026-08-17, BUILT 2026-08-20⟩ The engram tells this registry that custody moved.
1463
2036
  ///
1464
2037
  /// WHAT IT FIXES: `transferOwnership` lives on the ENGRAM and, until this method existed, told the
1465
- /// registry nothing. `verifyEngramActiveOwner` — the cashier's money gate — therefore kept
2038
+ /// registry nothing. `verifyEngramActiveOwner` — the biller's money gate — therefore kept
1466
2039
  /// answering for the ORIGINAL owner, so a new owner could not fund the engram they now own. The
1467
2040
  /// old comment above `verifyEngramActiveOwner` called that gap "by design"; it was not, and the
1468
2041
  /// 2026-08-17 ruling shipped this seam to close it inside the free-break window.
@@ -1488,9 +2061,9 @@ service : {
1488
2061
  /// guard behind. The check below mirrors the spawn guard EXACTLY — active AND not abandoned —
1489
2062
  /// because an abandoned engram is not a live claim on its owner's slot.
1490
2063
  ///
1491
- /// ⟨2026-09-29, owner ruling follow-up 8 (option A): a change of owner hands over control of the
1492
- /// code⟩ THIS METHOD NOW MOVES CONTROL TOO, or tells the engram to. It used to move the record and
1493
- /// nothing else, so the former owner stayed a controller and could still replace the code. Now:
2064
+ /// ⟨2026-09-29, the owner's ruling: a change of owner hands over control of the code⟩ THIS METHOD
2065
+ /// NOW MOVES CONTROL TOO, or tells the engram to. It used to move the record and nothing else, so
2066
+ /// the former owner stayed a controller and could still replace the code. Now:
1494
2067
  /// · MANAGED (the registry is a controller): the registry sets the controllers to itself and the
1495
2068
  /// new owner and answers `#MovedByRegistry`. If that fails, the record is put back and the
1496
2069
  /// answer is `#Err` — the engram then does not change owner.
@@ -1502,7 +2075,105 @@ service : {
1502
2075
  /// moved record and is refused. A report of the owner the registry already records is a RETRY of
1503
2076
  /// a transfer the engram did not finish, and moves control again (that is the way out `stuck`
1504
2077
  /// names). The rules are in `src/shared/ControlHandover.mo`.
1505
- sysNotifyOwnershipTransfer: (newOwner: principal) -> (Result_2);
2078
+ sysNotifyOwnershipTransfer: (newOwner: principal) -> (Result_3);
2079
+ /// ⟨2026-11-15, from an adversarial review, ruled the same day: the new owner must accept⟩ AN ENGRAM
2080
+ /// FILES ITS OWNER'S OFFER of a change of owner to `newOwner` (the engram's `transferOwnership`).
2081
+ ///
2082
+ /// IT MOVES NOTHING. The record of who owns the engram, control of its code, the predecessor
2083
+ /// links and everything filed under `newOwner`'s key are untouched; `newOwner` is not looked up at
2084
+ /// all, so the answer says nothing about them and no call of theirs answers differently. The row
2085
+ /// is filed by engram (`ownershipOffers`), replaces any earlier offer of the same engram together
2086
+ /// with its acceptance, and ends at `expiresAtNs` or at this registry's own limit
2087
+ /// (`OwnershipOffer.TTL_NS`, 7 days), whichever is sooner.
2088
+ ///
2089
+ /// Gated like `sysNotifyOwnershipTransfer`: the caller must BE a registered engram. Refused for
2090
+ /// an engram opened through another (it never changes owner), for an offer to the owner the
2091
+ /// registry already records, and, while a change of owner is unfinished, for an offer to anyone
2092
+ /// but its would-be owner.
2093
+ ///
2094
+ /// TRUST: the engram's word is taken for the OFFER only, and an offer binds nobody. The
2095
+ /// acceptance is `acceptEngramOffer`, which only the named principal can make.
2096
+ sysOfferOwnership: (newOwner: principal, expiresAtNs: int) -> (Result);
2097
+ /// ⟨2026-10-01, the owner's ruling of that day: build this now, not at the first paid engagement⟩
2098
+ /// THE SPONSORED DOOR. An engram opens an engram for one of its agents: the caller is the engram
2099
+ /// (the engram it is opened from — `parentOf` in code), `ownerKey` is the agent's LASTING key, which
2100
+ /// owns what is opened, and the cycles the opened engram lives on are the ones the caller ATTACHES.
2101
+ ///
2102
+ /// CALLER: a registered engram — `canisterToOwner` membership, checked first, exactly as
2103
+ /// `sysRecordAgentEdge` checks it (the surface budget: every `sys` method names and checks its caller). The
2104
+ /// engram's own rules (the owner's standing allowance for this agent, its frozen-payments state,
2105
+ /// its balance) are the engram's to check before it calls; this method checks what only the
2106
+ /// registry can know.
2107
+ ///
2108
+ /// NOTHING IS ACCEPTED UNTIL EVERY CHECK HAS PASSED (`ChildDoor.admission`, cheapest first), so
2109
+ /// every refusal before the accept returns the attached cycles to the caller by construction —
2110
+ /// the IC returns unaccepted cycles when the call replies. After the accept:
2111
+ /// · the network refuses the canister → what it refunded is deposited back to the caller, and
2112
+ /// the reply says how much came back;
2113
+ /// · the template will not install after one retry → the cycles are INSIDE the new canister and
2114
+ /// no canister can withdraw another's cycles. The one honest exception to "returned on every
2115
+ /// failure": nothing is recorded, and the reply names the canister, its controllers (this
2116
+ /// registry and the key) and what the key can do with it;
2117
+ /// ⟨CORRECTED 2026-11-02, beside the line above — the owner's ruling that the registry alone
2118
+ /// controls an opened engram⟩ The controller is THIS REGISTRY ALONE; the key is not one and can install
2119
+ /// nothing. The reply names the canister and says the cycles sit in it unrecorded, for whoever
2120
+ /// runs this deployment to decide on;
2121
+ /// · the key came to own an engram during the awaits → the new canister is named, nothing is
2122
+ /// recorded (the same third guard `spawnEngramFor` carries).
2123
+ ///
2124
+ /// WHAT IT DOES NOT DO, deliberately: it never attaches the registry's own cycles (the grant stays
2125
+ /// with first engrams); it never writes a predecessor (a key with any record was refused); it never
2126
+ /// consults the reserve gate (the parent owner's approval is this door's admission — the gate's
2127
+ /// arming note stays on `provisionEngram`); it never tells the calling engram anything but this
2128
+ /// reply. No payment AMOUNT reaches it (money is the biller's, cycles are the registry's): it carries cycles and a key, nothing else.
2129
+ ///
2130
+ /// THE RATE LIMIT ⟨2026-10-01, evening — the owner's ruling that evening; until then this door shared
2131
+ /// first engrams' limiter in full: their 24-hour count, their in-flight count and
2132
+ /// `effectiveDailyCap`⟩. The door shares only the DIAL (`spawnCeiling`) and the WINDOW LENGTH (24
2133
+ /// hours). Its count is its own (`sponsoredCreationTimestampsBuf`, pruned by
2134
+ /// `pruneSponsoredWindow`), its in-flight count is its own (`sponsoredInFlight`), and its cap is
2135
+ /// `spawnCeiling` alone — the reserve-derived term never applies, because the opened engram lives
2136
+ /// on the cycles the caller attached and the registry funds nothing. So an opening never uses up a
2137
+ /// first engram's slot, and is never refused for the registry's own low balance. The per-key
2138
+ /// pending mark (`createEngramPending`) stays shared: it is about ONE key, not a count, and a key
2139
+ /// must not be mid-spawn at both doors at once.
2140
+ ///
2141
+ /// THE CUT-OFF AT BIRTH. If the caller ended the key's engagement while the canister was being
2142
+ /// created (the ending is recorded by `sysRecordAgentEdge` between this method's awaits), the
2143
+ /// opened engram is recorded AND cut off in the same step — the cycles are already in it, so the
2144
+ /// key keeps it, but it starts on nobody's record. Without this the ending's cut-off writer would
2145
+ /// have found no `openedThroughParent` row yet, and the engram would never be cut off.
2146
+ /// WHAT WOULD MAKE THIS WRONG: a second path that writes `parentOf`, or an `await` placed between
2147
+ /// the post-await re-check and the record below.
2148
+ ///
2149
+ /// ⟨2026-11-02, the owner's rulings that the registry alone controls an opened engram, and "1-4 all as
2150
+ /// you recommended"⟩ CONTROLLED BY THIS REGISTRY ALONE, AND BORN KNOWING ITS PARENT AND ITS SIGN-IN.
2151
+ /// The canister's controllers are `[this registry]` — the key is not a controller, so it can never
2152
+ /// reinstall, delete or re-control the engram; only this registry installs code on it. Such an
2153
+ /// engram is managed for life: `claimSovereignty`, `returnToManaged`, `abandonMyEngram`, a
2154
+ /// `#ManualOnly` preference and a change of owner (`sysNotifyOwnershipTransfer`) are all refused
2155
+ /// for it, by `parentOf`. `signIn` is the opened engram's second credential, named by the person
2156
+ /// running the agent (`ChildDoor.signInRefusal` refuses the key itself, the anonymous principal and
2157
+ /// a canister); it and the parent travel in the engram's init record, so the engram knows both
2158
+ /// before it answers its first message. `null` = no sign-in: the engram keeps small limits for life.
2159
+ /// An engram built before this argument sends one argument; the missing trailing `opt` decodes as
2160
+ /// `null` (Candid's rule for a missing optional argument), and the engram opens with no sign-in.
2161
+ /// ⟨CORRECTED 2026-11-02, later — from the review of the step that made the registry a child's only
2162
+ /// controller, beside the two lines above, which no longer hold⟩
2163
+ /// ONE RECORD, A NEW NAME. This door was `sysSpawnChild(ownerKey : Principal)`; giving
2164
+ /// it a second positional argument grew its argument TUPLE, which the interface-evolution rule freezes once released ("evolution
2165
+ /// happens inside records", ratified 2026-08-16) and the interface gate reads as ILLEGAL. So the door is
2166
+ /// `sysOpenChild({ ownerKey; signIn })` — later fields are opt fields of this record, never another
2167
+ /// argument — and `sysSpawnChild` is REMOVED (a NOTICE at the gate). An engram built before this
2168
+ /// change still calls `sysSpawnChild`; this registry no longer serves it, so that call is REJECTED
2169
+ /// (IC0536, a reject the engram's `try` catches — a probe of the interface-evolution rule), the attached cycles come back
2170
+ /// as the call's refund, and nothing is opened. An older engram therefore never opens an engram with
2171
+ /// no sign-in by accident; it opens them again once it runs a template that calls this method.
2172
+ /// (Was: the one-argument call decoded `signIn` as `null` — INFERRED for moc 2.1.0, never witnessed.)
2173
+ sysOpenChild: (req: record {
2174
+ ownerKey: principal;
2175
+ signIn: opt principal;
2176
+ }) -> (Result_2);
1506
2177
  /// ⟨2026-09-28, owner decision: build the full agent track-record design for the launch release⟩
1507
2178
  /// An engram tells this registry that one of its agents started, or ended and WHY.
1508
2179
  ///
@@ -1539,22 +2210,22 @@ service : {
1539
2210
  /// row and one summary. The key never reaches the registry; the plan's separate new `sys-` method
1540
2211
  /// for the root is not built — this method was itself new in the same release, so it carries the
1541
2212
  /// root instead of the key, and a second method would be a parallel path for one fact.
1542
- /// ⟨CORRECTED 2026-09-28, review finding OPS-1: the trust in this paragraph was misplaced, and
2213
+ /// ⟨CORRECTED 2026-09-28, a review finding: the trust in this paragraph was misplaced, and
1543
2214
  /// "the key never reaches the registry" is no longer true. An engram's owner is a controller of
1544
2215
  /// its canister and can install code that reports any root, so a start now carries the root's
1545
2216
  /// enrolment statement (`Engagements.EnrolmentProof`) and THIS method verifies it
1546
- /// (`EdgeProof.rootOf`), and refuses past `Engagements.MAX_ENGAGEMENTS_PER_ENGRAM` (OPS-3). The
2217
+ /// (`EdgeProof.rootOf`), and refuses past `Engagements.MAX_ENGAGEMENTS_PER_ENGRAM` (a review finding). The
1547
2218
  /// enrolled key therefore DOES reach the registry, stored on the engagement record and never
1548
2219
  /// served. The ending's reason is still the owner's assertion; the agent's remedy for a false
1549
2220
  /// one is its dispute. Records stay keyed by the agent's root, as above.⟩
1550
- /// ⟨MOVED 2026-09-29, review finding LIFE-11: the correction above stood in the middle of this
2221
+ /// ⟨MOVED 2026-09-29, a review finding: the correction above stood in the middle of this
1551
2222
  /// paragraph, so the sentence it corrects came after it and read as the last word — in this file
1552
2223
  /// and in the published registry.did.⟩
1553
- /// ⟨2026-09-29, review finding LIFE-1⟩ An engagement is matched on the enrolled key AND the invite
2224
+ /// ⟨2026-09-29, a review finding⟩ An engagement is matched on the enrolled key AND the invite
1554
2225
  /// its statement names, not on the key alone: one statement opens at most one engagement, and a
1555
2226
  /// key the engram re-admits after a reset, under a fresh statement for a fresh invite, opens a new
1556
2227
  /// one (`Engagements.admit`).
1557
- /// ⟨CORRECTED 2026-09-29, review finding LIFE-2: "a repeated `#Ended` writes nothing, and both
2228
+ /// ⟨CORRECTED 2026-09-29, a review finding: "a repeated `#Ended` writes nothing, and both
1558
2229
  /// answer `#Ok`" is now narrower. An ending names the engagement it ends (the enrolled key and the
1559
2230
  /// invite) and the day the engram recorded it, because a lost ending is now RE-SENT by the
1560
2231
  /// engram's `resyncAgentEdges`. The same ending again answers `#Ok` and writes nothing; one
@@ -1564,90 +2235,93 @@ service : {
1564
2235
  event: EdgeEvent;
1565
2236
  root: principal;
1566
2237
  }) -> (Result);
1567
- /// ⟨2026-09-29, owner ruling follow-up 8⟩ A SOVEREIGN engram could not change its own controllers
1568
- /// after this registry moved its record, and asks for the record back so the transfer does not
1569
- /// complete. Gated like `sysNotifyOwnershipTransfer` (the caller must BE the engram), and only for
1570
- /// an engram the registry records as sovereign — a managed engram's controllers are this
2238
+ /// CALLER: an engram, from inside its `sysReturnUpgradeAdvance` (the surface budget: every method names its caller). Attach what is being
2239
+ /// given back of the compute a paid security update advanced it. The registry accepts no more than
2240
+ /// the outstanding advance (the network returns the rest) and writes off whatever was not returned
2241
+ /// — what the install used and what the engram had to keep — never carried as a debt.
2242
+ /// ⟨2026-10-26, the owner's ruling "accounting should be exact"⟩ The write-off here is the exact
2243
+ /// figure advance − accepted, from the ledger entry and the cycles actually accepted, and the audit
2244
+ /// line carries advance, returned and writtenOff.
2245
+ /// ⟨2026-10-26, later — the owner's restart choices on naming the release and on the 90-day write-off⟩
2246
+ /// The engram may have more than one
2247
+ /// advance out (one per release paid; RestartLoan.repayAdvances): the cycles are accepted up to their
2248
+ /// sum and settled OLDEST FIRST, and each advance gets its own audit line naming the release it was
2249
+ /// paid for (`template=`), with its own returned and written-off parts — the lines sum exactly to
2250
+ /// `accepted` and to the write-off. AN ADVANCE ALREADY WRITTEN OFF (the 90-day sweep) IS NOT ON THE
2251
+ /// LEDGER, so nothing sent for it is accepted — the network returns those cycles to the engram — and
2252
+ /// `advanceReturned` never counts a written-off cycle: no double count. When nothing at all is out,
2253
+ /// the reply is `#NotFound` and nothing is accepted (as before).
2254
+ /// ⟨CORRECTED 2026-10-26, later — a review fix to the owner's restart choice to name the release⟩
2255
+ /// NEWEST first, not oldest first: the engram can
2256
+ /// give back only what it holds above its balance before the latest deposit, so the cycles are the
2257
+ /// newest advance's (RestartLoan.repayAdvances says why, and when that reading is wrong).
2258
+ /// ⟨CHANGED 2026-10-26, the owner's give-back ruling: "take back only what we added; anything left
2259
+ /// over goes to the 90-day write-off"⟩ The engram now names THE ADVANCE it is giving back
2260
+ /// (`advanceId`, which the registry handed it in `sysReturnUpgradeAdvance` — the one this install's
2261
+ /// deposit put on the ledger). The registry accepts AT MOST THAT ADVANCE'S AMOUNT, settles THAT
2262
+ /// entry alone (returned + written off = its amount, one `upgrade.advance.returned` line naming its
2263
+ /// release and id) and leaves every other advance of the engram on the ledger, for its own
2264
+ /// give-back or the 90-day write-off. The paragraphs above about "the sum", "settled OLDEST FIRST"
2265
+ /// and "NEWEST first" describe the shape this replaces. An id that is not on the ledger for this
2266
+ /// caller (already settled, written off after 90 days, or never its own) accepts nothing — the
2267
+ /// network returns the attached cycles to the engram — and answers `#NotFound`; when a recorded
2268
+ /// engram attached cycles, an `upgrade.advance.notOut` line in the registry's unchained refusal log
2269
+ /// says so (never the chained audit log: it moves nothing, and any engram can send it). Nothing is
2270
+ /// ever counted twice.
2271
+ /// WHAT WOULD MAKE THIS WRONG: an engram naming an id other than the one it was handed — it can only
2272
+ /// name one of its OWN advances (the caller must match), so the worst it can do is settle its own
2273
+ /// other advance early with cycles that are still the registry's.
2274
+ sysRepayUpgradeAdvance: (a: record {advanceId: nat;}) -> (Result_1);
2275
+ /// ⟨2026-09-29, the owner's code-handover ruling⟩ A SOVEREIGN engram could not change its own
2276
+ /// controllers after this registry moved its record, and asks for the record back so the transfer
2277
+ /// does not complete. Gated like `sysNotifyOwnershipTransfer` (the caller must BE the engram), and
2278
+ /// only for an engram the registry records as sovereign — a managed engram's controllers are this
1571
2279
  /// registry's to move, and its record is put back inside `sysNotifyOwnershipTransfer` itself.
1572
2280
  /// Refuses, saying why, when the record cannot be put back (`ControlHandover.revertRefusal`); the
1573
2281
  /// engram then answers its owner with `ControlHandover.stuck`.
1574
2282
  sysRevertOwnershipTransfer: (formerOwner: principal) -> (Result);
1575
- /// ⟨2026-10-01, the owner's ruling of that day: the October concept's decision 1, "build it now"⟩
1576
- /// THE SPONSORED DOOR. An engram opens an engram for one of its agents: the caller is the engram
1577
- /// (the engram it is opened from — `parentOf` in code), `ownerKey` is the agent's LASTING key, which
1578
- /// owns what is opened, and the cycles the opened engram lives on are the ones the caller ATTACHES.
1579
- ///
1580
- /// CALLER: a registered engram — `canisterToOwner` membership, checked first, exactly as
1581
- /// `sysRecordAgentEdge` checks it (ADR-0020: every `sys` method names and checks its caller). The
1582
- /// engram's own rules (the owner's standing allowance for this agent, its frozen-payments state,
1583
- /// its balance) are the engram's to check before it calls; this method checks what only the
1584
- /// registry can know.
1585
- ///
1586
- /// NOTHING IS ACCEPTED UNTIL EVERY CHECK HAS PASSED (`ChildDoor.admission`, cheapest first), so
1587
- /// every refusal before the accept returns the attached cycles to the caller by construction —
1588
- /// the IC returns unaccepted cycles when the call replies. After the accept:
1589
- /// · the network refuses the canister → what it refunded is deposited back to the caller, and
1590
- /// the reply says how much came back;
1591
- /// · the template will not install after one retry → the cycles are INSIDE the new canister and
1592
- /// no canister can withdraw another's cycles. The one honest exception to "returned on every
1593
- /// failure": nothing is recorded, and the reply names the canister, its controllers (this
1594
- /// registry and the key) and what the key can do with it;
1595
- /// · the key came to own an engram during the awaits → the new canister is named, nothing is
1596
- /// recorded (the same third guard `spawnEngramFor` carries).
1597
- ///
1598
- /// WHAT IT DOES NOT DO, deliberately: it never attaches the registry's own cycles (the grant stays
1599
- /// with first engrams); it never writes a predecessor (a key with any record was refused); it never
1600
- /// consults the reserve gate (the parent owner's approval is this door's admission — the gate's
1601
- /// arming note stays on `provisionEngram`); it never tells the calling engram anything but this
1602
- /// reply. No payment AMOUNT reaches it (ADR-0005): it carries cycles and a key, nothing else.
1603
- ///
1604
- /// THE RATE LIMIT ⟨2026-10-01, evening — the owner's ruling "1B"; until then this door shared
1605
- /// first engrams' limiter in full: their 24-hour count, their in-flight count and
1606
- /// `effectiveDailyCap`⟩. The door shares only the DIAL (`spawnCeiling`) and the WINDOW LENGTH (24
1607
- /// hours). Its count is its own (`sponsoredCreationTimestampsBuf`, pruned by
1608
- /// `pruneSponsoredWindow`), its in-flight count is its own (`sponsoredInFlight`), and its cap is
1609
- /// `spawnCeiling` alone — the reserve-derived term never applies, because the opened engram lives
1610
- /// on the cycles the caller attached and the registry funds nothing. So an opening never uses up a
1611
- /// first engram's slot, and is never refused for the registry's own low balance. The per-key
1612
- /// pending mark (`createEngramPending`) stays shared: it is about ONE key, not a count, and a key
1613
- /// must not be mid-spawn at both doors at once.
1614
- ///
1615
- /// THE CUT-OFF AT BIRTH. If the caller ended the key's engagement while the canister was being
1616
- /// created (the ending is recorded by `sysRecordAgentEdge` between this method's awaits), the
1617
- /// opened engram is recorded AND cut off in the same step — the cycles are already in it, so the
1618
- /// key keeps it, but it starts on nobody's record. Without this the ending's cut-off writer would
1619
- /// have found no `openedThroughParent` row yet, and the engram would never be cut off.
1620
- /// WHAT WOULD MAKE THIS WRONG: a second path that writes `parentOf`, or an `await` placed between
1621
- /// the post-await re-check and the record below.
1622
- sysSpawnChild: (ownerKey: principal) -> (Result_1);
1623
2283
  /// Admin: upgrade one engram to the current template. RESPECTS the owner's update preference —
1624
2284
  /// an engram set to `#ManualOnly` is not moved by this method, which is what makes the preference
1625
2285
  /// meaningful rather than advisory. The owner's own `upgradeMyEngram` is unaffected either way.
2286
+ ///
2287
+ /// ⟨2026-10-25, the owner's ruling of that day⟩ Same funding decision and dip as the owner's pull:
2288
+ /// paid only for a #Security update on a running engram. A push is the registry's own initiative,
2289
+ /// so where the engram cannot hold the install even with its setting lowered, the push is SKIPPED
2290
+ /// with `#Conflict` and not attempted — the owner can still pull it, and the pull is never refused.
2291
+ /// ⟨2026-11-04⟩ An ERASED engram (its canister holds no program) is not
2292
+ /// pushed: `#Conflict`, by name, before anything is added.
1626
2293
  upgradeEngram: (canisterId: principal) -> (Result);
1627
2294
  /// Upgrade YOUR OWN engram to the registry's current template. Self-service — no admin, no
1628
2295
  /// queue, no approval.
1629
2296
  ///
1630
- /// ⚠ THE PULL IS ALWAYS FUNDED, regardless of release class or rent state, and that is a
1631
- /// commitment rather than an implementation detail: `install_code` needs the balance to cover the
1632
- /// install ABOVE the freezing threshold, so the registry lifts the engram over that bar if cycles
1633
- /// are what is stopping it. Refusing an owner their own fix for nonpayment is the ransom the
1634
- /// continuity-rent model forbids, and withholding a security fix would be worse than anything
1635
- /// that model gates. The lift is best-effort: if it fails, the install still runs and returns the
1636
- /// REAL error, so a top-up problem can never masquerade as an upgrade problem or hide one.
1637
- /// ⟨2026-09-28, owner decision: the registry only pays for upgrades of engrams running our
1638
- /// published code⟩ One exception to "always funded": an engram whose installed module is not one
1639
- /// this registry published is not lifted (`fundUpgradeIfNeeded`, audit
1640
- /// `upgrade.topUp.unpublishedCode`). The install is still attempted — the owner is never refused
1641
- /// their fix, only our cycles for it.
1642
- /// ⟨2026-09-29⟩ And when that install then FAILS, the reply says why the registry did not pay and
1643
- /// what the owner can do (`TemplatePolicy.unfundedUpgradeFailure`) — before, the refusal was only
1644
- /// in the registry's own log and the owner saw a bare out-of-cycles error. Same reply type.
1645
- /// ⟨2026-10-01, the owner's ruling of that day (2 A)⟩ A second exception beside the first: an
1646
- /// engram opened through a parent (`parentOf`, written by `sysSpawnChild`) is funded by the
1647
- /// registry never — not at birth, not at an upgrade (`fundUpgradeIfNeeded`, audit
1648
- /// `upgrade.topUp.childEngram`). The install is still attempted; the owner is never refused their
1649
- /// fix, only our cycles for it, and a failed install says so
1650
- /// (`TemplatePolicy.childUnfundedUpgradeFailure`).
2297
+ /// ⟨2026-10-25, the owner's ruling of that day⟩ THE INSTALL IS ALWAYS ATTEMPTED. Refusing an owner
2298
+ /// their own update for nonpayment is the ransom the continuity model forbids, so this method never
2299
+ /// refuses for compute or payment. What the registry PAYS for is narrower: a #Security update on a
2300
+ /// running engram, any size — paid because we do not want security incidents (the owner,
2301
+ /// 2026-10-25). A #Feature update runs on the engram's own compute. Four standing exclusions are
2302
+ /// never paid for: an engram that has stopped (below its running line — it runs nothing, so its old
2303
+ /// code is not exposed while stopped), one opened through a parent (the ruling of 2026-10-01), one
2304
+ /// running a module the registry never published (2026-09-28), and a second deposit for the same
2305
+ /// release.
2306
+ /// ⟨CORRECTED 2026-10-26, the owner's rulings of that day⟩ THREE standing exclusions: an engram
2307
+ /// opened through a parent is now paid for a security update like any other ("including child
2308
+ /// engrams, but not including engrams running unofficial code"), and a #Feature update is never
2309
+ /// paid, rent or no rent ("where rent is paid, feature upgrades are paid by the engram").
2310
+ /// ⟨CORRECTED 2026-10-26, later — the owner's restart choice of that day: "pay whenever the engram is
2311
+ /// missing any security release, whatever the latest release is labelled"⟩ "a #Feature update is
2312
+ /// never paid" now excepts an engram still missing an earlier security release: its install of a
2313
+ /// #Feature template is paid as a security update, because the template carries that fix
2314
+ /// (UpgradeFunding.effectiveClass) — unless the template is itself behind a security release.
2315
+ /// When it helps, the registry lowers the engram's freezing setting to one hour for the
2316
+ /// install and puts the owner's value back after (the dip), so an install needs only ~0.32T above
2317
+ /// an hour's burn rather than the hold above the whole 30-day line.
2318
+ ///
2319
+ /// When the install FAILS after the registry declined to pay, the reply says why and what to do
2320
+ /// (UpgradeFunding.pullFailure): `#Conflict` when the engram needs more compute (the owner's
2321
+ /// action — add compute), `#Unavailable` when the registry could not pay this time (retryable).
2322
+ /// A failure after a paid or unneeded deposit answers `#Unavailable` with the network's reply.
2323
+ /// ⟨2026-11-04⟩ On an ERASED engram (its canister holds no program) nothing
2324
+ /// is paid; the install is still attempted, the network refuses it, and the reply says "erased".
1651
2325
  ///
1652
2326
  /// An engram already on the current template is a silent no-op. A SOVEREIGN engram gets
1653
2327
  /// "registry is no longer a controller" — accurate, because it is no longer ours to install on.
@@ -1656,7 +2330,7 @@ service : {
1656
2330
  /// the deployment's fleet-upgrade tooling, so a caller reaching this method directly does not
1657
2331
  /// get it.
1658
2332
  upgradeMyEngram: () -> (Result);
1659
- /// True iff `canisterId` is a registered, `#Active` engram owned by `claimedOwner`. The cashier's
2333
+ /// True iff `canisterId` is a registered, `#Active` engram owned by `claimedOwner`. The biller's
1660
2334
  /// money gate: fund ONLY an active engram the paying caller owns, since minting cycles to a
1661
2335
  /// frozen or deleted canister strands the funds.
1662
2336
  ///
@@ -1671,7 +2345,7 @@ service : {
1671
2345
  /// born-clean badge does. A query cannot make inter-canister calls, so this one cannot ask.
1672
2346
  ///
1673
2347
  /// ⟨Promoted from `//` to `///` 2026-08-21. Everything above was written as plain comments, so
1674
- /// registry.did published the cashier's money gate with NO explanation at all while 53 lines of
2348
+ /// registry.did published the biller's money gate with NO explanation at all while 53 lines of
1675
2349
  /// it sat in the source. The correction history stays `//` on purpose — it is addressed to an
1676
2350
  /// editor, and only what a CALLER needs belongs in the interface.⟩
1677
2351
  verifyEngramActiveOwner: (canisterId: principal, claimedOwner: