Skip to content

docs: design review, decision log, and file-based task system - #506

Merged
nichochar merged 1 commit into
mainfrom
docs/project-memory
Jul 29, 2026
Merged

docs: design review, decision log, and file-based task system#506
nichochar merged 1 commit into
mainfrom
docs/project-memory

Conversation

@nichochar

Copy link
Copy Markdown
Contributor

Groundwork for restarting the project. No code changes — three new documents plus a task directory.

What's here

REVIEW.md — a formal review of the prototype. Three parts: security, design forks worth reconsidering, and a code-quality pass.

DECISIONS.md — why the system is the way it is. Ten entries covering the choices that aren't recoverable from reading the code, each with what it buys and what it costs. Statuses (active / under review) flag which ones are still open.

tasks/ — one markdown file per task, status in frontmatter moving TODO → IN_PROGRESS → DONE, no tooling. Seeded with the ten tasks the review turned up, ordered roughly by priority.

Headline finding

The "it runs locally" assumption is being treated as a security boundary, and it isn't one. Verified against a running instance:

  • Server binds 0.0.0.0 — reachable from the whole network
  • Every route sends Access-Control-Allow-Origin: *, including GET /api/settings, which returns every provider API key
  • POST /api/file reads arbitrary paths off disk
  • The websocket accepts any Origin

The last one is what makes it remote code execution rather than disclosure: a page can list sessions over HTTP, then push cell:update + cell:exec. Reproductions are in REVIEW.md §1.

Two more found by reading and deliberately not exercised, because both are destructive: path traversal into fs.rm(recursive: true) via DELETE /api/srcbooks/:id, and shell injection through a cell filename that arrives from an imported .src.md.

Tasks 0001 and 0002 cover the fixes; PRs stacked on this branch.

Baseline health

Better than two years of dormancy would suggest — installs, builds, and passes its 11 tests cleanly on Node 24 with no changes. The architecture is coherent and the format instinct is right. What it needs is a security pass, a safety net, and one explicit decision about what kind of notebook it wants to be (task 0006).

🤖 Generated with Claude Code

Groundwork for restarting the project. Three additions, no code changes:

- REVIEW.md: formal review of the prototype. Security findings verified
  against a running instance, the design forks worth reconsidering
  (execution model, .src.md grammar, session state ownership), and a
  code-quality pass.
- DECISIONS.md: why the system is the way it is. Records the reasoning
  behind the choices that aren't obvious from the code, and flags which
  ones are under review.
- tasks/: one markdown file per task, status in frontmatter, no tooling.
  Seeded with the ten tasks the review turned up.
@nichochar
nichochar force-pushed the docs/project-memory branch from b0af817 to ea93a9b Compare July 29, 2026 15:24
@nichochar
nichochar merged commit 38a54fc into main Jul 29, 2026
2 checks passed
@nichochar
nichochar deleted the docs/project-memory branch July 29, 2026 16:42
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