Wiki docs accuracy review #110
Notifications
Total Time Spent: 1 hour 30 minutes
fen
1 hour 30 minutes
No due date set.
Dependencies
No dependencies set.
Reference: poslop/palette#110
Reference in New Issue
Block a user
Accuracy review of the wiki against the code (commit
e17ea4f). Verified: routes, request/response shapes, status codes, rate limiting, burn-after-read behavior, sweeper, cookies, README, and all Home links.Inaccuracies found
1. API.md — slug errors return 400, not 409 (most significant)
slug_taken/slug_reserved→ 409 (error-code table), andslug_invalid→ "400/409".handleCreatePastealways responds 400 for create errors (writeErrCode(w, 400, createErrCode(err), ...)). Verified live: duplicate slug →400 {"code":"slug_taken"}; malformed slug →400 {"code":"slug_invalid"}.internal/api/server.go:235(unconditional 400),internal/api/server.go:64-77; confirmed via test probe.2. README.md — build command fails as written
go build -o palette .from the repo root; "Requires Go 1.21+"../cmd/palette(the Dockerfile builds./cmd/palette). go.mod requires Go 1.27.x..gofiles;Dockerfile:12;cmd/palette/main.go.go build -o palette ./cmd/paletteand update the Go version requirement.3. performance-notes.md — wrong client fetch limit
static/table.js" and that the client queries/api/public?limit=500.table.jsusesopts.fetchLimit || 100, and neitherhistory.htmlnormine.htmlsetsfetchLimit, so the client fetches limit=100. The server also clamps listlimitat 100 (parseLimit(r, 25, 100)), so 500 would silently clamp to 100 anyway.internal/web/static/table.js:66;internal/api/server.go:361,382;internal/api/validate.go:68-74.4. performance-notes.md — list-row field list is incomplete
visibilityon both/api/publicand/api/mine.internal/api/server.go:371-376,392-397.visibilityto the field list.5. design-attachments-storage.md — wrong env var name
PALETTE_DB_PATHenv already implies the deployment choice".PALETTE_DB(cmd/palette/main.go:24,docker-compose.yml:22, README table).PALETTE_DB.6. design-e2e-encryption.md — malformed markdown in §5
| malformed JSON / wrong key | | |plus a stray table header), garbling the table; section numbering is also broken (two "§5" sections, then "6.2" with no 6.1).7. design-e2e-encryption.md — references a deleted doc path
../API.md.docs/was deleted from the repo (commite17ea4f"Move docs to Gitea wiki"); the API doc now lives in the wiki atAPI.APIpage.8. README.md — design-doc link lands on the wiki pages index
https://git.archfox.org/poslop/palette/wiki/design/attachments-storage.?action=_pages), not the doc. The actual page iswiki/design-attachments-storage. (Still HTTP 200, so it does not 404 — but the reader does not land on the design doc.)wiki/design-attachments-storage(orwiki/Home).Checked and accurate (not counted)
internal/api/server.go:84-135; create response fields (id,url,raw_url,api_url,expires_at,created_at,deletion_token) matchserver.go:238-247;reads_remainingpresent, null when no budget (server.go:297,internal/store/burn.go).Retry-After+rate_limitedcode (internal/api/ratelimit.go:113-117); unlock limiter returns 60s retry-after; per-IP token buckets match the documented limits.internal/api/burn.go:13-20), per-viewer dedupe viapaste_views(internal/store/burn.go:53-66), raw reads count against the budget (server.go:421-428).cmd/palette/main.go:39), 7-day soft-delete grace (internal/store/store.go:19,406), burn → soft delete once budget exhausted (store/burn.go:84-87).internal/store/store.go:166-172);publicboolean overrides stringvisibility(#83,store.go:223-233).vwr(1y, HttpOnly/Lax,server.go:139-153),pw_<id>= HMAC of paste id under unlock secret, 1h (internal/web/web.go:91-110,242),tok_<id>60s handoff (web.go:270); pw_ cookies never authorize delete (cans.go:149-164,server.go:341-352).QA passed: all 8 fixes verified against code/live server; README fixes merged to dev via PR #111; wiki edits pushed directly.