Skip to content

Fix detection playbook inaccuracies in daily-code-review agent#129

Merged
torosent merged 2 commits intotorosent/optimize-daily-review-agentfrom
copilot/sub-pr-128
Mar 4, 2026
Merged

Fix detection playbook inaccuracies in daily-code-review agent#129
torosent merged 2 commits intotorosent/optimize-daily-review-agentfrom
copilot/sub-pr-128

Conversation

Copy link
Contributor

Copilot AI commented Mar 4, 2026

Three heuristics in the Detection Playbook appendix were overly broad or conflicted with repo conventions, leading to potential false-positive PR noise.

  • Error cause heuristic: Was flagging every bare throw new Error(msg). Scoped to wrapping/rethrowing only — { cause: err } is only relevant when an original error exists to preserve.
  • structuredClone suggestion: Was presented as a drop-in for JSON.parse(JSON.stringify(obj)). Added explicit scope (JSON-serializable data only) and a note that structuredClone throws on functions/symbols, which the JSON round-trip silently drops.
  • Private field naming: this._secret#secret recommendation conflicted with the repo's documented _underscorePrefixed convention. Moved from "Medium Value" to "Do NOT Flag", referencing .github/copilot-instructions.md.

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

- Reword 'Missing error cause' to only flag when wrapping/rethrowing existing errors
- Scope structuredClone suggestion to JSON-serializable data only
- Remove this._secret → #secret from Medium Value; add to Do NOT Flag

Co-authored-by: torosent <17064840+torosent@users.noreply.github.com>
Copilot AI changed the title [WIP] Optimize daily code review agent with focused detection playbook Fix detection playbook inaccuracies in daily-code-review agent Mar 4, 2026
@torosent torosent marked this pull request as ready for review March 4, 2026 19:39
@torosent torosent merged commit 88de326 into torosent/optimize-daily-review-agent Mar 4, 2026
1 check passed
@torosent torosent deleted the copilot/sub-pr-128 branch March 4, 2026 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants