Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,13 @@ Before picking work, read [ROADMAP.md](ROADMAP.md) (check Underway) and
## Never silent
- A reader, writer, tool or command that drops, truncates or approximates data says what, how
much and where: Z values dropped, field names cut, a CRS assumed, features skipped.
- Report through `Session::notify` (app, CLI, Python `take_notices`) or `ToolResult::messages`,
one notice per kind with a count; `eprintln!` alone doesn't count. Unusable results are errors.
- Test both ways: lossy input gives the notice, clean input none. Existing silent losses are bugs.
- Report a loss with a `LossCode` (`Session::notify_loss` or `notify_counted` in the engine,
`Note::loss` in readers and writers, `ToolResult::losses` in tools), so `--strict`, Python and
MCP see it; a loss no code fits gets a new one. Plain `Session::notify` is for what isn't a
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
loss, such as an ignored parameter or a "may". One notice per kind with a count; `eprintln!`
alone doesn't count. Unusable results are errors.
- Test both ways: lossy input gives the notice and its code, clean input none. Existing silent
losses are bugs.
- A file or setting from a newer RustGIS is refused or kept unchanged, never saved again without
what this version couldn't read; a reader checks the version it is given
([saved files](docs/maintaining.md#saved-files-and-settings)).
Expand Down
12 changes: 7 additions & 5 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,13 @@ commands are skipped.
## Never silent

When a reader, writer, tool or command can't represent something, approximates it or drops it, it
says so in a notice: what was lost, how much and where. Notices go through `Session::notify`,
which the app shows, the CLI prints and Python returns from `take_notices`. Commands pass on the
notes readers return, and geoprocessing tools report theirs in `ToolResult::messages`. A result
that would be unusable is an error instead. Older code doesn't yet report every loss; each one
found is treated as a bug.
says so in a notice: what was lost, how much and where, with a
[loss code](user-guide/loss-codes.md). The app, the CLI and Python (`take_notices`) show the
notice; `--strict`, Python's `DataLossWarning` and MCP's `losses` act on the code. Readers and
writers return coded notes (`Note::loss`), commands pass them on with `Session::notify_loss`, and
tools report theirs in `ToolResult::losses`; plain `Session::notify` carries the rest. A result
that would be unusable is an error instead. Older code doesn't yet report every
loss, or reports some without a code; each one found is treated as a bug.

## Pure Rust

Expand Down
Loading