fix(ci): address PR #31 review — harden cross-encoder fixture pipeline
- Fail on encode errors instead of silently writing empty .msgpack files - Fail test on missing/empty fixture dir instead of silent skip - Add all missing action variants (MoveSouth, MoveEast, MoveWest, Unpause, ToggleStanceDown, WalkAway) to GDScript fixture generator - Add GDScript fixture staleness check to make pre-pr - Validate repo root detection before writing outside client/ - Add file.flush() before close in headless mode - Document fixture failure recovery in DEVOPS.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1013,15 +1013,14 @@ fn malformed_input_in_batch_rejects_entire_batch() {
|
||||
/// (runs client/tests/gen_client_fixtures.gd via Godot headless)
|
||||
#[test]
|
||||
fn gdscript_generated_fixtures_deserialize() {
|
||||
// CWD is server/ when cargo test runs (Cargo sets it to the package root)
|
||||
let fixture_dir = std::path::Path::new("tests/fixtures/gdscript");
|
||||
|
||||
if !fixture_dir.exists() {
|
||||
eprintln!(
|
||||
"SKIP: GDScript fixtures not found at {}. Run `make fixtures-client` to generate.",
|
||||
fixture_dir.display()
|
||||
);
|
||||
return;
|
||||
}
|
||||
assert!(
|
||||
fixture_dir.exists(),
|
||||
"GDScript fixture directory not found at {}. Run `make fixtures-client` to generate.",
|
||||
fixture_dir.display()
|
||||
);
|
||||
|
||||
let mut count = 0;
|
||||
for entry in fs::read_dir(&fixture_dir).expect("read gdscript fixture dir") {
|
||||
@@ -1088,13 +1087,11 @@ fn gdscript_generated_fixtures_deserialize() {
|
||||
count += 1;
|
||||
}
|
||||
|
||||
if count == 0 {
|
||||
eprintln!(
|
||||
"SKIP: no .msgpack files found in {}. Run `make fixtures-client` to generate.",
|
||||
fixture_dir.display()
|
||||
);
|
||||
return;
|
||||
}
|
||||
assert!(
|
||||
count > 0,
|
||||
"No .msgpack files found in {}. Run `make fixtures-client` to generate.",
|
||||
fixture_dir.display()
|
||||
);
|
||||
eprintln!("Verified {} GDScript-generated fixtures", count);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user