fix(tooling): cargo fmt + godot-cold-parse cache restore (gate round)

fmt: atlas_data_proxy.rs test code. godot-cold-parse: the cold parse re-seeds the class cache WITHOUT addon classes (gdUnit4's GdUnitTestCIRunner missing), leaving tests/run-godot unable to start (0 tests / 355ms — caught by the pre-push gate running the suite right after this script). The script now restores a full cache via a final --import pass before exiting; the cold verdict is unaffected.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-14 16:29:02 +02:00
co-authored by Claude Fable 5
parent 845737617c
commit 9c990a0733
2 changed files with 16 additions and 3 deletions
+7 -3
View File
@@ -237,8 +237,11 @@ mod tests {
fn handle_star_map_request_reads_and_parses_file() {
let n = SEQ.fetch_add(1, Ordering::Relaxed);
let path = std::env::temp_dir().join(format!("sr_starmap_{}_{n}.json", std::process::id()));
std::fs::write(&path, r#"{"_meta": {"v": 1}, "nodes": [1, 2], "edges": []}"#)
.expect("write fixture json");
std::fs::write(
&path,
r#"{"_meta": {"v": 1}, "nodes": [1, 2], "edges": []}"#,
)
.expect("write fixture json");
let resp = handle_star_map_request(&StarMapRequest { star_map: true }, &path);
assert_eq!(resp.status, StarMapStatus::Ready);
@@ -266,7 +269,8 @@ mod tests {
#[test]
fn handle_star_map_request_malformed_json_is_error() {
let n = SEQ.fetch_add(1, Ordering::Relaxed);
let path = std::env::temp_dir().join(format!("sr_starmap_bad_{}_{n}.json", std::process::id()));
let path =
std::env::temp_dir().join(format!("sr_starmap_bad_{}_{n}.json", std::process::id()));
std::fs::write(&path, "{ not valid json").expect("write fixture json");
let resp = handle_star_map_request(&StarMapRequest { star_map: true }, &path);
+9
View File
@@ -84,4 +84,13 @@ if [ -n "$MATCHES" ]; then
echo "$MATCHES"
exit 1
fi
# Restore a FULL class cache before exiting: the cold parse run re-seeds
# global_script_class_cache.cfg only partially — addon classes (e.g. gdUnit4's
# GdUnitTestCIRunner) are missing, which leaves tests/run-godot unable to even
# start (0 tests in ~350ms; found live when the pre-push gate ran the suite
# right after this script, 2026-07-14). The cold verdict above is already
# decided; this restore just returns the tree to a runnable state.
godot --headless --path "$REPO_ROOT/client" --import > /dev/null 2>&1 || true
echo "godot-cold-parse: clean"