aa9758d fix: use deterministic file-path rules for PR area labels
📊 Changes
1 file changed (+133 additions, -93 deletions)
View changed files
📝.github/workflows/auto-label.yml (+133 -93)
📄 Description
Summary
PR area labels now use deterministic file-path prefix matching instead of relying on the LLM
The LLM (llama3.1:8b) was mis-tagging PRs (e.g., #1242 got area: socratiq instead of area: book) because it only saw title/body text — no file paths
LLM is still used for type labels (bug, improvement, etc.) and issue area labels (where no file paths exist)
How it works
New step fetches changed files via pulls.listFiles() and matches against prefix rules:
File prefix
Area label
book/tools/
area: tools
.github/
area: tools
book/
area: book
tinytorch/
area: tinytorch
kits/
area: kits
labs/
area: labs
socratiq/
area: socratiq
website/
area: website
Majority-wins when a PR touches multiple areas. Falls back to LLM only if no prefix matches.
Test plan
Run workflow manually on #1242 to verify it would pick area: book
Open a test PR touching tinytorch/ files to verify correct tagging
Open a test issue (no files) to verify LLM fallback still works
🔄 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/1243
**Author:** [@profvjreddi](https://github.com/profvjreddi)
**Created:** 3/16/2026
**Status:** ✅ Merged
**Merged:** 3/16/2026
**Merged by:** [@profvjreddi](https://github.com/profvjreddi)
**Base:** `dev` ← **Head:** `fix/auto-label-deterministic-area`
---
### 📝 Commits (1)
- [`aa9758d`](https://github.com/harvard-edge/cs249r_book/commit/aa9758dba25a79a3e485f1d594568f8d6ead4708) fix: use deterministic file-path rules for PR area labels
### 📊 Changes
**1 file changed** (+133 additions, -93 deletions)
<details>
<summary>View changed files</summary>
📝 `.github/workflows/auto-label.yml` (+133 -93)
</details>
### 📄 Description
## Summary
- PR area labels now use **deterministic file-path prefix matching** instead of relying on the LLM
- The LLM (`llama3.1:8b`) was mis-tagging PRs (e.g., #1242 got `area: socratiq` instead of `area: book`) because it only saw title/body text — no file paths
- LLM is still used for **type labels** (bug, improvement, etc.) and **issue area labels** (where no file paths exist)
## How it works
New step fetches changed files via `pulls.listFiles()` and matches against prefix rules:
| File prefix | Area label |
|-------------|-----------|
| `book/tools/` | `area: tools` |
| `.github/` | `area: tools` |
| `book/` | `area: book` |
| `tinytorch/` | `area: tinytorch` |
| `kits/` | `area: kits` |
| `labs/` | `area: labs` |
| `socratiq/` | `area: socratiq` |
| `website/` | `area: website` |
Majority-wins when a PR touches multiple areas. Falls back to LLM only if no prefix matches.
## Test plan
- [ ] Run workflow manually on #1242 to verify it would pick `area: book`
- [ ] Open a test PR touching `tinytorch/` files to verify correct tagging
- [ ] Open a test issue (no files) to verify LLM fallback still works
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/harvard-edge/cs249r_book/pull/1243
Author: @profvjreddi
Created: 3/16/2026
Status: ✅ Merged
Merged: 3/16/2026
Merged by: @profvjreddi
Base:
dev← Head:fix/auto-label-deterministic-area📝 Commits (1)
aa9758dfix: use deterministic file-path rules for PR area labels📊 Changes
1 file changed (+133 additions, -93 deletions)
View changed files
📝
.github/workflows/auto-label.yml(+133 -93)📄 Description
Summary
llama3.1:8b) was mis-tagging PRs (e.g., #1242 gotarea: socratiqinstead ofarea: book) because it only saw title/body text — no file pathsHow it works
New step fetches changed files via
pulls.listFiles()and matches against prefix rules:book/tools/area: tools.github/area: toolsbook/area: booktinytorch/area: tinytorchkits/area: kitslabs/area: labssocratiq/area: socratiqwebsite/area: websiteMajority-wins when a PR touches multiple areas. Falls back to LLM only if no prefix matches.
Test plan
area: booktinytorch/files to verify correct tagging🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.