nexus/packages/adapters/opencode-local/src/server
John Wessel 5965266cb8
fix: guard os.userInfo() for UID-only containers, exclude HOME from cache key
Address Greptile review feedback:

1. Wrap os.userInfo() in try/catch — it throws SystemError when the
   current UID has no /etc/passwd entry (e.g. `docker run --user 1234`
   with a minimal image). Falls back to process.env.HOME gracefully.

2. Add HOME to VOLATILE_ENV_KEY_EXACT so the discovery cache key is
   not affected by the caller-supplied HOME vs the resolved HOME.
   os.userInfo().homedir is constant for the process lifetime, so
   HOME adds no useful cache differentiation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 13:05:23 -04:00
..
execute.ts feat(costs): add billing, quota, and budget control plane 2026-03-16 15:11:01 -05:00
index.ts Merge PR #62: Full OpenCode adapter integration 2026-03-06 15:23:55 +00:00
models.test.ts Add OpenCode provider integration and strict model selection 2026-03-05 15:24:20 +01:00
models.ts fix: guard os.userInfo() for UID-only containers, exclude HOME from cache key 2026-03-17 13:05:23 -04:00
parse.test.ts Fix opencode-local adapter: parser, UI, CLI, and environment tests 2026-03-07 19:01:04 +00:00
parse.ts Fix opencode-local adapter: parser, UI, CLI, and environment tests 2026-03-07 19:01:04 +00:00
test.ts Address PR feedback: keep testEnvironment non-destructive, warn on swallowed errors 2026-03-07 19:15:10 +00:00