Commit 509ba5e
committed
fix(engine): include inputTokenPattern in deny-hook ruleSignature identity
ruleSignature (the identity function resolveEffectiveDenyRules and
synthesizeDenyRuleProposals use to decide "is this the same rule")
omitted DenyRule's inputTokenPattern field, so a maintainer-approved
rule differing from an existing one only by that field would collapse
onto the same signature and silently get dropped as a duplicate.
RegExp doesn't survive JSON.stringify (it serializes to `{}`), so a
naive `rule.inputTokenPattern ?? null` addition wouldn't distinguish
two different patterns either — using .toString() instead captures
both source and flags.
Closes #8013.1 parent c02a277 commit 509ba5e
2 files changed
Lines changed: 30 additions & 0 deletions
File tree
- packages/loopover-engine/src/miner
- test/unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
137 | 142 | | |
138 | 143 | | |
139 | 144 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
131 | 156 | | |
132 | 157 | | |
133 | 158 | | |
| |||
0 commit comments