Files
kandev/docs/plans/plugin-backed-canvases/task-01-canvas-release-gate.md
T
2026-09-05 18:44:43 +00:00

2.5 KiB

id, title, status, wave, depends_on, plan, requirements, acceptance_criteria, system_design
id title status wave depends_on plan requirements acceptance_criteria system_design
01-canvas-release-gate Canvas release gate done 1
00-baseline-transition
plan.md
REQ-CANVASES-AGENT-WEB-APPS-001
AC-CANVASES-AGENT-WEB-APPS-001.7
../../specs/canvases/system-design/agent-authored-web-apps.md

Task 01: Canvas release gate

Summary

Add the typed canvas runtime flag before canvas code becomes reachable. Make the backend authoritative and keep all shipped profile defaults off.

In scope

  • Add features.canvases and KANDEV_FEATURES_CANVASES.
  • Add the backend config field, runtime-flag registration, and frontend key.
  • Mark the flag as restart-required.
  • Add fail-closed helpers for HTTP, WebSocket, SSE, MCP, background, boot, and frontend entry points.
  • Add enabled and disabled contract tests.

Out of scope

  • Canvas schemas, routes, tools, services, and user interface implementation.

Acceptance

  • The registry, profiles, backend config, and frontend defaults use one flag identity.
  • All prod, dev, and e2e profile defaults are false.
  • The disabled path exposes no canvas capability or side effect.

Verification

cd apps/backend && go test ./internal/runtimeflags ./internal/common/config ./internal/profiles ./internal/backendapp
cd apps && pnpm --filter @kandev/web test -- lib/state/slices/features/features-contract.test.ts

Files likely touched

  • profiles.yaml
  • apps/backend/internal/common/config/config.go
  • apps/backend/internal/runtimeflags/registry.go
  • apps/backend/internal/runtimeflags/config.go
  • apps/backend/internal/backendapp/**
  • apps/backend/internal/mcp/server/**
  • apps/web/lib/state/slices/features/types.ts
  • frontend route and navigation gates

Dependencies

Task 00 provides a clean branch from origin/main with only the design package.

Risks

  • A frontend-only gate can leave direct backend entry points available.
  • MCP tool registration can expose canvas tools until restart.

Parallelism

sequential

Inputs

  • Implementation baseline and feature-gate design section.
  • Current runtime-flag registry and feature-contract tests.

Results

Completed on 2026-08-27. Added the single features.canvases identity to the backend config and registry, all shipped profile defaults, the frontend defaults, and the startup environment audit. The flag is experimental, high-risk, mutable, and restart-required. Focused runtimeflags, config, profiles, backendapp, and frontend contract tests pass.