deps: take extension-websocket 4.2.4, and drop the HTML5 patch #112
No reviewers
Labels
No labels
area:defold
area:docs
area:infra
area:protocol
area:testing
kind:bug
kind:chore
phase:breadth
phase:core
phase:hardening
phase:slice
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
yuris/spacetimedb-defold!112
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "docs-4-2-4"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
extension-websocket 4.2.4 landed today and fixes
defold/extension-websocket#67,
the bug where the
protocoloption never reached the HTML5 handshake. That wasthe only reason
patches/existed, so it is deleted, along with the three manualsteps a consumer had to perform for a browser build.
Also in here: the CI fix, the last open question from #111, and the README
quickstart moving to the wiki.
The patch is gone, and that is verified rather than assumed
dev/tools/html5-conformance.shnow builds against the plain dependency, in areal Chromium, and passes. The handshake assertion is what proves the upstream
fix works:
Two things the harness simplification turned up, both measured both ways:
resolvehas to stay in bob's verb list. Dropping it looks free, since theblock above already guarantees the archive is on disk, but bob then dies at
100% Bundling in a NullPointerException out of
BuildInputDataCollector.saveDataAsJson, with the wasm already compiled.dist/html5-srcleft over from the vendoring era poisons the build. Thebundle runs in
$ROOTnow and bob scans the tree for anything carrying anext.manifest, so the stale copy links as a second websocket extension andfails on its missing headers. The script clears it.
dist/is gitignored, soonly an upgrade hits this, which is the case a person meets and CI does not.
Verified by planting the exact poison and watching the guard clear it.
CI was red on main
The conformance drift check, correctly. #111 fixed the
stdb/protocol.luareference stamped into
gen-schema.sh's header, and the committed fixture stillcarried the old spelling, so generator and fixture disagreed by that one line.
Regenerated. The fixture was itself a v1 leftover pointing at a file deleted in
4.0.0.
The one open question from #111
db.tables/db.db/ctx.db, three names for one map. Keeping all three.db.dbis the official-SDK-shaped alias the wiki documents as deliberate parity,so deleting it would break a claimed feature to save a line. What made the
redundancy bite was
ctx.db.tables, the natural copy-paste, reading as a barenil and failing a line later. #111's raising
__indexalready fixed that, andthere is now a test pinning the message so it cannot regress into a nil.
The README loses its quickstart
A tutorial belongs in the wiki, so that is where it went, expanded with the parts
the old wiki page carried that the README version lacked. The README keeps a
pointer. What is left is what a front page is for: what the SDK is, what it
needs, how to install it, what it supports, where the docs are.
The wiki is updated in the same pass, including API-Reference and Usage-Guide
against everything #111 changed.
Verification
lua dev/test/runner.lua13/13stylua --checkcleanKnown gap
Six wiki pages still carry pre-existing em dashes in prose the workers only
patched rather than rewrote. No new ones were introduced and the rewritten pages
are at zero. Scrubbing the rest is a separate pass over your own prose, so I left
it.
Review: PR #112 —
docs-4-2-4REQUEST CHANGES — one blocking dead cross-reference, four nits. The shell
surgery itself is correct and the hazard it introduces is guarded.
Scope note: the PR is a single commit,
2a5bfb5. The fixture regeneration andthe
ctx.db.tablespin are5dd109f, which is the merge base and already onmain— not part of this diff. I verified5dd109fanyway (brief item 4).BLOCKING
1.
dev/example-chat/README.md:4,75— link to a section this PR deletedThe example's opening sentence points a reader at the README Quickstart, which
this PR moved to the wiki:
README.mdnow has no## Quickstartheading (README.md:47is## Getting started, pointing at the wiki). The anchor resolves to the top ofthe file, so the reader lands on the front page with no idea what they were
sent to read.
dev/isexport-ignored, so this only hits someone who clones —which is exactly the audience for the example project.
Fix: point it at the wiki Quickstart, the same URL
README.md:96already uses.NITS
2.
flake.nix:210-217—pkgs.patchis now dead, and its comment describes removed behaviourThe harness no longer vendors or patches anything.
pkgs.unzipis still live —find_extathtml5-conformance.sh:51shells out to it.pkgs.patchhas noremaining caller anywhere in the repo (
defold-patchis the unrelated NixOSrpath fixup, still used at
conformance.yml:158). This is the "second job cutwith the first" the brief asked about: the entry existed only for the vendoring
step.
flake.nixis in the conformance trigger paths, so dropping it is coveredby CI.
3.
.gitattributes:5— the entry count is stale, and the file calls that count the durable factMeasured now:
The
13was already wrong before this PR; removingpatches/moves it fromoff-by-5 to off-by-3. The paragraph below it (
:8-15) deliberately deleted thebyte figures because they rot, and declares "Entry counts are the stable fact" —
so the one number it kept is the one that is wrong. The PR touches this comment
block (
:17) and is the natural place to correct it.The prose claim itself is right:
git archive docs-4-2-4 | tar -tyieldsLICENSE,README.md,game.projectandstdb/+ 12 files, nothing else.README.md:106-108states the same set and matches.4.
dev/tools/html5-conformance.sh:88— the subshellcdis now a no-opBefore, this was
(cd "$WORK" && …)and the subshell was load-bearing: itentered the scratch tree and kept
$ROOTas cwd for everything after. Nothingbetween line 18 and line 88 changes directory now, so both the
cdand thesubshell that contains it are dead. Harmless, but it reads as if the build still
happens somewhere other than
$ROOT, which is the one thing about this change areader needs to be clear on.
5.
.forgejo/workflows/conformance.yml:28-47—dev/example-chat/**triggers nothing, and this PR edits itThe trigger list covers
dev/example/**(the harness) but notdev/example-chat/**, while the job's last step builds and runs that project:This PR changes
dev/example-chat/game.project(the 4.2.4 bump) — a change theexample step is the only coverage for, and which on its own would not have run
it. Pre-existing (the step landed in #103 without extending the paths), not
introduced here, but it is the brief's "conformance job that stops running on a
change it covers", and this PR is the commit that makes it concrete. The step's
own comment argues the case: "The example is documentation that executes.
Nothing else runs it."
The removal of
patches/**itself is clean — every remaining path in the liststill exists on disk (checked all 13).
Checked, fine
5dd109f).dev/test/fixtures/chat_schema.luadiff is exactlyone comment line,
stdb/protocol.lua→stdb/protocol_v2.lua. No column,type or typespace movement.
lua dev/test/runner.lua→ 13 passed, 0 failed.dist/html5-srcguard (html5-conformance.sh:35) is correct andsufficient. The old script built its vendored copy entirely inside that
directory, so one
rm -rfcovers it. I checked the wider hazard the guardimplies — a second
ext.manifestanywhere under$ROOT:find . -name ext.manifestreturns nothing on this tree, which has populateddev/example-chat/{build,.internal}and root{build,dist,.internal}. bobkeeps extensions zipped in
.internal/lib, so no other stale build output canreproduce the failure.
$ROOT/build,$ROOT/.internaland$ROOT/dist/html5. All three are gitignored(
.gitignore:2-4, plus the unanchored duplicates at:22-24), andgit status --shortis clean on a tree that has all of them. It does overwritea developer's root
build/with a wasm-web debug build underharness.projectsettings, so the next editor run rebuilds — regenerable, notworth a guard.
$PATCHand$WORKaregone with all their uses; the
patch did not applyexit path went with them.The stripped-
game.projectstep (grep -v '^dependencies#') is correctlydropped —
game.project:4carries the remote dep anddev/example/harness.projectdeclares nodependencies#, so there is nodouble-extension risk from building in place.
resolvekept in the verb list (:88-90) with the NPE it preventsdocumented at
:83-86. Believable and cheap; not re-tested.release.yml. Nopatches/reference survives; the generated notes at:49-70reference only the two dependency URLs and cannot name a missingdirectory. Version at
:52is 4.2.4.4.2.3appears nowhere in tracked content — the onlyhits are inside the gitignored
.internal/lib/*.zipblobs.4.2.4ingame.project:4,dev/example-chat/game.project:4,README.md:24,36,44,release.yml:52,58,html5-conformance.sh:12,31,html5-conformance.mjs:264. The SDK's own version is untouched:game.project:3isversion = 4.0.0, matchingREADME.md:35.README.md:43-44("Nothing further is needed for anHTML5 build; 4.2.4 sends the subprotocol on that target too") is correct and
does not overreach. The
?token=workaround is handled inside the SDK, not bythe consumer —
stdb/init.lua:416-422branches onM.is_html5()and moves thetoken into the query string, with the emscripten header limitation documented
at
:141-143and:422. Nothing in the README or the Features table claimsHTML5 is equivalent to native.
html5-conformance.mjs:261-264) is what turns anupstream regression into a named failure rather than a bare 400. Comment
correctly re-pointed from
patches/to defold/extension-websocket#67.Actioned the review in
2a93f78.Blocking —
dev/example-chat/README.mdnow points[quickstart]at the wiki Quickstart, and the opening sentence says "the wiki Quickstart" rather than "the main README's quickstart". Grepped the repo for other links intoREADME.md#anchors: that was the only one.Nits, all four taken.
flake.nix: droppedpkgs.patch, keptpkgs.unzip, and the comment now names its real caller (find_extreading the resolved archive'sext.manifest)..gitattributes: measured rather than copied.git archive main | tar -t | wc -l→ 18,docs-4-2-4→ 16, against 72 tracked paths. Both of the old numbers were wrong; I stated the tracked-path count too, since "56 before" was clearly meant to be the pre-export-ignore figure and 18 is not that.html5-conformance.sh:88: subshell and redundantcdremoved. Verb list untouched,resolvestill there.conformance.yml: addeddev/example-chat/**with a comment saying why.Verification — all on this tree, after the edits:
lua dev/test/runner.lua→ 13 passed, 0 failedstylua --check stdb dev/test→ cleanbash -n dev/tools/html5-conformance.sh→ OKdev/tools/html5-conformance.sh→[html5] PASS, phases 1-8, unpatched 4.2.4,subprotocol=v2.bsatn.spacetimedb/101on both handshakesdev/tools/conformance.sh→[conformance] PASSNo re-review: every change is the reviewer's own fix, and the one place I went further than the review's wording (the third
.gitattributesnumber) is a measured figure in a comment.