mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-07-16 14:42:29 -05:00
[PR #1942] [MERGED] fix(design-grammar): known_collisions notes cite wrong (row, col) coordinates #34666
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/harvard-edge/cs249r_book/pull/1942
Author: @Shashank-Tripathi-07
Created: 7/7/2026
Status: ✅ Merged
Merged: 7/10/2026
Merged by: @profvjreddi
Base:
dev← Head:fix/design-grammar-collision-notes📝 Commits (1)
89653ccfix(design-grammar): known_collisions notes cite wrong (row, col) coordinates📊 Changes
2 files changed (+31 additions, -4 deletions)
View changed files
📝
design-grammar/grammar.yml(+4 -4)📝
design-grammar/scripts/validate.mjs(+27 -0)📄 Description
Summary
known_collisionscited incorrect(layer, col)coordinates against the primitives they describe -- off by 1 or more in every case except#10 Sample.validate.mjs'sknown_collisionscheck only verified that the collidingsymstring was present in the list (declared.has(sym)); it never checked that theidsor descriptivenotetext actually matched the real primitive data, so this drift was permanently invisible tomake validate.Fix
(layer, col)values pulled directly from the primitives list."row N col M"per cited id in each note and cross-checks it against the real primitive data.Test plan
#77/#14in isolation: confirms it parsesrow 1 col 13androw 3 col 7, both of which mismatch the actualrow 1 col 14/row 3 col 8-- i.e. the new check would have caught this before it ever shipped.node scripts/validate.mjspasses cleanly against the corrected data (✓ grammar.yml is valid, 90 primitives, 51 assemblies, 4 documented collisions, 0 issues).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.