Skip to content

feat: pair Singapore stamp duty and income tax with their hreflang counterparts - #31

Merged
kitfunso merged 1 commit into
masterfrom
seo/singapore-hreflang-families
Sep 21, 2026
Merged

kitfunso merged 1 commit into
masterfrom
seo/singapore-hreflang-families

Conversation

@kitfunso

Copy link
Copy Markdown
Owner

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 page counterpart
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.ts kept a hand-copied duplicate of the family list, so a missing or wrong family was invisible to every test. FAMILIES is now exported and the test walks the real list. Added one check: no page in two families, which would make getAlternates silently return the first match.

Verification

  • npx vitest run -> 199 files, 1275 tests passed
  • npm run build -> 239 pages, all four postbuild SEO gates OK
  • built HTML: both new pairs emit 2 reciprocal self-referencing tags, tip-calculator control still 0

🤖 Generated with Claude Code

https://claude.ai/code/session_01XMvYP5cw9yaSpCH2bR2EU5

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
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Deploying boring-maths with  Cloudflare Pages  Cloudflare Pages

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

View logs

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-21T09:06:42.422041Z f6c4ccb PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 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));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@kitfunso
kitfunso merged commit 19b7c29 into master Sep 21, 2026
2 checks passed
@kitfunso
kitfunso deleted the seo/singapore-hreflang-families branch September 21, 2026 09:07
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.

1 participant