Repository navigation
training_producer test owns its home (fixes the staged_credit flake, card d4909786) - #5246
Merged
Merged
Conversation
…iblings Card d4909786. the_lived_copy_is_shed_by_the_substrate_not_by_her_identity was the only data-writing test in training_producer without HomeGuard. Her store resolves through the process home (`@persona:kimi` -> $HOME/.continuum/ personas/kimi/data/longterm.db). A parallel test that pinned and restored HOME could move it between this test's ensure-schema and its batch, so the two calls hit different databases: "Delete failed: no such table: staged_credit". Seen on #5239 at 815bdba and on #5244 at 3676ae9, while canary passed. It also wrote into the real ~/.continuum/personas/kimi on every machine that ran it. The fix: a tempdir home under HomeGuard::set, held for the whole test. This is the same pattern its siblings in part_2..part_6 already use. A scan of every tokio::test in training_producer/tests that touches data found no other test without the guard. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
Contributor
Author
|
Source APPROVE at 2746bbc. The data-writing fixture now acquires the existing crate-wide HomeGuard before creating its runtime or staging credit. The guard pins all four home variables across awaits and drops before the temporary directory, preserving the original authorization and lived-copy assertions. No production behavior changes. Reviewed HomeGuard implementation and fixture scope; no local compilation. Exact-head CI remains required. This addresses the missing fixture isolation behind the staged_credit failure observed on #5244; passing compilation alone would not establish the full-suite result. |
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.
The one data-writing test in training_producer without HomeGuard raced the home-mutating fixtures. Its ensure-schema and batch resolved
@persona:kimiunder two different $HOME values, which gave 'no such table: staged_credit' (#5239 at 815bdba, #5244 at 3676ae9; canary green). It also wrote into the real ~/.continuum/personas/kimi. Now it pins a tempdir home under HomeGuard::set, like its siblings. A scan found no other unguarded data test in the module. CI compiles it.🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo