eaa2b65f
fix(service): separate the read-plane rev guard from the review path
The previous commit's guard broke two service tests, which were right and the guard was too broad: rendering and diffing a proposal branch genuinely needs to read one, so a blanket ban on ref names is not the shape. ReadDocument keeps the strict object-name rule. ReadDocumentAtRef reaches an arbitrary ref, deliberately as a separate awkwardly-named method rather than a flag, so serving unreviewed content is something a caller asks for by name and a reviewer can grep for. A rejected rev now wraps ErrNotFound as well, preserving the existing deliberate property that a crafted revision cannot distinguish malformed from absent by probing.
bigbes <bigbes@gmail.com> — 2026-07-22 11:46:16 UTC
Commit eaa2b65f2b205ccda00b2f09264f6fc966209373 —
view raw patch
Parent(s):
8edca94e
| File | Status | + | − |
|---|---|---|---|
service/read.go
|
M | +34 | -1 |
service/read_test.go
|
M | +9 | -2 |