gitoria

tickets

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commiteb7aeeb9eb7aeeb9mission brief 016mreeb7aeeb9/reports/w9-hybriel.md

7.0 KB

  1. # w9 — re-vendor Hybriel edfd400a, SSE by name (2026-10-18) — BLOCKED
  2. - Commit 43be657 on branch w9-hybriel (worktree ../tickets-w9; main untouched): vendor edfd400a, lib/stream.hl imports sseStart/sseSend/sseAlive from 'hl:http1' (boolean checks), useTransport removed from project.hl, tools/import.hl `let`→plain, README/STATUS.
  3. - Vendored: hybriel master edfd400a — bin/hybriel sha256 ed337ce1…; NEW: the interpreter is gone, so the vendor = bin/hybriel + bin/libhlrt.a + bin/hlc.o + bin/hlrt/ (bin/ is gitignored, deploy.sh rsyncs it) + plugins/.
  4. - BLOCKER (Hybriel, for Anton): hybriel-native refuses `emit client …` in a static of a lib file: "not yet compilable: reference to 'this' outside the entry class" (lib/api.hl: 12 live-push emits). Repro: tickets-w9/.scratch/w9/repro-emit-static/ (lib/news.hl `static announce = (t) => { emit client posted(t) }`, imported into project.hl → refused). Second limit (worked around): a script body with a closure may not `let` the same name twice — repro .scratch/w9/repro-let-twice/twice.hl.
  5. - Gates on 43be657 (deploy.sh GATES = browser.mjs only): events.mjs 0/5 (server does not compile), browser.mjs 3 passed / 1 failed (stops: server did not come up). Scratch copy with the 12 emits neutralised: events.mjs 48/48 (first run 47/48: the Hybriel client check missed once on a cold first start, rerun 48/48), browser.mjs 254 passed, then it stops at the first live-push check (expected without the emits).
  6. - Before deploy.sh: do NOT deploy/merge w9-hybriel until Anton fixes emit-in-static. After that, mind: a cold start compiles ~20 s (Loreana) — the gate's ticketsUp waits 20 s (failed once cold), deploy.sh's URL check ~20 tries, and the container's ~/.hybriel build cache is not persisted, so every container restart cold-compiles; the container also needs writable /tmp. Old vendor kept in tickets-w9/.scratch/pre-w9/.
  7. # w9 2nd pass — re-vendor Hybriel master 9f912f3b (2026-10-18) — gates green, NOT deployed, NOT merged
  8. Branch w9-hybriel (worktree ../tickets-w9), on main 0e8a41c (main has not moved; no rebase needed).
  9. ## Vendor
  10. - Built read-only: `git -C /media/STORAGE/projects/hybriel archive 9f912f3b | tar -x -C ~/scratch-w9b/src`, `HL_NO_PLUGINS=1 bash native/build.sh`
  11. (committed plugin .so files; ~56 s). The hybriel checkout was not touched.
  12. - bin/hybriel sha256 `7421907868ac07d8a7d08296b083c6f8b20407d0e099ce4bebbf7ae053d9060a` — byte-identical to the hybriel checkout's own
  13. `native/zig-out/bin/hybriel` (HEAD 9f912f3b). bin/libhlrt.a `975f2b61e573d127993f5a275b238642e82647479c2d4650d67abfe7724fc0da`,
  14. bin/hlc.o `ba72ab5c78d4590f631db3bcf8d11e6f62065acd97a252e69ce160b7541896b9`, bin/hlrt/ (emit.hl changed, holes.hl gone vs edfd400a).
  15. plugins/{core,crypto,data,fetch,fs,http,http1,mpackdb,proc,time,web}: identical to edfd400a's (no diff in hybriel between the two).
  16. webex is not vendored → the hybriel#34 local patch does not apply. Previous vendor (edfd400a) in `.scratch/pre-w9b/`.
  17. ## Code
  18. - hybriel#146: there was never a workaround in the committed code — lib/api.hl's 12 `emit client …` compile and push now (the gate's
  19. live-push checks pass). hybriel#147: tools/import.hl's plain declarations stay (code-order rule 1 anyway).
  20. - hybriel#149 (`x = emit ev()` in a static): not present in tickets (the `r = emit server …` lines are component methods).
  21. - No app code changed. GET /api/events unchanged.
  22. ## Cold start (hybriel#148)
  23. - Loreana: cold 23.4 s (HL_NO_BUILD_CACHE=1), warm 1.5 s (`.scratch/w9b/cold`).
  24. - tests: browser.mjs, identkit.mjs, events.mjs, connect.mjs, short-id-switch.mjs wait up to `TICKETS_COLD_MS` (default 120 s) for a
  25. server, and spawnSync of .hl programs (import, seed, localtime) gets the same timeout; events.mjs now fails loudly if the server
  26. never comes up and waits for the Hybriel subscriber's exit ('close') instead of 6 s.
  27. - tests/events-client.hl: stops at EVENTS_MAX inside a chunk. Found by the cold run: the client, starting ~20 s late, got the after=0
  28. replay AND the next live event in ONE chunk and printed 4 events (check wants 3). A test-client bug, not Hybriel.
  29. - connect.mjs: TICKETS_CONNECT_APP_PORT / TICKETS_CONNECT_CHROME (were hardcoded 8702 / 8703–8709).
  30. - deploy.sh: GATES += `node tests/events.mjs`; URL check loops up to DEPLOY_URL_WAIT (default 120 s, 2 s apart).
  31. - docker-compose.yml: `tmpfs: /tmp:exec,mode=1777`, named volume `hybriel-cache:/root/.hybriel` (HOME=/root; build cache persists).
  32. Local container check (copy of the compose file with own container/image name, port 8739, copy of real data; removed afterwards):
  33. first start 200 after 33 s incl. image build; first restart 32.8 s (compiled AGAIN: the build cache records a listing of the app
  34. root, and the first start created `.sessions/`); `down`+`up` 2.4 s (warm, volume kept); cache emptied → 27.1 s; stop 0.1 s.
  35. On Byrodin `.sessions/` and `storage/` exist already → only the first start after a deploy compiles.
  36. ## Gates (ports 8720–8739; logs .scratch/w9b/)
  37. - browser.mjs 315 passed, 0 failed (warm) and 315/0 with HL_NO_BUILD_CACHE=1 (every start cold, ident too).
  38. - events.mjs 48/0 with HL_NO_BUILD_CACHE=1 (cold; before the client fix 47/1, see above).
  39. - connect.mjs 60/0. short-id-switch.mjs 19/0. tests/letcount.py: 1 root .hl, never-reassigned let 0.
  40. - No headless Chrome of mine left, no port of 8720–8739 listening afterwards.
  41. ## Real data (a copy: storage/mpackdb of /media/STORAGE/deploy-backups/tickets.worldapi.org/tickets.worldapi.org-20261017-2237.tgz)
  42. - tests/realdata-baseline.mjs, old tree = `git archive 0e8a41c` + bin 06617221 (21059cc7…), new = this branch, both on port 8736, a
  43. fresh copy each: 2,496 answers. realdata-compare.py: 1,653 byte-identical, 772 different = only HTML pages (all JSON and Markdown
  44. API answers identical). Every page difference is one of: `?v=` content hashes (new runtime), the offline seed's `at` time, and
  45. the ORDER of the page seed's `routes` list (hl:web now lists its own `/__hl/*` and `/components/*.hl` routes first). With those
  46. three normalised (~/w9b-tools/normcmp.py): reads 2,425/2,425 identical, writes 72/72 identical after masking.
  47. - Event stream on a fresh copy (new build, :8738): token over the face for az5b2, GET /api/events?project=tickets.worldapi.org →
  48. 200 text/event-stream; a comment on tickets.worldapi.org #26 arrives in 6 ms (id 1), state open → review arrives (id 2); 7/7.
  49. ## No hand-written JavaScript
  50. Files changed outside tests/, bin/, plugins/: deploy.sh, docker-compose.yml, README.md, STATUS.md, LOG.md, reports/w9-hybriel.md — no
  51. .js/.mjs file.
  52. ## Open
  53. - Hybriel observation (not filed, for Anton via the conductor): the run build cache's inputs include a listing of the app ROOT
  54. (`l /home/tickets`) — any new unrelated file there (a log, `.sessions/` on a first start) forces a full cold compile at the next
  55. start. Repro `tickets-w9/.scratch/w9b/repro-cache-root/run.sh <app copy> <port>` (copy in `tickets-copy/`, port 8720):
  56. start 1 24.8 s, start 2 1.3 s, start 3 after `touch unrelated-new-file` 26.6 s, start 4 1.3 s.
  57. - Not deployed: the conductor deploys from a clean worktree; mind ~23–30 s cold start after the restart (URL check waits 120 s).

Branches

Latest commits

  • eb7aeeb9mission brief 016mre
  • e4c34759paths: projects moved into /media/STORAGE/projects/WorldAPI/mre
  • 26efb23freport w6-events (events test)mre
  • c6bfab04mission 015: re-vendor Hybriel 0f396652 (static build), reportmre
  • b7ec5981mission brief 015mre
  • 5dc68731docker-compose: init: true (hybriel#156, PID 1 ignored SIGTERM, every restart waited 10 s)mre
  • 8a460b16mission 014: Apollo's 'stream opened right after the start gets no live events' is not a tickets bug — events.mjs checks early streamsmre
  • 6309ca81mission brief 014mre
  • c1161469mission 013: GitHub pipe tables on ticket pages (lib/markdown.hl + View + CSS) and re-vendor hybriel master a832f73bmre
  • a30b5d12mission brief (w13)mre
  • b50a6f93w9 (tickets): re-vendor hybriel 9f912f3b (#146 emit in a lib static, #147) — the 12 live-push emits in lib/api.hl compile as they are; cold start (#148): tests wait TICKETS_COLD_MS for every start, deploy.sh gates browser + events and waits up to 120 s for the URL, container /tmp tmpfs + hybriel-cache volume; events-client stops at EVENTS_MAX inside a chunk; connect.mjs ports by env. bin/hybriel sha256 7421907868ac07d8a7d08296b083c6f8b20407d0e099ce4bebbf7ae053d9060a. Gates (8720–8739): browser 315/0 (+ all-cold 315/0), events 48/0 cold, connect 60/0, short-id 19/0; real-data copy old 0e8a41c vs new: 2,425 reads + 72 writes identical after masking ?v hashes, offline at, route order; event stream on the copy delivers. Not deployed.mre
  • 43be6578w9: re-vendor hybriel master edfd400a; event stream imports sseStart/sseSend/sseAlive from hl:http1 (hybriel#144), useTransport gone; tools/import.hl plain declarations. BLOCKED: hybriel-native refuses `emit client` in a static (lib/api.hl) — the server does not compile on edfd400a, gates fail at start; scratch copy without those emits: events 48/0, gate 254 ok up to the first live pushmre
  • 0e8a41caw6 (ticket #26): event stream for programs — GET /api/events (Server-Sent Events)mre
  • bb64d57cmission 012 (ticket #25 API part): every /api/projects/<x>/… route takes the project's id (12-char record id) as well as its slug, same answers byte for byte; tickets stay under their project, no global /api/tickets/<x>. gate 315/0 (old code: the 13 id checks fail), connect 60/0, live-data copy old vs new 1,484 identical, slug vs id 772 identicalmre
  • 7538b034mission 011 (ticket #25 web part): short page URLs /<slug> and /<slug>/<number>; /projects/<slug>, /projects/<slug>/<n>, /projects/<slug>/tickets/<n> and /tickets/<ref> answer 301 (current slug); slug pages moved behind hl:web's own routes after construction (they answered /__hl/* and /components/*.hl); reserved slugs refused; API paths unchanged. gate 293/0, connect 60/0, live-data copy 187/0, API old vs new: only page links differmre
  • 0369106emission 010 (code order) 4/4: README file map + import order + 'Same output' test, STATUS (entry, lessons, how to verify), LOG, report; tests/realdata-baseline.mjs + realdata-compare*.py (a cleanup answers the same on live data), tests/letcount.pymre
  • a75e0279mission 010 (code order) 3/4: let only where a variable is reassigned or re-bound in a loop body (456 lets → plain declarations; Hybriel refuses a plain declaration inside a loop on its 2nd pass). gate 249/0, connect 60/0, real-data reads identical, a 50-step write sequence (API + faces) identical to the old codemre
  • e9d5c618mission 010 (code order) 2/4: one lib/ file per topic — store.hl split into projects / tickets (+ relations) / events / tickets-helpers, util.hl shared helpers (env, storage dir, URLs, sorts, Vienna time), the function routes out of project.hl into lib/api.hl (thin; auth/filters/Accept in api-helpers.hl), invite + member-removal logic out of the faces/routes into invites.hl / tickets.hl; project.hl is the map. /login/callback gets req + the session store by reference. gate 249/0, connect 60/0, real-data reads identicalmre
  • 97e269b5mission 010 (code order) 1/4: .hl files out of the root — lib/ (store, users, connections, invites, migrate, markdown, mdview, import = ticketfile, util = localtime, jsoncheck, api-helpers = api), tools/import.hl, components/styles.hl; import paths only. gate 249/0, connect 60/0, real-data reads identicalmre
  • 38f9d10ftickets: Hybriel master 06617221 (plugin allocators 3a781359 + 413f60e4, mpackdb 2cb7ae5e, http1 773de63e); gate 249/0, connect 60/0mre