Skip to content

chore: migrate Cloudflare preview/dev hostnames to jk-com domains (excluding archival logs)#1640

Merged
jaypatrick merged 4 commits intomainfrom
copilot/replace-cloudflare-domains
Apr 17, 2026
Merged

chore: migrate Cloudflare preview/dev hostnames to jk-com domains (excluding archival logs)#1640
jaypatrick merged 4 commits intomainfrom
copilot/replace-cloudflare-domains

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 17, 2026

Description

Repository-wide domain migration for Cloudflare preview/dev URLs: *.jayson-knight.workers.dev and *.jayson-knight.pages.dev references were updated to *.jk-com.workers.dev / *.jk-com.pages.dev across active source, docs, config, scripts, generated artifacts, tests, and CI workflow references.

Follow-up review feedback was applied: archival snapshot files under data/logs-*.json were restored to preserve historical records and reduce diff noise.

Changes

  • Core/runtime defaults

    • Updated fallback/runtime URL constants and related inline docs/comments in worker/frontend code paths that referenced old preview hostnames.
  • Docs + examples + tooling

    • Updated API docs, troubleshooting guides, diagnostics docs, CLI help/default URLs, Postman/OpenAPI-derived artifacts, and example files containing old domains.
  • CI/config/repo metadata

    • Updated workflow and config references (.github/workflows/*, deno.json, package/docs metadata, etc.) to remove stale preview domains.
  • Review-thread follow-up

    • Reverted data/logs-2026-04-11T16_08_48.624Z.json and data/logs-2026-04-11T17_02_18.240Z.json back to pre-migration content so archival snapshots remain unchanged.
  • Mechanical replacement example

    // before
    const API_URL_FALLBACK = 'https://adblock-compiler.jayson-knight.workers.dev';
    
    // after
    const API_URL_FALLBACK = 'https://adblock-compiler.jk-com.workers.dev';

Testing

  • Unit tests added/updated
  • Manual testing performed
  • CI passes

Zero Trust Architecture Checklist

Required for every PR touching worker/ or frontend/.
Check each item that applies. If an item doesn't apply, check it and note "N/A".

Worker / Backend

  • Every handler verifies auth before executing business logic (N/A — no auth/handler logic changes)
  • CORS origin allowlist enforced (not *) on write/authenticated endpoints (N/A — no CORS logic changes)
  • All secrets accessed via Worker Secret bindings (not [vars]) (N/A — no secret handling changes)
  • All external inputs Zod-validated before use (N/A — no input-path logic changes)
  • All D1 queries use parameterized .prepare().bind() (no string interpolation) (N/A — no query changes)
  • Security events emitted to Analytics Engine on auth failures (N/A — no auth-failure path changes)

Frontend / Angular

  • Protected routes have functional CanActivateFn auth guards (N/A — no route-guard logic changes)
  • Auth tokens managed via Clerk SDK (not localStorage) (N/A — no auth token handling changes)
  • HTTP interceptor attaches ****** (no manual token passing) (N/A — no interceptor/auth request changes)
  • API responses validated with Zod schemas before consumption (N/A — no API parsing/validation logic changes)

API Shield / Vulnerability Scanner

Required for every PR touching docs/api/openapi.yaml, worker/routes/, or resource endpoint handlers.

  • New/changed endpoints have a unique operationId in openapi.yaml (N/A — no endpoint shape/operationId changes)
  • Resource endpoints (those with /{id} path parameters) include a security: annotation (N/A — no endpoint security changes)
  • Resource queries are scoped to the authenticated user (WHERE user_id = ?) — not just by ID (N/A — no resource query changes)
  • Missing/unauthorized resources return 404 (not 403) to avoid leaking resource existence (N/A — no auth/resource error-path changes)
  • cloudflare-schema.yaml regenerated if openapi.yaml changed (deno task schema:cloudflare)

If this PR does not touch worker/ or frontend/, the ZTA checklist is not required.
If this PR does not touch openapi.yaml or resource handlers, the API Shield checklist is not required.

Original prompt

Summary

All Cloudflare development/preview domains have been renamed. Every occurrence of jayson-knight.workers.dev and jayson-knight.pages.dev must be replaced with jk-com.workers.dev and jk-com.pages.dev respectively across the entire repository.

Replacement rules

Old New
*.jayson-knight.workers.dev *.jk-com.workers.dev
*.jayson-knight.pages.dev *.jk-com.pages.dev

Apply this as a mechanical find-and-replace across all files (source, docs, config, scripts). This includes but is not limited to:

  • worker/utils/constants.tsFRONTEND_URL_FALLBACK, API_URL_FALLBACK
  • worker/mcp-agent.ts — JSDoc comments
  • worker/trpc/client.ts — JSDoc comment
  • scripts/diag-cli.ts — default --url flag and help text
  • README.md — badge/shield URLs
  • docs/api-reference.md — cURL examples
  • docs/api/RULE_SETS.md — cURL examples
  • docs/api/VALIDATE_RULE.md — cURL examples
  • docs/reference/URL_MANAGEMENT.md — URL table defaults
  • docs/operations/diagnostics.md — example URLs (including any -staging subdomains)
  • Any wrangler.toml [vars] entries referencing the old domain
  • Any other files in the repo that contain the old domain strings

Constraints

  • Do a comprehensive search of the entire repo; do not limit to the files listed above.
  • Preserve all surrounding context exactly — only the domain substring changes.
  • Do not alter any production custom domains (e.g. bloqr.ai, jaysonknight.com, bloqr.jaysonknight.com).
  • Follow the project's coding style (TypeScript strict, Deno, no any).
  • Run deno task preflight:full (or the equivalent fmt/lint/type-check tasks) and ensure the output is clean before marking done.

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: I have changed all Cloudflare development/preview domains from jayson-knight.workers.dev and jayson-knight.pages.dev to jk-com.workers.dev and jk-com.pages.dev. We shouldn't be using dev/preview links any longer, but in case any still exist, please update them in all projects.

Assistant: Good, I can see the occurrences across both repos. Let me do one more search to make sure I catch everything, then I'll create PRs for both.

Assistant: I've identified all the occurrences across both repos. The search results are limited to 10 per query — you can see the full list in GitHub search for adblock-compiler and bloqr-landing.

Here's what was found so far:

jaypatrick/adblock-compiler — old domains in:

  • worker/utils/constants.tsFRONTEND_URL_FALLBACK and API_URL_FALLBACK
  • worker/mcp-agent.ts — JSDoc comments
  • worker/trpc/client.ts — JSDoc comment
  • scripts/diag-cli.ts — default --url flag value
  • README.md — badge shield URLs
  • docs/api-reference.md, docs/api/RULE_SETS.md, docs/api/VALIDATE_RULE.md — cURL examples
  • docs/reference/URL_MANAGEMENT.md — URL table defaults
  • docs/operations/diagnostics.md — example URLs (including a -staging subdomain)

jaypatrick/bloqr-landing — old domains in:

  • AGENTS.md — Production URL field
  • DEPLOYMENT.mdBETTER_AUTH_URL example, GitHub OAuth App setup URLs, SSO example
  • .dev.varsBETTER_AUTH_URL value

I'll open a PR for each repo now.

Assistant: I've kicked off two PRs — one per repo — to do a full find-and-replace of the old Cloudflare preview domains. Here's a summary of everything that will be touched:


jaypatrick/adblock-compiler

File Old value replaced
worker/utils/constants.ts FRONTEND_URL_FALLBACK, API_URL_FALLBACK
worker/mcp-agent.ts JSDoc production endpoint comments
worker/trpc/client.ts JSDoc usage example
scripts/diag-cli.ts Default --url flag + help text
README.md Badge/shield link URLs
docs/api-reference.md cURL examples
docs/api/RULE_SETS.md cURL examples
docs/api/VALIDATE_RULE.md cURL examples
docs/reference/URL_MANAGEMENT.md URL table defaults
docs/operations/diagnostics.md Example URLs (including -staging variant)
Any wrangler.toml [vars] URL references

jaypatrick/bloqr-landing

File Old value replaced
AGENTS.md Production URL field
DEPLOYMENT.md BETTER_AUTH_URL example, OAuth homepage/callback URLs, SSO fetch example
.dev.vars BETTER_AUTH_URL value
Any wrangler.toml entries URL references

⚠️ The code search API returns at most 10 results per query, so the agents have been instructed to do a full repo scan rather than rely on the list above — any additional files containing the old domains will be caught and upd...

This pull request was created from Copilot chat.

Copilot AI requested review from Copilot and removed request for Copilot April 17, 2026 15:06
@jaypatrick jaypatrick added documentation Improvements or additions to documentation cloudflare Cloudflare Workers / CDN labels Apr 17, 2026
@jaypatrick jaypatrick added this to the beta milestone Apr 17, 2026
Copilot AI review requested due to automatic review settings April 17, 2026 15:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

Copilot AI changed the title [WIP] Replace jayson-knight domains with jk-com domains across repository chore: migrate Cloudflare preview/dev hostnames to jk-com domains Apr 17, 2026
Copilot AI requested a review from jaypatrick April 17, 2026 15:22
@jaypatrick jaypatrick marked this pull request as ready for review April 17, 2026 15:23
Copilot AI review requested due to automatic review settings April 17, 2026 15:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 67 out of 67 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

data/logs-2026-04-11T16_08_48.624Z.json:103

  • These data/logs-*.json entries appear to be raw production logs (large, date-stamped). Updating embedded URLs here can make the snapshot inaccurate and creates a huge churny diff. If these logs are not used by tests/docs, it would be better to leave them untouched (or remove them from version control) and limit the domain migration to config/docs/source code.
    "timestamp": "2026-04-11T14:26:28.551Z",
    "$workers": {
      "truncated": false,
      "event": {
        "request": {
          "url": "https://adblock-compiler.jk-com.workers.dev/sitemap.xml",
          "method": "GET",
          "path": "/sitemap.xml"
        }
      },

Comment thread data/logs-2026-04-11T17_02_18.240Z.json
@jaypatrick
Copy link
Copy Markdown
Owner

@copilot apply changes based on the comments in this thread

Agent-Logs-Url: https://github.com/jaypatrick/adblock-compiler/sessions/1ddf5636-5730-4d8c-9470-6937fe616c23

Co-authored-by: jaypatrick <1800595+jaypatrick@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 17, 2026

@copilot apply changes based on the comments in this thread

Applied. I restored the archival snapshot files to their pre-migration content so data/logs-*.json are unchanged by the domain swap work. Included in commit 67bf327.

Copilot AI changed the title chore: migrate Cloudflare preview/dev hostnames to jk-com domains chore: migrate Cloudflare preview/dev hostnames to jk-com domains (excluding archival logs) Apr 17, 2026
@jaypatrick jaypatrick merged commit 3f085c0 into main Apr 17, 2026
32 checks passed
@jaypatrick jaypatrick deleted the copilot/replace-cloudflare-domains branch April 17, 2026 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cloudflare Cloudflare Workers / CDN documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants