Reference in New Issue
Block a user
Delete Branch "fix/revert-1781-templates-runtime-relax"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Reverts the
templates.gochange from PR #1781. PR #1777 (a492d111, landed 2026-05-23 22:24) already addressed the templates_test failures via the opposite-and-correct approach: update fixtures to include valid runtime values, leaving templates.go's strict filter intact.PR #1781 (mine, landed 2026-05-24) wrote a duplicate fix without grepping for parallel in-flight work — it relaxed templates.go to permit empty runtime, intending to preserve
TestTemplatesList_LegacyTopLevelModel's backward-compat surface. But #1777 had already deleted theif resp[0].Runtime != ""assertion that pinned the empty-runtime contract — making #1781's relaxation invisible to tests AND silently reverting the team's intended strictness for real production legacy templates.Why this matters
runtime:field, #1781 surfaces it (potentially provisioning a workspace that can't boot).Revert scope
ONLY
workspace-server/internal/handlers/templates.go— the 9-line guard block added by #1781 is removed.templates_test.gofixtures (updated by #1777) remain unchanged and continue to pass with strict-filter behavior.PR #1782 (the compensating-status runbook from the same session) is NOT reverted — it's an unrelated docs addition with no conflict.
SOP Checklist (RFC #351)
1. Comprehensive testing performed
go test -run '^TestTemplatesList_' -count=1 ./internal/handlers/— green (all #1777-updated fixtures pass with strict filter restored).go vet ./...clean.if _, ok := knownRuntimes[runtime]; !okblock —TestTemplatesList_HermesRuntimeRegistryand siblings fail as expected (proving the filter is still load-bearing after revert).2. Local-postgres E2E run
N/A. Pure handler-logic change with no DDL or DB writes.
3. Staging-smoke verified or pending
Pending. Will verify via
/templatesendpoint on staging post-merge that templates withruntime: claude-code/hermes/ etc. surface, and that any withoutruntime:are filtered.4. Root-cause not symptom
Root cause: I shipped a fix without checking for parallel in-flight work. The bug-of-the-bug is process, not code — the code revert is the surgical fix; the process lesson is in PR body + memory update (will add to
feedback_check_for_parallel_work_before_fixafter this lands).5. Five-Axis review walked
Walked solo. Happy to dispatch a hostile reviewer if anyone wants to challenge the framing.
6. No backwards-compat shim / dead code added
Net deletion: −12 lines, +3 lines. Pure revert of #1781's added code.
7. Memory/saved-feedback consulted
feedback_no_single_source_of_truth— #1777's strict-filter approach IS the SSOT for "what templates should surface"; my #1781 created a divergent path. This revert restores SSOT.feedback_per_agent_gitea_identity_default— this PR also under hongming PAT for CTO-bypass session; followup memory note about always grep'ing for parallel work before opening a fix PR.🤖 Generated with Claude Code
Approving #1786: clean revert of duplicate fix, restores #1777 intended strict-filter behavior. Local tests + vet green. CTO-bypass 2026-05-24.
Approving #1786: clean revert of duplicate fix, restores #1777 intended strict-filter behavior. Local tests + vet green. CTO-bypass 2026-05-24.