gitoria

gitoria

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Branchf2-api-bugs26117255|||PR apps API: review comments on files with spaces in their namemref2-api-bugs/reports/W46b-REPORT.md

3.0 KB

  1. # W46b — statuses keyed by app + context (gitoria#46, contract v1.4)
  2. Branch `w46b-keyed` (worktree /media/STORAGE/claude-scratch/gitoria/W46b/wt), base 9678a8f. Not pushed, not deployed.
  3. ## Built
  4. - lib/statuses.hl: statusRows key = "<rid> <sha> <appId> <context>"; a PUT replaces only the calling app's row (`ownRow`: new key first, else the sha's rows matched on appId+context = old-shape rows, which are then updated in place and re-keyed — no migration, no script).
  5. requiredRows { rid, key "<rid> <appId> <context>", appId, context }; `requiredOf` = [{app:{id,name},context}] ("(removed app)" if gone) → pull.required via lib/pullsync.hl (unchanged file); `requiredList` rows "App name · context"; `requireContext(user, session, slug, appId, ctx)` (app must belong to this repo, picked by id); `missingOf`: met only by a success row of THAT app + context on the current head; removed app (or old entry without appId) → "(removed app) · ctx (app removed)", never met until the owner removes it (Remove by row id, unchanged).
  6. - components/settings.hl: an App `select` (options from the connected apps, value = app id) + context input; list shows "App name · context".
  7. - Tests: tests/status.mjs extended (Mallory same context stored apart, replaces only own row, required Mallory+ctx not met by Kunibert's success, Kunibert+ctx not met by Mallory's success, other-context success doesn't count, made-up app id refused, removed app → shown "(removed app)", Merge refused on server and button off, removed by row id); tests/limits.mjs required shape; NEW tests/status-keyed.mjs (in deploy.sh GATES): runs the OLD code (git archive 9678a8f) on the same storage, writes an old-shape row (also shows the old bug: Mallory replaced Kunibert), then the new code reads it, Mallory gets her own row, Kunibert's next PUT replaces the old row (2 rows, not 3), survives a restart.
  8. - Commits: "gitoria#46: statuses keyed by app + context, required = app + context, old rows still read"; "gitoria#46: fix a label in the keyed gate".
  9. ## Gates (LC_ALL=C), all 0 failed
  10. signin-return 3, check-theme ok, browser 266 (default port 8700 was held by another process, rerun on 8727-8729 — not a flake), security 82, private 158, ident-access 30, apps 95, pull-numbers 48, pull-ssh 20, app-token 42, reviews 98, events 52, pr-page 61, status 61, limits 53, status-keyed 13.
  11. ## Contract v1.4 covered
  12. Keyed (sha, app, context); GET statuses/pull.statuses all apps with app{id,name}; pull.required shape; removed app never met; PUT unchanged. Not covered/by design: an old-shape required row (no appId) would show "(removed app)" — live statusreq.db is empty so none exist.
  13. ## DOCS/GAP
  14. none.
  15. ## Open risks
  16. - Test decodes: status.mjs `raw` switched from latin1 to utf8 because of the "·" separator.
  17. - The select in Settings lists `apps` state (refreshes after add/remove in the page); no app → empty select, server refuses with "pick one of the apps connected".
  18. - Old-shape status rows keep their old key until the same app PUTs again; harmless (reads ignore key; new-key uniqueness cannot collide).

Branches

Latest commits

  • 26117255|||PR apps API: review comments on files with spaces in their namemre
  • b8796cecMerge branch 'f1-broken-json' into mainGitoria
  • 2f2959c5|||PR apps API: broken JSON body gives 400 invalid_json, not 500mre
  • f7c6ca07Merge branch 'ident-chooser-selector' into mainGitoria
  • 691abb8e|||PR tests: find ident identity choice without the removed .choose classmre
  • 16a3530fMerge branch 'heap-revert' into mainGitoria
  • 220a80e0|||PR Remove temporary /__heap route and heap helper; logmre
  • 13f0c342Merge branch 'hl25-records' into mainGitoria
  • a002ecb7|||PR records: HL25 report, heap helper, logmre
  • 2492a55cTemporary keyed /__heap route for the live memory snapshotmre
  • fefaedd2log: tracker PR-only, HL25 startedmre
  • 21aa57calog: parkmre
  • e9f950a8reports: G25c soakmre
  • a7783686log: deploy 9f41ffcmre
  • 9f41ffc1log: W30b mergedmre
  • bef635c1Merge branch 'w30b'mre
  • 15b996a5Org list: keyed rows by @id, newest first, concat instead of hand loopmre
  • c4f6d9e3reports: G25c growth huntmre
  • b88e39f1log: privacy cleanup donemre
  • bfd7826ddocs: neutral example organisation namemre