Skip to content

Fix the two record defects from #52 - #107

Merged
mmcky merged 1 commit into
mainfrom
fix-52-record-defects
Aug 31, 2026
Merged

Fix the two record defects from #52#107
mmcky merged 1 commit into
mainfrom
fix-52-record-defects

Conversation

@mmcky

@mmcky mmcky commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

The two small defects recorded in #52, both verified still present on main today.

lectures/assignat.xlsx.yml:97 — the comment said "14 further sheets" and listed 15. Fifteen is right: 18 sheets in the workbook, 3 distinct sheets read (Budgets, seignor, Data). The miscount came from subtracting the four schema.sheets entries rather than the three distinct names, since Data is declared twice as two ranges. Comment only; schema.sheet_count: 18 was already correct and nothing consumes the number.

scripts/build_audit.py, committed_referenced() — the basename fallback's condition (pattern == "local-path" and repo == repo and basename matches) was a strict superset of the first branch's condition, so it could only be evaluated where it could not hold: dead code that read as protection in the function that decides whether a committed file counts as referenced. Deleted rather than widened. A working basename match would count a same-named file in another directory as referenced and quietly hide orphans, which is the opposite of what that function is for.

Regression check. Ran scan over the same local clones with the main version and this branch's version of the script: audit.json is identical apart from the generated timestamp (40 static files, 24 orphans, 23 live-API lectures in both), and the fixed script runs clean under --strict.

See #52.

🤖 Generated with Claude Code

assignat.xlsx.yml said 14 further sheets and listed 15; fifteen is right
(18 in the workbook, 3 distinct sheets read). The miscount came from
subtracting the four schema.sheets entries rather than the three distinct
names, since Data is declared twice.

committed_referenced() carried a basename fallback whose condition was a
strict superset of the first branch's, so it could only be evaluated where
it could not hold — dead code that read as protection. Deleted rather than
widened: a basename match would count a same-named file in another
directory as referenced and quietly hide orphans. Regression-checked by
scanning the same local clones with both versions: audit.json identical
apart from the timestamp.

See #52.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 31, 2026 23:14

Copilot AI 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.

Pull request overview

This PR fixes two small record defects identified in #52: a miscount in the assignat.xlsx manifest comment and removal of unreachable fallback logic in the audit script that determines whether committed files are referenced by lectures.

Changes:

  • Correct the “further sheets” comment in lectures/assignat.xlsx.yml from 14 to 15 (comment-only; aligns with sheet_count: 18 and 3 distinct consumed sheets).
  • Remove unreachable basename-fallback logic in scripts/build_audit.py:committed_referenced() and the now-unneeded base variable.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
scripts/build_audit.py Removes dead/unreachable basename fallback branch in committed_referenced() for clearer, correct reference detection logic.
lectures/assignat.xlsx.yml Fixes a comment miscount of unread workbook sheets (14 → 15) to match the enumerated list and workbook sheet count.

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

@mmcky
mmcky merged commit bba261c into main Aug 31, 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