gitoria

gitoria

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Main branchmainfe209ffeMerge branch 'w56-owner-members' into mainGitoriamain/reports/W49-REPORT.md

9.0 KB

  1. # W49 member API reads
  2. STATUS: The implementation and all automated gates are complete on branch `w49-member-read`. Real Chrome confirmation remains blocked by connectivity to lisbeth. Nothing was merged, pushed or deployed.
  3. Commits:
  4. - `3b3332fd1d7f9d4a7fddf766ec4123c5a9a49bae` implements the shared reader authentication helper, app-only error message, neutral review/thread reads and the expanded member gate.
  5. - `fe5ee3d8e5836c6aecb36f13c1d04d3e1349ab7b` makes the member status comparison exercise a populated pending check.
  6. - This report and the LOG entry are committed separately on the same branch.
  7. Files changed: `lib/app-auth.hl`, `lib/api.hl`, `lib/reviews.hl`, `tests/member-merge.mjs`, `LOG.md`, and `reports/W49-REPORT.md`. The worktree is `/media/STORAGE/claude-scratch/gitoria/W49`, based on main `705dd83`. No tracked current STATUS.md exists in this checkout, so the worker status entry is recorded above. `docs/apps-api.md` was not edited.
  8. The six GET routes now accept either the original app credential or a valid user credential whose user passes both mayRead and mayPush for the addressed repository. Non-members receive the same 404 not_found as a missing repository, including on public repositories. Unknown user tokens and missing credentials receive 401. App writes, deliveries, redelivery and the app-key token exchange remain restricted to their existing app credentials; presenting any gtr_ credential there gets the requested explicit 401 message. The existing user merge route is unchanged.
  9. Rate-limit choice: app requests still pass through appOfRequest and its existing 300 GET / 60 write requests per minute per app limit. User reads follow apiMergePull and apiCreateRepo: those existing gtr_ routes do not call limitCheck, so user reads introduce no new rate limit or app counter usage.
  10. Reviews/threads decision: the app argument was a filter selecting records whose app id matched the caller, rather than an ownership flag in the response. Member readers pass null. listReviews and listThreads interpret null as all records belonging to this repository and PR, using the existing public shapes and pagination. App readers still receive only their own reviews and threads. No token, key, secret or delivery data is added to these responses. The gate creates two apps and proves this separation using stable record ids and member pagination.
  11. ## Validation
  12. All runs used LC_ALL=C. All gate listeners used ports 8720–8739, checked with ss before each gate. There are 18 final gate passes, 1198 passed assertions and 0 failed assertions; the theme gate additionally checked 79 files with 0 problems.
  13. | Gate | Result | Exit |
  14. |---|---|---|
  15. | node tests/create-api.mjs | 47 passed, 0 failed | 0 |
  16. | node tests/signin-return.mjs | 3 passed, 0 failed | 0 |
  17. | node theme/check-theme.mjs . | check-theme: 79 files, 0 problems | 0 |
  18. | node tests/browser.mjs | 266 passed, 0 failed | 0 |
  19. | node tests/security.mjs | 82 passed, 0 failed | 0 |
  20. | node tests/private.mjs | 158 passed, 0 failed | 0 |
  21. | node tests/ident-access-gitoria.mjs | 30 passed, 0 failed | 0 |
  22. | node tests/apps.mjs | 95 passed, 0 failed | 0 |
  23. | node tests/pull-numbers.mjs | 48 passed, 0 failed | 0 |
  24. | node tests/pull-ssh.mjs | 20 passed, 0 failed | 0 |
  25. | node tests/app-token.mjs | 42 passed, 0 failed | 0 |
  26. | node tests/reviews.mjs | 98 passed, 0 failed | 0 |
  27. | node tests/events.mjs | 52 passed, 0 failed | 0 |
  28. | node tests/pr-page.mjs | 61 passed, 0 failed | 0 |
  29. | node tests/status.mjs | 61 passed, 0 failed | 0 |
  30. | node tests/limits.mjs | 53 passed, 0 failed | 0 |
  31. | node tests/status-keyed.mjs | 13 passed, 0 failed | 0 |
  32. | node tests/member-merge.mjs | 69 passed, 0 failed | 0 |
  33. The expanded member gate passed 69/0 before the full suite and 69/0 in its final populated-status run. It checks every read with owner/member/app credentials, non-member 404, missing and unknown user token 401, app-only explanations on eight routes, unchanged unknown app-token text, two-app review/thread separation and paging, and immediate loss of all six reads after member removal. The existing 35 merge checks remain covered.
  34. Negative control: the expanded gate against the original HEAD implementation recorded 8 passed and 21 failed (exit 1). Member reads returned 401, and app-only routes returned the old unhelpful message. Twenty failures directly exposed those missing behaviors; a subsequent pagination check stopped on the denied response. This was before the populated-status fixture adjustment. Log: `.scratch/w49/member-old.log`.
  35. The suite runner paused once after pull-numbers because its listener was still closing when the next ss check ran. The listener cleared by itself; the remaining gates resumed with a two-second teardown delay. No application change was needed. Logs and final counts are under `.scratch/w49/`, including `results-final.json`.
  36. Real Chrome attempt: an own plain tab was opened through the existing :9223 connection under the lisbeth lock. The attempt recorded 19 passed / 1 failed because browser fetch could not reach the fixture. The reverse SSH tunnel had exited, and a subsequent SSH attempt to lisbeth reported `No route to host` for 192.168.178.50:22. No screenshots were produced and no phone/tablet/desktop visual confirmation is claimed. The gate closed the own tab in finally; before/after/final page lists show the same original tab. The optional W49_REAL_CDP path in the gate can rerun the four viewport confirmations when the tunnel is available. This environmental check failure is separate from the final ordinary member gate, which passed 69/0.
  37. Final Chrome page targets:
  38. ```json
  39. [
  40. {
  41. "id": "2B36106C7AF83C7D196B54C5C499429C",
  42. "url": "about:blank",
  43. "title": "about:blank"
  44. }
  45. ]
  46. ```
  47. ## Proposed contract text for the external reviewer
  48. Add to section 2 / section 5:
  49. > A user access token (`gtr_` + 40 hex) can read `GET {api}/pulls`, `GET {api}/pulls/N`, `GET {api}/pulls/N/reviews`, `GET {api}/pulls/N/threads`, `GET {api}/pulls/N/comments` and `GET {api}/statuses/<sha>` when its user may both read and push to the addressed repository (owner, repository member or organization member as defined by repository permissions). A valid non-member user token receives 404 `not_found`, including for public repositories. Missing or unknown tokens receive 401 `unauthorized`.
  50. >
  51. > Response shapes, ordering and paging are the same as for app readers. A user reads all apps' reviews and threads on that PR; an app still reads only its own reviews and threads. Comments and statuses keep their existing scope. App rate limits stay at 300 reads and 60 writes per minute. User-token reads follow the existing user API behavior and have no additional rate limit.
  52. >
  53. > Writes in this back-channel, delivery history and redelivery remain app-only. The existing `POST {api}/pulls/N/merge` user route remains available to permitted members and owners subject to the required checks; apps cannot merge. `POST {api}/apps/token` continues to require an app key (`gak_`).
  54. Add to section 6:
  55. > A `gtr_` token presented on an app-only route receives 401 `unauthorized` 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 or expired app tokens retain the existing error message.
  56. ## Documentation and cleanup
  57. DOCS: Read WORKER-RULES.md fully, HL-PRIMER.md fully (file/class structure, imports/statics, hybrid literals, null, variable binding and calls), and CODE-ORDER.md fully (rules 1–6). Also read the archived MANUAL.md and RULINGS.md because the current MANUAL.md path named by WORKER-RULES no longer exists. The mission explicitly named apiMergePull as the working authentication shape; it supplied the user-token and repository-permission pattern. No framework workaround or new framework gap was needed.
  58. Open point: real Chrome confirmation at 390×844, 800×1280, 1280×800 and 1280×900 must be rerun when lisbeth is reachable. There are no remaining implementation or automated-gate failures.
  59. Processes: the first member-gate node PID 1263497, ident PID 1263520 and app PID 1267540 were stopped by the test's captured-process cleanup. The suite's browser test PID 1367710 and its Chrome PIDs 1381078, 1381467 and 1383257 also exited through test teardown. The reverse SSH tunnel was started as PID 1353847 and had already exited when checked. Other gate helper PIDs were captured and stopped by their existing test helpers but were not all printed in the suite logs. The final /proc scan found only the active inspection shell in this worktree; no app, ident, tickets, browser or tunnel process remained, and ss found no listener in 8720–8739. No worker Chrome profile remained under this scratch directory. No existing Chrome tab, cookies or live repository data was changed.
  60. Request estimate: approximately 65 model/tool exchanges: 10 reading/setup, 10 implementation and tests, 5 negative-control work, 30 gate execution/progress waits, and 10 Chrome diagnosis, cleanup and reporting. The estimate exceeded the approximately 60-request target because all 18 required gates and the failed remote-browser attempt were completed and diagnosed within this worker.

Branches

Latest commits

  • fe209ffeMerge branch 'w56-owner-members' into mainGitoria
  • fa0754c8|||PR repository owner transfer and members API (#55)mre
  • 8862e537Merge branch 'w55-rename-org' into mainGitoria
  • 014d2b7fOne immutable readers snapshot per move for the left-organization event (#53)mre
  • 1859d506Decide who hears a repo left its organization by its readers before the move (#53)mre
  • 499f25f2Review fixes for the Settings organization move (#53)mre
  • ed3b922b|||PR move a repository into an organization in Settings (#53)mre
  • 74ec2af8Merge branch 'w54-repo-rename-pr' into mainGitoria
  • 9f7ce8d8Preserve rename compatibility and live page titlesmre
  • c3d95b6e|||PR separate names and addresses, rename repositories in Settings (#53)mre
  • ce08920dMerge branch 'w52c-header-phone' into mainGitoria
  • 0bab9e46|||PR header: ident status wraps on phones instead of clippingmre
  • e7af3eceMerge branch 'w52b-approval-followup' into mainGitoria
  • c01e66c6|||PR approvals follow-up: live Merge after status writes, helpers (#52)mre
  • 841da497Merge branch 'w53-pulls-speed-pr' into mainGitoria
  • 80307ae2|||PR pulls page cache: live PR numbers, complete scans onlymre
  • 69141f65|||PR pulls page: cache the git part per repo by branch tipsmre
  • 155861f6Merge branch 'w52-person-approval' into mainGitoria
  • b5435de8|||PR person approvals: second Kunibert round (#52)mre
  • 3a8b2fb8|||PR person approvals: Kunibert review fixes (#52)mre