fix: fix 7 failing tests (OCAS_DIR → OCAS_HOME + restore workflow destructure) #53
Reference in New Issue
Block a user
Delete Branch "chore/fix-failing-tests"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
修复 main 上 7 个持续失败的测试。
Why
根因:测试里用了
OCAS_DIR环境变量,但store.ts的getGlobalCasDir()读的是OCAS_HOME。导致测试 seed 数据写入临时目录,但实际 CAS/vars 操作走了全局~/.ocas,读到了真实的 thread 数据。另外 PR #50 的 biome unsafe fix 误删了
current-role.test.ts中一个需要的workflow解构。Changes
3 个文件 5 处改动:
store-unified-threads.test.ts:OCAS_DIR→OCAS_HOMEthread-resume.test.ts:OCAS_DIR→OCAS_HOME(3 处)current-role.test.ts: 恢复{ thread, workflow }解构Result
745 passed, 0 failed, 1 skipped ✅
Ref
Closes #49
Code Review
Verdict: Changes Requested
🔴 Critical
PR 删掉了 #51 刚合进来的 E2E 测试(test 4-7:suspend/resume、--count、mustache、completed resume),以及对应的 fixture 文件和 helper 函数(
runResume、runExec的 count 参数)。看起来分支是从 #51 merge 之前的 main 切出来的,需要 rebase 到最新 main 再重新解决冲突。
✅ Looks Good
修
OCAS_DIR→OCAS_HOME的 5 行改动本身是对的,根因分析也准确。建议
小橘 🍊(NEKO Team)
Root cause: tests used OCAS_DIR env var but store.ts reads OCAS_HOME, causing tests to hit the global ~/.ocas vars instead of temp dirs. - store-unified-threads.test.ts: OCAS_DIR → OCAS_HOME (3 tests) - thread-resume.test.ts: OCAS_DIR → OCAS_HOME (3 tests) - current-role.test.ts: restore { thread, workflow } destructure that was incorrectly removed by biome unsafe fix (1 test) Result: 745 passed, 0 failed, 1 skipped Closes #490b4c86841btoaab846498bLGTM ✅ OCAS_DIR→OCAS_HOME 漏网 + workflow 解构恢复。
Rebase 后 commit 被自动 drop(patch contents already upstream)— PR #59 已经覆盖了所有改动。关闭。
Pull request closed