gitoria

ident

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Branchf1b-cleanupedcfce3f|||PR ident#41 ident#43 ident#44 login error page as a component (same status codes and text, pixel-identical), declarations and route wiring cleaned upmref1b-cleanup/STATUS.md

50.9 KB

  1. # STATUS
  2. ## 2026-10-24 — ident#11 profile fields (PF): exchange `fields` + POST /api/profile
  3. Apps ask for nickname, firstname, lastname; empty ones come back null; no `fields` = unchanged answer. Gate checks in tests/apps.mjs (21 new, 14 fail on old main). Report reports/PF-ident-profile-fields.md.
  4. ## 2026-10-22 — ident mission 016: ident#26 "Used in" per identity — gates green, NOT deployed, NOT merged (branch w26-used-in)
  5. Identity page `/identity/<id>` (1 tap from the identities list): apps with since + last use + Notif. chip, empty state. Last use = new `lastLogin` on the connection, written once per login exchange. Gates browser 157, apps 119 (107+12), selector 99, migration 33, iplimit 39, notify 130, delivery 49, check-theme 0; lisbeth E2E 390+1280. Report reports/016-ident-26-used-in.md.
  6. ## 2026-10-19 — ident mission 011: ident#7 delivery (daily mail 17:00 local, urgent at once) — gates green, NOT deployed, NOT merged (branch w11)
  7. lib/delivery.hl (+ -helpers): a round every 60 s; per account local(now, zone) ≥ 17:00 and lastDate ≠ local today → store the date, ONE
  8. mail of the pending daily ones (email still on), mark mailed. Urgent: mailed in apiNotify at once. Zone: browser's at first login (as
  9. before), server now checks isZone; none/unknown = UTC. Test clock IDENT_TEST_CLOCK (gates only). New table `digests`. Gates old→new: browser
  10. 152, apps 107, selector 99, migration 33, iplimit 39, notify 130, hardening 17, signoutall 6, shortid 19, invites 44 (all /0 both);
  11. tests/delivery.mjs 15/34 on old → 49/0. Real-data copy: 12/0, sink only. Report reports/011-daily-mail-urgent.md.
  12. ## 2026-10-03 — ident mission 009: code order (no behaviour change) — NOT deployed, awaiting architect
  13. Commits on main: `9101716` moves (1/4), `d2e7f91` topics + map + thin wrappers (2/4), `fe18351` let (3/4), docs + tests (4/4).
  14. Root `.hl` 10 → 1, project.hl 338 → 132 lines, `let` 453 (290 never reassigned) → 164 (0; `python3 tests/letcount.py .`).
  15. Layout: README "Files" (lib/<topic>.hl + -helpers, lib/util.hl, lib/api.hl = the function routes). Report: `reports/009-code-order.md`.
  16. Tests: all ten gates green after every step (browser 152/0, apps 107/0, selector 99/0, migration 33/0, iplimit 39/0, notify
  17. 130/0, hardening 17/0, signoutall 6/0, shortid 19/0, invites 44/0; `TAG=x .scratch/m009/gates.sh`, ports 8750–8759);
  18. same output on a live-data copy: 291/291 (README "Test" → "Same output"). Deploy: normal `./deploy.sh`; rsync has no
  19. `--delete`, so the old root `.hl` files (api, apps, invites, jsoncheck, mail, notify, selector, store, styles) stay on
  20. Byrodin unused — delete them by hand after the deploy.
  21. ## 2026-10-19 — ident mission 010: re-vendor hybriel 0f396652 — gates green, NOT deployed, NOT merged (branch w10)
  22. bin sha256 60fa02f3…c39080; old vendor (06617221) in `.scratch/old/`. No app code change, no JS. No webex/XSS local patch left to carry (upstream
  23. in hl:web). docker-compose: cache volume + tmpfs; deploy.sh DEPLOY_URL_WAIT. Gates old/new: apps 107/0, selector 99/0, migration 33/0,
  24. iplimit 39/0, notify 130/0, browser 152/0. Cold 16.3 s, warm 0.7 s. Real data (copy of deploy-backups 20261019-0533): 189 byte-identical,
  25. 95 equal after masking (incl. route list), 9 browser modules differ (runtime, web client/worker, 6 component modules: new emitter). Report reports/010-revendor-0f396652.md.
  26. ## 2026-10-03 — antcolony mission 074: re-vendor hybriel master 06617221 (plugin allocators 3a781359 + 413f60e4) — NOT deployed by me
  27. bin sha256 21059cc7…d77bdb; old vendor (190aa11d) in `.scratch/pre-074/`. No app code change. Gates: browser 152/0 (8760–8769);
  28. `node .scratch/w074/runall.mjs` apps 107/0, selector 99/0, migration 33/0, iplimit 39/0, notify 130/0, hardening 17/0,
  29. signoutall 6/0, shortid 19/0, invites 44/0. Real-data copy (deleted), 0mufd5afy0xm signed in, Chrome: 200 loads new 211 → 211 MB,
  30. old 211 → 217 MB (38 ms both); 2500 loads new 211 → 212 MB flat, old 211 → 246 MB. Load time rises 39 → 70 ms over 2500 loads on
  31. BOTH binaries in Chrome; curl over the same pages stays 7–9 ms, so it is the browser tab.
  32. ## 2026-10-02 — antcolony mission 072: re-vendor hybriel master 190aa11d (GC correctness fc838894, #127) — NOT deployed by me
  33. bin sha256 860f5e61…0a23626, plugins = master's (no patch); old vendor (8efba065) in `.scratch/pre-072/`. No app code change
  34. (no lambda semantics change since 8efba065). Gates: browser 152/0; runall (w072, 8720–8727) apps 107/0, selector 99/0,
  35. migration 33/0, iplimit 39/0, notify 130/0, hardening 17/0, signoutall 6/0, shortid 19/0, invites 44/0. Real-data memory
  36. (200 signed-in Chrome loads): RSS 211 → 216 MB (old 282 → 305 MB). Commands: README "Vendored Hybriel".
  37. ## 2026-10-02 — antcolony mission 069: re-vendor hybriel master 8efba065 (#126 memory, #48 lambda copy) — NOT deployed, awaiting architect
  38. bin sha256 ce4c7507…df4eb, plugins = master's (no patch); old vendor (73267707) in `.scratch/pre-069/`. #48 broke the
  39. session writes: 5 lambdas in `store.hl` + 2 in `selector.hl` now take `&session` (README "Vendored Hybriel" → lesson).
  40. Lambda audit: all 231 lambdas (`python3 .scratch/w069/lambdas.py`, `lambdas2.py`); only those 7 write a passed value the
  41. caller relies on (testapp `logIn(data…)` writes a copy but saves it itself — left). Proof: browser gate without the fix
  42. aborted at the code page; one-at-a-time reverts → beginSession aborts (24/1), dropPending 148/4, accountOfSession hardening 16/1.
  43. Gates (Loreana): `IDENT_GATE_PORT=8760 IDENT_GATE_SHORT_PORT=8761 IDENT_GATE_CHROME=8762-8769 node tests/browser.mjs` →
  44. 152/0; `node .scratch/w069/runall.mjs` → apps 107/0, selector 99/0, migration 33/0, iplimit 39/0, notify 130/0,
  45. hardening 17/0, signoutall 6/0, shortid 19/0, invites 44/0. Memory on a live-storage copy (deleted), 200 signed-in Chrome
  46. page loads (/, /apps, /inbox, /start): new RSS 311 → 354 MB, old binary 600 → 1287 MB.
  47. ## 2026-10-01 — antcolony mission 048: re-vendor hybriel master 73267707 (incl. #122 = 4850d798) — NOT deployed, awaiting architect
  48. bin sha256 55b85049…bdf4, plugins = master's (no patch); old vendor in `.scratch/pre-048/`. Fixes the re-vendor needed (README
  49. "Vendored Hybriel" → lessons): `project.hl codePage` → `server.page(m, s, host, headers)` (#105 signature; /code was empty);
  50. Home's pending address comes in as param `pending` from codePage (a session-reading member is re-synced after every face →
  51. the code form vanished after the 5th wrong code); `tests/oldstore-009.hl` explicit ids from 0 (#4: fresh *id tables count
  52. from 1). New "listed ONCE" checks (hybriel#121): identities (browser), apps ×2 (apps), invites (invites) — no list pushes rows.
  53. No #115/#116/#118 workarounds existed; no browser-built SVG. Offline /start stays data-free (19 PWA checks).
  54. Gates (Loreana): `IDENT_GATE_PORT=8750 IDENT_GATE_SHORT_PORT=8751 IDENT_GATE_CHROME=8752-8759 node tests/browser.mjs` →
  55. 152/0; `node .scratch/w048/runall.mjs` → apps 107/0, selector 99/0, migration 33/0, iplimit 39/0, notify 130/0,
  56. hardening 17/0, signoutall 6/0, shortid 19/0, invites 44/0. Live storage copy (deleted): 0 duplicate ids in all 13 tables
  57. (accounts 2, apps 5, connections 8, identities 5, requests 10, sends 6, otp 2, ipsends 1, others 0) and the 8 old ident-* tables.
  58. ## 2026-10-01 — antcolony mission 046: installable app (PWA) + own icons — NOT deployed, awaiting architect
  59. `project.hl`: `appThemeColor = darker.value` (header colour), `appBackgroundColor = dark.value`, `appFavicon`,
  60. `appTouchIcon`, `appIcons` (192/512 any + maskable), `offline = [ Start ]`, `appManifest = { start_url = '/start' }`, routes
  61. `/start`, `/favicon.ico` (real ICO, was `direct ""`), `/icons/*`, `/api/online` (204). New: `icons/` (key in orange; README
  62. "PWA" has the re-render commands), `components/start.hl`. `components/main.hl` + `styles.hl`: header note "Offline — …"
  63. from a CSS-animation-timed probe of `/api/online` (no JS file; README "PWA"); on `/start` an answer → `/`.
  64. NO PERSONAL DATA OFFLINE (architect): `/` is NOT kept (hl:web would cache its document as rendered for the signed-in user +
  65. its state in IndexedDB); only the data-free `/start` is. Offline `/` = hl:web's "Unavailable offline".
  66. Gate: `IDENT_GATE_PORT=8732 IDENT_GATE_SHORT_PORT=8733 IDENT_GATE_CHROME=8734-8739 node tests/browser.mjs` → 151 passed,
  67. 0 failed (132 old + 19 PWA incl. the scan of every cache entry + IndexedDB for the signed-in email/identity). Other gates,
  68. ports remapped into 8732-8739 by temporary copies (`node .scratch/w046-dev/runall.mjs [names]`): apps 105/0, selector 99/0,
  69. migration 33/0, iplimit 39/0, notify 130/0, hardening 17/0, signoutall 6/0, shortid 19/0, invites 43/0.
  70. Icon + screenshots: Loreana `/tmp/w046-ident.worldapi.org/`. Test offline for real: the TAB's CDP offline does not reach
  71. the service worker — cut off its own target too (gate `swOffline`).
  72. ## 2026-09-26 — ticket ident#23: one public short id per identity — NOT deployed, awaiting architect
  73. Every identity has a `shortId` (5 chars, e.g. `a68sz`; digits 2-9 + letters without i/l/o = 31 chars, 28.6M ids), the same
  74. in every app; `/api/exchange` answers it, `/api/notify` takes it (case-insensitive), the identity page shows it. Existing
  75. identities get theirs at first start (`store.hl backfillShortIds`; statics are lazy, so `project.hl` touches it). New
  76. `POST /api/migrate-ids {key, secret, finish?}` → old per-app id → short id; old ids keep working in notify until the app
  77. sends `finish: true`, which drops them. Connections no longer carry an id (`!appIdentity` index gone); invites store short ids
  78. (old entries still counted). README "One public short id", "Migration for the apps". Gates (remapped to 8700-8709 via
  79. `.scratch/rungates.py`): migration 33/0, apps 105/0, selector 98/0 (the one "failure" is the remap renaming a cookie name
  80. in the check itself), notify 130/0, browser 132/0, hardening 17/0, signoutall 6/0, iplimit 39/0, invites 43/0, new
  81. `tests/shortid.mjs` 19/0. Existing gates changed: "another app → another id" now means the SAME id.
  82. Not done: the apps themselves (tickets, gitoria, notes, calendar) still have to call migrate-ids and store short ids.
  83. antcolony Mission 039 (2026-09-26): each app has `tools/migrate-short-ids.hl` + `tests/short-id-switch.mjs`; runbook Loreana
  84. `antcolony-docs/docs/short-id-switch.md`. The pre-ident#23 build those gates start is frozen at `.scratch/pre-023-ident/`
  85. (hl:web, no invites — a copy of gitoria's gate ident). Apps must accept non-hex exchange answers (tickets does not yet).
  86. ## 2026-09-26 — ticket ident#22: invite service — NOT deployed, awaiting architect
  87. Apps invite people by link (README "Invites"): `invites.hl` (new), `project.hl` (4 API routes + `/invite/:token`),
  88. `apps.hl` (invites table, `invite` on a login request, app delete drops invites), `mail.hl` (`sendInvite`),
  89. `components/home.hl` (accept branch in `chooseIdentity`, "You are invited to" banner), `docker-compose.yml`
  90. (`IDENT_PUBLIC_URL`), testapp `/invites` + invite report on `/callback`. Gates: `tests/invites.mjs` 43 passed
  91. (new, real Chrome: new address, same link again, revoked, expired, signed-in one click, two uses, race, mail, app page);
  92. `tests/apps.mjs` 105 passed (ports remapped to 8702-8705). browser/selector/notify not re-run (no shared code changed but
  93. `requestOf` gained a field). Hybriel note: `import { a as b }` is not supported.
  94. ## 2026-09-26 — antcolony mission 036: on hybriel master 837fe120 (hl:web, no local patch) — NOT deployed, awaiting architect
  95. Applied antcolony mission 035's switch (`.scratch/035-wip/`, see its entry below) on master 837fe120 (has #103/#104 fixes
  96. d9aa12e7..0c285350; both 035 repros now pass: `~/scratch-036/repro/`). plugins/webex + both LOCAL PATCHes gone,
  97. `'hl:web'` imports, `sessionCookie = 'identsid'`, HL_HOST read by hl:web, `req.session` in function routes,
  98. `realSession()` → `session == null`, `Intl`, `a.id < b.id`, testapp `encodeURIComponent`. Gates: the 20 forged-session
  99. checks now accept hl:web's own refusal (ack `ok:false`, "the `session` parameter is filled by the server").
  100. Result: browser 132/0, apps 105/0, selector 99/0, migration 23/0, iplimit 39/0, notify 130/0, hardening 17/0,
  101. signoutall 6/0; no Chrome left. Served page: `/__hl/{hl-runtime.js,web/client.js,app.css}?v=e8cc399c151c6b67`,
  102. 0 unhashed refs, hashed = immutable, bare = no-cache; cookie `identsid; HttpOnly; SameSite=Lax` unchanged.
  103. Backup of the old state: `.scratch/pre-036/` (bin, plugins, sources, tests). Session files: same format
  104. (webex → web sessions.hl diff = only Secure/Domain options + skipping non-session files); migration gate 23/0 reads old cookies.
  105. ## 2026-09-25 — antcolony mission 035: re-vendor to hybriel master 13ef4f9b STOPPED (Hybriel bug) — folder restored to pre-035
  106. Converted (hl:webex → hl:web, plugins/webex gone, `sessionCookie`, HL_HOST, `req.session`, realSession() dropped, `Intl`,
  107. `a.id < b.id`, tokens.hl hl:web copy, testapp `encodeURIComponent`); the WIP is in `.scratch/035-wip/` (`changes.diff`).
  108. Gates on it: migration 23/0, iplimit 39/0; browser 55/1, apps 44/1, selector 88/9, notify 127/3. Causes: (1) HYBRIEL BUG —
  109. `if (outer) { … if (inner) { … } <element> }` with outer AND inner turning false in one handler → client `NotFoundError:
  110. insertBefore … not a child` in rebuildBranch (home.hl doSignOut: signedIn/manage/…); the page stops updating. Repro:
  111. loreana `~/scratch-035/repro/` (`home-nested-if.hl`, `node tests/run.mjs <dir>`). (2) the forged-session checks expect an
  112. app `{error}`; hl:web now refuses the extra argument itself (ack `ok:false`, "the `session` parameter is filled by the server")
  113. → the checks must accept that. Kept on purpose: Mailer placeholder host (mail.hl needs a Mailer for deliver()/handlers),
  114. jsoncheck, X-Client-IP, hand sorts, avatar.js guard. Restored bin/plugins/sources = pre-035 (webex e565176b); all six gates
  115. green again (132/105/99/23/39/130). Next: when the bug is fixed, re-apply `.scratch/035-wip/`, fix (2), run all gates.
  116. ## 2026-09-25 — ticket ident#21 (sign out everywhere, live logout + files deleted)
  117. - Already built under ident#19 (see below); re-verified today: `tests/signoutall.mjs` 6 passed, `tests/hardening.mjs` 17 passed. No code change. Needs deploy.
  118. ## 2026-09-25 — the code step is a page: /code (ticket ident#20, mission 008 (old 032)) — awaiting architect (deploy) / creator
  119. - Creator's design ("just make a /code where it checks a pending code"): "Send me a code" → face
  120. `rememberPending` (session `data.pendingEmail`, only while a code for it is waiting) → `/code`
  121. (`/signin/<rid>/code` for an app). `project.hl codePage` renders Home's code form for the pending
  122. address, else 302 back to `/` / `/signin/<rid>`. Cleared on sign-in, "Other address", expiry.
  123. README "What it does" → "The code step is its own page". Changed: `store.hl`, `project.hl`,
  124. `components/home.hl`, tests (browser, apps + login helpers of selector/notify/iplimit/signoutall).
  125. - Gates (all on Loreana, own servers): browser 132, apps 105, selector 99, migration 23, notify 130,
  126. iplimit 39, hardening 17, signoutall 6 — all passed. Screenshots `.scratch/gate-*-code-reloaded.png`,
  127. `.scratch/apps-code-for-app-reloaded-*.png`. Pre-change copies: `.scratch/m032-backup/`.
  128. - NOT deployed. By hand (never on :8351 — real mail): own server e.g.
  129. `IDENT_PORT=8740 IDENT_STORAGE=$PWD/.scratch/m032-smoke/store IDENT_SESSIONS=$PWD/.scratch/m032-smoke/sess IDENT_MAIL_SINK=$PWD/.scratch/m032-smoke/mail.txt SMTP_HOST= ./bin/hybriel project.hl`
  130. → http://127.0.0.1:8740 → send → `/code` → reload → code from `mail.txt` → signed in.
  131. `curl -si localhost:8740/code` without a pending code → `302 Location: /`.
  132. - Lesson: a component route cannot answer a redirect; a function route can resolve the session
  133. (`server.sessions.resolve`) and render a component via `server.page(match, req, s)` with a
  134. hand-made match `{route {component}, kind 'component', params, path}` (extra params reach the
  135. component as construction arguments, e.g. `step`).
  136. ## 2026-09-24 — avatar is an UPLOAD (ticket ident#15, second rework after the creator's rejection) — awaiting architect (deploy) / creator
  137. - The URL field is gone: the identity form has a file chooser; `avatar.js` scales the picture to 128×128
  138. in the browser; the server stores it as a checked data URL (`store.hl checkAvatarUrl`, ≤ 60000 chars).
  139. Old link avatars are hidden and dropped on the next save. README "Avatar".
  140. - Gates (port-remapped copies, 8700-8709): `tests/browser.mjs` 96 passed (upload, refusal of a text file,
  141. scaled 128×128, colours, list, reopen, remove; server negatives), `tests/apps.mjs` 97 passed.
  142. ## 2026-09-24 — sign out everywhere really ends every session (ticket ident#19) — awaiting architect (deploy) / creator
  143. - `store.hl` `signOutEverywhere` now deletes every session of the account (memory + files) through the
  144. hook `project.hl` `dropUserSessions`; the epoch bump stays as a second net. No vendored plugin changed.
  145. - The face `signOutAll` emits `signedOutAll(accountId)` first; `project.hl` `audience` admits connections
  146. whose session user is that account; `components/main.hl` (in every page) reloads → signed out, no click.
  147. - Gates: `tests/hardening.mjs` 17 passed (new: session files gone); new `tests/signoutall.mjs` 6 passed
  148. (device A home + apps pages switch by themselves, caller too, no session file left).
  149. ## 2026-09-24 — design tokens AS DESCRIBED (ticket antcolony#3, antcolony mission 021) — awaiting architect (deploy) / creator
  150. antcolony Mission 018 (generated `':root'` copy + sync.sh) was REJECTED by the creator; antcolony mission 021 replaces it.
  151. Done (worker; developed in `.scratch/dev-m021`, copied back, NOT deployed):
  152. - `shared/tokens.hl` = hand-written webex `var()` tokens (`static dark = var('rgb(25, 30, 35)')`, semantic
  153. `colorText = var(light)` …, incl. `colorAccentText` moved here from the app), verbatim copy of
  154. `/media/STORAGE/projects/WorldAPI/worldapi-tokens/tokens.hl`. `styles.hl` member-imports them and uses them as
  155. members; sets only `colorAccent = var(orange)`. README "Design tokens".
  156. - webex LOCAL PATCH (antcolony mission 021, hybriel#39) in `plugins/webex/WebFramework.hl`; XSS patch kept.
  157. - Old files: `.scratch/m021/pre-copy-backup/` (styles.hl, shared/tokens.hl, WebFramework.hl); antcolony mission 018's
  158. worldapi-tokens folder (sync.sh, tokens.css, generated tokens.hl): `tickets.worldapi.org/.scratch/m021/worldapi-tokens-m018-backup/`.
  159. - Rendered colours unchanged: `/__hl/app.css` after `:root` byte-identical old vs new (in `:root` only
  160. the order of `--color-accent-text` / the app's `--color-accent` changed); Chrome computed colours
  161. of every element + every token, tickets list/inbox/state/ticket/you + ident home/code/account/apps/inbox,
  162. 390 + 1280: 23 passed, 0 failed.
  163. - All 6 gates green (dev copy and main folder), port-remapped copies `.scratch/m021/gate-ident.sh`:
  164. browser 83, apps 97, selector 99, migration 23, notify 130, iplimit 39.
  165. - Deploy simulation (deploy.sh excludes + debian:12-slim container): same app.css, byte-identical.
  166. How to verify (ports 8850-8879 only; scripts in tickets.worldapi.org/.scratch/m021 unless noted):
  167. ```bash
  168. cd /media/STORAGE/projects/WorldAPI/tickets.worldapi.org
  169. for a in tickets ident; do cmp /media/STORAGE/projects/WorldAPI/worldapi-tokens/tokens.hl ../$a.worldapi.org/shared/tokens.hl && echo same $a; done
  170. bash .scratch/m021/cmpup.sh up; node .scratch/m021/cmpstyles.mjs; bash .scratch/m021/cmpup.sh down # 23 passed (old code: <app>/.scratch/m021/old-<app>)
  171. IDENT_GATE_DIR=/media/STORAGE/projects/WorldAPI/ident.worldapi.org bash .scratch/m021/gate-tickets.sh .scratch/m021/g.txt; tail -2 .scratch/m021/g.txt # 402 passed
  172. cd /media/STORAGE/projects/WorldAPI/ident.worldapi.org; bash .scratch/m021/gate-ident.sh . .scratch/m021/gates-main # 6 suites green
  173. bash /media/STORAGE/projects/WorldAPI/tickets.worldapi.org/.scratch/m021/deploysim.sh <tickets dir> <ident dir> # needs cmpup's run/main-*.css
  174. ps -eo pid,args | grep [h]l-browser-tier # empty
  175. ```
  176. Screenshots: `tickets.worldapi.org/.scratch/m021/shots/<app>-<old|new>-<page>-<390|1280>.png`.
  177. Lesson: an imported `static` var() token works only with the antcolony mission 021 webex patch; tokens.hl changes need a restart.
  178. ## 2026-09-24 — shared design tokens (ticket antcolony#3, antcolony mission 018) — REJECTED by the creator, superseded by antcolony mission 021
  179. Done (worker; developed in `.scratch/dev-m018`, copied back, NOT deployed):
  180. - Tokens now come from `shared/tokens.hl` (generated from layouts `tokens.css` by
  181. `/media/STORAGE/projects/WorldAPI/worldapi-tokens/sync.sh`, vendored like plugins/); `styles.hl` inherits it and
  182. sets only the accent (README "Design tokens"). Old copy of `styles.hl`: `.scratch/m018/pre-copy-backup/`.
  183. - Every rendered colour unchanged: `/__hl/app.css` after `:root` byte-identical old vs new; computed
  184. colours of every element (tickets list/inbox/state/ticket/you, ident home/code/account/apps/inbox, 390 +
  185. 1280) old == new in Chrome.
  186. - All 6 gates green (dev copy and main folder): browser 83, apps 97, selector 99, migration 23,
  187. notify 130, iplimit 39 — run as port-remapped copies (`.scratch/m018/gate-ident.sh`, 8850-8879).
  188. How to verify (ports 8850-8879 only):
  189. ```bash
  190. cd /media/STORAGE/projects/WorldAPI/tickets.worldapi.org
  191. /media/STORAGE/projects/WorldAPI/worldapi-tokens/sync.sh --check # ok ×3
  192. bash .scratch/m018/cmpup.sh up; node .scratch/m018/cmpstyles.mjs; bash .scratch/m018/cmpup.sh down # 23 passed (old code in .scratch/m018/old-*)
  193. IDENT_GATE_DIR=/media/STORAGE/projects/WorldAPI/ident.worldapi.org bash .scratch/m018/gate-tickets.sh /tmp/g.txt; tail -2 /tmp/g.txt # 402 passed
  194. cd /media/STORAGE/projects/WorldAPI/ident.worldapi.org; bash .scratch/m018/gate-ident.sh . .scratch/m018/gates-main # 6 suites green (ports remapped copies)
  195. bash /media/STORAGE/projects/WorldAPI/tickets.worldapi.org/.scratch/m018/deploysim.sh <tickets dir> <ident dir> # deploy rsync + container: same app.css
  196. ps -eo pid,args | grep [h]l-browser-tier # empty
  197. ```
  198. Screenshots: `tickets.worldapi.org/.scratch/m018/shots/<app>-<old|new>-<page>-<390|1280>.png`.
  199. Lesson: a `var()` token of hl:webex/css can't cross an `inherit` (second instance) — use literal `':root'` strings.
  200. ## 2026-09-24 — piece 4/6: notifications API + inbox (ticket ident#6, mission 007 (old 013)) — awaiting architect / creator
  201. Done (worker, NOT confirmed by the creator; NOT deployed — the architect deploys with `./deploy.sh`):
  202. - `notify.hl` + routes `POST /api/kinds`, `POST /api/notify` (key + secret + per-app identity id,
  203. strict bodies) and pages `/inbox` (components/inbox.hl), `/inbox/<connection id>`
  204. (components/appsettings.hl, the per-app page); nav link "Inbox". README "How apps send notifications".
  205. - New tables only (`kinds`, `settings`, `notifications`; created empty at start, no migration).
  206. Old tables untouched: upgrade check on a COPY of the stale dev storage → every old table SAME.
  207. - Stored per notification: channels (`push`, `mail` = daily|now|none) + `pushSent`/`mailSent`
  208. = false. Nothing is sent (delivery = ident#7 mail, ident#8 push).
  209. - `api.hl strictBody` knows type `List`; `tools/dump-store.hl` dumps the 3 new tables;
  210. `deploy.sh` runs the new gate too (six gates).
  211. - Developed in `.scratch/dev-m013`; work scripts `.scratch/m013/` (`gates.sh`, `upgrade.sh`, `probe.mjs`).
  212. How to verify:
  213. ```bash
  214. cd /media/STORAGE/projects/WorldAPI/ident.worldapi.org
  215. node tests/notify.mjs # 130 passed, 0 failed (~20 s; ident :8410, site :8413, Chromes 8740-8749)
  216. .scratch/m013/gates.sh $PWD browser apps selector migration iplimit notify # 83/97/99/23/39/130, 0 failed
  217. ps -eo pid,args | grep [h]l-browser-tier # must print nothing (of ours)
  218. bash .scratch/m013/upgrade.sh # old code dump vs new code on a COPY: old tables SAME, 3 new empty
  219. ```
  220. Screenshots: `.scratch/notify-{inbox,inbox-read,appsettings,override}-{390,1280}.png`.
  221. By hand (creator, after deploy): the test app / an app's server sends with curl (README "Try it"),
  222. then https://ident.worldapi.org/inbox → the notification, "Mark read", the app link below →
  223. per-app page → flip switches / "Override all".
  224. Choices made (open questions for the creator, see mission report):
  225. - unregistered name → allowed, stored as an unregistered kind: daily mail, no push, push switch "—".
  226. - override for all = an on/off switch + its own push/email switches; while on it replaces every
  227. kind's setting and locks the per-kind switches; the user's own switches are kept underneath.
  228. - urgent: push if push is on and a device exists (never before piece 6), else mail now if push
  229. or email is on for that kind, else inbox only.
  230. - times in UTC (no zone support in hl:time); text shown as plain text (Markdown not rendered);
  231. icon and link any http(s) URL (not limited to the app's origins); no send rate limit;
  232. inbox shows the newest 200; no delete of notifications/kinds; a deleted app's notifications
  233. stay ("a deleted app").
  234. Lessons:
  235. - Boolean HTML attributes (`checked`, `disabled`) can't be rendered conditionally by hl:webex
  236. (it always writes `name="value"`): use buttons with `role="switch"` + `"aria-checked" = member`
  237. (quoted attribute names work) and separate `if` branches for a locked state.
  238. - A handler inside a `for` row gets the row's key via `value = row.x` / `e.target.value` and looks
  239. the row up in the member list (as apps.hl does); using the loop variable inside the handler was
  240. avoided, not tested.
  241. - `find(null, null)` lists a whole table (connections has no identity index; the per-account list scans).
  242. ## 2026-09-24 — per-IP limit + deploy readiness (mission 006 (old 010)) — awaiting creator / architect
  243. Done (worker, NOT confirmed by the creator; NOT deployed to Byrodin — the architect does the first deploy):
  244. - **Per-IP limit on code mails**: 10 per client IP per 10 min, 30 per 24 h (env `IDENT_IP_*`),
  245. on top of 3 per address per 10 min. IP = `X-Client-IP` header only (nginx sets it); IPv6 per
  246. /64; no header = one shared bucket `direct` (hl:webex exposes no peer address). Table `ipsends`.
  247. - The code request moved from the face `requestCode` (removed — a face sees no headers, it
  248. would bypass the limit) to **`POST /api/code {email}`**; the sign-in form fetches it; refusals
  249. (400/429 `{error}`) show under the form as before.
  250. - **Listener**: hl:webex ignores `HL_HOST` → `project.hl` builds the `NativeWebSocketServer`
  251. itself (`http = …` pinned in the constructor), `HL_HOST=127.0.0.1` binds loopback, unset =
  252. 0.0.0.0 (dev unchanged). `IDENT_WATCH=0` turns the dev watcher off (container).
  253. - `docker-compose.yml` (127.0.0.1:45002) + `deploy.sh` (README "Deploy").
  254. - Gates: the four old ones got `IDENT_IP_LIMIT/IDENT_IP_DAY_LIMIT=1000` on their servers;
  255. `apps.mjs`/`selector.mjs` log in over `POST /api/code` instead of the face; `browser.mjs`
  256. accepts Chrome's "Failed to load resource … 400/429 … /api/code" console line (the refusals).
  257. New `tests/iplimit.mjs` (39 checks). `tools/dump-store.hl` also dumps `ipsends`.
  258. - Developed in `.scratch/dev-m010`; work files in `.scratch/m010/` (local deploy test
  259. `localdeploy.sh`, TLS proxy test `tlsproxy/`).
  260. How to verify:
  261. ```bash
  262. cd /media/STORAGE/projects/WorldAPI/ident.worldapi.org
  263. node tests/iplimit.mjs && node tests/browser.mjs && node tests/apps.mjs && node tests/selector.mjs && node tests/migration.mjs # 39/83/97/99/23, 0 failed
  264. ps -eo pid,args | grep [h]l-browser-tier # must print nothing
  265. bash -n deploy.sh && ./deploy.sh --dry-run --target /tmp/identdeploy-test # gates + rsync -n preview into a LOCAL dir; never run without --target unless you deploy
  266. ```
  267. Deploy test done on Loreana ONLY (never Byrodin): `.scratch/m010/localdeploy.sh ident <src> 45002`
  268. deploys into `.scratch/m010/fake-byrodin/ident.worldapi.org` (fake `storage/` + `.env` markers
  269. survive, md5-checked), runs the container there with docker (only 127.0.0.1:45002 listens, LAN
  270. refused), URL 200. `.scratch/m010/tlsproxy/run.sh`: nginx with TLS in front of the ident and
  271. tickets containers + Chrome (`https.mjs`, 16 checks: wss socket, no http:// URLs, login +
  272. cookie + reload over https, selector CORS for `https://tickets.worldapi.org`, forged
  273. X-Client-IP overwritten by the proxy, watcher off). Containers/proxy removed afterwards.
  274. By hand (creator): http://100.77.141.84:8351 → sign in as before (the form now POSTs /api/code).
  275. For the architect (first deploy): the ident vhost needs `proxy_set_header X-Client-IP $client_ip;`
  276. (and should drop the X-Forwarded-For/CF-Connecting-IP lines, ident ignores them), the WebSocket
  277. Upgrade headers (`/__hl/socket`), and `proxy_pass http://127.0.0.1:45002` (today's
  278. `worldapi.org/ident.conf` points to 44800 and has no Upgrade headers). `.env` on Byrodin: SMTP_*
  279. (no IDENT_PORT — compose sets 45002; the real environment outranks `.env`).
  280. Lessons:
  281. - hl:webex ignores `HL_HOST`/`HOST` (it builds `new NativeWebSocketServer(port = port)`), hl:web
  282. v1 read it. Workaround: pass `http = new NativeWebSocketServer(port, host)` to the constructor.
  283. - A face has no request: anything that needs a header (client IP) must be a function route.
  284. - A non-JSON file in the session directory crashes the server at boot (sessions.hl JSON.parse).
  285. - Chrome logs every 4xx fetch as a console error — gates that check the console must expect them.
  286. ## 2026-09-24 — UUID keys + storage/mpackdb/ (ticket ident #10 / old #39, mission 005 (old 009)) — awaiting creator
  287. Done (worker, NOT confirmed by the creator):
  288. - Every table (accounts, identities, otp, sends, apps, connections, requests, grants) has pk
  289. `@id` (mpackdb UUID, 12 chars) and lives in `storage/mpackdb/<table>.*`; `IDENT_STORAGE` is now
  290. a DIRECTORY. Public ids of accounts/identities/apps = the UUIDs (faces take strings; old numbers
  291. find nothing). Default identity / app list = oldest by stored `created` (`store.hl oldestFirst`).
  292. - Kept byte-identical: `apiKey`, `secretHash`, `appIdentity` (still a 32-hex FIELD, also for new
  293. connections), `rid`, grant hashes. Selector pick ids changed once (derived from the identity id).
  294. - `tools/migrate-009.hl` (idempotent via `oldId`, sessions `"user":{"id":n}` → account UUID),
  295. `tools/dump-store.hl` (JSON of all tables, COPY only). Old tables `storage/ident-*` kept, unread.
  296. - Deployed 12:02: backup `.scratch/storage-backup-20260924-120234/` (storage, .sessions,
  297. testapp/storage); work dir `.scratch/m009/deploy-20260924-120234/` (before/after dumps, runs,
  298. code-before). Migrated from a COPY twice (2nd: 0 new); `cmp009.py` → RESULT SAME (2 accounts,
  299. 2 identities, 4 sends, 1 app, 1 connection); 6 sessions migrated → creator still signed in.
  300. - Rehearsed twice on copies first (`.scratch/m009/rehearse.sh <n>`: migrate ×2, compare, serve
  301. the copy with the new code on :8380 + Chrome: sessions signed in, test app key+secret exchange →
  302. its stored id).
  303. - Developed in `.scratch/dev` (old one moved to `.scratch/dev-m006`); scripts in `.scratch/m009/`.
  304. How to verify:
  305. ```bash
  306. cd /media/STORAGE/projects/WorldAPI/ident.worldapi.org
  307. node tests/browser.mjs && node tests/apps.mjs && node tests/selector.mjs && node tests/migration.mjs # 83/97/99/23, 0 failed
  308. ps -eo pid,args | grep [h]l-browser-tier # must print nothing
  309. rm -rf /tmp/identcopy && cp -a storage/mpackdb /tmp/identcopy && IDENT_STORAGE=/tmp/identcopy ./bin/hybriel tools/dump-store.hl | python3 -m json.tool | less # COPY only (#40)
  310. python3 .scratch/m009/cmp009.py .scratch/m009/deploy-20260924-120234/{before,after}.json # RESULT SAME
  311. ```
  312. By hand (creator): http://100.77.141.84:8351 still signed in (no new login), `/apps` shows the same
  313. API key; http://100.77.141.84:8354 → "Log in with ident" / "choose ident" → the same identity id,
  314. "welcome back" (no re-registering).
  315. Lessons:
  316. - `from` is a reserved word in Hybriel (a parameter/`let` named `from` fails to parse).
  317. - `new MPackDB(..., compact = false)` still rewrites the index/meta files (only `.mpack` stays) —
  318. #40 holds; migrate/dump COPIES only.
  319. - `put()` on an `@id` table keeps an `id` the record already carries — copy rows WITHOUT `id`.
  320. - Deploy scripts: `(cd x && cmd & echo $! > x.pid)` backgrounds the whole `&&` list — `$!` is a
  321. subshell and the pid file lands in the wrong dir; use `cd x; cmd & echo $! > x.pid; cd ..`.
  322. ## 2026-09-24 — piece 3/6: identity selector (ticket #26, mission 004 (old 007)) — awaiting creator
  323. Done (worker, NOT confirmed by the creator):
  324. - `/selector.js` (file `selector.js`): `<ident-selector key="pk_…">`, shadow DOM, ident's
  325. colours; says "choose ident"; opening fetches the identities (credentials); choosing one
  326. → one-time code → event `ident-login` (`detail.code`). `logged-in` attribute / `loggedIn`
  327. property / `reset()` set by the host; no cookie of its own. Restyle: `--ident-*` custom
  328. properties + `::part(button|panel|identity|status|message|link)` (README).
  329. - `selector.hl`: `GET /api/selector/identities?key=`, `POST /api/selector/choose?key=`
  330. (+ OPTIONS preflight). Answers only if `Origin` ∈ the app's origins AND key = that app's
  331. (exact ACAO + credentials, `Vary: Origin`); else 403 without CORS headers. List ids =
  332. sha256(app secretHash:identity)[0..32] (opaque, per app). Code via `apps.hl issueCode`
  333. (shared with the login button: 48 hex, 60 s, single use).
  334. - `testapp/`: selector next to the login button; `/selector-login` (exchange server side),
  335. `/logout`; own session cookie `testapp<port>sid` → `/` renders `logged-in`.
  336. - Ticket #37: `tests/browser.mjs` two obsolete checks replaced (old shapes → 400) → 81/0.
  337. - Gates in the live folder: `selector.mjs` 97/0 (8 s), `apps.mjs` 94/0, `browser.mjs` 81/0.
  338. - Deployed: backup `.scratch/storage-backup-20260924-112012/` (storage, .sessions,
  339. testapp/storage); restarted :8351 and :8354; store checked on a copy
  340. (`.scratch/m007/check-store.hl`): 2 accounts, 2 identities, app `tickets.worldapi.org`,
  341. 0 connections — as before.
  342. NOTE: check-store.hl was also run once directly on that backup by mistake: its accounts/
  343. identities/apps/connections files were rewritten by the open (content = live, diff clean).
  344. - Developed in `.scratch/m007/dev` (copy without `.env`/storage).
  345. Running: ident :8351 (`server.pid`, `server.log`); test app :8354 (`testapp/testapp.pid`,
  346. `testapp/testapp.log`). The test app is NOT set up (its `testapp/storage/` was empty):
  347. register an app in ident with origin `http://100.77.141.84:8354`, paste key + secret.
  348. How to verify:
  349. ```bash
  350. cd /media/STORAGE/projects/WorldAPI/ident.worldapi.org
  351. node tests/selector.mjs && node tests/apps.mjs && node tests/browser.mjs # 97 / 94 / 81, 0 failed
  352. ps -eo pid,args | grep [h]l-browser-tier # must print nothing
  353. curl -s -i 'http://127.0.0.1:8351/api/selector/identities?key=<pk>' -H 'Origin: <registered origin>' # 200 + ACAO
  354. ```
  355. By hand (creator): sign in at http://100.77.141.84:8351, set up the test app, open
  356. http://100.77.141.84:8354 → "choose ident" → pick → "Logged in" without reload → Log out.
  357. Screenshots: `.scratch/selector-{closed,open,loggedin,restyled-open,signedout,unregistered}-{390,1280}.png`.
  358. Open:
  359. - Signed out of ident: the selector links to ident's `/` in a new tab; after signing in
  360. the user opens the selector again (it re-asks on every open). No auto-refresh.
  361. - Same-site only (identsid is `SameSite=Lax`): a foreign-domain app gets
  362. `signedIn:false` (out of scope by the brief).
  363. - A registered page can call the two endpoints itself (no user click needed) — the host is
  364. trusted for its own app; it still only gets its own per-app id via its secret.
  365. - Opening an hl:mpackdb table rewrites its files (mtime, meta) — only check COPIES.
  366. Lessons:
  367. - hl:webex passes OPTIONS to function routes; request header names arrive lowercased.
  368. - A file route (`{ pattern file headers }`) serves JS with the right type and extra headers.
  369. - An hl string has no escapes: inline JS in an hl string uses double quotes only.
  370. - Shadow-DOM elements: tests/cdp.mjs `click()` can't reach them — `tests/selector.mjs
  371. shClick` computes the box inside the shadow root and dispatches real mouse events.
  372. ## 2026-09-24 — piece 2/6: apps and login button (ticket #25, mission 003 (old 006)) — awaiting creator
  373. Done (worker, NOT confirmed by the creator):
  374. - `/apps`: register (name + origins), list, edit, new secret, delete. API key `pk_…` public,
  375. secret `sk_…` shown ONCE (sha256 stored). Faces `appCreate/appUpdate/appNewSecret/appDelete`.
  376. - One id per app: table `connections` (`pair` = app:identity, random 32-hex `appIdentity`,
  377. `created`). Same identity + app → same id; other app / other identity → other id.
  378. - Login button: `GET /login?key=&return=` → error page (400, no redirect) or `/signin/<rid>`
  379. → ident login if needed → "Choose an identity" (face `chooseIdentity`) →
  380. `<return>?ident_code=` (60 s, single use). `POST /api/exchange {key,secret,code}` →
  381. `{identity}` only; 401 bad key/secret, 400 bad code/other app's code/JSON/fields.
  382. - `testapp/` (separate hybriel app) on :8354; `tests/apps.mjs` gate → **94 passed, 0 failed**.
  383. - Deployed to :8351 (storage backup `.scratch/storage-backup-20260924-092054/`); store
  384. checked read-only after restart: the creator's account + its identity still there.
  385. - Developed in `.scratch/dev` (copy without `.env`/storage), then copied over.
  386. Running: ident :8351 (`server.pid`, `server.log`); test app :8354 (`testapp/testapp.pid`,
  387. `testapp/testapp.log`, http://100.77.141.84:8354 — not set up: the creator registers it in
  388. ident with origin `http://100.77.141.84:8354` and pastes key + secret into its form).
  389. How to verify:
  390. ```bash
  391. cd /media/STORAGE/projects/WorldAPI/ident.worldapi.org
  392. node tests/apps.mjs # 94 passed (own servers, sink mail, no :8351)
  393. node tests/browser.mjs # 79 passed + 2 OBSOLETE fails (below)
  394. ps -eo pid,args | grep [h]l-browser-tier # must print nothing
  395. curl -s -o /dev/null -w '%{http_code}\n' 'http://127.0.0.1:8351/login?key=pk_x&return=http://a.b/' # 400
  396. ```
  397. Screenshots: `.scratch/apps-*-{390,1280}.png`.
  398. Open:
  399. - ~~`tests/browser.mjs` two obsolete checks~~ — fixed in mission 004 (old 007) (ticket #37).
  400. - Deleting an identity leaves its connections (ids) in place; the exchange of an already
  401. issued code still works for 60 s. Deleting an app removes its connections.
  402. - Expired `requests`/`grants` rows are removed only when looked up (no sweep).
  403. ## 2026-09-24 — piece 1/6: account and identities (ticket #24, mission 002 (old 005)) — awaiting creator
  404. Done (worker, NOT confirmed by the creator):
  405. - Email OTP login to ident (mission-003 rules kept). No registration: first right code creates
  406. the account + default identity (name `Default`), then the optional-names form (Save / Skip).
  407. - Identities: list / new / edit / delete, all fields optional, last one cannot be deleted,
  408. default = oldest remaining. Time zone from the browser at first login, shown, changeable.
  409. - Removed the mission-003 app flow (`/login`, `/continue`, `/api/exchange`, allow list,
  410. `testclient/` — its PID 161897 on :8354 stopped). Old code: `.scratch/removed-mission003/`.
  411. - Old store (mission-003 test data) moved to `.scratch/storage-backup-20260924-060627/`
  412. (storage + .sessions); started empty.
  413. - Gate `node tests/browser.mjs` → **81 passed, 0 failed**; `node tests/dev-smoke.mjs` → SMOKE OK.
  414. Running: ident :8351 (PID `server.pid`, log `server.log`). Dev store: [email protected]
  415. (from dev-smoke; time zone Europe/Vienna, one identity `Default`).
  416. ## How to verify
  417. ```bash
  418. cd /media/STORAGE/projects/WorldAPI/ident.worldapi.org
  419. node tests/browser.mjs && node tests/dev-smoke.mjs
  420. ps -eo pid,args | grep [h]l-browser-tier # must print nothing
  421. curl -s http://127.0.0.1:8351/api/exchange # {"error":"no such endpoint"}
  422. .scratch/repro-session-forge/run.sh # the hybriel face-session repro (port 8359)
  423. ```
  424. By hand: http://100.77.141.84:8351 → email → `tail -1 storage/mail-sink.txt` → code →
  425. welcome form (Skip or fill) → identities, time zone.
  426. ## Open / next
  427. - Pieces 2–6 (#25–#29): apps + API keys + app secret, per-app ids, login button flow,
  428. selector, notifications. Tickets wiring waits for piece 2.
  429. - Questions to the creator (mission 002 (old 005) report): default identity's name `Default`; blank
  430. identity names shown as nickname / names / `Identity <n>`; default = oldest (no
  431. "make default"); time zone as a free IANA text field.
  432. - A mail bounce is only logged (`mail: FAILED`). No account deletion, no email change.
  433. - Deploy (Byrodin container, nginx, DNS, real SMTP via mail.byrod.in) out of scope.
  434. ## Lessons
  435. - **Code order (mission 009)**: a plain declaration (no `let`) of the same name in two sibling blocks of ONE function is
  436. refused at the second one ("Cannot reassign immutable variable 'c'", lib/notify.hl sendNotification icon/link) — keep
  437. `let` there; also where the name is a member of the file (the faces' `me`: a plain `me = …` would assign the
  438. component's member) and in loop bodies. `tests/letcount.py` counts these as `twice` / `member` / `loop-bound`.
  439. - Moving statics between lib files leaves the browser modules byte-identical; a component's own line shifts only move
  440. the source positions (`home.hl:102:6`). The worker's cache name `hl-shell-<hash>` follows the code hash.
  441. - **A server face is found by its EVENT NAME across every file** (hl:webex `facesOf`): two
  442. components with `on server save()` would BOTH run. apps.hl's faces are named `app…`.
  443. - hl:webex needs at least one COMPONENT route (it reads the app dir off it): the test app
  444. has `/about` only for that.
  445. - Chrome may pre-fill a password field on a later visit: the gate types the test app's secret
  446. with `clear: true` and checks the saved key after the submit.
  447. - Develop in `.scratch/dev` (copy without `.env` and storage) — the :8351 watcher reloads on
  448. every save in the app dir.
  449. - **A face's `session` is POSITIONAL** (the framework appends it to the client's payload):
  450. a hand-made frame with one argument too many puts the CLIENT's object in the session's
  451. place. Every face goes through `store.hl accountOfSession`/`realSession`, which only accepts
  452. `hlTypeName(session) == 'Instance'` (JSON is always `Hybrid`). Repro:
  453. `.scratch/repro-session-forge/` (reported to hybriel).
  454. - A face runs on a BLANK instance: component functions/members are null there (NotCallable);
  455. use only arguments and imports.
  456. - `if (!member)` in a View renders nothing, silently (repro `.scratch/repro-if-not/check.mjs`):
  457. keep a separate member (`notWelcome`).
  458. - `Intl` is not on the JS compiler's browser-global list; `window.Intl` works.
  459. - Chrome canonicalises some zones (`America/Argentina/Buenos_Aires` → `America/Buenos_Aires`);
  460. store what the browser reports.
  461. - A NON-LITERAL static in the manifest reads null in the manifest's own function routes once
  462. a component imports from project.hl (hybriel #16) — keep such values elsewhere.
  463. - Function routes get no session (#18): `server.sessions.resolve(cookieHeader)`.
  464. - `server.sessions.cookie = 'identsid'` after construction renames the cookie (#17).
  465. - `styles = {}` boots but `/__hl/app.css` answers 500 (#19): every app needs a styles.hl.
  466. - hl:smtp refuses a Mailer without a sender at construction (#20) → placeholders in mail.hl.
  467. - `JSON.parse` on bad input aborts the request (#12): a future JSON API must check the body
  468. first (copy tickets' `jsoncheck.hl`).
  469. ## 2026-09-24 — real mail on (architect, creator asked)
  470. - `.env` = copy of hybriel `projects/demo-social-network/.env` (SMTP via mail.byrod.in, user
  471. [email protected], sender [email protected]) + `IDENT_PORT=8351`. The file sink is OFF
  472. for the dev server. Backup of the old `.env` in `.scratch/env-backup-*`.
  473. - Verified: creator logged in with a real code; mail server log shows delivery to [email protected]
  474. (`docker logs mail | grep social.network` on Byrodin).
  475. - **Tests must never send real mail**: the gate starts its own servers with `IDENT_MAIL_SINK`;
  476. do NOT run `tests/dev-smoke.mjs` against :8351 any more (it would mail [email protected]).
  477. - Creator: "looks ok for a first" — worker's default choices (Default name, label fallback, oldest =
  478. default, free IANA time zone field, UTC fallback, 60 chars) accepted as built.
  479. ## 2026-09-24 — dev hostname trap (creator testing #26)
  480. - Selector said "not signed in" because ident was logged in under one host and the test app ran under the other.
  481. The test app loads the selector from IDENT_URL=http://100.77.141.84:8351. Use ONE hostname for both:
  482. http://100.77.141.84:8351 (ident) + http://100.77.141.84:8354 (test app). LAN IP 192.168.178.75 = different site.
  483. ## 2026-09-24 — DEPLOYED (architect)
  484. - LIVE is now https://ident.worldapi.org on Byrodin (/CONTAINERS/projects/ident.worldapi.org). The live data was moved there.
  485. - This Loreana folder is DEVELOPMENT only; its storage/ is a stale copy. Dev servers were stopped. Update live with ./deploy.sh.
  486. ## 2026-09-24 — session hardening (ticket #2, items 3+4): copied into the app
  487. - Rescued antcolony mission 022's work-copy build from `.scratch/dev-m022/` (a prior worker ran out of
  488. steps before reporting) and copied its 4 changed files into the real project root:
  489. `store.hl`, `apps.hl`, `components/home.hl`, `components/appsettings.hl`. Not deployed
  490. (out of scope for this worker; ./deploy.sh is the architect's).
  491. - **Item 3 — the pending session's own expiry**: `store.hl` `beginSession`/`accountOfSession`
  492. stamp `session.user.since` + `session.user.epoch` at sign-in; independent of the webex
  493. session file's own idle/maxAge clock. `IDENT_SESSION_TTL_MS` (default 14 days). An OLDER
  494. session (no `since`/`epoch` — before this ticket, or from the mission-009 migration) is
  495. upgraded on its next use instead of being force-signed-out.
  496. - **Item 4 — sign out for apps / sign out everywhere**: `store.hl` `signOutEverywhere` bumps
  497. the account's `sessionEpoch`, which invalidates every session carrying the old epoch on its
  498. next check (no per-session-file bookkeeping needed) — wired to a "Sign out everywhere"
  499. button on `/` (`components/home.hl`). `apps.hl` `disconnectConnection` forgets one app
  500. connection — wired to a "Sign out of this app" button on the per-app page
  501. (`components/appsettings.hl`); a later login makes a fresh, unrelated per-app id.
  502. - **Bug fixed in the mission-022 test** (`tests/hardening.mjs`, now copied to the real
  503. `tests/`): its `signIn()` helper read the session cookie from `/api/code`'s response, but
  504. that route sets no cookie at all (it's a plain function route, no session) — the real
  505. cookie is minted by the following `/__hl/emit verifyCode` call. Also added a short poll
  506. for the mail-sink code (the sink write can land just after the HTTP response). Not an app
  507. bug — the 3 failing checks were the test's own cookie handling.
  508. - **Lesson: kill your test servers even on a thrown error.** A crashed `tests/hardening.mjs`
  509. run (before this fix) left two orphaned `bin/hybriel` processes bound to :8700/:8701; a
  510. later debug run then hit those STALE servers (old per-address send-limits, wrong session
  511. state) instead of a fresh one, which looked exactly like a cookie bug at first. Always
  512. check `ps -eo pid,args | grep hybriel` for leftovers from a previous crashed run before
  513. trusting a new test failure.
  514. - Verified: `node tests/hardening.mjs` (copied into `tests/`) → **15 passed, 0 failed**.
  515. Full regression re-run against the real project files after the copy — no regressions:
  516. `tests/browser.mjs` 83/83, `tests/apps.mjs` 97/97, `tests/notify.mjs` 130/130,
  517. `tests/selector.mjs` 99/99, `tests/migration.mjs` 23/23.
  518. - Still open from ticket #2: item 2 (real mail — architect already reported done, not
  519. re-verified this session, out of scope) and the session cookie's missing `Secure` flag
  520. (hybriel #27, blocked on a hybriel fix, not app-side). `.scratch/dev-m022` and `.scratch/m022`
  521. (prior worker's scratch) left in place, no longer needed for this ticket.
  522. ## 2026-09-24 — identity avatars (ticket #15), continued and finished
  523. A prior worker (session `s-20260924T1745-d1e933`) had already added the avatar field to
  524. `store.hl`/`components/home.hl`/`styles.hl` but ran out of steps before testing any of it. This
  525. session verified, fixed and tested it.
  526. - **Found a real regression by running the gate, not by reading the code**: `node
  527. tests/browser.mjs` failed 4 checks and then aborted (a later step depended on the failed
  528. save) — editing an identity silently saved nothing.
  529. Traced with throwaway probes (`.scratch/probe15/`, removed after): server-side `checkFields`
  530. and `updateIdentity` were correct in isolation (confirmed with a standalone face call over
  531. HTTP), but in the real browser, typing a SECOND character into any field of the edit form lost
  532. focus — the DOM node was being replaced under the user's cursor.
  533. - **Root cause (hybriel #32)**: the new avatar preview was `if (hasAvatarPreview) { img {...} }`
  534. placed right after the avatar input, in the SAME `View` as the other four text inputs. Removing
  535. just that `if` (nothing else) fixed typing immediately — confirmed with a minimal repro
  536. (type one char, check focus survives) before and after. hl:webex recreates a View's elements on
  537. re-render when it contains a conditional block, even one that never flips during the interaction.
  538. - **Fix**: `img` is now always rendered; visibility toggles via a `hidden` CSS class driven by a
  539. plain reactive field (`avatarPreviewClass = hasAvatarPreview ? 'avatar' : 'avatar hidden'`) —
  540. no `if` in the view. `#avatarpreview.hidden { display: none }` added to `styles.hl`. An `img`
  541. with an empty `src` issues no network request per the HTML spec (confirmed: no console errors).
  542. - Avatar is stored as an http(s) URL (≤ 2000 chars), same shape as a notification's icon
  543. (`notify.hl checkUrl`) — no upload infrastructure exists anywhere in this app, decided as the
  544. smallest fit for the concept's silence on how the picture gets there.
  545. - Extended `tests/browser.mjs` (83 → 92 checks) with: live preview on typing a valid URL, the saved avatar showing as a round
  546. image in the identity list, reopening the edit form re-showing the saved URL, a two-keystroke
  547. focus-survival check (guards the regression above from coming back unnoticed), clearing the
  548. field hiding the preview, and four `checkFields` negatives (no scheme, non-http(s) scheme,
  549. too long, wrong type). Used a `paste()` helper (one `input` event with the whole URL) instead
  550. of the existing char-by-char `type()` for the avatar field — typing a URL character by character
  551. makes the live preview fetch every half-typed prefix (`h`, `ht`, `htt`, …), each a real 404;
  552. a paste (or most real user input) sends the whole value in one event.
  553. - Verified: `node tests/browser.mjs` → **92 passed, 0 failed**. Full regression, unchanged:
  554. `tests/apps.mjs` 97/97, `tests/selector.mjs` 99/99, `tests/notify.mjs` 130/130,
  555. `tests/migration.mjs` 23/23, `tests/hardening.mjs` 15/15.
  556. - Not done: apps still don't receive the avatar (blocked on ticket #11, on hold, unchanged from
  557. the prior worker's decision — correct, left alone). `.scratch/probe15/` (this session's repro
  558. scripts) removed after use — nothing left running, no orphan `bin/hybriel` processes.
  559. ## 2026-10-21 — ident mission 012: onto the layouts theme — WIP, gates + E2E unfinished, NOT deployed (branch w12-theme)
  560. Theme dbe3de7, ContentFirst everywhere, AppHeader+MainMenu+UserMenu+Sidebar (signed in), check-theme 0, deploy.sh gate added. Unproven: shell session/current merge, 7 gates old vs new, 1280 + new E2E walk. Report reports/012-theme.md.
  561. ## 2026-10-21 — ident 012 part 3: theme move proven (gates 7/7, 390 audit, lisbeth E2E) — NOT deployed, NOT pushed (branch w12-theme); open: hybriel#193 stopgap

Branches

Latest commits

  • edcfce3f|||PR ident#41 ident#43 ident#44 login error page as a component (same status codes and text, pixel-identical), declarations and route wiring cleaned upmre
  • 3ac85995ident#43 ident#44: plain declarations for never-reassigned lets, one envString helper, named route functions and audience rule out of project.hlmre
  • c7eef14aMerge branch 'nv1-navigate' into mainIdent
  • 644f9775|||PR ident#36 navigate() instead of window.location in the shell, start shell and homemre
  • 4ca2f921deploy.sh: tar --hard-dereference so backups hold no hard linksmre
  • 23971fb7ident#49: media queries in the language's @media formmre
  • 73f4f97dident: re-vendor to hybriel day38b (mpackdb store-open fix)mre
  • aa056c03ident: a startup error prints its message before exit 1 (hybriel#247)mre
  • ee37a861ident#G48: gitoria's registration gets the wildcard origin of its repo addresses at load (gate tests/gitoria-origin.mjs)mre
  • dc6d486fident#27: the docs gate expects the new Access entry in the main menumre
  • d277633cident#27: README: identity access and the introspect endpointmre
  • e999b0d3ident#27: the Access tab — one key per identity for all its apps: give access in three steps, the overview matrix, a cell's sheet (since, last use, level, rotate, revoke), the app's check POST /api/introspect, agent identities hidden from the login picker, an inbox icon in the header's icon style (gate: tests/access.mjs)mre
  • 436206fcident#47: deploy.sh runs the sign-in gate on the deploy's own port slot, like the sessionwrites and docs gates (the default 8700 can be taken by another process)mre
  • a4887ea3ident#47: the selector's sign-in frame no longer has a Continue button; the identity row itself is the link (gate tests/signin.mjs fails on the old code)mre
  • d8ec703dident#45: /docs shows docs/IDENT.md (hl:markdown, vendored from ac1ed9da), one Docs entry in the main menu, README for developers only, gates tests/docs.mjs and tests/sessionwrites.mjs in deploy.shmre
  • ec6aad35Merge branch 'a28g-amp-callsites' into d45-docsmre
  • 6bfbd3f2ident#45: docs/IDENT.md, what ident is and how it works; CONCEPT.md marks one id per app as droppedmre
  • c0edca26ident#28 A28G: write & at every call that hands a session to an &-parameter; gate tests/sessionwrites.mjs pins that sign-in, pending address, embed sign-in and selector land in the session filesmre
  • 80965c08ident#28: README says the deploy goes through the standbymre
  • 2f41670cident#28: ident-standby service on port 45012 (no background round in the standby) and deploy.sh hands over through standby-swap.shmre