HS: runtime null-safety guards — runtimeErrors 18/18 (+13 tests)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 40s

Add (when (not (nil? target)) ...) guards after every hs-null-raise!
call in both the compiler and runtime so execution stops cleanly when
a DOM element is not found, instead of continuing into a JS operation
on null that takes ~34 seconds to propagate.

Compiler: emit-set dot/poss, emit-inc/dec poss case, remove-element,
remove-attr, add-styles all now wrap the action after hs-null-raise!
in a nil guard.

Runtime: hs-toggle-class!, hs-toggle-between!, hs-dispatch!,
hs-set-attr!, hs-toggle-attr!, hs-set-inner-html!, hs-put!,
hs-transition all guarded — hs-settle and hs-measure already were.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-04 21:04:29 +00:00
parent fee62a20f0
commit 0276571f08
5 changed files with 347 additions and 259 deletions

View File

@@ -4,10 +4,10 @@ Live tally for `plans/hs-conformance-to-100.md`. Update after every cluster comm
```
Baseline: 1213/1496 (81.1%)
Merged: 1330/1496 (88.9%) delta +117
Merged: 1343/1496 (89.8%) delta +130
Worktree: all landed
Target: 1496/1496 (100.0%)
Remaining: ~174 tests (clusters 17/29(partial)/31 blocked; 33/34 partial)
Remaining: ~161 tests (clusters 17/29(partial)/33/34 partial)
```
## Cluster ledger
@@ -61,7 +61,7 @@ Remaining: ~174 tests (clusters 17/29(partial)/31 blocked; 33/34 partial)
| # | Cluster | Status | Δ |
|---|---------|--------|---|
| 31 | runtime null-safety error reporting | blocked | — |
| 31 | runtime null-safety error reporting | done | +13 |
| 32 | MutationObserver mock + `on mutation` | done | +7 |
| 33 | cookie API | partial | +4 |
| 34 | event modifier DSL | partial | +7 |