gitoria
All repositories: gitoria
3.0 KB
# R52 report: app token "unknown" after a restart (branch r52, worktree ../gitoria-R52, commit b05f6d9; not merged, pushed or deployed)## Mechanism: the gate's own token life, not gitoria and not mpackdbtests/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.## Evidence (instrumented copy of the gate, 4 runs, deleted afterwards)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.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.## Fixtests/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).## Proof (LC_ALL=C, ports 8720-8739, `ss -ltn` checked free first)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).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.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).## Live impactNone. 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.## RisksSmall. The gate no longer tests short expiry around a restart; app-token.mjs tests expiry without a restart.## Steps and cleanupSteps (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
- 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
- e7c2ff1fdocs: neutral name for the apps-api reviewmre
- 120b7abdlog: step 3 queuedmre
- 358474bflog: P50 livemre
- 477d7bdcMerge branch 'p50'mre
- 00efc06fP50 reportmre
- e3f85afblog: commit mention slipmre
- 4d1a4cf4log: #25 numbersmre
- 1af0a60ddocs: H25 run() correctionmre
- eefa2dbcRepo setting: refuse direct pushes to the main branch (pre-receive over HTTPS and ssh)mre
- 8c8ba2f1log: PR flow announcedmre
- fa00cd35log: Kunibert pings provenmre
- 3a68cfaclog: components decisionmre
- 87de8e31log: Kunibert connected to 9 app reposmre
- c22aff69log: PR-only rollout startedmre
- 25309981log: STOP and paused workers 2026-11-08mre
- 5286803alog: worker briefs and reports of 2026-11-08mre
- 85c86605log: 2026-11-08 Arachne on list shapemre
- cb634512log: 2026-11-08 keyed lists livemre
- 07c98d4aLists: keyed rows with @id, remove(id) and one whole-list assignment instead of hand-rebuilt loopsmre
- 0db0d81elog: 2026-11-08 day52 live, W30 startedmre