fix: keep chel serve out of lightweight client mode - #169
Conversation
taoeffect
left a comment
There was a problem hiding this comment.
I think this is right. @corrideat do you concur?
|
/review AI review started. |
Advanced AI Review
Click to expand reviewCode ReviewBase: The core mechanism is sound. Converting the static imports of 1. 🟡
|
|
/review AI review started. |
Advanced AI Review
Click to expand reviewCode ReviewBase: Scope note: the change ships three source edits ( Verification performed (no issues found in these areas):
1. ⚪ The forced flag is a no-op against the currently pinned
|
| // Has to stay the first import. See the module for why. | ||
| import './lightweight-client-off.ts' |
There was a problem hiding this comment.
Please add a space between lines 12 and 13. This keeps tools from accidentally changing the order (e.g., if one uses Organize imports in VS Code).
| // Third-party modules: | ||
| // https://deno.land/x | ||
|
|
||
| // Has to stay the first import. See the module for why. |
There was a problem hiding this comment.
Please add a brief explanation apart from See the module for why.. For example: Has to stay the first import. The server always has to store messages. See the module for more details.
corrideat
left a comment
There was a problem hiding this comment.
LGTM with two small comments.
|
|
Closes okTurtles/libcheloniajs#104
Merges after: okTurtles/libcheloniajs#105
@chelonia/libis switching to the lightweight client by default(libcheloniajs#105, merged, not released yet). In that mode its database
selectors keep nothing. chel only swaps in its own storage for persistent
backends, so with
mem, the default and whatchel initwrites,chel servewould quietly store nothing.
This sets
LIGHTWEIGHT_CLIENT=falsebefore the library loads:src/lightweight-client-off.tssets it, andsrc/main.tsimports it first.testandtest:symlinkstasks set it too, since the tests load theserver without going through
main.ts.build/main.jsis rebuilt. Apart from esbuild renaming its aliases, the onlychange is setting the flag.
It does nothing on the 1.5.0 we pin today, and needs to be in before chel moves
to the next release.
Tested against the new default with the
membackend: a preloaded manifestcomes back 200 with this change and 404 without, from both the source and the
bundle.
deno task testpasses on Deno 2.9.5.AI Usage: Claude Opus 5.5 for testing
Self review: Approved