Repository navigation
fix(badges): reject hard-linked external README sources - #383
Conversation
andy-zen-dev
left a comment
There was a problem hiding this comment.
Independent exact-head review — c2d22a9
APPROVE. Reviewed the four-file diff, surrounding workflow badge reader and black-box tests, current AGENTS.md/CONTRIBUTING.md, changelog, discussions and review threads. The pre-open lstat and opened-descriptor fstat both reject non-regular or multiply-linked README inputs; the synthetic external hard-link regression asserts input-error exit 2 and unchanged external bytes. This is appropriately scoped to a stable checkout (not a concurrent filesystem adversary), and the documentation/changelog communicate the boundary.
Exact-head Quality CI run 43724503051: all 5 required jobs plus lint succeeded. Inspected Linux Python 3.11 and Windows Python 3.14 logs: the new hard-link test executed ok (not skipped) on both; each ran 837 tests. Optional MCP run 43724503086 also succeeded, but does not independently validate this badge-specific behavior. No unresolved review threads. Reviewer-local tests: NOT_RUN. No live external deployment or concurrent-filesystem verification claimed.
No merge-blocking finding within this change.
Reader-facing fix
The offline workflow badge checker read a hard-linked root
README.mdas ordinary input, so a source outside the selected checkout could supply otherwise valid badge evidence. Refuse multi-linked or non-regular README inputs both before and after opening the descriptor. This aligns the narrow badge preflight with the existing stable-checkout single-link boundary used by other offline readers.Verification
tools/README.mdand records the change inCHANGELOG.md.Acceptance
Review the exact head and current Quality CI (including Ubuntu and Windows Python) before merge. Source/test change is narrow and does not claim protection from a concurrently hostile filesystem. Local full-suite execution was unavailable in this environment; CI is not inherited from previous heads.
Unit:
BR-WORKFLOW-BADGE-017(not present in the original Drive registry at last read; private registry reconciliation remains pending).