CharDesk Docs

Quality and Verification

Evidence and guardrail routes by changed contract.

HEAD a63778e
Changed contractEvidence owner
Domain rule, codec, migration or runtimeNearest deterministic domain test
Shared UI or widget behaviorComponent accessibility, focus and state tests
Browser-visible cross-component flowFocused e2e scenario
Built-application performancescripts/performance/run-perf.mjs
CellPlane phase costsnpm run test:engine-perf, which writes machine-readable and Markdown reports under test-results/cell-plane-benchmark/
Canvas capacity boundarynpm run test:stress, which production-builds the app and writes its local report under test-results/canvas-stress/
Canvas memory lifecyclenpm run test:memory, which measures post-GC retention, interaction peaks, release residuals, DOM/listener residue, history, projection caches, mutation counts, and render work under test-results/canvas-memory/. Set CHARDESK_MEMORY_RUNS, CHARDESK_MEMORY_SAMPLE_MS (minimum 10, default 20), or comma-separated CHARDESK_MEMORY_WORKLOADS for focused runs. Experimental controls are CHARDESK_MEMORY_RENDER_MODE=off, CHARDESK_MEMORY_INPUT_MODE=inert|insert-text, and CHARDESK_MEMORY_ALLOCATIONS=1; allocation sampling is diagnostic-only and must not supply comparison numbers. Compare same-schema reports with identical settings using npm run compare:memory -- <baseline.json> <candidate.json>
Protocol or font packagePackage tests, specifications, fixtures and manifests
Agent Blackboard workflowText protocol plus Blackboard check, Reader, polling and Skill evidence
Architecture boundaryOwning script in scripts/quality or scripts/check-domain-boundaries.mjs
Generated character catalogsscripts/data/generate-character-data.mjs verify mode: manifest checksums and catalog/gzip budgets
Vendored fontsscripts/fonts/vendor-fonts.mjs verify mode: pinned sources, checksums and local-only CSS
Documentation route or Agent outputscripts/docs/verify-build.mjs: page/resource counts, search and LLM routes, retired routes and internal links

The root package.json owns exact commands and verification composition. When a guard rejects a valid architecture change, update the authority and guard together; do not add a local bypass.

LaneScopeOwner
check:quickChanged projects; Cell UI uses risk-scoped testsLocal iteration
check:pr -- --base <ref>Changed projects and their consumersPull requests
check:fullEntire workspace, tests and production buildsmain and release

Root Vitest files run in Node unless their filename ends in .dom.test.ts or .dom.spec.ts. React component tests (.tsx) run in JSDOM. CI exposes one stable Verify status while quality, workspace tests, Node tests, sharded DOM tests and builds run in parallel. Cell UI browser tests have a separate required lane; native macOS input-service tests remain an opt-in desktop check.

Local Cell UI feedback

npm run check:quick -- --file <path> [--file <path>] uses only the supplied files as impact-analysis inputs, independently of other worktree edits. Without --file, branch and worktree changes apply, including deleted files and both sides of a rename. PR/full reject --file.

Append --dry-run to inspect the exact task plan and selection reasons without executing checks. --phase cell-e2e selects just the browser lane. Every executed task reports wall time, including process startup; failure stops later tasks and still reports elapsed time. There is no cross-run result cache.

verification-cell.mjs owns the reviewed leaf helpers, shared-contract suites, and conservative fallback. Gallery CSS/configuration uses explicit routes rather than import-graph inference. Unknown or deleted Cell inputs fall back to whole-module verification; shared contracts use both Chromium and WebKit. A full package selection subsumes leaf tests, and unfiltered browser suites share one launch.

For Cell-only quick runs, type checks, architecture guards and builds are deferred to PR/full; --phase typecheck still requests type checking explicitly. Local quick DOM tests use one process; merge lanes retain sharding. Quick feedback is not a replacement for the merge gate. Other products retain their existing verification policy.

Route boundary, public-contract and cycle failures to scripts/check-domain-boundaries.mjs; canvas state authority to scripts/quality/check-state-ownership.mjs; assertion escapes to scripts/quality/check-type-escapes.mjs; style and import tiers to scripts/quality/check-style-api.mjs; and reachability to knip.json.

Agent navigation

scripts/quality/agent-navigation-cases.mjs owns product questions, expected-owner prefixes and diagnostic anchors. The runner reports Top-3 owner recall against a 90% diagnostic target. A miss routes investigation to source and AST evidence; graph/source disagreement is an index issue.