docs(rewrite): commit intentional deviations as fix-deviant(...) and register them

This commit is contained in:
ddidderr committed 2026-10-12 15:13:45 +02:00
1 parent dad4264606
commit 6394bc65d3
1 file changed
+8 -4
+8 -4
View File
@@ -15,10 +15,14 @@ You are porting part of Ghostty 1.3.1 (Zig) to Rust. Read
own crate's `Cargo.toml` (prefer well-known crates; use `cargo add -p <crate>`). own crate's `Cargo.toml` (prefer well-known crates; use `cargo add -p <crate>`).
2. **Faithful port — except genuine bugs.** If the Zig code has a real 2. **Faithful port — except genuine bugs.** If the Zig code has a real
memory-safety bug or undefined behaviour (use-after-free, out-of-bounds, memory-safety bug or undefined behaviour (use-after-free, out-of-bounds,
leaks, stale pointers, infinite loops, integer overflow UB), do NOT leaks, stale pointers, infinite loops, integer overflow UB) or a clear
replicate it: implement the evidently intended, safe behaviour, add a test, data-loss/corruption bug (lost or overwritten output), do NOT replicate
and record it under "Upstream bugs fixed" in your notes (Zig file:line, it: implement the evidently intended, safe behaviour, add a test, record
what was wrong, what the Rust does). Everything else stays faithful. it under "Upstream bugs fixed" in your notes (Zig file:line, what was
wrong, what the Rust does) and add an entry to docs/rewrite/DEVIANT_FIXES.md.
Keep each such fix in separate hunks/files where possible: the
orchestrator commits every deviant fix on its own, titled
`fix-deviant(<scope>): ...`. Everything else stays faithful.
Original rule 2: Original rule 2:
**Faithful port.** Preserve behaviour, edge cases, defaults and naming **Faithful port.** Preserve behaviour, edge cases, defaults and naming
(snake_case of the Zig names). Port doc comments (they are user-visible for (snake_case of the Zig names). Port doc comments (they are user-visible for