Quality gate blocked
- Coverage rate is 48%, below 60%
Complete audit-log fields and configuration
hanvault-corechore/audit-logLu Heng · 2026-06-04 10:55Changed files(2)
vault/audit.py+8−2
1-def log(user_id, action):
2- writer.append({"u": user_id, "a": action})
1+def log(user_id, action, ip=None):
A
AI reviewerAIMinor
Defaulting ip to None leaves many audit records without a source. Require the caller to provide it.
2+ writer.append({
3+ "u": user_id,
4+ "a": action,
5+ "ip": ip,
6+ "ts": time.time(),
7+ })
8+ print("audit:", user_id, action)
A
AI reviewerAIMajor
Printing audit data to stdout can persist user identifiers in container logs. Remove or redact PII and emit structured audit records instead.
AI review process
Review the plan
- Develop a review planRoute the application-code changes to Sonnet and the configuration changes to Haiku.
Output
1 warning — T201 print found
Output
Tests: 3 passed — Coverage 48%
Review conclusions
The quality score is 86, but 48% coverage is below the gate. Remove the stdout logging, add tests, and resubmit.
86
B
Quality score
Summary of issues
Critical0
Major1
Minor1
Info0
Lead reviewer modelClaude Sonnet 4.6
Code coverage48%
Review cost¥0.009