Skip to content

shard_core: add the /sundial traefik route (route only)#171

Open
ClaydeCode wants to merge 3 commits into
mainfrom
feat/sundial-route
Open

shard_core: add the /sundial traefik route (route only)#171
ClaydeCode wants to merge 3 commits into
mainfrom
feat/sundial-route

Conversation

@ClaydeCode

@ClaydeCode ClaydeCode commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Adds a traefik dynamic-config route so shards running this shard_core version serve Sundial at /sundial, next to the legacy web-terminal.

Scope: route only

  • shard_core/service/traefik_dynamic_config.py — a sundial router PathPrefix(/sundial) at priority 2 (beats web-terminal's / at priority 1), middlewares redirect-sundial-slashstrip-sundial, service http://sundial:80/. Unauthenticated like web-terminal (public UI shell; it calls the authed /core/protected).
  • Tests in tests/test_traefik_dyn_spec.py (green).

Why strip + redirect: the Sundial image serves at root and derives its base path from the browser URL, so StripPrefix(/sundial) lets the root-serving image work behind the subpath, and the bare-path redirect (/sundial/sundial/) ensures base-detection resolves to /sundial/.

Deliberately NOT in this PR

  • No docker-compose.yml service — the deployed shard compose is controller-owned (data/core-versions/<v>/docker-compose.yml); freeshard's compose is a dev/reference file and isn't shipped. The sundial container is added controller-side. Sync gap tracked in FreeshardBase/freeshard-controller#399.
  • No version bump — done at release, not during feature work.

🤖 Generated with Claude Code

ClaydeCode and others added 2 commits July 20, 2026 08:07
Add the sundial container (ghcr.io/freeshardbase/sundial:0.1.0) to the
shard compose stack and route it at PathPrefix(/sundial) with priority 2
so it wins over web-terminal's PathPrefix(/) priority-1 catch-all. The
router chains redirect-sundial-slash (RedirectRegex forcing bare
/sundial to /sundial/) before strip-sundial (StripPrefix /sundial),
because the Sundial image serves at root and derives its base path
client-side from the browser URL: stripping lets the root-serving image
work behind /sundial, and the trailing-slash redirect makes base
detection resolve to /sundial/ instead of / (which would break asset
links and fall through to web-terminal). Like web-terminal, the route is
unauthenticated: Sundial is a public UI shell that itself calls the
authed /core/protected API.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ClaydeCode
ClaydeCode requested a review from max-tet July 20, 2026 08:21
Drop the compose sundial service + the version bump. The deployed shard
compose is owned by the controller (data/core-versions/<v>/docker-compose.yml,
generated by new_core_version.py) — freeshard's docker-compose.yml is not
shipped, so adding the service here is a no-op. The version is bumped at
release, not during feature work. Only the traefik route (which ships in the
shard_core image and is generated at runtime) belongs here.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ClaydeCode ClaydeCode changed the title feat: route Sundial at /sundial alongside legacy web-terminal (0.41.0) shard_core: add the /sundial traefik route (route only) Jul 20, 2026
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