fix(omo-opencode): credential lock home Windows rooted-path check and real Windows run
SU
21d ago+42+42+01234567890123456789-8-8-0123456789
Summary
- The test-only credential lock-home override no longer accepts a rooted path without a drive (
\\tmp\\x) or a UNC path:testLockHomenow uses the same drive-absolute check that guards SystemRoot, shared through a newisDriveAbsolutePathhelper. - Changes to
account-home.ts(and its test) now force the full OS matrix on pull requests, and a Windows-only test runs the realwhoami.exe/reg.exeregistry lookup on the Windows runner instead of only injected facts.
Changes
packages/omo-opencode/src/cli/service-auth/account-home.ts: new exportedisDriveAbsolutePathhelper;system32Toolreuses it (behavior unchanged);testLockHomeacceptsposix.isAbsolute || isDriveAbsolutePath.packages/omo-opencode/src/cli/service-auth/account-home.test.ts: rooted-no-drive and UNC values are ignored,C:/...is honored; newtest.skipIf(process.platform !== "win32")test runs the real lookup viauserRecordHome(systemPlatformFacts)and asserts a drive-absolute profile path.script/ci-fast-path.mjs:account-home.tsandaccount-home.test.tsadded toplatformSensitiveExactPaths.script/ci-fast-path.full-matrix.test.ts: two new cases pin the exact paths.
QA & Evidence
- What was tested: new tests first (RED), then the fix (GREEN);
bun teston the account-home file and both CI classifier files; a directclassifyCiModeprobe;tsgo --noEmit -p packages/omo-opencode/tsconfig.json;bun fmton the four changed files.
Observed result: RED: account-home 1 fail, full-matrix 2 fail. GREEN: account-home 14 pass / 1 skip / 0 fail (54 expects), CI suites 101 pass / 0 fail (239 expects); classifier probe:account-home.tschanged returnsfullMatrix: true, an unrelated path stillfalse; tsgo exit 0;bun fmt0 files reformatted.
Artifact: local evidence under.omo/evidence/20261113-12995-credential-lock-home/(gitignored, never committed):unit-account-home.txtsha256be663fcc222454bacf38b0d82c6bf83b7259b9fdbfb0584a9b4e1d99f4bbe96d,unit-ci-fast-path.txtsha25681b27c9e8653577dd37217c37664c7f5d2f38864f6552356e25e7cb7f1d7b934,typecheck-omo-opencode.txtsha256e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.
Why sufficient: item 1 is covered at thetestLockHomebehavior contract and the existing SystemRoot tests pin the helper's other call site; item 2 is covered twice (classifier unit cases plus the direct probe). No existing test changed behavior.
Risks & Residuals
- Live opencode QA is SKIP, not a pass: this machine has no
opencodebinary, so the opencode-qa live drive cannot run here. The change touches CLI service-auth code and CI selection, not a hook, tool, agent, or MCP surface; CI (including the Windows leg this change now forces) is the remaining live verification. - The Windows-only real-lookup test is skipped on Linux/macOS by design; it executes on the Windows leg.
- Changelog fragment follows in a separate commit once this PR has a number.
Screenshots
Not applicable.
Automated Checks
bun test packages/omo-opencode/src/cli/service-auth/account-home.test.ts
bun test script/ci-fast-path.full-matrix.test.ts script/ci-fast-path.test.ts
./node_modules/.bin/tsgo --noEmit -p packages/omo-opencode/tsconfig.json
Related Issues
Fixes #12995
Implemented with AI assistance; reviewed and verified by the author (local RED to GREEN, typecheck, and classifier probe above).
Summary by cubic
Fixes the credential lock-home override accepting Windows rooted paths without a drive (\tmp\x) and UNC paths, which could point the lock at unintended locations.
testLockHomenow rejects rooted-no-drive and UNC values; only drive-absolute paths likeC:/...pass, reusing the drive-absolute check that guards SystemRoot.- The lock-home module and its tests now force the full OS matrix on pull requests, and a Windows-only test runs the real
whoami.exe/reg.exeregistry lookup on the Windows runner. - Adds a changelog fragment and rebuilds the committed senpi plugin bundle so the bundle-currency CI check passes.