gitoria

ident

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit021dd0fc021dd0fcident mission 012: browser gate waits cold start (IDENT_COLD_MS), header selectors, e2e checks; shell events from a page do not reach it (probe), current not marked, account-bar link 44 pxmre021dd0fc/missions/001-ident-mvp.md

3.9 KB

  1. # Mission 001 (old 003) — ident.worldapi.org MVP in Hybriel (ticket #2)
  2. One-shot worker. Architect (Claude Code on Byrodin) verifies your report.
  3. Read first: `/CONTAINERS/projects/antcolony/README.md`, `STATUS.md`, `loreana:/media/STORAGE/projects/tickets.worldapi.org/missions/001-tickets-mvp.md`
  4. and its result: the tickets app `loreana:/media/STORAGE/projects/tickets.worldapi.org`
  5. (README, STATUS, project.hl, store.hl, tests/) — same stack, same conventions, copy its setup.
  6. ## Where
  7. - Host Loreana (`ssh loreana`, fish login shell → `bash -c '…'` or script files).
  8. - New app folder: `/media/STORAGE/projects/ident.worldapi.org`. Vendor `bin/hybriel` + plugins
  9. exactly like the tickets app does (same binary, sha256 c51d163d…).
  10. - Hybriel repo `/media/STORAGE/projects/hybriel` READ ONLY. Reference for login:
  11. `projects/demo-social-network` (mail.hl, login_form.hl, signup_form.hl, store.hl, tests/).
  12. - Dev port **8351**, bind 0.0.0.0. Gate ports: pick your own range, not 8352 and not the social
  13. gate's 8600-8619 (another worker runs the tickets gate at the same time).
  14. ## What ident is
  15. Login for all worldapi apps (tickets, gitoria, …). Email one-time codes only, no passwords.
  16. Accent orange `--color-accent: #ce9178` (tokens: `/CONTAINERS/projects/layouts.worldapi.org/css/foundation/tokens.css`
  17. on Byrodin, read only; markup rules in `docs/conventions.md` there).
  18. ## Scope
  19. 1. Users: email (unique, lowercased), display name, created. Sign up = first login with a new email
  20. (ask for a name once). Codes: 6 digits, expire after 10 min, single use, max 5 attempts, rate
  21. limit sends per email.
  22. 2. Pages: `/` (signed out: login form; signed in: "signed in as …", sign out), code entry,
  23. name prompt for new users.
  24. 3. **Login for other apps — architect decision, redirect + code exchange (OAuth-code style,
  25. works across domains and dev ports):**
  26. - App sends browser to `ident/login?return=<url>&app=<name>`.
  27. - After successful OTP, ident redirects to `<return>?ident_code=<one-time code>` (code valid 60 s,
  28. single use). Only return URLs whose origin is on an allow list (config, for now: the tickets dev
  29. origins `http://100.77.141.84:8350`, `http://192.168.178.75:8350`, `http://127.0.0.1:8350`, plus
  30. whatever your test client uses). Unknown origin → error page, no redirect.
  31. - App's server calls `POST ident/api/exchange {code}` → `{ user: { id, email, name } }` or 400.
  32. - ident keeps its own session cookie so a second app login does not need a new OTP.
  33. - Write this down as a short spec in the app README ("How apps use ident").
  34. 4. Mail: do NOT send real mail in this mission. Use a file sink like the social app
  35. (`HL_SOCIAL_MAIL_SINK` pattern) configured via `.env`; tests read the code from the sink.
  36. Leave the hl:smtp path wired and configurable (SMTP_* env) for mail.byrod.in later.
  37. 5. A minimal test client (a tiny second hybriel app or a route in the gate) that proves the whole
  38. redirect → OTP → return → exchange flow end to end.
  39. Out of scope: wiring tickets to ident (next mission), deploy, Docker.
  40. ## Rules
  41. - No git. Don't touch other project folders (read the tickets app only). Only kill your own PIDs.
  42. Clean up every headless Chrome (`--disable-gpu`, GPU is wedged). Scratch in `.scratch/`.
  43. - A test is the whole process: real headless browser drives login, observe the result;
  44. plus API negative cases (expired/reused code, wrong code 5x, bad return origin, reused exchange code).
  45. - Strict API from day one: unknown/missing fields → 400 naming the field.
  46. - Hybriel bugs: don't fix in the repo; report with repro.
  47. - Leave the dev server RUNNING on 8351 (setsid/nohup, `server.pid`, `server.log`).
  48. - Deliver `README.md`, `STATUS.md`, `tests/browser.mjs`.
  49. ## Report (final answer, this structure)
  50. ```
  51. ## Done
  52. ## Verified (each: command run + observed output)
  53. ## Not verified / open
  54. ## Hybriel issues (repro, observed, expected)
  55. ## Questions for the creator
  56. ## Running (URL, PID, log path)
  57. ```

Branches

Latest commits

  • 021dd0fcident mission 012: browser gate waits cold start (IDENT_COLD_MS), header selectors, e2e checks; shell events from a page do not reach it (probe), current not marked, account-bar link 44 pxmre
  • 97f77b07ident mission 012 (WIP): onto the layouts theme dbe3de7, shell on AppHeader/MainMenu/UserMenu/Sidebar + ContentFirst, styles cut, check-theme gatemre
  • 8e4f435bpaths: projects moved into /media/STORAGE/projects/WorldAPI/mre
  • fa288f63ident mission 011: report wording (Intl zone names)mre
  • 961fae01ident mission 011: report, LOG, STATUSmre
  • 65348039ident#7: delivery gate — console check split at the gate's own server restart (49 checks)mre
  • dfa7b783ident#7: README (Delivery, env, gate, files, data), deploy.sh runs tests/delivery.mjsmre
  • ab6331f4ident#7: tests/delivery.mjs — fake clock gate: Vienna/New York/Tokyo/UTC 17:00, urgent, mail off, restart, DST days, zone changemre
  • 7869f57bident#7: delivery — the daily mail at 17:00 in the user's zone (digests table, once per local day, test clock IDENT_TEST_CLOCK), urgent mailed at once, push hookmre
  • 371ef1b5ident#7: lib/mail.hl sendNotificationMail (sink: <sink>.mail, one JSON line per mail)mre
  • 39749e0bident#7: time zones through hl:time — server checks isZone, an account without a known zone reads as UTC, allAccountsmre
  • 7a54fe72mission brief 011mre
  • a6a874cdident mission 010: vendor hybriel 0f396652 (plugins + compose cache volume/tmpfs + deploy URL wait + report)mre
  • 4e7cf78emission brief 010mre
  • e8b2b0f7docker-compose: init: true (hybriel#156, PID 1 ignored SIGTERM, every restart waited 10 s)mre
  • 5fdbb6b2ident mission 009: report — scratch folder notemre
  • 74235815ident mission 009 (4/4): docs (README files map + same-output test, STATUS, LOG), report, tests/letcount.py + realdata-baseline/comparemre
  • fe183516ident mission 009 (3/4): let only where reassigned — 293 never-reassigned lets are plain declarations; kept: reassigned, loop bodies, names of a file member, a name declared twice in one function; same outputmre
  • d2e7f91bident mission 009 (2/4): one lib file per topic (login, accounts, identities, apps, invites, selector, notify + helpers, util), function routes as thin wrappers in lib/api.hl, project.hl = the map; same outputmre
  • 91017164ident mission 009 (1/4): file moves — the root .hl files into lib/ (api.hl → lib/api-helpers.hl), styles.hl → components/styles.hl; imports adjusted, no other changemre