Skip to content

fix(scratchnode): tolerate lastActivityAt drift so Convex deploy passes#477

Merged
HomenShum merged 1 commit into
mainfrom
fix/scratchnode-schema-drift
Jun 2, 2026
Merged

fix(scratchnode): tolerate lastActivityAt drift so Convex deploy passes#477
HomenShum merged 1 commit into
mainfrom
fix/scratchnode-schema-drift

Conversation

@HomenShum
Copy link
Copy Markdown
Owner

Why

The Convex Deploy for #476 (the landing synthesis) failed, which is why the synthesis isn't live yet:

✖ Schema validation failed. Document in table "liveEvents" contains extra
  field `lastActivityAt` that is not in the validator.

A parallel agent (Codex live-metrics) deployed a schema variant to the same prod deployment earlier that stamped lastActivityAt onto liveEvents rows. When #476 added its indexes, Convex re-validated every row and rejected the drifted demo-event document. Neither main nor Codex's current branch declares the field, and no code writes it — orphaned drift.

Fix

Declare lastActivityAt: v.optional(v.number()) so the validator accepts the existing prod data (forward-compatible, no data migration). This unblocks npx convex deploy, which then ships the synthesis indexes (by_startedAt / by_status_startedAt / by_lastSeen) that events:getLandingStats needs for the live "active now" counter — and the merge re-triggers the stuck Vercel frontend deploy.

One-line change. 🤖 Generated with Claude Code

…nvex deploy passes

Production Convex deploy for #476 failed with:
  ✖ Schema validation failed. Document in table "liveEvents" contains extra
    field `lastActivityAt` that is not in the validator.

Root cause: a parallel agent (Codex live-metrics) deployed a schema variant to
the SAME prod deployment earlier that stamped `lastActivityAt` onto liveEvents
rows. When #476 added its indexes, Convex re-validated all rows and rejected the
drifted demo-event document. Neither main nor Codex's current branch declares
the field, and no code writes it — it's orphaned drift.

Fix: declare `lastActivityAt: v.optional(v.number())` so the validator accepts
the existing prod data (forward-compatible, no data migration). This unblocks
`npx convex deploy`, which in turn deploys the synthesis indexes
(by_startedAt / by_status_startedAt / by_lastSeen) that events:getLandingStats
needs for the live "active now" counter.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@HomenShum HomenShum enabled auto-merge (squash) June 2, 2026 21:57
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 2, 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 2, 2026 9:58pm

Request Review

@HomenShum HomenShum merged commit 5d267c3 into main Jun 2, 2026
16 checks passed
@HomenShum HomenShum deleted the fix/scratchnode-schema-drift branch June 2, 2026 22:10
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

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

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