Skip to content

Accept the W3C validator's new message in the Excel preview test - #5363

Merged
nl0 merged 1 commit into
masterfrom
fix-excel-preview-validator-message
Sep 28, 2026
Merged

nl0 merged 1 commit into
masterfrom
fix-excel-preview-validator-message

Conversation

@nl0

@nl0 nl0 commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

The need

test-lambda (shared) fails on every branch. test_excel posts the Excel preview's HTML to the W3C HTML validator and allows only the errors it lists, and the validator now reports the preview's <style scoped> inside a <div> as Attribute "scoped" not allowed on element "style" at this point. instead of Element "style" not allowed as child of element "div" in this context. (Suppressing further errors from this subtree.). Neither the markup nor the lambdas changed; the service did. The test has to accept the current message for the same markup.

What changed

The test accepts the validator's new message. The old one stays, since the service may serve either.

Verification

  • cd lambdas/shared && uv run pytest --cov=src --cov-report=term-missing --cov-report=xml, the CI step: test_excel fails before this change on the new message and passes after it (22 passed, 1 xfailed).
  • uvx ruff@0.16.0 check . --exclude catalog/ --exclude api/python/ passes.

Links

None: no issue or spec change, and no sibling pull requests.

Risk and rollback

Test-only; nothing that ships changes. The new entry exempts the validator's current complaint about the same pandas markup and nothing broader. Revert the commit to roll back.

The optionality note

Closes no door. The test still depends on the live validator's wording; taking it off that dependency stays open.

🤖 Generated with Claude Code

RetriggerConfidence Score: 5/5

The PR appears safe to merge.

Summary

The PR adds the W3C validator’s current <style scoped> error message to the Excel preview test’s allowlist while retaining the previous message.

Reviews (1) · Last reviewed commit: "Accept the W3C validator's new message f..."

…block

The validator now reports pandas' `<style scoped>` inside a `<div>` as
`Attribute "scoped" not allowed on element "style" at this point.`
instead of the message the test already accepts. Keep the old message
too, since the service may serve either.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 42.69%. Comparing base (e6aef94) to head (22207f3).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5363      +/-   ##
==========================================
+ Coverage   38.41%   42.69%   +4.28%     
==========================================
  Files         753      770      +17     
  Lines       24866    27362    +2496     
  Branches     6794     6794              
==========================================
+ Hits         9552    11683    +2131     
- Misses      13553    13918     +365     
  Partials     1761     1761              
Flag Coverage Δ
catalog 38.41% <ø> (ø)
lambda 85.37% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The test-only change is narrowly scoped and has no unresolved issues.

Review effort: Lite
Findings: None

What changed in this PR

Updates the Excel preview validator test to accept the W3C validator’s new message while retaining the previous one.

Changes:

  • Adds the new validator message to the accepted errors list.
  • Preserves compatibility with the prior message.
File Description
lambdas/​shared/​tests/​test_preview.py Expands accepted W3C validator messages for Excel previews.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@nl0
nl0 merged commit 82ab522 into master Sep 28, 2026
47 checks passed
@nl0
nl0 deleted the fix-excel-preview-validator-message branch September 28, 2026 12:35
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.

2 participants