Commit 5ef8131
fix(coverage): name the whole-file number for what it is, a range end (#963)
Review follow-up on this branch.
Each parse_unusable entry carries one number, and the field was called
"lines". That reads as the length of the file, and the two are not the same
number: a grammar can end an error node past the last line, which this repo
has already met — scripts/setup-windows.ps1 has 326 lines and its range ends
at 327. A report whose whole thesis is honest reporting should not name that
number after the wrong thing.
"lines" also already means something else in this same response. Every search
result carries a "lines" field holding a definition's line span. One word, two
meanings, one document.
The field is now "range_end", at both places that emit it — add_coverage_report
reading the persisted rows, and add_parse_unusable_summary reading the per-run
errors. The comment beside each one says the number can exceed the file, so the
next reader does not have to rediscover it.
Deriving the real file length instead was the other option and is not
available here: neither cbm_file_error_t nor cbm_coverage_row_t carries it,
only the path and the range string.
One test, proved RED first — "range_end is NULL" against the old field name.
It reads the end line from the persisted coverage row rather than a constant,
so it states the property and not a measurement, and it asserts the old name is
gone rather than kept beside the new one.
index_resilience, parse_coverage and mcp: 283 passed, 4 skipped.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Joshua Richter <jrichter5781@gmail.com>1 parent 8a97328 commit 5ef8131
2 files changed
Lines changed: 100 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4579 | 4579 | | |
4580 | 4580 | | |
4581 | 4581 | | |
| 4582 | + | |
| 4583 | + | |
| 4584 | + | |
4582 | 4585 | | |
4583 | | - | |
| 4586 | + | |
4584 | 4587 | | |
4585 | 4588 | | |
4586 | 4589 | | |
| |||
7950 | 7953 | | |
7951 | 7954 | | |
7952 | 7955 | | |
7953 | | - | |
| 7956 | + | |
7954 | 7957 | | |
7955 | 7958 | | |
7956 | 7959 | | |
7957 | 7960 | | |
7958 | | - | |
7959 | | - | |
| 7961 | + | |
| 7962 | + | |
7960 | 7963 | | |
7961 | 7964 | | |
7962 | 7965 | | |
| |||
7979 | 7982 | | |
7980 | 7983 | | |
7981 | 7984 | | |
7982 | | - | |
| 7985 | + | |
| 7986 | + | |
| 7987 | + | |
7983 | 7988 | | |
7984 | | - | |
| 7989 | + | |
7985 | 7990 | | |
7986 | 7991 | | |
7987 | 7992 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
488 | 488 | | |
489 | 489 | | |
490 | 490 | | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
491 | 579 | | |
492 | 580 | | |
493 | 581 | | |
| |||
812 | 900 | | |
813 | 901 | | |
814 | 902 | | |
| 903 | + | |
815 | 904 | | |
816 | 905 | | |
817 | 906 | | |
0 commit comments