gitoria

gitoria

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Main branchmainfe209ffeMerge branch 'w56-owner-members' into mainGitoriamain/missions/HL25-live-heap.md

3.3 KB

  1. # HL25 — live hl:heap snapshot for gitoria#25 (memory growth)
  2. Task (Apollo 2026-11-09): "First the #25 hl:heap snapshot on live."
  3. Read first: /media/STORAGE/projects/WorldAPI/worldapi-conductor/archive/2026-10-31/WORKER-RULES.md (fully), /media/STORAGE/projects/hybriel/docs/HL-STANDARD.md, reports/H25-REPORT.md (Method section) and reports/G25c-REPORT.md.
  4. ## Background
  5. Live gitoria (byrodin, container port 45004) grows from ~180 MB RSS after start to ~320 MB in ~10 h. Local replays (H25, G25c) did not reproduce it. H25 showed locally that the GC heap stayed flat while RSS grew. Question: on LIVE, is the growth in the hl GC heap (which types/roots) or outside it (allocator slack)?
  6. ## Steps
  7. 1. Worktree ../gitoria-HL25 from origin/main, branch hl25-heap. Copy the `GET /__heap` route idea from branch h25 (project.hl: `snapshot(&roots, 30)` as JSON, roots seeded via hlShared: hpCache/hpSize/hpOrder, mdCache/mdSize/mdOrder, limitCounts, server.sessions, routes). Make it minimal and safe for live:
  8. - Answers 404 unless the request header `x-heap-key` equals the trimmed content of the file `<storage>/heap-key` (read per request; file missing → always 404). Never log the key.
  9. - The response also includes VmRSS and VmHWM read from /proc/self/status (H25's in-app RSS read returned 0 by a parse bug: fix it) and the time.
  10. - One comment line above it: `// TEMPORARY gitoria#25 diagnostic, removed after the 320 MB snapshot`.
  11. 2. Create the key on byrodin: `openssl rand -hex 24` into /CONTAINERS/projects/gitoria.worldapi.org/storage/heap-key, mode 600, owner as the other storage files. Never print the value anywhere (not in chat, report, or logs).
  12. 3. Gates locally (LC_ALL=C, ports only from 8720–8739, check `ss -ltn` first): `node theme/check-theme.mjs .`, `node tests/browser.mjs`, plus a local proof that /__heap gives 404 without/with a wrong key and JSON with the right key.
  13. 4. Merge into main (fast-forward or merge commit, subject without '#N'), push, then deploy from /media/STORAGE/projects/WorldAPI: `deploy-init.sh gitoria` (log to /media/STORAGE/claude-scratch/gitoria/deploy-hl25.log; grep "rc=0" and "FAILED"; all gates 0 failed). On a FAILED: read why, fix if it is yours, otherwise stop and report. Before deploying check `ss -ltnp` 8720–8786 for leftover worker apps of yours.
  14. 5. Live proof: from byrodin, curl the route through the live container port (127.0.0.1:45004) without key → 404, with key → JSON. Also curl the public URL https://gitoria.worldapi.org/__heap without key → must be 404. Save the first live snapshot (about 10–30 min after start, once RSS is ~180 MB) to /media/STORAGE/claude-scratch/gitoria/heap-live-1.json.
  15. 6. Write the helper script /media/STORAGE/projects/WorldAPI/gitoria.worldapi.org/tools/heap-live.sh <outfile> that does the keyed curl over `ssh byrodin` (key read on byrodin, never echoed) and stores the JSON locally; the conductor uses it later for the ~320 MB snapshot.
  16. 7. Report to reports/HL25-REPORT.md (≤40 lines): what was deployed (commit), the proofs of steps 3 and 5, first snapshot summary (RSS, VmHWM, GC heap total, top 10 types and the roots with sizes), and how to remove the route (revert commit + deploy). Then stop. Do not remove the route yourself.
  17. ## Limits
  18. - Do not touch other apps, the users' repos or data. No other code changes. No hand-written JS.
  19. - Budget: stop and report when done or at ~60 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