Skip to content
12 changes: 12 additions & 0 deletions remote/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.4] - 2026-04-24

### Changed

- `execute-read` invokes each ILookup at most once: the compiled pattern matches against data, then a post-match walk on the matcher's `:val` surfaces per-path errors without re-pulling from collections
- Drop error-covered bindings from partial-success read responses (previously leaked as `nil`, or as the error map itself when a var's path landed exactly on the error)
- Fold read-error detection, var filtering, and all-covered classification into a single pass via new private `classify-vars`

### Removed

- `detect-read-errors` and `classify-result` (private fns) — replaced by `classify-vars`

## [0.1.3] - 2026-04-22

### Changed
Expand Down
9 changes: 7 additions & 2 deletions remote/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,16 @@ Collections return errors as data (not exceptions):

**Mutations** are all-or-nothing: Remote checks the mutation result with `:detect`, maps `:type` to HTTP status via `:codes`. Path-level errors (e.g., role gate returning `{:error ...}` along the path) are detected before attempting the mutation.

**Reads** support partial success: Before pattern matching, `execute-read` extracts var paths from the pattern and walks each path through the data (including through ILookup) checking for errors via `:detect`. The pattern is trimmed to remove error paths, and matching proceeds on the original data. If some branches succeed and others fail:
**Reads** support partial success. `execute-read` invokes each ILookup at most once:

1. **Match** runs the compiled pattern against data (one ILookup call per accessed key).
2. **Post-match walk** on the matcher's `:val` — every value in `:val` was already realized by the matcher, so the walk surfaces errors inside collections without a second ILookup pass. On match failure, `:val` is nil and `execute-read` appends the match-failure itself to any detected errors.

If some branches succeed and others fail:
- Successful bindings are returned normally
- Detected errors are attached as `::detected-errors` metadata and included in the wire response as `:errors`

If all pattern paths are error paths, the read fails with the full error list.
If all pattern paths are covered by error paths, the read fails with the full error list.

**Partial success applies to reads only.** Mutations remain all-or-nothing.

Expand Down
2 changes: 1 addition & 1 deletion remote/resources/version.edn
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{:version "0.1.3"}
{:version "0.1.4"}
Loading
Loading