Extract admin webhook helpers#343
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughWebhook event administration logic (filtering, listing, aggregating) is extracted from ChangesWebhook Admin Utilities Extraction
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
TateLyman
left a comment
There was a problem hiding this comment.
Reviewed the admin webhook helper extraction for Bounty #320.
What I checked:
app/admin.py: status normalization, admin webhook event query/filter/order, safe event serialization, and status summary scan ordering.app/main.py: admin API and admin page routes now delegate to the helper module while preserving the same session boundary, admin-token/cookie auth boundaries, limit handling, and template data shape.tests/test_admin_helpers.py: focused coverage for trimming/lowercasing filters, case-insensitive filtering, newest-first event ordering, safe serialized fields, and status-summary ordering.tests/test_security.py: existing admin page/API behavior still exercises the routed surface with realWebhookEventrows.
Validation run locally:
uv run --extra dev python -m pytest tests/test_admin_helpers.py tests/test_security.py -q-> 56 passed.uv run --extra dev python -m pytest -q-> 329 passed.uv run --extra dev ruff check app/admin.py app/main.py tests/test_admin_helpers.py-> passed.uv run --extra dev ruff format --check app/admin.py app/main.py tests/test_admin_helpers.py-> passed.uv run --extra dev python -m mypy app/admin.py app/main.py-> passed.uv run --extra dev python scripts/docs_smoke.py-> docs smoke ok.git diff --check origin/main...HEAD-> clean.
Hosted quality check is green and GitHub reports mergeState CLEAN. No blockers from my pass.
Summary
Evidence
Test Evidence
ruff format --check .ruff check .mypy apppytestpython scripts/docs_smoke.py(docs, template, example, or onboarding changes)Validation run after rebasing on current upstream main:
uv run --extra dev ruff format --check .-> 48 files already formatted.uv run --extra dev ruff check .-> All checks passed.uv run --extra dev python -m mypy app-> Success: no issues found in 14 source files.uv run --extra dev python -m pytest -q-> 329 passed.uv run --extra dev python scripts/docs_smoke.py-> docs smoke ok.git diff --check upstream/main...HEAD-> clean.MRWK
Related bounty or issue (
Bounty #NorRefs #Nfor multi-award bounties): Bounty #320No secrets, wallet private keys, payout credentials, private vulnerability details, deployment values, or MRWK price claims are included.
Summary by CodeRabbit
Refactor
Tests