Skip to content

Commit e4fd38f

Browse files
committed
Unblock workspace tests on auto-generated override
1 parent eb5af64 commit e4fd38f

2 files changed

Lines changed: 21 additions & 1 deletion

File tree

src/core/validate.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4842,6 +4842,11 @@ pub fn render_validation_report(report: &ValidationReport, verbose: bool) {
48424842
"spec".bright_cyan(),
48434843
intent_version.bright_white()
48444844
);
4845+
println!(
4846+
" {} {}",
4847+
"gate".bright_magenta().bold(),
4848+
"Four Invariants Gate".bright_white()
4849+
);
48454850

48464851
if verbose {
48474852
println!(

src/core/workspace.rs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,11 +684,26 @@ fn has_local_modifications(repo_root: &Path) -> Result<bool, DecapodError> {
684684
repo_root.to_str().unwrap_or("."),
685685
"status",
686686
"--porcelain",
687+
"-z",
687688
])
688689
.output()
689690
.map_err(DecapodError::IoError)?;
690691

691-
Ok(!String::from_utf8_lossy(&output.stdout).trim().is_empty())
692+
let stdout = String::from_utf8_lossy(&output.stdout);
693+
let mut saw_non_ignorable = false;
694+
for entry in stdout.split('\0').filter(|entry| !entry.is_empty()) {
695+
if entry.len() < 4 {
696+
continue;
697+
}
698+
let path = &entry[3..];
699+
if path == ".decapod/OVERRIDE.md" {
700+
continue;
701+
}
702+
saw_non_ignorable = true;
703+
break;
704+
}
705+
706+
Ok(saw_non_ignorable)
692707
}
693708

694709
fn sanitize_agent_id(agent_id: &str) -> String {

0 commit comments

Comments
 (0)