fix: BUG-7, BUG-10, BUG-11, BUG-12 — remaining bug fixes
Some checks failed
Release / Test before release (push) Has been cancelled
Release / Publish to PyPI (push) Has been cancelled
Release / Publish to Docker Hub (push) Has been cancelled
Release / Create GitHub Release (push) Has been cancelled

- BUG-12: ENCRYPTION_KEY validation now exits with sys.exit(1) on invalid key
- BUG-11: WP Advanced health check adds authenticated fallback with auth_valid
- BUG-7: Catch-all GET route serves styled 404 HTML instead of plain text
- BUG-10: Recent Activity fetches extra entries before filtering, fixes None project

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
airano
2026-02-24 05:40:36 +03:30
parent 80377a1a22
commit 983d93c2a7
4 changed files with 62 additions and 23 deletions

View File

@@ -395,8 +395,8 @@ async def get_recent_activity(limit: int = 10) -> list:
audit_logger = get_audit_logger()
# Read recent entries from audit log
entries = audit_logger.get_recent_entries(limit=limit)
# Fetch extra entries because we filter some out
entries = audit_logger.get_recent_entries(limit=limit * 3)
for entry in entries:
# Skip internal/noise events
@@ -404,16 +404,22 @@ async def get_recent_activity(limit: int = 10) -> list:
if evt in ("health_metric_recorded", "health_check"):
continue
project = (entry.get("metadata") or {}).get("project_id") or "-"
activity.append(
{
"timestamp": entry.get("timestamp") or "",
"type": evt or "unknown",
"message": entry.get("message") or "",
"project": (entry.get("metadata") or {}).get("project_id", "-"),
"project": project if project != "None" else "-",
"level": entry.get("level") or "INFO",
}
)
# Stop once we have enough
if len(activity) >= limit:
break
except Exception as e:
logger.warning(f"Error getting recent activity: {e}")