{"record":{"id":"d2bf756c52d555a8","repo":"paperclipai/paperclip","slug":"seed-implementation-returned-without-required-vali","errorCode":null,"errorMessage":"Seed implementation returned without required validation evidence.","messagePattern":"Seed implementation returned without required validation evidence\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/src/commands/worktree.ts","lineNumber":2185,"sourceCode":"      seedMode: input.seedMode,\n      preserveLiveWork: input.preserveLiveWork,\n      expectedCompanyId: input.expectedCompanyId,\n      onPhase: (phase, status, message) => {\n        activePhase = phase;\n        updateWorktreeSeedManifest({\n          configPath: input.configPath,\n          phase,\n          status,\n          state: \"running\",\n          message,\n          ...(phase === \"snapshot\" && status === \"started\"\n            ? { snapshotAt: new Date().toISOString() }\n            : {}),\n        });\n      },\n    });\n    if (!details.snapshotAt || !details.migrationRevision || !details.validation) {\n      throw new Error(\"Seed implementation returned without required validation evidence.\");\n    }\n    updateWorktreeSeedManifest({\n      configPath: input.configPath,\n      phase: \"complete\",\n      status: \"succeeded\",\n      state: \"verified\",\n      snapshotAt: details.snapshotAt,\n      migrationRevision: details.migrationRevision,\n      message:\n        `Verified ${details.validation.companyCount} company record(s), `\n        + `${details.validation.issueCount} issue record(s), auth, admin, membership, and migration state.`,\n    });\n    return details;\n  } catch (error) {\n    updateWorktreeSeedManifest({\n      configPath: input.configPath,\n      phase: activePhase,\n      status: \"failed\",","sourceCodeStart":2167,"sourceCodeEnd":2203,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/cli/src/commands/worktree.ts#L2167-L2203","documentation":"After the seed implementation callback completes, the runner requires three pieces of evidence on the returned details: snapshotAt, migrationRevision, and validation. If any is missing, the seed cannot be marked verified, so the attempt fails with this invariant error. This is an internal contract between runWorktreeSeedAttempt and the seed implementation — a stock healthy run always populates all three.","triggerScenarios":"The seed implementation returned early or via a code path that skipped the snapshot, the migration-revision resolution, or the database validation — an interrupted/aborted seed callback that still resolved, a bug in a customized seed implementation, or a future code path that omits validation evidence.","commonSituations":"Hacking a custom or partial seed pipeline that skips validation; a code regression where a branch returns before evidence is collected; resources exhausted mid-run causing a soft early return.","solutions":["Re-run the seed (worktree ensure-seeded / reseed) — a transient interruption is the most common cause","If it reproduces, collect the manifest diagnostics and report it as a Paperclip bug; do not paper over a seed marked verified without evidence","If you run a customized seed implementation, make sure it returns snapshotAt, migrationRevision, and the validation summary"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await runWorktreeSeedAttempt(...);\n} catch (error) {\n  console.error(formatWorktreeSeedFailureDiagnostic(error)); // includes phase diagnostics\n  throw error;\n}","preventionTips":["Re-run the seed once before investigating; transient early returns are the common cause","If you customize the seed implementation, enforce the return contract (snapshotAt + migrationRevision + validation) with tests"],"tags":["worktree","seed","internal-invariant","validation"],"backgroundTag":"internal-invariant-violation","analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-08-21T17:58:32.592Z","contentChangedAt":"2026-08-21T17:58:32.592Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}