HS: cookie API (+3 tests, partial)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled

Three-part change: (a) tests/hs-run-filtered.js gets a per-test
__hsCookieStore Map, a globalThis.cookies Proxy, and a
document.cookie getter/setter that reads/writes the store. Per-test
reset clears the store. (b) generate-sx-tests.py declares cookies in
the test header and emits hand-rolled deftests for basic set / update
/ length-when-empty (the three tractable tests). (c) regenerated
spec/tests/test-hyperscript-behavioral.sx via mcp_hs_test.regen.

No .sx edits — `set cookies.foo to 'bar'` already compiles to
(dom-set-prop cookies "foo" "bar") which routes through host-set!.

Suite hs-upstream-expressions/cookies: 0/5 → 3/5.
Smoke 0-195 unchanged at 170/195.

Remaining `basic clear` (needs hs-method-call host-call dispatch) and
`iterate` (needs hs-for-each host-array recognition) need runtime.sx
edits — deferred to a future sx-tree worktree.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-25 08:44:25 +00:00
parent 7735eb7512
commit 84e7bc8a24
5 changed files with 82 additions and 8 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: 1277/1496 (85.4%) delta +64
Merged: 1280/1496 (85.6%) delta +67
Worktree: all landed
Target: 1496/1496 (100.0%)
Remaining: ~219 tests (clusters 17/22/29/31/32 blocked; 31/32 need dedicated sx-tree worktree)
Remaining: ~216 tests (clusters 17/22/29/31/32 blocked; 31/32 need dedicated sx-tree worktree; 33 partial)
```
## Cluster ledger
@@ -63,7 +63,7 @@ Remaining: ~219 tests (clusters 17/22/29/31/32 blocked; 31/32 need dedicated sx
|---|---------|--------|---|
| 31 | runtime null-safety error reporting | blocked | — |
| 32 | MutationObserver mock + `on mutation` | blocked | — |
| 33 | cookie API | pending | (+5 est) |
| 33 | cookie API | partial | +3 |
| 34 | event modifier DSL | pending | (+68 est) |
| 35 | namespaced `def` | pending | (+3 est) |
@@ -88,7 +88,7 @@ Defer until AD drain. Estimated ~25 recoverable tests.
| A | 12 | 4 | 0 | 0 | 1 | — | 17 |
| B | 6 | 0 | 0 | 0 | 1 | — | 7 |
| C | 4 | 0 | 0 | 0 | 1 | — | 5 |
| D | 0 | 0 | 0 | 3 | 2 | — | 5 |
| D | 0 | 1 | 0 | 2 | 2 | — | 5 |
| E | 0 | 0 | 0 | 0 | 0 | 5 | 5 |
| F | — | — | — | ~10 | — | — | ~10 |