feat: add persisted Local SEO map grids - #245
Open
Dannydropz wants to merge 13 commits into
Open
Conversation
added 6 commits
August 25, 2026 09:08
Co-authored-by: Danny Keegan <dankeegan@pm.me> Signed-off-by: Danny Keegan <dankeegan@pm.me>
Author
|
@bensenescu Would you review this Local SEO map-grid slice when you have a chance? The branch is current with Suggested high-risk review areas are billed-task durability, SQLite/Postgres parity, immutable scan snapshots, and stale-run reconciliation around workflow startup. |
The map grid renders on Leaflet, but the dependency was never added to the manifest — it only existed in the local node_modules, so a clean checkout of the feature would not build. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Two gaps that together made a headless caller — a self-hosted agent, CI — unable to reach a self-hosted instance at all, and made a hand-added custom domain silently disappear. Service tokens. `ACCESS_ALLOWED_EMAILS` is an interactive email one-time-code gate that a machine cannot complete, and `oseo_` API keys exist only in hosted mode, so a self-hoster had no way in. `ACCESS_SERVICE_TOKEN_IDS` adds a Service Auth policy for the listed tokens. Access issues those tokens with an empty `sub` and no `email`, which `resolveCloudflareAccessContext` rejected; it now maps a token to a synthetic user in the shared workspace, keyed on `common_name`. Reaching that branch already means an operator wrote a policy admitting that exact token, so the token is the authorization. Custom domains. `CUSTOM_DOMAIN` binds extra hostnames to the worker and adds them to the Access application's destinations. Both are reconciled on every deploy, so a Custom Domain added in the dashboard read as "no domain wanted" and was torn down on the next deploy — taking the hostname off the Access app on the way. Declaring it is what makes it survive. Gating matters as much as routing here: a routed hostname missing from destinations reaches the worker without an Access check. Docs cover both, including that a service token reads and writes real projects in the shared workspace and should be treated like a listed email. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Entry written by codex on 2026-08-25 and left uncommitted in the working tree.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Adds persisted Local SEO map-grid tracking across SQLite and Postgres, including configuration management, deterministic grid generation, durable queued Google Maps scans, historical run results, and an interactive Leaflet map.
The collection workflow now keeps provider calls inside small durable steps so a 7×7 grid with multiple keywords cannot exhaust a Worker invocation's subrequest budget. Normal queued tasks are allowed 50 minutes to complete before being marked timed out, matching the provider's documented 45-minute target with a small buffer.
Safety, durability, and billing
How to review
The highest-risk areas are billed-task durability, dialect parity, historical results after configuration edits, and recovery around workflow startup.
Verification
Verified at head
6fe6091:Review notes
No unresolved blocker or should-fix findings remain.
Optional follow-ups: migrate the setup modal to TanStack Form, and include any rare provider cost attached to rejected task-post response entries in run-level reporting. Hosted scans must remain disabled until atomic Autumn reservation/finalization is implemented.