Skip to content

fix(checkin): read Cloudflare through cf, not wrangler - #720

Open
harlan-zw wants to merge 1 commit into
mainfrom
chore/checkin-cf-collector
Open

harlan-zw wants to merge 1 commit into
mainfrom
chore/checkin-cf-collector

Conversation

@harlan-zw

Copy link
Copy Markdown
Collaborator

🔗 Linked issue

None.

❓ Type of change

  • 📖 Documentation
  • 🐞 Bug fix
  • 👌 Enhancement
  • ✨ New feature
  • 🧹 Chore
  • ⚠️ Breaking change

📚 Description

Wrangler is banned for operator work, and the check-in collector also picked up the checkout's .env token. On 2026-11-24 a stale CLOUDFLARE_API_TOKEN there shadowed a valid cf login. The deploy, D1, Workers, analytics, and report checks all came back Unavailable.

The collector now reads Cloudflare through cf, run from the home directory and pinned to the production account. It uses cf workers deployments list, cf d1 query, and cf analytics-engine sql query.

Worker outcomes still come from GraphQL, which cf cannot query. Without CLOUDFLARE_USAGE_TOKEN in the environment, skilld.workers now names that token instead of asking wrangler for one. docs/runbooks/checkin.md records the setup.

📝 Migration

  • The check-in host needs cf on its PATH, either logged in or given CLOUDFLARE_API_TOKEN.
  • For Worker outcomes, give the check-in environment CLOUDFLARE_USAGE_TOKEN with Account Analytics read access. A host that already exports a CLOUDFLARE_API_TOKEN with that access keeps Worker coverage.

🤖 AI disclosure: Harlan Agent Kit modified this description. My AI open-source policy.

Wrangler is retired for operator work. The collector also inherited the
checkout's .env token: on 2026-11-24 a stale one there shadowed a valid cf
login and left deploy, D1, Workers, analytics, and the report check blind.

cf now runs from the home directory, pinned to the production account.
Worker outcomes still need an environment token, because cf has no GraphQL
command; the check names that token when it is missing.
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.

1 participant