gitoria

gitoria

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit2d2eaa922d2eaa92log: Kunibert connected to kunibert repomre2d2eaa92/missions/W46-status.md

4.1 KB

  1. # W46 — an app can set a status on a PR that may be required before merging (gitoria#46, part of the push API #38)
  2. TASK (his words, unchanged): "gitorias first job is to evaluate how to make a push api where external apps can register to interact with gitoria. first use case being a code reviewer." Build GO by Apollo 2026-11-02. This part: https://tickets.worldapi.org/gitoria.worldapi.org/46
  3. W46, PORTS = 8730–8739, branch w46-status from main 49533a5 (LIVE; has #40 lib/pullsync.hl pullObject/records, #41 lib/apps.hl + Settings → Apps, #42 lib/app-auth.hl appOfRequest + apiPatterns, #43 lib/events.hl). #44 (reviews/threads) is built in parallel by another worker: do not touch reviews/threads/comments.
  4. ## Scope (contract docs/apps-api.md v1.2.1 §5 "Status")
  5. 1. statuses table keyed by repo id: one row per (head sha, context) {sha, context, state pending|success|failure|error, title, summary ≤ 65,536, url (https only or null), app, updated}. PUT {api}/statuses/<sha> (apiPatterns + appOfRequest): sha must be a commit of the repo (else 422), a newer PUT replaces; 200 {status}. An app may only write its own contexts? — the context is free text, but store the app id and show "<app name>: <context>".
  6. 2. Per-repo setting "required before merge": the owner picks contexts (Settings, owner only, next to Apps; follow the Settings view's existing form). The Merge button (lib/pulls.hl mergePullNow and the server function in components/pulls.hl) stays off / refuses unless every required context is success on the PR's CURRENT head; the refusal says which. Server-side check, not only the button.
  7. 3. /pulls shows each PR's statuses for its current head as small badges (state + "<app>: <context>", title as text; error apart from failure). Follow WORKER-RULES STYLE FORMAT and the existing pulls Style.
  8. 4. Tests: tests/status.mjs in GATES: PUT/replace, foreign repo/app 404, unknown sha 422, required context blocks merge until success on current head (a push after success blocks again), badges rendered.
  9. ## Read first
  10. - /media/STORAGE/projects/WorldAPI/worldapi-conductor/archive/2026-10-31/WORKER-RULES.md (all) and RULINGS.md in the same folder.
  11. - /media/STORAGE/projects/hybriel/docs/HL-PRIMER.md, /media/STORAGE/projects/hybriel/docs/CODE-ORDER.md,
  12. /media/STORAGE/projects/hybriel/COMPONENTS.md "hl:web — a function route and its request", "§11 — Routing", "§9 — Data", and for any
  13. View change "§1", "§4 — Styles", "§12 — Composition" (List/Conditional rendering). Plugin READMEs you use (mpackdb, crypto, fetch, proc, time).
  14. Copy a working shape from the docs or from gitoria's own code. A framework gap: write a DOCS/GAP line in the report with a tiny repro; no workaround, no hand-written JavaScript.
  15. - THE CONTRACT: docs/apps-api.md v1 (fixed; anything you cannot build as written → report, do not change the contract).
  16. - Evaluation: reports/E38-push-api-eval.md (sections 1–6) and reports/E38b-konrad-needs.md. App: README.md, project.hl, lib/pulls.hl, lib/transport.hl, lib/tokens.hl, lib/tickets.hl (connect flow), lib/repos.hl.
  17. ## Rules
  18. - Work in a git worktree of /media/STORAGE/projects/WorldAPI/gitoria.worldapi.org (base main 49533a5), everything under /media/STORAGE/claude-scratch/gitoria/W46/ (REPORT.md there). Never touch live (byrodin), his repos or live data; test data only in your own temp storage.
  19. - Hybriel stays on the vendored set (do not re-vendor).
  20. - Ports: only PORTS (check `ss -ltn` first).
  21. - Secrets: keys/tokens stored as sha256 only (like lib/tokens.hl); the signing secret is server-readable but never sent to a page or a log.
  22. - Commits: small, plain subjects, no self-attribution, on your branch only. Do not push, do not deploy, do not write to tickets.
  23. - Gates (LC_ALL=C), 0 failed at the end: node theme/check-theme.mjs ., node tests/browser.mjs, and every gate in deploy.sh's GATES list. Add your own gate file tests/<name>.mjs for this ticket and add it to GATES. A flake: rerun once, report it.
  24. - Budget: ~60 requests / 150k context. If the work is bigger, finish a clean part, commit, and report what remains. STOP after the report.
  25. ## Report (REPORT.md, short)
  26. What was built (files, commits), how you tested (commands + results), contract points covered and not, DOCS/GAP lines, open risks.

Branches

Latest commits

  • 2d2eaa92log: Kunibert connected to kunibert repomre
  • 65d5f80alogmre
  • dab74b0dW49 report, logmre
  • fd4fc028Exercise member status reads with a populated check statemre
  • 536ca6f9Allow repository members to read pull workflow APIs with user tokensmre
  • 705dd834W49 missionmre
  • b554cd5flogmre
  • f4c9440ddeploy.sh: tar --hard-dereference for the live data backupmre
  • 1a687b15Merge branch 'w48-member-merge'mre
  • 166c775fW48 report, logmre
  • 1b4623f0Members merge pull requests: API route, button on /pulls and /pulls/N, one shared merge pathmre
  • 1075c38cW48 mission, logmre
  • 17bdd0d6V37/V39 missions, logmre
  • 146de5f8Re-vendor gitoria to Hybriel set-day39 (51e921d7)mre
  • e874e44dtests/status-keyed: app token lives 60 s so it outlives the gate's two restartsmre
  • 270b8d61deploy.sh: DEPLOY_STOP_START=1 stops, waits for the old pid, then starts (mpackdb freeze, replaces the standby swap)mre
  • 3f9235b8project.hl: drop the dummy /pulls/:n component route (hybriel#294 is fixed in day37)mre
  • c90daf19Re-vendor gitoria to Hybriel set-day37 (f6b3d45b)mre
  • 03b5bb08W39 report to reports/, drop scratch repro, mission + logmre
  • 154d333fMerge w39-create-api: POST /api/repos with a user token (#39)mre