Skip to content

fix(google-ai): ignore HTML comments when looking for a visible date in G-DATES - #779

Merged
auriti merged 1 commit into
mainfrom
fix/g-dates-ignore-html-comments-20261130
Nov 30, 2026
Merged

auriti merged 1 commit into
mainfrom
fix/g-dates-ignore-html-comments-20261130

Conversation

@auriti

@auriti auriti commented Nov 30, 2026

Copy link
Copy Markdown
Collaborator

What

G-DATES looked for a visible date in the raw HTML, so a date that sits only inside an HTML comment counted as visible. Comments are now ignored when looking for the date.

Scope

The defect is present in 4.31.1 (audit_google_ai.py, around line 165). Nothing else changes.

Checks

  • pytest tests/ -q: 2881 passed, 7 skipped
  • ruff check src/geo_optimizer/: clean

…in G-DATES

The text-date check added in #776 read every string node, including HTML comments, so a date inside a comment such as "Published 2026-03-12" counted as a visible date and added one point to the google_ai category score. Comments, CDATA, doctype and processing instructions are now skipped; script, style, noscript and template were already skipped. Adds a regression test that fails without the fix. Full suite: 2879 passed, 9 skipped (one skip is the local editable-install check); ruff check and ruff format clean.

@claude claude 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.

⚠️ Code review skipped — your organization has no extra usage available to pay for this review.

If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.

Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.

@auriti
auriti merged commit 91e5809 into main Nov 30, 2026
8 checks passed
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