@gajae-code/coding-agent 0.16.6 → 0.16.7-nightly.20260907153739.34332369022.gf6b7c475d24f
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/CHANGELOG.md +3 -0
- package/package.json +7 -7
- package/src/exec/isolated-shell.ts +19 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
|
+
### Fixed
|
|
5
|
+
|
|
6
|
+
- A failing `gjc --smoke-test` no longer leaves its isolated-shell worker behind. The readiness bail-out ran a `finally` that only removed marker files, so the probe shell stayed alive and its abandoned run went unobserved; the wider readiness/run deadlines made that window long. Teardown now aborts the probe, retires the worker, and observes the run on every exit path — graceful close alone would have waited out the command’s own sleep.
|
|
4
7
|
|
|
5
8
|
## [0.16.6] - 2026-09-07
|
|
6
9
|
### Fixed
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@gajae-code/coding-agent",
|
|
4
|
-
"version": "0.16.
|
|
4
|
+
"version": "0.16.7-nightly.20260907153739.34332369022.gf6b7c475d24f",
|
|
5
5
|
"description": "Gajae Code CLI with read, bash, edit, write tools and session management",
|
|
6
6
|
"homepage": "https://gajae-code.com",
|
|
7
7
|
"author": "Yeachan-Heo and Gajae Code Contributors",
|
|
@@ -56,12 +56,12 @@
|
|
|
56
56
|
"@agentclientprotocol/sdk": "1.3.0",
|
|
57
57
|
"@babel/parser": "^7.29.3",
|
|
58
58
|
"@mozilla/readability": "^0.6.0",
|
|
59
|
-
"@gajae-code/stats": "0.16.
|
|
60
|
-
"@gajae-code/agent-core": "0.16.
|
|
61
|
-
"@gajae-code/ai": "0.16.
|
|
62
|
-
"@gajae-code/natives": "0.16.
|
|
63
|
-
"@gajae-code/tui": "0.16.
|
|
64
|
-
"@gajae-code/utils": "0.16.
|
|
59
|
+
"@gajae-code/stats": "0.16.7-nightly.20260907153739.34332369022.gf6b7c475d24f",
|
|
60
|
+
"@gajae-code/agent-core": "0.16.7-nightly.20260907153739.34332369022.gf6b7c475d24f",
|
|
61
|
+
"@gajae-code/ai": "0.16.7-nightly.20260907153739.34332369022.gf6b7c475d24f",
|
|
62
|
+
"@gajae-code/natives": "0.16.7-nightly.20260907153739.34332369022.gf6b7c475d24f",
|
|
63
|
+
"@gajae-code/tui": "0.16.7-nightly.20260907153739.34332369022.gf6b7c475d24f",
|
|
64
|
+
"@gajae-code/utils": "0.16.7-nightly.20260907153739.34332369022.gf6b7c475d24f",
|
|
65
65
|
"@puppeteer/browsers": "^2.13.0",
|
|
66
66
|
"@types/turndown": "5.0.6",
|
|
67
67
|
"@xterm/headless": "^6.0.0",
|
|
@@ -329,8 +329,14 @@ export async function smokeTestIsolatedShell(): Promise<void> {
|
|
|
329
329
|
const quotedRuntimePidFile = `'${runtimePidFile.replaceAll("'", "'\\''")}'`;
|
|
330
330
|
let descendantPid: number | undefined;
|
|
331
331
|
let runtimePid: number | undefined;
|
|
332
|
+
// Declared outside the try so the `finally` can retire the worker and settle
|
|
333
|
+
// the started run on EVERY exit path. A readiness failure used to escape with
|
|
334
|
+
// only the marker files removed, leaving the persistent worker alive and the
|
|
335
|
+
// run's rejection unobserved — and the deadlines below make that window long.
|
|
336
|
+
let signalled: IsolatedShell | undefined;
|
|
337
|
+
let runPromise: Promise<IsolatedShellRunResult> | undefined;
|
|
332
338
|
try {
|
|
333
|
-
|
|
339
|
+
signalled = new IsolatedShell();
|
|
334
340
|
// The descendant marker is written with content: the in-shell wait loop
|
|
335
341
|
// below tests `-s` (non-empty), so an empty marker would never satisfy it
|
|
336
342
|
// and the command would always burn its whole timeout instead of parking
|
|
@@ -338,7 +344,7 @@ export async function smokeTestIsolatedShell(): Promise<void> {
|
|
|
338
344
|
// release smoke check on cold hosts (a first-boot Intel macOS runner
|
|
339
345
|
// needed longer than 5s just to start the worker/supervisor/runtime
|
|
340
346
|
// chain) — the smoke still kills the runtime long before it elapses.
|
|
341
|
-
|
|
347
|
+
runPromise = signalled.run({
|
|
342
348
|
command: `echo $$ > ${quotedRuntimePidFile}; /bin/sh -c 'trap "" TERM; echo $$ > "$1"; echo ready > "$2"; sleep 5' sh ${quotedPidFile} ${quotedReadyFile} & while [ ! -s ${quotedReadyFile} ]; do sleep 0.01; done; sleep 30`,
|
|
343
349
|
timeoutMs: 60_000,
|
|
344
350
|
});
|
|
@@ -373,6 +379,17 @@ export async function smokeTestIsolatedShell(): Promise<void> {
|
|
|
373
379
|
}
|
|
374
380
|
if (!descendantGone) throw new Error(`isolated shell smoke left descendant ${descendantPid} alive`);
|
|
375
381
|
} finally {
|
|
382
|
+
// Observe the run BEFORE touching the worker: retiring it settles
|
|
383
|
+
// whatever is pending, and a handler attached afterwards would let that
|
|
384
|
+
// rejection surface unhandled and mask the real smoke error.
|
|
385
|
+
const settled = runPromise?.catch(() => {});
|
|
386
|
+
// `close()` alone is graceful — it waits for the worker to finish the
|
|
387
|
+
// command, which on the failure path still has its `sleep` ahead of it.
|
|
388
|
+
// Abort first so an abandoned probe is cut immediately, then retire the
|
|
389
|
+
// worker so nothing outlives this function on any exit path.
|
|
390
|
+
await signalled?.abort().catch(() => {});
|
|
391
|
+
await signalled?.close().catch(() => {});
|
|
392
|
+
await settled;
|
|
376
393
|
await Promise.all([
|
|
377
394
|
fs.rm(pidFile, { force: true }),
|
|
378
395
|
fs.rm(readyFile, { force: true }),
|