Skip to content

feat(runtime): seed-replayer reports skipped so hosts can stamp seed-once on progress (cloud#853) - #3200

Merged
os-zhuang merged 1 commit into
mainfrom
claude/evaluate-issues-3147-5152-1naxe6
Jul 18, 2026
Merged

os-zhuang merged 1 commit into
mainfrom
claude/evaluate-issues-3147-5152-1naxe6

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Summary

Tiny enabling change for cloud#853 (already merged, forward-compatible): the seed-replayer kernel service now reports skipped.

The replayer returned { inserted, updated, errors }. A cloud host consuming it (cloud's decideSeedStamp) could not tell an all-skip replay — the env's seed data is already present, a no-op — apart from the zero-summary early-returns that never ran the loader (no organization, no metadata service, no datasets). Both read as inserted = updated = 0, so the host could not safely stamp its seed-once record for the all-skip case, and re-ran the full remote seed replay on every cold boot.

Change

   const result = await seedLoader.load(request);
   return {
     inserted: result.summary.totalInserted,
     updated: result.summary.totalUpdated,
+    skipped: result.summary.totalSkipped,
     errors: result.errors,
   };
  • The main return adds skipped (a SeedLoadResult.summary field already consumed elsewhere in this file, at the inline-seed log).
  • The three zero-summary early-returns (no org / no metadata / no datasets) now report skipped: 0, so a host can distinguish "loader ran, everything already present" (skipped > 0 → stamp) from "loader never ran" (skipped: 0 → don't stamp).

This closes the all-skip case of cloud#853 end-to-end: with a .framework-sha bump, cloud's decideSeedStamp (already merged, already honors skipped) stamps once and stops re-replaying, while still declining a genuine no-loader zero summary.

Additive and backward compatible — existing consumers (organizations-plugin) ignore the new field.

Verification

  • pnpm --filter @objectstack/runtime build — typecheck clean.
  • pnpm --filter @objectstack/runtime test — 554/554 pass.

No dedicated replayer-service test is added: the codebase has none (the service is registered inside AppPlugin's boot closure with no injection seam), the change is a one-line pass-through of an already-consumed summary field, and the consumer (decideSeedStamp) is fully unit-tested on the cloud side.

🤖 Generated with Claude Code

https://claude.ai/code/session_01APnSDJneEDRh3Z51KGCLga


Generated by Claude Code

…ress (cloud#853)

The `seed-replayer` service returned { inserted, updated, errors } but not
`skipped`, so a cloud host could not distinguish an all-skip replay (seed data
already present — a no-op) from the zero-summary early-returns that never ran
the loader (no org / no metadata / no datasets). Both read as
inserted=updated=0, so the host couldn't safely stamp its seed-once record for
the all-skip case → re-replayed every cold boot.

Return `skipped: result.summary.totalSkipped`; early-returns report skipped:0.
Lets cloud#853's decideSeedStamp stamp on progress (incl. all-skip) while still
declining a genuine no-loader zero summary. Additive, backward compatible.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01APnSDJneEDRh3Z51KGCLga
@vercel

vercel Bot commented Jul 18, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jul 18, 2026 8:53am

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface size/s labels Jul 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/runtime.

16 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:

  • content/docs/api/index.mdx (via @objectstack/runtime)
  • content/docs/api/wire-format.mdx (via @objectstack/runtime)
  • content/docs/automation/hook-bodies.mdx (via @objectstack/runtime)
  • content/docs/concepts/north-star.mdx (via packages/runtime)
  • content/docs/data-modeling/drivers.mdx (via @objectstack/runtime)
  • content/docs/deployment/index.mdx (via @objectstack/runtime)
  • content/docs/deployment/production-readiness.mdx (via @objectstack/runtime)
  • content/docs/deployment/single-project-mode.mdx (via @objectstack/runtime)
  • content/docs/deployment/vercel.mdx (via @objectstack/runtime)
  • content/docs/getting-started/your-first-project.mdx (via @objectstack/runtime)
  • content/docs/permissions/authentication.mdx (via @objectstack/runtime)
  • content/docs/plugins/packages.mdx (via @objectstack/runtime)
  • content/docs/protocol/kernel/http-protocol.mdx (via @objectstack/runtime)
  • content/docs/protocol/kernel/index.mdx (via @objectstack/runtime)
  • content/docs/protocol/kernel/lifecycle.mdx (via @objectstack/runtime)
  • content/docs/releases/implementation-status.mdx (via @objectstack/runtime)

Advisory only. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs origin/main → pass the list as args.docs.

@os-zhuang
os-zhuang marked this pull request as ready for review July 18, 2026 08:58
@os-zhuang
os-zhuang merged commit 4174a07 into main Jul 18, 2026
15 checks passed
@os-zhuang
os-zhuang deleted the claude/evaluate-issues-3147-5152-1naxe6 branch July 18, 2026 08:58

This branch was successfully deployed

1 active deployment
Preview — bb171290 Deployed Jul 18, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants