Skip to content

Commit 9420de5

Browse files
nawi-25claude
andcommitted
fix(tail): resolve before destroy on timeout; move breaking change to Changed
- Swap resolve()/req.destroy() order in the timeout handler so the promise settles as ETIMEDOUT before destroy() is called; update the comment to accurately describe this ordering rather than the reverse - Move the --clear breaking change entry into ### Changed per Keep-a-Changelog convention (was a floating ### Breaking Changes block) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 35186f8 commit 9420de5

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
1919
- **Shadow Git Snapshots (Phase 2):** (Coming Soon) Automatic lightweight git commits before AI edits, allowing `node9 undo`.
2020
- **`flightRecorder` setting:** New `settings.flightRecorder` flag (default `true`) controls whether the daemon records tool call activity to the flight recorder ring buffer. Can be set to `false` to disable activity recording when the browser dashboard is not in use.
2121

22-
### Breaking Changes
23-
24-
- **`node9 tail --clear` no longer streams after clearing:** Previously `--clear` wiped the ring buffer and then continued tailing live events — visually identical to plain `node9 tail`. It now clears the buffer and exits immediately. To start fresh and watch, chain the commands: `node9 tail --clear && node9 tail --history`. Scripts relying on the old streaming-after-clear behaviour must be updated.
25-
2622
### Changed
2723

24+
- **`node9 tail --clear` no longer streams after clearing** ⚠️ **Breaking:** Previously `--clear` wiped the ring buffer and then continued tailing live events — visually identical to plain `node9 tail`. It now clears the buffer and exits immediately. To start fresh and watch, chain the commands: `node9 tail --clear && node9 tail --history`. Scripts relying on the old streaming-after-clear behaviour must be updated.
2825
- **Default mode is now `audit`:** Fresh installs now default to `mode: "audit"` instead of `mode: "standard"`. In audit mode every tool call is approved and logged, with a desktop notification for anything that _would_ have been blocked. This lets teams observe agent behaviour before committing to a blocking policy. Switch to `mode: "standard"` or `mode: "strict"` when you are ready to enforce.
2926
- **Approval timeout default is now 30 seconds:** `approvalTimeoutMs` defaults to `30000` (was `0` / wait forever). Pending approval prompts now auto-deny after 30 seconds if no human responds, preventing agents from stalling indefinitely.
3027
- **Cloud approver disabled by default:** `approvers.cloud` defaults to `false`. Cloud (Slack/SaaS) approval must be explicitly opted in via `settings.approvers.cloud: true` after running `node9 login`.

src/tui/tail.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,11 @@ export async function startTail(options: TailOptions = {}): Promise<void> {
149149
}
150150
);
151151
req.setTimeout(2000, () => {
152-
// destroy() may fire the error listener once more (ECONNRESET) after this
153-
// resolves — req.once ensures the listener is already gone by then.
154-
req.destroy();
152+
// resolve() before destroy() so the promise settles as ETIMEDOUT first.
153+
// destroy() may then emit an error event, but req.once ensures the
154+
// listener has already been consumed and won't call resolve() again.
155155
resolve({ ok: false, code: 'ETIMEDOUT' });
156+
req.destroy();
156157
});
157158
req.once('error', (err: NodeJS.ErrnoException) => resolve({ ok: false, code: err.code }));
158159
req.end();

0 commit comments

Comments
 (0)