Skip to content

Add source-controlled Worker deploys and publishing governance - #6

Merged
JimCollinson merged 11 commits into
mainfrom
worker-source-controlled-deploy
Jun 25, 2026
Merged

Add source-controlled Worker deploys and publishing governance#6
JimCollinson merged 11 commits into
mainfrom
worker-source-controlled-deploy

Conversation

@JimCollinson

@JimCollinson JimCollinson commented Jun 24, 2026

Copy link
Copy Markdown
Member

Summary

  • Add source-controlled Cloudflare Worker code/config for the existing production Worker autonomi-md-proxy.
  • Add Wrangler production and preview configs plus manual-only GitHub Actions deploy workflows.
  • Add Worker runtime tests for public docs proxying, fallthrough behaviour, encoded internal-prefix bypasses, and over-budget path decoding.
  • Add ADR governance CI and accept foundational ADR-0001/ADR-0002 per Jim's explicit approval.
  • Document how future contributors update LLM-optimised content, maintain llms.txt / llms-full.txt, handle whitepaper Markdown/PDF pairs, and understand cache/deploy expectations.

What This Enables

  • Content-only PRs can be merged to main and served automatically from autonomi.com without a Worker deploy.
  • Worker source/config/deploy changes become reviewable through normal PRs instead of Cloudflare dashboard edits.
  • ADR changes are checked by CI for status/format/immutability rules.
  • Future contributors and AI agents have clear instructions for public vs internal Markdown, whitepaper PDFs, cache delay, and when a manual Worker deployment is required.

Accepted ADR Alignment

  • ADR-0001 is accepted: this repo uses repo-local ADR governance and CI validation for ADR changes.
  • ADR-0002 is accepted: autonomi.com documentation serving uses a Cloudflare Worker backed by GitHub raw content with Framer fallthrough.
  • ADR-0005 is accepted: normal Worker source/config/deploy changes live in this repo; Cloudflare dashboard is break-glass only.
  • ADR-0006 is accepted: serve .md, /llms.txt, and /llms-full.txt from GitHub raw content except internal prefixes /worker/ and /.github/.

Production Inventory Captured

  • Worker: autonomi-md-proxy
  • Route: autonomi.com/*
  • Compatibility date: 2025-12-09
  • Bindings: none
  • Observability: logs enabled, 100% sampling; traces disabled in confirmed dashboard inventory

Safety / Outage Controls

  • Merging this PR does not deploy production.
  • Preview and production deploy workflows are workflow_dispatch only and restricted to main.
  • Preview deploy uses separate Worker autonomi-md-proxy-preview, workers_dev enabled, and no production route.
  • Production deploy updates existing Worker autonomi-md-proxy on route autonomi.com/*.
  • Both deploy workflows reference the GitHub production environment because both require production-capable Cloudflare credentials.
  • Deploy scripts assert expected preview/production Worker names and route settings before calling Wrangler.
  • Deploy workflows use concurrency groups with cancel-in-progress: false.
  • Rollback remains available through Cloudflare Worker Deployments or by redeploying a known-good commit.

Content Publishing Model

  • This repo holds machine-readable, LLM-parsable, AI-optimised content served from autonomi.com alongside human-readable Framer pages.
  • Content-only PRs go live automatically after merge to main; no Worker deploy is normally needed.
  • Served documentation responses use Cache-Control: public, max-age=300, so updates may take up to about five minutes to appear at autonomi.com.
  • Public content additions/removals/renames should update both llms.txt and llms-full.txt.
  • Whitepaper Markdown is served from autonomi.com; whitepaper PDFs are stored alongside Markdown in the repo and linked via explicit GitHub raw URLs because the Worker does not currently serve .pdf paths.
  • Under the current policy, .md files outside internal prefixes can be public, including repo-level/governance Markdown such as README.md and docs/adr/*.md.

Validation

  • GitHub Actions Worker Check passed for head 259050e.
  • GitHub Actions ADR Governance passed for head 259050e.
  • Local validation passed:
    • npm run check in worker/
    • GITHUB_BASE_REF=main python3 scripts/adr-governance.py
    • npm audit --audit-level=moderate
    • git diff --check origin/main..HEAD
  • npm run check includes:
    • Prettier check
    • node --check src/index.js
    • 25 Node runtime tests
    • preview/production config assertions
    • Wrangler preview dry-run
    • Wrangler production dry-run
  • Wrangler dry-runs reported No bindings found.

Manual Follow-up After Merge

  1. Run Deploy Worker Preview manually from main after approving the production environment gate.
  2. Smoke test the preview workers.dev URL for GitHub proxy paths and non-GitHub-serving behaviour: /llms.txt, /llms-full.txt, /overview.md, /worker/README.md, and /.
  3. Run Deploy Worker Production manually from main after approval.
  4. Smoke test routed production URLs for both GitHub proxy paths and Framer fallthrough: https://autonomi.com/llms.txt, /llms-full.txt, /overview.md, /worker/README.md, and /.

Not In This PR

The Browser Integrity Check exception for /llms.txt, /llms-full.txt, and .md paths is Cloudflare zone-level config and remains managed manually for now. Source-controlling that should be a separate Terraform/OpenTofu follow-up if desired.

- Add preserved Cloudflare Worker source and production/preview Wrangler configs

- Add manual GitHub Actions deploy workflows and worker docs
- Decode and normalize policy path variants before applying internal prefix exclusions

- Add Worker fetch regressions for encoded worker/.github bypass attempts

- Clarify preview smoke and production environment gate documentation
- Decode policy paths to a fixed point instead of a finite pass limit

- Cover deeply encoded internal-prefix and dot-segment bypass attempts
- Replace fixed-point variant Set with capped streaming checks

- Fail closed on over-budget encoded paths and cover backslash regressions
@JimCollinson JimCollinson changed the title Add source-controlled Cloudflare Worker deploy config Add source-controlled Worker deploys and publishing governance Jun 25, 2026
@JimCollinson
JimCollinson merged commit 7652105 into main Jun 25, 2026
2 checks passed
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