From 5909f9f23d046ac5473dfa6fe4887c2d3eb7658d Mon Sep 17 00:00:00 2001 From: yinlianghui Date: Fri, 31 Jul 2026 17:53:43 +0800 Subject: [PATCH] test: drop the now-stale unguarded-predicate exemption MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit main is red: test/object-validation-predicates.test.ts > 'keeps no stale entries in the known-unguarded list' fails with ["crm_opportunity_line_item.unit_price_positive"]. Nothing is broken — the guard fired exactly as designed. #571 carved that rule out as a documented exemption because it belongs to a different object family, and paired the exemption with a staleness check so it could not rot. #570, run in parallel, added the guard to that very rule. Both PRs were green on their own branch; the collision only exists on main, where the exemption is now stale. Emptying the map is the fix the check was written to force. verify: exit 0, 0 errors, 436 passed | 2 skipped, 24 files. Refs #514. Co-Authored-By: Claude Opus 5 --- .changeset/stale-unguarded-exemption.md | 9 +++++++++ test/object-validation-predicates.test.ts | 16 ++++++++-------- 2 files changed, 17 insertions(+), 8 deletions(-) create mode 100644 .changeset/stale-unguarded-exemption.md diff --git a/.changeset/stale-unguarded-exemption.md b/.changeset/stale-unguarded-exemption.md new file mode 100644 index 00000000..6e3972e0 --- /dev/null +++ b/.changeset/stale-unguarded-exemption.md @@ -0,0 +1,9 @@ +--- +--- + +Empty the `KNOWN_UNGUARDED` exemption map. #570 and #571 were each green on +their own branch; #571 carved `crm_opportunity_line_item.unit_price_positive` +out as a documented exemption while #570 landed that very guard in parallel, so +the entry went stale the moment both merged and #571's own staleness check +turned `main` red. Removing the entry is the fix the check was written to force. +Tooling only — releases nothing. diff --git a/test/object-validation-predicates.test.ts b/test/object-validation-predicates.test.ts index c4b25284..0c984c81 100644 --- a/test/object-validation-predicates.test.ts +++ b/test/object-validation-predicates.test.ts @@ -91,15 +91,15 @@ function unguardedFields(source: string): string[] { /** * Rules still shipping an unguarded comparison, with the reason. * - * This is a shrinking list, not a permanent exemption: the entry below is the - * remaining half of #514 item 3, carved into its own change because it touches - * a different object family. The "no stale entries" test keeps this honest — - * once that rule grows its guard, this map must be emptied or CI fails. + * Empty, and the "no stale entries" test below keeps it that way. It held one + * entry — `crm_opportunity_line_item.unit_price_positive`, the half of #514 + * item 3 that was carved out of #571 because it touches a different object + * family. #570 landed that guard in parallel, so the exemption went stale the + * moment both merged and this file's own staleness check turned main red. That + * is the mechanism working: an exemption may outlive its fix by exactly one + * merge, never longer. */ -const KNOWN_UNGUARDED: Record = { - 'crm_opportunity_line_item.unit_price_positive': - '#514 item 3, opportunity_line_item half — tracked separately', -}; +const KNOWN_UNGUARDED: Record = {}; describe('validation predicates are null-guarded', () => { it('finds script validations to check at all', () => {