Skip to content

ponytail-audit/review: no pass for over-defensive control flow or broad exception wrappers - #732

Open
Lockyer228 wants to merge 1 commit into
DietrichGebert:mainfrom
Lockyer228:feat/682-audit-defensive
Open

ponytail-audit/review: no pass for over-defensive control flow or broad exception wrappers#732
Lockyer228 wants to merge 1 commit into
DietrichGebert:mainfrom
Lockyer228:feat/682-audit-defensive

Conversation

@Lockyer228

Copy link
Copy Markdown

Why

ponytail-audit and ponytail-review target structural slop you fix by deleting — speculative abstraction, reinvented stdlib, dead flexibility. But a common AI-shaped failure has nothing structurally redundant to cut: over-defensive control flow (deeply nested condition ladders, redundant guards) and blanket try/except / catch wrappers that swallow uncertainty.

What

Add a defensive: tag to both skills' vocabulary (byte-identical in both files, keeping audit's "Same as ponytail-review" true):

  • over-defensive control flow (redundant null checks, dead branches) or a blanket catch/except swallowing every error
  • Replacement: flatten to guard clauses, one handler at the real boundary

Two review examples covering each symptom (redundant null-checking, broad catch (Exception)), plus an audit Hunt entry following the issue's flatten, don't delete principle — explicitly never simplifying away error handling that prevents data loss.

Tests

  • node --test tests/openclaw-skills.test.js → 18/18
  • node scripts/check-rule-copies.js → exit 0
  • npm test → all pass except the pre-existing csv: correct pandas one-liner passes failure (fails identically on base; no pandas installed locally) — unrelated to this change.

Fixes #682

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.

ponytail-audit/review: no pass for over-defensive control flow or broad exception wrappers

1 participant