Skip to content

test(memory): stamp the instance store with the already-resolved identity (CI fix) - #236

Merged
LeXwDeX merged 1 commit into
devfrom
fix/memory-ci-identity-fixture
Aug 12, 2026
Merged

test(memory): stamp the instance store with the already-resolved identity (CI fix)#236
LeXwDeX merged 1 commit into
devfrom
fix/memory-ci-identity-fixture

Conversation

@LeXwDeX

@LeXwDeX LeXwDeX commented Aug 12, 2026

Copy link
Copy Markdown
Owner

dev 推 CI(linux Unit)在 MEM-PR01-R1-03 隔离复现失败:实例库 boot 时身份解析在独立 Effect 图(独立 :memory: DB)中,git 子进程瞬态失败被静默吞掉→降级为 global 身份→memory fail-closed。修复:测试体解析一次身份并传入 instance store(provideInstance 现接受完整 LoadInput,boot 跳过自身 fromDirectory);应用于三个断言 active 的身份作用域测试。产品加固(git 身份解析不静默降级)已登记为独立项。验证:memory+project 191 全绿;typecheck 干净。

Fixes #233

🤖 Generated with Claude Code

…tity

The dev push CI (linux Unit Tests) failed in MEM-PR01-R1-03: the first
search returned "unavailable" in isolation while the same file passes
locally. Root cause (CI log analysis + code trace): the test's "active"
pre-condition depends on the InstanceStore's BOOT-TIME project resolution,
which runs in a separate Effect graph (its own :memory: Database) and
silently degrades to the shared global identity when a git subprocess
fails transiently on a loaded runner (every git failure collapses to
"exit 1, empty output" in core git.ts run()). The test body's own
resolution milliseconds later returns the real root-commit identity, so
the identity assertions pass while memory fails closed against the stale
global context.

Fix: resolve the identity once in the test body and hand it to the
instance store (provideInstance now accepts a full LoadInput; boot skips
its own fromDirectory when project+worktree are given). Applied to the
three identity-scoped tests (R1-03, R1-23, R1-00 third) that assert
active memory.

Registered separately (product hardening, out of this PR): identity
resolution should not silently degrade to the global identity on
transient git errors — discover/rootCommits should retry or propagate
instead of collapsing to exit 1.

Co-Authored-By: Claude <noreply@anthropic.com>
@LeXwDeX
LeXwDeX merged commit 64bf539 into dev Aug 12, 2026
5 checks passed
@LeXwDeX
LeXwDeX deleted the fix/memory-ci-identity-fixture branch August 12, 2026 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant