gitoria

gitoria

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commiteefa2dbceefa2dbcRepo setting: refuse direct pushes to the main branch (pre-receive over HTTPS and ssh)mreeefa2dbc/missions/W30-keyed-lists.md

3.0 KB

  1. # W30 — keyed list writes (gitoria#30)
  2. Task line (ticket title, Atlas audit 2026-10-26): "Lists are rebuilt by hand in handlers instead of keyed records with upsert and remove".
  3. Ticket: https://tickets.worldapi.org/gitoria.worldapi.org/30 (read it: call sites components/list.hl ~87-89 repoCreated/repos, components/tickets.hl ~100-102 addTicket/tickets keyed by number, components/sshkeys.hl ~70-72 and ~83-85 keyItems add/remove, components/tokens.hl ~69-71 and ~85-87 tokens add/remove). Was blocked because upsert appends while these lists show newest first (repro tests/fixtures/upsert-order.hl); Hybriel day52 (now vendored, hybriel#331) settles it.
  4. Read first, fully: /media/STORAGE/projects/WorldAPI/worldapi-conductor/archive/2026-10-31/WORKER-RULES.md; /media/STORAGE/projects/hybriel/docs/HL-PRIMER.md; /media/STORAGE/projects/hybriel/docs/CODE-ORDER.md; COMPONENTS.md section "List rendering" (the rowKey paragraph, changed by #331: "Rows are keyed by the entry's `id`, then `@id` … To insert between existing keyed rows, assign the list member a whole list in the desired order; existing rows retain their nodes. `upsert(record)` replaces a matching record in place and appends a new one; it does not choose a sorted insertion position."); SPEC.md "Looking records up by the `@` property: `upsert` and `remove`" (~line 1977, day26 rule: upsert / one-argument remove need an @ property). Copy a working shape from the docs; a gap → DOCS line in the report.
  5. ## The documented shape to apply (Gitoria's reading of the docs; verify it)
  6. - Replace an existing row: `list.upsert(row)` (row carries its @ key).
  7. - Remove: one-argument `list.remove(id)`.
  8. - Add a NEW row at the top (newest first): one whole-list assignment in the desired order (new row first, then the existing rows); keyed rows keep their nodes. No hand-written filter loop that copies every row.
  9. - Each row type gets its @ key where it has none (repos @id, tickets keyed by number, ssh keys, tokens): check that server data and stored rows really carry that field; what identifies an item is its id, never a position.
  10. ## Work (git worktree `../gitoria-W30`, branch w30 from main; copy main's bin/ folder (day52, not in git) into the worktree; never edit LOG.md/STATUS.md)
  11. 1. Change the call sites above. No hand-written JS, no workaround at a framework gap (minimal repro in .scratch/ and stop). theme/ untouched.
  12. 2. Prove in tests/browser.mjs (extend it): for each list, a new row appears at the top, existing row DOM nodes are retained (same node before/after, like hybriel's #9331 check), a replace keeps one row, a remove takes exactly that row; a second visit (reload) shows the same order.
  13. 3. Gates (LC_ALL=C, ports 8720-8739 only, `ss -ltn` first; port 8700 is taken: use GITORIA_GATE_* variables as V52/R52 did): `node theme/check-theme.mjs .`, `node tests/browser.mjs`, every gate in deploy.sh's GATES list, all 0 failed.
  14. 4. Commit on branch w30 (subject without "#N"). Do NOT merge, push or deploy.
  15. ## Report
  16. reports/W30-REPORT.md (≤25 lines): per call site old → new shape, the @ keys added, test checks added, gate numbers, DOCS lines, risks. Then stop. Budget ~60 requests.

Branches

Latest commits

  • eefa2dbcRepo setting: refuse direct pushes to the main branch (pre-receive over HTTPS and ssh)mre
  • 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
  • b05f6d92tests/status: the gate's 3 s app token expired during the restart; it lives 60 s like status-keyedmre
  • 1e8f4f0avendor: Hybriel set-day52 (fault-path leak fix #335, keyed rows #331)mre
  • f5f0fb7blog: 2026-11-08 day50/#29 live, H25 correction, V52 startedmre
  • dc77fb95main: offline note from __hlOnline, tick removed (#29)mre
  • 37a86d93tests/reviews: seeded fake hook's DNS failures are not server errors (flaky gate)mre
  • 07ab845bvendor: Hybriel set-day50 (run() leak fix #335)mre
  • 71b2fa4blog: hybriel#335mre
  • bd94cc7elog: #25 cause found (run() leak)mre
  • 565cb508log: H25 round 1mre
  • 90a0af84log: H25 startedmre
  • 87bd53b8mission H25mre
  • 71a746cflog: day48 livemre
  • bf568e14log: V48 mergedmre