Commit c0f7c07
docs: correct seven claims the new @docs got wrong
Review of 01ccbf2 found seven inaccuracies, all of them assertions
nothing in this project checks. Two were regressions of rules this
repo had already settled rather than ordinary staleness, and both are
now written down in AGENTS.md so the next draft does not repeat them.
The two regressions:
* `upgradable/0` said the record is synthesised when the system
started without a `releases/RELEASES` file "it could read". That is
the *readable* phrasing five successive corrections to the refusal
message had already discarded - it misses malformed terms - and it
named the file unqualified, which castle#23 forbids because RELDIR
and `{sasl, releases_dir}` relocate it. The @doc now says what the
refusal says: the file `:release_handler` accepts, no one property
of the file being the test, and the path qualified.
* `commit/1` said committing an already-permanent version "succeeds
and changes nothing". That was true before castle#14 moved
materialisation inside `commit`'s serialised region.
`make_permanent/1` is still a no-op for such a version, but the
target's `sys.config` has been rewritten from current provider
inputs by then, and a provider that fails now fails the command.
The five others:
* `report!/1` does not make every failure a `Castle.Error`.
`installed/5` settles the marker and re-raises what
`install_release/1` raised, threw or exited with, so automation
rescuing only `Castle.Error` would read a blown-up command as a
success. The moduledoc now says which failures become which.
* The install preflight is documented in the order it happens: the
ERTS guard, the release-record lookup and its refusal, the
pending-marker refusal, materialisation, arming - five steps, before
`install_release/1` rather than before any `:release_handler` call,
since the lookup is one. The pending-marker refusal was missing
entirely, and it is what stops a refused caller replacing the
configuration a pending install is about to boot.
* "Anything that takes the system down brings the previous version
back" is false for a restart install. The launcher consumes the
marker pair on the next start and boots the target; it is the
restarts after that one which return to the previous permanent
version. RELEASE.md said the same thing and is corrected with it.
* `bin/castle commit` with no version selects a `:current` release
and exits non-zero when there is none - not "the version running
now", which a system on its permanent release also has.
* `unpacked` is staged and not currently installed, a version a
rollback returned to that state included. `running/1`'s own @doc
already said so.
And the specs: two @specs on a five-arity defaulted definition left
`install/2..4` unspecced, contradicting this branch's own claim that
the whole public surface carries one. All five are now present, checked
with `Code.Typespec.fetch_specs(Castle)` against
`Castle.__info__(:functions)` rather than by reading the source - ExDoc
renders only the widest arity's spec, so the page could not have shown
the gap.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C4oaMvbR1cbxrZBj8qwkqN1 parent 01ccbf2 commit c0f7c07
3 files changed
Lines changed: 240 additions & 73 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
914 | 914 | | |
915 | 915 | | |
916 | 916 | | |
917 | | - | |
918 | | - | |
919 | | - | |
920 | | - | |
921 | | - | |
922 | | - | |
923 | | - | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
924 | 934 | | |
925 | 935 | | |
926 | 936 | | |
| |||
956 | 966 | | |
957 | 967 | | |
958 | 968 | | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
959 | 1017 | | |
960 | 1018 | | |
961 | 1019 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
257 | | - | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
258 | 261 | | |
259 | 262 | | |
260 | 263 | | |
| |||
267 | 270 | | |
268 | 271 | | |
269 | 272 | | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
274 | 281 | | |
275 | 282 | | |
276 | 283 | | |
277 | 284 | | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
289 | 304 | | |
290 | 305 | | |
291 | 306 | | |
| |||
0 commit comments