Skip to content

docs: document the build-time tasks as castle.* - #36

Merged
ausimian merged 1 commit into
feature/upgrade-toolingfrom
issue/9-readme-task-provenance
Aug 25, 2026
Merged

docs: document the build-time tasks as castle.*#36
ausimian merged 1 commit into
feature/upgrade-toolingfrom
issue/9-readme-task-provenance

Conversation

@ausimian

Copy link
Copy Markdown
Owner

Closes #9. Part of #32; rationale in design/upgrade-tooling.md §D1.

What the issue asked for

The README described build-time tooling as Castle's after it moved to Forecastle in 0.3.0. The assumed fix was to correct it to say forecastle.*. ausimian/forecastle#24 renamed the tasks back into the castle.* namespace instead — implemented in Forecastle, named for the package people actually depend on — so, as the issue's own comment predicted, the README becomes correct roughly as first written plus a sentence saying where the tasks come from.

What changed

  • README.mdmix forecastle.relupmix castle.relup, plus a paragraph naming Forecastle as the implementer. The appup compiler is stated separately: it is named for neither package, stays mix compile.appup, and there is no mix castle.appup.
  • lib/castle.ex — the same rename in customize/1's @doc, and the appup prerequisite restructured (see below).
  • AGENTS.md — same rename in the release-integration notes; the "The README is out of date" known limitation replaced, since closing README documents an appup compiler and mix castle.relup task that no longer live in Castle #9 makes it false.
  • RELEASE.md — a ### Changed entry. Forecastle carries the breaking-change note, but nobody depends on Forecastle directly, so a Castle consumer with mix forecastle.relup in their pipeline would never see it.
  • design/upgrade-tooling.md — §1.2's executable workflow step now says mix castle.relup; the Status: line records D1 as implemented. D1's two remaining forecastle.relup mentions are deliberately historical rationale.
  • mix.lock — advanced to a77e97c.

The lockfile, which is the part worth reading

The committed lock pinned Forecastle at e43f8808, whose tree still defines Mix.Tasks.Forecastle.Relup. So a clean checkout of this branch honouring its own lock had no mix castle.relup while every page in it documented one. The suite stayed green throughout, because nothing on this side tests the README's instructions.

Verified from an emptied deps/ and _build/:

resolves
mix castle.relup
mix compile.appup
mix forecastle.relup ❌ (as documented)
mix castle.appup ❌ (as documented)

The range e43f880..a77e97c carries no Forecastle behaviour change beyond the rename — confirmed independently by the reviewer. It also picks up ausimian/forecastle#34.

The paired-repo fix (ausimian/forecastle#34)

Review of this branch caught an error in already-merged Forecastle: its README said "Both are named for Castle", taking in the appup compiler. That is the same mistake this PR fixes on the Castle side, and left alone the two halves of one release would have given a reader contradictory naming rules for the same compiler. Fixed and merged as ausimian/forecastle#34, which this branch then re-pins to.

customize/1 stops restating Forecastle's rules

Three review rounds each corrected the appup prerequisite, and each correction was wrong in a case the next one found:

  1. "an appup for each application being upgraded" — --restart reads none
  2. "auto falls back when it cannot make a transition hot" — a missing owned appup is an error, not a restart
  3. "auto restarts only for ERTS or uncovered non-owned changes" — an appup may itself request restart_emulator

Three rounds of one class is a design signal, not three defects. Castle was restating rules that span ERTS changes, ownership, per-direction classification, appup-supplied restarts, and added/removed applications: a summary short enough for a @doc is wrong somewhere, and a correct one is Forecastle's @moduledoc copied into a repository that cannot see it change — precisely the drift AGENTS.md already warns about for @docs. So it now states the requirement and names mix castle.relup as the authority.

Declined: the reviewer's recommendation to enumerate all five rules here, for that reason.

Deliberately not done

  • No consumer-shaped test fixture. Forecastle's suite exercises the task and compiler, but its fixture takes Forecastle as a path dependency with override: true, so nothing anywhere runs the claim this README makes — that depending on Castle alone is enough. That gap is what let the stale lock through, so AGENTS.md now records it as a known limitation with the near-miss written out, rather than describing it as covered. Building the fixture is a test-infrastructure change, not a documentation fix.
  • design/upgrade-tooling.md not swept. It is the why and says it will not be updated to track implementation; only the executable workflow step and the status line changed.

Verification

  • mix precommit green: 193 tests, 0 failures, credo --strict clean, coverage 90.36% against the 88 floor.
  • Independent Codex adversarial review, 5 rounds to approve: 4 substantive findings fixed (1 high, 3 medium), 1 low fixed, 1 recommendation declined with reasoning above. Final verdict found no additional drifting restatement.

https://claude.ai/code/session_01RotroiBdbidiCRX3KqE3Dy

The README described build-time tooling as Castle's after it had moved
to Forecastle in 0.3.0. The assumed fix was to correct it to say
`forecastle.*`; forecastle#24 renamed the tasks back into the `castle.*`
namespace instead, leaving them implemented in Forecastle, so the README
is correct roughly as first written plus a sentence saying where they
come from.

So `mix forecastle.relup` becomes `mix castle.relup` in the README, in
`customize/1`'s `@doc` and in the release-integration notes. The appup
compiler is called out separately rather than folded in with it: it is
named for what it does rather than for either package, stays
`mix compile.appup`, and there is no `mix castle.appup` to infer.

`RELEASE.md` carries the rename because Castle's consumers are the ones
who run the task and nobody depends on Forecastle directly, so
Forecastle's own breaking-change note reaches nobody who needs it.

`mix.lock` moves to the Forecastle that has the rename, and with it
forecastle#34's correction to Forecastle's own README - which claimed the
appup compiler was named for Castle too, and so contradicted what this
commit writes here. Without the bump the committed lock pinned e43f880,
whose tree still defines `Mix.Tasks.Forecastle.Relup`, so a clean
checkout would have had no `mix castle.relup` while every page here
documented one. Verified from an empty `deps/` and `_build/`:
`castle.relup` and `compile.appup` resolve, `forecastle.relup` and
`castle.appup` do not.

`customize/1` stops restating Forecastle's strategy rules. Three review
rounds each corrected that paragraph and each correction was wrong in a
case the next one found - `--restart` reads no appups, `auto` does not
fall back for a missing owned appup, and an appup may itself ask for
`restart_emulator`. A summary short enough for a `@doc` is wrong
somewhere; a correct one is that task's `@moduledoc` copied into a
repository that cannot see it change, which is the drift AGENTS.md
already warns about. So it states the requirement and names
`mix castle.relup` as the authority for which transitions need one.

The Known limitations entry claiming the README is out of date goes with
it, replaced by the limitation that is actually left. Forecastle's suite
covers the task implementations, but its fixture takes Forecastle as a
path dependency with `override: true`, so nothing anywhere runs the claim
the README makes - that depending on Castle alone is enough to get them.
The stale lock above is that gap producing a real defect with the suite
green, so it is recorded rather than described as covered.

Closes #9

Claude-Session: https://claude.ai/code/session_01RotroiBdbidiCRX3KqE3Dy
@ausimian

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 5742bcc92b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ausimian
ausimian merged commit 7a6d033 into feature/upgrade-tooling Aug 25, 2026
7 checks passed
@ausimian
ausimian deleted the issue/9-readme-task-provenance branch August 25, 2026 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant