diff --git a/CHANGELOG.md b/CHANGELOG.md index 0387ea8e..00d6ff3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,13 @@ Every PR that bumps `package.json` moves its entries from **Unreleased** into a new version heading in the same commit. ## [Unreleased] + +## [0.461.1] - 2026-10-13 +### Fixed +- **`drift-nudge-test` no longer fails the deploy gate on a loaded box.** It waited a flat 150ms for the + background drift judge, which makes three HTTP round trips to its stub. On a 2 GB droplet at load ~22 + that lost the race on every `make-live` run, while the same test passed when run alone. It now awaits the + judge's real promises. ### Docs - `docs/code-graph-plan.md` — parked research on a code-graph for coding agents (fleet exploration share, tool landscape, evidence, and the A/B to run), plus `scripts/code-exploration-share.mjs`, the diff --git a/package-lock.json b/package-lock.json index 39da1b00..1636c444 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "agent-os", - "version": "0.461.0", + "version": "0.461.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "agent-os", - "version": "0.461.0", + "version": "0.461.1", "license": "MIT", "bin": { "agent-os": "bin/agent-os" diff --git a/package.json b/package.json index bab65f38..68609e73 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "agent-os", - "version": "0.461.0", + "version": "0.461.1", "description": "A generic, governed operating system for running autonomous agents safely across brands. Ships with a local web console.", "license": "MIT", "type": "commonjs", diff --git a/scripts/drift-nudge-test.cjs b/scripts/drift-nudge-test.cjs index 1e621e60..1e824b0c 100644 --- a/scripts/drift-nudge-test.cjs +++ b/scripts/drift-nudge-test.cjs @@ -209,7 +209,20 @@ for (const t of ['drift.judged', 'drift.judge_failed', 'drift.nudged', 'drift.es { kind: 'activity', tool: 'Bash', label: 'Ran a command', detail: 'cat .github/workflows/ci.yml', status: 'ok', ts: 2 }, { kind: 'assistant', text: 'The CI cache key looks wrong, let me rework the whole cache layer.', ts: 3 }, ] }); - const settle = () => new Promise((r) => setTimeout(r, 150)); + // Wait for the judgements the gate fired in the background — the REAL promises, not a guessed sleep. + // It used to be a flat 150ms, which three stub round-trips lose on a loaded box (a 2 GB droplet at load + // ~22 failed the deploy gate on every run while the same test passed alone). + const inFlight = new Set(); + const runJudge = tm.runDriftJudge.bind(tm); + tm.runDriftJudge = (...a) => { + const p = Promise.resolve(runJudge(...a)).finally(() => inFlight.delete(p)); + inFlight.add(p); + return p; + }; + const settle = async () => { + await new Promise((r) => setTimeout(r, 10)); + while (inFlight.size) await Promise.allSettled([...inFlight]); + }; let cmdSeq = 0; const bash = (sid, agent, n) => { const out = [];