oficina / docs Public

rustfmt, and a gate result I read wrong

cargo fmt --check had rejected indent_level's one-line if/else. The gate
caught it; I did not, because I ran it as `bash 10-gate | tail -40` and
read the pipeline's exit code, which is tail's and is always 0. The
failing diff was sitting in the output I had just read.

That is the same shape AGENTS.md documents twice under "tools that
answer wrongly instead of failing" — a check that cannot distinguish
"no" from "I can't see it" — arrived at this time by my own pipeline
rather than by a tool. Re-run redirecting to a file and reading $?:
gate: ok, exit 0.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XrHJFx6wn4VvTzc3drkTp4
Paul Campbell pushed by paul@keymail.dev 29aa013cd28957abe2f081696b6289ec29e7aad3 parent d769883
1 file changed, +5 −1
  • core/src/fragment.rs +5 −1
diff --git a/core/src/fragment.rs b/core/src/fragment.rs
index 895fc8d..63cce2e 100644
--- a/core/src/fragment.rs
+++ b/core/src/fragment.rs
@@ -162,7 +162,11 @@ fn indent_level<T: ReadTxn>(txn: &T, e: &XmlElementRef) -> Option<u8> {
.parse::<u8>()
.ok()?
.clamp(0, MAX_INDENT);
- if level == 0 { None } else { Some(level) }
+ if level == 0 {
+ None
+ } else {
+ Some(level)
+ }
}
/// The class `fragment_html` puts on an indented block. `None` when the