Phase 19 soak check — manual run required (auth gap) - #7
Draft
mereditharmcgee wants to merge 2 commits into
Draft
Conversation
4-week soak check for idx_reviews_building_status could not run remotely because CLOUDFLARE_API_TOKEN is not set in this environment. Adds a manual runbook so the owner can complete the check from a credentialed local terminal. https://claude.ai/code/session_01BZFGwHbDHPfuhMGuE1DxsE
Deploying ratemyplace with
|
| Latest commit: |
f1bb6bf
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://49364f61.ratemyplace-64y.pages.dev |
| Branch Preview URL: | https://chore-phase19-soak-check-202.ratemyplace-64y.pages.dev |
All 4 checks green against production D1: composite index present, Q1/Q2/Q3 planner output exact match to the 2026-04-28 baseline, bloom filter still active on Q2. No regression, no follow-up needed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
$(cat <<'EOF'
Why this PR exists
The 4-week soak check for Phase 19 (
idx_reviews_building_status) was triggered on 2026-05-26 in a remote Claude Code environment.wrangler whoamireturned "You are not authenticated" — noCLOUDFLARE_API_TOKENis set and no cached OAuth token exists in the container. The live remote audit was skipped per the auth-gate rule.This PR adds a manual runbook at
.planning/audits/phase19-soak-check-2026-05-26.mdso you can complete the check from a credentialed local terminal. Close or merge this PR once you've run the script and recorded the result.What to verify
Phase 19 added
idx_reviews_building_status ON reviews(building_id, status)to production D1 on 2026-04-29. The soak check confirms the query planner is still using the composite index after 4 weeks of real user traffic — not reverting to the oldidx_reviews_statussingle-column scan.Baseline:
.planning/audits/d1-indexes-2026-04-28.md(sections "After (remote)" for Q1, Q2, Q3).Copy-paste script
Run these commands from a local terminal where
wrangler whoamisucceeds.0. Confirm index still exists
npx wrangler d1 execute ratemyplace-db --remote --command "SELECT name FROM sqlite_master WHERE type='index' AND name='idx_reviews_building_status'"Expected: 1 row —
name = idx_reviews_building_statusQ1 — buildings LEFT JOIN approved reviews
npx wrangler d1 execute ratemyplace-db --remote --command "EXPLAIN QUERY PLAN SELECT b.*, COUNT(r.id) as review_count, ROUND(AVG(r.overall_score), 1) as avg_overall, l.name as landlord_name FROM buildings b LEFT JOIN reviews r ON b.id = r.building_id AND r.status = 'approved' LEFT JOIN landlords l ON b.landlord_id = l.id GROUP BY b.id HAVING COUNT(r.id) > 0 ORDER BY COUNT(r.id) DESC, AVG(r.overall_score) DESC LIMIT 10 OFFSET 0"Expected:
SEARCH r USING INDEX idx_reviews_building_status (building_id=? AND status=?) LEFT-JOINQ2 — landlords LEFT JOIN buildings LEFT JOIN approved reviews
npx wrangler d1 execute ratemyplace-db --remote --command "EXPLAIN QUERY PLAN SELECT l.*, COUNT(DISTINCT b.id) as building_count, COUNT(r.id) as review_count, ROUND(AVG(r.overall_score), 1) as avg_overall FROM landlords l LEFT JOIN buildings b ON b.landlord_id = l.id LEFT JOIN reviews r ON r.building_id = b.id AND r.status = 'approved' GROUP BY l.id HAVING COUNT(r.id) > 0 ORDER BY COUNT(r.id) DESC, l.name ASC LIMIT 10 OFFSET 0"Expected:
SEARCH r USING INDEX idx_reviews_building_status (building_id=? AND status=?) LEFT-JOIN(may also show a precedingBLOOM FILTER ON rline — that's a bonus, not required for PASS)Q3 — autocomplete: buildings LEFT JOIN approved reviews
npx wrangler d1 execute ratemyplace-db --remote --command "EXPLAIN QUERY PLAN SELECT b.id, b.address, b.neighborhood, b.city, b.state, b.slug, COUNT(r.id) as review_count, ROUND(AVG(r.overall_score), 1) as avg_overall FROM buildings b LEFT JOIN reviews r ON b.id = r.building_id AND r.status = 'approved' WHERE b.address LIKE '%boston%' ESCAPE '\' OR b.neighborhood LIKE '%boston%' ESCAPE '\' GROUP BY b.id ORDER BY review_count DESC, b.address ASC LIMIT 5"Expected:
SEARCH r USING INDEX idx_reviews_building_status (building_id=? AND status=?) LEFT-JOINChecklist
sqlite_masterSEARCH r USING INDEX idx_reviews_building_statusSEARCH r USING INDEX idx_reviews_building_statusSEARCH r USING INDEX idx_reviews_building_statusIf any query FAILS
npx wrangler d1 execute ratemyplace-db --remote --command "PRAGMA optimize"then re-EXPLAIN..planning/audits/phase19-soak-check-2026-05-26.md.Expected output reference
Full expected EXPLAIN output for each query (verbatim from the locked baseline) is in
.planning/audits/d1-indexes-2026-04-28.md, sections "EXPLAIN QUERY PLAN (after, remote)" for Q1, Q2, and Q3.https://claude.ai/code/session_01BZFGwHbDHPfuhMGuE1DxsE
EOF
)
Generated by Claude Code