Skip to content

Remove the Loco server (server/): app/ is the only server - #132

Merged
ndbroadbent merged 1 commit into
mainfrom
remove-loco-server
Dec 3, 2026
Merged

ndbroadbent merged 1 commit into
mainfrom
remove-loco-server

Conversation

@ndbroadbent

@ndbroadbent ndbroadbent commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

Production has run app/ (Laravel Rust) since the 3 Dec 2026 cutover, and the visual job has run against it since #117. This PR deletes the Loco server and everything that only served it. Nothing is kept for compatibility.

Removed

  • The visualci_server crate: everything under server/ except server/frontend/. That covers src, config, tests, examples, migration/ (the migration crate), .claude/skills/loco, .cargo, .rustfmt.toml, .gitignore, README and AGENTS.md. Neither app/ nor server/frontend used any of it. The only cross-reference was site.mjs reading the root Cargo.toml, and that file stays.
  • Root Cargo.toml: members are now just crates/*. The workspace deps loco-rs and oauth-provider{,-axum,-mcp,-postgres} are dropped because nothing else used them.
  • Cargo.lock: regenerated on a build box. 302 packages were removed, and nothing was added or changed version.
  • docker/server.Dockerfile. docker/app.Dockerfile no longer needs its sed that cut server out of the workspace members.
  • CI (ci.yml):
    • The server image step and the server output are gone from images.
    • test no longer has a Postgres service or the VISUALCI_JSON_SNAPSHOTS/VISUALCI_EMAIL_SNAPSHOTS env and artifact. It now runs only cargo test --locked --workspace for crates/*.
    • Replacement for the snapshots test used to make: the app job now writes the emails (VISUALCI_EMAIL_SNAPSHOTS, added to app/tests/emails.rs with the old naming and app URL) and uploads them as email-snapshots. The visual job now needs app instead of test. It uploads app/tests/golden/{api,mcp} as json/ (same <kind>/<test>/<name>.json layout) and the emails as emails/.
    • images now also needs app: production's server tests now gate the deploy, as the server's tests did before.
    • The comments are updated. actionlint is clean on ci.yml. release.yml has an existing SC2015 note that this PR doesn't touch.
  • scripts/on-dev: test no longer forces the docspring-dev DB lease, because root tests need no DB. A run naming DATABASE_URL/55433 still does. The header and usage line range are updated.
  • Docs:
    • docs/deploy.md is rewritten for the app image and its workloads (web/worker/scheduler/migrate, from talira-ai/infra k3s/resources/visualci/laravel), the environment, the scheduler's jobs and heartbeats, and the commands.
    • docs/design.md points module paths at app/ and describes the stack as Laravel Rust.
    • docs/design-storage.md now describes the Loco server in the past tense.
    • Also updated: AGENTS.md (app/ tests and their DB, dev port via SERVER_PORT), server/frontend/README.md, the public self-hosting page (app image, its four commands, its env, and the production boot checks), and the vite.config.ts proxy, which now reads SERVER_PORT instead of Loco's PORT.
    • scripts/screenshots/pages.mjs has its comment updated.
    • app/Cargo.toml and a few app test/ui comments no longer point at server/... paths.

Kept on purpose

  • server/frontend/ stays where it is. Other open PRs touch it. A possible follow-up is to move it to a top-level folder such as frontend/, along with docker/app.Dockerfile, the CI paths and skills.mjs. Another possible follow-up is folding app/ into the root workspace now that the Loco server's JSON can't be affected.

References that remain (repo-wide grep for visualci_server, server/src, server/config, server/tests, server.Dockerfile, loco/Loco, -p visualci_server)

  • server/frontend/content/blog/laravel-rust-rewrite.md: the blog post about moving off Loco. This is history and stays.
  • app/src/http/ui/projects.rs:59 and app/src/mcp/mod.rs:878: comments saying a taken slug answers with Loco's EntityAlreadyExists wording. They're still true of the answer's text.
  • app/src/http/ui/mod.rs, app/tests/ui.rs and app/tests/golden/mod.rs: "ported from the Loco server's ..." provenance comments, which are true. Many app/ comments also say "ported from today's server". You said those can stay.
  • docs/deploy.md lists the Loco staff tasks that have no app/ command (see below). docs/design-storage.md mentions the Loco server's queue in the past tense.
  • loco/loco as the Postgres user in ci.yml (visual and journeys services, journeys' DATABASE_URL) and in scripts/ci/visual.sh's default DATABASE_URL. This is the role name docspring-dev's Postgres on 55433 uses, so visual.sh's default works there unchanged. It's not the framework.
  • Cargo.lock has no loco/sea-orm entries left.

Gaps this exposes (app/ doesn't have these yet, and the docs now say so)

  • No staff commands: user:set-staff, org:add-member, org:delete, org:set-plan and stripe:setup were Loco tasks. The Stripe products are still created on first use.
  • No /mcp/admin endpoint and no admin OAuth scope. design.md's Admin tools section is now marked as the design.
  • GitLab is parked in app/, including self-managed GitLab (sc-8634). design.md and deploy.md say so.

For talira infra

talira-ai/infra k3s/resources/visualci/kustomization.yaml already pins only ghcr.io/docspring/visualci-app and visualci-renderer, and a code search for visualci-server there finds nothing. CI stops pushing ghcr.io/docspring/visualci-server:<sha> after this PR. The ghcr package can be deleted whenever you like, since nothing pulls it.

VisualCI review note

The visual build's json/ snapshots now come from app/'s golden files, and emails/ from app/'s renderer. Snapshots the Loco tests recorded that have no golden file will show as removed, and email text where app/'s wording differs will show as changed. Both are expected.

Checks (agents-build-1)

  • Root: cargo fmt --all --check, cargo clippy --locked --workspace --all-targets -D warnings, cargo clippy --locked -p snapshot-diff --no-default-features and cargo test --locked --workspace all pass, with no database.
  • app/, with its own Postgres 17 and RustFS on 59000: cargo fmt --check, cargo clippy --locked --all-targets -D warnings and cargo test --locked pass, 248 tests. The email writer produced the HTML and text pair for every sample.
  • server/frontend: pnpm install --frozen-lockfile, pnpm build (with wasm), vitest run (41 tests) and node scripts/skills.mjs --check pass. No skill: page changed, so there's no plugin bump.

Not merging: Nathan merges under the lock.


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

The visualci_server crate and its migration crate, docker/server.Dockerfile, the server image build, and the test
job's Postgres and JSON/email snapshot steps go. The visual job takes its JSON snapshots from app/'s golden files and
its email snapshots from app/'s emails test (VISUALCI_EMAIL_SNAPSHOTS). Docs, AGENTS.md and scripts/on-dev describe
app/ as the only server. server/frontend stays where it is.

Co-Authored-By: Claude <noreply@anthropic.com>
@visualci-com

visualci-com Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

VisualCI

docspring/visualci · build #115 · 10 changed, 19 added, 13 removed, 310 unchanged · approved by visualci features agent for Nathan Broadbent

This PR vs base: 10 changed, 19 added, 13 removed since #111, across 1 build

Snapshot Before After
json/mcp/a_free_organization_over_its_allowance_gets_a_failed_build_that_says_why/whoami (changed) text text, see the build
json/mcp/a_free_organization_over_its_allowance_gets_a_failed_build_that_says_why/whoami-2 (changed) text text, see the build
json/mcp/a_personal_token_manages_organizations_projects_and_tokens/get_organization (changed) text text, see the build
json/mcp/a_personal_token_manages_organizations_projects_and_tokens/whoami (changed) text text, see the build
json/mcp/a_project_token_acts_as_a_member_not_an_admin/get_organization (changed) text text, see the build
json/mcp/agents_comment_on_snapshots_and_resolve_threads/whoami (changed) text text, see the build
json/mcp/lists_the_tools_each_kind_of_token_can_use/tools-list-project-token (changed) text text, see the build
json/mcp/lists_the_tools_each_kind_of_token_can_use/tools-list-user-token (changed) text text, see the build
and 21 more in the build

Removed: json/api/registers_snapshots_and_asks_for_new_files/get-snapshots, json/mcp/a_local_build_waits_only_for_its_person_and_closes_after_a_week_idle/create_build, json/mcp/a_local_build_waits_only_for_its_person_and_closes_after_a_week_idle/create_build-2, json/mcp/a_local_build_waits_only_for_its_person_and_closes_after_a_week_idle/list_builds, json/mcp/a_local_build_waits_only_for_its_person_and_closes_after_a_week_idle/list_builds-2, json/mcp/a_local_build_waits_only_for_its_person_and_closes_after_a_week_idle/list_builds-3, json/mcp/a_local_build_waits_only_for_its_person_and_closes_after_a_week_idle/list_builds-4, json/mcp/a_local_build_waits_only_for_its_person_and_closes_after_a_week_idle/whoami, json/mcp/a_local_build_waits_only_for_its_person_and_closes_after_a_week_idle/whoami-2, json/mcp/a_local_build_waits_only_for_its_person_and_closes_after_a_week_idle/whoami-3, json/mcp/a_local_build_waits_only_for_its_person_and_closes_after_a_week_idle/whoami-4, json/mcp/a_project_token_reaches_only_its_project/create_organization, json/mcp/a_project_token_reaches_only_its_project/get_project

docspring/visualci · journeys · build #113 · 12 unchanged · no changes

This PR vs base: nothing since #109, across 1 build

Updated as builds change. Agents can review with VisualCI's MCP tools.

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