Skip to content

Fix #47 review findings: custom XML decoding, decision record, dashboard denominators - #48

Merged
wolfiesch merged 4 commits into
masterfrom
fix/pr47-review
Oct 2, 2026
Merged

wolfiesch merged 4 commits into
masterfrom
fix/pr47-review

Conversation

@wolfiesch

@wolfiesch wolfiesch commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Follow-up to #47, addressing its three review threads.

  • Mutation scorer: _canonical_xml now passes raw bytes to ET.canonicalize, so the BOM and XML declaration select the decoding. An equivalent UTF-8 to UTF-16 rewrite of custom XML no longer counts as a custom_xml change. Regression test added. Rescoring every stored output in results-2026-10-02/mutation/ with the fixed scorer gives the same verdict and feature-preservation count for every engine, so the published results are unchanged.
  • Decision record: DEC-027 records registering the JSON-model helpers (sheetjs, exceljs, libreoffice) in get_all_adapters() and the move to content-model preservation scoring. architecture.md now matches the code.
  • Dashboard: a shared _scored_results helper drops features that no adapter scored (pivot_tables in the 2026-10-02 snapshot) from Features Scored, the score-3 total, radar coverage and the WolfXL hero. WolfXL now renders 20/21 for that snapshot. Test added.

Gate: ruff check, mypy src, pytest with OPENPYXL_LXML=False (the Linux CI writer path).


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

_canonical_xml decoded every part as UTF-8 before parsing, so a valid
UTF-16 custom XML item fell into the raw-byte hash path and an equivalent
UTF-8 to UTF-16 rewrite was scored as a custom_xml change. Pass the bytes
to the parser so the BOM and XML declaration control decoding.

Rescoring the stored 2026-10-02 mutation outputs with the fixed scorer
leaves every engine's verdict and feature preservation unchanged.
Add DEC-027: JSON-model external helpers (sheetjs, exceljs, libreoffice)
are registered and scored like any other adapter so the comparison covers
non-Python libraries, and mutation preservation compares parsed content so
equivalent rewrites score the same as in-place edits. Update architecture.md,
which still said external helpers are excluded from get_all_adapters().
The overview's Features Scored card, the score-3 total, the WolfXL hero
fraction and the radar's feature coverage counted features whose read and
write scores are null for every adapter, so the unscored pivot_tables row
inflated the 2026-10-02 denominators from 21 to 22. Filter those rows with
one shared helper before computing the aggregates.
Copilot AI balanced review requested due to automatic review settings October 2, 2026 09:30

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 three referenced findings are correctly addressed with aligned regression coverage and documentation.

Review effort: Balanced
Findings: None

What changed in this PR

Addresses PR #47 review findings across mutation scoring, architecture records, and dashboard denominators.

Changes:

  • Corrects encoding-aware custom XML canonicalization.
  • Excludes globally unscored features from dashboard metrics.
  • Documents external-helper adapters and content-model scoring.
File Description
src/​excelbench/​harness/​mutation.py Passes raw XML bytes to canonicalization.
src/​excelbench/​results/​html_dashboard.py Filters globally unscored features from aggregates.
tests/​test_mutation_suite.py Adds UTF-16 XML regression coverage.
tests/​test_results_html_dashboard.py Tests corrected dashboard denominators.
decisions.md Adds DEC-027 and supersession notes.
architecture.md Updates adapter and mutation-scoring architecture.

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

@wolfiesch
wolfiesch merged commit 234321f into master Oct 2, 2026
5 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.

2 participants