@engramx/idl 0.16.0-rc.16 → 0.16.0-rc.18

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
@@ -63,107 +63,143 @@ type Role =
63
63
  type Result_9 =
64
64
  variant {
65
65
  Err: Error;
66
- Ok: Page_2;
66
+ Ok: EngramComputeView;
67
67
  };
68
68
  type Result_8 =
69
69
  variant {
70
70
  Err: Error;
71
- Ok: Page_1;
71
+ Ok: RestartReply;
72
72
  };
73
73
  type Result_7 =
74
74
  variant {
75
75
  Err: Error;
76
- Ok: Page;
76
+ Ok: nat;
77
77
  };
78
78
  type Result_6 =
79
79
  variant {
80
80
  Err: Error;
81
- Ok: vec text;
81
+ Ok: record {
82
+ finishByNs: int;
83
+ updateWaiting: bool;
84
+ };
82
85
  };
83
86
  type Result_5 =
84
87
  variant {
85
88
  Err: Error;
86
- Ok: CustodyMode;
89
+ Ok: record {
90
+ repaid: nat;
91
+ stillOwed: nat;
92
+ };
87
93
  };
88
94
  type Result_4 =
89
95
  variant {
90
96
  Err: Error;
91
- Ok: nat;
97
+ Ok: MeterReading;
92
98
  };
93
99
  type Result_3 =
94
100
  variant {
95
101
  Err: Error;
96
- Ok: MeterReading;
102
+ Ok: ControlStep;
97
103
  };
98
- type Result_22 =
104
+ type Result_28 =
99
105
  variant {
100
106
  Err: Error;
101
107
  Ok: FleetCycleHealth;
102
108
  };
103
- type Result_21 =
109
+ type Result_27 =
104
110
  variant {
105
111
  Err: Error;
106
112
  Ok: CertifiedStanding;
107
113
  };
108
- type Result_20 =
114
+ type Result_26 =
115
+ variant {
116
+ Err: Error;
117
+ Ok: blob;
118
+ };
119
+ type Result_25 =
120
+ variant {
121
+ Err: Error;
122
+ Ok: PrivateMetrics;
123
+ };
124
+ type Result_24 =
125
+ variant {
126
+ Err: Error;
127
+ Ok: RestartStatus;
128
+ };
129
+ type Result_23 =
130
+ variant {
131
+ Err: Error;
132
+ Ok: OpeningCounts;
133
+ };
134
+ type Result_22 =
109
135
  variant {
110
136
  Err: Error;
111
137
  Ok: OpenedThrough;
112
138
  };
139
+ type Result_21 =
140
+ variant {
141
+ Err: Error;
142
+ Ok: ReferralCounts;
143
+ };
144
+ type Result_20 =
145
+ variant {
146
+ Err: Error;
147
+ Ok: opt text;
148
+ };
113
149
  type Result_2 =
114
150
  variant {
115
151
  Err: Error;
116
- Ok: ControlStep;
152
+ Ok: record {accepted: nat;};
117
153
  };
118
154
  type Result_19 =
119
155
  variant {
120
156
  Err: Error;
121
- Ok: blob;
157
+ Ok: Page_6;
122
158
  };
123
159
  type Result_18 =
124
160
  variant {
125
161
  Err: Error;
126
- Ok: PrivateMetrics;
162
+ Ok: RecordPage;
127
163
  };
128
164
  type Result_17 =
129
165
  variant {
130
166
  Err: Error;
131
- Ok: OpeningCounts;
167
+ Ok: Page_5;
132
168
  };
133
169
  type Result_16 =
134
170
  variant {
135
171
  Err: Error;
136
- Ok: ReferralCounts;
172
+ Ok: vec OpenedEngram;
137
173
  };
138
174
  type Result_15 =
139
175
  variant {
140
176
  Err: Error;
141
- Ok: opt text;
177
+ Ok: Page_3;
142
178
  };
143
179
  type Result_14 =
144
180
  variant {
145
181
  Err: Error;
146
- Ok: Page_6;
182
+ Ok: Page_2;
147
183
  };
148
184
  type Result_13 =
149
185
  variant {
150
186
  Err: Error;
151
- Ok: RecordPage;
187
+ Ok: Page_1;
152
188
  };
153
189
  type Result_12 =
154
190
  variant {
155
191
  Err: Error;
156
- Ok: Page_5;
192
+ Ok: Page;
157
193
  };
158
194
  type Result_11 =
159
195
  variant {
160
196
  Err: Error;
161
- Ok: vec OpenedEngram;
197
+ Ok: vec text;
162
198
  };
163
199
  type Result_10 =
164
200
  variant {
165
201
  Err: Error;
166
- Ok: Page_3;
202
+ Ok: CustodyMode;
167
203
  };
168
204
  type Result_1 =
169
205
  variant {
@@ -175,6 +211,31 @@ type Result =
175
211
  Err: Error;
176
212
  Ok;
177
213
  };
214
+ type RestartTotals =
215
+ record {
216
+ advanceOutstanding: nat;
217
+ advancePaid: nat;
218
+ advanceReturned: nat;
219
+ advanceWrittenOff: nat;
220
+ lent: nat;
221
+ outstanding: nat;
222
+ repaid: nat;
223
+ writtenOff: nat;
224
+ };
225
+ type RestartStatus =
226
+ record {
227
+ loanOwed: nat;
228
+ nextRestartAtNs: opt int;
229
+ openUntilNs: opt int;
230
+ };
231
+ type RestartReply =
232
+ record {
233
+ engramTold: bool;
234
+ installError: opt text;
235
+ lentCycles: nat;
236
+ securityInstalled: bool;
237
+ updateWaiting: bool;
238
+ };
178
239
  type ReserveGateConfig =
179
240
  record {
180
241
  enabled: bool;
@@ -371,6 +432,23 @@ type EngramRecordView =
371
432
  owner: principal;
372
433
  status: EngramStatus;
373
434
  };
435
+ type EngramComputeView =
436
+ record {
437
+ cycles: nat;
438
+ eraseAboutNs: opt int;
439
+ frozen: bool;
440
+ idlePerDay: nat;
441
+ line: nat;
442
+ quiet: bool;
443
+ restartOpenUntilNs: opt int;
444
+ runState: variant {
445
+ running;
446
+ stopped;
447
+ stopping;
448
+ };
449
+ thresholdSecs: nat;
450
+ updateWaiting: bool;
451
+ };
374
452
  type EngagementRow =
375
453
  record {
376
454
  abandonedDay: opt int;
@@ -437,6 +515,11 @@ type CertifiedStanding =
437
515
  leaf: StandingLeaf;
438
516
  witness: blob;
439
517
  };
518
+ type CertifiedBirth =
519
+ record {
520
+ certificate: opt blob;
521
+ witness: blob;
522
+ };
440
523
  type CertifiedAuditHead =
441
524
  record {
442
525
  certificate: opt blob;
@@ -572,7 +655,7 @@ service : {
572
655
  /// Contrast `backupFinalize`, which does NOT verify its digest. These two look like the same
573
656
  /// protocol and are not, and the difference matters most on this one: it decides what code every
574
657
  /// engram in the fleet will run.
575
- engramWasmFinalize: (hash: text) -> (Result_4);
658
+ engramWasmFinalize: (hash: text) -> (Result_7);
576
659
  /// Chunked WASM upload — for WASMs that exceed single-call ingress limits.
577
660
  /// Flow: engramWasmInit → engramWasmPushChunk (×N) → engramWasmFinalize(hash)
578
661
  /// ⟨0.16.0 — CORRECTED 2026-08-19⟩ This line named all THREE pre-rename methods, none of which
@@ -587,7 +670,7 @@ service : {
587
670
  /// and total bytes over the cap. Neither is recoverable by pushing again — call `engramWasmInit`
588
671
  /// to clear and begin afresh. The messages say so because a caller who retries a chunk against a
589
672
  /// full buffer will retry forever.
590
- engramWasmPushChunk: (chunk: blob) -> (Result_4);
673
+ engramWasmPushChunk: (chunk: blob) -> (Result_7);
591
674
  /// Fleet cycle-health scan. Admin or metrics-viewer, PAGINATED with a hard max of 50 per page —
592
675
  /// each managed engram costs one `canister_status` await, so pages stay small to bound the
593
676
  /// message. A caller must expect to iterate.
@@ -616,7 +699,7 @@ service : {
616
699
  /// this one is a noun. That gate now reads the census's L7 citations as a second population for
617
700
  /// exactly this blind spot.⟩
618
701
  fleetCycleHealth: (offset: nat, limit: nat, thresholdCycles: nat) ->
619
- (Result_22);
702
+ (Result_28);
620
703
  /// PUBLIC: ⟨0.16.0, L2.4⟩ `fleetSummary` — the ONE public projection of this registry,
621
704
  /// replacing `status()` and ABSORBING `publicMetrics()`.
622
705
  ///
@@ -720,7 +803,7 @@ service : {
720
803
  /// is the agent's ROOT principal — the identity an owner sees as `root` on each key in their own
721
804
  /// `listAgents`. "The agent itself" is a caller holding that root key. A key for one engram has no
722
805
  /// record of its own here; asking about one gets the refusal or, from the key itself, `#NotFound`.
723
- getAgentStanding: (agent: principal) -> (Result_21) query;
806
+ getAgentStanding: (agent: principal) -> (Result_27) query;
724
807
  /// Fleet-wide anchoring liveness. Exists because ABSENCE is otherwise uninformative: an engram
725
808
  /// that never wrote, one still on a template without the push, and one whose push is broken all
726
809
  /// render as an empty getAnchors. Nothing distinguishes the first from the third, so a silently
@@ -773,6 +856,20 @@ service : {
773
856
  /// instead of trusting this replica, and a proof that requires a role to fetch rests on exactly
774
857
  /// the authority it was introduced to remove.
775
858
  getCertifiedAuditHead: () -> (CertifiedAuditHead) query;
859
+ /// The certified proof that a birth record's FINGERPRINT is in this registry's tree ⟨2026-10-26, the
860
+ /// owner's lineage ruling L3A⟩ — the half of an engram's birth chain the engram cannot give itself.
861
+ ///
862
+ /// PUBLIC: a proof a caller had to hold a role to fetch rests on the authority it was meant to
863
+ /// replace. It reveals only whether a fingerprint is present: the key is a salted hash (the record's
864
+ /// random secret is inside it) and the value a constant. Whoever holds the record — the engram's
865
+ /// owner, or whomever the owner showed it to — already knows the fingerprint; nobody else can ask
866
+ /// about a record they cannot guess.
867
+ ///
868
+ /// Verify as for `getCertifiedAnchor`, path ["births", <fingerprint>], leaf bytes = [0x01] (the
869
+ /// client's `verifyBirthChain` does it for a whole chain). `null` when absent, as `getCertifiedAnchor`
870
+ /// answers: there is no certified absence proof (spec question Q8). A `fingerprint` that is not 32
871
+ /// bytes is never a fingerprint, and answers `null` before the lookup.
872
+ getCertifiedBirth: (fingerprint: blob) -> (opt CertifiedBirth) query;
776
873
  /// The ATTESTABLE custody-mode fact (agent-native model item 19): "managed" | "sovereign" |
777
874
  /// "unknown", derived from the registry's OWN transition records (claimSovereignty /
778
875
  /// returnToManaged maintain sovereignEngramIds) — NOT from a canister_status probe, which needs
@@ -795,7 +892,7 @@ service : {
795
892
  ///
796
893
  /// Derived from records, never probed: a canister_status call would trap for exactly the
797
894
  /// canisters we are not the controller of, i.e. the sovereign ones this read exists to identify.
798
- getCustodyMode: (canisterId: principal) -> (Result_5) query;
895
+ getCustodyMode: (canisterId: principal) -> (Result_10) query;
799
896
  /// Cycles-health probe — slim, cycles-only shape; the money fields moved to the cashier's
800
897
  /// getCycleReserveStatus. Read by health-alert.mjs in registry mode.
801
898
  ///
@@ -836,7 +933,7 @@ service : {
836
933
  /// same words whether or not the key opened anything, so the refusal tells a stranger nothing.
837
934
  /// `#NotFound` only to a permitted reader, for a key that opened nothing: a true answer, like
838
935
  /// `listMyAgentDisputes`'s empty list.
839
- getEngramOpenedThrough: (key: principal) -> (Result_20) query;
936
+ getEngramOpenedThrough: (key: principal) -> (Result_22) query;
840
937
  /// The i-th 1 MiB slice of the attested engram wasm (0-indexed). The caller reassembles all
841
938
  /// chunks in order and MUST verify sha256(reassembled) == getEngramWasmHash before installing —
842
939
  /// the hash is the attestation; the bytes are a convenience. Out-of-range index → empty blob.
@@ -847,16 +944,27 @@ service : {
847
944
  /// its hash. A reassembler that reads `""` as end-of-stream cannot tell a finished download from
848
945
  /// a truncated one, so it would hash a partial wasm and report a mismatch against the official
849
946
  /// list, which reads as "this template is unofficial" rather than "I stopped reading too early".
850
- getEngramWasmChunk: (index: nat) -> (Result_19) query;
947
+ getEngramWasmChunk: (index: nat) -> (Result_26) query;
851
948
  /// The stored template's release class — FREE and UNGATED, because it is the checkable half of a
852
- /// promise made to people who are not our customers. Pair it with getRentStatus to verify the
853
- /// funding rule was applied: #Security funds every reachable engram; #Feature funds metered ones.
949
+ /// promise made to people who are not our customers. ⟨2026-10-25⟩ The funding rule it checks:
950
+ /// #Security — the registry pays for the install on every running engram it can reach, any size;
951
+ /// #Feature — the registry pays for no install, and each engram runs it on its own compute. (Was:
952
+ /// "pair it with getRentStatus … #Feature funds metered ones" — rent no longer enters it.)
854
953
  /// PUBLIC: ⟨0.16.0, L3⟩ The release class as a VARIANT, not a stringly-typed enum.
855
954
  ///
856
955
  /// It returned "security" or "feature" as `Text`, so every consumer compared strings and no
857
956
  /// compiler anywhere could catch a typo or a third class arriving. A variant makes the set closed
858
957
  /// and the comparison checked — and this value gates whether an upgrade is funded, so a caller
859
958
  /// that silently fails to match "security" funds nothing and reports no error.
959
+ /// ⟨CORRECTED 2026-10-26, later — the owner's restart choice 3A: "pay whenever the engram is
960
+ /// missing any security release, whatever the latest release is labelled"⟩ "#Feature — the
961
+ /// registry pays for no install" no longer holds for every engram: an engram still missing an
962
+ /// earlier security release is paid as a security update even while this reads #Feature, because
963
+ /// the current template carries that fix (UpgradeFunding.effectiveClass) — unless the current
964
+ /// template is itself behind a security release (an older build re-uploaded), which cannot deliver
965
+ /// the fix. An engram missing no security release is still never paid for a #Feature install.
966
+ /// So this value is the declared label, not the whole funding rule: the `upgrade.topUp` audit line
967
+ /// says `class=Security declared=Feature` when the two differ.
860
968
  getEngramWasmClass: () -> (ReleaseClass) query;
861
969
  /// The WASM hash of the engram template this registry will install.
862
970
  ///
@@ -878,7 +986,7 @@ service : {
878
986
  /// So L7's "the denial-logging motive for update-for-read is retired by L1" does not hold at this
879
987
  /// site. L1 retired the motive of trapping-to-refuse; it did not give queries the ability to
880
988
  /// write, which is the thing this actually depends on.
881
- getFleetMetrics: () -> (Result_18);
989
+ getFleetMetrics: () -> (Result_25);
882
990
  /// PUBLIC: a genesis note that only privileged callers could read would defeat its purpose —
883
991
  /// the reader who most needs it is the stranger deciding whether to trust this chain.
884
992
  getGenesisNote: () -> (GenesisNote) query;
@@ -933,6 +1041,16 @@ service : {
933
1041
  /// so a caller can hold a reservation with no engram. Seeing it here is what tells them to retry
934
1042
  /// provision rather than reserve again.
935
1043
  getMyReservation: () -> (opt ReservationView) query;
1044
+ /// CALLER: the app's restart sheet, for the owner (ADR-0020). What the caller's engram owes from a
1045
+ /// restart, when the next restart is allowed, and whether one is open. Refused loudly to anyone
1046
+ /// with no engram here — never "0 owed" to a caller it cannot answer for (ADR-0002).
1047
+ /// ⟨2026-10-26⟩ `openUntilNs` now reads the open restart's `finishByNs` (`restartsOpen`): when the
1048
+ /// call or the sweep will have started the engram. Shape unchanged.
1049
+ /// ⟨CORRECTED 2026-10-26, later — the owner's restart choice 2A: "apply the weekly limit only when
1050
+ /// we lend"⟩ "when the next restart is allowed" now reads "when the registry can next LEND to a
1051
+ /// restart": `nextRestartAtNs` is only the weekly limit on a loan. A restart on the owner's own
1052
+ /// compute is allowed now, whatever it says. Field name and shape unchanged.
1053
+ getMyRestartStatus: () -> (Result_24) query;
936
1054
  /// ⟨2026-10-02⟩ How many engrams were ever opened, and how — lifetime sizes of state this registry
937
1055
  /// never deletes, plus the two counters of refused openings (`Funnel.OpeningCounts` names each).
938
1056
  /// All O(1); a reader differences them day to day.
@@ -941,7 +1059,22 @@ service : {
941
1059
  /// grant). Anyone else is REFUSED by name with their class — never a zero, which would read as
942
1060
  /// "nothing was ever opened". A QUERY: counts only, and cheap; its refusal is not in the denial
943
1061
  /// log (`denied` says why a query cannot write).
944
- getOpeningCounts: () -> (Result_17) query;
1062
+ getOpeningCounts: () -> (Result_23) query;
1063
+ /// Where an engram was opened from ⟨2026-10-26, the owner's lineage ruling L4: "a child reads its own
1064
+ /// parent by its canister id"⟩: the engram, the engram it was opened from, and the cut-off's time if
1065
+ /// there is one. Closes "a handed-on child cannot read its own parent" — `getEngramOpenedThrough` is
1066
+ /// keyed by the lasting key that OPENED the engram, which a new owner does not hold.
1067
+ ///
1068
+ /// CALLER: the engram's CURRENT owner, the current owner of the engram it was opened from, or this
1069
+ /// registry's admin and audit viewers (ADR-0020). Reuses `parentOf`; no new state. The two owners are
1070
+ /// answered first; anyone else goes through the registry's combinator (`#adminOrViewer`), which
1071
+ /// refuses every other caller in the same words whether or not the id is an engram, so a refusal
1072
+ /// tells a stranger nothing. A QUERY, so the refusal is not written to the denial log (`denied`
1073
+ /// says why a query cannot write).
1074
+ /// `#NotFound` only to a permitted reader: a first engram has no parent (a true answer), and an id
1075
+ /// this registry never opened is said to be one, not passed off as a first engram (ADR-0002).
1076
+ /// L8C: `listChildrenOf` is unchanged. L7B: the change-of-owner gate is unchanged.
1077
+ getParentOf: (child: principal) -> (Result_22) query;
945
1078
  /// ⟨2026-10-02⟩ How far agents reach across owners — COUNTS ONLY: agents by how many trees their
946
1079
  /// record spans (1 · 2 · 3–4 · 5+), engrams opened through a parent that are live or cut off, and
947
1080
  /// engrams that paired an agent within seven days of opening. No principal, no row, no per-agent
@@ -953,7 +1086,7 @@ service : {
953
1086
  /// CALLERS: the admin and the audit viewers (the deployment's metrics reader holds a viewer grant),
954
1087
  /// weekly. Anyone else is REFUSED by name with their class — never zeros. A QUERY: its cost grows
955
1088
  /// with the agents and engrams it walks (one pass over each), so a reader asks weekly, not hourly.
956
- getReferralCounts: (exclude: vec principal) -> (Result_16) query;
1089
+ getReferralCounts: (exclude: vec principal) -> (Result_21) query;
957
1090
  /// PUBLIC: the biller identity is an operational fact a
958
1091
  /// payer's cashier must verify BEFORE taking money (paying into a cashier the registry does not
959
1092
  /// recognize as biller would collect funds it cannot convert into credit).
@@ -973,11 +1106,37 @@ service : {
973
1106
  /// stranger can sign up at all. An admission rule only the admitted can read is not a rule a
974
1107
  /// prospective user can act on.
975
1108
  getReserveGateConfig: () -> (ReserveGateConfig) query;
1109
+ /// PUBLIC: CALLER: the status page (ADR-0020). What the registry has lent to restart stopped engrams
1110
+ /// — lent, repaid, written off, outstanding — and what engrams gave back of the compute a paid
1111
+ /// security update advanced them (returned, written off). Ungated, because a subsidy we would not
1112
+ /// publish is one we should not spend. `getUpgradeSubsidyTotal` stays the gross figure.
1113
+ /// ⟨2026-10-26, the owner's ruling "write it off, but accounting should be exact"⟩ Two exact
1114
+ /// identities hold between any two messages: lent = repaid + writtenOff + outstanding, and
1115
+ /// advancePaid = advanceReturned + advanceWrittenOff + advanceOutstanding.
1116
+ /// ⟨2026-10-26, later — the owner's restart choice 4A: "add the release name to each write-off
1117
+ /// record. This needs no new storage."⟩ These totals are fleet-wide. PER RELEASE, read the audit
1118
+ /// chain: every line that moves an advance names the release it was paid for, `template=<module
1119
+ /// hash>` (and `version=` when the release history names one) — `upgrade.topUp` (paid, `added=`),
1120
+ /// `upgrade.advance.returned` (`returned=`, `writtenOff=`) and `upgrade.advance.writtenOff`
1121
+ /// (`writtenOff=`, including the 90-day write-off of an advance left outstanding, restart choice 5A).
1122
+ /// Summed by `template=`, they give each release's paid, returned and written-off figures exactly;
1123
+ /// what is still out per release is paid − returned − written off. Restart-loan lines are not per
1124
+ /// release (a loan pays for no release).
1125
+ /// ⟨CORRECTED 2026-10-26, later — the fix pass (the ledger review)⟩ "exactly" holds only over a
1126
+ /// COMPLETE copy of the audit chain. The registry keeps the most recent 10,000 audit entries
1127
+ /// (AuditLog's `MAX_ENTRIES`; on overflow it drops back to 9,000, oldest first), and a give-back or
1128
+ /// a 90-day write-off can land long after its `upgrade.topUp` line was dropped. A per-release sum
1129
+ /// read from the registry alone can therefore miss lines. Exact per-release figures need an archive
1130
+ /// of the chain kept from the first line on (scripts/audit-chain/monitor.mjs `--archive`); whether
1131
+ /// such an archive is kept durably is an operator's choice, not this registry's. The fleet totals
1132
+ /// this method answers are exact regardless.
1133
+ getRestartTotals: () -> (RestartTotals) query;
976
1134
  /// PUBLIC: transparency without a doxx — how many principals the deployment currently screens (0 = seam
977
1135
  /// disarmed, the shipped default). The list itself is never enumerable publicly.
978
1136
  getScreeningDenylistSize: () -> (nat) query;
979
1137
  /// How many engram template releases this registry has declared `#Security` — the class that
980
- /// skips any delay and is funded for every engram. ⟨2026-09-28, owner decision: publish the
1138
+ /// skips any delay and whose install the registry pays for on every running engram (⟨2026-10-25⟩
1139
+ /// was "is funded for every engram"). ⟨2026-09-28, owner decision: publish the
981
1140
  /// count only; the status page shows the number.⟩ It moves only when a template's class is
982
1141
  /// declared INTO `#Security` (`setEngramWasmClass`), never on `#Feature`, never down.
983
1142
  /// ⟨CORRECTED 2026-09-29⟩ It counts TEMPLATES, not declarations: each distinct template (by its
@@ -1034,9 +1193,14 @@ service : {
1034
1193
  /// `?Text` had to carry both "you may not ask" and "this engram was never funded for an upgrade"
1035
1194
  /// — and the second is a claim about OUR OWN SPEND, not an absence of one. `#Ok(null)` now means
1036
1195
  /// never funded, `#Err(#Refused)` means not your business, and no caller has to guess which.
1037
- getUpgradeFundedTemplate: (canisterId: principal) -> (Result_15) query;
1038
- /// Cumulative cycles the registry has granted to engrams for upgrades — the meter on the
1039
- /// never-gated pull path.
1196
+ getUpgradeFundedTemplate: (canisterId: principal) -> (Result_20) query;
1197
+ /// Cumulative cycles the registry has granted to engrams for upgrades — ⟨2026-10-25⟩ the meter on
1198
+ /// security-update funding: the registry pays only for security updates on running engrams (was:
1199
+ /// "the meter on the never-gated pull path"; the pull is still never refused, and a feature update
1200
+ /// it installs is not paid for).
1201
+ /// ⟨CORRECTED 2026-10-26, later — the owner's restart choice 3A⟩ "a feature update it installs is
1202
+ /// not paid for" now excepts an engram still missing an earlier security release: that install is
1203
+ /// paid as a security update and counted here (UpgradeFunding.effectiveClass).
1040
1204
  ///
1041
1205
  /// PUBLIC: a subsidy we would not publish is one we should not spend. Free and ungated.
1042
1206
  getUpgradeSubsidyTotal: () -> (nat) query;
@@ -1086,7 +1250,7 @@ service : {
1086
1250
  /// `[]` here is a SUBSTANTIVE CLAIM ABOUT ANOTHER PRINCIPAL'S FLEET — "this agent works
1087
1251
  /// nowhere" — handed to a caller who merely lacks a grant. Readable by an admin, an audit viewer,
1088
1252
  /// or that agent about itself.
1089
- listAgentEngrams: (agent: principal) -> (Result_12) query;
1253
+ listAgentEngrams: (agent: principal) -> (Result_17) query;
1090
1254
  /// Contradictory submissions, oldest-first. Empty is the normal case. Never trimmed.
1091
1255
  ///
1092
1256
  /// ⟨0.16.0, L3 — PAGED 2026-08-18⟩ This returned the WHOLE list, and the list is one an engram
@@ -1114,7 +1278,7 @@ service : {
1114
1278
  /// while keeping the evidence that two of them disagree — the fabricate-on-refusal shape aimed at
1115
1279
  /// the one reader the anchors exist for.
1116
1280
  listAnchorConflicts: (canisterId: principal, start: nat, limit: nat) ->
1117
- (Result_14) query;
1281
+ (Result_19) query;
1118
1282
  /// Witnessed heads for an engram, oldest-first. PUBLIC and ungated — an anchor a stranger cannot
1119
1283
  /// read is not an anchor (ratified: "recorded where counterparties can check them").
1120
1284
  ///
@@ -1177,7 +1341,7 @@ service : {
1177
1341
  /// this read sliced, which is not a number about the record. The gate is unchanged: hash-only rows
1178
1342
  /// for strangers were ruled for the engram's record, and the status console decides a signed-in
1179
1343
  /// visitor's tier by whether this read refuses.
1180
- listAuditEntries: (start: nat, limit: nat) -> (Result_13) query;
1344
+ listAuditEntries: (start: nat, limit: nat) -> (Result_18) query;
1181
1345
  /// ⟨0.16.0, L2.2⟩ RENAMED from `getMetricsViewers` — the viewer triple unifies on "audit viewer"
1182
1346
  /// across every canister, because a roster that grants audit reads should not be named after
1183
1347
  /// metrics on one canister and audit on another.
@@ -1185,7 +1349,7 @@ service : {
1185
1349
  /// MEASURED FABRICATION, kept in the record: this arm answered `(vec {})` to an ANONYMOUS caller
1186
1350
  /// on 2026-08-11 while viewers existed. An empty vec reads as "nobody holds read-only ops access"
1187
1351
  /// when the truth was "you are not on the roster".
1188
- listAuditViewers: () -> (Result_12) query;
1352
+ listAuditViewers: () -> (Result_17) query;
1189
1353
  /// PUBLIC: the release history, paged.
1190
1354
  ///
1191
1355
  /// ⟨0.16.0, L2.1⟩ A `Page`, not a bare vec. The old shape returned the WHOLE changelog on every
@@ -1203,13 +1367,13 @@ service : {
1203
1367
  ///
1204
1368
  /// Built by a pass over `parentOf` rather than from a second, reverse index: one stored fact and a
1205
1369
  /// pass bounded by the number of opened engrams, instead of two facts to keep in step.
1206
- listChildrenOf: (engram: principal) -> (Result_11) query;
1370
+ listChildrenOf: (engram: principal) -> (Result_16) query;
1207
1371
  /// ⟨0.16.0⟩ RENAMED from `readDenialLog`; the refusal becomes a value.
1208
1372
  ///
1209
1373
  /// An empty denial log reads as NOBODY HAS EVER BEEN REFUSED HERE, which is the opposite of what
1210
1374
  /// this log exists to record — so "empty" was never an acceptable answer to a caller who simply
1211
1375
  /// lacks the grant. The old trap said so; this says the same thing as data.
1212
- listDenialEntries: (start: nat, limit: nat) -> (Result_10) query;
1376
+ listDenialEntries: (start: nat, limit: nat) -> (Result_15) query;
1213
1377
  /// ⟨2026-10-02⟩ ONE ROW PER ENGAGEMENT, for the deployment's own count of use — DAYS, never
1214
1378
  /// instants, and NEVER the agent's root, enrolled key or invite.
1215
1379
  ///
@@ -1234,7 +1398,7 @@ service : {
1234
1398
  /// and a query cannot write (the reason `listEngrams` is an update). This is the most sensitive of
1235
1399
  /// the three reads — one row per engagement — so who was turned away is worth a record.
1236
1400
  listEngagementRows: (sinceDay: int, start: nat, limit: nat, companyList:
1237
- vec principal) -> (Result_9);
1401
+ vec principal) -> (Result_14);
1238
1402
  /// ⟨0.16.0, L1⟩ THE `authorized : ?Bool` FLAG IS GONE, AND SO IS EVERYTHING BUILT AROUND IT.
1239
1403
  ///
1240
1404
  /// The flag was the most carefully-argued compromise in this canister, and every word of that
@@ -1265,7 +1429,7 @@ service : {
1265
1429
  /// written and correct; what it lacked was the glyph a gate can see. Its case is the one L7's
1266
1430
  /// own text had to be corrected for — the forcing call is not a system API at all, it is
1267
1431
  /// `denied()`, a state write. See `scripts/check-update-for-read.mjs`.
1268
- listEngrams: (offset: nat, limit: nat) -> (Result_8);
1432
+ listEngrams: (offset: nat, limit: nat) -> (Result_13);
1269
1433
  /// ⟨2026-09-28, owner decision: an agent may read its own record⟩ The caller's OWN dispute
1270
1434
  /// statements, oldest first, verbatim. Keyed by `msg.caller`, so it cannot be pointed at anyone
1271
1435
  /// else, and an empty list is a true answer about the caller ("you have appended none"), never a
@@ -1312,10 +1476,10 @@ service : {
1312
1476
  /// that zero applies the SHIPPED DEFAULT — silently reversing every explicit ManualOnly consent
1313
1477
  /// choice in the fleet. That is the consequence this refusal exists to prevent, and it belongs in
1314
1478
  /// the message a caller actually receives.
1315
- listUpdatePrefs: (start: nat, limit: nat) -> (Result_7) query;
1479
+ listUpdatePrefs: (start: nat, limit: nat) -> (Result_12) query;
1316
1480
  /// Mint one-shot reserve invites (invite-issuer or admin). Codes use IC-secure randomness over a
1317
1481
  /// 32-symbol no-ambiguous alphabet (8 chars ≈ 40 bits). Batch-capped; table hard-capped.
1318
- mintReserveInvites: (count: nat) -> (Result_6);
1482
+ mintReserveInvites: (count: nat) -> (Result_11);
1319
1483
  /// The PROBED twin of `getCustodyMode`: same question, asked of the IC rather than of our
1320
1484
  /// records — hence the `probe` verb rather than a second noun.
1321
1485
  ///
@@ -1341,7 +1505,24 @@ service : {
1341
1505
  /// `ic.canister_status`. That is also the whole point of the `probe` verb — the value is read
1342
1506
  /// LIVE from the management canister rather than from a stored transition record, so a query
1343
1507
  /// could not produce it at all, not merely more cheaply.
1344
- probeCustodyMode: () -> (Result_5);
1508
+ probeCustodyMode: () -> (Result_10);
1509
+ /// What YOUR OWN engram's compute is, read by the registry — the one read that works while it is
1510
+ /// frozen.
1511
+ ///
1512
+ /// CALLER: the owner, from the app's status strip, Billing and System pages (ADR-0020).
1513
+ /// ⟨2026-10-26, the owner's ruling 1A: tell the owner, using signals that work while frozen⟩ The
1514
+ /// registry is a controller, and the network answers a controller canister's status call for a
1515
+ /// frozen engram where it refuses the owner's own (IC0207, the stopped-engram study's network read
1516
+ /// §6). UPDATE, not query: it awaits the management canister (the `probe` verb, as
1517
+ /// `probeCustodyMode`).
1518
+ /// ⟨L7⟩ ⟨marker added 2026-10-26, Finish phase; the reason above unchanged⟩ The system call that
1519
+ /// forces the update is `canister_status` on the management canister: a query cannot make an
1520
+ /// inter-canister call, so a query could not read the engram's network status at all — and that
1521
+ /// status is the only signal that still answers while the engram is frozen.
1522
+ /// No rate limit (the do-less): each call costs the registry one management
1523
+ /// call — INFERRED a few million cycles, not measured. `eraseAboutNs` is "about" and never invented:
1524
+ /// null when the network reports no idle burn.
1525
+ probeMyEngramCompute: () -> (Result_9);
1345
1526
  /// ⟨0.16.0⟩ `Ok` CARRIES THE PRINCIPAL DIRECTLY, not a one-field record wrapping it.
1346
1527
  ///
1347
1528
  /// `#Ok : { canisterId : Principal }` was a record with nothing to disambiguate: the success of a
@@ -1368,6 +1549,39 @@ service : {
1368
1549
  invite: opt text;
1369
1550
  walletProof: opt blob;
1370
1551
  }) -> (Result);
1552
+ /// Restart YOUR OWN stopped engram.
1553
+ ///
1554
+ /// CALLER: the owner, from the app's restart sheet (ADR-0020). Afterwards the app runs the engram's
1555
+ /// own `convertEarningsToCycles` as the owner, which pays any loan back FIRST.
1556
+ ///
1557
+ /// ⟨REWRITTEN 2026-10-26, the owner's ruling 2A of that day⟩ What it does, in this order: stops the
1558
+ /// engram; adds compute — the owner's own (already added through `stopMyEngramForRestart` and a
1559
+ /// top-up from their account), or a loan of what it still lacks to run at its OWN setting (at most
1560
+ /// 0.25T, only after the biller confirms the wallet holds enough to repay it); installs the waiting
1561
+ /// security release if the engram is behind one and the owner allows automatic updates (paid as a
1562
+ /// security update — we pay because we do not want security incidents); puts the owner's freezing
1563
+ /// setting back; and only then starts it. It never lowers the setting on a running engram. A step
1564
+ /// that fails never leaves the engram stopped: the registry's sweep finishes it within minutes.
1565
+ ///
1566
+ /// Refused BEFORE anything is stopped, saying why: not your engram; sovereign; a change of owner
1567
+ /// unfinished; restarted in the last 7 days; a loan still owed; an update installing; a restart
1568
+ /// already running; code the registry never published; running (nothing to restart); needing more
1569
+ /// than one loan; a waiting security update that this restart could not cover (it would start old
1570
+ /// code); an engram opened through another engram that would need a loan; the fleet-wide ceiling;
1571
+ /// no biller, or a wallet too low to repay. A restart that lent nothing does not spend the week.
1572
+ /// ⟨CORRECTED 2026-10-26, later — the owner's restart choices 1A and 2A of that day⟩ The list above is
1573
+ /// the record of the build before them. Now: "restarted in the last 7 days" and "a loan still owed"
1574
+ /// refuse ONLY a restart that would LEND (2A: "apply the weekly limit only when we lend") — asked
1575
+ /// once the plan knows the loan, and again after every await before the loan is made
1576
+ /// (`RestartLoan.lendGate`); a restart on the owner's own compute is never refused by them and never
1577
+ /// spends the week, which is taken only in the step that records a loan. "An engram opened through
1578
+ /// another engram that would need a loan" is GONE (1A: "lend to children like any other engram") —
1579
+ /// such an engram is lent to under the same ceiling, wallet check and repay-first as any other: the
1580
+ /// biller reads the engram's OWN wallet by its own id, and the engram's own Convert repays. New: a
1581
+ /// second call while one is still running for the same engram (`restartCallsRunning`), which is
1582
+ /// what now keeps two interleaved calls from both lending or both stopping and starting — the week
1583
+ /// used to double as that guard.
1584
+ restartMyStoppedEngram: () -> (Result_8);
1371
1585
  /// Return to managed: user calls AFTER adding registry back as controller
1372
1586
  returnToManaged: () -> (Result);
1373
1587
  /// Set admin. Authority decision lives in the pure Auth module (unit-tested); this func keeps only
@@ -1419,7 +1633,7 @@ service : {
1419
1633
  /// Flip the reserve gate (admin-only; audit-logged). OFF restores fully-open admission.
1420
1634
  setReserveGateEnabled: (enabled: bool) -> (Result);
1421
1635
  setScreeningDenylist: (list: vec principal) -> (Result);
1422
- setSpawnCeiling: (n: nat) -> (Result_4);
1636
+ setSpawnCeiling: (n: nat) -> (Result_7);
1423
1637
  setTreasuryAnchorId: (p: opt principal) -> (Result);
1424
1638
  /// Set the wallet-canister allowlist for the wallet-rooted exemption (admin-only). Small by
1425
1639
  /// design — these are identity ISSUERS (e.g. Internet Identity), not users.
@@ -1435,9 +1649,19 @@ service : {
1435
1649
  /// bypasses the funding constraint.
1436
1650
  /// Admin dial for the upgrade top-up floor (0 = disabled). Capped at one endowment so the dial
1437
1651
  /// itself cannot turn upgrades into an unbounded drain.
1438
- setUpgradeTopUpFloor: (n: nat) -> (Result_4);
1652
+ setUpgradeTopUpFloor: (n: nat) -> (Result_7);
1439
1653
  /// Root admin assigns the role key (pass null to clear, reverting the role to the root admin).
1440
1654
  setWasmAdmin: (p: opt principal) -> (Result);
1655
+ /// Stop YOUR OWN stopped-or-starving engram so you can add compute from your account and restart it.
1656
+ ///
1657
+ /// CALLER: the owner, from the app's "Add compute from my account" when the engram has stopped and a
1658
+ /// security update is waiting (ADR-0020). ⟨2026-10-26, the owner's ruling 2A⟩ Stops the engram so
1659
+ /// that compute the owner adds next cannot wake its old code; the owner then adds compute through
1660
+ /// the biller's own top-up and calls `restartMyStoppedEngram`, which installs the waiting update and
1661
+ /// starts it. If the owner walks away, the sweep finishes it after 30 minutes: install if covered,
1662
+ /// restore, start. Never left stopped. It lends nothing, so it takes no week; it refuses an engram
1663
+ /// that is not stuck, so a healthy engram is never taken offline (spec question Q15).
1664
+ stopMyEngramForRestart: () -> (Result_6);
1441
1665
  /// An engram witnesses its own audit head. Callable ONLY by a registered engram — msg.caller is
1442
1666
  /// the engram principal, so attribution needs no signature and cannot be forged by a third party.
1443
1667
  ///
@@ -1459,6 +1683,15 @@ service : {
1459
1683
  /// The market already calls it under this name, which is how the rename got its urgency: a
1460
1684
  /// hand-written client IDL type-checks against a method that does not exist.
1461
1685
  sysAnchorHead: (head: blob, total: nat) -> (Result);
1686
+ /// CALLER: an engram, from inside its owner's `convertEarningsToCycles`, once the conversion landed
1687
+ /// (ADR-0020). Attach up to what is owed: the registry accepts no more than the outstanding loan
1688
+ /// (the network returns the rest) and records it. `#NotFound` when nothing is owed (the loan was
1689
+ /// written off, or repaid): the engram then clears its own record.
1690
+ /// ⟨CHANGED 2026-10-26, the owner's ruling 2A⟩ REPAY-ONLY. It no longer puts a freezing setting back
1691
+ /// (the restart restores it before the start) and no longer queues a security push (the restart
1692
+ /// installs it before the start; the wake watcher covers other wakes). The name and reply are
1693
+ /// unchanged, so the engram's hand client still matches.
1694
+ sysCloseRestart: () -> (Result_5);
1462
1695
  /// ⟨2026-09-29, review PR-3: a half-finished change of owner⟩ A SOVEREIGN engram reports that it
1463
1696
  /// moved control of its code to `newOwner`, which ends the change of owner this registry marked
1464
1697
  /// when it moved its record (`ControlHandover.Pending`). Until this arrives the registry refuses the
@@ -1477,7 +1710,7 @@ service : {
1477
1710
  /// Single-engram metering probe — the push-on-payment sizing read. Biller-gated and
1478
1711
  /// cycles-attached like the sweep; same row semantics, one engram, no heartbeat stamp
1479
1712
  /// (a single probe is not a completed round).
1480
- sysMeterEngram: (canisterId: principal) -> (Result_3);
1713
+ sysMeterEngram: (canisterId: principal) -> (Result_4);
1481
1714
  /// ⟨2026-10-02⟩ An engram tells this registry that its owner reset it.
1482
1715
  ///
1483
1716
  /// CALLER: a registered engram, about itself — `canisterToOwner` membership, checked first
@@ -1534,7 +1767,7 @@ service : {
1534
1767
  /// moved record and is refused. A report of the owner the registry already records is a RETRY of
1535
1768
  /// a transfer the engram did not finish, and moves control again (that is the way out `stuck`
1536
1769
  /// names). The rules are in `src/shared/ControlHandover.mo`.
1537
- sysNotifyOwnershipTransfer: (newOwner: principal) -> (Result_2);
1770
+ sysNotifyOwnershipTransfer: (newOwner: principal) -> (Result_3);
1538
1771
  /// ⟨2026-09-28, owner decision: build the full agent track-record design for the launch release⟩
1539
1772
  /// An engram tells this registry that one of its agents started, or ended and WHY.
1540
1773
  ///
@@ -1596,6 +1829,41 @@ service : {
1596
1829
  event: EdgeEvent;
1597
1830
  root: principal;
1598
1831
  }) -> (Result);
1832
+ /// CALLER: an engram, from inside its `sysReturnUpgradeAdvance` (ADR-0020). Attach what is being
1833
+ /// given back of the compute a paid security update advanced it. The registry accepts no more than
1834
+ /// the outstanding advance (the network returns the rest) and writes off whatever was not returned
1835
+ /// — what the install used and what the engram had to keep — never carried as a debt.
1836
+ /// ⟨2026-10-26, the owner's ruling "accounting should be exact"⟩ The write-off here is the exact
1837
+ /// figure advance − accepted, from the ledger entry and the cycles actually accepted, and the audit
1838
+ /// line carries advance, returned and writtenOff.
1839
+ /// ⟨2026-10-26, later — the owner's restart choices 4A and 5A⟩ The engram may have more than one
1840
+ /// advance out (one per release paid; RestartLoan.repayAdvances): the cycles are accepted up to their
1841
+ /// sum and settled OLDEST FIRST, and each advance gets its own audit line naming the release it was
1842
+ /// paid for (`template=`), with its own returned and written-off parts — the lines sum exactly to
1843
+ /// `accepted` and to the write-off. AN ADVANCE ALREADY WRITTEN OFF (the 90-day sweep) IS NOT ON THE
1844
+ /// LEDGER, so nothing sent for it is accepted — the network returns those cycles to the engram — and
1845
+ /// `advanceReturned` never counts a written-off cycle: no double count. When nothing at all is out,
1846
+ /// the reply is `#NotFound` and nothing is accepted (as before).
1847
+ /// ⟨CORRECTED 2026-10-26, later — the fix pass on 4A⟩ NEWEST first, not oldest first: the engram can
1848
+ /// give back only what it holds above its balance before the latest deposit, so the cycles are the
1849
+ /// newest advance's (RestartLoan.repayAdvances says why, and when that reading is wrong).
1850
+ /// ⟨CHANGED 2026-10-26, the owner's review choice 1B: "take back only what we added; anything left
1851
+ /// over goes to the 90-day write-off"⟩ The engram now names THE ADVANCE it is giving back
1852
+ /// (`advanceId`, which the registry handed it in `sysReturnUpgradeAdvance` — the one this install's
1853
+ /// deposit put on the ledger). The registry accepts AT MOST THAT ADVANCE'S AMOUNT, settles THAT
1854
+ /// entry alone (returned + written off = its amount, one `upgrade.advance.returned` line naming its
1855
+ /// release and id) and leaves every other advance of the engram on the ledger, for its own
1856
+ /// give-back or the 90-day write-off. The paragraphs above about "the sum", "settled OLDEST FIRST"
1857
+ /// and "NEWEST first" describe the shape this replaces. An id that is not on the ledger for this
1858
+ /// caller (already settled, written off after 90 days, or never its own) accepts nothing — the
1859
+ /// network returns the attached cycles to the engram — and answers `#NotFound`; when a recorded
1860
+ /// engram attached cycles, an `upgrade.advance.notOut` line in the registry's unchained refusal log
1861
+ /// says so (never the chained audit log: it moves nothing, and any engram can send it). Nothing is
1862
+ /// ever counted twice.
1863
+ /// WHAT WOULD MAKE THIS WRONG: an engram naming an id other than the one it was handed — it can only
1864
+ /// name one of its OWN advances (the caller must match), so the worst it can do is settle its own
1865
+ /// other advance early with cycles that are still the registry's.
1866
+ sysRepayUpgradeAdvance: (a: record {advanceId: nat;}) -> (Result_2);
1599
1867
  /// ⟨2026-09-29, owner ruling follow-up 8⟩ A SOVEREIGN engram could not change its own controllers
1600
1868
  /// after this registry moved its record, and asks for the record back so the transfer does not
1601
1869
  /// complete. Gated like `sysNotifyOwnershipTransfer` (the caller must BE the engram), and only for
@@ -1655,31 +1923,41 @@ service : {
1655
1923
  /// Admin: upgrade one engram to the current template. RESPECTS the owner's update preference —
1656
1924
  /// an engram set to `#ManualOnly` is not moved by this method, which is what makes the preference
1657
1925
  /// meaningful rather than advisory. The owner's own `upgradeMyEngram` is unaffected either way.
1926
+ ///
1927
+ /// ⟨2026-10-25, the owner's ruling of that day⟩ Same funding decision and dip as the owner's pull:
1928
+ /// paid only for a #Security update on a running engram. A push is the registry's own initiative,
1929
+ /// so where the engram cannot hold the install even with its setting lowered, the push is SKIPPED
1930
+ /// with `#Conflict` and not attempted — the owner can still pull it, and the pull is never refused.
1658
1931
  upgradeEngram: (canisterId: principal) -> (Result);
1659
1932
  /// Upgrade YOUR OWN engram to the registry's current template. Self-service — no admin, no
1660
1933
  /// queue, no approval.
1661
1934
  ///
1662
- /// ⚠ THE PULL IS ALWAYS FUNDED, regardless of release class or rent state, and that is a
1663
- /// commitment rather than an implementation detail: `install_code` needs the balance to cover the
1664
- /// install ABOVE the freezing threshold, so the registry lifts the engram over that bar if cycles
1665
- /// are what is stopping it. Refusing an owner their own fix for nonpayment is the ransom the
1666
- /// continuity-rent model forbids, and withholding a security fix would be worse than anything
1667
- /// that model gates. The lift is best-effort: if it fails, the install still runs and returns the
1668
- /// REAL error, so a top-up problem can never masquerade as an upgrade problem or hide one.
1669
- /// ⟨2026-09-28, owner decision: the registry only pays for upgrades of engrams running our
1670
- /// published code⟩ One exception to "always funded": an engram whose installed module is not one
1671
- /// this registry published is not lifted (`fundUpgradeIfNeeded`, audit
1672
- /// `upgrade.topUp.unpublishedCode`). The install is still attempted — the owner is never refused
1673
- /// their fix, only our cycles for it.
1674
- /// ⟨2026-09-29⟩ And when that install then FAILS, the reply says why the registry did not pay and
1675
- /// what the owner can do (`TemplatePolicy.unfundedUpgradeFailure`) — before, the refusal was only
1676
- /// in the registry's own log and the owner saw a bare out-of-cycles error. Same reply type.
1677
- /// ⟨2026-10-01, the owner's ruling of that day (2 A)⟩ A second exception beside the first: an
1678
- /// engram opened through a parent (`parentOf`, written by `sysSpawnChild`) is funded by the
1679
- /// registry never — not at birth, not at an upgrade (`fundUpgradeIfNeeded`, audit
1680
- /// `upgrade.topUp.childEngram`). The install is still attempted; the owner is never refused their
1681
- /// fix, only our cycles for it, and a failed install says so
1682
- /// (`TemplatePolicy.childUnfundedUpgradeFailure`).
1935
+ /// ⟨2026-10-25, the owner's ruling of that day⟩ THE INSTALL IS ALWAYS ATTEMPTED. Refusing an owner
1936
+ /// their own update for nonpayment is the ransom the continuity model forbids, so this method never
1937
+ /// refuses for compute or payment. What the registry PAYS for is narrower: a #Security update on a
1938
+ /// running engram, any size — paid because we do not want security incidents (the owner,
1939
+ /// 2026-10-25). A #Feature update runs on the engram's own compute. Four standing exclusions are
1940
+ /// never paid for: an engram that has stopped (below its running line — it runs nothing, so its old
1941
+ /// code is not exposed while stopped), one opened through a parent (the ruling of 2026-10-01), one
1942
+ /// running a module the registry never published (2026-09-28), and a second deposit for the same
1943
+ /// release.
1944
+ /// ⟨CORRECTED 2026-10-26, the owner's rulings of that day⟩ THREE standing exclusions: an engram
1945
+ /// opened through a parent is now paid for a security update like any other ("including child
1946
+ /// engrams, but not including engrams running unofficial code"), and a #Feature update is never
1947
+ /// paid, rent or no rent ("where rent is paid, feature upgrades are paid by the engram").
1948
+ /// ⟨CORRECTED 2026-10-26, later — the owner's restart choice 3A: "pay whenever the engram is
1949
+ /// missing any security release, whatever the latest release is labelled"⟩ "a #Feature update is
1950
+ /// never paid" now excepts an engram still missing an earlier security release: its install of a
1951
+ /// #Feature template is paid as a security update, because the template carries that fix
1952
+ /// (UpgradeFunding.effectiveClass) — unless the template is itself behind a security release.
1953
+ /// When it helps, the registry lowers the engram's freezing setting to one hour for the
1954
+ /// install and puts the owner's value back after (the dip), so an install needs only ~0.32T above
1955
+ /// an hour's burn rather than the hold above the whole 30-day line.
1956
+ ///
1957
+ /// When the install FAILS after the registry declined to pay, the reply says why and what to do
1958
+ /// (UpgradeFunding.pullFailure): `#Conflict` when the engram needs more compute (the owner's
1959
+ /// action — add compute), `#Unavailable` when the registry could not pay this time (retryable).
1960
+ /// A failure after a paid or unneeded deposit answers `#Unavailable` with the network's reply.
1683
1961
  ///
1684
1962
  /// An engram already on the current template is a silent no-op. A SOVEREIGN engram gets
1685
1963
  /// "registry is no longer a controller" — accurate, because it is no longer ours to install on.