Skip to content

feat(scratchnode): ship sidecar handoff contract#455

Merged
HomenShum merged 3 commits into
mainfrom
feat/scratchnode-memory-wall
Jun 1, 2026
Merged

feat(scratchnode): ship sidecar handoff contract#455
HomenShum merged 3 commits into
mainfrom
feat/scratchnode-memory-wall

Conversation

@HomenShum
Copy link
Copy Markdown
Owner

Aligns ScratchNode as a disposable sidecar event room with the correct NodeBench private continuation URL (/events/:slug/private) and enforces that public answer traces explicitly state private notes are excluded.


Pull Request opened by Augment Code with guidance from the PR author

HShuM and others added 2 commits June 1, 2026 13:59
…nt stream

Phase 8: a layout-only "Memory Wall" overlay that points at PUBLIC event
content (liveEventMessages / liveEventAnswers) or holds short public stickies,
positioned by a single commit-on-pointerup mutation. The Wall is a second
render lane over the same canonical event stream the chat feed shows (the
"Twitch" model: one stream, two synchronized views).

Schema (liveEventWallItems):
- refType message|answer|note, x/y/w/color/groupId/z, createdBySessionId
- 4 indexes: by_event, by_event_updated, + pin-dedup by_event_message/answer
- Content/layout separation: message/answer text is NEVER duplicated; only a
  "note" stores inline text, public by construction.

Backend (convex/wall.ts):
- listWallItems       realtime query, BOUND at 500 (mirrors getMembers)
- pinToWall           idempotent; cross-event integrity-checked ref
- createWallNote      public sticky; editWallNote (note-only); recolorWallItem
- moveWallItems       the ONE write per drag; group-move = one delta; z-to-front
- groupWallItems      deterministic groupId = "g:" + smallest member id
- ungroupWallItems / removeWallItems  (unpin != delete the source content)

Reliability (.claude/rules/agentic_reliability.md):
- BOUND      list cap 500; every id[] mutation caps at 200
- HONEST_STATUS  typed ConvexError on every validation failure
- requireMember + DB-backed enforceRateLimit on every mutation
  (separate wall: and wallmove: buckets so drags can't starve creates)
- coordinate clamping: NaN/Infinity -> last-good, finite-out-of-range -> +/-1e5
- color allowlist (no arbitrary inline style); DETERMINISTIC group ids

Privacy invariant: the public Wall NEVER references userNotes (private,
owner-keyed). A "note" item is public inline text, identical in visibility to a
chat message. Enforced by a static-source boundary test.

Tests:
- 17 scenario-based (convex/__tests__/scratchnode.wall.test.ts): pin
  idempotency/dedup, cross-event id smuggling, clamp branches, deterministic
  grouping, BOUND batch+list, membership/lifecycle gates, color/text injection,
  collaborative-open move by a different member, unpin-keeps-source, rate-limit
  bucket independence.
- 6 runtime-boundary static assertions (privacy + BOUND + gates + allowlist).

Prototype (public/proto/wall.html): the smooth-drag engine reference
(translate3d + rAF + setPointerCapture + group-move + alignment snap); commit
stubs now name the real api.wall.* contracts. Next PR mounts the Wall lane into
home-v5 behind a Chat|Wall toggle.

Verification: convex codegen clean, tsc --noEmit clean, 33 targeted tests pass,
scratchnode.events regression suite 50 pass / 1 skip, npm run build clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Align ScratchNode as a disposable sidecar event room that keeps public chat and public /ask answers separate from private notes. Update the NodeBench continuation URL to the event private route and make public answer traces explicitly state that private notes are excluded.

Also fix a host-console focus regression where delayed composer autofocus could steal input focus from modal fields during live-event setup.

Verification: npm run build; npx vitest run convex/__tests__/scratchnode.events.test.ts; npx playwright test tests/e2e/scratchnode-live-route-honesty.spec.ts --project=chromium --workers=1 --reporter=list; npm run dogfood:proto-live-backend; npx tsc -p convex -noEmit --pretty false; npx tsc -p . -noEmit --pretty false.

Co-Authored-By: Augment Agent <77596827+HomenShum@users.noreply.github.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nodebench-ai Ready Ready Preview, Comment Jun 1, 2026 11:12pm

Request Review

@HomenShum HomenShum merged commit 426c8ba into main Jun 1, 2026
12 of 13 checks passed
@HomenShum HomenShum deleted the feat/scratchnode-memory-wall branch June 1, 2026 23:12
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

✅ Dogfood Visual QA Gate: PASSED

Check Status
Screenshots 23 captured (pass)
Walkthrough 9 chapters (pass)
Key Frames 9 extracted (pass)
Scribe Steps 8 how-to steps (pass)
Build success
Artifacts

Download the dogfood-evidence-b3a4489 artifact from the Actions tab for full screenshots, frames, and walkthrough video.


Generated by Dogfood QA Gate

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

Demo: walkthrough of the surfaces this PR changed is available as a workflow artifact (pr-demo-455) at https://github.com/HomenShum/nodebench-ai/actions/runs/26787714729

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.

2 participants