@engramx/idl 0.16.0-rc.21 → 0.16.0-rc.23

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.
@@ -29,6 +29,7 @@ export interface AnchorStats {
29
29
  engramsWithConflicts: bigint;
30
30
  }
31
31
  export interface AnchorView {
32
+ era: [] | [bigint];
32
33
  total: bigint;
33
34
  disputed: boolean;
34
35
  atNs: bigint;
@@ -54,6 +55,7 @@ export interface CertifiedAnchor {
54
55
  witness: Uint8Array | number[];
55
56
  }
56
57
  export interface CertifiedAnchorLeaf {
58
+ era: [] | [bigint];
57
59
  total: bigint;
58
60
  disputed: boolean;
59
61
  atNs: bigint;
@@ -62,6 +64,7 @@ export interface CertifiedAnchorLeaf {
62
64
  conflicts: bigint;
63
65
  version: bigint;
64
66
  refusedConflicts: bigint;
67
+ recoveredAtNs: [] | [bigint];
65
68
  engram: Principal;
66
69
  }
67
70
  export interface CertifiedAuditHead {
@@ -86,6 +89,11 @@ export interface ChangelogEntry {
86
89
  releaseNotes: string;
87
90
  version: string;
88
91
  }
92
+ export interface ChildSignInOffer {
93
+ parentActive: boolean;
94
+ parentIsFirstEngram: boolean;
95
+ parentOwner: [] | [Principal];
96
+ }
89
97
  export type ControlStep = { EngramMustMove: null } | { MovedByRegistry: null };
90
98
  export type CustodyMode = { Sovereign: null } | { Managed: null };
91
99
  export interface Dispute {
@@ -124,13 +132,16 @@ export interface EngagementRow {
124
132
  }
125
133
  export interface EngramComputeView {
126
134
  restartOpenUntilNs: [] | [bigint];
135
+ recoverOpen: [] | [boolean];
127
136
  idlePerDay: bigint;
137
+ erased: [] | [boolean];
128
138
  line: bigint;
129
139
  quiet: boolean;
130
140
  eraseAboutNs: [] | [bigint];
131
141
  cycles: bigint;
132
142
  runState: { stopped: null } | { stopping: null } | { running: null };
133
143
  thresholdSecs: bigint;
144
+ recoveredAtNs: [] | [bigint];
134
145
  updateWaiting: boolean;
135
146
  frozen: boolean;
136
147
  }
@@ -279,6 +290,14 @@ export interface RecordPage {
279
290
  items: Array<AuditEntry>;
280
291
  hashFirstFrom: bigint;
281
292
  }
293
+ export interface RecoverReply {
294
+ billingLinked: boolean;
295
+ balance: bigint;
296
+ finished: boolean;
297
+ number: [] | [bigint];
298
+ restartLoanOwed: bigint;
299
+ template: string;
300
+ }
282
301
  export interface ReferralCounts {
283
302
  firstOrReopened: PairedSoon;
284
303
  openedThroughParentLive: bigint;
@@ -286,6 +305,23 @@ export interface ReferralCounts {
286
305
  throughParent: PairedSoon;
287
306
  agentsByTreesSpanned: TreesSpanned;
288
307
  }
308
+ export interface RegistryClockHealth {
309
+ nextWakeAtNs: [] | [bigint];
310
+ lastAttemptAtNs: [] | [bigint];
311
+ attemptTotal: [] | [bigint];
312
+ lastErrorAtNs: [] | [bigint];
313
+ okTotal: [] | [bigint];
314
+ overdue: [] | [bigint];
315
+ lastError: [] | [string];
316
+ lastOkAtNs: [] | [bigint];
317
+ }
318
+ export interface RegistryHealth {
319
+ anchors: [] | [AnchorStats];
320
+ adminRoles: [] | [AdminRoles];
321
+ atNs: [] | [bigint];
322
+ clock: [] | [RegistryClockHealth];
323
+ cycleReserve: [] | [{ cycleBalance: bigint; minOperatingReserveCycles: bigint }];
324
+ }
289
325
  export type ReleaseClass = { Security: null } | { Feature: null };
290
326
  export interface ReservationView {
291
327
  reservedAtNs: bigint;
@@ -318,28 +354,31 @@ export interface RestartTotals {
318
354
  advancePaid: bigint;
319
355
  }
320
356
  export type Result = { Ok: null } | { Err: Error };
321
- export type Result_1 = { Ok: Principal } | { Err: Error };
322
- export type Result_10 = { Ok: CustodyMode } | { Err: Error };
323
- export type Result_11 = { Ok: Array<string> } | { Err: Error };
324
- export type Result_12 = { Ok: Page } | { Err: Error };
325
- export type Result_13 = { Ok: Page_1 } | { Err: Error };
326
- export type Result_14 = { Ok: Page_2 } | { Err: Error };
327
- export type Result_15 = { Ok: Page_3 } | { Err: Error };
328
- export type Result_16 = { Ok: Array<OpenedEngram> } | { Err: Error };
329
- export type Result_17 = { Ok: Page_5 } | { Err: Error };
330
- export type Result_18 = { Ok: RecordPage } | { Err: Error };
331
- export type Result_19 = { Ok: Page_6 } | { Err: Error };
332
- export type Result_2 = { Ok: { accepted: bigint } } | { Err: Error };
333
- export type Result_20 = { Ok: [] | [string] } | { Err: Error };
334
- export type Result_21 = { Ok: ReferralCounts } | { Err: Error };
335
- export type Result_22 = { Ok: OpenedThrough } | { Err: Error };
336
- export type Result_23 = { Ok: OpeningCounts } | { Err: Error };
337
- export type Result_24 = { Ok: RestartStatus } | { Err: Error };
338
- export type Result_25 = { Ok: PrivateMetrics } | { Err: Error };
339
- export type Result_26 = { Ok: Uint8Array | number[] } | { Err: Error };
340
- export type Result_27 = { Ok: CertifiedStanding } | { Err: Error };
341
- export type Result_28 = { Ok: FleetCycleHealth } | { Err: Error };
357
+ export type Result_1 = { Ok: { accepted: bigint } } | { Err: Error };
358
+ export type Result_10 = { Ok: EngramComputeView } | { Err: Error };
359
+ export type Result_11 = { Ok: CustodyMode } | { Err: Error };
360
+ export type Result_12 = { Ok: Array<string> } | { Err: Error };
361
+ export type Result_13 = { Ok: Page } | { Err: Error };
362
+ export type Result_14 = { Ok: Page_1 } | { Err: Error };
363
+ export type Result_15 = { Ok: Page_2 } | { Err: Error };
364
+ export type Result_16 = { Ok: Page_3 } | { Err: Error };
365
+ export type Result_17 = { Ok: Array<OpenedEngram> } | { Err: Error };
366
+ export type Result_18 = { Ok: Page_5 } | { Err: Error };
367
+ export type Result_19 = { Ok: RecordPage } | { Err: Error };
368
+ export type Result_2 = { Ok: Principal } | { Err: Error };
369
+ export type Result_20 = { Ok: Page_6 } | { Err: Error };
370
+ export type Result_21 = { Ok: [] | [string] } | { Err: Error };
371
+ export type Result_22 = { Ok: RegistryHealth } | { Err: Error };
372
+ export type Result_23 = { Ok: ReferralCounts } | { Err: Error };
373
+ export type Result_24 = { Ok: OpenedThrough } | { Err: Error };
374
+ export type Result_25 = { Ok: OpeningCounts } | { Err: Error };
375
+ export type Result_26 = { Ok: RestartStatus } | { Err: Error };
376
+ export type Result_27 = { Ok: PrivateMetrics } | { Err: Error };
377
+ export type Result_28 = { Ok: Uint8Array | number[] } | { Err: Error };
378
+ export type Result_29 = { Ok: ChildSignInOffer } | { Err: Error };
342
379
  export type Result_3 = { Ok: ControlStep } | { Err: Error };
380
+ export type Result_30 = { Ok: CertifiedStanding } | { Err: Error };
381
+ export type Result_31 = { Ok: FleetCycleHealth } | { Err: Error };
343
382
  export type Result_4 = { Ok: MeterReading } | { Err: Error };
344
383
  export type Result_5 = { Ok: { repaid: bigint; stillOwed: bigint } } | { Err: Error };
345
384
  export type Result_6 =
@@ -349,7 +388,7 @@ export type Result_6 =
349
388
  | { Err: Error };
350
389
  export type Result_7 = { Ok: bigint } | { Err: Error };
351
390
  export type Result_8 = { Ok: RestartReply } | { Err: Error };
352
- export type Result_9 = { Ok: EngramComputeView } | { Err: Error };
391
+ export type Result_9 = { Ok: RecoverReply } | { Err: Error };
353
392
  export type Role =
354
393
  | { Anonymous: null }
355
394
  | { Viewer: null }
@@ -407,6 +446,16 @@ export interface _SERVICE {
407
446
  * / CANISTER ID, so an engram's ciphertext and wallet cannot follow it anywhere (engramx
408
447
  * / docs/ENCRYPTION-OPERATIONS.md, "Canister-id binding"). Abandoning is starting over, not
409
448
  * / migrating, and the caller must be told so before they do it.
449
+ * /
450
+ * / ⟨2026-11-02⟩ REFUSED for an engram opened through another: it is never abandoned, so it stays on
451
+ * / this registry's security updates for life; it ends by its parent's cut-off or by running dry.
452
+ * /
453
+ * / ⟨2026-11-05, the owner's ruling 2A of 2026-11-04 — "abandoned engrams are NOT recoverable"⟩
454
+ * / WITHDRAW YOUR DIGITAL DOLLARS FIRST. Nobody pays for an abandoned engram: when its compute runs out it stops,
455
+ * / and the network erases it about 30 days later. An abandoned engram is never recovered once it is
456
+ * / erased (`recoverMyEngram` refuses it, and the cashier refuses its top-ups), so whatever its wallet
457
+ * / still holds then stays at its address with no program that can move it. Withdraw it while the
458
+ * / engram runs.
410
459
  */
411
460
  abandonMyEngram: ActorMethod<[], Result>;
412
461
  addAuditViewer: ActorMethod<[Principal], Result>;
@@ -449,6 +498,9 @@ export interface _SERVICE {
449
498
  * / ⚠ IT IS REVERSIBLE, which is the fact most worth publishing: the engram's own
450
499
  * / `returnToManaged` adds the registry back ALONGSIDE the owner. Sovereignty is a door, not a
451
500
  * / cliff.
501
+ * /
502
+ * / ⟨2026-11-02, the owner's ruling "choice 4 without hand over"⟩ REFUSED for an engram opened
503
+ * / through another: it stays managed by this registry for life, and its key is never a controller.
452
504
  */
453
505
  claimSovereignty: ActorMethod<[], Result>;
454
506
  /**
@@ -514,7 +566,7 @@ export interface _SERVICE {
514
566
  * / this one is a noun. That gate now reads the census's L7 citations as a second population for
515
567
  * / exactly this blind spot.⟩
516
568
  */
517
- fleetCycleHealth: ActorMethod<[bigint, bigint, bigint], Result_28>;
569
+ fleetCycleHealth: ActorMethod<[bigint, bigint, bigint], Result_31>;
518
570
  /**
519
571
  * / PUBLIC: ⟨0.16.0, L2.4⟩ `fleetSummary` — the ONE public projection of this registry,
520
572
  * / replacing `status()` and ABSORBING `publicMetrics()`.
@@ -627,7 +679,7 @@ export interface _SERVICE {
627
679
  * / `listAgents`. "The agent itself" is a caller holding that root key. A key for one engram has no
628
680
  * / record of its own here; asking about one gets the refusal or, from the key itself, `#NotFound`.
629
681
  */
630
- getAgentStanding: ActorMethod<[Principal], Result_27>;
682
+ getAgentStanding: ActorMethod<[Principal], Result_30>;
631
683
  /**
632
684
  * / Fleet-wide anchoring liveness. Exists because ABSENCE is otherwise uninformative: an engram
633
685
  * / that never wrote, one still on a template without the push, and one whose push is broken all
@@ -704,6 +756,28 @@ export interface _SERVICE {
704
756
  * / bytes is never a fingerprint, and answers `null` before the lookup.
705
757
  */
706
758
  getCertifiedBirth: ActorMethod<[Uint8Array | number[]], [] | [CertifiedBirth]>;
759
+ /**
760
+ * / ⟨2026-11-02, the owner's ruling "1-4 all as you recommended"; the lead's answer L4 with the
761
+ * / Challenge's fix C3.2⟩ WHAT THE KIT OFFERS AS A NEW ENGRAM'S SIGN-IN, read before it opens one
762
+ * / through `parent`. The answer: the parent's owner — ONLY when the parent is a first engram (the
763
+ * / kit offers that principal as the default sign-in only then, after it prints it and the person
764
+ * / running the agent confirms it is theirs; for a parent opened through another the field is
765
+ * / absent, so the read never discloses a key file's principal); whether the parent is a first
766
+ * / engram; and whether it is registered, `#Active` and not abandoned (`isRegisteredActiveEngram`'s
767
+ * / rule).
768
+ * /
769
+ * / CALLER: a lasting key with a LIVE engagement with `parent` at this registry, in either store
770
+ * / (`Engagements.hasOpenEither` — the same fact `sysOpenChild`'s admission reads, so exactly the
771
+ * / keys that may be opened an engram through `parent` may read what it offers). It discloses the
772
+ * / parent's owner to the parent's own engaged agent, the party `getParentOf` answers once the child
773
+ * / exists. Anyone else is REFUSED loudly (ADR-0002), in the same words whether or not `parent` is
774
+ * / an engram, so a refusal tells a stranger nothing. A QUERY, so the refusal is not in the denial
775
+ * / log (`denied` says why a query cannot write). `#NotFound` only to an engaged caller, for a
776
+ * / parent this registry holds no owner for.
777
+ * / Called by: the owner kit's opening of an engram through a parent, signed by the agent's lasting
778
+ * / key, before it names the new engram's sign-in.
779
+ */
780
+ getChildSignInOffer: ActorMethod<[Principal], Result_29>;
707
781
  /**
708
782
  * / The ATTESTABLE custody-mode fact (agent-native model item 19): "managed" | "sovereign" |
709
783
  * / "unknown", derived from the registry's OWN transition records (claimSovereignty /
@@ -728,7 +802,7 @@ export interface _SERVICE {
728
802
  * / Derived from records, never probed: a canister_status call would trap for exactly the
729
803
  * / canisters we are not the controller of, i.e. the sovereign ones this read exists to identify.
730
804
  */
731
- getCustodyMode: ActorMethod<[Principal], Result_10>;
805
+ getCustodyMode: ActorMethod<[Principal], Result_11>;
732
806
  /**
733
807
  * / Cycles-health probe — slim, cycles-only shape; the money fields moved to the cashier's
734
808
  * / getCycleReserveStatus. Read by health-alert.mjs in registry mode.
@@ -774,7 +848,7 @@ export interface _SERVICE {
774
848
  * / `#NotFound` only to a permitted reader, for a key that opened nothing: a true answer, like
775
849
  * / `listMyAgentDisputes`'s empty list.
776
850
  */
777
- getEngramOpenedThrough: ActorMethod<[Principal], Result_22>;
851
+ getEngramOpenedThrough: ActorMethod<[Principal], Result_24>;
778
852
  /**
779
853
  * / The i-th 1 MiB slice of the attested engram wasm (0-indexed). The caller reassembles all
780
854
  * / chunks in order and MUST verify sha256(reassembled) == getEngramWasmHash before installing —
@@ -787,7 +861,7 @@ export interface _SERVICE {
787
861
  * / a truncated one, so it would hash a partial wasm and report a mismatch against the official
788
862
  * / list, which reads as "this template is unofficial" rather than "I stopped reading too early".
789
863
  */
790
- getEngramWasmChunk: ActorMethod<[bigint], Result_26>;
864
+ getEngramWasmChunk: ActorMethod<[bigint], Result_28>;
791
865
  /**
792
866
  * / The stored template's release class — FREE and UNGATED, because it is the checkable half of a
793
867
  * / promise made to people who are not our customers. ⟨2026-10-25⟩ The funding rule it checks:
@@ -837,7 +911,7 @@ export interface _SERVICE {
837
911
  * / site. L1 retired the motive of trapping-to-refuse; it did not give queries the ability to
838
912
  * / write, which is the thing this actually depends on.
839
913
  */
840
- getFleetMetrics: ActorMethod<[], Result_25>;
914
+ getFleetMetrics: ActorMethod<[], Result_27>;
841
915
  /**
842
916
  * / PUBLIC: a genesis note that only privileged callers could read would defeat its purpose —
843
917
  * / the reader who most needs it is the stranger deciding whether to trust this chain.
@@ -915,7 +989,7 @@ export interface _SERVICE {
915
989
  * / restart": `nextRestartAtNs` is only the weekly limit on a loan. A restart on the owner's own
916
990
  * / compute is allowed now, whatever it says. Field name and shape unchanged.
917
991
  */
918
- getMyRestartStatus: ActorMethod<[], Result_24>;
992
+ getMyRestartStatus: ActorMethod<[], Result_26>;
919
993
  /**
920
994
  * / ⟨2026-10-02⟩ How many engrams were ever opened, and how — lifetime sizes of state this registry
921
995
  * / never deletes, plus the two counters of refused openings (`Funnel.OpeningCounts` names each).
@@ -926,7 +1000,7 @@ export interface _SERVICE {
926
1000
  * / "nothing was ever opened". A QUERY: counts only, and cheap; its refusal is not in the denial
927
1001
  * / log (`denied` says why a query cannot write).
928
1002
  */
929
- getOpeningCounts: ActorMethod<[], Result_23>;
1003
+ getOpeningCounts: ActorMethod<[], Result_25>;
930
1004
  /**
931
1005
  * / Where an engram was opened from ⟨2026-10-26, the owner's lineage ruling L4: "a child reads its own
932
1006
  * / parent by its canister id"⟩: the engram, the engram it was opened from, and the cut-off's time if
@@ -943,7 +1017,18 @@ export interface _SERVICE {
943
1017
  * / this registry never opened is said to be one, not passed off as a first engram (ADR-0002).
944
1018
  * / L8C: `listChildrenOf` is unchanged. L7B: the change-of-owner gate is unchanged.
945
1019
  */
946
- getParentOf: ActorMethod<[Principal], Result_22>;
1020
+ getParentOf: ActorMethod<[Principal], Result_24>;
1021
+ /**
1022
+ * / PUBLIC: CALLER: the app, the owner kit and anyone checking an engram's record (ADR-0020). When this
1023
+ * / registry last REINSTALLED the engram on its own id after the network erased it (`recoverMyEngram`),
1024
+ * / or null — never recovered. ⟨2026-11-04, RECOVER-WALLET-1⟩ Public for `getAbandonedAtNs`'s reason: a
1025
+ * / record that restarted is a fact about the record that a stranger checking it needs, and the same date
1026
+ * / is certified in the engram's anchor leaf (`recoveredAtNs`, with its `era`).
1027
+ * / ⟨2026-11-05, beside the above⟩ Set when the reinstall BEGINS — the old record's anchors are set aside in
1028
+ * / the same message, before the install (`recoverMyEngram` says why) — so while a recover's install has not
1029
+ * / landed, the engram can read erased with this set; the compute probes' `recoverOpen` says one is open.
1030
+ */
1031
+ getRecoveredAtNs: ActorMethod<[Principal], [] | [bigint]>;
947
1032
  /**
948
1033
  * / ⟨2026-10-02⟩ How far agents reach across owners — COUNTS ONLY: agents by how many trees their
949
1034
  * / record spans (1 · 2 · 3–4 · 5+), engrams opened through a parent that are live or cut off, and
@@ -957,7 +1042,25 @@ export interface _SERVICE {
957
1042
  * / weekly. Anyone else is REFUSED by name with their class — never zeros. A QUERY: its cost grows
958
1043
  * / with the agents and engrams it walks (one pass over each), so a reader asks weekly, not hourly.
959
1044
  */
960
- getReferralCounts: ActorMethod<[Array<Principal>], Result_21>;
1045
+ getReferralCounts: ActorMethod<[Array<Principal>], Result_23>;
1046
+ /**
1047
+ * / ⟨2026-11-02, the owner's rulings "E ok." and "go ahead with your noticing failures changes"⟩ THE
1048
+ * / REGISTRY'S HEALTH IN ONE READ: its cycle reserve, its roster, its anchoring counts — the same
1049
+ * / answers `getCycleReserveStatus`, `getAdminRoles` and `getAnchorStats` give, which stay served
1050
+ * / unchanged for everyone who reads them one at a time — and the stamps of its clock, which wakes only
1051
+ * / at the deadlines it records (with a six-hour net) and so is silent by design: `clock.nextWakeAtNs`
1052
+ * / more than an hour behind `atNs` is a lost clock. `Types.RegistryHealth` says what each field
1053
+ * / means, and why every field is `opt` and always filled.
1054
+ * /
1055
+ * / CALLER: the deployment's monitor, once an hour, under the audit-viewer grant its daily count-of-use
1056
+ * / reading already holds (ADR-0020 rule 1). Also the admin.
1057
+ * /
1058
+ * / GATED, LIKE THE COUNT-OF-USE READS THAT MONITOR MAKES (`getOpeningCounts`): the admin or an audit
1059
+ * / viewer; anyone else is REFUSED by name — never an empty or zero reading. A QUERY: its refusal is
1060
+ * / not in the denial log (a query cannot write; `denied` says why). One read where there were three
1061
+ * / saves the monitor and this registry two calls an hour each.
1062
+ */
1063
+ getRegistryHealth: ActorMethod<[], Result_22>;
961
1064
  /**
962
1065
  * / PUBLIC: the biller identity is an operational fact a
963
1066
  * / payer's cashier must verify BEFORE taking money (paying into a cashier the registry does not
@@ -1032,7 +1135,7 @@ export interface _SERVICE {
1032
1135
  getSecurityReleaseCount: ActorMethod<[], bigint>;
1033
1136
  /**
1034
1137
  * / ⟨2026-10-01, the owner's ruling of that day (2 A)⟩ Cumulative cycles accepted at the sponsored
1035
- * / door (`sysSpawnChild`) and forwarded into engrams opened through another — cycles the calling
1138
+ * / door (`sysOpenChild`) and forwarded into engrams opened through another — cycles the calling
1036
1139
  * / engrams attached, never the registry's own. Kept apart from the grant counter
1037
1140
  * / (`totalCyclesAllocated`) so neither figure is inflated by the other.
1038
1141
  * /
@@ -1082,7 +1185,7 @@ export interface _SERVICE {
1082
1185
  * / — and the second is a claim about OUR OWN SPEND, not an absence of one. `#Ok(null)` now means
1083
1186
  * / never funded, `#Err(#Refused)` means not your business, and no caller has to guess which.
1084
1187
  */
1085
- getUpgradeFundedTemplate: ActorMethod<[Principal], Result_20>;
1188
+ getUpgradeFundedTemplate: ActorMethod<[Principal], Result_21>;
1086
1189
  /**
1087
1190
  * / Cumulative cycles the registry has granted to engrams for upgrades — ⟨2026-10-25⟩ the meter on
1088
1191
  * / security-update funding: the registry pays only for security updates on running engrams (was:
@@ -1150,7 +1253,7 @@ export interface _SERVICE {
1150
1253
  * / nowhere" — handed to a caller who merely lacks a grant. Readable by an admin, an audit viewer,
1151
1254
  * / or that agent about itself.
1152
1255
  */
1153
- listAgentEngrams: ActorMethod<[Principal], Result_17>;
1256
+ listAgentEngrams: ActorMethod<[Principal], Result_18>;
1154
1257
  /**
1155
1258
  * / Contradictory submissions, oldest-first. Empty is the normal case. Never trimmed.
1156
1259
  * /
@@ -1179,7 +1282,7 @@ export interface _SERVICE {
1179
1282
  * / while keeping the evidence that two of them disagree — the fabricate-on-refusal shape aimed at
1180
1283
  * / the one reader the anchors exist for.
1181
1284
  */
1182
- listAnchorConflicts: ActorMethod<[Principal, bigint, bigint], Result_19>;
1285
+ listAnchorConflicts: ActorMethod<[Principal, bigint, bigint], Result_20>;
1183
1286
  /**
1184
1287
  * / Witnessed heads for an engram, oldest-first. PUBLIC and ungated — an anchor a stranger cannot
1185
1288
  * / read is not an anchor (ratified: "recorded where counterparties can check them").
@@ -1216,6 +1319,11 @@ export interface _SERVICE {
1216
1319
  * / anything. A cap that is part of the ratified design is not the unbounded growth paging exists
1217
1320
  * / for. WHAT WOULD MAKE THIS WRONG: the ring outgrowing one reply, or rows withheld per caller —
1218
1321
  * / then it pages, and that is a break.
1322
+ * / ⟨2026-11-04, the owner's ruling 3A′ — RECOVER-WALLET-1⟩ EVERY ERA, oldest first. An engram the registry
1323
+ * / recovered after the network erased it has more than one record: each anchor carries `era` (0 = its
1324
+ * / first record, k = after its k-th recover), the earlier eras' anchors as they stood when each was set
1325
+ * / aside, then the current era's. Nothing is withheld or deleted. `disputed` is read against the
1326
+ * / contradictions recorded during the anchor's own era.
1219
1327
  */
1220
1328
  listAnchors: ActorMethod<[Principal], Array<AnchorView>>;
1221
1329
  /**
@@ -1246,7 +1354,7 @@ export interface _SERVICE {
1246
1354
  * / for strangers were ruled for the engram's record, and the status console decides a signed-in
1247
1355
  * / visitor's tier by whether this read refuses.
1248
1356
  */
1249
- listAuditEntries: ActorMethod<[bigint, bigint], Result_18>;
1357
+ listAuditEntries: ActorMethod<[bigint, bigint], Result_19>;
1250
1358
  /**
1251
1359
  * / ⟨0.16.0, L2.2⟩ RENAMED from `getMetricsViewers` — the viewer triple unifies on "audit viewer"
1252
1360
  * / across every canister, because a roster that grants audit reads should not be named after
@@ -1256,7 +1364,7 @@ export interface _SERVICE {
1256
1364
  * / on 2026-08-11 while viewers existed. An empty vec reads as "nobody holds read-only ops access"
1257
1365
  * / when the truth was "you are not on the roster".
1258
1366
  */
1259
- listAuditViewers: ActorMethod<[], Result_17>;
1367
+ listAuditViewers: ActorMethod<[], Result_18>;
1260
1368
  /**
1261
1369
  * / PUBLIC: the release history, paged.
1262
1370
  * /
@@ -1278,7 +1386,7 @@ export interface _SERVICE {
1278
1386
  * / Built by a pass over `parentOf` rather than from a second, reverse index: one stored fact and a
1279
1387
  * / pass bounded by the number of opened engrams, instead of two facts to keep in step.
1280
1388
  */
1281
- listChildrenOf: ActorMethod<[Principal], Result_16>;
1389
+ listChildrenOf: ActorMethod<[Principal], Result_17>;
1282
1390
  /**
1283
1391
  * / ⟨0.16.0⟩ RENAMED from `readDenialLog`; the refusal becomes a value.
1284
1392
  * /
@@ -1286,7 +1394,7 @@ export interface _SERVICE {
1286
1394
  * / this log exists to record — so "empty" was never an acceptable answer to a caller who simply
1287
1395
  * / lacks the grant. The old trap said so; this says the same thing as data.
1288
1396
  */
1289
- listDenialEntries: ActorMethod<[bigint, bigint], Result_15>;
1397
+ listDenialEntries: ActorMethod<[bigint, bigint], Result_16>;
1290
1398
  /**
1291
1399
  * / ⟨2026-10-02⟩ ONE ROW PER ENGAGEMENT, for the deployment's own count of use — DAYS, never
1292
1400
  * / instants, and NEVER the agent's root, enrolled key or invite.
@@ -1312,7 +1420,7 @@ export interface _SERVICE {
1312
1420
  * / and a query cannot write (the reason `listEngrams` is an update). This is the most sensitive of
1313
1421
  * / the three reads — one row per engagement — so who was turned away is worth a record.
1314
1422
  */
1315
- listEngagementRows: ActorMethod<[bigint, bigint, bigint, Array<Principal>], Result_14>;
1423
+ listEngagementRows: ActorMethod<[bigint, bigint, bigint, Array<Principal>], Result_15>;
1316
1424
  /**
1317
1425
  * / ⟨0.16.0, L1⟩ THE `authorized : ?Bool` FLAG IS GONE, AND SO IS EVERYTHING BUILT AROUND IT.
1318
1426
  * /
@@ -1345,7 +1453,7 @@ export interface _SERVICE {
1345
1453
  * / own text had to be corrected for — the forcing call is not a system API at all, it is
1346
1454
  * / `denied()`, a state write. See `scripts/check-update-for-read.mjs`.
1347
1455
  */
1348
- listEngrams: ActorMethod<[bigint, bigint], Result_13>;
1456
+ listEngrams: ActorMethod<[bigint, bigint], Result_14>;
1349
1457
  /**
1350
1458
  * / ⟨2026-09-28, owner decision: an agent may read its own record⟩ The caller's OWN dispute
1351
1459
  * / statements, oldest first, verbatim. Keyed by `msg.caller`, so it cannot be pointed at anyone
@@ -1400,12 +1508,12 @@ export interface _SERVICE {
1400
1508
  * / choice in the fleet. That is the consequence this refusal exists to prevent, and it belongs in
1401
1509
  * / the message a caller actually receives.
1402
1510
  */
1403
- listUpdatePrefs: ActorMethod<[bigint, bigint], Result_12>;
1511
+ listUpdatePrefs: ActorMethod<[bigint, bigint], Result_13>;
1404
1512
  /**
1405
1513
  * / Mint one-shot reserve invites (invite-issuer or admin). Codes use IC-secure randomness over a
1406
1514
  * / 32-symbol no-ambiguous alphabet (8 chars ≈ 40 bits). Batch-capped; table hard-capped.
1407
1515
  */
1408
- mintReserveInvites: ActorMethod<[bigint], Result_11>;
1516
+ mintReserveInvites: ActorMethod<[bigint], Result_12>;
1409
1517
  /**
1410
1518
  * / The PROBED twin of `getCustodyMode`: same question, asked of the IC rather than of our
1411
1519
  * / records — hence the `probe` verb rather than a second noun.
@@ -1433,7 +1541,7 @@ export interface _SERVICE {
1433
1541
  * / LIVE from the management canister rather than from a stored transition record, so a query
1434
1542
  * / could not produce it at all, not merely more cheaply.
1435
1543
  */
1436
- probeCustodyMode: ActorMethod<[], Result_10>;
1544
+ probeCustodyMode: ActorMethod<[], Result_11>;
1437
1545
  /**
1438
1546
  * / What YOUR OWN engram's compute is, read by the registry — the one read that works while it is
1439
1547
  * / frozen.
@@ -1452,7 +1560,25 @@ export interface _SERVICE {
1452
1560
  * / call — INFERRED a few million cycles, not measured. `eraseAboutNs` is "about" and never invented:
1453
1561
  * / null when the network reports no idle burn.
1454
1562
  */
1455
- probeMyEngramCompute: ActorMethod<[], Result_9>;
1563
+ probeMyEngramCompute: ActorMethod<[], Result_10>;
1564
+ /**
1565
+ * / What an engram OPENED THROUGH ANOTHER is running on, read by the registry — for its key file and its
1566
+ * / sign-in (the person), the read `probeMyEngramCompute` is for a first engram's owner.
1567
+ * /
1568
+ * / CALLER: the app's Access page, signed in as the person, for a child row whose own `getOwnerSignIn`
1569
+ * / call is rejected (an erased child answers nothing) — and the owner kit, as the key file (ADR-0020).
1570
+ * / ⟨2026-11-04, the owner's ruling "1B" — "the registry starts keeping the person's sign-in for them"⟩
1571
+ * / The person may SEE, not ask and not pay: the ask (`recoverMyEngram`) and the payment (the cashier's
1572
+ * / top-up, admitted only from the key file) stay the key file's. Gated to the child's key file
1573
+ * / (`canisterToOwner`) and its sign-in AS NOTED HERE (`childSignIn`); refused to everyone else — the
1574
+ * / parent's owner included — with the SAME words whether or not `child` exists or is a child at all
1575
+ * / (`getEngramOpenedThrough`'s precedent: who works for whom is not disclosed by a refusal). UPDATE, not
1576
+ * / query, for `probeMyEngramCompute`'s reason (a query cannot call the management canister).
1577
+ * / ⟨L7⟩ ⟨marker added 2026-11-05, the reason above unchanged — platform check-update-for-read named it
1578
+ * / missing⟩ The system call that forces the update is `canister_status` on the management canister: a
1579
+ * / query cannot make an inter-canister call, so it could not read an erased child's network status at all.
1580
+ */
1581
+ probeOpenedEngramCompute: ActorMethod<[Principal], Result_10>;
1456
1582
  /**
1457
1583
  * / ⟨0.16.0⟩ `Ok` CARRIES THE PRINCIPAL DIRECTLY, not a one-field record wrapping it.
1458
1584
  * /
@@ -1475,8 +1601,40 @@ export interface _SERVICE {
1475
1601
  },
1476
1602
  ],
1477
1603
  ],
1478
- Result_1
1604
+ Result_2
1479
1605
  >;
1606
+ /**
1607
+ * / RECOVER YOUR OWN ERASED ENGRAM — reinstall it on the SAME id, so its wallet and EVM address come back.
1608
+ * /
1609
+ * / CALLER: the owner, from the app's "Recover my wallet" (a first engram), or an engram's key file through
1610
+ * / the owner kit's `--recover` (an engram an agent opened through another) — ADR-0020. ⟨2026-11-04, the
1611
+ * / owner's rulings "1D. 2A." and "1B. the rest as recommended."⟩ Recover.mo says what a recover is and
1612
+ * / what does and does not come back.
1613
+ * /
1614
+ * / THE ORDER: the owner first adds compute to the empty engram through the cashier's existing top-up
1615
+ * / (each step its own tap; nothing here moves money, lends or funds); then this call reads the network's
1616
+ * / status of the engram as its controller, refuses by name unless the engram is ERASED (no module) and
1617
+ * / holds enough compute to install (`UpgradeFunding.noDipBar` — the line plus the install hold plus a
1618
+ * / margin; the exact shortfall is named), writes a durable "recover in progress" mark, installs the
1619
+ * / current template with `#install` ONLY (the network refuses it on a canister that holds a module), with
1620
+ * / the init record from this registry's own records (owner, registry, parent, the kept sign-in,
1621
+ * / `recoveredAtNs`), starts the engram if it was found stopped, sets the old record's anchors aside as an
1622
+ * / earlier era (the certified leaf says so), and re-sends what a newborn is told: its biller, market and
1623
+ * / metrics reader, a first fee line and its birth record. The mark is removed once the biller is in
1624
+ * / place; until then a second call finishes the work and answers `#Ok` with `finished = true`.
1625
+ * / ⟨CHANGED 2026-11-05, the canister review's M1 and L1⟩ The old record's anchors are set aside (and
1626
+ * / `recoveredAtNs` recorded) with the mark, BEFORE the install — the record ended at the erase — and no
1627
+ * / first fee line is sent (the balance before the install is not a fee). The compute probes'
1628
+ * / `recoverOpen` says a recover is open. An upgrade that finds a recover's install landed records it first.
1629
+ * /
1630
+ * / Refused, before anything is written: not your engram (`#NotFound`); not active, or ABANDONED (ruling
1631
+ * / 2A: an abandoned engram is not recovered — withdraw your digital dollars before you abandon an engram);
1632
+ * / sovereign; a change of owner unfinished; a restart open or
1633
+ * / a restart/recover call running; an update installing; no template; the status unreadable; NOT ERASED
1634
+ * / (`#Conflict` — "already recovered at T" when this registry recovered it, and no install); compute
1635
+ * / under the bar (`#Conflict` naming the shortfall).
1636
+ */
1637
+ recoverMyEngram: ActorMethod<[], Result_9>;
1480
1638
  removeAuditViewer: ActorMethod<[Principal], Result>;
1481
1639
  /**
1482
1640
  * / ⟨0.16.0⟩ `Ok` IS THE ANSWER — the `{ reserved : Bool }` wrapper is gone.
@@ -1559,10 +1717,14 @@ export interface _SERVICE {
1559
1717
  * / second call while one is still running for the same engram (`restartCallsRunning`), which is
1560
1718
  * / what now keeps two interleaved calls from both lending or both stopping and starting — the week
1561
1719
  * / used to double as that guard.
1720
+ * / ⟨2026-11-04, beside the lists above — BACKLOG ERASED-REFUSE-1⟩ Also refused, first after the status
1721
+ * / read: an ERASED engram (its canister holds no program) — nothing is stopped or lent into it.
1562
1722
  */
1563
1723
  restartMyStoppedEngram: ActorMethod<[], Result_8>;
1564
1724
  /**
1565
1725
  * / Return to managed: user calls AFTER adding registry back as controller
1726
+ * /
1727
+ * / ⟨2026-11-02⟩ Refused for an engram opened through another, which is never independent.
1566
1728
  */
1567
1729
  returnToManaged: ActorMethod<[], Result>;
1568
1730
  /**
@@ -1643,6 +1805,9 @@ export interface _SERVICE {
1643
1805
  * /
1644
1806
  * / `claimSovereignty` sets this to `#ManualOnly` as a side effect, since a registry that is no
1645
1807
  * / longer a controller could not honour anything else.
1808
+ * /
1809
+ * / ⟨2026-11-02⟩ An engram opened through another is refused `#ManualOnly`: it takes this registry's
1810
+ * / updates automatically for life.
1646
1811
  */
1647
1812
  setUpdatePreference: ActorMethod<[UpdatePreference], Result>;
1648
1813
  /**
@@ -1667,6 +1832,8 @@ export interface _SERVICE {
1667
1832
  * / starts it. If the owner walks away, the sweep finishes it after 30 minutes: install if covered,
1668
1833
  * / restore, start. Never left stopped. It lends nothing, so it takes no week; it refuses an engram
1669
1834
  * / that is not stuck, so a healthy engram is never taken offline (spec question Q15).
1835
+ * / ⟨2026-11-04 — BACKLOG ERASED-REFUSE-1⟩ It also refuses an ERASED engram (its canister holds no
1836
+ * / program): there is nothing to restart, and nothing is stopped.
1670
1837
  */
1671
1838
  stopMyEngramForRestart: ActorMethod<[], Result_6>;
1672
1839
  /**
@@ -1726,6 +1893,17 @@ export interface _SERVICE {
1726
1893
  * / (a single probe is not a completed round).
1727
1894
  */
1728
1895
  sysMeterEngram: ActorMethod<[Principal], Result_4>;
1896
+ /**
1897
+ * / CALLER: an engram opened through another, from inside its three sign-in writers — `setOwnerSignIn`,
1898
+ * / `declineSignIn` (the sign-in's own decline) and `acceptSignIn` — BEFORE it writes its own seat
1899
+ * / (ADR-0020). ⟨2026-11-04, the owner's ruling "1B"⟩ The registry keeps the child's seated sign-in
1900
+ * / (`childSignIn` says why, and why the order is registry-first): `?p` notes `p` as the sign-in, `null`
1901
+ * / notes that none is seated. A record argument, so it can grow by opt fields (ADR-0018 rule 0).
1902
+ * / Refused, with nothing written: a caller this registry did not open through another engram (a first
1903
+ * / engram has no sign-in; anything else is no engram here), and a sign-in the door would refuse at
1904
+ * / birth (`ChildDoor.signInRefusal` — the key file itself, the anonymous principal, a canister).
1905
+ */
1906
+ sysNoteChildSignIn: ActorMethod<[{ signIn: [] | [Principal] }], Result>;
1729
1907
  /**
1730
1908
  * / ⟨2026-10-02⟩ An engram tells this registry that its owner reset it.
1731
1909
  * /
@@ -1787,6 +1965,84 @@ export interface _SERVICE {
1787
1965
  * / names). The rules are in `src/shared/ControlHandover.mo`.
1788
1966
  */
1789
1967
  sysNotifyOwnershipTransfer: ActorMethod<[Principal], Result_3>;
1968
+ /**
1969
+ * / ⟨2026-10-01, the owner's ruling of that day: the October concept's decision 1, "build it now"⟩
1970
+ * / THE SPONSORED DOOR. An engram opens an engram for one of its agents: the caller is the engram
1971
+ * / (the engram it is opened from — `parentOf` in code), `ownerKey` is the agent's LASTING key, which
1972
+ * / owns what is opened, and the cycles the opened engram lives on are the ones the caller ATTACHES.
1973
+ * /
1974
+ * / CALLER: a registered engram — `canisterToOwner` membership, checked first, exactly as
1975
+ * / `sysRecordAgentEdge` checks it (ADR-0020: every `sys` method names and checks its caller). The
1976
+ * / engram's own rules (the owner's standing allowance for this agent, its frozen-payments state,
1977
+ * / its balance) are the engram's to check before it calls; this method checks what only the
1978
+ * / registry can know.
1979
+ * /
1980
+ * / NOTHING IS ACCEPTED UNTIL EVERY CHECK HAS PASSED (`ChildDoor.admission`, cheapest first), so
1981
+ * / every refusal before the accept returns the attached cycles to the caller by construction —
1982
+ * / the IC returns unaccepted cycles when the call replies. After the accept:
1983
+ * / · the network refuses the canister → what it refunded is deposited back to the caller, and
1984
+ * / the reply says how much came back;
1985
+ * / · the template will not install after one retry → the cycles are INSIDE the new canister and
1986
+ * / no canister can withdraw another's cycles. The one honest exception to "returned on every
1987
+ * / failure": nothing is recorded, and the reply names the canister, its controllers (this
1988
+ * / registry and the key) and what the key can do with it;
1989
+ * / ⟨CORRECTED 2026-11-02, beside the line above — the owner's ruling "choice 4 without hand
1990
+ * / over" (V0)⟩ The controller is THIS REGISTRY ALONE; the key is not one and can install
1991
+ * / nothing. The reply names the canister and says the cycles sit in it unrecorded, for whoever
1992
+ * / runs this deployment to decide on;
1993
+ * / · the key came to own an engram during the awaits → the new canister is named, nothing is
1994
+ * / recorded (the same third guard `spawnEngramFor` carries).
1995
+ * /
1996
+ * / WHAT IT DOES NOT DO, deliberately: it never attaches the registry's own cycles (the grant stays
1997
+ * / with first engrams); it never writes a predecessor (a key with any record was refused); it never
1998
+ * / consults the reserve gate (the parent owner's approval is this door's admission — the gate's
1999
+ * / arming note stays on `provisionEngram`); it never tells the calling engram anything but this
2000
+ * / reply. No payment AMOUNT reaches it (ADR-0005): it carries cycles and a key, nothing else.
2001
+ * /
2002
+ * / THE RATE LIMIT ⟨2026-10-01, evening — the owner's ruling "1B"; until then this door shared
2003
+ * / first engrams' limiter in full: their 24-hour count, their in-flight count and
2004
+ * / `effectiveDailyCap`⟩. The door shares only the DIAL (`spawnCeiling`) and the WINDOW LENGTH (24
2005
+ * / hours). Its count is its own (`sponsoredCreationTimestampsBuf`, pruned by
2006
+ * / `pruneSponsoredWindow`), its in-flight count is its own (`sponsoredInFlight`), and its cap is
2007
+ * / `spawnCeiling` alone — the reserve-derived term never applies, because the opened engram lives
2008
+ * / on the cycles the caller attached and the registry funds nothing. So an opening never uses up a
2009
+ * / first engram's slot, and is never refused for the registry's own low balance. The per-key
2010
+ * / pending mark (`createEngramPending`) stays shared: it is about ONE key, not a count, and a key
2011
+ * / must not be mid-spawn at both doors at once.
2012
+ * /
2013
+ * / THE CUT-OFF AT BIRTH. If the caller ended the key's engagement while the canister was being
2014
+ * / created (the ending is recorded by `sysRecordAgentEdge` between this method's awaits), the
2015
+ * / opened engram is recorded AND cut off in the same step — the cycles are already in it, so the
2016
+ * / key keeps it, but it starts on nobody's record. Without this the ending's cut-off writer would
2017
+ * / have found no `openedThroughParent` row yet, and the engram would never be cut off.
2018
+ * / WHAT WOULD MAKE THIS WRONG: a second path that writes `parentOf`, or an `await` placed between
2019
+ * / the post-await re-check and the record below.
2020
+ * /
2021
+ * / ⟨2026-11-02, the owner's rulings "choice 4 without hand over" (V0) and "1-4 all as you
2022
+ * / recommended"⟩ CONTROLLED BY THIS REGISTRY ALONE, AND BORN KNOWING ITS PARENT AND ITS SIGN-IN.
2023
+ * / The canister's controllers are `[this registry]` — the key is not a controller, so it can never
2024
+ * / reinstall, delete or re-control the engram; only this registry installs code on it. Such an
2025
+ * / engram is managed for life: `claimSovereignty`, `returnToManaged`, `abandonMyEngram`, a
2026
+ * / `#ManualOnly` preference and a change of owner (`sysNotifyOwnershipTransfer`) are all refused
2027
+ * / for it, by `parentOf`. `signIn` is the opened engram's second credential, named by the person
2028
+ * / running the agent (`ChildDoor.signInRefusal` refuses the key itself, the anonymous principal and
2029
+ * / a canister); it and the parent travel in the engram's init record, so the engram knows both
2030
+ * / before it answers its first message. `null` = no sign-in: the engram keeps small limits for life.
2031
+ * / An engram built before this argument sends one argument; the missing trailing `opt` decodes as
2032
+ * / `null` (Candid's rule for a missing optional argument), and the engram opens with no sign-in.
2033
+ * / ⟨CORRECTED 2026-11-02, later — the stage-1 review's B1, beside the two lines above, which no
2034
+ * / longer hold⟩ ONE RECORD, A NEW NAME. This door was `sysSpawnChild(ownerKey : Principal)`; giving
2035
+ * / it a second positional argument grew its argument TUPLE, which ADR-0018 rule 0 freezes ("evolution
2036
+ * / happens inside records", ratified R1) and the interface gate reads as ILLEGAL. So the door is
2037
+ * / `sysOpenChild({ ownerKey; signIn })` — later fields are opt fields of this record, never another
2038
+ * / argument — and `sysSpawnChild` is REMOVED (a NOTICE at the gate). An engram built before this
2039
+ * / change still calls `sysSpawnChild`; this registry no longer serves it, so that call is REJECTED
2040
+ * / (IC0536, a reject the engram's `try` catches — ADR-0018 probe 11), the attached cycles come back
2041
+ * / as the call's refund, and nothing is opened. An older engram therefore never opens an engram with
2042
+ * / no sign-in by accident; it opens them again once it runs a template that calls this method.
2043
+ * / (Was: the one-argument call decoded `signIn` as `null` — INFERRED for moc 2.1.0, never witnessed.)
2044
+ */
2045
+ sysOpenChild: ActorMethod<[{ ownerKey: Principal; signIn: [] | [Principal] }], Result_2>;
1790
2046
  /**
1791
2047
  * / ⟨2026-09-28, owner decision: build the full agent track-record design for the launch release⟩
1792
2048
  * / An engram tells this registry that one of its agents started, or ended and WHY.
@@ -1883,7 +2139,7 @@ export interface _SERVICE {
1883
2139
  * / name one of its OWN advances (the caller must match), so the worst it can do is settle its own
1884
2140
  * / other advance early with cycles that are still the registry's.
1885
2141
  */
1886
- sysRepayUpgradeAdvance: ActorMethod<[{ advanceId: bigint }], Result_2>;
2142
+ sysRepayUpgradeAdvance: ActorMethod<[{ advanceId: bigint }], Result_1>;
1887
2143
  /**
1888
2144
  * / ⟨2026-09-29, owner ruling follow-up 8⟩ A SOVEREIGN engram could not change its own controllers
1889
2145
  * / after this registry moved its record, and asks for the record back so the transfer does not
@@ -1894,56 +2150,6 @@ export interface _SERVICE {
1894
2150
  * / engram then answers its owner with `ControlHandover.stuck`.
1895
2151
  */
1896
2152
  sysRevertOwnershipTransfer: ActorMethod<[Principal], Result>;
1897
- /**
1898
- * / ⟨2026-10-01, the owner's ruling of that day: the October concept's decision 1, "build it now"⟩
1899
- * / THE SPONSORED DOOR. An engram opens an engram for one of its agents: the caller is the engram
1900
- * / (the engram it is opened from — `parentOf` in code), `ownerKey` is the agent's LASTING key, which
1901
- * / owns what is opened, and the cycles the opened engram lives on are the ones the caller ATTACHES.
1902
- * /
1903
- * / CALLER: a registered engram — `canisterToOwner` membership, checked first, exactly as
1904
- * / `sysRecordAgentEdge` checks it (ADR-0020: every `sys` method names and checks its caller). The
1905
- * / engram's own rules (the owner's standing allowance for this agent, its frozen-payments state,
1906
- * / its balance) are the engram's to check before it calls; this method checks what only the
1907
- * / registry can know.
1908
- * /
1909
- * / NOTHING IS ACCEPTED UNTIL EVERY CHECK HAS PASSED (`ChildDoor.admission`, cheapest first), so
1910
- * / every refusal before the accept returns the attached cycles to the caller by construction —
1911
- * / the IC returns unaccepted cycles when the call replies. After the accept:
1912
- * / · the network refuses the canister → what it refunded is deposited back to the caller, and
1913
- * / the reply says how much came back;
1914
- * / · the template will not install after one retry → the cycles are INSIDE the new canister and
1915
- * / no canister can withdraw another's cycles. The one honest exception to "returned on every
1916
- * / failure": nothing is recorded, and the reply names the canister, its controllers (this
1917
- * / registry and the key) and what the key can do with it;
1918
- * / · the key came to own an engram during the awaits → the new canister is named, nothing is
1919
- * / recorded (the same third guard `spawnEngramFor` carries).
1920
- * /
1921
- * / WHAT IT DOES NOT DO, deliberately: it never attaches the registry's own cycles (the grant stays
1922
- * / with first engrams); it never writes a predecessor (a key with any record was refused); it never
1923
- * / consults the reserve gate (the parent owner's approval is this door's admission — the gate's
1924
- * / arming note stays on `provisionEngram`); it never tells the calling engram anything but this
1925
- * / reply. No payment AMOUNT reaches it (ADR-0005): it carries cycles and a key, nothing else.
1926
- * /
1927
- * / THE RATE LIMIT ⟨2026-10-01, evening — the owner's ruling "1B"; until then this door shared
1928
- * / first engrams' limiter in full: their 24-hour count, their in-flight count and
1929
- * / `effectiveDailyCap`⟩. The door shares only the DIAL (`spawnCeiling`) and the WINDOW LENGTH (24
1930
- * / hours). Its count is its own (`sponsoredCreationTimestampsBuf`, pruned by
1931
- * / `pruneSponsoredWindow`), its in-flight count is its own (`sponsoredInFlight`), and its cap is
1932
- * / `spawnCeiling` alone — the reserve-derived term never applies, because the opened engram lives
1933
- * / on the cycles the caller attached and the registry funds nothing. So an opening never uses up a
1934
- * / first engram's slot, and is never refused for the registry's own low balance. The per-key
1935
- * / pending mark (`createEngramPending`) stays shared: it is about ONE key, not a count, and a key
1936
- * / must not be mid-spawn at both doors at once.
1937
- * /
1938
- * / THE CUT-OFF AT BIRTH. If the caller ended the key's engagement while the canister was being
1939
- * / created (the ending is recorded by `sysRecordAgentEdge` between this method's awaits), the
1940
- * / opened engram is recorded AND cut off in the same step — the cycles are already in it, so the
1941
- * / key keeps it, but it starts on nobody's record. Without this the ending's cut-off writer would
1942
- * / have found no `openedThroughParent` row yet, and the engram would never be cut off.
1943
- * / WHAT WOULD MAKE THIS WRONG: a second path that writes `parentOf`, or an `await` placed between
1944
- * / the post-await re-check and the record below.
1945
- */
1946
- sysSpawnChild: ActorMethod<[Principal], Result_1>;
1947
2153
  /**
1948
2154
  * / Admin: upgrade one engram to the current template. RESPECTS the owner's update preference —
1949
2155
  * / an engram set to `#ManualOnly` is not moved by this method, which is what makes the preference
@@ -1953,6 +2159,8 @@ export interface _SERVICE {
1953
2159
  * / paid only for a #Security update on a running engram. A push is the registry's own initiative,
1954
2160
  * / so where the engram cannot hold the install even with its setting lowered, the push is SKIPPED
1955
2161
  * / with `#Conflict` and not attempted — the owner can still pull it, and the pull is never refused.
2162
+ * / ⟨2026-11-04 — BACKLOG ERASED-REFUSE-1⟩ An ERASED engram (its canister holds no program) is not
2163
+ * / pushed: `#Conflict`, by name, before anything is added.
1956
2164
  */
1957
2165
  upgradeEngram: ActorMethod<[Principal], Result>;
1958
2166
  /**
@@ -1985,6 +2193,8 @@ export interface _SERVICE {
1985
2193
  * / (UpgradeFunding.pullFailure): `#Conflict` when the engram needs more compute (the owner's
1986
2194
  * / action — add compute), `#Unavailable` when the registry could not pay this time (retryable).
1987
2195
  * / A failure after a paid or unneeded deposit answers `#Unavailable` with the network's reply.
2196
+ * / ⟨2026-11-04 — BACKLOG ERASED-REFUSE-1⟩ On an ERASED engram (its canister holds no program) nothing
2197
+ * / is paid; the install is still attempted, the network refuses it, and the reply says "erased".
1988
2198
  * /
1989
2199
  * / An engram already on the current template is a silent no-op. A SOVEREIGN engram gets
1990
2200
  * / "registry is no longer a controller" — accurate, because it is no longer ours to install on.