Repository navigation
feat(dev): run the full app from an isolated source stack #170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
pythonyx135793
wants to merge
28
commits into
oll4com:main
Choose a base branch
from
pythonyx135793:codex/issue65-full-source
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+4,344
−102
Open
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
f74a315
feat: launch isolated source dev stack with full lifecycle proof
pythonyx135793 3d31cc8
fix: initialize proof path in runner step context
pythonyx135793 2fb7c2e
fix: provision ripgrep on hosted Ubuntu before stock gates
pythonyx135793 95e6714
test: register dev stack coverage and normalize portable fixture counts
pythonyx135793 39dc9df
fix(dev): confine instance storage and retain failure diagnostics
pythonyx135793 4233164
ci(dev): canonicalize hosted temporary root
pythonyx135793 3dca961
ci(dev): match platform validation to contributor scope
pythonyx135793 31a0643
fix(dev): bind Linux process ownership to kernel boot
pythonyx135793 3a45269
fix(dev): prove exact published loopback ports
pythonyx135793 e28ae75
Fix pinned CLI execution and prove live interactive terminal
pythonyx135793 02806e9
Bound browser input events and verify real CDP typing early
pythonyx135793 88d9e1b
Keep capability browser state short and retain startup diagnostics
pythonyx135793 46e34e5
fix(dev): use native Darwin stty and retain browser diagnostics
pythonyx135793 fafa02e
test(dev): verify current ANSI screens and early cookie capability
pythonyx135793 19c1286
test(dev): isolate the Darwin CI browser keychain
pythonyx135793 aa03e60
docs: document full source stack startup in contributing
pythonyx135793 be84251
Wait for browser-owned terminal geometry before UI proof
pythonyx135793 a4476b7
fix(dev): scope readiness probes to service generations
pythonyx135793 4d5bda9
fix: limit hot reload builds to source services
pythonyx135793 c6f7fa1
docs: document source development stack in changelog
pythonyx135793 ec57e6b
fix: address source development stack review findings
pythonyx135793 90502fa
test: retain worktree provisioning errors in source validation
pythonyx135793 1855198
fix: await restored source generations before lifecycle proof
pythonyx135793 1169096
Merge main into source development stack
pythonyx135793 884d001
fix: coordinate Git worktree metadata operations
pythonyx135793 8a11a04
test: make browser privacy and watchdog fixtures deterministic
pythonyx135793 b0ce62f
fix(web): cancel live debug notice timer on unmount
pythonyx135793 7448752
test(web): assert live debug timer is removed on unmount
pythonyx135793 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,173 @@ | ||
| name: Source development stack | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - "scripts/dev-stack*" | ||
| - "scripts/dev-stack/**" | ||
| - "scripts/tests/dev-stack.test.mjs" | ||
| - "apps/web/vite.config.ts" | ||
| - "apps/web/**" | ||
| - ".nvmrc" | ||
| - "packages/**" | ||
| - "apps/api/**" | ||
| - "apps/worker/**" | ||
| - "package*.json" | ||
| - "Dockerfile" | ||
| - ".github/workflows/dev-stack.yml" | ||
| push: | ||
| branches: | ||
| - "codex/spaceapp65-*" | ||
| workflow_dispatch: | ||
| inputs: | ||
| expected_source: | ||
| description: "Optional exact 40-character reviewed source SHA; mismatch fails before executing project code" | ||
| type: string | ||
| required: false | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: dev-stack-${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| full-stack: | ||
| # Standard public runners only. No private, self-hosted, larger or paid fallback. | ||
| if: github.event.repository.private == false | ||
| name: Real source stack / ${{ matrix.os }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-latest, macos-15-intel] | ||
| runs-on: ${{ matrix.os }} | ||
| timeout-minutes: 120 | ||
| defaults: | ||
| run: | ||
| shell: bash | ||
| env: | ||
| CI: "true" | ||
| ELECTRON_SKIP_BINARY_DOWNLOAD: "1" | ||
| SPACE_DEV_REDACT_SETUP: "true" | ||
| SPACE_DEV_CANDIDATE: ${{ github.event.pull_request.head.sha || github.sha }} | ||
| EXPECTED_SOURCE: ${{ inputs.expected_source }} | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| ref: ${{ github.event.pull_request.head.sha || github.sha }} | ||
| persist-credentials: false | ||
|
|
||
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | ||
| with: | ||
| node-version-file: .nvmrc | ||
| cache: npm | ||
|
|
||
| - name: Verify exact public candidate | ||
| run: | | ||
| printf 'SPACE_DEV_PROOF_DIR=%s/spaceapp-dev-stack-proof\n' "$RUNNER_TEMP" >> "$GITHUB_ENV" | ||
| node --input-type=module <<'NODE' | ||
| import assert from 'node:assert/strict'; | ||
| import { execFileSync } from 'node:child_process'; | ||
| import { appendFileSync, realpathSync } from 'node:fs'; | ||
| assert.match(process.env.SPACE_DEV_CANDIDATE, /^[a-f0-9]{40}$/); | ||
| const actual = execFileSync('git', ['rev-parse', 'HEAD'], {encoding:'utf8'}).trim(); | ||
| assert.equal(actual, process.env.SPACE_DEV_CANDIDATE); | ||
| if (process.env.EXPECTED_SOURCE) { | ||
| assert.match(process.env.EXPECTED_SOURCE, /^[a-f0-9]{40}$/); | ||
| assert.equal(actual, process.env.EXPECTED_SOURCE); | ||
| } | ||
| appendFileSync(process.env.GITHUB_ENV, `TMPDIR=${realpathSync(process.env.RUNNER_TEMP)}\n`); | ||
| console.log(`Exact source ${actual}; Node ${process.version}; ${process.platform}/${process.arch}`); | ||
| NODE | ||
| git diff --exit-code | ||
|
|
||
| - name: Prepare ephemeral Intel-macOS Docker | ||
| if: runner.os == 'macOS' | ||
| run: | | ||
| test "$(uname -m)" = x86_64 | ||
| brew install colima docker docker-compose ripgrep | ||
| mkdir -p "$HOME/.docker/cli-plugins" | ||
| ln -sfn "$(brew --prefix)/opt/docker-compose/bin/docker-compose" "$HOME/.docker/cli-plugins/docker-compose" | ||
| colima start --profile spaceapp-dev-proof --cpu 3 --memory 6 --disk 30 | ||
| docker context use colima-spaceapp-dev-proof | ||
|
|
||
| - name: Prepare hosted Linux test prerequisites | ||
| if: runner.os == 'Linux' | ||
| run: sudo apt-get update -qq && sudo apt-get install -y -qq ripgrep ffmpeg | ||
|
|
||
| - name: Verify existing Docker, Compose, browser and search tools | ||
| run: | | ||
| docker version | ||
| docker compose version | ||
| command -v rg | ||
| if [[ "$RUNNER_OS" == macOS ]]; then | ||
| test -x '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome' | ||
| else | ||
| test -x /usr/bin/google-chrome | ||
| test -x /usr/bin/ffmpeg | ||
| fi | ||
|
|
||
| - name: Install locked workspace dependencies | ||
| run: npm ci --no-audit --no-fund | ||
|
|
||
| - name: Early actual pinned CLI and zero-provider PTY capability | ||
| run: node scripts/dev-stack/capability-proof.mjs | ||
|
|
||
| - name: Daemon-free isolation and cleanup regressions | ||
| run: npm run test:dev-stack | ||
|
|
||
| - name: Full stock check | ||
| run: npm run check | ||
|
|
||
| - name: Full stock tests (Linux reference platform) | ||
| if: runner.os == 'Linux' | ||
| run: npm test | ||
|
|
||
| - name: Native macOS private-instance regressions | ||
| if: runner.os == 'macOS' | ||
| run: >- | ||
| node node_modules/vitest/vitest.mjs run --config apps/api/vitest.config.ts | ||
| apps/api/tests/instance-storage.test.ts apps/api/tests/dev-oauth-storage.test.ts | ||
| apps/api/tests/dev-docx-isolation.test.ts apps/api/tests/dev-incidents-storage.test.ts | ||
| apps/api/tests/space-control-governance.test.ts | ||
| apps/api/tests/room-pane-worktrees.test.ts | ||
|
|
||
| - name: Native macOS CLI host regressions | ||
| if: runner.os == 'macOS' | ||
| run: npm test --workspace @space/cli-host | ||
|
|
||
| - name: Full stock build | ||
| run: npm run build | ||
|
|
||
| - name: Full stock hygiene | ||
| run: npm run hygiene:preflight | ||
|
|
||
| - name: Real HTTP, owner, browser, PTY, HMR, isolation and failure cleanup | ||
| run: node scripts/dev-stack/lifecycle-proof.mjs | ||
|
|
||
| - name: Final clean exact-source guard | ||
| if: always() | ||
| run: | | ||
| test "$(git rev-parse HEAD)" = "$SPACE_DEV_CANDIDATE" | ||
| git diff --exit-code | ||
| test -z "$(git status --porcelain --untracked-files=all)" | ||
|
|
||
| - name: Remove ephemeral hosted Colima profile | ||
| if: always() && runner.os == 'macOS' | ||
| run: | | ||
| if colima status --profile spaceapp-dev-proof >/dev/null 2>&1; then | ||
| colima stop --profile spaceapp-dev-proof | ||
| fi | ||
| if colima list --json | grep -q 'spaceapp-dev-proof'; then | ||
| colima delete --profile spaceapp-dev-proof --force | ||
| fi | ||
|
|
||
| - name: Preserve redacted evidence only | ||
| if: always() | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| with: | ||
| name: dev-stack-${{ matrix.os }}-${{ github.event.pull_request.head.sha || github.sha }} | ||
| path: ${{ runner.temp }}/spaceapp-dev-stack-proof | ||
| if-no-files-found: warn | ||
| retention-days: 7 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.