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
The panicinlibrarycode analyzer (pkg/linters/panic-in-library-code/panic-in-library-code.go) only recognizes the classic sync.Once.Do(func(){...}) pattern via its isInSyncOnceDoFuncLit exemption check. It does not recognize the Go 1.21+ sync.OnceValue/sync.OnceFunc idioms, which the repo already uses in three places (pkg/workflow/engine_definition_loader.go:41, pkg/workflow/permissions_toolset_data.go:39, pkg/console/console.go:25). Two of these contain panics that currently pass linting only incidentally because their messages start with BUG: — not because the exemption logic actually recognizes the pattern. Any future sync.OnceValue initializer that panics without a BUG: prefix will silently bypass the linter despite being architecturally identical to the already-exempted case.
Expected Impact
Closes a real correctness gap in a security/quality-enforcing linter before it causes an undetected panic-in-library-code violation to ship. Prevents relying on incidental message-string matching for exemption behavior.
Suggested Agent
repository-quality-improver (already surfaced this in its 2026-07-29 report) or a general code-quality agent.
Estimated Effort
Quick (< 1 hour)
Data Source
DeepReport analysis 2026-07-29, based on discussion #48896 ("Repository Quality Improvement Report - Panic-in-Library-Code Governance Gaps").
Generated by 🔬 Deep Report · age00 · 140.4 AIC · ⌖ 7.9 AIC · ⊞ 10.8K · ◷
Activity
github-actions commentedon Jul 29, 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! 🍪