Skip to content

Sync URL fix, infrastructure docs, and AGENTS.md hard rules - #38

Merged
GothwadTech merged 3 commits into
mainfrom
chore/sync-url-and-infra-docs
Dec 4, 2026
Merged

GothwadTech merged 3 commits into
mainfrom
chore/sync-url-and-infra-docs

Conversation

@GothwadTech

Copy link
Copy Markdown
Collaborator

1. The sync API was pointing at a dead worker

The sync worker was deployed as browserweb, and that worker no longer exists in the account. SyncApi was calling a URL that returns 404.

The worker is now deployed as browser (D1 binding DB, subdomain enabled), and the app points at https://browser.bansify.workers.dev.

2. docs/INFRASTRUCTURE.md

Written because this has now cost us twice:

Section Content
Cloudflare account, both D1 databases, both workers, the Pages project
D1 browser tables, and why there is no history table
Worker browser endpoint table, auth model, bindings, compatibility date
OAuth client client_id, package, redirect URIs, scopes, PKCE
Traps the extra browserweb worker, the host-less redirect URI, the consent page ending on a custom scheme, Workers Builds connected to a repo with no worker source
Deploy the exact API calls

3. AGENTS.md

Nine hard rules, first one being the one that would have prevented this:

Deploy workers through GitHub — never from the API or the dashboard. The next automatic build deploys the repository's code and silently overwrites a hand-uploaded script.

Others: no workflow edits without permission, fixed applicationId/client id, infrastructure changes update the docs in the same PR, real Room migrations, no secrets in logs, bot-verification invariants, ad blocker never blocks the main frame, history is never synced.

Honest note

browser currently has no build triggers configured (GET .../builds/workers/browser/triggers returns []), so nothing will overwrite the deploy today. The rule is still right: as soon as Workers Builds is connected, a hand-uploaded script disappears on the next push.

@coderabbitai

coderabbitai Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 52 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: aec9a5be-6b1f-460d-a0f4-4a67cf4001b4
Commits

Reviewing files that changed from the base of the PR and between 5d62dd1 and 82f6902.

Files selected for processing: 3

  • AGENTS.md
  • app/src/main/java/com/bansify/browser/sync/SyncApi.kt
  • docs/INFRASTRUCTURE.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

The sync worker was deployed as browserweb, but that worker no longer exists — the sync API
was dead and every push would have failed with a 404. The worker is now deployed as
'browser' (D1 binding DB), and the app points at browser.bansify.workers.dev.

docs/INFRASTRUCTURE.md records what lives where, because it has been forgotten twice:

- Cloudflare account, the two D1 databases and their tables
- workers: accounts (OAuth) and browser (sync), with the endpoint list
- the browserweb Pages project behind browser.bansify.com
- the registered OAuth client and its redirect URIs
- four traps that already cost us: the extra browserweb worker, the host-less redirect URI,
  the consent page ending on a custom scheme, and Workers Builds being connected to a repo
  with no worker source
The sync API was lost once because a script was uploaded by hand and a later build replaced
it. Rule 1 now makes that explicit: worker code lives in the repo and ships through Workers
Builds, and a manual deploy is not finished until the code is in the repo and the exception
is recorded.
The browser worker now has a Workers custom domain, so the app no longer depends on the
workers.dev hostname. docs/INFRASTRUCTURE.md records the domain alongside the worker.
@GothwadTech
GothwadTech force-pushed the chore/sync-url-and-infra-docs branch from 54f6ec6 to 82f6902 Compare December 4, 2026 11:20
@GothwadTech
GothwadTech merged commit 402c1f7 into main Dec 4, 2026
5 checks passed
@GothwadTech
GothwadTech deleted the chore/sync-url-and-infra-docs branch December 4, 2026 11:27
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