gitoria

kunibert

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit88c7b09d88c7b09d|||PR HL-STANDARD L10 update (hybriel 5885d688), rules version 3mre88c7b09d/plugins/web/session.hl

1.9 KB

  1. // ONE SESSION — a browser's bag on the server. A CLASS, not a hybrid, on purpose:
  2. // the language passes an instance by handle (through maps, lists, assignments and
  3. // emit payloads; an ordinary call argument copies, hence `&` at the dispatch) and
  4. // a face that logs a session in writes the session it was HANDED. On disk it is
  5. // the JSON of these members, and a file comes back as `rec > new Session()`.
  6. // THE APP'S OWN DATA GOES INTO `data`, a hybrid: `session.data.cart = …` rides along,
  7. // and an entry nobody wrote reads null — as a hybrid does. An UNDECLARED member of
  8. // an instance is not that: the language lets a write mint it on one instance and
  9. // refuses the read on another (measured 2026-09-13: `session.signupEmail` read in an
  10. // audience function on a session that never set it was an UndefinedProperty error).
  11. String id = null
  12. Number created = 0 // epoch ms
  13. Number seen = 0 // epoch ms of the last request or frame that presented it
  14. user = null // whoever logged this session in, or null
  15. data = {} // the app's own fields, absent ones read null
  16. // THE QUEUED EMITS THIS SESSION'S BROWSERS HAVE HAD HANDLED (COMPONENTS §10): the last
  17. // `handledKept` of them, oldest first, each `{ q, ok, error }` — its stable id and the
  18. // ack it got. A replay of one of these ids is answered from here and runs no face again.
  19. handled = []
  20. // ROTATE (W120, session fixation): a face that logs this session in calls `session.rotate()`;
  21. // the framework, when the face returns, gives the session a NEW id (sessions.move), deletes the
  22. // old one, and sends the browser its new cookie. This only asks: the id changes after the face.
  23. // The flag is cleared by the move and never reaches a file.
  24. Boolean rotating = false
  25. String issuedSig = '' // W138: the attributes (name, Domain, Path, Secure, SameSite) its cookie was last issued with
  26. Number issuedAt = 0 // W138: epoch ms of that issue
  27. rotate() {
  28. rotating = true
  29. return null
  30. }

Branches

Latest commits

  • 88c7b09d|||PR HL-STANDARD L10 update (hybriel 5885d688), rules version 3mre
  • 00869ecbrecords: gitoria#50 step 3 livemre
  • f97a0e5fMerge branch 'hl-standard' into mainKunibert
  • 9710e39fType STANDARD as String (L10, Kunibert review)mre
  • 4140b664|||PR Review against HL-STANDARD and cite rule ids (gitoria#50 step 3)mre
  • 75c6888drecords: gitoria#50 step 1 connected and provenmre
  • aa6d997frecords: gitoria#50 connect plan, Anton reportmre
  • 8a190ba7Records: kunibert#18 and #15 donemre
  • 2eee9dbbMerge branch 'revendor-day44' into mainKunibert
  • e96721cb|||PR Re-vendor plugins from Hybriel day44 (hl:fetch redirect fix)mre
  • 0c67ab8cLog: kunibert repo ping provenmre
  • b6f3039cLog: kunibert repo connectedmre
  • b143c3c7CONDUCTOR: push recipemre
  • 7a1279eeRule: conductor merges own utility PRs after green reviewmre
  • 4038b3e0Log: kunibert#18 openedmre
  • 18543db1Log: day42 fetch fix, re-vendor pendingmre
  • 81a12f96Statusmre
  • 6ce706abRecords: neutral wording, split cleanupmre
  • 81a4d31bDocs: neutral wordingKunibert
  • 8205b05eRecords: #17 livemre