You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[deep-report] Document panic() contract for 8 embed-guarded lazy-load panic sites in pkg/workflow/pkg/actionpins #54316
The Error Handling Consistency & Panic Safety report (discussion #54241, 2026-08-20) found 8 panic() call sites in pkg/workflow/pkg/actionpins that fire only if lazily-loaded, go:embed-ed JSON/config data fails to unmarshal — a condition that should be build-time-impossible. Verified live: pkg/workflow/model_aliases.go:91,148, pkg/actionpins/data.go:74,90,98, pkg/workflow/agentic_engine.go:557, pkg/workflow/permissions_toolset_data.go:44, pkg/workflow/pi_engine.go:149, pkg/workflow/mcp_setup_gateway.go:133, pkg/workflow/mcp_setup_safe_outputs.go:59. These currently rely only on the panic-in-library-code linter's incidental exemption for init-like patterns rather than an explicit documented contract, so a future refactor could unintentionally introduce a runtime panic path reachable from user input.
Expected Impact
Makes an implicit "should never happen" invariant explicit and linter-consistent, reducing the risk that a future change accidentally routes dynamic (non-embedded) data through one of these panic paths.
Suggested Agent
New Agent — add a one-line doc comment immediately above each panic() call stating it's an intentional, build-time-guarded invariant (matching the pattern in pkg/linters/panic-in-library-code/testdata/.../panicinlibrarycode.go around line 86). Verify each package already has a test that unmarshal-validates its embedded data file; add one if missing so a corrupted embedded file fails go test in CI rather than only surfacing as a runtime panic. Do not change panic behavior itself.
Activity
github-actions commentedon Aug 21, 2026
🍪 Issue Monster selected this for Copilot
I identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.
If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.
Om nom nom! 🍪