gitoria
All repositories: gitoria
3.0 KB
# W30 — keyed list writes (gitoria#30)Task line (ticket title, Atlas audit 2026-10-26): "Lists are rebuilt by hand in handlers instead of keyed records with upsert and remove".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.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.## The documented shape to apply (Gitoria's reading of the docs; verify it)- Replace an existing row: `list.upsert(row)` (row carries its @ key).- Remove: one-argument `list.remove(id)`.- 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.- 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.## 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)1. Change the call sites above. No hand-written JS, no workaround at a framework gap (minimal repro in .scratch/ and stop). theme/ untouched.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.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.4. Commit on branch w30 (subject without "#N"). Do NOT merge, push or deploy.## Reportreports/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
- 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
- 4d1a4cf4log: #25 numbersmre
- 1af0a60ddocs: H25 run() correctionmre
- 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
- 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