test(memory): stamp the instance store with the already-resolved identity (CI fix) - #236
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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