gitoria
All repositories: gitoria
1.9 KB
# F1 — broken JSON body on the apps API gives 500 instead of 400 (Sol, cap $2.5)Task line (Apollo 2026-11-10): "Bug fixes from your backlog through PRs."Bug (A3 probe, 2026-11-08): POST /api/pulls/1/merge with body `{"a":}x}` → 500, "lib/api-helpers.hl:33:18: JSON.parse: invalid JSON". docs/apps-api.md §6 promises 400 invalid_json.Cause: lib/api-helpers.hl `jsonOfRequest` calls JSON.parse (the comment above it says there was no safe parse; there is now: JSON.tryParse, SPEC.md "JSON", returns null on invalid JSON; HL-STANDARD L5).Read first: /media/STORAGE/projects/WorldAPI/worldapi-conductor/archive/2026-10-31/WORKER-RULES.md; /media/STORAGE/projects/hybriel/docs/HL-STANDARD.md (L5, L10); /media/STORAGE/projects/hybriel/SPEC.md section "JSON".## Do1. Worktree: `git worktree add -b f1-broken-json ../gitoria-F1 main` from /media/STORAGE/projects/WorldAPI/gitoria.worldapi.org; `cp -a bin ../gitoria-F1/bin` (bin is not in git).2. Fix jsonOfRequest: parse with JSON.tryParse; null (or a non-object result) → the same 400 invalid_json error; drop the outdated DOCS/GAP comment line. Nothing else in the code.3. Add a check for it to the existing apps gate test (the test file that already checks 400 invalid_json / 413; find it with `grep -rln invalid_json tests`): a body `{"a":}x}` on a JSON POST route → 400 invalid_json, and the server still answers the next request.4. Gates in the worktree, LC_ALL=C, ports only 8720–8739 (`ss -ltn` first; set GITORIA_GATE_* variables as in reports/V52-REPORT.md): `node theme/check-theme.mjs .`, the test you changed, and every gate in the GATES list of deploy.sh. All must be 0 failed.5. Commit in the worktree with subject `|||PR apps API: broken JSON body gives 400 invalid_json, not 500`. Do NOT push and do NOT merge — Gitoria pushes and merges.## Reportreports/F1-REPORT.md (≤15 lines): commit sha, diff summary, each gate's pass/fail count. Then stop. Budget ~40 requests.
Branches
- f1-broken-json
- f2-api-bugs
- gp-gate-ports
- heap-revert
- hl25-records
- ident-chooser-selector
- mainmain branch
- p51-public-pr-reads
- records-1112
- s25-no-session-on-login-error
- v59
- w52-person-approval
- w52b-approval-followup
- w52c-header-phone
- w53-pulls-speed-pr
- w54-repo-rename-pr
- w55-rename-org
- w56-owner-members
- w62-pr-close
- w63-force-push
- w64-org-slash
Latest commits
- b5435de8|||PR person approvals: second Kunibert round (#52)mre
- 3a8b2fb8|||PR person approvals: Kunibert review fixes (#52)mre
- 2a89d8d0|||PR person approvals: Approve button for people; merge needs the required checks or a listed person's approval (#52)mre
- 83f0c953Report person approval verificationmre
- 3ae94b86Record browser failures and verify owned tab cleanupmre
- 54eec687Gate person approvals and merge alternativesmre
- 12b08829Add person approvals for pull request headsmre
- 55c84779Merge branch 'gp-gate-ports' into mainGitoria
- 57af42bbREADME: point to deploy.sh for the port listmre
- d63375d2README: gate commands with explicit portsmre
- feeaa701|||PR gates: explicit ports only, deploy.sh passes themmre
- 6cc1f943Merge branch 'records-1112' into mainGitoria
- 9448c438|||PR records: LOG, missions and reports since 11-09mre
- 6dc08a8eMerge branch 'p51-public-pr-reads' into mainGitoria
- 7b88cfe0Type publicReaderOfRequest parameters (L10)Gitoria
- 2a4b3dc1|||PR Anonymous reads of public repos' pulls and statusesmre
- 21b2c141Merge branch 's25-no-session-on-login-error' into mainGitoria
- 698458e2|||PR No session for cookieless login errors: READMEmre
- cce7b785|||PR No session for cookieless login errorsmre
- 678d6303Merge branch 'v59' into mainGitoria