Skip to content

Run the full source stack with isolated state and real owner/terminal smoke - #275

Open
rafiannazzo wants to merge 1 commit into
oll4com:mainfrom
rafiannazzo:bounty/dev-stack
Open

rafiannazzo wants to merge 1 commit into
oll4com:mainfrom
rafiannazzo:bounty/dev-stack

Conversation

@rafiannazzo

@rafiannazzo rafiannazzo commented Oct 23, 2026 •

Copy link
Copy Markdown

Closes #65.

Contributors can now run the complete application from a source checkout with npm run dev:stack: isolated PostgreSQL/Temporal, migrations, API watching, Vite, the worker, CLI host and OpenCode. down stops the stack; reset also removes its own state and database volume.

  • Read Docker image digests and the OpenCode package/version from the existing published sources. Use separate loopback ports, a checkout-specific Compose project and private state with generated secrets.
  • Keep application/provider homes isolated and strip inherited credentials. Use real owner setup and sign-in; the dev-login shortcut stays off.
  • Support API/web hot reload and a documented rebuild command for internal packages and the worker. Unexpected process exits stop the stack with a named failure.
  • Add an Ubuntu CI job that claims an owner, signs in, attaches a real WebSocket terminal, verifies OpenCode is running with stdout, then resets and checks processes, ports, state and Docker resources.
  • Make the existing storage-readiness check respect the configured installation root, retaining its production default and storage requirements. This fixes a source-run admin 500.
  • Document prerequisites, ports, troubleshooting, macOS and WSL2. Browser/companion/root-only services stay disabled.

Executed acceptance

macOS arm64 and Linux arm64, Node 22.23.4:

  • Fresh startup, owner claim → logout → login, workflows enabled, real CLI host and OpenCode terminal: pass. macOS terminal UI also visually inspected.
  • Normal down and full reset: pass. All 29 observed macOS processes and 15 Linux processes stopped; owned ports, containers, network, volume and state removed.
  • macOS API reload, browser CSS HMR and package rebuild: pass. Source probes restored.
  • Intentional worker termination: named error and supervisor exit 1, followed by cleanup.
  • Storage regression: reproduced 500 before the fix; 3 tests pass on both platforms and live authenticated Linux admin returns 200 after reload.
  • Full build, Linux workspace check, nine launcher/smoke regression cases, focused lint, hygiene and diff checks: pass.
  • Linux public contributor gate: 151/151 pass.

Terminal output

Secrets are omitted.

macOS with Docker Desktop:

DEV_STACK_READY http://127.0.0.1:15411
Internal packages rebuilt; API, worker and CLI host restarted.
Dev stack stopped (spaceapp-dev-85b1d7f0018d).
DEV STACK FAILURE: worker exited unexpectedly (0). See .dev-stack/logs/worker.log.
[supervisor exited 1 after the intentional worker stop]
{"passed":true,"cleaned":true}

Linux arm64 container using Docker Desktop:

DEV_STACK_READY http://127.0.0.1:16411
{"passed":true,"ownerLogin":true,"workerRunning":true,"cliRunning":true,"stdoutBytes":280}
{"passed":true,"adminStatus":200,"workerRunning":true,"platform":"linux","architecture":"arm64","nodeVersion":"v22.23.4","observedProcessCount":15}
Dev stack stopped (spaceapp-dev-91f700377e53).
Dev stack reset (spaceapp-dev-91f700377e53).
{"passed":true,"cleaned":true}

Limits

The Linux run used a bounded container with Docker Desktop; bare-metal Linux and WSL were not directly tested. No GitHub check runs have been observed. Snyk reports success; CodeRabbit's green status accompanies a quota-limit skip, so no external code review of this PR is claimed. OpenCode's terminal was exercised without provider inference; the wrapper refuses an unconfigured inference smoke check.

The broader macOS workspace suite was attempted and is not green (database 1 failure, runtime 11, API 112, worker 5; web 3,930 pass). Failures include existing temporary-path aliases, unavailable loopback binds and Linux-only host assumptions. That run preceded the final storage-path fix; focused regressions and the full build passed afterward. The macOS public gate also has the unchanged BSD wc spacing failure. The full Linux run also exited 1: 10,061 tests passed, 10 failed and 19 skipped, plus one suite-load error from missing ffmpeg in the initial harness. Every workspace except API passed, including web (3,930), worker (229), database (217) and runtime (211). Rerunning all six affected API files as an ordinary user with Python 3.12, ffmpeg and ripgrep produced 141 pass / 1 fail. The sole remaining browser-lease assertion receives a Google-Chrome-unavailable error in this Linux arm64 image instead of its expected lease error. This reproduces identically on the unchanged base commit in that same corrected environment (193 pass / 1 fail in the baseline comparison). These combined checks are not represented as a single green full-repository run.

AI assistance was used for implementation and review; the validation above was executed. Base: 2f4ab98794aade2e3476ae7fd5c103e04c30825f.

Signed-off-by: Rafael <85370839+rafiannazzo@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Oct 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 22 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 71816271-1268-4dbc-b7dd-e03d17f5bc01
📥 Commits

Reviewing files that changed from the base of the PR and between 2f4ab98 and 651b082.

📒 Files selected for processing: 18
  • .github/workflows/dev-stack.yml
  • .gitignore
  • CONTRIBUTING.md
  • apps/api/src/app.ts
  • apps/api/src/storage-readiness.ts
  • apps/api/tests/storage-warning.test.ts
  • apps/web/vite.config.ts
  • package.json
  • scripts/dev-stack-config.mjs
  • scripts/dev-stack-opencode.mjs
  • scripts/dev-stack-processes.mjs
  • scripts/dev-stack-smoke.mjs
  • scripts/dev-stack.mjs
  • scripts/public-export.mjs
  • scripts/tests/dev-stack-processes.test.mjs
  • scripts/tests/dev-stack-smoke.test.mjs
  • scripts/tests/dev-stack.test.mjs
  • scripts/tests/public-suite.test.mjs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
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.

[$450] One command to run the full SpaceApp stack from source for contributors

1 participant