NEC-396: install-deployer.sh --check calls the feedback board "running an image the file does not name": STALE_IMAGES ignores Compose profiles #356

Merged
nectenda-agent merged 7 commits from worktree-nec-396-install-deployersh-check-calls-the-feedb into main 2026-11-10 21:58:19 +00:00
Collaborator

Task: NEC-396 — https://projectron.nerchure.com/tasks/418

install-deployer.sh --check called the feedback board on accounts "running an image the file does not name" on every run: STALE_IMAGES compared running images with docker compose config --images, which lists only the active profiles, and the board runs in profile board while .env says COMPOSE_PROFILES=identity. It now asks with --profile "*" (every profile's images) and --no-env-resolution (one missing env_file, such as board.env on a host without the board, fails the whole listing otherwise). Riding along, NEC-398: the ops box's --check counted up and declared differently (a replica or a by-name profile service failed the box), printed ok whatever the counts when an image was unnamed (2/3 up passed), and passed 0/0 when Compose could not list anything. Both counts are now per service against one list; a running service the file declares in no profile fails by name; a list Compose could not give fails as such. All checked against real Compose v5.3.1 with the installer's own snippets and throwaway local containers; every new rule mutation-checked. Nothing is installed after merge; docs/changes/NEC-396-stale-images-profiles/spec.md lists the read-only --check to run.

Spec: docs/changes/NEC-396-stale-images-profiles/spec.md

Also fixes NEC-398: install-deployer.sh --check on the ops box counts up and declared differently: a profile service or a scaled one reads as needing attention

Changelog

NONE

Task: NEC-396 — https://projectron.nerchure.com/tasks/418 install-deployer.sh --check called the feedback board on accounts "running an image the file does not name" on every run: STALE_IMAGES compared running images with `docker compose config --images`, which lists only the active profiles, and the board runs in profile board while .env says COMPOSE_PROFILES=identity. It now asks with --profile "*" (every profile's images) and --no-env-resolution (one missing env_file, such as board.env on a host without the board, fails the whole listing otherwise). Riding along, NEC-398: the ops box's --check counted up and declared differently (a replica or a by-name profile service failed the box), printed ok whatever the counts when an image was unnamed (2/3 up passed), and passed 0/0 when Compose could not list anything. Both counts are now per service against one list; a running service the file declares in no profile fails by name; a list Compose could not give fails as such. All checked against real Compose v5.3.1 with the installer's own snippets and throwaway local containers; every new rule mutation-checked. Nothing is installed after merge; docs/changes/NEC-396-stale-images-profiles/spec.md lists the read-only --check to run. Spec: `docs/changes/NEC-396-stale-images-profiles/spec.md` Also fixes NEC-398: install-deployer.sh --check on the ops box counts up and declared differently: a profile service or a scaled one reads as needing attention ## Changelog NONE
install-deployer.sh's STALE_IMAGES compared running images with
`docker compose config --images`, which lists the active profiles only.
accounts' .env says COMPOSE_PROFILES=identity and the board runs there in
profile `board`, started by name by its own deployer, so every --check
called it "running an image the file does not name" while it ran exactly
the tag .env pins. A note that is always there hides the real one.

Ask with --profile "*" so every service's image counts, and with
--no-env-resolution because Compose fails the whole listing over one
missing env_file, which board.env is on an identity host with no board.
The listing now runs once per host rather than once per running image.

The fake docker answers `config --images` per profile, as Compose v5.3.1
does, and four tests cover both --check branches, a board on another tag
(still reported, alone), and a host without board.env. Each was
mutation-checked against the change it defends.

Task: NEC-396

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EV8ztbNSLvgwmCT4jFUWfh
The ops-branch test asserted `nothing pending`, which held only because
the fake answers both of that branch's service counts with 0. On real
Compose (v5.3.1) a service started by name in an inactive profile makes
`up` exceed `declared`, so the same line would need attention. The ops
compose file has no profiles today, so nothing is wrong on a host; the
test now asserts that the image is not called unnamed, and the spec says
what it does not cover, and what an older Compose that takes `*` as a
literal profile would report.

Found by the review of this card.

Task: NEC-396

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EV8ztbNSLvgwmCT4jFUWfh
docs/manual-testing.md recorded that every --check on accounts calls the
feedback board unnamed. That is what NEC-396 ends, so the record now says
it happened that day and why, and that a --check from a later main no
longer says it.

Task: NEC-396

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EV8ztbNSLvgwmCT4jFUWfh
The ops box's --check compared `up`, every container Compose lists, with
`declared`, the active profiles' services. A replica, or a service from
another profile started by name, read as more up than declared and failed
the box. And an unnamed image was asked about before the counts, so its
`ok` line was printed whatever they said: 2/3 up passed.

Both counts are now per service, against the same active list, and only
every declared service up earns an `ok`; an unnamed image stays a note on
it. A running service the file declares in no profile fails by name. It
used to fail only by accident of the count, and Compose does list one
whose service has left the file (measured on v5.3.1 with throwaway
containers, running the installer's own snippet). config --services reads
no env file, so a missing one cannot empty these lists.

The fake docker answers config --services per profile and ps per
container. Five tests, each mutation-checked against the rule it defends.

Task: NEC-396
Also-fixes: NEC-398

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EV8ztbNSLvgwmCT4jFUWfh
docs/manual-testing.md said a --check from a later main no longer
reports the board. No --check with NEC-396 has run on accounts, and the
hosts' Compose is unread, so it now says the change is made and that
seeing it is the spec's post-merge step. Found by the second review.

Task: NEC-396

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EV8ztbNSLvgwmCT4jFUWfh
A required ${X:?} that .env leaves unset fails both `config --services`
listings while every container runs on, and `ps` with them or not. The
ops branch read the silence as empty lists, counted 0 declared and 0 up,
and passed the box as `ok` with `all hosts verified`. That predates
NEC-396, but it made "every declared service up earns an ok" untrue.

A list Compose could not give is now `unread=` and fails as such; a file
declaring no service for its active profiles fails too; and only the
"*" listing failing (one broken service in a profile left off) says so
rather than calling every other profile's running service undeclared.
Checked with the installer's own snippet against real Compose v5.3.1 on
throwaway local containers.

The fake ops host now declares and runs Caddy by default rather than
answering nothing, and every earlier ops test holds against it. Three
tests, each mutation-checked. Found by the second review.

Task: NEC-396
Also-fixes: NEC-398

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EV8ztbNSLvgwmCT4jFUWfh
List the production steps for NEC-398's ops checks too
All checks were successful
Release note / release-note (pull_request) Successful in 17s
CI / build (pull_request) Successful in 4m36s
CI / e2e (pull_request) Successful in 17m15s
CI / promote (pull_request) Has been skipped
CI / build (push) Successful in 5m0s
CI / e2e (push) Successful in 17m13s
CI / promote (push) Successful in 43s
516ef798bf
The spec's after-merge section covered only the image note. It now says
what glitchtip's line should read, what "Compose could not list" means
and how to read why, that nothing is installed and nothing interrupts
traffic, and that one host has already answered this branch's checks:
a hand run reached glitchtip by mistake, read-only, and said 7/7 up.

Task: NEC-396

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EV8ztbNSLvgwmCT4jFUWfh
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Nectenda/nectenda!356
No description provided.