hub: one forge-refusal-for-this-reader helper and one probe_unavailable builder (about twelve inline copies in routes)
tsk-dkppa5fzgcec Proposed
Audit round 6 (tsk-hgnbapyw7hnh), read at 046a4d3b. Kind: duplication.
What is wrong
errors.forge_refusal(reason, admin=mine.may("project:admin"), confirmer=forge_access.is_confirmer(caller, project), ...)is assembled inline atroutes/contract_text.py:20-23,routes/keep_the_why.py:111-113,:120-124,:130-132,:266-269,routes/board.py:850-859,routes/probe.py:50-56.ApiError(503, "probe_unavailable", "the forge did not answer", {retry_at})is built inline atroutes/contract_text.py:69and:107,routes/board.py:863,routes/probe.py:77and:101,routes/project_images.py:68;routes/keep_the_why.py:39-46(_spent) is a variant, althougherrors.py:146already builds this error.fg.require_coveredfollowed by theNotCoveredError/ForgeUnavailableErrormapping is the same inroutes/keep_the_why.py:114-128androutes/probe.py:68-77.
Proposal
errors.forge_refusal_for(caller, mine, project, reason, **kw)anderrors.probe_unavailable(retry_at, details); optionally oneforge_access.require_public_cover(...)for the shared mapping.
Effort / risk: S. Low; the refusal bodies stay the same.