Skip to content

Commit 248aa91

Browse files
jim-tothclaude
andcommitted
Defer the spawn's forced first compute until the deployed PID is routable
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 0cfe8bd commit 248aa91

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

ao/scripts/deploy.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,16 @@ const ao = createAoClient({
445445
{ name: 'app-name', value: 'anyone-protocol' },
446446
{ name: 'name', value: `${contract}-${Date.now()}` },
447447
],
448+
// 🚨 DEFER the forced first compute. `spawnProcess` normally drives slot 0 by reading
449+
// `now/at-slot`, and on a gated node that read is the SAME one the publish-then-verify
450+
// ordering below exists to work around: unsigned, and free only for pids already in
451+
// `p4-non-chargable-routes`. Leaving it on means the spawn fails before the Consul key is
452+
// ever written — "spawned … but it never computed after 30 attempts (400: Node will not
453+
// service this request)" — which is exactly what happened on stage 2026-08-31.
454+
//
455+
// Nothing is lost by deferring: `materialize()` below calls forceFirstCompute itself, and it
456+
// runs after the route exists. Slot 0 is still driven before any view is read.
457+
verify: false,
448458
})
449459
console.log(`process id ${processId} (slot ${slot})`)
450460

0 commit comments

Comments
 (0)