gitoria

gitoria

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Main branchmainfe209ffeMerge branch 'w56-owner-members' into mainGitoriamain/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

  • fe209ffeMerge branch 'w56-owner-members' into mainGitoria
  • fa0754c8|||PR repository owner transfer and members API (#55)mre
  • 8862e537Merge branch 'w55-rename-org' into mainGitoria
  • 014d2b7fOne immutable readers snapshot per move for the left-organization event (#53)mre
  • 1859d506Decide who hears a repo left its organization by its readers before the move (#53)mre
  • 499f25f2Review fixes for the Settings organization move (#53)mre
  • ed3b922b|||PR move a repository into an organization in Settings (#53)mre
  • 74ec2af8Merge branch 'w54-repo-rename-pr' into mainGitoria
  • 9f7ce8d8Preserve rename compatibility and live page titlesmre
  • c3d95b6e|||PR separate names and addresses, rename repositories in Settings (#53)mre
  • ce08920dMerge branch 'w52c-header-phone' into mainGitoria
  • 0bab9e46|||PR header: ident status wraps on phones instead of clippingmre
  • e7af3eceMerge branch 'w52b-approval-followup' into mainGitoria
  • c01e66c6|||PR approvals follow-up: live Merge after status writes, helpers (#52)mre
  • 841da497Merge branch 'w53-pulls-speed-pr' into mainGitoria
  • 80307ae2|||PR pulls page cache: live PR numbers, complete scans onlymre
  • 69141f65|||PR pulls page: cache the git part per repo by branch tipsmre
  • 155861f6Merge branch 'w52-person-approval' into mainGitoria
  • b5435de8|||PR person approvals: second Kunibert round (#52)mre
  • 3a8b2fb8|||PR person approvals: Kunibert review fixes (#52)mre