Hmbown/CodeWhale · error
legacy dir
Error message
legacy dir
What it means
A test assertion message ("legacy dir") from the #3410 legacy-path tests: the scenario places a config under the legacy directory layout and asserts that rendered-body saves (with comment preservation and rollback) still work there. The label marks which layout the failing assertion was exercising, not a runtime error.
Solutions
- Reproduce with the legacy directory layout fixture to see which assertion failed
- Ensure the save path handles the legacy location the same as the current one (same comment preservation and rollback)
- Update or migrate the legacy fixture if the supported layout changed, keeping the test's intent
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/config/src/tests.rs:4374 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Hmbown/CodeWhale@433685b202 (2026-09-15).
Data as JSON: /api/errors/3e6914ad704a7da2.
Report an issue: GitHub.
Appendix: source
Thrown at crates/config/src/tests.rs:4374
assert!(
diagnostic.contains("failed to parse config"),
"error should name the parse failure: {err:#}"
);
assert!(!diagnostic.contains(secret), "{diagnostic}");
assert!(!diagnostic.contains("api_key"), "{diagnostic}");
assert!(diagnostic.contains("file contents were omitted"));
let body = fs::read_to_string(&config_path).expect("read config");
assert_eq!(body, malformed, "malformed config left untouched");
}
#[test]
fn config_store_rendered_body_preserves_comments_at_legacy_deepseek_path() {
// #3410 legacy case: a config still living under `.deepseek/` keeps its
// comments when written back through a transaction at the same path.
let dir = tempfile::tempdir().expect("tempdir");
let legacy_dir = dir.path().join(".deepseek");
fs::create_dir_all(&legacy_dir).expect("legacy dir");
let config_path = legacy_dir.join(CONFIG_FILE_NAME);
fs::write(
&config_path,
"# legacy home config\nmodel = \"deepseek-v4-flash\"\n",
)
.expect("write config");
let mut store = ConfigStore::load(Some(config_path.clone())).expect("load config store");
store.config.model = Some("deepseek-v4-pro".to_string());
let mut transaction = persistence::SetupTransaction::new();
transaction.stage(
&config_path,
store.rendered_body().expect("rendered body").into_bytes(),
);
transaction.commit().expect("commit");
let body = fs::read_to_string(&config_path).expect("read config");View on GitHub (pinned to 433685b202)