fix(content): make sitemap/RSS/llms trigger chain observable and auth-explicit - #28
Merged
Merged
Conversation
…-explicit supabase-js functions.invoke reports failure via return value, not exception, so the try/catch-swallow pattern hid every failure. The whole regeneration chain (sitemap, RSS, llms.txt, snapshot, IndexNow) has been silently dead since the 2026-07-09 redeploy: storage artifacts frozen at Jul 9 20:04Z, sitemap missing hyperliquid-analysis and emitting pre-rename slugs. - call sibling functions via explicit fetch with explicit service-role Authorization (independent of library auth defaults) - pin supabase-js import to 2.58.0 (unpinned @2 re-resolves on every deploy) - surface per-trigger success/failure in the tool response (triggers[]) for upsert_page and delete_page instead of pretending success Co-Authored-By: Claude Fable 5 <[email protected]>
✅ Deploy Preview for mangabeira ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: gogrowth-co/coderabbit/.coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe MCP content function now uses authenticated POST requests to trigger regeneration Edge Functions. Page upsert and deletion responses include trigger success or failure statuses. ChangesContent regeneration
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant MCPCaller
participant mcp-content
participant triggerFn
participant EdgeFunction
MCPCaller->>mcp-content: Upsert or delete page
mcp-content->>triggerFn: Trigger regeneration
triggerFn->>EdgeFunction: Authenticated POST request
EdgeFunction-->>triggerFn: HTTP response
triggerFn-->>mcp-content: Success or failure status
mcp-content-->>MCPCaller: Response with trigger results
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
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.
Root cause
The sitemap, RSS, and llms.txt in Supabase Storage have been frozen since 2026-07-09 20:04Z (verified via storage last-modified headers). The live sitemap is missing
hyperliquid-analysis, still emits pre-rename slugs, and Google never saw Arena #1.supabase.functions.invokereports failure via its return value, not an exception — so everytry { invoke } catch (_) {}call site swallowed the failures invisibly, andupsert_pageeven reportedsitemapas triggered on failure. The chain broke at the 2026-07-09 redeploy ofmcp-content(the unpinnedesm.sh/@supabase/supabase-js@2import re-resolves on every deploy).Fix
fetchwith explicit service-roleAuthorization+apikeyheaders — independent of library auth defaults.supabase-jspinned to2.58.0.triggers[]) for bothupsert_pageanddelete_page, and logged viaconsole.erroron failure.Verification plan (post-deploy)
Call
delete_pageon a throwaway draft — the response now includestriggers; then confirm storagelast-modifiedadvances and the live sitemap containshyperliquid-analysis.🤖 Generated with Claude Code
Summary by CodeRabbit