gitoria
All repositories: gitoria
3.0 KB
# W46b — statuses keyed by app + context (gitoria#46, contract v1.4)Branch `w46b-keyed` (worktree /media/STORAGE/claude-scratch/gitoria/W46b/wt), base 9678a8f. Not pushed, not deployed.## Built- 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).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).- components/settings.hl: an App `select` (options from the connected apps, value = app id) + context input; list shows "App name · context".- 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.- Commits: "gitoria#46: statuses keyed by app + context, required = app + context, old rows still read"; "gitoria#46: fix a label in the keyed gate".## Gates (LC_ALL=C), all 0 failedsignin-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.## Contract v1.4 coveredKeyed (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.## DOCS/GAPnone.## Open risks- Test decodes: status.mjs `raw` switched from latin1 to utf8 because of the "·" separator.- 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".- 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
- 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