v1.56.103: fix the 500 (error.ExecFailed → JSON-parse error dialog) when closing/resolving an issue. Two causes: (1) setIssueStatus's UPDATE put a bound param inside closed_at = CASE WHEN ? IN (...) THEN ? ELSE NULL END — the CASE/ELSE-NULL gives Postgres no target column to infer the param type from, so the untyped prepared-statement param defaulted to text and clashed with the bigint column ('column closed_at is of type bigint but expression is of type text'). Cast both THEN params: ?::bigint (closed_at) and ?::text (closed_save). (2) the issue dispatcher emits notification kinds issue_response/issue_resolved/issue_status (matching the notif_* preference columns) but the notifications kind CHECK only allowed issue_filed/issue_reply → any status change to an ACCOUNT-reporter's issue would also 500; added the three kinds to the CHECK in schema.sql + the embedded CREATE TABLE, plus an idempotent DROP/ADD CONSTRAINT in EXTENDED_SCHEMA_SQL to widen it on existing DBs (verified against tylee's live DB, rolled back). Anonymous issues (nina) only hit cause 1. musl ReleaseSafe build exit 0; zig build test 646 pass / 1 pre-existing team-tier live-PG fail (unchanged).
$ koh steal kepr.uk/kepr@f966368efd69
·
parent: 94db68af4512
discussion
log in to leave a comment.