Repository navigation
feat: pair Singapore stamp duty and income tax with their hreflang counterparts - #31
Conversation
An audit of the ten new Singapore pages found two that have a genuine national counterpart already on the site but emitted no hreflang: uk-stamp-duty-calculator <-> singapore-stamp-duty-calculator us-tax-bracket-calculator <-> singapore-income-tax-calculator Both pairs do the same job for a different country, which is the same test the three existing families pass. The other five Singapore pages (seller stamp duty, CPF retirement sum, notice period, AWS bonus, utility bill) have no counterpart and stay standalone. The test file kept a hand-copied duplicate of the family list, so a missing or wrong family could never fail the gate. FAMILIES is now exported and the test walks the real list. Adds a check that no page appears in two families, which would make getAlternates silently pick the first. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XMvYP5cw9yaSpCH2bR2EU5
Deploying boring-maths with
|
| Latest commit: |
f6c4ccb
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a507e7c8.boring-maths.pages.dev |
| Branch Preview URL: | https://seo-singapore-hreflang-famil.boring-maths.pages.dev |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f6c4ccb8de
ℹ️ 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".
| ['/calculators/uk-employer-cost-calculator/', '/calculators/singapore-employer-cost-calculator/'], | ||
| ['/calculators/us-sales-tax-calculator/', '/calculators/singapore-gst-calculator/'], | ||
| ]; | ||
| const FAMILY_HREFS = FAMILIES.map((f) => f.map((m) => m.href)); |
There was a problem hiding this comment.
Keep an independent list of expected hreflang families
Deriving FAMILY_HREFS directly from the production FAMILIES array makes the tests unable to detect a family being accidentally removed: deleting either newly added pair from FAMILIES also removes every test case for that pair, so all seven tests still pass. Retain independent assertions for the expected family memberships (or at least explicitly assert these new pairs) so the gate protects against the omission this change is intended to prevent.
Useful? React with 👍 / 👎.
Audit of the ten new Singapore calculators: SEO is otherwise clean (all 10 in the sitemap, 1 h1 each, canonical + og:image present, full schema graph, 3 to 9 internal inbound links each, no orphans). Title and description lengths match the existing house style across all 194 calculator pages, so they are not a Singapore-specific defect.
Two real gaps found, both pages with a genuine national counterpart already on the site but no hreflang:
singapore-stamp-duty-calculator(BSD + ABSD)uk-stamp-duty-calculator(SDLT)singapore-income-tax-calculator(brackets, marginal + effective rate)us-tax-bracket-calculator(same)The other five Singapore pages have no counterpart anywhere in the registry and correctly stay standalone: seller stamp duty (no UK or US equivalent exists), CPF retirement sum, notice period, AWS bonus, utility bill.
Why the gate did not catch this
tests/seo/hreflang.test.tskept a hand-copied duplicate of the family list, so a missing or wrong family was invisible to every test.FAMILIESis now exported and the test walks the real list. Added one check: no page in two families, which would makegetAlternatessilently return the first match.Verification
npx vitest run-> 199 files, 1275 tests passednpm run build-> 239 pages, all four postbuild SEO gates OKtip-calculatorcontrol still 0🤖 Generated with Claude Code
https://claude.ai/code/session_01XMvYP5cw9yaSpCH2bR2EU5