Repository navigation
Conversation
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
Thanks for picking up #4312. The false positive is real: it stopped us shipping a one-line constant change. We're picking this up, and a crew lane will rewrite it on current main and credit you as co-author. Pregate changes are paused until November 21, so it will be looked at after that. |
|
|
Thank you, and thanks @Davmunrey for the careful read. We're picking up the idea for #4312, and Davmunrey's point is right: as written, the change stops flagging a real importer of a module for a two-digit change like GST-820's 12 to 18, and the moved test no longer covers that case. The rebuild has to keep that case flagged while dropping unrelated bare matches. A maintainer agent working through a batch of fixes (our tracking thread GSTA-805) will first reproduce the false positive on current main. If it reproduces, the agent rebuilds the fix on main with you credited as co-author and we'll close this PR with a link when it lands. If it no longer reproduces, we'll close this and say what changed. Other work on the same pregate files has to land first, so this may take a few days. |
|
Thank you @ElNeMeR70. This landed in #4683, rebuilt on current main with you credited as co-author. We used the narrower rule @Davmunrey suggested in review: a one- or two-digit value found only through its module now counts only on a line that uses a name taken from that module (or names the constant). That keeps GST-820's two-digit importer case flagged while the unrelated |
Fixes #4312
Summary
nameRequired) inconsumersOf(lib/pregate/checks/literals.ts) for 1- and 2-digit integer old values (/^-?\d+$/.test(value) ? value.length <= 2 : value.length < 2), preventing short numbers like10from flagging unrelated bare occurrences across test files.GST-820module-stem test intest/pregate-selection.test.tsto use120→180(testingmoduleRerather than 2-digit bare matching) and add a dedicated test for#4312.changelog.d/fix-pregate-literals-two-digit-4312.md.Test plan
bun test test/pregate-selection.test.ts -t "literals \(pure\)"(11 pass, 0 fail)bun test test/pregate-selection.test.ts --timeout 30000 -t "GST-1211: a new object literal"(1 pass)