Dev GardenGreenhouse Notes
查看 Markdown 原件 打开原型
Project OverviewDEPLOYMENT.md

Deployment and Maintenance

Current Release

  • Game: greenhouse-notes-playtest.pages.dev
  • Public notes: greenhouse-notes-devgarden.pages.dev
  • Released game: 0.10.0-beta.48-50, source commit 49bee0b.
  • Game deployment: https://658c4aa0.greenhouse-notes-playtest.pages.dev
  • Notes use the primary URL above; they are deployed separately with the public board.
  • 104 audits, prototype smoke, generated consistency and document staging passed.

Local Chrome covered four viewports and three tutorial branches. Post-deployment checks verified matching runtime/UI/WebP files and normal startup, planting, navigation and modal closing at 1440 and 390px. No feedback or cloud save was written.

  • Normal entry keeps the existing opening and save key. Opening presets remain

explicit ?tune= experiments with isolated saves, not the default game. This release does not implement the proposed early unreliable machines.

  • Physical iOS/Safari, offline/cloud/audio reacceptance remain outside this round.

Previous release: beta48-49, source e94a2a8, publication record 2aad482; game snapshot https://7042a8c8.greenhouse-notes-playtest.pages.dev and notes snapshot https://a68b14c3.greenhouse-notes-devgarden.pages.dev.

Current unshipped work must not be assumed to be part of that release. Earlier release history lives in notes/dev-log.md and Git history. The retired hosting configuration and procedures were removed on 2026-09-11; historical feedback provenance remains intact. No remote site or feedback was deleted.

Hosting

Cloudflare Pages is the only supported deployment target.

  • Game project: greenhouse-notes-playtest; static directory: prototype.
  • API: functions/api/, deployed from the repository root with Wrangler.
  • Private D1 database: greenhouse-notes-feedback.
  • Notes project: greenhouse-notes-devgarden; staged by dev/deploy-devgarden.cjs.
  • wrangler.example.jsonc is the checked-in configuration template.

Actual wrangler.jsonc, account identifiers and credentials remain ignored.

  • Static security and cache headers are maintained in prototype/_headers.

Release Procedure

  1. Obtain owner approval for the intended candidate. Do not include unrelated experiments.
  2. Update APP_VERSION in src/legacy/01-config.js and the runtime cache tag in

prototype/index.html; synchronize the release-tag assertion in the smoke test. Never hand-edit generated prototype/game.js.

  1. Run:
npm run verify
npm run check:generated
node dev/deploy-devgarden.cjs --check
git diff --check
  1. Review, commit and push the intended source to the existing private repository.
  2. Publish the game from the repository root so Wrangler includes the API functions:
npx --yes wrangler@latest pages deploy prototype --project-name greenhouse-notes-playtest
  1. Publish the public notes and read-only discussion snapshot separately:
node dev/deploy-devgarden.cjs

The notes helper rebuilds documents, research items and the discussion board, stages static files and audio, excludes local service scripts, and validates that the public board has no live session token. Review public content before uploading.

  1. Verify the primary URLs, release version and representative files against local

content. Check game and notes independently. After feedback API changes, send one labeled QA report and confirm it in D1. Record actual test coverage and deployment URLs.

Database and Saves

Do not recreate the production database for routine releases. Apply only required, reviewed migrations, with explicit approval for destructive operations:

npx --yes wrangler@latest d1 migrations apply greenhouse-notes-feedback --remote

The stable browser save key is greenhouse-notes-prototype-v1. Preserve it across releases. Add defaults, normalization and old-save tests when changing state. Cloud saves require private garden credentials; never publish them or complete save JSON. The public leaderboard exposes summaries only. No database migration was needed for beta48-49 or beta48-50.

Feedback is handled by /api/feedback and D1, independently of player saves. Inspect the private inbox only when needed; do not publish identifying fields or raw reports.

Rollback

Use the existing Cloudflare Pages project's deployment history to restore a previously verified production deployment. Do not reset Git history or overwrite player saves. A static rollback does not reverse a database migration; evaluate schema compatibility first.

Local Preview

node dev/local-preview.cjs

Default: http://127.0.0.1:4174/. Use the PORT environment variable when occupied. The server sends no-store headers. Ordinary refresh does not clear browser saves. Development-server API availability is not production API verification.