[PR #1942] [MERGED] fix(design-grammar): known_collisions notes cite wrong (row, col) coordinates #36552

Closed
opened 2026-07-16 00:27:56 -05:00 by GiteaMirror · 0 comments
Owner

📋 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: devHead: fix/design-grammar-collision-notes


📝 Commits (1)

  • 89653cc fix(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

  • 7 of 8 documented collision notes in known_collisions cited incorrect (layer, col) coordinates against the primitives they describe -- off by 1 or more in every case except #10 Sample.
  • validate.mjs's known_collisions check only verified that the colliding sym string was present in the list (declared.has(sym)); it never checked that the ids or descriptive note text actually matched the real primitive data, so this drift was permanently invisible to make validate.

Fix

  • Corrected all 4 notes to the actual (layer, col) values pulled directly from the primitives list.
  • Added a validator check that parses "row N col M" per cited id in each note and cross-checks it against the real primitive data.

Test plan

  • Fed the new regex the original (wrong) note text for #77/#14 in isolation: confirms it parses row 1 col 13 and row 3 col 7, both of which mismatch the actual row 1 col 14 / row 3 col 8 -- i.e. the new check would have caught this before it ever shipped.
  • node scripts/validate.mjs passes 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.

## 📋 Pull Request Information **Original PR:** https://github.com/harvard-edge/cs249r_book/pull/1942 **Author:** [@Shashank-Tripathi-07](https://github.com/Shashank-Tripathi-07) **Created:** 7/7/2026 **Status:** ✅ Merged **Merged:** 7/10/2026 **Merged by:** [@profvjreddi](https://github.com/profvjreddi) **Base:** `dev` ← **Head:** `fix/design-grammar-collision-notes` --- ### 📝 Commits (1) - [`89653cc`](https://github.com/harvard-edge/cs249r_book/commit/89653cc726fc63d64eb776aee6fb9c7d41a65696) fix(design-grammar): known_collisions notes cite wrong (row, col) coordinates ### 📊 Changes **2 files changed** (+31 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `design-grammar/grammar.yml` (+4 -4) 📝 `design-grammar/scripts/validate.mjs` (+27 -0) </details> ### 📄 Description ## Summary - 7 of 8 documented collision notes in `known_collisions` cited incorrect `(layer, col)` coordinates against the primitives they describe -- off by 1 or more in every case except `#10 Sample`. - `validate.mjs`'s `known_collisions` check only verified that the colliding `sym` string was present in the list (`declared.has(sym)`); it never checked that the `ids` or descriptive `note` text actually matched the real primitive data, so this drift was permanently invisible to `make validate`. ## Fix - Corrected all 4 notes to the actual `(layer, col)` values pulled directly from the primitives list. - Added a validator check that parses `"row N col M"` per cited id in each note and cross-checks it against the real primitive data. ## Test plan - [x] Fed the new regex the *original* (wrong) note text for `#77`/`#14` in isolation: confirms it parses `row 1 col 13` and `row 3 col 7`, both of which mismatch the actual `row 1 col 14` / `row 3 col 8` -- i.e. the new check would have caught this before it ever shipped. - [x] `node scripts/validate.mjs` passes cleanly against the corrected data (`✓ grammar.yml is valid`, 90 primitives, 51 assemblies, 4 documented collisions, 0 issues). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-07-16 00:27:56 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/cs249r_book#36552