singularity-forge/src/resources/extensions
Iouri Goussev a436f06e2d fix(gsd): wire setLogBasePath into engine init to resurrect audit log (#2745)
* fix: wire setLogBasePath into engine init to resurrect audit log

_auditBasePath was always null — setLogBasePath() existed but was never
called from any production code path. Every logWarning/logError call hit
the if (_auditBasePath) guard as false, so nothing was ever written to
.gsd/audit-log.jsonl.

Two independent fixes:
1. Remove _auditBasePath = null from _resetLogs() — the base path must
   survive unit resets, it's stable for process lifetime
2. Call setLogBasePath(base) after s.basePath = base in both the fresh-
   start path (bootstrapAutoSession) and the resume path (startAuto)

Adds two tests verifying disk persistence and that _resetLogs doesn't
kill the audit path.

Fixes #2722

* refactor: clean up audit log tests and avoid redundant mkdirSync

- Use makeTempDir/cleanup from test-utils.ts instead of inline mkdtempSync/rmSync
- Add afterEach in audit describe block to reset _auditBasePath via
  setLogBasePath("") — prevents state bleed into subsequent tests since
  _resetLogs() no longer clears it
- Drop four raw imports (mkdtempSync, rmSync, tmpdir — join was already used)
- Guard mkdirSync in _push() with _auditDirEnsured flag — was calling
  mkdirSync on every log entry; now called once per base path

* revert: remove _auditDirEnsured flag

mkdirSync({ recursive: true }) on an existing dir is a cheap stat, not
meaningful overhead on a low-frequency warn/error path. The flag added
mutable state for no real gain.
2026-03-26 16:06:48 -06:00
..
async-jobs feat: managed RTK integration with opt-in preference and web UI toggle (#2620) 2026-03-26 09:33:07 -06:00
aws-auth feat: add aws-auth extension for automatic Bedrock credential refresh (#1253) 2026-03-18 15:07:10 -06:00
bg-shell feat: managed RTK integration with opt-in preference and web UI toggle (#2620) 2026-03-26 09:33:07 -06:00
browser-tools feat(gsd): add .gsd/RUNTIME.md template for declared runtime context (#1626) 2026-03-20 12:51:51 -06:00
claude-code-cli fix: signal malformed tool arguments in toolcall_end event (#2647) 2026-03-26 08:15:16 -06:00
cmux refactor: replace hardcoded /tmp paths with os.tmpdir()/homedir() (#1708) 2026-03-21 08:46:34 -06:00
context7 refine: extensions elegance improvements (#1503) 2026-03-19 16:59:52 -06:00
github-sync refactor: move GSD metadata from commit subject scopes to git trailers 2026-03-25 22:56:48 +00:00
google-search refine: extensions elegance improvements (#1503) 2026-03-19 16:59:52 -06:00
gsd fix(gsd): wire setLogBasePath into engine init to resurrect audit log (#2745) 2026-03-26 16:06:48 -06:00
mac-tools feat: add extension manifest + registry for user-managed enable/disable (#1238) 2026-03-18 14:12:19 -06:00
mcp-client feat(gsd): add /gsd mcp command for MCP server status and connectivity (#2362) 2026-03-24 23:18:31 -06:00
remote-questions fix(remote-questions): use static ESM import for AuthStorage hydration 2026-03-25 19:39:09 -05:00
search-the-web fix(search): enforce hard search budget and survive context compaction 2026-03-25 21:35:09 -05:00
shared feat: managed RTK integration with opt-in preference and web UI toggle (#2620) 2026-03-26 09:33:07 -06:00
slash-commands refactor: split shared/mod.ts into pure and TUI-dependent barrels (#1807) 2026-03-21 11:48:32 -06:00
subagent fix: normalize Windows backslash paths in bash command strings (#1436) (#1863) 2026-03-21 14:57:58 -06:00
ttsr feat: add GSD_HOME env var to override global ~/.gsd directory (#1566) 2026-03-20 08:29:01 -06:00
universal-config feat: add extension manifest + registry for user-managed enable/disable (#1238) 2026-03-18 14:12:19 -06:00
voice fix(voice): fix misleading portaudio error on PEP 668 Linux systems (#2403) (#2407) 2026-03-25 08:45:39 -06:00
ask-user-questions.ts refactor: split shared/mod.ts into pure and TUI-dependent barrels (#1807) 2026-03-21 11:48:32 -06:00
get-secrets-from-user.ts refactor: split shared/mod.ts into pure and TUI-dependent barrels (#1807) 2026-03-21 11:48:32 -06:00
package.json Improve startup performance with lazy extension loading (#1336) 2026-03-19 07:38:50 -06:00