tickets
All repositories: gitoria
#3Allow project admins to move tickets between their projects
mergedm32-move → mainby · head 772e0696
- failureKunibert: kunibertKunibert review
Verdicts
- Kunibertrequested changes
People’s approvals
Reviews
Kunibertapprequested changes772e0696 · current head · 2026-11-22 11:58:27 UTC
The correctness review found broken redirected writes, destination resets, and persistence risks. The standards review found F20, F18, L10, and L16 violations.
Correctness (6 new, 0 still open)
Changes are needed for write redirects, destination selection, and move persistence. Subscription notifications and project-history queries also need fixes.
Not on changed lines:
- 🔶 Major · Correctness: no rule: Preserve POST requests through move redirects (
lib/api.hl:540) Both redirect helpers return 301 for POST subpaths. Browser fetch and hl:fetch follow that status by changing POST to GET and dropping its body, so commenting or changing state through an old address ends in 405 without applying the write. Use 308 for writes, or resolve aliases internally while retaining 301 for reads; cover an actual redirected POST in the regression test. - 🔶 Major · Correctness: no rule: Preserve the selected move destination (
components/ticket.hl:794) Every ticket event fetches permissions and calls takeRights(), which resets moveDraft to the first project. If an admin selects gamma and another user comments before submission, the destination silently becomes beta and Move sends the ticket there. Keep the selected destination whenever it remains authorized. - 🔶 Major · Correctness: no rule: Make alias reservation recoverable (
lib/tickets.hl:699) Stopping after this persistent put but before moveToProject() leaves an alias alongside the unchanged source ticket. Every retry then fails the unique !path reservation, permanently preventing the move without manual storage repair. Reuse an existing alias pointing to the same UUID and resume or roll back incomplete moves. - 🔶 Major · Correctness: no rule: Handle target-number collisions without deleting the ticket (
lib/tickets.hl:702) With two writers sharing storage during the documented main/standby overlap, another create or move can claim n after nextNumber(). moveToProject() uses MPackDB.update(), whose implementation deletes the original row before checking the replacement's unique path; a collision therefore loses the ticket. Use collision-safe replacement such as compareAndSet(), retry allocation, and check the result. - 🔹 Minor · Correctness: no rule: Include moves in subscription deltas (
lib/tickets.hl:707) These move rows trigger subscription wakes, but deltaTickets() and ticketLine() in lib/subscriptions-format.hl only handle the previous event kinds. A move-only delta contains changes: {} and no move explanation, then advances its cursor past the event. Project and render the source/destination move information in subscription deltas. - 🔹 Minor · Correctness: no rule: Avoid loading global history for each project page (
lib/events.hl:244) Every project page and project-ticket API list now materializes all events across all projects, including comment bodies and edit snapshots, even when the requested project has no moves. Memory and latency grow with global history. Query an indexed project move journal and paginate its results.
Spec (0 new, 0 still open)
No ticket or issue is linked, so there are no spec findings.
Standards (4 new, 0 still open)
The diff violates the documented framework-gap, list-identity, parameter-typing, and table-ownership rules.
Not on changed lines:
- 🔶 Major · Standards: F20: Wait for supported component redirects (
components/ticket.hl:398) README.md:49 identifies this status-200 notice as a substitute for the missing component-redirect feature (M32/GAP-301.md). .kunibert/HL-STANDARD.md F20 says: "If the framework cannot do it: stop, file a hybriel ticket, wait; a workaround is a finding." Conductor approval does not override this rule; use the supported redirect feature when available. - 🔹 Minor · Standards: F18: Give move-option records stable IDs (
components/ticket.hl:420) moveChoices() produces only value and label, so this View loop iterates records without id. .kunibert/HL-STANDARD.md F18 requires View lists "over records with an id". Include the stable project ID in each choice record. - 🔹 Minor · Standards: L10: Type the changed API-wrapper parameters (
lib/api.hl:282) All changed wrappers from getTicket through postProjectBlockers leave route and req untyped. .kunibert/HL-STANDARD.md L10 says "Type every function parameter" and explicitly requires Hybrid for hl:web route and req parameters. Apply (Hybrid route, Hybrid req) throughout this block. - 🔹 Minor · Standards: L16: Keep ticket-table writes in the ticket module (
tests/move-seed.hl:30) The fixture opens and updates tickets.db directly, duplicating its table declaration. .kunibert/HL-STANDARD.md L16 requires "all writes to its tables in lib/<topic>.hl". Seed the legacy number through a table-owning operation in lib/tickets.hl.
Gates: not run
- 🔶 Major · Correctness: no rule: Preserve POST requests through move redirects (
Threads
No inline comments yet.
Conversation
Nobody has written here yet.
Only the owner and the members of this repository can comment here.