Repository navigation
refactor(server): migrate the last tools into vetted pipelines - #460
Conversation
90e9e69 to
a137884
Compare
plusky
left a comment
There was a problem hiding this comment.
APPROVE — migrate the last tools into vetted pipelines (incremental f75fa10..a137884).
OCR delegate preview: 4 files, 2 reviewable (server.rs +7/-335, vetted.rs +397/-22), 2 excluded (tests default_path, DESIGN.md unsupported_ext — reviewed manually). Rust rules applied; no defects found.
Manual + adversarial pass: serve_quicksearch/serve_attachments/serve_attachment_download move verbatim — scan→project→disclosable→scrub→group→serve(Vetted) order, audit note_scan/suppressed accounting, attachment metadata→assess(owning-or-0)→gate→blob→re-check→gate→window order all preserved; server::ok_json deleted with zero remaining callers (all serves via serve/serve_unvetted). Scope-before-metadata in download_attachment is local-only reorder (no requests) and the table row was updated to match. New test quicksearch_limit_zero_still_pays_the_whoami pins the table's W-with-limit==0 claim (whoami expect(1), limit-0 serves []); S==0 stays enforced by the guard early-return. No guard/fetch/scrub/denial-text change; no new secret logging.
Merge blocked until the stack rebases onto #456's landing + CI green.
bugs_quicksearch, list_attachments and download_attachment serve through serve_quicksearch / serve_attachments / serve_attachment_download in server/vetted.rs now; download's two-block result goes through the new private Vetted::blocks constructor. The server.rs ok_json is deleted — the only ok_json left is the one private to vetted.rs, used by the documented escape hatch. Every bug-carrying serve in the binary now passes through serve(Vetted), except the documented bug_history non-array passthrough.
a137884 to
6c8334b
Compare
Split from #453 — PR 7 of 8 (stacked on the step-4 PR).
Addresses #452.
Step 5 of #452: bugs_quicksearch, list_attachments and download_attachment serve through serve_quicksearch / serve_attachments / serve_attachment_download now; download's two-block result goes through the new private Vetted::blocks constructor. The server.rs ok_json is deleted — the only ok_json left is the one private to vetted.rs, used by the documented escape hatch. Every bug-carrying serve in the binary now passes through serve(Vetted), except the documented bug_history non-array passthrough.
Per-commit gate (fmt, clippy, clippy --features gen, rustdoc, rustdoc --features gen, tests, doctests) —
1ea71ec,13ee2cf,9cc59d1,847b0fe,c971a68,f3b406e: 7/7 pass each.