Description
Turn the custom-blueprint paste/upload flow into a reliable preflight for the actual deployment rather than an isolated parse check. Resolve the duplicate form/YAML name ambiguity and prevent stale validation from being presented as current.
Acceptance Criteria
- #1 The form name and YAML name have one documented precedence or are required to match, and the response shows the effective namespaced runtime identity
- #2 Save automatically validates the current YAML or remains disabled until that exact content has passed validation
- #3 Editing YAML invalidates any prior validation result
- #4 Validation checks the prospective loaded/staged set and reports identity or substrate collisions before restart
- #5 The UI either provides a real YAML file chooser or consistently calls the feature Paste YAML while retaining the JSON automation API
- #6 Empty state offers bundled example, paste YAML, and git-source routes plus apply instructions
Definition of Done
- #1 make gate (build vet test race rw-proto-check spdx-check forbidden-words)
- #2 make blueprint-schema (only if a blueprint field or construct/workload config struct changed)
- #3 DRY_RUN=true go run ./cmd/synthkit -once -dump — inventory diffed against signals/
Implementation Plan
-
Write public-interface tests for name precedence, exact-content validation invalidation, prospective-set collision detection, and save behavior; observe each required red before implementation.
-
Extend the existing bpsource/control path and UI without parallel validation logic, then make paste/upload and empty-state flows explicit.
-
Run focused Go/UI/race checks plus an isolated paste-save-restart dry-run proof.
Implementation Notes
Implemented and root-wired a single form-name=YAML-name contract, exact-content validation invalidation, prospective bundled/custom/git set collision preflight before write, and API responses carrying the sanitized namespaced runtime identity. The UI now consistently says Paste YAML and exposes bundled, paste, git, and restart routes. Observed red-green tests covered name mismatch, staged collision, stale UI validation, empty-state routes, and response identity. An isolated paste-validate-stage-restart-resolve dry-run passed, as did focused Go/race/vet, 17 UI tests, UI build, root adapter wiring tests, and docs validation.
Root integration: CodeRabbit reviews 7 and 8 completed; final namespace-separator correction normalizes reserved double-underscore runs and proves EffectiveBlueprintIdentity, StageUpload, ListStaged, and restart Resolve agree. Focused Go/UI/race/vet, full make gate, and both dry-run inventories passed. No schema regeneration was applicable.
Final Summary
Made custom Paste YAML validation authoritative in 265ecd9 (pushed via dab60de): exact form/YAML identity, save-time prospective-set collision checks, stale-result invalidation, effective runtime identity responses, unambiguous namespace serialization, and end-to-end stage/restart proof.