Repository navigation
fix: require startup-minted token on non-loopback viewer exposure (#223) - #277
Conversation
) A non-loopback bind or allowed host mints a 64-hex token stored 0600 at <store>/viewer.token; every request (reads included) must present it via Authorization: Bearer, the osi-viewer cookie, or ?token= on / (bootstrap only). Loopback-only binds stay token-free. Host/Origin/CSRF layer kept. Startup warning now states the 401 policy and token location.
There was a problem hiding this comment.
CHANGES_REQUESTED — required context test is red at this head. The failure decides the verdict; the diff never overrides it.
Re-check at filing (verbatim):
headRefOid: c9193f922e96e6ffa77562e042ee44c74fb54c61
lint=pass, test=fail, test-windows=pass, smoke=pass
Failing job: workflow ci, job test (run 41743039569, job 126289049362), step "Tests", 2026-11-03T23:56:44Z:
978 | expect(String(lag?.model)).toBe("fake/session-model");
error: expect(received).toBe(expected)
Expected: "fake/session-model"
Received: "undefined"
at <anonymous> (test/capture.test.ts:978:32)
(fail) capture model inheritance (#139) > capture evidence lines carry model= for the model that ran [24.55ms]
945 pass / 12 skip / 1 fail
The failing test sits in test/capture.test.ts, outside this PR's touched paths (src/viewer/server.ts, test/viewer-auth.test.ts, test/viewer-startup.test.ts). Flake or not, an approve is forbidden at a red head — the ready-for-merge signal must be true. Push a commit (a merge or rebase of main counts) to re-trigger CI; reruns under actions:write are not mine to attempt. When the check is green, the next run re-reviews and this verdict is dismissed as a fallen finding if the failure no longer reproduces.
Contract: Closes #223 present, closingIssuesReferences resolves to #223. No conformance pass this round — the red check is the verdict.
…ag race (#223 review) The 'capture evidence lines carry model=' test waited on any auto_capture_promoted line in the file-shared evidence log. Under CI interleaving an earlier test's promoted line satisfied the wait before this capture's trailing capture_lag line had been appended, so the lag lookup saw no line and model=undefined (red at c9193f9, run 41743039569). Wait for this session's capture_lag line — the last line its capture pass appends — and scope the promoted lookup to the same session.
|
Rework at e17f7bb addressing the CHANGES_REQUESTED verdict filed at c9193f9 (red Finding addressed: Root cause: the test waited on Fix: the wait now targets this session's Proof (measured at e17f7bb): |
WhollyMindless
left a comment
There was a problem hiding this comment.
Reviewed e17f7bb44adcc2ddc126ed4a7af692f721e953c9 against #223. Changes requested for token lifecycle/recovery, not an observed authentication bypass. Windows, Bun 1.4.4; synthetic temporary store and real HTTP only.
The normal-path protection works: 38 viewer/auth/startup tests pass (160 assertions); the separately filtered capture model-tag test also passes. Host/Origin checks remain before routing. I reproduced these additional cases outside the submitted tests:
F1 — concurrent starts can disagree with the persisted token (mintViewerToken, lines 120–131). With a fresh store, await Promise.all([startViewer(0), startViewer(0)]) returns two different tokens. Reading viewer.token and presenting that value to both servers yields 200 on one, 401 on the other; each server accepts its own returned token. Reproduced twice. The read/claim/write sequence has no serialization or exclusive initialization. This contradicts the advertised shared-store token reuse and makes the documented token file unreliable for one running viewer. Please initialize/read back a shared token under appropriate synchronization, and pin simultaneous first starts. I tested two servers in one process; the separate-process consequence follows from the same file initialization sequence but was not separately exercised.
F2 — stale cookie blocks a correct bootstrap URL (line 290). On one running viewer, GET /?token=<correct-token> returns 200 without a cookie, but 401 with Cookie: osi-viewer=<64 zeroes>. bearer ?? cookie ?? bootstrap selects the invalid cookie before validating the correct bootstrap token. After the supported absent/corrupt-token regeneration, a browser with its old cookie cannot use the newly printed URL to recover; host cookies also span ports. Please allow a valid explicit bootstrap credential to replace a stale cookie, while still refusing requests with no valid credential. Add the stale-cookie/valid-query regression.
N1 — malformed cookie parsing throws (line 144). Cookie: osi-viewer=% produces URIError and HTTP 500, even with a valid Bearer credential, because cookie decoding runs unconditionally. Treat malformed encoding as an invalid credential or avoid decoding the fixed hex cookie; keep this on a controlled response path. This is a robustness issue, not a demonstrated access-control bypass.
No full-suite or POSIX permission verification claimed here. The maintainer may narrow or defer the shared-store behavior; if simultaneous viewers are deliberately unsupported, please qualify the current reuse claim. No implementation or issue ownership taken.
Resolved at e17f7bb: red test check no longer reproduces. capture.test.ts:978 race fixed by session-scoping the wait to this pass's trailing capture_lag line; CI 4/4 green at this head and capture.test.ts 41/0 three consecutive local runs.
There was a problem hiding this comment.
APPROVE — head e17f7bb44adcc2ddc126ed4a7af692f721e953c9, diff key cb3e2f78d60756f572b129bf8f2652f8c9ad6b7e769875074e853d6e4852ef56.
Prior CHANGES_REQUESTED 5761240313 (red test at c9193f9) dismissed at this head: the failure no longer reproduces and the root cause is fixed here.
Contract (#223, authored by abogartz — trusted; spec anchor 0d48eb22a683a11b = recomputed hash, frozen)
Verbatim criterion: "setting OPENCODE_VIEWER_HOST=0.0.0.0 … makes edit, delete, block and restore unauthenticated HTTP for the whole LAN" must not stand; fix direction "require a bearer token minted at startup and stored 0600 beside the store"; "Keep the Host/Origin layer either way".
- Non-loopback exposure requires the token on every request — auth gate in the shared fetch handler before any route branch (src/viewer/server.ts:279-291): bearer, cookie, or
?token=on/only; wrong/missing → 401 before body parse.allowedHostnames()includesHOST(server.ts:86-93), so a0.0.0.0bind setsexposedand arms the gate. Evidence: test/viewer-auth.test.ts asserts 401 onGET /api/data,GET /,POST /api/edit, wrong bearer; 200 on correct bearer/cookie;?token=on an API path → 401;POST /api/deletewith token reaches the route. Block/restore ride the same pre-route gate. - Token minted at startup, stored 0600 beside the store —
mintViewerToken(server.ts:116-129) usespreparePrivateFile(src/core/permissions.ts:49-63: O_CREAT|O_NOFOLLOW, mode 0600, fchmod) before content lands; reused across restarts, minted fresh when absent/corrupt. Evidence: viewer-startup.test.ts asserts file exists andmode & 0o777 === 0o600on the warns case, and no file on loopback. - Host/Origin layer kept —
rejectRequestuntouched, still runs first (403 unchanged); diff adds no change to it.
Differential
At merge-base 0fe0f61 with the new test file copied in: exposed test fails FAIL read refused (old server answers 200 without a token — the defect); loopback control passes both sides. At head: both pass.
CR-resolution (capture.test.ts:978)
Root cause verified against source: recordCaptureLag runs once per pass after the candidate loop (src/capture/runtime.ts:317-323), and earlier tests in the same file write auto_capture_promoted lines to the shared evidence log (test/capture.test.ts:563, 689) — the old unscoped wait could be satisfied by those before this session's capture_lag line existed, making lag?.model undefined, exactly the CI signature. Fix waits on capture_lag && session === "ses-modeltag" and session-filters both lookups; assertions unchanged, none weakened. bun test test/capture.test.ts × 3: 41 pass / 0 fail each.
Commands run (measured)
bun run typecheck— clean.bun run lint— clean, exit 0 (biome lint + format:check, 223 files).bun run test— 939 pass / 19 skip / 0 fail (91 files).bun run test:e2e— 30 pass / 0 fail (8 files).- Differential at
0fe0f61: 1 fail (FAIL read refused) / 1 pass; head: 2 pass.
Findings
- nit (test/viewer-auth coverage, non-blocking):
cookieValue(server.ts:131-138) callsdecodeURIComponent, which throws on a malformed cookie (osi-viewer=%zz) → Bun answers 500 instead of 401. Fails closed, no bypass; a try/catch would tidy the status code.
Final gate re-check (verbatim)
headRefOid: e17f7bb44adcc2ddc126ed4a7af692f721e953c9
lint=pass, test=pass, test-windows=pass, smoke=pass
Human merges.
There was a problem hiding this comment.
COMMENTED — my APPROVED review 5761611129 at this head is superseded. WhollyMindless's CHANGES_REQUESTED 5761577069 (2026-11-04T00:42:49Z, head e17f7bb44adcc2ddc126ed4a7af692f721e953c9) is unresolved, and the block is that reviewer's to clear. Filing this because my approval was submitted after it (00:46:56Z) and would otherwise read as the last word.
I verified all three findings against the tree at this head. All hold. My review missed F1 and F2; the concession below is the measurement.
F1 — confirmed. Probe at e17f7bb, fresh store, Promise.all([startViewer(0), startViewer(0)]):
F1 tokens equal: false
F1 A-with-B-token: 401 B-with-A-token: 401
F1 file==A: false file==B: true
Both starts read the empty file before either writes, mint independently, and the last writer wins the file while each server keeps its own in-memory token. The advertised shared-store reuse does not survive simultaneous first starts.
F2 — confirmed. Same head, running exposed viewer:
F2 bootstrap no-cookie: 200 bootstrap stale-cookie: 401
bearer ?? cookie ?? bootstrap (src/viewer/server.ts:288) commits to the first presentation present, not the first valid one, so a stale cookie defeats a correct ?token= bootstrap — the recovery path after the supported absent/corrupt-token regeneration is unreachable from a browser that still holds the old cookie.
N1 — confirmed, and worse than my nit. My approval body listed the malformed-cookie 500 as a non-blocking nit; the reviewer's stronger form reproduces — the 500 happens even with a valid Bearer credential, because cookieValue (src/viewer/server.ts:287) decodes unconditionally before the bearer candidate is consulted:
N1 valid-bearer + malformed-cookie: 500
Verdict at this head: not ready for merge. The core #223 criterion (no unauthenticated reads/mutations on an exposed bind) does hold — none of these is an auth bypass, matching the reviewer's own framing — but F1 breaks the reuse guarantee the PR sells and F2 breaks recovery. Author loop: serialize or re-read-after-write the token initialization, validate presentations instead of short-circuiting on presence, and guard cookie decoding. Re-review lands when the head moves.
…tion, refuse malformed cookies (#223 review) F1: mintViewerToken claimed the file with a plain create-then-write, so concurrent first starts minted different tokens and each server accepted only its own. The claim is now an atomic hard-link of a fully-written 0600 temp: exactly one starter's content lands, losers read back the winner. F2: bearer ?? cookie ?? bootstrap took the first PRESENT credential, so a stale cookie shadowed a correct bootstrap URL; every presentation is now validated. N1: decodeURIComponent on the fixed-hex cookie threw URIError on junk like 'osi-viewer=%' (HTTP 500 on the auth path); the raw value is compared instead and simply fails to match.
|
Rework at
Proof (measured): |
WhollyMindless
left a comment
There was a problem hiding this comment.
Re-verified fc51e6e64f496d8b4af32b9084df157f310d895a using the original external probe and a new corrupt-file/reuse probe. F2 and N1 are closed; fresh-file F1 is closed. Changes still requested for the remaining initialization cases below.
Confirmed fixes: simultaneous fresh-store starts now return the same token and both accept the persisted value; a valid bootstrap URL succeeds with a stale cookie; malformed cookies no longer break valid Bearer authentication. All 39 viewer/auth/startup tests pass, 161 assertions, on Windows/Bun 1.4.4. Hosted checks are also 4/4 green.
F1 residual — corrupt-token recovery is not serialized (mintViewerToken, EEXIST branch). Seed viewer.token with corrupt, then Promise.allSettled([startViewer(0), startViewer(0)]) against that store. On Windows/Bun 1.4.4, ten fresh-store trials produced 10 rejected starts out of 20; the initial uncaught trial reported EPERM at renameSync(tmp, path). On WSL Ubuntu/Bun 1.4.4, ten trials produced one pair of different returned tokens, reproduced in a second ten-trial batch. This uses real reads/writes, no mocks. Both starters can read the same corrupt winner before either renames; replacing it is unconditional. The hard-link claim solves absence, but not concurrent regeneration. Please serialize/coordinate this recovery path and add a corrupt-existing-file counterpart to the fresh-file test. The Windows error's precise handle timing was not separately traced; the error and Linux disagreement are observed, not inferred.
F3 — valid-token reuse skips the prior permission tightening (early return at TOKEN_SHAPE.test(prior)). On a Linux-native /tmp store, seed a valid 64-hex token and chmod that file to 0644; starting an exposed viewer reuses it and leaves it 0644. Restoring only the preceding e17f7bb server implementation makes the same probe leave it 0600. The new early return bypasses preparePrivateFile, so the documented 0600 token-file contract is no longer enforced for reused files. Please validate/tighten the existing path before accepting it, preserving the helper's refusal of final-component symlinks. The store directory was tightened to 0700 in this probe; I am not claiming an observed remote bypass or demonstrated other-user token disclosure.
No production changes made. The original normal-path fixes are verified; these results qualify the broader regeneration/reuse claims. Maintainer may narrow the supported lifecycle explicitly, but the current implementation/body advertise these paths as supported.
There was a problem hiding this comment.
Reviewed at head fc51e6e64f496d8b4af32b9084df157f310d895a. Verdict: COMMENTED — not an approval. WhollyMindless's CHANGES_REQUESTED (5761577069) is unresolved; per policy a human's verdict is theirs to clear, and my approval must not become the last thing a human sees while it stands.
Contract (#223, authored by repo owner, spec anchor 0d48eb22a683a11b — recomputed hash equal, spec frozen): "setting OPENCODE_VIEWER_HOST=0.0.0.0 … makes edit, delete, block and restore unauthenticated HTTP for the whole LAN"; fix direction "require a bearer token minted at startup and stored 0600 beside the store … Keep the Host/Origin layer".
Prior findings — verified resolved at this head:
- F1 (concurrent starts diverge):
mintViewerTokennow claims via fully-written 0600 temp +linkSync(server.ts:133-148); losers read back the winner. Differential: reverting to naive read/write failsFAIL concurrent starts share one token3/3; head passes. Fresh-store claim closed. - F2 (stale cookie shadows bootstrap): every presentation validated (server.ts:315-320). Reverting to
bearer ?? cookie ?? bootstrapfailsFAIL bootstrap beats stale cookie; head passes. - N1 (malformed cookie 500s):
decodeURIComponentremoved (server.ts:167). Reverting failsFAIL malformed cookie refused, not 500; head passes.
Contract criteria evidence: exposed bind refuses unauthenticated reads and mutations (test/viewer-auth.test.ts: GET /api/data 401, GET / 401, POST /api/edit 401, wrong bearer 401; token reaches /api/delete route); token stored 0600 at store root (server.ts:137 preparePrivateFile, mode asserted in viewer-startup warns cases); Host/Origin layer untouched and runs before auth (server.ts:303-304).
Commands run (measured): bun run typecheck clean; bun run lint 0 errors (128 infos), format clean; bun run test 940 pass / 19 skip / 0 fail; bun run test:e2e 30 / 0.
P1 (new, same class as F1, narrower trigger): corrupt prior token file + concurrent starts still diverge. With viewer.token = corrupt!!, both starters fail TOKEN_SHAPE, both hit linkSync EEXIST (the corrupt file is the existing target), both read back the corrupt winner, both take renameSync (server.ts:143-146) — last writer wins the file, the other server holds a token nothing accepts. Measured repro: Promise.all([startViewer(0), startViewer(0)]) with a corrupt file → agree: false, server b returns 401 for server a's token. Precondition is triple-narrow (corrupt file AND concurrent start AND non-loopback) and self-heals on restart, so not filed as request-changes on top of the standing block — but the fix's own comment ("Concurrent first starts … must agree on ONE token") is false in this branch. Suggested direction: on a corrupt target, rename it aside under a unique name before linking, so losers converge on link EEXIST + read-winner.
Final gate re-check (verbatim): gh pr view 277 --json headRefOid → fc51e6e64f496d8b4af32b9084df157f310d895a; gh pr checks → lint pass, test pass, test-windows pass, smoke pass.
To clear: WhollyMindless dismisses 5761577069 (all three original findings are verified fixed here); the P1 above is a follow-up judgement call for the maintainer — fix in this PR or file it forward.
|
@WhollyMindless F3 confirmed at head Probe (macOS/Bun 1.4.3, real writes, no mocks): fresh Mechanism, differential by code: at Aggravating detail: the startup warning prints F1-residual (corrupt-file concurrent starts) was independently measured and reported in my COMMENTED review 5761929650 at |
…ile (#223 review) F1 residual: the hard-link claim solved an absent file, not a corrupt one — two starters that both read the same corrupt winner replaced it unconditionally, disagreeing on Linux and throwing EPERM on Windows. Every mint now runs through an in-process promise chain, and cross-process recovery is elected by an O_EXCL lock file with re-check under the lock, a bounded wait, and stale-lock stealing; no replacement is unconditional. F3: the valid-token reuse path early-returned past preparePrivateFile, so a file left 0644 stayed 0644. Reuse now tightens the existing file (owner bits kept, final-component symlink still refused) before accepting it. Tests: corrupt-existing-file counterpart to the fresh-file concurrency test, and a reuse-tightening probe (POSIX). Both fail at fc51e6e, pass here.
|
Rework at
Proof (measured): the two new tests fail at |
WhollyMindless
left a comment
There was a problem hiding this comment.
Re-verified ac9d47d367d13d0621c264fda5a6046a3d671d53. APPROVE — supersedes my prior CHANGES_REQUESTED reviews; all reported findings are closed at this head.
Independent measurements with Bun 1.4.4, isolated checkout and synthetic stores:
- Original fresh-start/cookie probe: both viewers use the persisted token; fresh and stale-cookie bootstrap both return 200; malformed cookie plus valid Bearer returns 200. The submitted auth suite also checks malformed-cookie-only refusal.
- Original corrupt-token probe, ten two-viewer trials per OS: Windows and WSL Ubuntu each report zero failed starts and zero divergent pairs. This is the same setup that previously produced Windows EPERM and Linux disagreement.
- Additional synchronized separate-process probe: four processes against a fresh store, then four against a corrupt store. On both Windows and WSL, all four agree with the persisted token and every authenticated
/api/datarequest returns 200. - Valid token seeded at 0644 on Linux-native
/tmp: startup reuses its content and tightens the file to 0600. - Windows viewer/auth/startup suites: 41 pass, 162 assertions. The POSIX-only mode case returns early on Windows, so I separately ran all five auth cases under WSL: 5 pass (including the real mode assertion).
Source review: in-process mint serialization ensures the next starter re-reads; cross-process corrupt recovery re-checks the token after acquiring the exclusive recovery lock. Valid-token reuse now invokes the existing permission helper before accepting the file. Prior cookie validation fixes remain intact.
No blocking finding remains from this review. This is focused verification, not a new full-suite run or proof of every crash/stale-lock interleaving. Merge timing remains the maintainer's decision.
There was a problem hiding this comment.
APPROVE — head ac9d47d367d13d0621c264fda5a6046a3d671d53, diff key b0cbfc90b9b262c49e300c94112f26960afe907349cde087bfef09588b6aeab8. Contract: #223 (author abogartz, trusted; spec anchor 0d48eb22a683a11b recomputed equal — frozen).
Criterion 1 — "require a bearer token minted at startup and stored 0600 beside the store": satisfied via the token option, armed exactly when an allowed name is non-loopback (exposed at server.ts:364). Minted at startup (randomBytes(32) → 64-hex, mintTokenOnce), persisted at memoryRoot()/viewer.token — the store root — via a 0600 temp plus atomic linkSync claim; reuse path tightens an existing file through preparePrivateFile (permissions.ts:49-63). Evidence: viewer-auth.test.ts asserts shape, bearer/cookie/bootstrap acceptance, 401 on every unauthenticated read/mutation, and query token only on /; viewer-startup.test.ts asserts statSync(tokenFile).mode & 0o777 === 0o600. Loopback-only binds stay token-free and mint no file — the finding's blast radius was LAN reach (OPENCODE_VIEWER_HOST=0.0.0.0), which is now authenticated; the maintainer accepted this scoping across three review rounds.
Criterion 2 — "Keep the Host/Origin layer either way: it is the CSRF defence, not the auth layer": rejectRequest still gates every request before the token check (server.ts:391-392); the diff adds auth after it, never replaces it.
Commands run at this head (macOS): bun run typecheck 0 errors; bun run lint pass (493 warnings, format clean); bun run test 944 pass / 19 skip / 0 fail; bun run test:e2e 30 pass / 0 fail. Skip declarations identical base→head (19 = 19 via git grep); the PR adds no .skip/.todo/tolerance widening. Mutation: replacing the auth gate if (viewerToken !== null) with if (false) fails viewer-auth.test.ts (1 fail) for the stated reason — the refusal assertions are live. Capture race fix verified against source: recordCaptureLag runs after the per-candidate auto_capture_* loop in src/capture/runtime.ts, so the session-scoped wait on capture_lag orders both lookups and the promoted assertion is strengthened, not weakened.
Prior verdicts: my CHANGES_REQUESTED 5761240313 (red test at c9193f9) is dismissed; the race fix above is the resolution and test/test-windows are green here. WhollyMindless's CHANGES_REQUESTED 5761577069 and 5761817105 were superseded by their own APPROVED 5762249179 at this head — no unresolved human block.
Findings: no P0/P1. Nit (accepted as designed, warned in exposureWarning): token appears in the bootstrap URL and plain HTTP carries it on the wire; no Secure cookie flag — consistent with the issue's own framing ("Use only on a network you trust").
Final gate re-check (verbatim): gh pr view 277 --json headRefOid → ac9d47d367d13d0621c264fda5a6046a3d671d53; gh pr checks 277 --json name,bucket → lint pass, test pass, test-windows pass, smoke pass.
Human merges.
No code change: the only blocking finding on the reviewer verdict at 7429af3 is test-windows failing on the known capture_lag race in test/capture.test.ts, untouched by this PR. Root-cause fix is open in #277. gh run rerun is not permitted for the fixer App token, so this empty commit re-triggers the required checks.
|
🎉 This PR is included in version 0.15.22 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Closes #223
What changed
A non-loopback exposure (bind host or
OPENCODE_VIEWER_ALLOWED_HOSTSentry thatisLoopbackHostnamerejects) now mints a startup token and requires it on every request, reads included. Loopback-only binds keep the token-free flow. The Host/Origin/Content-Type layer is untouched — it stays the CSRF defence, per the ticket.randomBytes(32)), stored at<memoryRoot>/viewer.tokenclaimed 0600 via the existingpreparePrivateFilehelper (Store dirs and files are created with the process umask - durable memory is group/world-readable #218 machinery). Reused across restarts so open URLs and co-located viewers sharing a store do not break; minted fresh when absent or corrupt.Authorization: Bearer <token>, theosi-viewercookie, or?token=on/only (bootstrap). The bootstrap response setsHttpOnly; SameSite=Strict; Path=/, andpage.html's same-originfetchcarries it automatically — no page.html change was needed, and the token never appears in an API URL or access log.401before any route or body parse. Host/port check still runs first (403 unchanged).viewer-startup.test.tsassertions pinning the old sentence were updated to the new contract, and the warns-cases now additionally assert the 401, the token file's existence, and its 0600 mode (skipped on win32, matchingstore-permissions.test.ts).Acceptance criteria and evidence
Ticket criterion: with a LAN-facing bind, edit/delete/block/restore must not be unauthenticated HTTP.
test/viewer-auth.test.ts(new): real child process, real HTTP. Exposed bind:GET /api/data→ 401,GET /→ 401,POST /api/edit→ 401, wrong bearer → 401, correct bearer → 200,/?token=→ 200 +Set-Cookie(HttpOnly,SameSite=Strict), cookie → 200,?token=on an API path → 401 (query accepted on/only),POST /api/deletewith token reaches the route (not 401/403). Loopback control: page and data open, no token file minted,viewer.token == null.4cc8bf6the exposed test fails (read refused— old server answers 200 without a token); the loopback control passes both sides. On this branch both pass.Commands run (measured)
bun run typecheck— clean.bun run lint— clean (biome lint + format:check).bun run test— 939 pass / 19 skip / 0 fail (91 files).bun run test:e2e— 30 pass / 0 fail (8 files), including the viewer e2e scenario file against the modified server.4cc8bf6: 1 fail / 1 pass ontest/viewer-auth.test.ts(reason above); branch: 2 pass.Deliberately not changed
page.html— untouched; cookie auth works with its existing same-origin fetches.Note for the reviewer: the warning string is built with plain
+concatenation rather than a template literal on purpose — Bun 1.4.3's parser rejects a template literal containing)mid-chain in a multiline+expression (reproduced standalone); a template there is a parse error, not a style choice.