Skip to content

Harden & extend via across the full surface (adversarial-review pass)#104

Merged
joaomdsg merged 2 commits into
mainfrom
chore/adversarial-critique-loop
Jun 10, 2026
Merged

Harden & extend via across the full surface (adversarial-review pass)#104
joaomdsg merged 2 commits into
mainfrom
chore/adversarial-critique-loop

Conversation

@joaomdsg

Copy link
Copy Markdown
Member

What

A multi-area adversarial review pass (UX/datastar, Go-systems, and peer-framework lenses) across the entire framework surface — h, signals/reactivity, on, state, sessions/CSRF, SSE, forms, middleware, plugins, rendering, the vt harness, config/bootstrap, and push/broadcast.

Every change is test-driven; the suite stays green under -race. Behavior/security-gate/concurrency changes that need a maintainer decision are deliberately not in this PR — they're catalogued in critique-council.md with precise fixes, grouped by theme, with a recommended action order.

Notable bug fixes

  • on.Key now filters via an evt.key=== expression guard — datastar v1 has no keyboard-key modifier, so on.Key("Enter") was firing the action on every keystroke.
  • Multipart text fields are no longer JSON-coerced — values stay strings so decodeScalarInto coerces per the target type ("007" survives; a Signal[string] can hold "true").
  • via.Files binds every part of a multi-file upload (was silently dropping all but the first).
  • Composite SignalSlice/SignalMap now decode inbound values (full replace, not merge).
  • Mount panics on duplicate signal wire keys / duplicate app-signal keys; New panics on negative option values.
  • Capacity gate runs before OnInit; session lastAccess kept warm by the SSE heartbeat; SSE sets X-Accel-Buffering: no; write deadlines re-arm per write.

New API

  • h: Aria, Alt/Width/Height/Target/Action/Method/AutoComplete/TabIndex/ColSpan/RowSpan/Pattern/MinLength/MaxLength, AttrNum[T] + numeric siblings.
  • signals: Signal.Text() is now an attachable attribute (+ TextSpan()), ShowUnless, Class; via.Computed/via.Effect; via.Local client-only signals.
  • on: Once/Outside/Window/Confirm/Indicator.
  • sessions/config: WithSessionCookieName, App.Run() error.
  • middleware: via.RouteFrom(r).
  • push: App.BroadcastToast.
  • vt: TabIDFromHTML; SSE() leak-safe via t.Cleanup; WithSignal warns on _-prefixed local signals.

Plus godoc/doc corrections across the public API and the docs site.

Not included (see critique-council.md signoff backlog)

Grouped by theme: concurrency-contract (Signal/resync race), graceful-deploy (SSE re-arm, shutdown deadline), security (sid-on-backplane, session-403 recovery, __Host-), plugin-CSP nonce, requireAuth-redirect-on-action/SSE, scale/backpressure, and the larger DX roadmap (Region rendering, per-page <title>, form Errors, cluster/topic broadcast).

joaomdsg added 2 commits June 10, 2026 09:43
Outcome of a multi-area adversarial review (UX/datastar, Go-systems, and
peer-framework lenses) covering h, signals, on, state, sessions, SSE, forms,
middleware, plugins, rendering, the vt harness, config/bootstrap, and
push/broadcast. Every change lands with tests; the suite stays green under
-race. Behavior/security-gate/concurrency changes that need a maintainer
decision are deliberately NOT included here — they are catalogued in
critique-council.md with precise fixes, grouped by theme.

Notable fixes:
- on.Key now filters via an `evt.key===` expression guard — datastar v1 has no
  keyboard-key modifier, so `on.Key("Enter")` was firing on every keystroke.
- Multipart text fields are no longer JSON-coerced; values stay strings so
  decodeScalarInto coerces per the target type ("007" survives, a Signal[string]
  can hold "true").
- via.Files binds every part of a multi-file upload (was dropping all but first).
- Composite SignalSlice/SignalMap now decode inbound (replace, not merge).
- Mount panics on duplicate signal wire keys and duplicate app-signal keys;
  New panics on negative option values.
- Capacity gate runs before OnInit; session lastAccess is kept warm by the SSE
  heartbeat; SSE responses set X-Accel-Buffering: no; write deadlines re-arm
  per write.

New API:
- h: Aria + Alt/Width/Height/Target/Action/Method/AutoComplete/TabIndex/
  ColSpan/RowSpan/Pattern/MinLength/MaxLength, AttrNum[T] + numeric siblings.
- signals: Signal.Text() is now an attachable attribute (+ TextSpan()),
  ShowUnless, Class; via.Computed/via.Effect; via.Local client-only signals.
- on: Once/Outside/Window/Confirm/Indicator.
- sessions/config: WithSessionCookieName, App.Run() error.
- middleware: via.RouteFrom(r).
- push: App.BroadcastToast.
- vt: TabIDFromHTML; SSE() is leak-safe via t.Cleanup; WithSignal warns on
  `_`-prefixed local signals.

Plus godoc/doc corrections across the public API and the docs site, and the
critique-council.md review ledger (applied fixes + the signoff backlog).
CI lint flagged 4 issues in the new tests: 3 missing t.Parallel() calls
(paralleltest) and one unchecked ln.Close (errcheck). No production change.
@joaomdsg
joaomdsg merged commit cf43264 into main Jun 10, 2026
6 checks passed
@joaomdsg
joaomdsg deleted the chore/adversarial-critique-loop branch June 10, 2026 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant