Repository navigation
Commit f0bff6e
fix: [#832] address fourth-pass re-review — case-insensitive normalizeAgentName
Reviewer flagged that the helper only matches the exact lowercase
string "build". A future config, custom prompt, or hand-edited persisted
session could surface "Build" or "BUILD" and the phantom telemetry
bucket would come back. One toLowerCase() costs nothing and pins the
contract regardless of caller hygiene.
Added a regex-anchored test in plan-layer-e2e.test.ts that pins the
case-fold pattern — fails if a refactor drops the toLowerCase() or
switches back to a raw string compare.
71/71 tests pass; marker check clean.
Out of scope (deferred to follow-up issue):
- Three persisted-state sites still write `lastUser.agent` raw (compaction
summary at L611, SessionCompaction.create at L650 and L1088). Execution
works via the Agent.get() alias but new "build" rows can still be
written. Author chose telemetry boundary scope for this PR.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>1 parent b05a532 commit f0bff6e
2 files changed
Lines changed: 23 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
88 | 92 | | |
89 | 93 | | |
90 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
318 | 336 | | |
319 | 337 | | |
320 | 338 | | |
| |||
0 commit comments