gitoria

gitoria

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Main branchmainfe209ffeMerge branch 'w56-owner-members' into mainGitoriamain/reports/R52-REPORT.md

3.0 KB

  1. # R52 report: app token "unknown" after a restart (branch r52, worktree ../gitoria-R52, commit b05f6d9; not merged, pushed or deployed)
  2. ## Mechanism: the gate's own token life, not gitoria and not mpackdb
  3. tests/status.mjs ran the server with GITORIA_APP_TOKEN_LIFE_MS=3000 (`const LIFE = 3000`), so tPub expired 3 seconds after it was issued. The gate reached the restart PUT 3.0 to 3.3 seconds after issuing tPub (stop about 1 s, cold start about 2 s), so it was a race against the clock. rowOfToken correctly answered "expired", which gives the 401. tests/status-keyed.mjs had the same race and was already fixed on 2026-11-02 (commit e874e44, LIFE 60000). The 2026-11-02 V37 finding came from that race. status.mjs was never changed the same way.
  4. ## Evidence (instrumented copy of the gate, 4 runs, deleted afterwards)
  5. After the SIGTERM stop and after the restart, sha256(tPub) was always in apptokens.mpack AND in apptokens.hash.txt. The row was stored and its unique index was on disk; nothing was lost or swept before the PUT.
  6. The PUT result followed the clock exactly: 200 at t+2983 ms; 401 at t+3098, 3169 and 3277 ms (LIFE 3000). That is 3 of 4 runs failing, the same rate Gitoria measured.
  7. ## Fix
  8. tests/status.mjs: LIFE = 60000, with a comment, the same shape as status-keyed. No .hl was changed, so no framework repro is needed and there is no DOCS gap. Expiry itself stays covered by tests/app-token.mjs (its own short life).
  9. ## Proof (LC_ALL=C, ports 8720-8739, `ss -ltn` checked free first)
  10. status.mjs 10 of 10 runs passed (61 checks, 0 failed each). status-keyed.mjs 10 of 10 runs passed (13 checks, 0 failed each).
  11. Gates, all 0 failed: check-theme 86 files and 0 problems; create-api 47; signin-return 3; browser 269; security 82; private 158; ident-access 30; apps 95; pull-numbers 48; pull-ssh 20; app-token 42; reviews 98; events 52; pr-page 61; status 61; limits 53; status-keyed 13; member-merge 82.
  12. The browser, signin, security, private and ida gates were moved into my range through GITORIA_GATE_*/…_PORT variables, as V52 did (script: ../gitoria-R52/.scratch/r52/gates.sh).
  13. ## Live impact
  14. None. Live sets no GITORIA_APP_TOKEN_LIFE_MS (not in docker-compose.yml, the Dockerfile or deploy.sh), so a token lives one hour. docker stop sends SIGTERM, the same signal as the gate's p.kill(), and the token row and its hash index survived that stop in every run. A deploy or restart therefore loses no tokens. A token older than one hour expires as the contract says, and the app trades its key for a new one.
  15. ## Risks
  16. Small. The gate no longer tests short expiry around a restart; app-token.mjs tests expiry without a restart.
  17. ## Steps and cleanup
  18. Steps (about 25 requests in all): reading the mission and docs about 5, probe 3, fix and runs 4, gates and commit about 10. I stopped everything I started: the probe, the loops and the gate script all ended on their own, nothing of mine listens on 8720-8739, and no Chrome has its cwd in gitoria-R52. No browser tabs were used, because this mission has no UI change. LOG.md and STATUS.md are untouched.

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