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
| Script | Proves |
|---|---|
validate:api-keys | Keys hashed, scoped and rate-limited; usage recorded; admin inventory and wiring |
validate:auth | Account flows: sign-up, verification, reset, sessions |
validate:auth-feedback | Sign-in errors are translated in both locales and rendered as an alert |
validate:auth-boundary | Every API route guarded or explicitly public with a reason; layout guards; webhook signature verdicts |
validate:google-one-tap | Real 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:ai | AI tasks, pricing and credits around real outcomes |
validate:ai-channel | Channel schema, pricing, parsing, webhook signatures and polling, refunds |
validate:generation-pipeline | Channel parser paths that index arrays, a scene's relative status path and virtual-hosted object addressing |
validate:analytics | Analytics providers, events, report pulls and support tickets |
validate:billing | Checkout, webhooks, refunds, portal; a missing provider fails instead of faking success |
validate:billing-fulfilment | Paid orders, refunds and checkout refusals reach billing.fulfilment plugins once; failures are recorded and retried by the scheduled round |
validate:wechat-pay | WeChat Pay signing, verification, decryption, amount checks, settlement, refunds, routing by currency and the QR checkout page |
validate:alipay | Alipay 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:waffo | Waffo 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-codes | The 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:credits | Reserve, capture and refund ledger |
validate:signup-credits | Sign-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-policy | Per-domain cache policy from admin config |
validate:config-encryption | secret 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:email | Templates, deliveries, notification channels |
validate:files | Uploads, signed downloads, storage config |
validate:foundation | Setup readiness, admin overview, system states |
validate:plugins | Plugin registry conflicts, installed-list wiring, enablement and dependency cascades, the /admin/plugins surface |
validate:session-owner | Owner-scoped reads |
validate:system | System state pages, event recording, redirects, maintenance mode |
validate:users | RBAC, roles, permissions, assignment, status changes |
Modules and the agent
| Script | Proves |
|---|---|
validate:affiliate | Referrals, commissions, payout review, program settings |
validate:cms | Content entries, revisions, SEO checks, locale-aware admin routes |
validate:newsletter | Newsletter and waitlist flows and provider sync logs |
validate:registry | Registry slices reassemble the checkout; the foundation typechecks alone; manifests describe real files |
validate:kernlift-lifecycle | The CLI's module install and removal on real registry items: dry runs, refusals, byte-for-byte restore, kept edits, --purge-data migrations |
validate:optional-agent | The 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-starter | Agent template isolation, transactional database requirement, owner scopes, API guards, credits and readiness |
validate:agent-plugin-contract | One workbench composer for every agent plugin; plugin cards, panels and server join points; switched-off plugins are never selected |
validate:agent-generation | The agent side of the generation pipeline: raw queries on SQLite, publishing generated media, video artifacts |
validate:dsh-runtime | The agent runtime resolves to the pinned DeepSeek Harness build and nothing outside the runtime package imports it |
validate:image-agent | The image agent reaches the host, the workbench and both consoles only through plugin slots and ships as a module |
Site and copy
| Script | Proves |
|---|---|
validate:app-i18n | Shared, auth, system and marketing copy resolve through the dictionaries |
validate:route-i18n | Locale-aware routes |
validate:marketing | Marketing 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-console | Console, workspace, auth and system routes use the shared beUI system without importing src/components/ui |
validate:admin-surface-polish | Admin record lists page and window their rows correctly |
validate:mobile | Responsive contract |
validate:site-metadata | Site config, sitemap, robots, .env.example drift |
validate:project-docs | The README names only commands and paths that exist; /setup readiness is derived from live configuration |
validate:skills | Skills name only commands, paths and routes that exist |
validate:project-context | pnpm kernlift context reports what the source contains |
validate:store-boundary | No licences, registry server, storefront catalogue, Kernlift marketing site or documentation site in the template |
Engineering and deployment
| Script | Proves |
|---|---|
validate:env-example | .env.example matches what the source reads |
validate:unit-tests | pnpm test passes, and every payment client in src/server/payments/ and the config encryption has a unit test |
validate:template-boundary | The skeleton never imports from the editable zone; the upgrade guide covers the flow |
validate:init-cli | The CLI's project initialiser generates the session secret, resumes a partly provisioned project and never deletes a cloud resource |
validate:migrations | Both migration chains replay onto an empty database and end with the same tables |
validate:db-adapters | Adapter registry, bindings and server entry |
validate:sqlite-transactions | Async transaction callbacks commit, roll back, queue and nest correctly on the default SQLite adapter |
validate:deploy-targets | deploy.config.json picks the Cloudflare or Node build; the entries, images and migration runner match |
validate:openspec-traceability, validate:openspec-consistency, validate:openspec-remaining-scope | OpenSpec records, traceability and remaining scope |
validate:external | Real provider checks when credentials exist; EXTERNAL_VALIDATE_STRICT=true fails skipped checks |
validate:external-readiness | Runs 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
| Script | Why it is not in validate:all |
|---|---|
validate:all | The chain itself; the gate does not run it |
validate:gate | The release gate itself |
validate:storage-drivers | Writes 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:external | Not chained into validate:all; the gate still runs them |
lint:budget | A 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.
| Script | Proves |
|---|---|
validate:products | Server-side pricing, licences, bundle expansion |
validate:module-catalog | Module pages, pricing pages and home blocks render from products |
validate:github-delivery | Membership and member prices, activation with a GitHub username, repository invitations, the refund rule after activation, revocation |
validate:template-marketplace | Templates render from the real snapshot |
validate:landing-blocks | Home composition, tokens, counts from the checkout |
validate:docs | Bilingual navigation and links resolve; module manifests, Agent API methods, schema tables and environment variables match the docs |
validate:deployment-docs | The 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.
| Script | Reason in short |
|---|---|
validate:ai | Expects AI scenes, channels and pricing rows a fresh database lacks |
validate:auth | Asserts copy that moved into the dictionaries |
validate:billing | Asserts rows of an archived design record |
validate:cms | Needs seed content and asserts old admin markup |
validate:credits | Writes ledger rows for users that do not exist; copy moved |
validate:files | Expects seeded folders, files and usage rows; copy moved |
validate:newsletter | Asserts literals that moved into the dictionaries |
validate:openspec-consistency | Archived changes lack newer policy sections |
validate:users | Needs seed users, roles and permissions |