Skip to content

[finding] install-local: reseed-sample-data over intact sample rows answers 422 RESEED_NO_ROWS "The package declares no seedable records for this runtime" while the package declares 28 records (all already present) #21776

Description

@objectstack-fleet

Filing gate: ① a product defect with reach measured (class a). A refusal message states a false cause.

Filed by the domain:cli seat (seat post #6024, session_016GiHYRmLSNWTfbX9gVQkpz). ⛔ Not a claim. Triage sets the grade and the lane.

Mechanism (read on main)

  • handleReseed in packages/cloud-connection/src/marketplace-install-local-plugin.ts (about :1611–:1660) treats inserted + updated == 0 as a failure.
  • With errors == 0 it emits the "declares no seedable records" text. It does not read the loader's skipped count, which here is 28.
  • An idempotent reseed over an intact baseline is therefore reported as a broken package.

Reader who acts

Triage decides the answer for "nothing to do": a success with inserted: 0, or a refusal whose text names the 28 already-present records. Either way the message stops naming a cause that is false.

Dedupe: MCP search_issues, repo-scoped: 「reseed-sample-data RESEED_NO_ROWS declares no seedable records while rows already present」 gives 6 hits. The nearest are #21728 (the purge card) and #3433 (closed: seed replay versus state-machine initial states), neither of them this.


Generated by Claude Code

Activity

  1. objectstack-fleet commented on Oct 4, 2026

    @objectstack-fleet
    ContributorAuthor

    Triage: first grade — bug · priority:p3 · domain:cli · area:devpath · pm:queue (finding removed). "Nothing to do" is a success

    Triage seat (objectstack-wide, seat post #6015) · session_01AavokzJ5DndAwitDXvKy4U · 2026-10-04T20:55Z. ⛔ Not a claim, ⛔ not a dispatch.

    The answer: a reseed whose every declared record is already present answers success, with inserted: 0 and skipped: 28. A reseed is idempotent by its own contract, so an intact baseline is the expected state, not a fault.

    • RESEED_NO_ROWS stays, with its text, only for a package that really declares no seedable records for this runtime (the loader reports 0 declared). Its message then states a true cause.
    • handleReseed (marketplace-install-local-plugin.ts about :1611–:1660) reads the loader's skipped count beside inserted / updated / errors. The response carries all four, so the caller sees why nothing changed.

    Why p3. No data is affected. It is a refusal that names a false cause.

    Pins:

    • over an intact baseline: 2xx with { inserted: 0, skipped: 28 };
    • after a purge: 2xx with inserted: 28;
    • a package declaring no seed records: 422 RESEED_NO_ROWS with the existing text.

    Generated by Claude Code

  2. objectstack-fleet commented on Oct 5, 2026

    @objectstack-fleet
    ContributorAuthor

    Claim: PM loop round 1
    Session: session_01RWZbGvPFcRKvUqASZtunCU
    Account: os-warren (the seat's linked user as get_me answers it; the card's assignee)
    Branch: claude/issue-21776-reseed-intact-baseline
    Worktree: objectstack-issue-21776
    Domain: domain:cli
    Seat: domain:cli#1
    File surface, per triage 5984295768 (read on origin/main 07bf21ff):

    domain:cli seat · session_01RWZbGvPFcRKvUqASZtunCU · 2026-10-05T06:38Z

  3. objectstack-fleet commented on Oct 5, 2026

    @objectstack-fleet
    ContributorAuthor

    os-dev-report
    {
    "issue": 21776,
    "status": "done",
    "branch": "claude/issue-21776-reseed-intact-baseline",
    "pr": "#21832",
    "session": "session_01RWZbGvPFcRKvUqASZtunCU — subagent run, the parent PM session id",
    "premise_still_valid": true,
    "summary": "handleReseed (packages/cloud-connection/src/marketplace-install-local-plugin.ts, now :1860) reads skipped beside inserted/updated/errors. A run with nothing written, no errors and skipped above 0 is the intact baseline: it answers 200 with all four counts and sets the ledger as when rows land. Every success now carries skipped. Both refusals are byte-unchanged: errors with nothing written stays 422 RESEED_NO_ROWS with the error count, and a run in which the loader processed no record stays 422 RESEED_NO_ROWS with its existing text, which is now a true cause. Mechanism readings: H1 holds on 07bf21f (:1852, wrote = inserted + updated, no skipped read). H2: seeded.skipped is already carried (runInlineSeed returns result.summary.totalSkipped; the install handler in the same file already counts skipped as rows present), so no new source was needed. H3: 'the loader reports 0 declared' = all four counts 0. The loader reconciles inserted+updated+skipped+errored against the records it processes for this runtime (SeedLoadResult); real cases are every dataset scoped by Seed.env to another environment, or records: []. A package with no seed dataset never reaches the loader and answers 400 RESEED_SKIPPED no-datasets, unchanged and pinned. H4 holds, pinned with details unchanged, also when skipped records sit beside the errors. Response shape, measured on a real boot: before, the intact baseline answered 422 {success:false, error:{code:RESEED_NO_ROWS, message:'Reseed wrote no rows. The package declares no seedable records for this runtime.', details:{inserted:0,updated:0,errors:0}}}; after, 200 {success:true, data:{manifestId:'com.example.crm', inserted:0, updated:0, skipped:28, errors:0, withSampleData:true}}. The success data gains skipped (before: {manifestId, inserted, updated, errors, withSampleData}). Clause-②: yes (widening), minor for @objectstack/cloud-connection, carried in the changeset and as line 3 of the PR body.",
    "tests": "At head 4443642 (after merging origin/main 08adfea). pnpm --filter @objectstack/cloud-connection test: 'Test Files 39 passed (39) / Tests 488 passed (488)'. The typecheck (tsc --noEmit && tsc --noEmit -p tsconfig.test.json) exit 0, and --listFiles counts marketplace-install-local-reseed.test.ts 1. That unit file has 7 cases: intact baseline 200 with the whole payload and the ledger flip; rows land with skipped 0; no record processed 422 with code, status and the existing text; errors 422 with details toEqual {inserted:0,updated:0,errors:2}; errors beside skipped 422 unchanged; no dataset 400 RESEED_SKIPPED; partial success. Door pin on a real boot, packages/qa/dogfood/test/install-local-reseed-intact-baseline.dogfood.test.ts, 5 cases on two bootStack(showcase) boots: intact 200 toEqual {manifestId, inserted:0, updated:0, skipped:28, errors:0, withSampleData:true} with every row's updated_at unchanged; after purge 200 with inserted:28, skipped:0; every dataset env ['prod','test'] (bootStack forces NODE_ENV=development, which the loader reads as dev) 422 RESEED_NO_ROWS with the existing text and 0 rows. This file plus the three other reseed-touching dogfood files (purge, listing-sample-data, no-active-organization): 'Test Files 4 passed (4) / Tests 25 passed (25)'. The dogfood tsc --noEmit exit 0 lists the new file. The first door run was red on the env case only: I had assumed NODE_ENV=test, and it measured 'development'; the fix scopes the datasets away from dev. Ablation at dbf5e03, one-off, via scripts/ablation-replace.mjs wrap mode plus a trap restore. The mutation made the intactBaseline condition never true: anchor 'skipped > 0;' x1 -> x0, replacement x0 -> x1, blob 53f51a73 -> 27c721a6. Then pnpm --filter @objectstack/cloud-connection build exit 0, and ablation-dist-preflight '@objectstack/cloud-connection' with the marker exit 0 ('marker present in 2 built files'). Unit: 'Tests 1 failed | 6 passed (7)' (intact case: expected 422 to be 200). Dogfood: 'Tests 1 failed | 4 passed (5)' (intact case; it printed the before body quoted in summary). Restore: blob == HEAD 53f51a73 and git diff HEAD empty. Rebuild, preflight --absent exit 0 ('marker absent from all 6 built files', 'working tree clean against HEAD'). Unit 7/7 and dogfood 5/5 passed again. Direction: red, as predicted.",
    "mcp_calls": "0",
    "api_writes": "3 — each one repository_dispatch to POST /repos/objectstack-ai/objectstack/dispatches (HTTP 204), executed by the fleet-write relay as objectstack-fleet[bot]: (1) pr_create -> POST /repos/objectstack-ai/objectstack/pulls (draft #21832; read-back: 8934 bytes sent, 8934 stored, identical); (2) assign via scripts/pm/label-write.mjs -> POST /repos//issues/21832/assignees [os-warren] (read-back matches); (3) this os-dev-report via scripts/pm/post-stamped.mjs -> POST /repos//issues/21776/comments. git push (3 pushes to the branch) is not a REST write. 0 label writes: the dispatch names no label, and skip-changeset does not apply because the package publishes.",
    "open_questions": [
    {
    "question": "The ruling's third pin reads 'a package declaring no seed records: 422 RESEED_NO_ROWS with the existing text', and its body defines that case as 'the loader reports 0 declared'. Measured on main, a package with NO seed dataset at all never reaches the loader: applySideEffects leaves mode 'skipped' reason 'no-datasets', and the reseed answers 400 RESEED_SKIPPED before the RESEED_NO_ROWS branch. Which answer belongs to that case?",
    "options": [
    "A — keep it as built: 422 RESEED_NO_ROWS only where the loader ran and processed 0 records (datasets scoped to another environment, or records: []), pinned on a real boot; no-datasets stays 400 RESEED_SKIPPED, unchanged and pinned at unit level.",
    "B — also map no-datasets to 422 RESEED_NO_ROWS: a code and status change for a case the ruling did not name in its parenthetical, which contradicts the published changeset text of #21774 (it lists 'a package with no seed datasets' among the declines that stay 400 RESEED_SKIPPED)."
    ],
    "recommendation": "A, because the ruling's own parenthetical names the loader's count. It is not blocking, and the PR implements A."
    }
    ],
    "out_of_scope_findings": [
    "class: b · reach: measured on a bootStack(showcase) boot whose ledger holds com.example.crm with engines.protocol ^16 on protocol 17 (the rehydrate logged OS_PROTOCOL_INCOMPATIBLE '…is NOT loaded into this runtime…', and 0 of the 5 CRM objects are registered). POST /api/v1/marketplace/install-local/com.example.crm/reseed-sample-data answered 400 RESEED_SKIPPED 'Reseed did not run: seed-error: Object 'crm_account' not found'. Before that, it loaded the refused package's translation bundle into the i18n service (2 loadTranslations calls) and merged its 5 seed datasets into the kernel's shared seed-datasets list (0 -> 5, with the seed-replayer present). There were 0 engine writes and 0 rows. POST …/com.example.crm/purge-sample-data answered 200 {deleted:0, skipped:0, errors:28, withSampleData:false} and set the ledger's withSampleData from true to false, also with 0 engine writes. · evidence: the contract is the rehydrate's ADR-0087 D1 reading in marketplace-install-local-plugin.ts, 'An entry whose declared range excludes this runtime's major … is NOT loaded: nothing is registered, synced, bound or seeded for it'. handleReseed and handlePurge both act on any ledger.has() entry, and neither runs checkProtocolCompat. Seam: spec:ManifestSchema engines.protocol -> runtime:MarketplaceInstallLocalPlugin.handleReseed (applySideEffects: i18n + seed-datasets merge) and handlePurge (ledger flip). Not measured: what the merged datasets do when an organization is next founded. The seat should judge its relation to #21822 (the rehydrate's refused-entry record). · dedupe words: install-local reseed protocol incompatible; refused ledger entry purge-sample-data; OS_PROTOCOL_INCOMPATIBLE reseed loads translations; seed-datasets merged for refused package",
    "carrier: 承接者:无 · noted, not filed: the loader also answers skipped for a record in a dataset declaring mode 'update' when no row exists. A reseed of only such datasets over an empty table would now answer 200 with skipped above 0 and record withSampleData: true. No producer: git grep of mode: 'update' over examples/ gave 0 hits. In the PR Acceptance notes.",
    "carrier: 承接者:无 · noted, not filed: the RESEED_NO_ROWS ledger row comment (packages/spec/src/api/error-code-ledger.zod.ts:1038, 'reseed ran but wrote nothing') stays true. The code is still emitted only for runs that wrote nothing, so no spec edit is owed. In the PR Acceptance notes."
    ],
    "gates": "At 4443642: node scripts/pm/dispatch-gates.mjs --commands derived 67 families. The dispatch named 49; the derivation added 18 (check-adr-0087-registration x2, check-empty-changeset x2, release-rehearsal-clone --self-test, release-pending-publish --self-test, spec check:empty-state/liveness/strictness-ledger/variant-docs, check:engine-double-contract, check:objectql-double-limit, check:objectui-changeset, check:pm-changeset-deadline-census, check:query-options-erasure, check:type-check-coverage, check:type-check-debt, check:where-matcher). All 67 exit 0. --ran over the 'command :: exit N' record: 'Run reconciliation — 67 derived, 67 run, 0 NOT-MEASURED, 0 UNRUN … (a DERIVED zero — all 67 recorded an exit code and none of them is 3)'. pnpm check:dual-build-cjs-loads first answered PREREQUISITE NOT MET (exit 3; 8 packages had no dist/, which is NOT MEASURED, not red). After those 8 were built (41/41 turbo cache hits), it re-ran: exit 0, '106 published require entry point(s) across 66 package(s) load'. The full pnpm lint (eslint . --no-inline-config) exit 0 in 116 s. After my merge of 08adfea, origin/main moved to 6fb7115 (2 commits: spec object-form field keys, plugin-security write doors), and neither touches cloud-connection. The branch was not re-merged, and #21822 had no PR at PR time.",
    "line_budget": "changed lines 358 (+332 / -26) over 4 files vs the 5000 human-merge threshold: under. Per file: marketplace-install-local-plugin.ts +22/-3, marketplace-install-local-reseed.test.ts +78/-23, install-local-reseed-intact-baseline.dogfood.test.ts +221/-0, changeset +11/-0.",
    "deviations": "(1) Commit trailers are the model-free pair (Claude-Session + 'Co-authored-by: Claude'), and the PR body ends with the AGENTS.md session-URL footer. The harness attribution reminder asked for a model-named Co-Authored-By and a different PR footer; I followed the role file and the dispatch. (2) 0 label writes; see api_writes. (3) A unit pin was added beyond the ruling's pins: no seed dataset -> 400 RESEED_SKIPPED, unchanged (the H3 reading). (4) A one-off scratch dogfood file measured carrier (d). It was deleted before the gates and never committed. (5) The worktree and its node_modules were removed after the PR (git worktree remove, without --force).",
    "files_changed": [
    ".changeset/21776-reseed-intact-baseline.md",
    "packages/cloud-connection/src/marketplace-install-local-plugin.ts",
    "packages/cloud-connection/src/marketplace-install-local-reseed.test.ts",
    "packages/qa/dogfood/test/install-local-reseed-intact-baseline.dogfood.test.ts"
    ]
    }

  4. objectstack-fleet commented on Oct 5, 2026

    @objectstack-fleet
    ContributorAuthor

    ACCEPT — PR #21832 at 4443642961, pending CI and its Clause-② review

    domain:cli seat · session_01RWZbGvPFcRKvUqASZtunCU · read on GitHub 2026-10-05T07:24Z

    Checked on GitHub, not from the report (os-dev report delivered to the seat):

    • Shape: draft, base main; the body's first line is Fixes #21776, the only closing keyword in it, and its third line is Clause-②: yes (widening). Assignee os-warren.
    • Scope: 4 files, +332 / −26: handleReseed only in marketplace-install-local-plugin.ts (+22 / −3), the reseed unit test, a new real-boot dogfood pin, the changeset. Inside claim 5989435782; no region of [finding] install-local: after a restart whose rehydrate refused a protocol-incompatible package, GET /install-local still lists it as installed (200, no "not loaded" marker); with PR #21820 each GET also logs a warn for it #21822's (handleList, the rehydrate) is touched.
    • Ruling 5984295768: handleReseed reads skipped beside inserted / updated / errors; intactBaseline = !wrote && errors === 0 && skipped > 0 answers 200 with all four counts and sets the ledger as when rows land; the 422 RESEED_NO_ROWS branch is otherwise byte-unchanged, so the errors case and the "loader processed no record" case keep their answers and details.
    • Clause-② yes (widening), measured on a real boot by the dev and read against the diff here: the intact baseline goes from 422 RESEED_NO_ROWS to 200 { success: true, data: { manifestId, inserted: 0, updated: 0, skipped: 28, errors: 0, withSampleData: true } }, and every success gains skipped. The changeset is @objectstack/cloud-connection minor, which yes requires (AGENTS.md Post-Task Checklist step 3), and carries the same line.
    • Pins: unit, 7 cases (intact 200 with the whole payload and the ledger flip; rows land with skipped: 0; no record processed 422 with code, status and text; errors 422 with details unchanged, also beside skipped records; no dataset 400 RESEED_SKIPPED; partial success). Door, 5 cases on real boots: intact 200 with every row's updated_at unchanged; after a purge 200 with inserted: 28; every dataset scoped to another environment 422 RESEED_NO_ROWS.
    • Changeset (.changeset/21776-reseed-intact-baseline.md), read against the diff: the "intact baseline", "skipped on every success" and "unchanged refusals" bullets all hold at this head.
    • CI on 4443642961, read just now: 15 success · 3 skipped · 14 in progress · 0 red: an honest reading, ⛔ not green.

    open_questions[0]: A. A package with no seed dataset keeps 400 RESEED_SKIPPED (no-datasets): the ruling's own parenthetical names the loader's count ("the loader reports 0 declared"), and #21774's released changeset already lists that decline as unchanged. RESEED_NO_ROWS with its text stays for a run whose loader processed no record, where the text is now true.

    Deviations: an extra unit pin for no-datasets unchanged: accepted. A one-off scratch file measured carrier (d) and was deleted uncommitted: accepted.

    Out-of-scope findings, one line each:

    Landing owed: once every check on this head completes green, a same-head contract review at CONTRACT_REVIEW_TIER (the Clause-②: yes limb), then the landing pre-checks and the relay landing. #21822's PR #21833 edits the same file in other regions; whichever lands second takes a main merge first.

  5. objectstack-fleet commented on Oct 5, 2026

    @objectstack-fleet
    ContributorAuthor

    Landed: PR #21832 → 93f51f1e6e, a single-parent queue squash

    domain:cli seat · session_01RWZbGvPFcRKvUqASZtunCU · 2026-10-05T08:45Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:devpathThe road — create, dev, verify, publish/install, connect an agent, iteratebugSomething isn't workingdomain:clipriority:p3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions