instar 1.3.553 → 1.3.554
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/commands/server.d.ts.map +1 -1
- package/dist/commands/server.js +37 -1
- package/dist/commands/server.js.map +1 -1
- package/dist/config/ConfigDefaults.d.ts.map +1 -1
- package/dist/config/ConfigDefaults.js +18 -0
- package/dist/config/ConfigDefaults.js.map +1 -1
- package/dist/core/types.d.ts +26 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/scheduler/JobLeaseClaimStore.d.ts +105 -0
- package/dist/scheduler/JobLeaseClaimStore.d.ts.map +1 -0
- package/dist/scheduler/JobLeaseClaimStore.js +165 -0
- package/dist/scheduler/JobLeaseClaimStore.js.map +1 -0
- package/dist/scheduler/JobLeaseCutoverGate.d.ts +73 -0
- package/dist/scheduler/JobLeaseCutoverGate.d.ts.map +1 -0
- package/dist/scheduler/JobLeaseCutoverGate.js +66 -0
- package/dist/scheduler/JobLeaseCutoverGate.js.map +1 -0
- package/dist/scheduler/JobScheduler.d.ts +53 -0
- package/dist/scheduler/JobScheduler.d.ts.map +1 -1
- package/dist/scheduler/JobScheduler.js +136 -20
- package/dist/scheduler/JobScheduler.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +3 -3
- package/upgrades/1.3.554.md +79 -0
- package/upgrades/side-effects/ws43-journal-lease-cutover.md +132 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAgCH,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAS3D,OAAO,EAAE,eAAe,EAAiC,MAAM,iCAAiC,CAAC;AAuBjG,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAi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D5E"}
|
package/dist/commands/server.js
CHANGED
|
@@ -12998,6 +12998,42 @@ export async function startServer(options) {
|
|
|
12998
12998
|
});
|
|
12999
12999
|
const poolSelfId = machineHeartbeat?.config?.machineId ??
|
|
13000
13000
|
(poolIdMgr.hasIdentity() ? poolIdMgr.loadIdentity().machineId : null);
|
|
13001
|
+
// WS4.3 journal-lease cutover (MULTI-MACHINE-SEAMLESSNESS-SPEC §WS4.3,
|
|
13002
|
+
// "Cutover discipline"). Wired HERE (not at setRoleGuard) because the
|
|
13003
|
+
// gate needs the machinePoolRegistry — declared after the scheduler is
|
|
13004
|
+
// built. The gate-input is read LIVE at each claim boundary: the flag +
|
|
13005
|
+
// dry-run from config, this machine's lease epoch from the coordinator,
|
|
13006
|
+
// and the pool peers' advertised ws43JournalLease capability from their
|
|
13007
|
+
// last heartbeat (absent = older peer = non-participant → the whole pool
|
|
13008
|
+
// stays on the bus). Single-machine (no peers) is a strict no-op inside
|
|
13009
|
+
// the gate. The cutover guarantees the journal-lease and the legacy bus
|
|
13010
|
+
// broadcast are NEVER both live for a job set (the named migration hazard).
|
|
13011
|
+
if (poolSelfId && scheduler) {
|
|
13012
|
+
const leaseMod = await import('../scheduler/JobLeaseClaimStore.js');
|
|
13013
|
+
const leaseStore = new leaseMod.JobLeaseClaimStore({
|
|
13014
|
+
machineId: poolSelfId,
|
|
13015
|
+
stateDir: config.stateDir,
|
|
13016
|
+
});
|
|
13017
|
+
const registryForCutover = machinePoolRegistry;
|
|
13018
|
+
scheduler.setJournalLeaseCutover(leaseStore, () => ({
|
|
13019
|
+
enabled: config.multiMachine?.seamlessness?.ws43JournalLease === true,
|
|
13020
|
+
dryRun: config.multiMachine?.seamlessness?.ws43JournalLeaseDryRun !== false,
|
|
13021
|
+
epoch: coordinator.getLeaseEpoch(),
|
|
13022
|
+
peers: registryForCutover
|
|
13023
|
+
.getCapacities()
|
|
13024
|
+
.filter((c) => c.machineId !== poolSelfId)
|
|
13025
|
+
.map((c) => ({
|
|
13026
|
+
machineId: c.machineId,
|
|
13027
|
+
online: c.online,
|
|
13028
|
+
ws43JournalLease: c.seamlessnessFlags?.ws43JournalLease === true,
|
|
13029
|
+
})),
|
|
13030
|
+
}), (slug, decision) => {
|
|
13031
|
+
if (decision.reason === 'peers-incoherent' && decision.incoherentPeers.length > 0) {
|
|
13032
|
+
console.log(pc.dim(` [scheduler] WS4.3 cutover withheld for "${slug}" — pool not flag-coherent (peers without ws43JournalLease: ${decision.incoherentPeers.join(', ')}); staying on the legacy bus path.`));
|
|
13033
|
+
}
|
|
13034
|
+
});
|
|
13035
|
+
console.log(pc.dim(' [scheduler] WS4.3 journal-lease cutover wired (engages only when flag on + pool coherent).'));
|
|
13036
|
+
}
|
|
13001
13037
|
if (poolSelfId) {
|
|
13002
13038
|
try {
|
|
13003
13039
|
poolIdMgr.recordSelfHardware(poolSelfId, poolMod.captureHardware());
|
|
@@ -13081,7 +13117,7 @@ export async function startServer(options) {
|
|
|
13081
13117
|
// WS1.1 capability advertisement (spec invariant 5): a bounded
|
|
13082
13118
|
// fixed-size summary, never an inventory. Reported live each
|
|
13083
13119
|
// heartbeat so a queue going dark withdraws the capability.
|
|
13084
|
-
seamlessnessFlags: { ws11DeliverReceive: !!_inboundQueue, ws12DrainReceive: !!_drainRunner, ws44PoolLinks: !!_poolLink, ws44PoolCache: !!_poolPollCache, stateSyncReceive: selfStateSyncReceive() },
|
|
13120
|
+
seamlessnessFlags: { ws11DeliverReceive: !!_inboundQueue, ws12DrainReceive: !!_drainRunner, ws44PoolLinks: !!_poolLink, ws44PoolCache: !!_poolPollCache, ws43JournalLease: config.multiMachine?.seamlessness?.ws43JournalLease === true && config.multiMachine?.seamlessness?.ws43JournalLeaseDryRun !== true, stateSyncReceive: selfStateSyncReceive() },
|
|
13085
13121
|
// Durable Inbound Message Queue §5.1: depth + oldest + tenure +
|
|
13086
13122
|
// bounded top-K — the survivor's loss-SUSPECTED item, capped
|
|
13087
13123
|
// re-placement arm, and supersede-dedupe key all read these.
|