overengineeringstudio / overengineeringstudio/effect-utils

notion-cli: reduce Node-backed sqlite runtime closure and expose reusable Node source CLI helper

Open
#726 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:devenv area:notion area:tooling
Dominant language
TypeScript
Stars
82
Forks
2
Avg merge
1d 8h
Merged PRs (30d)
121

Description

Follow-up from #719 / #698 runtime investigation.

The supported notion sqlite ... path correctly runs under Node 24 because @overeng/notion-datasource-sync imports node:sqlite, which Bun 1.3.11 cannot resolve. Current Nix packaging handles this by wrapping notion sqlite to exec Node against the installed runtime workspace.

Remaining work:

  • Add a reusable Node/source-runtime helper around the mk-pnpm-cli runtime workspace pattern instead of keeping ad hoc wrappers in package build files.
  • Make installRuntimeWorkspace pruneable or add a production-runtime mode; current closure is large because it copies the restored workspace including dev/test surfaces.
  • Consider exporting a narrow helper such as mkNodeSourceCliRuntime or mkPnpmCli from the flake for downstream md/sqlite-style CLIs.
  • If notion-datasource-sync becomes standalone, give it its own Nix build/FOD/runtime dependency contract rather than only exposing it through notion-cli.passthru.datasourceSyncRuntime.

Evidence from local investigation: nix path-info -Sh reported the notion-cli/notion-datasource-sync runtime closure around 735 MiB, with the installed runtime workspace around 449 MiB.

Posted on behalf of @schickling
field value
agent_name 🪩 co3-playa
agent_session_id 4a8a20a2-8712-4752-87fc-db098c203de6
agent_tool Codex CLI
agent_tool_version 0.131.0
agent_runtime Codex CLI 0.131.0
agent_model unknown
worktree effect-utils/schickling/2026-05-25-notion-md-db
machine dev3
tooling_profile dotfiles@4db6783

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the flake's mk-pnpm-cli runtime workspace pattern, installRuntimeWorkspace, and the notion-cli.passthru.datasourceSyncRuntime packaging. Compare the current 735 MiB closure with the installed workspace, then define a reusable Node/source-runtime helper and a production-prunable runtime mode. Done means downstream CLIs can use the helper without ad hoc wrappers and the runtime closure is reduced or the dependency contract is standalone.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, sqlite
Domain
build-system, cli, databases
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.