-
Notifications
You must be signed in to change notification settings - Fork 1
Every remote launch carries a wall-clock cap (#GPU-plane anti-hang) #420
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,6 +26,34 @@ async function collect(events: AsyncIterable<RunEvent>): Promise<RunEvent[]> { | |
| return out; | ||
| } | ||
|
|
||
| describe("RemoteExecutor.submit — the wall-clock cap is NEVER optional (GPU-plane anti-hang)", () => { | ||
| // 2026-08-18 architecture pass: launch.ts constructed RemoteExecutor() bare, | ||
| // so max_wallclock was NEVER sent — an uncapped cloud run on a bundle with | ||
| // no cooperative stop bills until the heat death of the instance. The cap | ||
| // is now always in the payload: explicit > env > generous default. | ||
| it("always sends max_wallclock — the generous default when nothing sets it", async () => { | ||
| await withCloud(async (fake) => { | ||
| await ex(fake).submit(fakeJulia(tmpRoot(), "solve.jl", "// julia body"), { runsRoot: join(tmpRoot(), "runs") }); | ||
| expect(fake.submits[0].body.max_wallclock).toBe(7200); | ||
| }); | ||
|
Comment on lines
+34
to
+38
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Scope and restore The default test assumes that the variable is absent, but it does not clear an inherited value. The override test deletes the variable instead of restoring its previous value. CI or developer-shell state can make the test nondeterministic and can affect later tests. Snapshot the previous value, clear it around the default assertion, and restore it in Also applies to: 45-52 🤖 Prompt for AI Agents |
||
| }); | ||
| it("an explicit cap rides the payload verbatim; env override beats the default", async () => { | ||
| await withCloud(async (fake) => { | ||
| await ex(fake, { maxWallclock: 300 }).submit(fakeJulia(tmpRoot(), "solve.jl", "// julia body"), { runsRoot: join(tmpRoot(), "runs") }); | ||
| expect(fake.submits[0].body.max_wallclock).toBe(300); | ||
| }); | ||
| await withCloud(async (fake) => { | ||
| process.env.AMICODE_REMOTE_MAX_WALLCLOCK_S = "1200"; | ||
| try { | ||
| await ex(fake).submit(fakeJulia(tmpRoot(), "solve.jl", "// julia body"), { runsRoot: join(tmpRoot(), "runs") }); | ||
| expect(fake.submits[0].body.max_wallclock).toBe(1200); | ||
| } finally { | ||
| delete process.env.AMICODE_REMOTE_MAX_WALLCLOCK_S; | ||
| } | ||
| }); | ||
| }); | ||
| }); | ||
|
|
||
| describe("RemoteExecutor.submit — Δ2 wire shape + local mirror", () => { | ||
| it("POSTs script CONTENT + filename with the Bearer credential; 202 → conforming mirror run dir", async () => { | ||
| await withCloud(async (fake) => { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: harmoniqs/amicode
Length of output: 38522
🏁 Script executed:
Repository: harmoniqs/amicode
Length of output: 30048
Validate
opts.maxWallclockbefore applying precedence.NaN,Infinity, zero, and negative explicit values bypass validation and reachpayload.max_wallclock; non-finite values serialize asnull. Reject invalid explicit values and add tests. Preserve explicit, environment, then default precedence.🤖 Prompt for AI Agents