@whoabuddy — aibtc-projects v2 is built, tested, and deployed to staging. Here's everything you need to decide on the cutover.
What was built
Full rewrite of aibtc-projects as a proper Cloudflare Worker with Durable Objects. See #44 for the full overview.
Branch: v2
Staging URL: https://aibtc-projects-staging.stacklets.workers.dev
What's different
|
v1 |
v2 |
| Runtime |
CF Pages Functions |
CF Worker |
| Storage |
KV single JSON blob |
Durable Object SQLite (normalized tables) |
| Scheduling |
GitHub Actions cron every 15min |
DO alarm chain (self-scheduling) |
| Language |
JavaScript |
TypeScript (strict) |
| Routing |
Manual fetch handler |
Hono |
| Tests |
None |
148 vitest tests (91 unit + 57 integration) |
| CI/CD |
Single deploy-on-push |
release-please + staging/prod split |
| Observability |
None |
worker-logs service binding |
| Concurrency |
Optimistic locking (409 conflicts) |
DO single-threaded (zero conflicts) |
Feature parity test results
148/148 tests pass on staging. Full coverage:
- All CRUD operations (create, read, update, delete items)
- All 8 PUT actions: claim, unclaim, rate, add_goal, complete_goal, transfer_leadership, claim_leadership, deliverable
- Activity feed (GET /api/feed)
- Mention details (GET /api/mentions)
- Reorder (POST /api/reorder)
- Agent auth middleware
- Static assets (index.html, how.html)
- DO alarm chain (background tasks)
4 intentional differences from v1 (see #47 for full details):
- Response envelope on GET /api/items simplified (removed writeVersion/version — concurrency artifacts)
- GET /api/mentions unified response shape (was split live/archive, now unified list)
- GET /api/feed adds cursor field for pagination (backward compatible)
/api/health endpoint added (new, wasn't in v1)
Architecture (state diagrams)
Full Mermaid diagrams in research/aibtc-projects-v2-architecture.md on the arc-starter repo. Key flow:
Client → Hono Router → Auth Middleware → Durable Object → SQLite
↑
DO Alarm (self-scheduling)
→ GitHub API
→ aibtc.com/api
Migration plan (when ready)
Step 1: Run data migration
POST https://aibtc-projects-staging.stacklets.workers.dev/api/migrate
Authorization: Bearer <REFRESH_KEY>
Reads all v1 KV data, writes to DO SQLite. Idempotent.
Step 2: Validate migrated data
Compare item count and spot-check 3-5 items between v1 and v2.
Step 3: DNS cutover
Point custom domain (or aibtc-projects.pages.dev) to v2 Worker.
- In Cloudflare dashboard: update the Worker route or custom domain binding
- Or: create a new Worker route pointing to
aibtc-projects Worker
Step 4: Delete GitHub Actions refresh cron
Remove .github/workflows/ cron job that hits /api/refresh. The DO alarm handles scheduling automatically.
Step 5: Monitor
- Check
worker-logs for errors in first 24h
- Watch DO alarm chain fires (should see GitHub refresh events in activity feed)
- Keep v1 KV namespace for 30 days as read-only backup, then delete
Rollback: Revert DNS to v1 Pages deployment. v1 KV is untouched throughout.
What to test on staging
- Open
https://aibtc-projects-staging.stacklets.workers.dev — frontend should load
- Submit an item (requires AIBTC agent auth)
- Check the activity feed updates
- Wait 15min — verify GitHub data refreshes in background (alarm chain)
- Check
/api/health — should show DO status and item count
Open issues resolved by v2
What I need from you
- Review staging — does it look right? Spot any issues?
- Cutover timing — when do you want to go live?
- Domain decision — keep
aibtc-projects.pages.dev or move to Worker route?
- GitHub Actions cleanup — confirm which workflow file runs the refresh cron so I can remove it on merge
No rush — v1 is still live and stable. v2 stays on staging until you're ready.
@whoabuddy — aibtc-projects v2 is built, tested, and deployed to staging. Here's everything you need to decide on the cutover.
What was built
Full rewrite of aibtc-projects as a proper Cloudflare Worker with Durable Objects. See #44 for the full overview.
Branch:
v2Staging URL:
https://aibtc-projects-staging.stacklets.workers.devWhat's different
Feature parity test results
148/148 tests pass on staging. Full coverage:
4 intentional differences from v1 (see #47 for full details):
/api/healthendpoint added (new, wasn't in v1)Architecture (state diagrams)
Full Mermaid diagrams in
research/aibtc-projects-v2-architecture.mdon the arc-starter repo. Key flow:Migration plan (when ready)
Step 1: Run data migration
Reads all v1 KV data, writes to DO SQLite. Idempotent.
Step 2: Validate migrated data
Compare item count and spot-check 3-5 items between v1 and v2.
Step 3: DNS cutover
Point custom domain (or
aibtc-projects.pages.dev) to v2 Worker.aibtc-projectsWorkerStep 4: Delete GitHub Actions refresh cron
Remove
.github/workflows/cron job that hits/api/refresh. The DO alarm handles scheduling automatically.Step 5: Monitor
worker-logsfor errors in first 24hRollback: Revert DNS to v1 Pages deployment. v1 KV is untouched throughout.
What to test on staging
https://aibtc-projects-staging.stacklets.workers.dev— frontend should load/api/health— should show DO status and item countOpen issues resolved by v2
What I need from you
aibtc-projects.pages.devor move to Worker route?No rush — v1 is still live and stable. v2 stays on staging until you're ready.