Skip to content

Add Cloud Agent development environment config - #434

Open
wallscaler wants to merge 1 commit into
mainfrom
cursor/setup-dev-environment-b12a
Open

wallscaler wants to merge 1 commit into
mainfrom
cursor/setup-dev-environment-b12a

Conversation

@wallscaler

@wallscaler wallscaler commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a reproducible Cloud Agent development environment for the Cathedral SN39 repository. There was no committed .cursor/environment.json before; this makes the repo fully usable in Cloud Agents.

What's included

  • .cursor/install.sh — idempotent bootstrap that:
    • installs the python3.12-venv seed package (Cursor's default image ships Python 3.12 but omits it, so python3 -m venv otherwise fails with an ensurepip error);
    • creates an isolated .venv;
    • installs -e '.[test]' (the same mechanism + reviewed ruff/pytest toolchain that .github/workflows/required-checks.yml uses) plus python-multipart and blake3, the two runtime deps the default SQLite-backed publisher server needs for multipart submit and canonical hashing. Postgres (psycopg2) and S3 (boto3) stay optional and load lazily.
  • .cursor/environment.json — wires install to the script, exposes the publisher on port 8000, and runs scaffold.publisher.server:app (uvicorn) in a publisher terminal for local development.

Validation performed on the VM

Check Result
ruff check + ruff format --check (cathedral_thin tests/thin tests/boundary) Passed
pytest -q tests/thin tests/boundary 151 passed
cathedral-thin-e2e ok: true, exit 0
Publisher server /health/ready status: ok, db: ok, sr25519_backend: bittensor
Synthetic-boolean readiness-probe verify (SAT solve → submit) Valid solution accepted; unsatisfying + malformed rejected
Install idempotence Passed twice
Draft environment build (this branch) SUCCEEDED — install script ran end-to-end on a fresh checkout

No application code changed; only environment configuration was added.

The draft build was created from this branch ref (testable, not promotable). After merge to main, a build from the default branch is promotable, and the committed .cursor/environment.json becomes the highest-precedence environment source for future Cloud Agents.

Open in Web Open in Cursor 

Introduce .cursor/environment.json and an idempotent .cursor/install.sh that
bootstrap an isolated virtualenv with the thin-subnet mechanism/test toolchain
(matching required-checks CI) plus the publisher runtime deps needed by the
default SQLite-backed FastAPI server. Expose the publisher on port 8000 via a
terminal for local development.

Co-authored-by: Ancient Runner  <wallscaler@users.noreply.github.com>
@wallscaler
wallscaler marked this pull request as ready for review August 23, 2026 20:41

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7384677. Configure here.

Comment thread .cursor/install.sh
# Core mechanism + reviewed test/lint toolchain (`.[test]`) matches CI. The two
# trailing deps are the publisher runtime essentials for the default SQLite
# backend; Postgres (psycopg2) and S3 (boto3) stay optional and load lazily.
python -m pip install -e '.[test]' 'python-multipart>=0.0.9' 'blake3>=1.0'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Publisher terminal missing runtime deps

High Severity

The bootstrap installs .[test] plus python-multipart and blake3, but the publisher terminal runs uvicorn against scaffold.publisher.server:app, which hard-imports fastapi. Neither fastapi nor uvicorn comes from .[test] or the base package deps; they live in the [publisher] extra. On a fresh Cloud Agent, the publisher terminal fails at startup and the configured port never comes up.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 7384677. Configure here.

@cursor
cursor Bot requested a review from ai-hpc August 23, 2026 20:43
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.

2 participants