Skip to content

rename: compose service tower-finder becomes server (86c990cfh) - #212

Merged
Babissimo merged 1 commit into
mainfrom
rename/compose-service-server
Aug 20, 2026
Merged

Babissimo merged 1 commit into
mainfrom
rename/compose-service-server

Conversation

@Babissimo

Copy link
Copy Markdown
Contributor

Task 7 of the retina-server rename (86c990cfh), and the last functional part of it. Tasks 1 to 6 are done: all three droplets already serve from /opt/retina-server with COMPOSE_PROJECT_NAME=retina-server.

What changes

  • Compose service tower-finder becomes server, across all five compose files.
  • Images become retina-server:latest and retina-server-fleet:latest.
  • Both deploy paths named the service on the compose command line (up -d --build tower-finder, exec -T tower-finder), so ci.yml and deploy-test.yml move with it or the next deploy fails outright.
  • pre-deploy.sh, rollback.sh, classify-migration-gap.py and the justfile follow.

The service key doubles as a hostname on the compose network, so the fleet's FLEET_HOST and FLEET_VALIDATION_URL move in the same change; they resolve the app by service name.

server rather than retina-server: inside a project already called retina-server the pair reads redundantly, and docker compose logs server is what people already type.

What deliberately does not change

Four HOST_LEGACY_REDIRECT values (tower-finder.retina.fm, the staging and test variants, and tower-finder.localhost). These are vhost hostnames that resolve to the separate tower-finder-service stack, not references to this service. A blanket substitution would have taken out a production redirect; a count-asserting patch caught that image: tower-finder:latest also appears inside a comment, which a plain replace would have hit twice.

Also untouched: the tower-finder-service comment in the parity gate, pin/tower-finder (a real retina-analytics branch), the frontend npm package name and CSV download filenames, and the dated design notes. Those belong to the documentation sweep (task 9) or are not this service.

The parity gate

Its allowlist is keyed on services.tower-finder.*, so left alone it would have gone on passing while covering nothing. Seven regex literals and one dict-key access are updated. The dict access does not match the regex shape, so a regex-only substitution misses it and the gate raises KeyError on the next run.

Rollback images pre-tagged before this lands

pre-deploy.sh writes retina-server:rollback from now on, but the previous deploy's rollback point exists only under the old name, so the first deploy after this would have had nothing to roll back to. Pre-tagged on retina-test and retina-prod.

staging had none to tag, which is not damage: pre-deploy.sh runs solely in deploy-production, so staging has no rollback point by design.

One note deleted rather than reversed

ONBOARDING warned that docker compose logs server returns nothing and reads as an all-clear. Measured on compose v2: an unknown service name errors with no such service, while a known service with nothing running is silent. So after this change the old name fails loudly and the trap it described no longer exists. Deleted rather than rewritten in the other direction.

Verification

  • docker compose config --services per overlay: server for prod, fleet server for staging, test and local. Merged prod config resolves image: retina-server:latest.
  • deploy/check-env-parity.py exits 0.
  • pre-commit run --all-files passes.
  • Full backend suite green: rc=0, 467s.
  • Repo-wide sweep finds no operational reference to the old service name left.

Heads-up for anyone with commands in flight

docker compose logs tower-finder and docker compose exec tower-finder ... stop working once this deploys; the service is server. 86cb6385b's procedure carries two such commands and has been annotated.

@claude

claude Bot commented Aug 20, 2026

Copy link
Copy Markdown

Claude finished @Babissimo's task in 1m 40s —— View job


Claude finished the code review

  • Gather context (PR description, changed files)
  • Understand the request (custom instruction: code review this PR)
  • Review the diff against origin/main for correctness and consistency
  • Post findings

Review

This is a clean, mechanical rename with no functional issues found. I verified:

  • Compose service rename (tower-finderserver) is applied consistently across all five compose files, including FLEET_HOST, FLEET_VALIDATION_URL, and depends_on in the base docker-compose.yml.
  • Image names (retina-server:latest, retina-server-fleet:latest) are consistent between docker-compose.yml, deploy/pre-deploy.sh, and deploy/rollback.sh — the rollback tooling's IMAGE_NAME/FLEET_IMAGE_NAME/COMPOSE_SERVICE variables all line up correctly with what the compose files now build/tag.
  • deploy/check-env-parity.py: all seven regex literals in ALLOWED_DIVERGENCE and the dict-key access at line 218 (compose_config(overlay)["services"]["server"]["environment"]) are updated — confirmed this would otherwise KeyError as the PR description notes, since a regex-only sub would've missed the dict access.
  • ci.yml / deploy-test.yml: docker compose up -d --build server, docker compose exec -T server ..., and the standalone docker build -t retina-server:ci . are all updated on both the staging and production deploy paths.
  • justfile: the hardcoded exec -T server calls and the log-inspection hint text are updated; deploy-test-logs service="" takes the service name as a runtime arg, so there's no default to miss there.
  • Repo-wide sweep for leftover tower-finder references turned up only the items the PR description says are intentionally untouched: the four HOST_LEGACY_REDIRECT hostnames, the tower-finder-service nginx upstream/comment (a separate stack), pin/tower-finder (retina-analytics branch), the frontend package.json/CSV filenames, and the dated docs/design-notes/ files. No unexpected leftovers.
  • backend/tests/test_golden_path.py and the two docs/*.md files are docstring/prose-only updates and match the new names correctly.

No bugs, inconsistencies, or missed spots found. Nothing to fix here.

Task 7, the last functional part of the rename. The service key doubles as
a hostname on the compose network, so the fleet's FLEET_HOST and
FLEET_VALIDATION_URL move in the same change or the fleet cannot reach the
app. Images become retina-server:latest and retina-server-fleet:latest.

server rather than retina-server: inside a project already called
retina-server the pair reads redundantly, and `docker compose logs server`
is what people already type.

The parity gate's allowlist is keyed on services.tower-finder.*, so it
would have gone on passing while covering nothing. Its regex literals and
the one dict-key access are both updated; a regex-only substitution misses
the latter and the gate raises KeyError on the next run. The comment
naming tower-finder-service is left alone, as are the four
HOST_LEGACY_REDIRECT values: those are vhost hostnames that resolve to the
separate service stack, not references to this service.

Both deploy paths named the service on the compose command line, so
ci.yml and deploy-test.yml move too or the next deploy fails outright.

Rollback images were pre-tagged on every droplet before this lands, since
pre-deploy.sh writes retina-server:rollback from now on and the previous
deploy's rollback point exists only under the old name. staging has none
to tag: pre-deploy.sh runs solely in deploy-production, so staging has no
rollback point by design rather than by loss.

The ONBOARDING note warning that `docker compose logs server` returns
nothing is deleted rather than reversed. Measured on compose v2: an
unknown service name errors with "no such service", so after this change
the old name fails loudly instead of reading as a false all-clear. The
trap it described no longer exists.
@Babissimo
Babissimo force-pushed the rename/compose-service-server branch from 6cdf33d to d9e728f Compare August 20, 2026 16:44
@claude

claude Bot commented Aug 20, 2026

Copy link
Copy Markdown

Claude finished @Babissimo's task in 1m 13s —— View job


Code review

  • Gather context (PR description, changed files)
  • Understand the request (custom instruction: /code-review this PR)
  • Review the diff against origin/main for correctness and consistency
  • Post findings

No new commits since the prior automated review (still the single d9e728f commit, same 16-file/+77/-59 diff). Re-checked in full, including the --remove-orphans addition in ci.yml/deploy-test.yml that wasn't called out explicitly last time.

Verified:

  • Compose service rename (tower-finderserver) is consistent across all five compose files, depends_on, FLEET_HOST, and FLEET_VALIDATION_URL.
  • --remove-orphans addition in ci.yml (staging + prod jobs) and deploy-test.yml is sound: container_name is pinned per overlay, so the old tower-finder service's container is an orphan holding the exact name server needs. Without --remove-orphans, docker compose up -d --build server would fail on a name conflict on the first deploy after this lands. This is a real, necessary addition, not scope creep.
  • Image names (retina-server:latest, retina-server-fleet:latest) line up across docker-compose.yml, deploy/pre-deploy.sh, and deploy/rollback.sh.
  • deploy/check-env-parity.py: all seven ALLOWED_DIVERGENCE regexes plus the ["services"]["server"]["environment"] dict-key access (line 218) are updated — a regex-only substitution would have missed the dict access and produced a KeyError, as the PR description notes.
  • ci.yml / deploy-test.yml: up -d --build --remove-orphans server, exec -T server, and docker build -t retina-server:ci . all updated on both deploy paths.
  • justfile: hardcoded exec -T server calls and log-hint text updated; deploy-test-logs service="" takes the service name at runtime, so nothing to miss there.
  • Repo-wide sweep confirms the only remaining tower-finder strings are the ones the PR explicitly calls out as intentional: four HOST_LEGACY_REDIRECT hostnames (separate tower-finder-service vhost stack), the tower-finder-service comment in the parity gate, pin/tower-finder (retina-analytics branch), and the dated docs/design-notes/*.md files. No stray operational references anywhere else.
  • backend/tests/test_golden_path.py and docs/alerting.md/docs/runbook.md prose updates match the new naming correctly.

No bugs or inconsistencies found. Nothing to fix.

@Babissimo
Babissimo merged commit 123015c into main Aug 20, 2026
17 checks passed
Babissimo added a commit that referenced this pull request Aug 20, 2026
…215)

#212 deleted this note on the grounds that the rename resolved the trap it
described. That was wrong, and the reasoning behind it was too: the failure
was never that compose returns nothing. It is that `no such service` goes to
stderr, so a grep over the output matches nothing and reads as a clean "no
errors in the logs". That is what produced a false all-clear on production on
2026-08-14.

The rename does not remove that trap, it swaps which name triggers it, and
the new losing guess is `tower-finder`: the name in every saved command,
older ticket and operator's memory. So the warning is worth more after the
rename than before it, not less.
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