Skip to content

Detect column misalignment by content, not by missing fields - #18

Merged
in-c0 merged 1 commit into
mainfrom
fix/alignment-detector
Aug 27, 2026
Merged

Detect column misalignment by content, not by missing fields#18
in-c0 merged 1 commit into
mainfrom
fix/alignment-detector

Conversation

@in-c0

@in-c0 in-c0 commented Aug 27, 2026

Copy link
Copy Markdown
Owner

Follow-up to #17, fixing a regression that the first scheduled run exposed.

The bug

The alignment detector keyed off rows carrying too few fields. But writing the CSV back out pads every row to the full column count — so one --fix pass erased the signal while leaving the defect completely in place.

The dispatch run after #17 merged duly reported:

alignment    562/562 rows carry all columns; 0 have a non-doc URL in the documentation column

on a dataset where 191 rows still serve a privacy policy, community forum or rate-limit page as their Official_Documentation_URL. Microsoft Graph People API still hands you privacy.microsoft.com. The detector had gone quiet about a defect it was built to find — the worst failure mode available to a monitor.

The fix

misalignedAs() now runs over every row and keys off the URL content, so the finding survives normalisation. Per-column statistics are gated on rows that are both complete and unshifted — 371 of 562, which is the honest denominator.

Tests cover the detector directly, with a comment recording why it is content-based, so it cannot regress silently again. npm test → 16 passing.

What the run proves

Re-probing after #17's 1,472 corrections landed:

before corrections after
ok 52.5% 91.8%
moved 41.7% 2.2%
dead 4.0% 3.1%

The self-healing pass does what it claims: redirect drift went from the dominant failure mode to noise. Residual moved is redirect chains that resolve one hop further on the second pass.

/llms.txt adoption also moved: 79 of 167 hosts (47%), up from 74/164 measured a few hours earlier — some of that is the larger host set, and this is exactly why the number is tracked per run rather than quoted once.

Also

  • Workflow bumped to Node 22; runners now default to Node 24 and warn on 20.
  • 58 further redirect corrections from this pass.

Still outstanding for the maintainer

The weekly PR step fails with GitHub Actions is not permitted to create or approve pull requests until Settings → Actions → General → "Allow GitHub Actions to create and approve pull requests" is enabled. Every other step succeeds and the full report uploads as an artifact regardless.

🤖 Generated with Claude Code

The first version keyed off rows carrying too few fields. Writing the CSV back
out pads every row to the full column count, so one --fix pass erased the signal
while leaving the defect in place: the CI run after the previous merge reported
"562/562 rows carry all columns; 0 misaligned" on a dataset where 191 rows still
serve a privacy policy or a community forum as their documentation URL.

misalignedAs() now runs over every row and keys off the URL itself, so the
finding survives normalisation. Per-column statistics are gated on rows that are
both complete and unshifted, which is the honest denominator: 371 of 562.

Tests cover the detector, with a note on why it is content-based, so this cannot
regress silently again.

Also bumps the workflow to Node 22 — runners now default to Node 24 and warn on
20.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@in-c0
in-c0 merged commit 5bc32ba into main Aug 27, 2026
1 of 2 checks passed
@in-c0
in-c0 deleted the fix/alignment-detector branch August 27, 2026 08:24
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