Commit Graph
2397 Commits
Author SHA1 Message Date
Juan Denis d67e5d07d0 fix: complete audit follow-ups and add regression coverage
Centralize backup schedule calculations and shared request/form flows, encode query values, and move repository finalization into its service. Add browser CI coverage, repair stale test fixtures, and provide opt-in request and build measurement tools.
2026-09-05 14:41:15 -04:00
Juan Denis aae180aaef docs: refresh migration inventory after reuse cleanup 2026-09-05 13:55:48 -04:00
Juan Denis 92a3ffe6c3 refactor: consolidate frontend reuse and eliminate lint warnings 2026-09-05 05:24:35 -04:00
Juan Denis f490d75bee refactor: share backend lifecycle and fleet metrics operations 2026-09-05 05:06:41 -04:00
Juan Denis 3068fc81f0 docs: record security review and remediation handoff
Preserve synthetic historical probes, document fixes and validation, and list upgrade behavior and remaining hardening work with the local implementation commits.
2026-09-05 04:30:47 -04:00
Juan Denis da0f18146b ci(security): expand scans and narrow Bandit exceptions
Schedule dependency and extension scans, audit production frontend dependencies, and replace category suppressions with reviewed function-specific exceptions. Preserve full reports and test the exception gate.
2026-09-05 04:30:11 -04:00
Juan Denis c62358de73 fix(settings): restore table surfaces and improve access review
Expose MFA and passkey enrollment, use shared confirmations and locale formatting, and guard pending user and invitation actions. Add Chromium regressions for both themes and failure states to frontend CI.
2026-09-05 04:30:05 -04:00
Juan Denis 6bf3490345 fix(ai): enforce resource access and bounded protected chat
Scope built-in tools to the live caller, recheck write authorization after confirmation, redact structured results, and fail closed when protections fail. Bound chat inputs, concurrent turns, and cancellation-aware streaming queues.
2026-09-05 04:29:45 -04:00
Juan Denis 785c5780d3 fix(sockets): authorize subscriptions and revalidate event delivery
Require valid access-token sessions, scope application and server rooms, and enforce run visibility consistently across sockets and polling. Add positive-delivery and cross-user isolation regressions.
2026-09-05 04:29:44 -04:00
Juan Denis c8c93a8e0c fix(auth): enforce MFA, scoped keys, and revocable sessions
Add session-family revocation and migration 097, require current credentials for password changes, constrain API keys, and require verified WebAuthn authentication. Update browser token handling and add boundary regressions. Existing JWTs require fresh login; restricted keys deny undeclared endpoints.
2026-09-05 04:29:16 -04:00
github-actions[bot] 63db42ba21 chore: bump version to 1.9.26 [skip ci] 2026-09-05 05:11:13 +00:00
Juan Denis 6c2220c5a1 Merge pull request #130 from jhd3197/dependabot/npm_and_yarn/frontend/humanfs/node-0.16.8
chore(deps-dev): bump @humanfs/node from 0.16.7 to 0.16.8 in /frontend
2026-09-05 01:07:51 -04:00
Juan Denis 03627a64e1 Merge pull request #135 from jhd3197/dev
Dev
v1.9.25
2026-09-05 01:07:23 -04:00
github-actions[bot] 821713098b chore: bump version to 1.9.25 [skip ci] 2026-09-05 04:31:37 +00:00
Juan Denis 18800085e1 Merge remote-tracking branch 'origin/main' into dev 2026-09-05 00:25:19 -04:00
Juan DenisandClaude Fable 5.1 48899d5849 fix(demo-deploy): guard repo params; time-box the distro integration job
Copilot review on #135:
- `_repo_steps()` now falls back to port 3000 when `params.port` is not
  numeric instead of raising ValueError mid-stream.
- `params.pace` must be a positive number; zero, negative and non-numeric
  values are ignored so `line_delay` can never go negative.

CI: the ubuntu integration job sat in "Install Python & pytest" for ~2 h on
a wedged apt mirror, and Version Bump waits on every sibling. Cap the job at
15 minutes and give apt retries, a fetch timeout and non-interactive dpkg
conffile options.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LVRnRXqNMZagqQ3RTqG5pz
2026-09-05 00:25:18 -04:00
Juan DenisandClaude Fable 5.1 4a4742989e fix(frontend): keep CI green after the responsive-nav merge
- The scroll-fade masks added in #134 used `#000`, which the hex-literal
  ratchet in check-frontend-boundaries.mjs counts (design-system 2→6,
  databases 5→9). Masks only need an opaque colour, so use the keyword.
- intl.test.mjs compared "60 days ago" in en-US vs es; on any date whose
  month equals its day-of-month (7 July) the two short dates coincide and the
  test fails. Pin the date instead.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LVRnRXqNMZagqQ3RTqG5pz
2026-09-04 22:35:20 -04:00
Juan DenisandClaude Fable 5.1 3468afe48f test: read nginx configs as UTF-8 in CSP header test
The shipped nginx configs contain box-drawing characters; a bare
read_text() falls back to cp1252 on Windows and raises UnicodeDecodeError.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LVRnRXqNMZagqQ3RTqG5pz
2026-09-04 22:21:04 -04:00
Rebertt RodriguesandJuan Denis f2f7a9294b fix: stabilize responsive navigation and database toolbar (#134)
* fix(navigation): stabilize overflow tab measurement

* fix(databases): prevent mobile toolbar overlap

* fix(navigation): keep mobile actions accessible

* fix(ui): refine mobile scroll affordance

* fix(layout): align status bar with expanded rail

---------

Co-authored-by: Juan Denis <jhd3197@gmail.com>
2026-09-04 22:20:25 -04:00
Rebertt RodriguesandJuan Denis a092ba1afe fix(dashboard): avoid content blockers on metrics history requests (#133)
Co-authored-by: Juan Denis <jhd3197@gmail.com>
2026-09-04 22:20:22 -04:00
Rebertt RodriguesandJuan Denis 763f555d9a fix(fonts): replace corrupted IBM Plex Sans assets (#132)
Co-authored-by: Juan Denis <jhd3197@gmail.com>
2026-09-04 22:20:19 -04:00
Rebertt Rodrigues 498c249536 fix(github): repair app manifest setup flow (#131) 2026-09-04 22:20:16 -04:00
Juan DenisandClaude Fable 5.1 c2f34bf136 feat(deploy-console): parameterised repo simulated deployment
Add a `repo` scenario to the simulated deployments so a demo run reads like a
real deploy of a named service: clone, validate, build, route, start and
health-check lines carry the app's own name, repository, branch, port and
health path. The simulate endpoint also accepts a `title` (shown verbatim by
the Deploy Console) and `params.pace` to slow the stream for recordings.

Used by the walkthrough videos to show the Deploy Console streaming live
inside the read-only demo image, which has no git or docker.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SiGEPH8S231SMwFWTd76b6
2026-09-04 21:12:18 -04:00
Juan DenisandClaude Opus 5 eeeba465ba feat(connect): tell Cloud every id we hold for each agent
ServerKit Cloud counts a host once per organisation however many panels
report it, and it can only do that if it can recognise the same machine
twice. This panel was reporting each agent's own id and nothing else, so an
agent managed by two panels — or re-reported after a re-pair — was counted as
two servers and took two slots off the customer's plan.

The agent's machine id and key fingerprint are already on the enrolment row it
paired with, keyed by the server it was claimed onto. Both now go out with
every host entry. An agent with no enrolment row is still reported, with the
ids we have: a host left out of the list is a server Cloud cannot show at all.

Files that matter:
- backend/app/services/connect_client.py  _gather_hosts reads the enrolment
- backend/tests/test_connect_hosts.py

Verified: backend/venv/Scripts/python -m pytest tests/test_connect_hosts.py -q
→ 2 passed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013S1pQEJFU8P7US5MRpJFmi
2026-09-04 21:11:50 -04:00
dependabot[bot] af11e98765 chore(deps-dev): bump @humanfs/node from 0.16.7 to 0.16.8 in /frontend
Bumps [@humanfs/node](https://github.com/humanwhocodes/humanfs/tree/HEAD/packages/node) from 0.16.7 to 0.16.8.
- [Release notes](https://github.com/humanwhocodes/humanfs/releases)
- [Changelog](https://github.com/humanwhocodes/humanfs/blob/main/packages/node/CHANGELOG.md)
- [Commits](https://github.com/humanwhocodes/humanfs/commits/node-v0.16.8/packages/node)

---
updated-dependencies:
- dependency-name: "@humanfs/node"
  dependency-version: 0.16.8
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-03 04:59:59 +00:00
Juan Denis 05a96ab185 Merge pull request #129 from jhd3197/dev
Pair a panel with ServerKit Cloud from the CLI
v1.9.24
2026-09-03 00:57:51 -04:00
github-actions[bot] 745905f281 chore: bump version to 1.9.24 [skip ci] 2026-09-03 04:52:52 +00:00
Juan DenisandClaude Fable 5.1 5675f50c88 fix(cli): dispatch the connect verb through the wrapper
backend/cli.py gained `connect` (with status/doctor/disconnect) for the
ServerKit Cloud pairing but the `serverkit` wrapper never learned it, so
`serverkit connect` fell through to "unknown command" and the wrapper
dispatch census failed the Scripts CI suite. Add it to the help, the
dispatch case and bash completion; the passthrough test covers it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LGmHp7mZ2wSeA6z8BXZVxh
2026-09-03 00:46:25 -04:00
Juan Denis 4eaf4e9801 Merge branch 'fix/doctor-host-install' into dev 2026-09-03 00:37:55 -04:00
Juan DenisandClaude Fable 5.1 73c962b2d2 fix(release): keep frontend/src image assets in the release tarball (#127)
build-release.sh deleted every png/jpg in the staged tree except under
frontend/dist. That emptied frontend/src/assets/extension-icons in the
shipped /opt/serverkit, so the tree could no longer rebuild its own
frontend: ExtensionIcons.js imports 18 of those files and any `npm run
build` from the release (which `serverkit doctor --fix` triggered through
the Dockerfile) died on unresolved imports. Leave the whole frontend/ tree
alone; the tar excludes already keep docs and dev screenshots out.

Guarded in test_release_workflow.sh.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LGmHp7mZ2wSeA6z8BXZVxh
2026-09-03 00:36:11 -04:00
Juan DenisandClaude Fable 5.1 c16c59644f fix(cli): doctor and start/stop read the frontend layout off nginx (#127)
`serverkit doctor` assumed the frontend is the `serverkit-frontend`
container. On a host install that container never exists: install.sh has
nginx serve frontend/dist from disk, and the container only lives under the
opt-in `legacy-frontend` compose profile. Doctor flagged a phantom issue on
every host install, and `--fix` "repaired" it with a bare `docker compose
up -d` in /opt/serverkit, which does not start that container at all: it
builds the whole all-in-one panel image, which would then collide with the
systemd backend on :5000. start/stop/restart/status/logs carried the same
assumption.

Add `frontend_mode`, which reads the layout off the serverkit vhost (a
`root .../frontend/dist` is static, a `proxy_pass` on / is the legacy
container, neither is unknown), and make every command key off it. Static
installs are checked for the bundle nginx actually serves; when it is
missing doctor names the command that restores it (`serverkit update`)
instead of promising an auto-fix. The legacy path targets the profile's
service (`docker compose --profile legacy-frontend up -d frontend`), never
the panel image.

Tests: static install passes with no compose call, missing bundle under
--fix hints at update and still never calls compose, frontend_mode
classifies all three layouts, and an awk guard fails the suite if a bare
compose call from $INSTALL_DIR comes back.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LGmHp7mZ2wSeA6z8BXZVxh
2026-09-03 00:36:11 -04:00
github-actions[bot] 8df4dce260 chore: bump version to 1.9.23 [skip ci] 2026-09-03 04:26:18 +00:00
Juan Denis 1d4b60f4cc Merge branch 'main' into dev 2026-09-03 00:19:44 -04:00
Juan DenisandClaude Opus 5 4dfb468f77 chore(connect): regenerate the surface, inventory and locale files
Generated files the connect work moved and nobody re-ran:

- docs/API_SURFACE.md gains GET /connect/status
- docs/MIGRATION_INVENTORY.md: the hand-shaped error bodies count is 1145
  (ceiling 1150) for the 409 the backups PUT now answers when Cloud owns
  the destination
- en.json gains app.backups.storageManagedByCloud, so the sentence the
  read-only backup form shows is translatable like every other string

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018q56AfqpgKjio4n9KYubvZ
2026-09-03 00:19:35 -04:00
Juan DenisandClaude Opus 5 1f92ae1c91 fix(connect): use the policy door, the privilege wrapper, and safe reads
Four things the guards and the review caught, all of them real:

- app/api/connect.py: GET /connect/status carried a bare @jwt_required(),
  which the jwt-only census forbids for a new route (609 vs a ceiling of
  608). It is an admin read of pairing state, so it takes @admin_required
  — the same door the rest of the admin surface uses, API-key capable by
  way of auth_required() like its neighbours.
- connect_policy._systemctl ran systemctl through raw subprocess, one over
  the raw-subprocess ceiling. run_privileged() adds sudo when the panel is
  not root, so the fail2ban repair now works off a packaged install
  instead of reporting a permission error nobody can act on.
- connect_client.hello_headers assumed the end-to-end key fields were
  always there. build_hello() drops them rather than fail the connection,
  so a panel that could not read its X25519 key would KeyError on the
  long-poll fallback — exactly the path taken when things are already bad.
- status() called resolve_cloud_url(), which raises on a URL with no
  scheme. A typo in SERVERKIT_CLOUD_URL should surface when you pair, not
  turn `serverkit connect status` and the Settings panel into an error.

Both connect threads are now classified in the thread-ownership registry:
the relay loop is a process loop, and a signed command is bounded delivery
whose record lives in the control plane.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018q56AfqpgKjio4n9KYubvZ
2026-09-03 00:19:27 -04:00
Juan DenisandClaude Opus 5 fd64ec09ba feat(connect): open commands sealed to this server's own key
A second keypair, X25519, published in the signed hello with an Ed25519
signature over it so ServerKit Cloud can tell it is really ours — and so a
relay cannot substitute one of its own, because it does not have this
panel's identity key.

Command arguments then arrive encrypted to that key. The relay carries a
blob. That is what makes it safe for Cloud to send an object-storage
credential through it, which until now crossed the relay in the clear.

A payload this panel cannot open is a refused command with a sentence
saying what to do, never a handler running on arguments we guessed at.

- backend/app/services/connect_keys.py — the key (a raw 32-byte file, not
  PEM: it is a key with no certificate story around it), the signed hello
  fields, and open_sealed.
- backend/app/services/connect_client.py — publishes it on WebSocket and
  on the long-poll fallback, so limited mode is not quietly less private.
- backend/app/services/connect_commands.py — unseal before the handler.
- backend/tests/test_connect_sealing.py — 13 tests, including the control plane's
  half of the scheme written independently from the specification, so the two
  implementations cannot drift apart silently.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018q56AfqpgKjio4n9KYubvZ
2026-09-02 17:00:00 -04:00
Juan DenisandClaude Opus 5 7ebc2aba34 feat(connect): report this server's policy facts to ServerKit Cloud
A facts document — firewall, SSH port, brute-force protection, the panel's
two-factor policy, its version, and when its backups last succeeded and were
verified — goes up the policy stream on connect and every six hours.
`policy.report` sends one now, which is what "Check now" presses.

The important part is what it does not claim. Each bundle is advertised in
`capabilities` only when its probe actually answered, so a rule Cloud cannot
get facts for reads "not checkable here" rather than marking a healthy
server non-compliant. Pending OS security updates have no probe here, so
that bundle is never advertised and its handler refuses honestly instead of
pretending.

Four repairs, each the panel's own path with its own refusals:
FirewallService.enable (which declines to lock SSH out), the require-2FA
policy with its grace window, systemctl start fail2ban, and the offsite
verification.

- backend/app/services/connect_policy.py
- backend/app/services/connect_commands.py — the three consent bundles
- backend/app/services/connect_client.py — the policy stream
- backend/tests/test_connect_policy.py — 17 tests, nothing touches the host

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018q56AfqpgKjio4n9KYubvZ
2026-09-02 16:00:04 -04:00
Juan DenisandClaude Opus 5 8fe469e1fe feat(connect): let ServerKit Cloud set where this server backs up
The panel can now run the signed commands Cloud sends, and the first four
of them are the Storage Hub's. A destination assigned in Cloud is tested
here before it is saved, written as `s3.path_prefix` (which every upload,
list and verify path already honoured), and reported back on a `storage`
stream. Unassigning hands it back and deletes nothing in the bucket.

- backend/app/services/connect_commands.py — verify a command JWT against
  ServerKit Cloud's JWKS (signature, audience, exp, nonce, consent scope), run the
  handler on its own thread, report running/succeeded/failed. An action
  this version does not know fails with a sentence saying so.
- backend/app/services/connect_storage.py — storage.assign/unassign/
  test/report, and the snapshot the storage stream carries.
- backend/app/services/connect_client.py — handle `command` opens, fetch
  the JWKS per connection, publish a storage snapshot on connect and
  every five minutes.
- backend/app/api/backups.py — GET /storage says when Cloud owns the
  destination; PUT answers 409 rather than letting two writers race.
- frontend/src/pages/Backups.jsx — the local form is read-only while
  Cloud manages it, with the sentence that says how to take it back.
- backend/tests/test_connect_storage.py — 23 tests, no network.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018q56AfqpgKjio4n9KYubvZ
2026-09-02 15:19:38 -04:00
Juan DenisandClaude Opus 5 bc10c51a16 feat(connect): keep the connect client current from the signed feed
On reconnect the client asks ServerKit Cloud what the current release is and
verifies the answer against the JWKS it already trusts before believing it —
the artefact lives on a CDN we do not control, so the signature is the only
reason to trust the URL in it.

- services/connect_updates.py  fetch, verify, compare, and act: an install
  the panel can update runs its own update path; one it cannot (Docker,
  non-root) says exactly what to run on the host instead
- services/connect_client.py   ask once per reconnect, at most hourly, and
  never let a failed check take the connection down with it

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018q56AfqpgKjio4n9KYubvZ
2026-09-02 12:03:11 -04:00
Juan DenisandClaude Opus 5 1fbdddecd2 feat(connect): send ServerKit Cloud one metrics summary a minute
The panel already samples the host every 60 s into MetricsHistory for its own
charts. connect_metrics.MetricsPublisher turns the newest of those rows into
the summary Cloud expects, adds the counts Cloud alerts on (containers,
unhealthy apps, certificates near expiry, backup age) and hands it to the
relay socket on a `metrics` stream.

- services/connect_metrics.py  build, buffer (five minutes, then drop rather
  than send late), and apply the interval Cloud asks for
- services/connect_client.py   publish on the interval from the WS loop and
  read the stream close for Cloud's answer

Nothing new is collected: a minute the panel did not record is a minute Cloud
does not hear about. Every count source is optional — a panel without Docker,
domains or a backup policy sends null for those fields instead of failing the
whole summary.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018q56AfqpgKjio4n9KYubvZ
2026-09-02 11:26:30 -04:00
Juan Denis 232c6978c5 feat(connect): hold a live outbound connection to the relay
- app/services/connect_client.py: RelayClient background thread (WS hello
  signed device_id|ts|nonce, 20s pings, jittered 1s->60s backoff with reset
  after 2 stable minutes, >6 reconnects/10min flap log, close-code ->
  state_reason mapping, terminal revoked, long-poll fallback with 15min WS
  re-probe); connect-state.json runtime state merged into status();
  disconnect() stops the client and removes the state file; run_doctor()
  implements the connect check table
- app/services/connect_keys.py: strict load_keypair() for the transport
- app/__init__.py: start_client_if_paired() next to the linked-panel hook
- cli.py: connect status shows transport/last-seen/relay-instance; new
  connect doctor command (exit 1 on hard-check failure)
- requirements.txt: websockets==15.0.1 (WS client; the SocketIO stack is
  server-side only)
- tests/test_connect_relay.py: 21 unit tests for backoff, flap detection,
  close-code mapping, hello signature, state file, loop transitions
2026-09-02 10:31:26 -04:00
Juan Denis 0a654e0f5f feat(connect): pair the panel with ServerKit Cloud from the CLI
- app/services/connect_keys.py: Ed25519 device keypair (0600, config dir),
  fingerprint = sha256(raw pubkey)[:16] shown in groups of four
- app/services/connect_client.py: enroll/poll (signed PoP)/rotate against
  the control plane, writes connect.json (0600) on claim;
  status()/disconnect(); control-plane URL from --cloud / SERVERKIT_CLOUD_URL / https://app.serverkit.ai
- cli.py: 'connect' group (pair, status, disconnect)
- app/api/connect.py + core_blueprints.py: GET /api/v1/connect/status (JWT)
- tests/test_core_blueprint_registry.py: registry guard constants for the
  new blueprint
2026-09-02 09:26:42 -04:00
Juan Denis c4e4587555 Merge pull request #128 from jhd3197/dev
fix(plugins): keep a baked-but-uninstalled extension out of the legacy auto-render
v1.9.22
2026-09-01 16:33:57 -04:00
Juan Denis e7755c46c0 Merge branch 'main' into dev 2026-09-01 16:31:18 -04:00
github-actions[bot] 548ee88d96 chore: bump version to 1.9.22 [skip ci] 2026-09-01 13:30:00 +00:00
Juan DenisandClaude Opus 5 bcb48d50e5 fix(plugins): keep a baked-but-uninstalled extension out of the legacy auto-render
The Walkthrough Studio page mounted globally on top of the dashboard on
panels where the extension is not installed. Its module is baked into the
bundle (eager glob), it carried a default export, and PluginLoader's
legacy auto-render only excluded plugins whose contributions appear in
the RUNTIME envelope - which an uninstalled extension never populates.

Three guards:
- drop the studio's default export (routes resolve the named
  WalkthroughStudioPage export; both the baked copy and the
  builtin-extensions source)
- PluginLoader now also excludes any plugin whose BAKED manifest
  declares contributions (declaresBakedContributions)
- regression test pinning both guards for every baked plugin

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-01 09:28:37 -04:00
Juan Denis 2c97d79b63 Merge pull request #126 from jhd3197/dev
Let extensions ship guided walkthroughs as data
v1.9.21
2026-09-01 01:59:31 -04:00
github-actions[bot] bea5c4a629 chore: bump version to 1.9.21 [skip ci] 2026-09-01 05:51:01 +00:00
Juan DenisandClaude Opus 5 aa9a570f57 fix(apps): keep compose the default; divert only build-pack apps
The previous commit asked "does a compose file exist on disk?" and sent
everything else down the container path. That was too wide in both directions:

  - test_start_app_authenticates_registry_before_compose_up seeds a
    registry-bound app whose compose file has not been rendered yet, and
    rightly expects `docker login` -> `compose up` -> `docker logout`. The
    disk probe diverted it and the start 400'd.
  - it also silently changed behaviour for any compose app whose file was
    missing for an unrelated reason, turning a clear compose error into a
    confusing "not been deployed yet".

Invert it. `_is_single_container_app()` is a positive test: a local app, no
compose file recorded, none on disk, and `buildpack_type` set -- i.e. one the
build pack deployed as a single container. Compose stays the default for
everything else, so no existing path changes.

Also seed the new test through `make_application` rather than constructing
Application(...) by hand, which is what test_seed_one_door_ratchet enforces
for files added after 2026-08-19.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-01 01:44:35 -04:00
Juan DenisandClaude Opus 5 503dedd95c fix(apps): start/stop/restart a docker app that has no compose project
`app_type == 'docker'` was being read as "compose-managed", but the build-pack
path deploys by building an image and running a single container
(DeploymentService._deploy_docker, named serverkit-app-<id>) and never writes
a compose file. start/stop/restart called `docker compose` anyway, which -- in
a directory with nothing to read -- fails with:

    no configuration file provided: not found

So every build-pack app returned 400 from the panel's start, stop and restart
buttons and could not be run at all. There was already a materialize-compose
guard for BYO-image apps, but it only fires when root_path is NULL; a
build-pack app has source on disk, so it fell straight through to compose.

Decide on the artifact rather than the type: `_has_local_compose_project()`
looks for a compose file on disk (the app's own `compose_file`, else the four
default names). When there is one, nothing changes. When there isn't, drive
the container the deploy actually created.

Stop treats an already-gone container as stopped -- reporting that as a
failure would strand the app in `running` forever. Start and restart explain
that the app has not been deployed yet rather than surfacing a docker error.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-01 01:34:30 -04:00