feat(runtime): seed-replayer reports skipped so hosts can stamp seed-once on progress (cloud#853)#3200
Merged
Conversation
…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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 1 package(s): 16 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
os-zhuang
marked this pull request as ready for review
July 18, 2026 08:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Tiny enabling change for cloud#853 (already merged, forward-compatible): the
seed-replayerkernel service now reportsskipped.The replayer returned
{ inserted, updated, errors }. A cloud host consuming it (cloud'sdecideSeedStamp) 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 asinserted = 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, };skipped(aSeedLoadResult.summaryfield already consumed elsewhere in this file, at the inline-seed log).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-shabump, cloud'sdecideSeedStamp(already merged, already honorsskipped) 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