test(secret-file): cover NickServ + account-level symlinks, narrow inspect catch#84713
Conversation
…spect catch Followup nits from the #84711 review: - Narrow the inspectTokenFile catch in extensions/telegram/src/account-inspect.ts to FsSafeError so only fs-safe validation throws map to configured_unavailable; any other throw (programmer error, unexpected I/O) is rethrown. - Add a regression test for the IRC NickServ password file symlink rejection path (extensions/irc/src/accounts.ts:118), paralleling the existing top-level passwordFile test. - Add a regression test for the Telegram account-level tokenFile symlink rejection path (extensions/telegram/src/token.ts:149), paralleling the existing channel-level tokenFile test. Behavior was already correct after #84711; this just locks coverage and tightens the catch.
|
Codex review: needs maintainer review before merge. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: yes. source inspection gives a high-confidence path: current main has PR rating Rank-up moves:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. Real behavior proof Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Land this focused hardening through the maintainer PR workflow after the normal targeted checks confirm the secret-file contract remains intact. Do we have a high-confidence way to reproduce the issue? Yes, source inspection gives a high-confidence path: current main has Is this the best way to solve the issue? Yes. Catching only Label changes:
Label justifications:
Acceptance criteria:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 90fd26b602b0. |
|
ClawSweeper PR egg ✨ Hatched: 💎 rare Neon Proofling Hatch commandComment Hatchability rules:
Rarity: 💎 rare. What is this egg doing here?
|
…spect catch (openclaw#84713) Followup nits from the openclaw#84711 review: - Narrow the inspectTokenFile catch in extensions/telegram/src/account-inspect.ts to FsSafeError so only fs-safe validation throws map to configured_unavailable; any other throw (programmer error, unexpected I/O) is rethrown. - Add a regression test for the IRC NickServ password file symlink rejection path (extensions/irc/src/accounts.ts:118), paralleling the existing top-level passwordFile test. - Add a regression test for the Telegram account-level tokenFile symlink rejection path (extensions/telegram/src/token.ts:149), paralleling the existing channel-level tokenFile test. Behavior was already correct after openclaw#84711; this just locks coverage and tightens the catch.
…spect catch (openclaw#84713) Followup nits from the openclaw#84711 review: - Narrow the inspectTokenFile catch in extensions/telegram/src/account-inspect.ts to FsSafeError so only fs-safe validation throws map to configured_unavailable; any other throw (programmer error, unexpected I/O) is rethrown. - Add a regression test for the IRC NickServ password file symlink rejection path (extensions/irc/src/accounts.ts:118), paralleling the existing top-level passwordFile test. - Add a regression test for the Telegram account-level tokenFile symlink rejection path (extensions/telegram/src/token.ts:149), paralleling the existing channel-level tokenFile test. Behavior was already correct after openclaw#84711; this just locks coverage and tightens the catch.
…spect catch (openclaw#84713) Followup nits from the openclaw#84711 review: - Narrow the inspectTokenFile catch in extensions/telegram/src/account-inspect.ts to FsSafeError so only fs-safe validation throws map to configured_unavailable; any other throw (programmer error, unexpected I/O) is rethrown. - Add a regression test for the IRC NickServ password file symlink rejection path (extensions/irc/src/accounts.ts:118), paralleling the existing top-level passwordFile test. - Add a regression test for the Telegram account-level tokenFile symlink rejection path (extensions/telegram/src/token.ts:149), paralleling the existing channel-level tokenFile test. Behavior was already correct after openclaw#84711; this just locks coverage and tightens the catch.
…spect catch (openclaw#84713) Followup nits from the openclaw#84711 review: - Narrow the inspectTokenFile catch in extensions/telegram/src/account-inspect.ts to FsSafeError so only fs-safe validation throws map to configured_unavailable; any other throw (programmer error, unexpected I/O) is rethrown. - Add a regression test for the IRC NickServ password file symlink rejection path (extensions/irc/src/accounts.ts:118), paralleling the existing top-level passwordFile test. - Add a regression test for the Telegram account-level tokenFile symlink rejection path (extensions/telegram/src/token.ts:149), paralleling the existing channel-level tokenFile test. Behavior was already correct after openclaw#84711; this just locks coverage and tightens the catch.
…spect catch (openclaw#84713) Followup nits from the openclaw#84711 review: - Narrow the inspectTokenFile catch in extensions/telegram/src/account-inspect.ts to FsSafeError so only fs-safe validation throws map to configured_unavailable; any other throw (programmer error, unexpected I/O) is rethrown. - Add a regression test for the IRC NickServ password file symlink rejection path (extensions/irc/src/accounts.ts:118), paralleling the existing top-level passwordFile test. - Add a regression test for the Telegram account-level tokenFile symlink rejection path (extensions/telegram/src/token.ts:149), paralleling the existing channel-level tokenFile test. Behavior was already correct after openclaw#84711; this just locks coverage and tightens the catch.
…spect catch (openclaw#84713) Followup nits from the openclaw#84711 review: - Narrow the inspectTokenFile catch in extensions/telegram/src/account-inspect.ts to FsSafeError so only fs-safe validation throws map to configured_unavailable; any other throw (programmer error, unexpected I/O) is rethrown. - Add a regression test for the IRC NickServ password file symlink rejection path (extensions/irc/src/accounts.ts:118), paralleling the existing top-level passwordFile test. - Add a regression test for the Telegram account-level tokenFile symlink rejection path (extensions/telegram/src/token.ts:149), paralleling the existing channel-level tokenFile test. Behavior was already correct after openclaw#84711; this just locks coverage and tightens the catch.
…spect catch (openclaw#84713) Followup nits from the openclaw#84711 review: - Narrow the inspectTokenFile catch in extensions/telegram/src/account-inspect.ts to FsSafeError so only fs-safe validation throws map to configured_unavailable; any other throw (programmer error, unexpected I/O) is rethrown. - Add a regression test for the IRC NickServ password file symlink rejection path (extensions/irc/src/accounts.ts:118), paralleling the existing top-level passwordFile test. - Add a regression test for the Telegram account-level tokenFile symlink rejection path (extensions/telegram/src/token.ts:149), paralleling the existing channel-level tokenFile test. Behavior was already correct after openclaw#84711; this just locks coverage and tightens the catch.
…spect catch (openclaw#84713) Followup nits from the openclaw#84711 review: - Narrow the inspectTokenFile catch in extensions/telegram/src/account-inspect.ts to FsSafeError so only fs-safe validation throws map to configured_unavailable; any other throw (programmer error, unexpected I/O) is rethrown. - Add a regression test for the IRC NickServ password file symlink rejection path (extensions/irc/src/accounts.ts:118), paralleling the existing top-level passwordFile test. - Add a regression test for the Telegram account-level tokenFile symlink rejection path (extensions/telegram/src/token.ts:149), paralleling the existing channel-level tokenFile test. Behavior was already correct after openclaw#84711; this just locks coverage and tightens the catch.
…spect catch (openclaw#84713) Followup nits from the openclaw#84711 review: - Narrow the inspectTokenFile catch in extensions/telegram/src/account-inspect.ts to FsSafeError so only fs-safe validation throws map to configured_unavailable; any other throw (programmer error, unexpected I/O) is rethrown. - Add a regression test for the IRC NickServ password file symlink rejection path (extensions/irc/src/accounts.ts:118), paralleling the existing top-level passwordFile test. - Add a regression test for the Telegram account-level tokenFile symlink rejection path (extensions/telegram/src/token.ts:149), paralleling the existing channel-level tokenFile test. Behavior was already correct after openclaw#84711; this just locks coverage and tightens the catch.
…spect catch (openclaw#84713) Followup nits from the openclaw#84711 review: - Narrow the inspectTokenFile catch in extensions/telegram/src/account-inspect.ts to FsSafeError so only fs-safe validation throws map to configured_unavailable; any other throw (programmer error, unexpected I/O) is rethrown. - Add a regression test for the IRC NickServ password file symlink rejection path (extensions/irc/src/accounts.ts:118), paralleling the existing top-level passwordFile test. - Add a regression test for the Telegram account-level tokenFile symlink rejection path (extensions/telegram/src/token.ts:149), paralleling the existing channel-level tokenFile test. Behavior was already correct after openclaw#84711; this just locks coverage and tightens the catch.
…spect catch (openclaw#84713) Followup nits from the openclaw#84711 review: - Narrow the inspectTokenFile catch in extensions/telegram/src/account-inspect.ts to FsSafeError so only fs-safe validation throws map to configured_unavailable; any other throw (programmer error, unexpected I/O) is rethrown. - Add a regression test for the IRC NickServ password file symlink rejection path (extensions/irc/src/accounts.ts:118), paralleling the existing top-level passwordFile test. - Add a regression test for the Telegram account-level tokenFile symlink rejection path (extensions/telegram/src/token.ts:149), paralleling the existing channel-level tokenFile test. Behavior was already correct after openclaw#84711; this just locks coverage and tightens the catch.
Summary
Followup to #84711 picking up the three reviewer nits that didn't block the original merge:
inspectTokenFilecatch inextensions/telegram/src/account-inspect.tstoFsSafeErrorso only fs-safe validation throws map toconfigured_unavailable; any other throw (programmer error, unexpected I/O) re-raises instead of being silently swallowed.extensions/irc/src/accounts.ts:118), paralleling the existing top-levelpasswordFilesymlink test.extensions/telegram/src/token.ts:149), paralleling the existing channel-leveltokenFilesymlink test.Behavior was already correct after #84711; this just locks coverage on the two latent paths and tightens the catch.
Verification
node scripts/run-vitest.mjs extensions/telegram/src/account-inspect.test.ts extensions/telegram/src/token.test.ts extensions/irc/src/accounts.test.ts→ 3 files, 40 tests passing.ref #84711