~bigbes/sr-ht-dolt · parade

main · last commit 6 hours ago · ti41arbu

← Back to the parade

sr-ht-dolt-m63 db: enumerate the databases a caller may list across owners Past Stand

status: closed P2 task
bd reopen sr-ht-dolt-m63
Created byEugene Blikh
Ownerbigbes@gmail.com
Created2026-08-13T05:24:22Z
Started2026-08-13T05:27:41Z
Updated2026-08-13T05:31:43Z
Closed2026-08-13T05:31:43Z
Description
There is no instance-wide listing query today: db/repos.go has ListReposByOwner(owner, viewer) (the listing rule, anonymity included) and ListReposForDashboard(userID) (owned or ACL'd), and nothing that answers "every database this caller may list". Two consumers need exactly that: mcpsrv list_databases had to take an optional owner and refuse anonymous+no-owner rather than state something false about the instance (dcdc979), and the cross-database ready page cannot find the beads trackers without it.
Design
Add the query to db/repos.go next to its two siblings, spelled with the same listing rule ListReposByOwner documents: PUBLIC to everyone, plus anything the viewer owns or holds an ACL entry on; UNLISTED and PRIVATE never listed to a stranger. Then widen mcpsrv.Repos and web's RepoStore seam to it.
Acceptance criteria
A table-driven db test over PUBLIC/UNLISTED/PRIVATE x anonymous/stranger/grantee/owner; list_databases with no owner answers the caller-wide listing instead of refusing.

Depends on

No outgoing dependencies.

Depended on by

Unblocks — everything waiting on this, transitively

  • sr-ht-dolt-44n.5 — /ready: the cross-database ready page blocks closed
  • sr-ht-dolt-44n.6 — Cross-database issue links in rendered text blocks closed
  • sr-ht-dolt-0qf.7 — mcpsrv: ready_work across every visible beads database blocks closed

No comments.

Close reason

Landed in e6125fc: ListReposForViewer — ListReposByOwner's predicate minus the owner filter, anonymity spelled as viewer id 0 (unsatisfiable in both non-PUBLIC branches). Matrix asserts exact ordered listings for anonymous/stranger/grantee/both owners; mutation-checked.
  • Eugene Blikh created the issue · 2026-08-13T08:24:22Z
  • Eugene Blikh sr-ht-dolt-44n.5 now depends on this · 2026-08-13T08:24:50Z
  • Eugene Blikh changed status to in_progress · 2026-08-13T08:27:40Z
  • Eugene Blikh closed the issue · 2026-08-13T08:31:43Z
    Landed in e6125fc: ListReposForViewer — ListReposByOwner's predicate minus the owner filter, anonymity spelled as viewer id 0 (unsatisfiable in both non-PUBLIC branches). Matrix asserts exact ordered listings for anonymous/stranger/grantee/both owners; mutation-checked.
Stored rows — what this pane was built from, as read
issues 1 row
id sr-ht-dolt-m63
content_hash 01bf9d94009de75026c5dc23458e4967ef854881497fdcd59aa564926713fdb4
title db: enumerate the databases a caller may list across owners
description There is no instance-wide listing query today: db/repos.go has ListReposByOwner(owner, viewer) (the listing rule, anonymity included) and ListReposForDashboard(userID) (owned or ACL'd), and nothing that answers "every database this caller may list". Two consumers need exactly that: mcpsrv list_databases had to take an optional owner and refuse anonymous+no-owner rather than state something false about the instance (dcdc979), and the cross-database ready page cannot find the beads trackers without it.
design Add the query to db/repos.go next to its two siblings, spelled with the same listing rule ListReposByOwner documents: PUBLIC to everyone, plus anything the viewer owns or holds an ACL entry on; UNLISTED and PRIVATE never listed to a stranger. Then widen mcpsrv.Repos and web's RepoStore seam to it.
acceptance_criteria A table-driven db test over PUBLIC/UNLISTED/PRIVATE x anonymous/stranger/grantee/owner; list_databases with no owner answers the caller-wide listing instead of refusing.
notes
status closed
priority 2
issue_type task
assignee NULL
estimated_minutes NULL
created_at 2026-08-13T05:24:22Z
created_by Eugene Blikh
owner bigbes@gmail.com
updated_at 2026-08-13T05:31:43Z
closed_at 2026-08-13T05:31:43Z
closed_by_session
external_ref NULL
spec_id
compaction_level 0
compacted_at NULL
compacted_at_commit NULL
original_size NULL
sender
ephemeral 0
wisp_type
pinned 0
is_template 0
mol_type
work_type
source_system
metadata �{}
source_repo
close_reason Landed in e6125fc: ListReposForViewer — ListReposByOwner's predicate minus the owner filter, anonymity spelled as viewer id 0 (unsatisfiable in both non-PUBLIC branches). Matrix asserts exact ordered listings for anonymous/stranger/grantee/both owners; mutation-checked.
event_kind
actor
target
payload
await_type
await_id
timeout_ns 0
waiters
hook_bead
role_bead
agent_state
last_activity NULL
role_type
rig
due_at NULL
defer_until NULL
no_history 0
started_at 2026-08-13T05:27:41Z
is_blocked 0
dependencies 1 row
id d0a85755-2590-54c5-97e6-17600c965e6d
issue_id sr-ht-dolt-44n.5
type blocks
created_at 2026-08-13T08:24:50Z
created_by Eugene Blikh
metadata �{}
thread_id
depends_on_issue_id sr-ht-dolt-m63
depends_on_wisp_id NULL
depends_on_external NULL
events 3 rows
id 019ff994-2090-7347-af6a-99c3f4fda901
issue_id sr-ht-dolt-m63
event_type created
actor Eugene Blikh
old_value
new_value
comment NULL
created_at 2026-08-13T08:24:22Z
id 019ff997-2816-77e3-83ef-a23fe9d443d5
issue_id sr-ht-dolt-m63
event_type status_changed
actor Eugene Blikh
old_value {"id":"sr-ht-dolt-m63","title":"db: enumerate the databases a caller may list across owners","description":"There is no instance-wide listing query today: db/repos.go has ListReposByOwner(owner, viewer) (the listing rule, anonymity included) and ListReposForDashboard(userID) (owned or ACL'd), and nothing that answers \"every database this caller may list\". Two consumers need exactly that: mcpsrv list_databases had to take an optional owner and refuse anonymous+no-owner rather than state something false about the instance (dcdc979), and the cross-database ready page cannot find the beads trackers without it.","design":"Add the query to db/repos.go next to its two siblings, spelled with the same listing rule ListReposByOwner documents: PUBLIC to everyone, plus anything the viewer owns or holds an ACL entry on; UNLISTED and PRIVATE never listed to a stranger. Then widen mcpsrv.Repos and web's RepoStore seam to it.","acceptance_criteria":"A table-driven db test over PUBLIC/UNLISTED/PRIVATE x anonymous/stranger/grantee/owner; list_databases with no owner answers the caller-wide listing instead of refusing.","status":"open","priority":2,"issue_type":"task","owner":"bigbes@gmail.com","created_at":"2026-08-13T05:24:22Z","created_by":"Eugene Blikh","updated_at":"2026-08-13T05:24:22Z"}
new_value {"status":"in_progress"}
comment NULL
created_at 2026-08-13T08:27:40Z
id 019ff99a-dbdd-7e01-913c-1cab4c36e2d1
issue_id sr-ht-dolt-m63
event_type closed
actor Eugene Blikh
old_value
new_value Landed in e6125fc: ListReposForViewer — ListReposByOwner's predicate minus the owner filter, anonymity spelled as viewer id 0 (unsatisfiable in both non-PUBLIC branches). Matrix asserts exact ordered listings for anonymous/stranger/grantee/both owners; mutation-checked.
comment NULL
created_at 2026-08-13T08:31:43Z