gitoria

gitoria

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit097c52ba097c52baStyle the login error through its View idmre097c52ba/missions/W49-member-read.md

3.0 KB

  1. # W49 — members read PRs by API with a gtr_ token (Apollo GO 2026-11-04)
  2. Task (Apollo, verbatim): "(1) yes. (2) GO too (Sol, small): conductors in the PR workflow need to read their PRs, reviews, threads and check states by API with their gtr_ token (members read-only; write stays as is)."
  3. (1) = a clear 401 for a gtr_ token on the app-only routes instead of "missing, unknown or expired token".
  4. ## Rules
  5. - Read fully first: /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. Copy working shapes from the existing code (lib/api.hl apiMergePull is the model for gtr_ auth). No hand-written JS. A framework gap → DOCS line in the report, no workaround.
  6. - Work in a git worktree: `git worktree add /media/STORAGE/claude-scratch/gitoria/W49 -b w49-member-read main` from /media/STORAGE/projects/WorldAPI/gitoria.worldapi.org. Commit there; do NOT merge, push or deploy. Never touch live (byrodin) or his repos/data.
  7. - Ports for gate runs: 8720–8739 only (check `ss -ltn`).
  8. - Do not edit docs/apps-api.md (Vinzenz's contract); put the proposed contract text in the report.
  9. ## What to build
  10. 1. GET routes in lib/api.hl: appPulls, appPull, GET of appReviews, appThreads, GET of appComments, GET of appStatus (GET {api}/statuses/<sha>). Accept EITHER the app token (unchanged behaviour) OR a gtr_ token of a user for whom mayRead(uid, repo) and mayPush(uid, repo) hold (owner/member/org = "members"). Non-member gtr_ → 404 not_found (like a repo that does not exist). Rate limit: keep the app limit for apps; for users reuse whatever the existing gtr_ routes do (say so in the report).
  11. - listReviews/listThreads take the app (who.app): find out what the app is used for in reads (e.g. "own" flags) and pass the right neutral value for a user; no app-specific data must leak or break.
  12. - ONE helper (e.g. in lib/app-auth.hl: readerOfRequest(route, req) → { repo, app|null, user|null } or { error }), not copies per route.
  13. 2. All POST/PUT (writes) stay app-only. A gtr_ token on any app-only route (writes, deliveries, redeliver, apps token routes that take gat_) → 401 with message "this route needs an app token (gat_); user tokens (gtr_) can read pulls, reviews, threads, comments and statuses and merge with POST /pulls/N/merge". Unknown/expired gat_ keeps the old message.
  14. 3. Gate: extend tests (copy the shape of the member-merge gate added in W48, see tests/ and deploy.sh GATES): member gtr_ reads all 6 GETs 200 with the same body shape as the app; non-member gtr_ 404; no token 401; gtr_ on a POST review / PUT status → 401 with the new message; app token behaviour unchanged. Then run ALL gates (LC_ALL=C): `node theme/check-theme.mjs .`, `node tests/browser.mjs`, and every gate in deploy.sh GATES — all 0 failed.
  15. ## Report
  16. Write /media/STORAGE/projects/WorldAPI/gitoria.worldapi.org/reports/W49-REPORT.md: commits, files changed, gate results with counts, rate-limit choice, the reviews/threads app-parameter decision, proposed docs/apps-api.md text for Vinzenz, DOCS lines. Then STOP.

Branches

Latest commits

  • 097c52baStyle the login error through its View idmre
  • c6d9c86aOwn the not-found code rule in its componentmre
  • 055424c2Record W61 replacement theme gates, sidebar repro and baselinemre
  • 2ed09441Use layouts theme 17e0f03 for W61 compatibilitymre
  • b8609a91Merge branch 'main' into w61-stylemre
  • 4639caf7Report W61 theme startup blocker and day39 Style probemre
  • 81f0a0bbREADME: two caches were restored by 90b4f72; log W62mre
  • 4a3f557eImport layouts theme ebd00b6 for W61 (startup blocked)mre
  • ab12a257Merge W62: #25 commit page measurements and proc repromre
  • 41323e49gitoria#25: measure commit request costs and reproduce blocking process waitsmre
  • 53ca42b2log: W60 merged, W61 W62 startedmre
  • 80870a33mission W61: style passmre
  • 560fd208Merge W60: helpers, bound forms, login in topics, two form fixes (gitoria#28 #32 #33)mre
  • ac5ba6a4log: W60, #25 measuredmre
  • 220f6342W60: record corrected form proof, full AE and remaining gapsmre
  • 7e31cac5gitoria#28: restrict reply form layout to reply formsmre
  • ae373cfdgitoria#28: keep each reply draft in its thread componentmre
  • eeeebd5agitoria: insert a newly created organization oncemre
  • 34d2d5cagitoria: clear the bound public-key textarea after creationmre
  • 119e54c0W60: restore conductor-owned tracking filesmre