gitoria

gitoria

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit6cc1f9436cc1f943Merge branch 'records-1112' into mainGitoria6cc1f943/missions/F1-broken-json.md

1.9 KB

  1. # F1 — broken JSON body on the apps API gives 500 instead of 400 (Sol, cap $2.5)
  2. Task line (Apollo 2026-11-10): "Bug fixes from your backlog through PRs."
  3. 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.
  4. 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).
  5. 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".
  6. ## Do
  7. 1. 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).
  8. 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.
  9. 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.
  10. 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.
  11. 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.
  12. ## Report
  13. reports/F1-REPORT.md (≤15 lines): commit sha, diff summary, each gate's pass/fail count. Then stop. Budget ~40 requests.

Branches

Latest commits

  • 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
  • 5803cf4f|||PR vendor: Hybriel set-day59 and GC budget 32 MiBmre
  • 9eff6627Merge branch 'f2-api-bugs' into mainGitoria
  • 26117255|||PR apps API: review comments on files with spaces in their namemre
  • b8796cecMerge branch 'f1-broken-json' into mainGitoria
  • 2f2959c5|||PR apps API: broken JSON body gives 400 invalid_json, not 500mre
  • f7c6ca07Merge branch 'ident-chooser-selector' into mainGitoria
  • 691abb8e|||PR tests: find ident identity choice without the removed .choose classmre
  • 16a3530fMerge branch 'heap-revert' into mainGitoria
  • 220a80e0|||PR Remove temporary /__heap route and heap helper; logmre
  • 13f0c342Merge branch 'hl25-records' into mainGitoria
  • a002ecb7|||PR records: HL25 report, heap helper, logmre