Repository navigation
The Review queue counts pending proposals and stays listed for admins - #1717
Conversation
A badge needs the number, not the rows. count_only answers total from one count() over the pending proposals the caller may read, with prefix and tags applied, past the listing's scan cap and with no value, graded count or policy read. It refuses only=ready, which needs each row's verdict. The generated SDKs, the MCP description and the operation reference carry the field. Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
The entry is listed for every admin of a memory namespace, so an empty queue or a failed count still leaves it reachable. Its count is the review items waiting, open conflicts plus pending proposals from memory.proposals count_only, and its accessible name gives each kind or says which one could not be counted. The phone's More sheet and the closed Admin button read the same entry. Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
With proposals pending and no open conflict, the queue starts on its Proposals tab, and a tab the person picks stays until the namespace changes. A decision lowers the sidebar's proposal count at once instead of at its next read. The dashboard guide describes the entry and its count. Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
zlareb1
left a comment
There was a problem hiding this comment.
A proposal decision can change the Review queue count for a different namespace.
zlareb1
left a comment
There was a problem hiding this comment.
The format job fails on the same adoption page assignment as clean main. The pinned formatter passes with the tracked repair. PR format job · Main format job · Repair #1706
zlareb1
left a comment
There was a problem hiding this comment.
The rename report integration test fails at the same assertion on this head and on clean main. The tagged fixture describes a naming claim, so the planner returns about_naming. The same test passes with the fixture repair. PR job · Main job · Repair #1719
…queue-count Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
…d listing apart Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
…m the same read Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
… again after a decision Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
zlareb1
left a comment
There was a problem hiding this comment.
The decision callback no longer adjusts another namespace’s badge directly. The refreshed code still has a cached-count race, and the new count-only path needs to preserve authorization order and report the correct response fields.
zlareb1
left a comment
There was a problem hiding this comment.
ClickHouse expires the adoption directory test’s fixed snapshot rows before the view reads them. Clean main reproduces the failure. The test passes with UTC-relative fixture dates. Failed unit job · Repair #1740
zlareb1
left a comment
There was a problem hiding this comment.
The unit gate reports the same duplicate coverage row limit on this head's CI merge tree and on clean main. The coverage repair keeps the store's bounds and removes the duplicate limit. The gate passes with the separate docstring repair applied locally. Failed unit job · Coverage repair #1722
…ce grant check Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
…e polls read the cache Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
zlareb1
left a comment
There was a problem hiding this comment.
The authorization and policy fixes are present on this head. The Review queue can still show a rejected proposal after a decision.
Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
… Review queue cache Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
zlareb1
left a comment
There was a problem hiding this comment.
A fresh count now reads with sequential consistency and an older count cannot overwrite a newer count in the same namespace. The cross-namespace invalidation finding remains on this head. I traced the completion order through the cache: a fresh read for B can return zero, leave B's cached one in place after a decision in A, and let the next poll show one again. Scope invalidation to the affected namespace and test this interleaving.
zlareb1
left a comment
There was a problem hiding this comment.
The sender census reports the same stale plugin client fingerprints on this CI merge and on clean main. The test passes locally with both fingerprint repairs. PR job · Main job · Plugin repair #1773 · SDK repair #1706
The extraction classification test also fails on main because changed_files has no content classification. PR job · Repair #1747
zlareb1
left a comment
There was a problem hiding this comment.
GitHub reports a merge conflict with main in sdk/rust/src/wire_models.rs. Please resolve it and regenerate the Rust wire models so CI can validate the merge.
Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
zlareb1
left a comment
There was a problem hiding this comment.
A decision now invalidates only its own namespace’s cached counts. The regression verifies that a fresh count in another namespace replaces its stale value. All 630 focused tests pass.
GitHub reports conflicts in sdk/rust/src/wire_models.rs and tests/analyzer/cases/planes.py. Please resolve both and regenerate the Rust wire models so CI can validate the merge.
…queue-count Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com> # Conflicts: # sdk/rust/src/wire_models.rs # tests/analyzer/cases/planes.py
|
Thank you for the approval. I merged main in d358af1. In |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
Reviewed by Cursor Bugbot for commit d358af1. Configure here.
Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
zlareb1
left a comment
There was a problem hiding this comment.
The sidebar count race blocks approval on this head. I traced a same-namespace refresh of whoami while the post-decision count is in flight. Cleanup discards the fresh result, but the replacement request sees the decision as already counted and can cache an older replica’s answer. Keep the refresh pending until its fresh result is applied, and cover the interrupted request in the sidebar test.
zlareb1
left a comment
There was a problem hiding this comment.
The interrupted-read regression passes. A failed fresh read can still consume the decision and let a cached count bring back the rejected proposal badge.
zlareb1
left a comment
There was a problem hiding this comment.
The conflict resolver's attestation test fails at the same superseder assertion on this CI merge and on clean main with ClickHouse 26.11.5.8. Repair #1781 keeps the timestamp assertion at equal standing and tests the lower-standing refusal separately. The integration shard passes on the repair. PR job · Main job · Repair · Passing shard
Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
zlareb1
left a comment
There was a problem hiding this comment.
A refused count leaves the decision pending until a fresh count is shown. The regression verifies that the retry requests a fresh count and that the following poll uses the cache. All 130 focused Sidebar, Review queue, and Proposals tests pass.

Closes: #1141
Changelog category (leave one):
Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):
The dashboard's Review queue is always listed for a namespace admin, and its count now includes pending proposals.
conflicts.listwithcount_onlyalso answersproposals, andmemory.proposalstakescount_onlyfor an exact count of the proposals waiting.Why
Pending proposals had no effect on the Review queue entry. A namespace with only proposals waiting showed no entry at all, and the badge counted only conflicts. The listing's
totalstops atmemory_proposals_scan_cap, so a correct count needs its own bounded read rather than a page of rows.Scope and risk
conflicts.listcount now reads both numbers in one statement. It is onecountIfpass over the namespace's conflicted and proposed rows underFINAL, in the caller's read scope, with no value column. It answerstotalas before and addsproposals. The cached pair is dropped by a resolve as before, and now also by a proposal decision.memory.proposalsgetscount_onlyfor headless clients: one count with prefix, tags and scope applied, and no rows or graded counts. It answers the namespace's own policy frompolicy_for's minute cache, so an auto-policy namespace is not reported as manual. No stored data changes.conflicts.listread the sidebar already makes, so no route reads more than before. A failed read hides the badge, as the other badges do. The closed Admin button says how many wait ("2 to review").countIfinstead of onecount(). No new request. The startup chunk is 122,873 bytes against the 122,880 budget, on this branch and on its merge with currentmain. To fit the fresh flag, the Review queue entry is built inline inadminItems, and its badge is 0 rather than unset when nothing waits (every renderer already hides 0).Compatibility, rollout and rollback
conflicts.listgains the output fieldproposals(int or null, set withcount_only).memory.proposalsgainscount_only(bool, default false).count_onlywithonly="ready"is refused with a 422 (VALIDATION_FAILED) by the handler, after the namespace grant check, sincereadyneeds each row's verdict. A replica still on the previous build answerscount_onlywithoutproposals, and the dashboard counts the conflicts alone until it is upgraded.Tests
tests/unit/test_badge_reads.py:count_onlyanswers both counts from one cached read, a proposal decision drops only its namespace's cached counts, and the count statement reads no value column. A held count that returns after a decision or after a newer count does not refill the cache, and only a fresh count reads with sequential consistency. Both cases fail on the previous head.test_read_scope_admission.pyandtest_conflicts_resolve_scope.pyfollow the new count (one cache entry per read scope, the resolve's freshtotal).tests/unit/test_proposals.py: the count is exact past the scan cap and reads no value orLIMIT, it uses the listing's WHERE and params, and it serializes an auto-policy namespace's own policy.only="ready"withcount_onlyis refused by the handler before any read. A transport test sends that pair over HTTP and MCP: a caller outside the namespace getsAUTH_INSUFFICIENTon both and an admitted caller getsVALIDATION_FAILED. Against the previous model validator the outside caller gotVALIDATION_FAILED.memory_proposalscase drives the count and the listing, each with and without prefix and tags, and the conflicts ledger case drives the new count.shapes.txtgains three shapes and keeps72a96f3573e5. The corpus still differs on59f565e11882(memory_for_file), which fails the same way onmainat 2bf02e8.codeextra (numpy,tree_sitter), and the CodeQL archive test builds its paths under the macOS temp folder. None of them touches this diff.make lintsteps: ruff, the function-length gate, the secrets check and every codegen--checkpass. The mypy gate here reports only the missingnumpyandtree_sitterimports (thecodeextra is not installed on this machine).tscis clean, Biome lint is clean, and the full vitest run passes (319 files, 3,753 tests,LANG=en_US.UTF-8).Sidebar.test.tsxchecks the call order: the first poll cached, the read after a decision fresh, the next poll cached.npm run buildandnpm run budgetpass. Playwrightroute-budget.spec.ts(every route at 13 reads or fewer) andnavigation.spec.tspass (26 tests).docs/pages/adoption.astro, as onmain(The format, unit and statement-shape regression checks pass #1706). The unit failures on the last CI run aremain's too (Coverage reads report when they reach a bound #1722, The adoption snapshot test keeps fixture rows within retention #1740), and the statement corpus still differs on59f565e11882(memory_for_file) as onmain.AI assistance in the code (leave one; writing this description with AI is fine):
AI-generated (an agent wrote most of the diff): Claude Code wrote the diff and ran the checks listed under Tests.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist
make test-unitand applicable integration results are reported by CI; a full local run is not required before pushing.docs/reference/configuration.mdand thedocs/reference/tables (python scripts/codegen/docs_reference.py), the reach manifest,schemas/schema.sql(make schema-dump) and the Codex plugin copies (python3 scripts/codegen/agent_plugin_sync.py).npm --prefix frontend run build) and its tests pass, iffrontend/changed.docs/describe the system as it now is, and this description names any operator steps and wire changes.tests/unit/test_public_copy.py).git commit -s), as CONTRIBUTING.md asks.Note
Medium Risk
Touches conflict/proposal counting, replica cache invalidation, and admin badge UX; wire/API changes are additive but mixed-version replicas omit
proposalsuntil upgraded.Overview
The Review queue badge and admin nav now treat open conflicts plus pending proposals as one count, from a single
conflicts.listcall withcount_only(newproposalsfield). Namespace admins always see Review queue in the admin drawer for memory namespaces—even when empty—instead of hiding it unless conflicts or recent auto-resolutions existed.On the server, conflict badge reads use
count_review(oneFINALpass withcountIffor conflicted and proposed rows).memory.proposalsacceptscount_onlyfor an exact pending count past the list scan cap. Cached counts are dropped after a resolve or a proposal decision; fresh reads use sequential consistency and ticket logic so stale in-flight counts do not repopulate the cache.The dashboard replaces
countConflictswithcountReview, storesproposalsonAdminBadges, and bumpsreviewDecisionswhen a proposal is accepted/rejected so the sidebar refetches counts withfresh: true. The Review queue page can open on the Proposals tab once when only proposals are waiting. SDKs and operation docs are updated for the new wire fields.Reviewed by Cursor Bugbot for commit 40c5689. Bugbot is set up for automated code reviews on this repo. Configure here.