@substrat-run/control-plane-api 0.187.0 → 0.189.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +113 -32
- package/dist/api.js.map +1 -1
- package/dist/cf-observability.d.ts.map +1 -1
- package/dist/cf-observability.js +20 -2
- package/dist/cf-observability.js.map +1 -1
- package/dist/platform-scope-stores.d.ts +6 -1
- package/dist/platform-scope-stores.d.ts.map +1 -1
- package/dist/platform-scope-stores.js +77 -48
- package/dist/platform-scope-stores.js.map +1 -1
- package/dist/store-entry.generated.d.ts +8 -2
- package/dist/store-entry.generated.d.ts.map +1 -1
- package/dist/store-entry.generated.js +11 -5
- package/dist/store-entry.generated.js.map +1 -1
- package/dist/store-move-ends.d.ts +4 -2
- package/dist/store-move-ends.d.ts.map +1 -1
- package/dist/store-move-ends.js +10 -6
- package/dist/store-move-ends.js.map +1 -1
- package/dist/wfp.d.ts.map +1 -1
- package/dist/wfp.js +7 -0
- package/dist/wfp.js.map +1 -1
- package/package.json +9 -9
package/dist/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+C,KAAK,kBAAkB,EAAoB,MAAM,yBAAyB,CAAC;AACjI,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAI9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AAE9G,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,OAAO,EAyBL,KAAK,qBAAqB,EA0F1B,CAAC,EAkBD,KAAK,cAAc,EAEnB,KAAK,uBAAuB,EAG7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAOV,UAAU,EACV,kBAAkB,EAGlB,wBAAwB,EACxB,oBAAoB,E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AO,CAAC,EAAE,OAAO,CAAC;IAClB,2FAA2F;IAC3F,eAAe,CAAC,EAAE,IAAI,CAAC;IACvB,sGAAsG;IACtG,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,uGAAuG;IACvG,gBAAgB,CAAC,EAAE;QAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,QAAQ,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;KAAE,CAAC;IACtF;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AAkHF,wFAAwF;AACxF,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAGxC,uFAAuF;AACvF,eAAO,MAAM,sBAAsB,QAEmC,CAAC;AAqZvE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;iBASzB,CAAC;AAqCH,yFAAyF;AACzF,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAuI7C,eAAO,MAAM,4BAA4B,KAAK,CAAC;AAmC/C,KAAK,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AAqLjE;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAEvF;AAwCD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAAE,SAAS,EAAE,IAAI,CAAA;CAAE,CAAC,CAkpXhG"}
|
package/dist/api.js
CHANGED
|
@@ -7,7 +7,7 @@ import { Hono } from 'hono';
|
|
|
7
7
|
import { permissionKey, parseHostname, withLabel, RESERVED_LABEL_SEPARATOR, adminAction, lakeEventsInput, ownerTransferInput, memberInviteInput, memberRoleInput, ASSET_PART_PREFIX, assetHash, STORE_DRIVERS, storeDriverErasesSubjects, storeDriverServesVertical, storeCatalogOperation, storeDriverBasisAdmits, channelName, connectLinkId, connectionActivity, connectionActivitySource, connectionCredential, connectionCertificate, connectionFilter, connectionHealthState, connectionProvider, connectorDispatchKind, PROVISION_SIBLING_KIND, ARCHIVE_SCOPE_KIND, PROVISION_TENANT_KIND, SET_ENTITLEMENTS_KIND, MODEL_USAGE_KIND, SWEEP_RUNS_KIND, toConnectionHealthEntry, CONNECTION_EXPIRY_WARNING_DAYS, CONNECTION_STALE_DAYS, connectionProbe, connectionSendTest, connectionSendTestResult, connectionSenders, createTenantInput, entitlementGrantInput, hostname as hostnameSchema, hostnameRegion, hostnameStatus, identityLink, errorCode, issueStatus, issueStatusInput, FINDINGS_LIMIT_DEFAULT, FINDINGS_LIMIT_MAX, findingCursorOf, findingKind, findingRuleInput, findingStatus, findingStatusInput, listPageQuery, matchesOutboundHost, pageOf, platformRequestFilter, principalId as principalIdSchema, impersonationStamp, promotionAcknowledgement, bindAcknowledgement, rebindAcknowledgement, provisionableJurisdiction, publishVersionInput, queryScopeInput, readScopeTableInput, entityHistoryInput, eventFacetInput, eventCauseInput, eventEffectsInput, invocationEventsInput, deadLettersInput, lifecycleFlowInput, operationSeriesCount, operationSeriesInput, delegatedReadParams, createOrgInput, roleKey as roleKeySchema, peerSwitch, verticalSlug, scopeText, systemSwitch, DEFAULT_DENIAL_LIMIT, DENIAL_LIMIT_MAX, denialGroupBy, registerVerticalInput, platformScriptCollision, platformScriptRefusal, PLATFORM_SCRIPT_NAMES, serviceDimensions, sweepRunKind, sweepRunOutcome, scopeDump, mergeDumpPages, dataSubjectId as dataSubjectIdSchema, scopeId as scopeIdSchema, scopeStatus, requestRollupReading, meterDaysReading, verticalOwnersReading, utcDay, storageShape, surfaceName, modelUsageLine, tenantId as tenantIdSchema, tenantStatus, versionOrigin, z, PROBLEM_CONTENT_TYPE, toProblem, validationIssuesFrom, redrainEventsInput, importCursorMove, importCursorAcknowledgementMissing, REDRAIN_BATCH, migrationsOnTop, substratError, errorCodeOf, envVarSpec, capabilityFilterQuery, capabilityId as capabilityIdSchema, PLATFORM_FEATURES_HEADER, PLATFORM_FEATURE_SCOPE_SWEEPER, PLATFORM_FEATURE_SOURCE_BUILDS, SOCIAL_RELAY_VERTICALS, isVerticalConnectorProvider, } from '@substrat-run/contracts';
|
|
8
8
|
import { upstreamHandleIn, upstreamReferenceOf, withUpstreamReference } from '@substrat-run/contracts';
|
|
9
9
|
import { ENGINE_ENTITLEMENT_KEYS, bareSlug, declarableEntitlementKey, entitlementNamespaceRefusal, grantableEntitlements } from '@substrat-run/contracts';
|
|
10
|
-
import { SCOPE_COPY_LEASE_MS, copyRestoreFence, publishedMigrationDigest, replayStoreErasures } from '@substrat-run/kernel';
|
|
10
|
+
import { SCOPE_COPY_LEASE_MS, copyRestoreFence, publishedMigrationDigest, replayStoreErasures, storesFencedRefusal } from '@substrat-run/kernel';
|
|
11
11
|
import { attributeFailure } from './failure-attribution.js';
|
|
12
12
|
import { auditedChange, withAuditedOutcomes } from './audited-change.js';
|
|
13
13
|
import { BIND_EXPORT_BREAK_REFUSAL, CARRIED_AWAY_KEY, bindExportBreakRefusal, carriedAwayDump, dumpMetaValue, metaValueIn, crossVerticalHealth, exportBreakRefusal, isBindExportBreakRefusal, isExportBreakRefusal, listedPromoteRefusal, isExportBreakUnjudged, isPrimaryScope, promoteReviewDigest, rebindReviewDigest, assertRebindReviewCurrent, migrationProgress, ulid, auditWarningOf, REQUEST_ROLLUP_LIMIT_DEFAULT, REQUEST_ROLLUP_LIMIT_MAX, STORAGE_HISTORY_LIMIT_MAX, STORAGE_GAUGE_RETENTION_MONTHS, BUILD_USAGE_RETENTION_DAYS, MODEL_USAGE_RETENTION_DAYS, BILLING_ROLLUP_RETENTION_MONTHS, METER_DAYS_LIMIT_DEFAULT, METER_DAYS_LIMIT_MAX, releaseRolesAskScopes, releaseRoleSetRefusal, withheldOpsFailure, } from '@substrat-run/kernel';
|
|
@@ -1011,19 +1011,49 @@ export function createControlPlaneApi(options) {
|
|
|
1011
1011
|
return stores.length > 0 ? { caller, vertical: scope.vertical, stores } : undefined;
|
|
1012
1012
|
};
|
|
1013
1013
|
/**
|
|
1014
|
-
* `substrat.
|
|
1015
|
-
* stores, which can refuse (503), before it unroutes the scope, and
|
|
1014
|
+
* `substrat.fence` on each declared store (D-71), checked now and called later: a reap resolves its
|
|
1015
|
+
* stores, which can refuse (503), before it unroutes the scope, and fences them after (#2285).
|
|
1016
|
+
*
|
|
1017
|
+
* The stores are read again when it is called, once the router has stopped serving the scope. Only a
|
|
1018
|
+
* request routed by hostname carries a store list (a peer dispatch carries none), and a version's
|
|
1019
|
+
* bindings are recorded with its row, so whatever a request still running can name was recorded before
|
|
1020
|
+
* that read. An earlier read could miss a binding a version published in between, and a call to it would
|
|
1021
|
+
* recreate an object nothing fenced.
|
|
1016
1022
|
*/
|
|
1017
|
-
const
|
|
1018
|
-
|
|
1023
|
+
const platformStoresFence = async (c, scope,
|
|
1024
|
+
/** The scope's row outlives this fence, so the directory has to say so first (D-71). A deleted row has nothing to say it on. */
|
|
1025
|
+
row = { outlives: false }) => {
|
|
1026
|
+
await platformStoresOf(c, scope);
|
|
1019
1027
|
return async () => {
|
|
1028
|
+
const reach = await platformStoresOf(c, scope);
|
|
1020
1029
|
if (!reach)
|
|
1021
1030
|
return;
|
|
1022
|
-
|
|
1031
|
+
if (row.outlives) {
|
|
1032
|
+
await c.var.admin.markScopeStoresFenced(c.get('actor'), scope.tenantId, scope.id, row.whileTenantDeleting ? { whileTenantDeleting: true } : {});
|
|
1033
|
+
}
|
|
1034
|
+
await reach.caller.fenceStores({ tenantId: scope.tenantId, scopeId: scope.id, vertical: reach.vertical, stores: reach.stores });
|
|
1023
1035
|
};
|
|
1024
1036
|
};
|
|
1025
|
-
/**
|
|
1026
|
-
|
|
1037
|
+
/**
|
|
1038
|
+
* D-71: a reap began fencing this scope's stores. Nothing is restored into it, and nothing reads them
|
|
1039
|
+
* for a copy: a fenced store answers a read with what the wipe left, so a backup, a fork or a pull of
|
|
1040
|
+
* it would hold the stores empty and look whole.
|
|
1041
|
+
*/
|
|
1042
|
+
const refuseStoresFenced = async (c, scope) => (await c.var.admin.scopeStoresFencedAt(c.get('actor'), scope.tenantId, scope.id)) === null
|
|
1043
|
+
? undefined
|
|
1044
|
+
: new ControlPlaneError(409, storesFencedRefusal(scope.id));
|
|
1045
|
+
/**
|
|
1046
|
+
* A reap asked again on a scope an earlier try of it marked: a backup now would hold its stores
|
|
1047
|
+
* wiped, and would stand as the reap's recorded copy in place of the one taken before the mark.
|
|
1048
|
+
*/
|
|
1049
|
+
const refuseBackupOfFenced = async (c, scope) => {
|
|
1050
|
+
const at = await c.var.admin.scopeStoresFencedAt(c.get('actor'), scope.tenantId, scope.id);
|
|
1051
|
+
return at === null
|
|
1052
|
+
? undefined
|
|
1053
|
+
: new ControlPlaneError(409, `scope ${scope.id} had its stores fenced at ${at} by an earlier try of this reap, so a backup now would hold them wiped. ` +
|
|
1054
|
+
`The backup that try took, if it took one, is listed under GET /tenants/${scope.tenantId}/scopes/${scope.id}/backups. ` +
|
|
1055
|
+
'Finish the reap with backup=false.');
|
|
1056
|
+
};
|
|
1027
1057
|
/**
|
|
1028
1058
|
* The stores a backup, a full pull or a fork copies: those the scope's running version declares.
|
|
1029
1059
|
*
|
|
@@ -1041,6 +1071,9 @@ export function createControlPlaneApi(options) {
|
|
|
1041
1071
|
const { running, all } = await scopeStoreReachOf(c.var.admin, c.get('actor'), scope, options.storeDrivers);
|
|
1042
1072
|
if (all.length === 0)
|
|
1043
1073
|
return undefined;
|
|
1074
|
+
const fenced = await refuseStoresFenced(c, scope);
|
|
1075
|
+
if (fenced)
|
|
1076
|
+
throw fenced;
|
|
1044
1077
|
const place = { tenantId: scope.tenantId, scopeId: scope.id, vertical: scope.vertical };
|
|
1045
1078
|
const current = new Set(running.map((store) => store.binding));
|
|
1046
1079
|
for (const dropped of all.filter((store) => !current.has(store.binding))) {
|
|
@@ -1753,9 +1786,15 @@ export function createControlPlaneApi(options) {
|
|
|
1753
1786
|
// Art. 17 erasure — silently writing that customer's data to a bucket the reap
|
|
1754
1787
|
// does not clear would defeat the request it was made to satisfy. Staff who are
|
|
1755
1788
|
// retiring (not erasing) a tenant pass `backup: true` deliberately.
|
|
1756
|
-
|
|
1789
|
+
// `backup` is one flag for the whole tenant, so a scope an earlier try already marked takes no
|
|
1790
|
+
// new backup (its stores may be wiped; that try's copy, if any, is in the listing) and the
|
|
1791
|
+
// scopes after it are still backed up (D-71).
|
|
1792
|
+
const marked = wantsBackup === true && (await c.var.admin.scopeStoresFencedAt(actor, tenantId, scope.id)) !== null;
|
|
1793
|
+
const backup = wantsBackup === true && !marked ? await backupScope(c, tenantId, scope) : null;
|
|
1757
1794
|
const vertical = await verticalForScope(c, scope);
|
|
1758
|
-
|
|
1795
|
+
// Archived above, so the router no longer serves it (`READ_ROUTE_SQL` wants an active scope of
|
|
1796
|
+
// an active tenant), and reapScope below releases its names.
|
|
1797
|
+
await (await platformStoresFence(c, scope, { outlives: true, whileTenantDeleting: true }))();
|
|
1759
1798
|
if (vertical)
|
|
1760
1799
|
await vertical.deleteScope({ tenantId, scopeId: scope.id });
|
|
1761
1800
|
// Tenant teardown reaps every scope and releases every name by design — force past
|
|
@@ -2674,18 +2713,38 @@ export function createControlPlaneApi(options) {
|
|
|
2674
2713
|
if (changeRefused)
|
|
2675
2714
|
return refuseStatus(c, 409, changeRefused);
|
|
2676
2715
|
const operationId = ulid();
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2716
|
+
// A failure here answers a sentence and a reference, never the generic 500: what threw goes to
|
|
2717
|
+
// the log line and staff's ops-failure row (`withheldFailure`), and back to a staff caller. A
|
|
2718
|
+
// refusal that declared its code still renders as itself.
|
|
2719
|
+
const failed = (stage, status, err, sentence) => {
|
|
2720
|
+
const withheld = withheldFailure(c, { operation: 'connection.bind', stage, tenantId: row.tenantId, scopeId, vertical: row.vertical, status, message: messageOfThrow(err) }, err, sentence);
|
|
2721
|
+
c.set('failureRecorded', true);
|
|
2722
|
+
return refuseStatus(c, status, withheld.detail ? `${sentence(withheld.reference)}: ${withheld.detail}` : sentence(withheld.reference), { reference: withheld.reference });
|
|
2723
|
+
};
|
|
2724
|
+
let done;
|
|
2725
|
+
try {
|
|
2726
|
+
done = await auditedChange({
|
|
2727
|
+
flow: 'connection-binding', operationId,
|
|
2728
|
+
run: () => bind(c.var.host, row, { ...input, tenantId: row.tenantId, scopeId, vertical: target.vertical }),
|
|
2729
|
+
refused: () => false,
|
|
2730
|
+
record: (phase) => c.var.admin.recordConnectionBindingChange(c.get('actor'), {
|
|
2731
|
+
tenantId: row.tenantId, scopeId, connectionId: row.id, provider: row.provider,
|
|
2732
|
+
...input,
|
|
2733
|
+
operationId, ...(phase.phase === 'applied' ? { phase: 'applied' } : phase),
|
|
2734
|
+
}),
|
|
2735
|
+
});
|
|
2736
|
+
}
|
|
2737
|
+
catch (err) {
|
|
2738
|
+
// Only the intent row is written outside `run`: nothing was bound.
|
|
2739
|
+
if (errorCodeOf(err) !== undefined)
|
|
2740
|
+
throw err;
|
|
2741
|
+
return failed('audit-intent', 500, err, (reference) => `nothing was bound: the binding's audit record could not be written (reference ${reference})`);
|
|
2742
|
+
}
|
|
2743
|
+
if ('error' in done) {
|
|
2744
|
+
if (errorCodeOf(done.error) !== undefined || done.error instanceof ControlPlaneError)
|
|
2745
|
+
throw done.error;
|
|
2746
|
+
return failed('connector', 502, done.error, (reference) => `the ${row.provider} connector could not bind scope ${scopeId} (reference ${reference})`);
|
|
2747
|
+
}
|
|
2689
2748
|
return c.json({ ...done.result, permissionHeld: true, ...('unrecorded' in done ? { auditWarning: done.unrecorded } : {}) });
|
|
2690
2749
|
});
|
|
2691
2750
|
/**
|
|
@@ -5255,6 +5314,9 @@ export function createControlPlaneApi(options) {
|
|
|
5255
5314
|
// #2207: the stores are resolved before anything is written, so one that cannot be named
|
|
5256
5315
|
// refuses the snapshot rather than leave a fork row behind.
|
|
5257
5316
|
const reach = await platformStoresOf(c, scope);
|
|
5317
|
+
const fenced = reach && await refuseStoresFenced(c, scope);
|
|
5318
|
+
if (fenced)
|
|
5319
|
+
throw fenced;
|
|
5258
5320
|
// Directory row FIRST, as `provisioning` (K-31's two-phase shape, used as
|
|
5259
5321
|
// intended): a crash between the row and the data copy leaves an inert
|
|
5260
5322
|
// provisioning row — which, carrying provenance and an expiry, the GC sweep
|
|
@@ -5386,7 +5448,7 @@ export function createControlPlaneApi(options) {
|
|
|
5386
5448
|
* it was before the ledger. Without per-script resolution there is only that deployment, and
|
|
5387
5449
|
* a ledgered copy the platform cannot reach refuses the reap.
|
|
5388
5450
|
*/
|
|
5389
|
-
const reapScopeStorage = async (c, scope) => {
|
|
5451
|
+
const reapScopeStorage = async (c, scope, row = { outlives: false }) => {
|
|
5390
5452
|
const actor = c.get('actor');
|
|
5391
5453
|
const dispatch = options.resolveVerticalRef;
|
|
5392
5454
|
// #2285: every refusal that can be decided up front comes before anything is destroyed, the
|
|
@@ -5395,9 +5457,10 @@ export function createControlPlaneApi(options) {
|
|
|
5395
5457
|
await claimScopeScriptReap({ admin: c.var.admin, actor }, scope.tenantId, scope.id);
|
|
5396
5458
|
else
|
|
5397
5459
|
await assertNoUnreachableScopeCopies(c.var.admin, actor, scope.tenantId, scope.id);
|
|
5398
|
-
const
|
|
5399
|
-
// Stop routing
|
|
5400
|
-
//
|
|
5460
|
+
const fenceStores = await platformStoresFence(c, scope, row);
|
|
5461
|
+
// Stop routing first: that is the fast path, which ends new requests. A call already past the
|
|
5462
|
+
// router, or signed and still on its way, is what the fence below is for (D-71). It would
|
|
5463
|
+
// otherwise recreate the store object after the wipe, and nothing left could reach it.
|
|
5401
5464
|
await unrouteScope(c.var.admin, actor, scope);
|
|
5402
5465
|
// A preview fork reaped through this door (the console's Prune/Retire, the dashboard's
|
|
5403
5466
|
// Retire) holds sign-in clients and an MCP registration at its team's auth servers (#1704):
|
|
@@ -5405,7 +5468,7 @@ export function createControlPlaneApi(options) {
|
|
|
5405
5468
|
await retireClientsOfReapedScope(previewAuthDeps(c), scope);
|
|
5406
5469
|
// #2207: the stores first, on every path below: a routed scope's copies are reaped through
|
|
5407
5470
|
// their scripts, and a store is per scope, not per script.
|
|
5408
|
-
await
|
|
5471
|
+
await fenceStores();
|
|
5409
5472
|
// The deployment the scope's vertical resolves to, deleted through; a 501 there is recorded
|
|
5410
5473
|
// as stranded storage, as `reapScopeScriptCopies` records its own.
|
|
5411
5474
|
const viaDeployment = async () => {
|
|
@@ -5573,14 +5636,23 @@ export function createControlPlaneApi(options) {
|
|
|
5573
5636
|
const held = await options.scopeBackups.get({ tenantId, scopeId, capturedAt });
|
|
5574
5637
|
if (!held)
|
|
5575
5638
|
return refuse(c, 'not_found', `no backup for scope ${scopeId} at ${capturedAt}`);
|
|
5639
|
+
// Such a backup restores only into its own scope (D-69). One whose scope is reaped or fenced takes
|
|
5640
|
+
// none, so the answer says that rather than name a restore that refuses (D-71).
|
|
5641
|
+
const restoreOnly = async (what) => {
|
|
5642
|
+
const closed = scope.status === 'reaped' || (await c.var.admin.scopeStoresFencedAt(c.get('actor'), tenantId, scopeId)) !== null;
|
|
5643
|
+
return refuseStatus(c, 413, closed
|
|
5644
|
+
? `backup ${capturedAt} of scope ${scopeId} ${what}, which only a restore into scope ${scopeId} applies, and that scope ` +
|
|
5645
|
+
'is reaped or has its stores fenced. A backup like this cannot be restored into another scope yet.'
|
|
5646
|
+
: `backup ${capturedAt} of scope ${scopeId} ${what}, which only a restore applies; restore it with POST /tenants/${tenantId}/scopes/${scopeId}/backups/${capturedAt}/restore`);
|
|
5647
|
+
};
|
|
5576
5648
|
if (held.entries > 1) {
|
|
5577
|
-
return
|
|
5649
|
+
return restoreOnly(`is stored in ${held.entries} entries (its pages, and any writes caught while it was taken)`);
|
|
5578
5650
|
}
|
|
5579
5651
|
// A store held in one page is served inline, as `stores` always was; one held in more is a
|
|
5580
5652
|
// restore's to apply (D-69), so the backup is refused whole rather than handed back in part.
|
|
5581
5653
|
const paged = held.storeEntries.find((store) => store.entries > 1);
|
|
5582
5654
|
if (paged) {
|
|
5583
|
-
return
|
|
5655
|
+
return restoreOnly(`holds scope store '${paged.binding}' in ${paged.entries} pages`);
|
|
5584
5656
|
}
|
|
5585
5657
|
const pagedStores = [];
|
|
5586
5658
|
for (const store of held.storeEntries) {
|
|
@@ -6188,6 +6260,9 @@ export function createControlPlaneApi(options) {
|
|
|
6188
6260
|
// would read as "the reap broke" when the scope is in fact untouched (#321's lesson).
|
|
6189
6261
|
let backup = null;
|
|
6190
6262
|
if (!(wantsBackup === false || (wantsBackup === undefined && !options.scopeBackups))) {
|
|
6263
|
+
const fenced = await refuseBackupOfFenced(c, scope);
|
|
6264
|
+
if (fenced)
|
|
6265
|
+
return relayRefusal(c, fenced);
|
|
6191
6266
|
try {
|
|
6192
6267
|
backup = await backupScope(c, tenantId, scope);
|
|
6193
6268
|
}
|
|
@@ -6202,7 +6277,7 @@ export function createControlPlaneApi(options) {
|
|
|
6202
6277
|
try {
|
|
6203
6278
|
// By this point the backup contract has resolved (a copy landed, or the caller
|
|
6204
6279
|
// explicitly declined one), so stranding is a bookkeeping fact, not data loss.
|
|
6205
|
-
const storageStranded = await reapScopeStorage(c, scope);
|
|
6280
|
+
const storageStranded = await reapScopeStorage(c, scope, { outlives: true });
|
|
6206
6281
|
await c.var.admin.reapScope(actor, tenantId, scopeId, {
|
|
6207
6282
|
...(backup ? { backupRef: backupRefOf(backup) } : {}),
|
|
6208
6283
|
});
|
|
@@ -6409,6 +6484,9 @@ export function createControlPlaneApi(options) {
|
|
|
6409
6484
|
const scope = await c.var.admin.getScopeRecord(actor, tenantId, scopeId);
|
|
6410
6485
|
if (!scope)
|
|
6411
6486
|
return refuse(c, 'not_found', `unknown scope for tenant: (${tenantId}, ${scopeId})`);
|
|
6487
|
+
const fenced = await refuseStoresFenced(c, scope);
|
|
6488
|
+
if (fenced)
|
|
6489
|
+
return relayRefusal(c, fenced);
|
|
6412
6490
|
const raw = await c.req.json();
|
|
6413
6491
|
const dump = scopeDump.parse(raw);
|
|
6414
6492
|
// #1869: where the uploaded file says it came from, when the caller had to set the dump's
|
|
@@ -6464,6 +6542,9 @@ export function createControlPlaneApi(options) {
|
|
|
6464
6542
|
const scope = await c.var.admin.getScopeRecord(c.get('actor'), tenantId, scopeId);
|
|
6465
6543
|
if (!scope)
|
|
6466
6544
|
return refuse(c, 'not_found', `unknown scope for tenant: (${tenantId}, ${scopeId})`);
|
|
6545
|
+
const fenced = await refuseStoresFenced(c, scope);
|
|
6546
|
+
if (fenced)
|
|
6547
|
+
return relayRefusal(c, fenced);
|
|
6467
6548
|
const held = await store.get({ tenantId, scopeId, capturedAt });
|
|
6468
6549
|
if (!held)
|
|
6469
6550
|
return refuse(c, 'not_found', `no backup for scope ${scopeId} at ${capturedAt}`);
|
|
@@ -10064,7 +10145,7 @@ export function createControlPlaneApi(options) {
|
|
|
10064
10145
|
await claimScopeScriptReap({ admin: c.var.admin, actor }, preview.tenantId, preview.id);
|
|
10065
10146
|
else
|
|
10066
10147
|
await assertNoUnreachableScopeCopies(c.var.admin, actor, preview.tenantId, preview.id);
|
|
10067
|
-
const
|
|
10148
|
+
const fenceStores = await platformStoresFence(c, preview);
|
|
10068
10149
|
// A preview is still routed until its row goes: unroute before the wipe.
|
|
10069
10150
|
await unrouteScope(c.var.admin, actor, preview);
|
|
10070
10151
|
// A fork's own sign-in clients and MCP registration go once nothing routes to it, and before
|
|
@@ -10073,7 +10154,7 @@ export function createControlPlaneApi(options) {
|
|
|
10073
10154
|
// the retry a PR-close job makes still finds it — after the row is gone, nothing would name
|
|
10074
10155
|
// those clients again. A clean room never had one.
|
|
10075
10156
|
await retireClientsOfReapedScope(previewAuthDeps(c), preview);
|
|
10076
|
-
await
|
|
10157
|
+
await fenceStores();
|
|
10077
10158
|
let storageStranded = false;
|
|
10078
10159
|
if (dispatch) {
|
|
10079
10160
|
({ storageStranded } = await drainScopeScriptCopies({ admin: c.var.admin, actor, resolveRef: dispatch }, preview.tenantId, preview.id));
|