feat(retest-queue): 0.2.0 — date filters, counts, comments, admin-gated delete #37
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/retest-queue-filters"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
New endpoints on the shared
@haskytech/retest-queuePython package:GET /retest-queue?reported_after=...&reported_before=...GET /retest-queue/countsPOST /retest-queue/{bug_id}/commentPOST /retest-queue/{bug_id}/deleteNew optional constructor params on
create_retest_router:admin_api_key— elevated (operator+) HaskyOS API key for deleteadmin_password— shared password the UI must pass to gate deletesBoth fall back to env vars (
HASKOS_ADMIN_API_KEY,RETEST_QUEUE_ADMIN_PASSWORD); the delete endpoint returns 503 if either is missing.Why
Superclean /testing page needs:
Implementation notes
add_commentPATCHes with the current status re-asserted (matches audit pattern from operator workflows, no state transition)POST /{bug_id}/deleterather thanDELETEbecause httpx doesn't support JSON bodies on DELETE cleanlysecrets.compare_digestto avoid timing oracleTests
10 new tests in
packages/retest-queue/tests/test_router.pycovering:Spec Drift Callouts
DELETEmethod, but our package usesPOST /{bug_id}/deleteinstead — httpx doesn't cleanly support JSON bodies on DELETE, and most HTTP clients/intermediaries don't either. The HaskyOS DELETE endpoint is still called normally under the hood viaclient.delete_bug().Depends on
reported_after/reported_before+/countsendpoint) — must be merged and deployed to HaskyOS prod before this package's new endpoints work end-to-end. The package itself can ship first; consumers just won't use the new features until kernel lands.Publish Runbook
After merge to
dev:retest-queue-v0.2.0)haskytech_retest_queue==0.2.0and the new endpoints respond without 404API additions (router): - GET /retest-queue?reported_after=YYYY-MM-DD&reported_before=YYYY-MM-DD — date filter - GET /retest-queue/counts — per-status counts (also honors date filter) - POST /retest-queue/{bug_id}/comment — append note without status change - POST /retest-queue/{bug_id}/delete — admin-password gated delete Constructor params: - admin_api_key: elevated (operator+) HaskyOS API key for delete operations - admin_password: shared password the UI must pass to gate deletes Both fall back to env vars (HASKOS_ADMIN_API_KEY, RETEST_QUEUE_ADMIN_PASSWORD) if not set; the delete endpoint returns 503 if either is missing. Implementation notes: - add_comment re-asserts current status in PATCH (matches audit pattern, no state transition) - delete uses POST /{bug_id}/delete rather than DELETE method because httpx and most HTTP clients don't support JSON bodies on DELETE cleanly - admin password validated with secrets.compare_digest to avoid timing oracle - 10 tests covering: date filter pass-through, counts endpoint, comment path, delete password gate (right/wrong/missing config), HaskyOSError propagation Bumps version 0.1.1 → 0.2.0 — breaking API additions (new endpoints, new optional constructor params, no removals), but new params default to None so existing callers keep working without changes.