Skip to content

Build on OSL 24.0.1 - #87

Open
Mistium wants to merge 5 commits into
mainfrom
osl-latest
Open

Mistium wants to merge 5 commits into
mainfrom
osl-latest

Conversation

@Mistium

@Mistium Mistium commented Nov 28, 2026

Copy link
Copy Markdown
Member

Moves the API from OSL 6.1.1 to OSL 24.0.1. 24.0.1 is the 24.0.0 release plus the compiler fixes in osl/.go#145, which this needed. CI builds OSL at that PR's head commit (f5e02b2e0). Merge the OSL PR first.

Changes

  • osl fix rewrites and syntax. osl fix rewrites, def in place of the removed function type, and the websocket globals declared before the startup code that reads them (23.0's global-order rule).
  • Results. OSL 24 returns results from db, fs, zip, json and r2 calls, so each call now unwraps or checks its result.
    • Failure handling matches 6.1 everywhere. A failed findById / findOne read throws, as 6.1's implicit unwrap did, and a missing document still reads as the default.
    • ?all= with a value that isn't a boolean still answers 400.
    • fs / zip / r2 writes keep their isOk() checks.
  • Request options. timeoutMs is now timeout, and the s3.new keys are camelCase.
    • OSL 24 reads timeout in milliseconds, where 6.1 read seconds. The Rotur, storage ledger and Rotur app requests passed timeout: 10, so they now pass 10000. Without this change they time out after 10 ms.
    • s3.new with the old snake_case keys throws at startup on OSL 24.
  • json.open takes {maxBytes: n}.
  • Gitea helpers check resp.status, since OSL 24 responses have no success field. This is stricter than 6.1, where every response that arrived counted as a success, but nothing calls these helpers.
  • Docs. README and AGENTS.md now say OSL 24.0.1.

Behaviour changes that come from OSL 24

  • 405 responses list HEAD in Allow, and HEAD requests are answered by GET routes.
  • Numbers in request bodies decode as float64, not json.Number. A game save containing 1e3 comes back as 1000. Browsers already send numbers in that form.

Version

1.7.0 → 1.7.1 (patch: toolchain move, no API change intended).

Checks

  • osl lsp check main.osl reports no errors, and osl test passes all 66 files.
  • scripts/e2e_smoke.py compared the old 6.1.1 build with this one. Both ran 400 steps with no server errors and no failed checks. The only response difference is the HEAD in Allow.

Follow-ups (already on main, not changed here)

  • stripeRequest reads resp.body ?? "" before checking the status. If Stripe can't be reached, the fallback's body: null throws, which needs the OSL unwrapOr fix on fix-unwrapor-object-fallback.
  • conn.Send in the realtime broadcast loops throws when a peer has gone. That ends the loop for everyone after it, and can stop the site heartbeat thread.
  • The history-migration workers don't defer jobs.done(), so a throw leaves jobs.wait() hanging.

No screenshots: nothing visible changes.

Handle the results OSL 24 returns from db, fs, zip, json and r2 calls, rename
requests timeoutMs to timeout and the s3 options to camelCase, and give the
Rotur, storage ledger and Rotur app requests their 10 second timeouts in
milliseconds, which OSL 24 reads timeout as. CI builds OSL at the 24.0.1 fixes
this needed.
A failed findById or findOne read throws again instead of reading as a
missing document, ?all= with a value that isn't a boolean answers 400 again,
and the privacy test checks that the hidden list is an array.
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