Kernlift

Validators

Every validate:* script, what it proves, whether validate:all and the release gate run it, and which ones are known to fail.

Run one with pnpm validate:<name>. pnpm validate:all runs the wired chain in order and stops at the first failure. pnpm validate:gate runs every validate:* script except the manual ones and those listed in scripts/validate/known-failures.json, and fails on any regression.

Features

ScriptProves
validate:api-keysKeys hashed, scoped and rate-limited; usage recorded; admin inventory and wiring
validate:authAccount flows: sign-up, verification, reset, sessions
validate:auth-feedbackSign-in errors are translated in both locales and rendered as an alert
validate:auth-boundaryEvery API route guarded or explicitly public with a reason; layout guards; webhook signature verdicts
validate:google-one-tapReal requests to the Better Auth handler: with One Tap on, a forged ID token gets 400 and no session; with it off or Google disabled, /api/auth/one-tap/callback is 404
validate:aiAI tasks, pricing and credits around real outcomes
validate:ai-channelChannel schema, pricing, parsing, webhook signatures and polling, refunds
validate:generation-pipelineChannel parser paths that index arrays, a scene's relative status path and virtual-hosted object addressing
validate:analyticsAnalytics providers, events, report pulls and support tickets
validate:billingCheckout, webhooks, refunds, portal; a missing provider fails instead of faking success
validate:billing-fulfilmentPaid orders, refunds and checkout refusals reach billing.fulfilment plugins once; failures are recorded and retried by the scheduled round
validate:wechat-payWeChat Pay signing, verification, decryption, amount checks, settlement, refunds, routing by currency and the QR checkout page
validate:alipayAlipay RSA2 signing, the cashier address, notification verification with app, seller and amount checks, settlement, duplicate notifications, gateway response verification, routing by currency and the admin form
validate:waffoWaffo request signing, the checkout session (product per plan, tax-included price, order id, promotion codes), webhook verification with replay and tamper refusal, settlement at the charged amount
validate:promotion-codesThe promotion code switch reaches Stripe Checkout only when on, and a signed webhook's discounted total is recorded as the amount paid
validate:pricing-plans/admin/plans writes every locale row, /pricing and checkout read them back, bad input is refused, saves are audited and need plans.write
validate:creditsReserve, capture and refund ledger
validate:signup-creditsSign-up bonus settings round-trip, the grant happens once per user and not at all while off, and the Better Auth user-create hook calls it
validate:cache-policyPer-domain cache policy from admin config
validate:config-encryptionsecret settings are stored as enc:v1: ciphertext and read back as plaintext; a wrong key reads as not configured and is never overwritten by seeding; the encrypt command; secret-holding cache domains stay in memory
validate:emailTemplates, deliveries, notification channels
validate:filesUploads, signed downloads, storage config
validate:foundationSetup readiness, admin overview, system states
validate:pluginsPlugin registry conflicts, installed-list wiring, enablement and dependency cascades, the /admin/plugins surface
validate:session-ownerOwner-scoped reads
validate:systemSystem state pages, event recording, redirects, maintenance mode
validate:usersRBAC, roles, permissions, assignment, status changes

Modules and the agent

ScriptProves
validate:affiliateReferrals, commissions, payout review, program settings
validate:cmsContent entries, revisions, SEO checks, locale-aware admin routes
validate:newsletterNewsletter and waitlist flows and provider sync logs
validate:registryRegistry slices reassemble the checkout; the foundation typechecks alone; manifests describe real files
validate:kernlift-lifecycleThe CLI's module install and removal on real registry items: dry runs, refusals, byte-for-byte restore, kept edits, --purge-data migrations
validate:optional-agentThe web app is complete without the agent service: scheduled jobs run in the web app under one lock, agent entries report unavailability, no web path loads the agent runtime
validate:agent-starterAgent template isolation, transactional database requirement, owner scopes, API guards, credits and readiness
validate:agent-plugin-contractOne workbench composer for every agent plugin; plugin cards, panels and server join points; switched-off plugins are never selected
validate:agent-generationThe agent side of the generation pipeline: raw queries on SQLite, publishing generated media, video artifacts
validate:dsh-runtimeThe agent runtime resolves to the pinned DeepSeek Harness build and nothing outside the runtime package imports it
validate:image-agentThe image agent reaches the host, the workbench and both consoles only through plugin slots and ships as a module

Site and copy

ScriptProves
validate:app-i18nShared, auth, system and marketing copy resolve through the dictionaries
validate:route-i18nLocale-aware routes
validate:marketingMarketing snapshot, pages and blocks
validate:example-landing/ and /pricing are built only from the public shell, page-shell primitives and beUI, and every link reaches a route
validate:beui-consoleConsole, workspace, auth and system routes use the shared beUI system without importing src/components/ui
validate:admin-surface-polishAdmin record lists page and window their rows correctly
validate:mobileResponsive contract
validate:site-metadataSite config, sitemap, robots, .env.example drift
validate:project-docsThe README names only commands and paths that exist; /setup readiness is derived from live configuration
validate:skillsSkills name only commands, paths and routes that exist
validate:project-contextpnpm kernlift context reports what the source contains
validate:store-boundaryNo licences, registry server, storefront catalogue, Kernlift marketing site or documentation site in the template

Engineering and deployment

ScriptProves
validate:env-example.env.example matches what the source reads
validate:unit-testspnpm test passes, and every payment client in src/server/payments/ and the config encryption has a unit test
validate:template-boundaryThe skeleton never imports from the editable zone; the upgrade guide covers the flow
validate:init-cliThe CLI's project initialiser generates the session secret, resumes a partly provisioned project and never deletes a cloud resource
validate:migrationsBoth migration chains replay onto an empty database and end with the same tables
validate:db-adaptersAdapter registry, bindings and server entry
validate:sqlite-transactionsAsync transaction callbacks commit, roll back, queue and nest correctly on the default SQLite adapter
validate:deploy-targetsdeploy.config.json picks the Cloudflare or Node build; the entries, images and migration runner match
validate:openspec-traceability, validate:openspec-consistency, validate:openspec-remaining-scopeOpenSpec records, traceability and remaining scope
validate:externalReal provider checks when credentials exist; EXTERNAL_VALIDATE_STRICT=true fails skipped checks
validate:external-readinessRuns validate:external, then writes the readiness report

pnpm openspec:validate, also chained into validate:all, runs openspec-cn validate for every active change with a tasks.md.

Run separately

ScriptWhy it is not in validate:all
validate:allThe chain itself; the gate does not run it
validate:gateThe release gate itself
validate:storage-driversWrites and deletes real objects in a bucket; run it deliberately against a bucket you chose. The gate skips it too
validate:ai-channel, validate:auth-feedback, validate:externalNot chained into validate:all; the gate still runs them
lint:budgetA budget for pre-existing lint violations that can only go down; --update records a reduction

Store project

These validators belong to the store project that sells Kernlift. A project created from the template does not have them.

ScriptProves
validate:productsServer-side pricing, licences, bundle expansion
validate:module-catalogModule pages, pricing pages and home blocks render from products
validate:github-deliveryMembership and member prices, activation with a GitHub username, repository invitations, the refund rule after activation, revocation
validate:template-marketplaceTemplates render from the real snapshot
validate:landing-blocksHome composition, tokens, counts from the checkout
validate:docsBilingual navigation and links resolve; module manifests, Agent API methods, schema tables and environment variables match the docs
validate:deployment-docsThe deployment docs cover every target

Known failures

scripts/validate/known-failures.json lists validators that do not yet pass on a database built by pnpm db:migrate alone. The list may only shrink. Adding an entry fails CI.

ScriptReason in short
validate:aiExpects AI scenes, channels and pricing rows a fresh database lacks
validate:authAsserts copy that moved into the dictionaries
validate:billingAsserts rows of an archived design record
validate:cmsNeeds seed content and asserts old admin markup
validate:creditsWrites ledger rows for users that do not exist; copy moved
validate:filesExpects seeded folders, files and usage rows; copy moved
validate:newsletterAsserts literals that moved into the dictionaries
validate:openspec-consistencyArchived changes lack newer policy sections
validate:usersNeeds seed users, roles and permissions

Next steps