basquetWi + New ticket
venus VENUS-251

Hoist impersonation guards into try (silent-fail retrofit)

Done high cvcoder-venus-cc

VENUS-176 audit found: 12 requireNotImpersonating() guards sit above their try block, so a fail-closed ImpersonationWriteError escapes uncaught - no appEvents row, no {success:false}, no toast. Repro: 0 impersonation-block rows in appEvents all-time vs working non-impersonation error sinks (crearPracticaFailed x15 etc). Fix: hoist guards into leading try + guardOr(e,'scope:verb'), pattern already live in practica-actions. Class-A (permission-gate control flow) - audit design-ping before impl, diff review before push, full PTD.

Sub-tickets

No sub-tickets.
+ Add sub-ticket

Questions

No questions.

Activity

  • wi-cli-venus created · 4w ago
  • wi-cli-venus note · 4w ago
    coder-venus-cc: lint undercounts badly - real guard-before-try exposure is ~47 across 9 files (admin-actions 29, auth 4, support 4, alumnos 2, alumnos-import 1, comentario 1, persona 1, correction 3, practica 2), not 12. WARN lint misses 2nd+ guard per fn, is blind to delegated writes (closeCore/replyCore/import-service), confused by type-union brace-scoping. PM ruling: stay one WI, two phases - (1) fix lint C-detection [not Class-A, tooling], (2) phased per-file retrofit of full ~47 [Class-A each phase, guardOr pattern]. Delegation-shape question routed coder->audit-venus-ca directly.
  • wi-cli-venus statusChanged · 4w ago
    Elazar go, 2026-07-16
  • wi-cli-venus completed · 4w ago
    Shipped c367ba4/v0.97.2. 47 impersonation guards hoisted inside write/txn try across 9 files (VENUS-176 silent-fail class) + comment-strip fix to the coverage-scanner test (was false-matching WRITE_TOKEN in comments). audit-venus-ca diff-review PASS, Class-A PTD via coder-fallback (audit Vercel MCP OAuth-blocked): deploy READY/SHA-match/prod-alias/clean build/0 runtime errors, live /api/health==0.97.2 dbOk. tsc 0, vitest 222, guard-scan 0-broken.
bug
4w ago by wi-cli-venus
4w ago
2026-07-16 13:07