With CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID, each venture gets its own Worker (time-<slug>) with its own D1 database and Workers AI. The Worker serves the venture's GitHub Pages folder under <slug>.<TIME_VENTURE_DOMAIN> (or workers.dev) and adds a small API: share links stored in D1, and a rate-limited small model. The page reaches it through time.js, which Time writes next to index.html and the build may not edit; every call degrades to null, so products still work on Pages alone and in the headless checks. The backend is deployed when a venture is picked, so the plan, the signal issue and the page all carry the venture's own domain. A Cloudflare failure never holds a venture: it launches on Pages and the chores retry. The chores also backfill older ventures and redeploy every venture when worker.js or its settings change (a revision hash), a couple per tick; update.yml carries the new files. The doctor checks the token. Offline tests cover the provisioner, the loop with and without Cloudflare, the backfill and redeploys, and the worker itself (node, against a fake D1, AI and Pages). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wyb3QQDESFkosKRXzrXqwr
29 lines
1.0 KiB
YAML
29 lines
1.0 KiB
YAML
name: doctor
|
|
# Manual check of Time's setup: label, settings, keys (never printed). Result in the run summary.
|
|
on: workflow_dispatch
|
|
permissions:
|
|
contents: read
|
|
issues: read
|
|
jobs:
|
|
check:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 3
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
sparse-checkout: .github/time
|
|
- run: python3 .github/time/test_time.py
|
|
- run: python3 .github/time/time.py doctor
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
CURSOR_API_KEY: ${{ secrets.CURSOR_API_KEY }}
|
|
VENICE_API_KEY: ${{ secrets.VENICE_API_KEY }}
|
|
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
|
TIME_VENTURE_DOMAIN: ${{ vars.TIME_VENTURE_DOMAIN }}
|
|
TIME_MODE: ${{ vars.TIME_MODE }}
|
|
TIME_DAILY_CAP: ${{ vars.TIME_DAILY_CAP }}
|
|
TIME_REVIEW: ${{ vars.TIME_REVIEW }}
|
|
TIME_WORKER: ${{ vars.TIME_WORKER }}
|
|
TIME_AUTOMERGE: ${{ vars.TIME_AUTOMERGE }}
|