test: lock every remaining README 'What is live in this repo' claim to code (promise audit, lane 1) - #63
Conversation
…o code Completes the lane-1 promise audit: every bullet in the README 'What is live in this repo' section is now tied to the code that backs it, not just the numeric caps, routes, and state-truthfulness claims pinned in the earlier audit passes. The live /demo, /methodology, and /packages pages were verified byte-identical to the shipped Worker copy and the repeatable live spot-check still passes. New pins cover the functional claims that were previously only manually verified: - rendered Playwright audit, static-vs-rendered comparison, evidence - crawl-depth tiers with per-page scores and page proof - crawl-intelligence signals (link graph depth, low-inbound pages, sitemap orphan candidates, duplicate titles/descriptions/H1s, near-duplicate content, parameterized URLs, cannibalization) - audit-history deltas (fixed, new, still-open vs same host) - technical validation pack (broken links, redirecting internal links, broken images, canonical reachability, hreflang, JSON-LD, HTTPS/HSTS, large assets, slow loads) - PageSpeed/Lighthouse mobile score, lab metrics, opportunities - resource-waterfall request counts, transfer size, slow/heavy/ render-blocking evidence and repair actions - backlink import (live/lost proof, risky signals, broken targets, anchor flags, history tables) - local SEO (GBP URL, NAP, LocalBusiness, citations) - keyword/rank import (low-CTR, page-two, zero-click, decline, cannibalization, intent-match, uncrawled landing pages) - platform audit (Product/BreadcrumbList schema, faceted links, WP archives, plugin resources) - false-positive guards and exact fix snippets - developer brief, repair queue, agent board, implementation packs, account feed, repair proposals - React UI and Cloudflare Worker Static Assets + Browser Run - waitlist/access, beta workbench, sessions/modes, D1 tables, admin ops dashboard, Fix Pack checkout CTA, support/terms/privacy npm run check and npm run audit:live-promise are green.
There was a problem hiding this comment.
nish3451 has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
📝 WalkthroughWalkthroughThe pull request expands ChangesPromise audit coverage
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@shared/promise-audit.test.mjs`:
- Around line 293-315: Add an assertion in the test “README technical validation
pack covers every listed check” that verifies auditEngineSource contains the
broken-link detector or its emitted finding, alongside the existing audit
implementation assertions. Keep the README signal checks and all other detector
assertions unchanged.
- Around line 520-523: Update the crawlInventorySource assertion in the “README
sitemap inventory claim keeps rendered repair proof separate” test so its
matcher requires both CRAWLRAVEN_PUBLIC_CRAWL_PAGES and the 50000 limit within
the same applicable cap expression, rather than accepting either token
independently. Keep the existing liveSection and migrationHas assertions
unchanged.
- Around line 491-504: Strengthen the assertions in the test covering Developer
API and Fix Pack claims: verify a concrete API-key lifecycle or authorization
symbol in developerApiSource, and verify Dodo-specific checkout integration
rather than only the generic checkout token in fixPackCheckoutSource. Keep the
existing endpoint, webhook, and eligibility assertions intact.
- Around line 398-405: Strengthen the promise-audit tests around the developer
brief and related output claims by asserting their implementation or migration
sources, not only README text. Cover developer-brief snippets, repair-queue
status, open and applied account-feed items, and repair-proposal associations
with Fix Pack requests and final rerun-proof references; update the tests near
the existing brief, queue, and proposal assertions so removing any claimed field
causes failure.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: bfc74ad6-9d21-4582-8413-e9ff8cd9ffec
📒 Files selected for processing (1)
shared/promise-audit.test.mjs
| test("README technical validation pack covers every listed check", () => { | ||
| assert.match(liveSection, /Technical validation pack/i); | ||
| for (const signal of [ | ||
| /broken links/i, | ||
| /redirecting internal links/i, | ||
| /broken images/i, | ||
| /canonical reachability/i, | ||
| /hreflang mistakes/i, | ||
| /invalid JSON-LD/i, | ||
| /HTTPS\/HSTS/i, | ||
| /large assets/i, | ||
| /slow rendered loads/i | ||
| ]) { | ||
| assert.match(liveSection, signal, `README lists ${signal}`); | ||
| } | ||
| assert.match(auditEngineSource, /Redirecting internal links on/, "redirecting internal links checked"); | ||
| assert.match(auditEngineSource, /Broken images on/, "broken images checked"); | ||
| assert.match(auditEngineSource, /canonicalCheck/, "canonical reachability checked"); | ||
| assert.match(auditEngineSource, /validateHreflang/, "hreflang mistakes checked"); | ||
| assert.match(auditEngineSource, /JSON-LD could not be parsed/, "invalid JSON-LD checked"); | ||
| assert.match(auditEngineSource, /HSTS security header missing/, "HSTS checked"); | ||
| assert.match(auditEngineSource, /oversizedImages/, "large assets checked"); | ||
| assert.match(auditEngineSource, /Slow rendered load on/, "slow rendered loads checked"); |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Pin the broken-link implementation check.
Lines 296-306 verify that the README lists broken links. Lines 308-315 do not verify a broken-link check in auditEngineSource. Removing that check will keep this test green.
Add a direct assertion for the broken-link detector or its emitted finding.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@shared/promise-audit.test.mjs` around lines 293 - 315, Add an assertion in
the test “README technical validation pack covers every listed check” that
verifies auditEngineSource contains the broken-link detector or its emitted
finding, alongside the existing audit implementation assertions. Keep the README
signal checks and all other detector assertions unchanged.
| test("README developer brief claim matches priority, effort, proof, acceptance, and snippets", () => { | ||
| assert.match(liveSection, /Copyable developer repair brief/i); | ||
| assert.match(briefSource, /priority: index \+ 1/, "brief orders repairs by priority"); | ||
| assert.match(briefSource, /estimatedEffort/, "brief includes effort"); | ||
| assert.match(briefSource, /proof/, "brief includes proof"); | ||
| assert.match(briefSource, /acceptanceChecks/, "brief includes acceptance checks"); | ||
| assert.match(liveSection, /with priority, effort, proof, acceptance checks, and snippets/i); | ||
| }); |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Pin the remaining claimed output fields to implementation.
These tests verify README text but do not verify all claimed implementation fields. This includes developer-brief snippets, repair-queue status, open and applied account-feed items, and the repair-proposal association with Fix Pack requests and final rerun-proof references.
A removal of these fields can leave the promise audit green. Add source or migration assertions for each claimed field.
Also applies to: 407-414, 436-453
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@shared/promise-audit.test.mjs` around lines 398 - 405, Strengthen the
promise-audit tests around the developer brief and related output claims by
asserting their implementation or migration sources, not only README text. Cover
developer-brief snippets, repair-queue status, open and applied account-feed
items, and repair-proposal associations with Fix Pack requests and final
rerun-proof references; update the tests near the existing brief, queue, and
proposal assertions so removing any claimed field causes failure.
| test("README account summary, developer API, admin ops, and Fix Pack CTA claims match code", () => { | ||
| assert.match(liveSection, /Customer workspace summary API and dashboard at `\/api\/account\/summary`/i); | ||
| assert.match(workerIndex, /url\.pathname === "\/api\/account\/summary"/, "account summary route registered"); | ||
| assert.match(accountSource, /repairAccountSummaryFromItems/, "account summary built from repair items"); | ||
| assert.match(liveSection, /Self-serve Developer API keys/i); | ||
| assert.match(developerApiSource, /implementation\.md/, "implementation-pack markdown endpoint exists"); | ||
| assert.match(developerApiSource, /proof\.md/, "proof-receipt markdown endpoint exists"); | ||
| assert.match(developerApiSource, /webhook/i, "lifecycle webhooks exist"); | ||
| assert.match(liveSection, /`\/beta\/admin` ops dashboard for waitlist, invites, audits, repeated issue patterns, and fix requests/i); | ||
| assert.match(adminSource, /issuePatterns/, "repeated issue patterns surfaced"); | ||
| assert.match(adminSource, /fix.?request/i, "fix requests surfaced"); | ||
| assert.match(liveSection, /Dodo-backed SEO Fix Pack checkout CTA inside reports when real fixes exist/i); | ||
| assert.match(fixPackCheckoutSource, /checkout/, "Fix Pack checkout path exists"); | ||
| assert.match(briefSource, /fixPackEligible/, "reports become Fix Pack eligible when real fixes exist"); |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Verify the API-key and Dodo claims directly.
The Developer API assertions only check artifact endpoints and webhooks. The Fix Pack assertion only checks a generic checkout token. The test will pass if self-serve API-key support or the Dodo integration is removed.
Assert the API-key lifecycle or authorization code and the Dodo-specific checkout integration.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@shared/promise-audit.test.mjs` around lines 491 - 504, Strengthen the
assertions in the test covering Developer API and Fix Pack claims: verify a
concrete API-key lifecycle or authorization symbol in developerApiSource, and
verify Dodo-specific checkout integration rather than only the generic checkout
token in fixPackCheckoutSource. Keep the existing endpoint, webhook, and
eligibility assertions intact.
| test("README sitemap inventory claim keeps rendered repair proof separate", () => { | ||
| assert.match(liveSection, /discovering up to 50,000 sitemap URLs while keeping rendered repair proof separate/i); | ||
| assert.match(crawlInventorySource, /CRAWLRAVEN_PUBLIC_CRAWL_PAGES|50000/, "inventory cap is 50,000 URLs"); | ||
| assert.ok(migrationHas("large_crawl_url_proofs"), "large-crawl proof stored separately"); |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Require the 50,000 cap in the source matcher.
/CRAWLRAVEN_PUBLIC_CRAWL_PAGES|50000/ passes when the source contains only CRAWLRAVEN_PUBLIC_CRAWL_PAGES. It does not prove that the cap is 50,000.
Use a matcher that requires the environment variable and the 50000 limit in the applicable cap expression.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@shared/promise-audit.test.mjs` around lines 520 - 523, Update the
crawlInventorySource assertion in the “README sitemap inventory claim keeps
rendered repair proof separate” test so its matcher requires both
CRAWLRAVEN_PUBLIC_CRAWL_PAGES and the 50000 limit within the same applicable cap
expression, rather than accepting either token independently. Keep the existing
liveSection and migrationHas assertions unchanged.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 796e9c67e8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| function migrationHas(table) { | ||
| return allMigrations.includes(`CREATE TABLE IF NOT EXISTS ${table}`); |
There was a problem hiding this comment.
Validate the final migrated schema instead of historical SQL
migrationHas() returns true whenever any historical migration created a table, even if a later migration drops or renames it. In that scenario, every new assertion using this helper continues to certify README claims that the table is live although the deployed final schema no longer contains it; apply the migrations to a temporary database or account for subsequent schema operations before asserting table existence.
AGENTS.md reference: AGENTS.md:L7-L7
Useful? React with 👍 / 👎.
| assert.match(reportDeltaSource, /fixedIssues/, "fixed issues reported"); | ||
| assert.match(reportDeltaSource, /newIssues/, "new issues reported"); | ||
| assert.match(reportDeltaSource, /persistentIssues/, "still-open issues reported"); | ||
| assert.match(reportDeltaSource, /same owner and host/, "delta compares against the same host"); |
There was a problem hiding this comment.
Assert the owner and host selection predicates
This assertion only matches the explanatory phrase in shared/report-delta.js; the actual same-owner/same-host guarantee is enforced by the query in latestSavedReportForDelta() in worker/lib/report-data.js, which this test never reads. If either owner_email = ? or target_host = ? is removed, cross-owner or cross-host reports can be compared while this promise audit still passes.
AGENTS.md reference: AGENTS.md:L7-L7
Useful? React with 👍 / 👎.
| for (const signal of [ | ||
| /broken links/i, |
There was a problem hiding this comment.
Pin the broken-link implementation
For the broken links item, this loop verifies only that the README still contains the words; unlike every following validation-pack item, there is no assertion against auditEngineSource. Removing the brokenInternalLinks finding generation would therefore leave the advertised capability absent while this test—whose name says it covers every listed check—continues to pass.
AGENTS.md reference: AGENTS.md:L7-L7
Useful? React with 👍 / 👎.
…code (#64) The lane-1 audit (PR #63) pinned all 48 'What is live in this repo' bullets, but fresh spot-checking found three sub-claims inside pinned bullets with no regression pin of their own: - queued audit jobs: 'status polling before the private report loads' (UI pollAuditJob + /api/audit/jobs/ endpoint were unpinned) - saved private report URLs: 'tied to the beta owner email and invite where available' (owner_email/owner_invite_id storage was unpinned) - public /support, /terms, /privacy pages 'with no ranking guarantees' (the affirmative no-ranking copy on those pages was unpinned) Adds three pins to shared/promise-audit.test.mjs (44 tests total) so these claims cannot silently drift.
What
Completes the lane-1 promise audit. Every claim in the README
What is live in this reposection is now tied to the code that backs it via repeatable regression pins inshared/promise-audit.test.mjs.Audit findings
The audit itself found the README claims and the live pages truthful:
npm run audit:live-promise): /demo, /methodology, /packages all pass against https://seofixkit.com.worker/routes/pages.jsHTML — all three are identical, no drift.What changed
Only
shared/promise-audit.test.mjs(+314 lines): 24 new regression tests (41 total) that pin the remaining README bullets to load-bearing code strings, D1 migrations, Worker routes, and page copy — in the same style as the earlier promise-audit passes (#60, #62). This makes the audit repeatable instead of one-shot.Validation
npm run check: exit 0, 0 failures (includestest:promise-auditwith 41 pass / 0 fail)npm run audit:live-promise: all 3 public pages okSummary by CodeRabbit