Commit 250119f
committed
ci(e2e-full): fix 3 nights of red nightly — two independent bugs
Bug 1: test_concurrent_approval_race.cjs 2/4 sub-tests failed with
"Removing detection rules is not permitted. An admin must enable it
in the Control Panel." The test submits action=remove_rule as an
analyst, but setup_test_env.sh only seeded the four CREATE-side
toggles (Phase 0.3.1 fix scope), leaving the four DELETE-side toggles
at their DEFAULT_LIMITS=false. Mirroring the Phase 0.3.1 shape:
setup_test_env.sh limits payload now also seeds:
allow_analyst_delete_rules = true (gate at wl_handler.py L3000)
allow_analyst_delete_csv = true (gate at wl_handler.py L2888)
require_reason_rule_deletion = true (routes remove_rule to queue)
require_reason_csv_deletion = true (routes remove_csv to queue)
Bug 2: test_dual_superadmin.cjs + test_audit_stress.cjs were in the
"Non-destructive (no WL_TEST_HARNESS)" block of e2e-full.yml, but
both files call H.assertTestHarness() which throws when the env var
is unset. Result: every nightly since 2026-05-21 failed with
"REFUSING to run destructive test helper" the moment Dual superadmin
launched — cascading 4 subsequent destructive tests (Audit stress,
Cooldown tamper, Adversarial hardening, Admin limits) into skipped.
Fix: moved both steps into the "Destructive (WL_TEST_HARNESS=1
inline)" block with the env var set. test_visual_regression.cjs has
NO assertTestHarness call and correctly stays in the non-destructive
block.
Independent evidence each bug exists:
- Run 26325483550 (2026-05-23) log line 1305: explicit
"submit failed: This operation is not permitted" on remove_rule
inside test_concurrent_approval_race.cjs.
- Same run line 1458: "REFUSING to run destructive test helper:
WL_TEST_HARNESS=1 is not set" thrown from
tests/e2e/lib_helpers.cjs:194 (the assertTestHarness call).
Verification path: next nightly (or manual workflow_dispatch on
e2e-full.yml) should show all six previously-skipped destructive
steps running, and approval-race PASSED: 4/4 instead of 2/4.1 parent 616f1cb commit 250119f
2 files changed
Lines changed: 30 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | 135 | | |
142 | 136 | | |
143 | 137 | | |
144 | 138 | | |
145 | 139 | | |
146 | 140 | | |
147 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
148 | 154 | | |
149 | 155 | | |
150 | 156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
| 140 | + | |
| 141 | + | |
141 | 142 | | |
142 | 143 | | |
143 | 144 | | |
144 | | - | |
145 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
146 | 151 | | |
147 | | - | |
148 | | - | |
149 | | - | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
150 | 161 | | |
151 | 162 | | |
152 | 163 | | |
153 | 164 | | |
154 | 165 | | |
155 | 166 | | |
156 | 167 | | |
157 | | - | |
| 168 | + | |
158 | 169 | | |
159 | 170 | | |
160 | 171 | | |
| |||
0 commit comments