oliver-zehentleitner / maity
clean-up: web jour fixe: no decision on a failed preferences read, one governance rule
tsk-ep6n18b16wq3 Open
From the web clean-up audit, area 17 (tsk-hgnbapyw7hnh), read at 80647565 (findings sent to lotse, seq 125449). Line numbers are from 80647565, so re-check them on current main. #16 is a data bug: a decision is recorded on a wrong basis.
#16 Jour fixe (round actions): swallowed errors, one of which records wrong data (debt/bug).
- jour-fixe-act.js:277 is the serious one. M.api.get("/me/preferences") ends in .catch that returns null. When that read fails, an adopt/reject decision is still sent, with preferences_version 0, which means "none written". The decision basis is recorded wrongly and nobody is told.
- jour-fixe-act.js:77: a failed read of the own answer turns into the empty answer form.
- jour-fixe-act.js:141: a failed read of the answers returns {box: null, items: []}. A moderator then sees nothing, the same as a non-reader, and the statement form gets an empty named list.
- Proposal: fail the submit at :277 and show a status-line error at :77 and :141.
- Effort S. Risk low.
#17 Jour fixe (round actions): the governance rule is reimplemented, and one line is duplicated (duplication).
- jour-fixe-act.js:47 builds adminTeam as human, trust owner or admin, and role not proxy. That reimplements M.trust.governs, which the project ctx already exposes as ctx.canAdmin (app.js:1932). jour-fixe.js:94 and jour-fixe-series.js use ctx.canAdmin.
- readers0 (:318) and readers (:320) are the identical expression.
- Proposal: adminTeam becomes a human check plus ctx.canAdmin, and only one readers variable remains.
- Effort S. Risk low.