the access round: spectator mode removed and reads made story-only -- the table, raw session, carryover, files, status, and the notepad are owner-only; the story is the one public read (any signed-in user, fork button on it that copies the run that made the story, never the view); #28's human-side open read overturned with the ruling, gm.md stays never model-facing; non-owners land in the story view (play/setup redirect on the 403, home cards link there directly), the story view names its owner and stands alone on the story response, which now carries display/owner/ownerName; the table gains a raw tab -- the whole log as it rode the wire (thinking, every variant block, every reminder copy, full tool results, rides inline) next to the curated projection, live sessions only, sticky across turn re-renders; --debug mode for easy testing: every request is a fixed superuser that bypasses the users db entirely, no invite dance, loopback-bound regardless of config (found live: the SPA boot only asked the server who it was when a token existed, so tokenless browsers never learned they were the debug user -- boot now always asks); lint rule 10: no laptop-visible facts anywhere and all commits always from Mute -- the username and home paths are derived at runtime so the checker never contains them, scanned over the tracked tree, every historical blob, and commit messages, identity enforced on author and committer on every ref plus git config; the queue split: resolved questions relocated to DECISIONS.md verbatim by number (day's words kept, reversals annotate never rewrite, the agenda/reminder trio gets its own section), QUESTIONS is open items only (stale OPENs resolved on the way: #10 by the 2026-11-13 pairing default, #11 by the raw tab); smoke reworked to the story-only battery -- ash 403s on every run surface, 200 on the story alone, the ownerless-run check rides the runs list; all twelve QUESTIONS-number citations re-pointed at DECISIONS; smoke ALL PASS in a worktree (111 checks), two-user browser pass (the non-owner's whole run surface is a 403 detail and a 200 story, back-to-table hidden, owner views intact), raw-tab browser pass (curated table leak-free, raw shows the whole variants block, tabs vanish on dormancy), typecheck green on both programs, check-repo clean
This commit is contained in:
+16
-55
@@ -9,67 +9,28 @@ file is the "where did we leave off" map.
|
||||
|
||||
## Where we are
|
||||
|
||||
- **The typing round is COMPLETE: all four phases (2026-11-15).**
|
||||
Phases 1-2 (the server core) are committed (`f81b188`); phases 3
|
||||
(the clerk) and 4 (web/) are done the same sitting and land with
|
||||
this commit. tsc runs as a no-emit checker (`npm run typecheck`) over
|
||||
plain `.mjs` with JSDoc annotations; the shared shapes live in
|
||||
`server/shapes.mjs` (log events as a tagged union, wire messages,
|
||||
manifests, job state, the Ctx), the db row shapes live local to
|
||||
their owners (the clerk's five tables typed in tool/memory.mjs's
|
||||
header, like users.mjs's rows), and the SPA's response envelopes
|
||||
live in `web/shapes.mjs` with the server's shared shapes (User,
|
||||
LogEvent, JobState) imported from server/shapes.mjs at their use
|
||||
sites. Dev tooling only: `typescript` + `@types/node` in
|
||||
devDependencies, `node_modules/` gitignored -- the runtime stays
|
||||
zero-dependency (QUESTIONS #4 amended to say so).
|
||||
- The clerk round: every `.get()`/`.all()` cast at the db
|
||||
boundary, `fail` annotated `@returns {never}` so guard-narrowing
|
||||
works, tsconfig's include widened to `tool/`. Non-annotation
|
||||
deltas, all of them: Number() wraps around COUNT(*) reads, two
|
||||
impossible-path guards (apply's session, the runs-list fill),
|
||||
`?? ''` where a possibly undefined cmd indexes the phase rules /
|
||||
run-less set, and the RewordOp shape fix (reason required -- the
|
||||
validator demands it; no server code constructs reword ops).
|
||||
- The web round: a SECOND tsconfig (`tsconfig.web.json`) -- DOM
|
||||
libs in their own program, keeping the server program free of
|
||||
DOM/node global collisions; the typecheck script runs both.
|
||||
`node` types ride along in the web config because
|
||||
server/shapes.mjs's Provider typedef pulls provider.mjs into
|
||||
the web program. `$`/`el` typed at the DOM boundary
|
||||
(HTMLElement; typed-element casts at input/dialog/select use
|
||||
sites), timers as `?ReturnType<typeof setTimeout>`. The full
|
||||
diff audited; the non-annotation deltas, all of them: the
|
||||
transcript's reminder-find gains `x.t === 'msg' &&` (reminder
|
||||
lives only on msg events), `clearTimeout(x ?? undefined)` on
|
||||
the three null-initialized timers (null and undefined are both
|
||||
no-ops), `!!()`-wraps on the two `mine` booleans (null vs
|
||||
false, used only truthily), five impossible-path guards (the
|
||||
router's named-view, the play/setup/story enter run-ids,
|
||||
setup's signed-in owner check, saveDirty's currentFile), the
|
||||
setup `files` local initialized `{}` instead of null (never
|
||||
read before enter), and view-new caching the create-pc lookup
|
||||
in one local (same element, same accesses).
|
||||
- Verified, both rounds: typecheck green (both programs), smoke
|
||||
110/110, restart-check on a genuine restart, check-reminder
|
||||
(aimed at the fork lineage -- the source run's newest logged
|
||||
session is the near-empty session 4), check-repo, and a full
|
||||
browser pass over the SPA (claim, home + admin, play incl. a
|
||||
live turn + pane edits, story, the setup editor incl. dirty
|
||||
markers + draft stash, new-run incl. the name roll) with zero
|
||||
console errors; test state cleaned.
|
||||
- **The JSDoc typing round is COMPLETE, all four phases (2026-11-15,
|
||||
through `8d4a6b9`): the server core (`f81b188`), the clerk, and
|
||||
web/.** tsc runs as a no-emit checker over plain `.mjs` with JSDoc
|
||||
annotations (`npm run typecheck` -- two programs: `tsconfig.json`
|
||||
for server + tool, `tsconfig.web.json` for the SPA's DOM libs);
|
||||
the shared shapes live in `server/shapes.mjs`, the db row shapes
|
||||
local to their owners, the SPA's response envelopes in
|
||||
`web/shapes.mjs`. The audit lists live in the commit messages;
|
||||
the type gate and its working lessons live in AGENTS.
|
||||
|
||||
- **Everything is built, proven, and committed (through `d737e47`,
|
||||
- **Everything is built, proven, and committed (through `8d4a6b9`,
|
||||
2026-11-15).** The full scope, each round mock-proven end to end
|
||||
and live-proven where live could reach: the MVP substrate (clerk,
|
||||
server, housekeeping job, SPA), multiuser (token identity, invites,
|
||||
fork, user packages, spectator), the agenda, the per-turn reminder,
|
||||
fork, user packages, story-only reads), the agenda, the per-turn reminder,
|
||||
the variant round (variant literature, the crypto pick), the entity
|
||||
round (/story, /table, the slidwin carry), the dormant-session
|
||||
rework (the universal session lifecycle, move-at-stop, the start
|
||||
lint, rebaseable housekeeping, carryover.jsonl + memory.json
|
||||
packages), the format house rules (nine-rule check-repo), and the
|
||||
naming round. The design record lives in README / DICTIONARY /
|
||||
packages), the format house rules (nine-rule check-repo), the
|
||||
naming round, and the JSDoc typing round (server, clerk, web).
|
||||
The design record lives in README / DICTIONARY /
|
||||
ROADMAP; the build history in the git log.
|
||||
- **The project is named: Tiny Worlds.** The invariant it names is
|
||||
stated in README's premise -- each package is a tiny world on
|
||||
@@ -130,8 +91,8 @@ file is the "where did we leave off" map.
|
||||
## Not yet exercised (expect first-use friction)
|
||||
|
||||
- **First start under multiuser** (step 1) -- nothing live has
|
||||
touched the auth spine, invites, fork, or spectator mode yet; all
|
||||
are mock-proven only.
|
||||
touched the auth spine, invites, fork, or the non-owner reads yet;
|
||||
all are mock-proven only.
|
||||
- ask_gm in live flow (pause/resume is mock-proven; the live model
|
||||
simply made its own choices so far -- by design), the self-heal
|
||||
conflict path in live flow (mock-proven; capped at 3 heals a turn),
|
||||
|
||||
Reference in New Issue
Block a user