Skip to content

chore(deps): carry nova from git until the websocket frame-list fix releases - #349

Merged
Taure merged 1 commit into
mainfrom
chore/nova-ws-frame-list-override
Aug 4, 2026
Merged

chore(deps): carry nova from git until the websocket frame-list fix releases#349
Taure merged 1 commit into
mainfrom
chore/nova-ws-frame-list-override

Conversation

@Taure

@Taure Taure commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Hex nova 0.15.1 crashes the websocket connection process when a controller replies with a list of frames, which nova_websocket:call_result/0 documents as valid. nova_basic_handler:handle_ws/2 consed the payload onto the command list as a single element; cowboy reads one command per element, so the whole list reached cow_ws:frame/2 as one frame and died with function_clause, taking the connection with it.

That is why asobi_ws_handler emits exactly one frame per websocket_info/2 return, and why #330 put the producing extension in the payload rather than dual-emitting game.message and module.message as two frames.

Fixed upstream in novaframework/nova#400, merged and auto-tagged v0.15.3, but nova's Hex is still on 0.15.1 and publishing is manual.

The pin

{nova, {git, "https://github.com/novaframework/nova.git",
        {ref, "a334a6db890d7ed1f1a3f69c4203ac1a84f3db56"}}},

Pinned to the merge commit rather than {branch, "master"} so the ref cannot drift underneath a build. This repo has been bitten by a moving pin before.

The delta from Hex 0.15.1 is exactly two commits: the fix, and a cowboy 2.15 -> 2.18 bump that changes nothing here — asobi already forces {cowboy, "~> 2.16"} and cowboy/cowlib/ranch resolve to the same 2.18.0/2.19.0/2.2.1 with and without this change. I checked rather than assumed, because a git override silently carrying unrelated commits has already caused a boot hang in this fleet once.

Relocked from scratch, not rebar3 upgrade nova.

Verified

Through the real handler chain, not just the unit level:

commands=[{text,<<"a">>},{text,<<"b">>}]
encoded_ok=2

Two frames, two commands, both encodable by cow_ws:frame/2.

eunit 1126/1126, xref, dialyzer, fmt --check all clean. CT deferred to CI: several agents were running Common Test against the same local Docker Postgres, which produces connection-closed failures unrelated to any change.

What this unblocks

The S6 type rename (game.message -> module.message) can now be a clean two-frame transition instead of waiting for the 1.0 wire break.

Follow-up

#347 tracks reverting to plain Hex nova once it releases. Note there that asobi_saas's nova override points at a branch commit for nova#390 (binary pubsub channels) which is not on master — the two overrides cannot be collapsed into one ref until #390 also lands.

Also adds *.coverdata to .gitignore; the new Coverage job leaves them in the working tree.

…eleases

Hex nova 0.15.1 crashes the connection process when a websocket controller
replies with a list of frames, which nova_websocket:call_result/0 documents
as valid: nova_basic_handler:handle_ws/2 consed the payload onto the command
list as one element, cowboy reads one command per element, so the whole list
reached cow_ws:frame/2 as a single frame and died with function_clause.

That is why asobi_ws_handler emits exactly one frame per websocket_info/2
return, and why #330 put the producing extension in the payload rather than
dual-emitting game.message and module.message as two frames.

Fixed upstream in novaframework/nova#400, merged and tagged v0.15.3 but not
yet on Hex. Pinned to the merge commit rather than {branch, "master"} so the
ref cannot drift underneath a build. The delta from hex 0.15.1 is exactly two
commits - that fix and a cowboy bump which changes nothing here, since
cowboy/cowlib/ranch resolve to the same 2.18.0/2.19.0/2.2.1 either way.

Verified through the real handler chain: a {reply, [F1, F2], State} now
yields two commands, both encodable by cow_ws:frame/2.

Revert to plain hex nova once it releases - asobi#347.
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

🟡 Code Coverage — 72.9%

5595 of 7679 lines covered.

@Taure
Taure merged commit a5e27d3 into main Aug 4, 2026
15 checks passed
@Taure
Taure deleted the chore/nova-ws-frame-list-override branch August 4, 2026 05:25
Taure added a commit that referenced this pull request Aug 4, 2026
…error (#354)

* feat(ws): complete the S6 frame-type rename to module.message/module.error

S6 put one extension (Lua) in the wire type, where no second extension
could ever reuse it. #330 shipped the mechanism - the producing extension
travels in the payload's `module` key - but not the rename, because nova
0.15.1 crashed the connection process on a list-valued reply, so
dual-emitting old and new was impossible.

novaframework/nova#400 fixed that and asobi carries the fixed nova by git
ref (#349), so both frames can now go out on one reply.

Extension pushes are `module.message` and `module.error`. `game.message`
and `game.error` are emitted alongside them with identical payloads, so
every SDK built before the rename keeps working, and are removed at the
1.0 wire break.

`asobi.ws_legacy_game_frames` (default true) drops the legacy pair.
`game.message` is asobi_lua's `game.send/2`, which a script may call per
player per tick, so the compat frame doubles asobi's hottest
extension-produced egress path. An operator whose clients all dispatch
`module.*` gets that back without waiting for 1.0.

Fixtures for both new types; the old two keep theirs.
asobi_protocol_coverage_tests learns to read extension_frames/3, which is
now the only emit site for either pair.

* style: ASCII hyphen in the S6 test comment

* docs: pin the wire-history note to v0.54.0
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