|
| 1 | +# Cloud development handover |
| 2 | + |
| 3 | +Repository: <https://github.com/ma2za/python-substack>, branch `main`. |
| 4 | +The repository remains public. Package version: `0.10.0`. |
| 5 | + |
| 6 | +## Environment setup |
| 7 | + |
| 8 | +Use Python 3.10 or newer; Python 3.12 is recommended for the cloud environment. |
| 9 | +The CI matrix covers Python 3.10 through 3.14. Git and Bash are required. |
| 10 | + |
| 11 | +Run this from the checkout as the cloud environment's install script: |
| 12 | + |
| 13 | +```bash |
| 14 | +bash scripts/codex-cloud-setup.sh |
| 15 | +``` |
| 16 | + |
| 17 | +The script installs Poetry 2.3.2 in `.tools/poetry`, installs the locked project |
| 18 | +dependencies and all extras in `.venv`, and installs the pre-commit hook. It |
| 19 | +requires package-registry access. It can be rerun on an existing checkout. |
| 20 | +No credentials or external services are required for development setup. |
| 21 | + |
| 22 | +In each new shell, make the isolated Poetry executable available: |
| 23 | + |
| 24 | +```bash |
| 25 | +export PATH="$PWD/.tools/poetry/bin:$PATH" |
| 26 | +``` |
| 27 | + |
| 28 | +The setup is checked into Git; no workstation virtual environment, editor |
| 29 | +configuration, or shared parent-directory `.env` is needed. |
| 30 | + |
| 31 | +## Validation |
| 32 | + |
| 33 | +```bash |
| 34 | +poetry run pytest -q -m "not live" --strict-markers |
| 35 | +poetry run pytest -q --strict-markers |
| 36 | +poetry run pre-commit run --all-files |
| 37 | +poetry check |
| 38 | +poetry build |
| 39 | +poetry run python -m twine check dist/* |
| 40 | +``` |
| 41 | + |
| 42 | +Keep `RUN_SUBSTACK_E2E` and `RUN_SUBSTACK_CLI_E2E` unset for ordinary development. |
| 43 | +The first test command excludes live tests; the second verifies they skip with |
| 44 | +live opt-ins unset. Live tests create and delete real Substack drafts and need |
| 45 | +explicit authorization for the operation. Follow [CONTRIBUTING.md](CONTRIBUTING.md) |
| 46 | +and [docs/releasing.md](docs/releasing.md) before any live or release work. |
| 47 | + |
| 48 | +## Authentication |
| 49 | + |
| 50 | +Offline tests and package validation need no Substack credentials. For an |
| 51 | +authorized live task, configure fresh values in the cloud environment: |
| 52 | + |
| 53 | +- `PUBLICATION_URL`: the publication selected for the task. |
| 54 | +- `COOKIES_STRING`: a cookie string, or `COOKIES_PATH`: a cookie file supplied |
| 55 | + within that environment. |
| 56 | +- Alternatively, `EMAIL` and `PASSWORD` for password authentication. |
| 57 | + |
| 58 | +Use the environment's protected configuration or personal vault for credentials. |
| 59 | +The program must be able to read authentication values directly. See |
| 60 | +[official cloud environment documentation](https://learn.chatgpt.com/docs/environments/cloud-environments) |
| 61 | +and [docs/authentication.md](docs/authentication.md). |
| 62 | + |
| 63 | +Never put real values in source files, example configuration, workflow output, |
| 64 | +or documentation. GitHub Actions secrets do not automatically configure Codex |
| 65 | +Cloud authentication. A local cookie file path cannot carry over to a new cloud |
| 66 | +environment. |
| 67 | + |
| 68 | +## Continuing work |
| 69 | + |
| 70 | +Read [AGENTS.md](AGENTS.md), [CHANGELOG.md](CHANGELOG.md), and the relevant tests |
| 71 | +before making changes. Preserve the current package version during ordinary |
| 72 | +development and keep `poetry.lock` unchanged unless dependencies change. |
| 73 | + |
| 74 | +This handover does not publish a package, create a release, or operate on a |
| 75 | +Substack publication. Package publication remains governed by |
| 76 | +[docs/releasing.md](docs/releasing.md) and the existing tag-gated Trusted |
| 77 | +Publishing workflow. |
| 78 | + |
| 79 | +## Validation checkpoint |
| 80 | + |
| 81 | +Validated on 2026-10-12 in a clean Python 3.12 Linux container with no Substack |
| 82 | +credentials: |
| 83 | + |
| 84 | +- Cloud setup passed twice with the dependency lock file unchanged. |
| 85 | +- Offline suite: 267 passed, 8 live tests deselected. |
| 86 | +- Normal suite with opt-ins unset: 267 passed, 8 live tests skipped. |
| 87 | +- Strict collection: 275 tests collected. |
| 88 | +- All five repository hooks, Bash syntax, and ShellCheck passed. |
| 89 | +- Poetry validation, wheel/sdist build, and Twine checks passed. |
| 90 | +- Fresh base wheel, MCP wheel, and sdist installs passed their smoke checks. |
| 91 | +- Project, tooling, and fresh package environments passed `pip check`. |
| 92 | + |
| 93 | +No live tests, Substack writes, package publication, or release creation were |
| 94 | +performed for this checkpoint. |
0 commit comments