gitoriaLog in with ident

tickets

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit7538b0347538b034mission 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 differmre7538b034/plugins/data/server.hl

2.6 KB

  1. \* hl:data — NEED EVALUATION, the one implementation every realm edge uses.
  2. A component's need is a member whose initializer calls a provider class
  3. (SPEC.md §9.2); the graph publishes each as { key, provider, method, args,
  4. project }. Evaluating one is: resolve the arguments against the caller's
  5. context — a folded constant, a route group's member, or a `session`
  6. field — call the provider method, and take the projected field. hl:web did
  7. this per request and per push; hl:ipc does it per peer push. It lived in
  8. hl:web until the second edge existed (2026-09-01), which is when "shared"
  9. stopped being a word and became this plugin. *\
  10. \* Every need of one component, against the provider instances of the calling
  11. edge. One memo per evaluation: two needs fed by the same call cost ONE call. *\
  12. runNeeds(
  13. Hybrid needs \\ the graph's need list for the component
  14. &providers \\ class name → provider instance (the edge module's)
  15. &params \\ route groups; {} for a peer that matched no route
  16. &sdata \\ the session bag; {} for a peer with no session
  17. ) {
  18. let out = {}
  19. let memo = {}
  20. for (need of needs) {
  21. out[need.key] = runNeed(&need, &providers, &params, &sdata, &memo)
  22. }
  23. return out
  24. }
  25. \* One need: the value its MEMBER holds. `need.project` is the field taken off
  26. the returned hybrid ("" = the member IS the return value). A provider read
  27. answers for null arguments (the 074 contract), so an anonymous caller
  28. evaluates the same needs and simply sees nothing of anyone. *\
  29. runNeed(&need, &providers, &params, &sdata, &memo) {
  30. let provider = providers[need.provider]
  31. if (provider == null) {
  32. return null
  33. }
  34. let args = []
  35. for (a of need.args) {
  36. if (a.group != null) {
  37. args[] = params[a.group]
  38. } else if (a.session != null) {
  39. if (a.session.length == 0) {
  40. args[] = sdata
  41. } else {
  42. args[] = sdata[a.session]
  43. }
  44. } else {
  45. args[] = a.value
  46. }
  47. }
  48. let ck = need.provider + "." + need.method + "(" + JSON.stringify(args) + ")"
  49. // a call that ANSWERED null is simply not memoized — repeating it is correct
  50. let result = memo[ck]
  51. if (result == null) {
  52. result = callProvider(&provider, need.method, &args)
  53. memo[ck] = result
  54. }
  55. if (need.project.length == 0) {
  56. return result
  57. }
  58. if (result == null) {
  59. return null
  60. }
  61. return result[need.project]
  62. }
  63. // The provider call itself — the method name is DATA, so the call is computed.
  64. callProvider(&provider, method, &args) {
  65. if (args.length == 0) {
  66. return provider[method]()
  67. }
  68. if (args.length == 1) {
  69. return provider[method](args[0])
  70. }
  71. if (args.length == 2) {
  72. return provider[method](args[0], args[1])
  73. }
  74. return provider[method](args[0], args[1], args[2])
  75. }

Branches

Latest commits

  • 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
  • d3db6139tickets: Hybriel master 190aa11d (fc838894 GC correctness, #126 closure scopes, #127); gate 249/0, connect 60/0mre
  • bce182e3tickets: Hybriel master 7eea0d32 (#126 memory, #48 lambda copies its argument); migrate.hl lambdas take &logmre
  • 4137be0fantcolony#40: mission references point to the moved missionsmre
  • 9bfba36aantcolony#40: history (LOG.md), worker briefs (missions/) and reports moved here from antcolony, numbered per project; old numbers in antcolony docs/mission-map.mdmre
  • c7bd2645tickets: Hybriel master 73267707 (#122 fixed); compactNow workaround removed (#110 covered)mre
  • 2ab91ee9tickets: gate checks rows appear once (session sync); re-vendor to ff51cf46 stopped on hybriel#122, stays 837fe120mre
  • e01c2b1dtickets#24: installable app (manifest, service worker, offline list), own icon; gate waits for the hello's pongmre
  • 752fbb7fdeploy.sh: back up live storage/.sessions/.env before every deploy (newest 5 kept)mre
  • 38bdd5e4deploy.sh: never send .git or .gitignore to Byrodinmre
  • f12fa1bcState of 2026-09-27, before the move to gitoriamre