Skip to content

docs: fix stale status docs, check plan status, backend:status secrets and auth URLs - #98

Merged
Programcode merged 4 commits into
mainfrom
docs/stale-docs-plan-status
Oct 2, 2026
Merged

Programcode merged 4 commits into
mainfrom
docs/stale-docs-plan-status

Conversation

@Programcode

@Programcode Programcode commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

This fixes the docs agents were reading wrong and adds mechanical checks so the same staleness gets caught next time.

Stale docs fixed

  • docs/operations.md said staging E2E "has been skipped" since 2026-09-23. It actually runs after every main Quality push, and it failed today in authed-flows.spec.ts. The skipped entries come from PR-triggered Quality runs and are skipped by design. The paragraph now says how to check the live result instead of stating one.
  • docs/operations.md also said PRs "may get preview deployments" without the catch: a Vercel preview uses the production Supabase project unless the in-app switcher picks staging (resolveSupabaseConfig in src/lib/supabase/env.ts). It now says so and points to the staging-pinned npm run dev:preview.
  • plans/2026-10-01-voice-sparring-crossfire.md still said "Plan" although it shipped in feat(voice): spoken Sparring and Crossfire rounds #84. Four other plans had no status line at all. All six now have one.
  • plans/README.md said shipped plan files "were removed" and then linked three it kept. That sentence now matches the list.

New checks

  • npm run docs:check now requires a **Status:** line in the first 15 lines of every plans/*.md. It also rejects a plan linked under "## Shipped" whose status doesn't start with "Shipped". On main it reports exactly the five problems above. Two tests in check-docs.test.ts cover it.
  • npm run backend:status now also reports:
    • the expected function secrets the project lacks, from supabase secrets list. It prints names only, and a test asserts the digests never reach the output;
    • the Auth site_url and redirect allowlist, read through the Management API with the CLI's existing access token. Without a token it says "not checked".

Agent pointers

  • supabase/README.md gains an "Adding an Edge Function" checklist (config.toml, the db-gate and verify.sh readiness loops, the fake provider, --allow-env, EXPECTED_SECRETS). It also lists which secrets every deployed project needs and which ones fall back.
  • AGENTS.md and plans/README.md now say to commit a plan before splitting it across agent threads.

Verification

  • node scripts/check-docs.mjs on main flagged the five plan problems, and passes after the edits.
  • npx vitest run src/test/docs/check-docs.test.ts src/test/scripts/backend-status.test.ts: 29 and 7 passed. The backend-status tests now isolate HOME and the access token, so they never call the real Management API.
  • Ran backend:status read-only against both projects. Staging lacks STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET and ELEVENLABS_API_KEY. Production has every expected secret. Both allowlists printed.
  • eslint and npm run typecheck pass.

Findings for Adam (no changes made)

  • Staging's Auth site_url is http://localhost:8080.
  • Production's redirect allowlist still includes two old Lovable domains (*.lovableproject.com, id-preview--*.lovable.app).
  • Both projects hold secret names no code reads any more (ANTHROPIC_API_KEY, OPENAI_API_KEY, GOOGLE_*, AI_DEFAULT_*, plus JINA_API_KEY in production).
  • The verify skill's readiness loop is missing voice and account, which db-gate.sh waits for.

Codex review (gpt-6.1-sol, high) raised two findings, both resolved:

A review of the final head found nothing.

🤖 Generated with Claude Code

…s and auth URLs

- operations.md no longer says staging E2E has been skipped since
  2026-09-23 (it runs and currently fails), and warns that Vercel
  previews use the production Supabase project.
- Every plan now carries a **Status:** line. The voice sparring plan
  said "Plan" after shipping as #84. docs:check now requires the line
  and rejects a plan listed under Shipped that doesn't say Shipped.
- supabase/README.md lists every place a new Edge Function must be
  registered and the secrets each deployed project needs.
- backend:status also lists expected function secrets the project lacks
  (names only) and prints the Auth site URL and redirect allowlist.
- AGENTS.md and plans/README.md: commit a plan before splitting it
  across agent threads.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 2, 2026 18:40
@vercel

vercel Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
debate-navigator Ready Ready Preview Oct 2, 2026 7:40pm UTC

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

Next included review available in 41 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

Configuration used: Organization UI

Review profile: CHILL

Plan: Free

Run ID: f2aec3d1-0e7a-4135-9cb1-534719382d98

📥 Commits

Reviewing files that changed from the base of the PR and between a8a5167 and 473b1ff.

📒 Files selected for processing (13)
  • AGENTS.md
  • docs/operations.md
  • plans/2026-09-20_131317-debate-workspace.md
  • plans/2026-09-21-debate-workspace-no-bs.md
  • plans/2026-09-25_074255-current-debate-foundation.md
  • plans/2026-09-25_074255-debate-ai-quality-modules.md
  • plans/2026-10-01-voice-sparring-crossfire.md
  • plans/README.md
  • scripts/backend-status.mjs
  • scripts/check-docs.mjs
  • src/test/docs/check-docs.test.ts
  • src/test/scripts/backend-status.test.ts
  • supabase/README.md
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Essentials by visiting https://app.coderabbit.ai/settings/billing.

Comment @coderabbitai help to get the list of available commands.

…he keyring case

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Programcode

Copy link
Copy Markdown
Owner Author

live-e2e failed once on 473b1ff: e2e/live/research.spec.ts found a 2 px horizontal overflow on the Generate page after a real model run (npm run ci:failures -- 98). It depends on live model output, and this PR changes only docs, the docs checker and backend:status. Re-running the job. The overflow itself may be a real layout bug with some model outputs and is reported separately.

@Programcode
Programcode merged commit 34d1573 into main Oct 2, 2026
8 of 9 checks passed
@Programcode
Programcode deleted the docs/stale-docs-plan-status branch October 2, 2026 20:03

This branch was successfully deployed

1 active deployment
Preview — 473b1ff3 Deployed Oct 2, 2026 by vercel[bot]
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.

2 participants