Skip to content

The Proposals tab decides a key that several pending proposals hold - #2379

Open
zlareb1 wants to merge 3 commits into
mainfrom
feat/proposals-shared-key
Open

zlareb1 wants to merge 3 commits into
mainfrom
feat/proposals-shared-key

Conversation

@zlareb1

@zlareb1 zlareb1 commented Dec 6, 2026 •

Copy link
Copy Markdown
Member

Do not merge yet. This merges only after a published release carries #2237, which makes memory.proposal_decide decide the pending row whose content hash the caller sent. The newest published release, v1.4.2, does not carry it. Compatibility below says what goes wrong before then.

Related: #1144
Related: #1232

Changelog category (leave one):

  • Improvement

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 Proposals tab accepts or rejects each of several pending proposals that share a key, from its own row. A batch takes one proposal of a key at a time.

Why

memory.proposal_decide decides the pending row whose content hash the caller sent (#2237). The Proposals tab still refused a key that two listed proposals share: neither row had a checkbox, and the review of either offered no decision. Such a key could be decided only from the CLI, an SDK or the API.

The tab already sends the hash for every row it decides. A review sends the content_sha256 of its full read (memory.get_by_id). A batch sends the listed hash of each rejection and the hash of the plan's read of each acceptance. The request therefore does not change, and the refusal is deleted.

The op decides one pending row per key and call, and approved_sha256 holds one hash per key, so a batch holds one row of a key. While one proposal of a key is selected, the checkbox of another proposal of that key is unavailable and the row says, under its key, "Another proposal of this key is selected; decide them one batch at a time." A Shift-click range and the select-all checkbox pass over that row, and select-all counts one row per key.

Among several pending rows of a key the server names one by the hash memory.proposals lists, and a review and an accept plan send the hash of the full read. The two differ for a value such as an object with a null field. When the hash of the read is the listed hash of another pending proposal of the key, the server decides that proposal; when two proposals of a key list one hash, it answers ambiguous. The tab therefore compares the hash it is about to send with the listed rows of the key. On a match the review shows the text, offers neither decision and gives the reason on both buttons ("Another pending proposal of this key holds this text, so a decision cannot name this one."), and an accept plan leaves the text out with the same reason. A batch rejection is not checked: it sends the listed hash, which names its own row, or neither when two rows of the key list it.

Scope and risk

  • frontend/src/views/admin/Proposals.tsx: SHARED_KEY, perKey and aloneReason are deleted. A sensitive row still has no checkbox and says why.
  • frontend/src/lib/useRowSelection.ts takes groupOf, which names the group of a row; at most one row of a group is selected. The rule is in the hook because a selection has three ways in (a tick, a range, select-all) and the hook owns all three: a rule in the panel would have to undo a selection the hook had already made. The Library, Profile and Memories lists pass no groupOf and select as before; the hook's five existing tests pass unchanged.
  • frontend/src/views/admin/Proposals.tsx: listedElsewhere says whether another listed row of a key lists the hash of a full read. The review reads it for both buttons, and the accept plan for each text it read.
  • docs/features/dashboard.md and the Proposals paragraph of docs/features/memory/writing.md describe the tab as it is. The script section of writing.md says a full-read hash that another pending proposal of the key lists names that proposal. docs/architecture/rolling-upgrades.md loses the clause that says the dashboard offers no decision on such a key.
  • Left alone: deciding two proposals of one key in one call; the notice a ?key= link to a shared key shows, which still opens none of the key's proposals; the server.
  • One case stays undecided from its review: a value whose listed and full-read hashes differ, such as an object with a null field, while another pending proposal holds its key. The server names a row among several by the listed hash (docs/features/memory/writing.md), a review sends the hash of the full read, and the answer is changed. The row's checkbox rejects it with the listed hash.
  • One case can still decide another row in place of the one read: the hash of the full read equals the stored hash of another pending proposal of the key, and the tab holds no listed hash for that proposal. The list serves no hash for a sensitive row, and a proposal can wait past the rows listed or be written after the list was read. The server then decides that proposal. When the list serves that proposal with its hash, the tab offers no decision.

Compatibility, rollout and rollback

  • This must not merge before a release that carries memory.proposal_decide decides the pending proposal whose content hash the caller sent, on a rejection as on an acceptance #2237 is published. A server without that change reads one row per key, the newest, and compares no hash on a rejection. A dashboard of this build in front of it sends the rejection of a key's older proposal, and that server rejects the key's newest proposal instead. An acceptance of the older proposal is refused there, because its hash is not the newest row's. v1.4.2, the newest published release, does not carry the change: git merge-base --is-ancestor 34d8b34ca v1.4.2 exits 1, and exits 0 for origin/main. Once the release before this one carries it, both builds of a rolling upgrade decide by hash.
  • No compatibility code: the dashboard does not read the server's version and has no fallback path.
  • Wire: none. No op, field, default, setting or migration is added or changed, and the dashboard calls no new op.
  • Operator steps: none.
  • Rollback: a revert restores the refusal. It leaves no rows, migrations or generated files behind.

Tests

No ClickHouse or server was needed: the change is in the dashboard and three docs pages.

  • frontend/src/views/admin/Proposals.test.tsx, 99 tests, all pass (npx vitest run --maxWorkers=2).
    • "a shared key is decided from its row": opens the second of two rows under one key, rejects it and asserts the request names that row's hash, then accepts the other under its own. Before the change it failed on expect(element).not.toHaveAttribute("aria-disabled").
    • "the sibling of a selected row cannot be selected": with one row of a key ticked, the other's checkbox is disabled and described by the reason, a click and Space on its row select nothing, select-all reads "Select all 2 on this page" over three rows and leaves it out, and the reject plan sends one hash for the key. Before the change it failed on Unable to find an accessible element with the role "checkbox" and name "Select deploy_window".
    • "a link to a shared key shows the notice": passes before and after.
    • Added beside them: "a Shift-click over the sibling of a selected row leaves it out", "unticking a row gives its sibling's checkbox back" and "a sensitive row takes no checkbox and says why".
    • "offers no decision on a text that another listed proposal of its key lists": the full read of the first of two rows under one key answers the hash listed for the second. Both buttons of its review are unavailable with the reason and a click sends nothing; the second row's review rejects it under its own hash. Without the check it failed on expect(element).toHaveAttribute("aria-disabled", "true").
    • "leaves out of the acceptance a text that another listed proposal of its key lists": the accept plan over that row and a row of another key says "Left out." with the reason and sends the other row alone. Without the check it failed on expect(element).toHaveTextContent().
  • frontend/src/lib/useRowSelection.test.tsx, 7 tests, 2 added: one row of a group on a tick and on select-all, and a range that passes over the other row of a group and takes the row clicked.
  • Before the check was added, with those two files, src/lib/callReason.test.ts, src/lib/canCall.test.ts, src/callBudget.test.tsx, src/views/copy.rules.test.ts, and the tests of the other lists that select rows (Documents.lists, Documents.drag, Documents.all, Recent.lists, Recent.deleted, Profile.lists) and admin/ReviewQueue.test.tsx: 13 files, 357 passed. With the check, which changes Proposals.tsx alone: Proposals.test.tsx, admin/ReviewQueue.test.tsx, src/views/copy.rules.test.ts and src/callBudget.test.tsx, 4 files, 211 passed.
  • npm --prefix frontend run build: built. npm --prefix frontend run budget: OK, the index chunk is 112.4 kB of 120 kB, as on main; boot scripts 186.9 kB gzipped, stylesheets 38.0 kB gzipped. No budget is raised, and the route call budget stays 14: the change adds no call.
  • Biome 2.5.14: lint frontend/src and format . reported no fixes before the check was added; with it, format on Proposals.tsx and Proposals.test.tsx and lint frontend/src/views/admin report none. Prettier 3.9.9 --check on docs/features/dashboard.md, docs/features/memory/writing.md and docs/architecture/rolling-upgrades.md: clean.
  • tests/unit/test_public_copy.py, test_doc_links.py, test_i18n.py, test_agent_instructions.py, test_package_contracts.py, test_op_transport_contract.py, test_tunable_constants.py, test_store_names_refused.py, test_degraded_unnoted.py and tests/analyzer: 1193 passed, 12 skipped, 1 failed. The failure is test_degraded_unnoted.py::test_every_broad_handler_notes_its_fallback_or_says_why_it_need_not, which names a handler in server/code/app/index/review_brief_build.py; it fails on main without this change, and this change touches no Python file.
  • ruff check on the paths make lint names: all checks passed. make typecheck: the mypy gate reports 0 errors, and mypy --strict sdk/python/loom reports no issues.
  • main was merged once before the first push, with no conflict. git merge-tree --write-tree origin/main HEAD reports no conflict at the head.

Not run: the full dashboard suite, the Playwright run, the full unit and integration suites (CI runs them), and no benchmark.

AI assistance in the code (leave one; writing this description with AI is fine):

Checklist

  • Local format, lint, type checks and focused tests pass. The full make test-unit and applicable integration results are reported by CI; a full local run is not required before pushing.
  • Generated files are regenerated in this PR, not by hand: the SDK op tables, docs/reference/configuration.md and the docs/reference/ tables (python scripts/codegen/docs_reference.py), the reach manifest, schemas/schema.sql (make schema-dump), the Codex plugin copies (python3 scripts/codegen/agent_plugin_sync.py) and the standalone skill bundles (python3 scripts/codegen/standalone_skills.py).
  • A new migration is additive and numbered after the latest on main; no merged migration is edited.
  • A behaviour change to any file a plugin ships (hooks/, lib/, bin/, skills/, .mcp.json, the Codex plugin-defaults.json) bumps both plugin manifests' version, and no other open PR uses that version.
  • The frontend builds (npm --prefix frontend run build) and its tests pass, if frontend/ changed.
  • Docs under docs/ describe the system as it now is, and this description names any operator steps and wire changes.
  • Repository text has no dates, people, host names, internal namespaces, ticket or decision numbers; the history goes in this description (tests/unit/test_public_copy.py).
  • Commits are signed off (git commit -s), as CONTRIBUTING.md asks.
  • I signed the Contributor License Agreement (CLA) if CLA assistant requested a signature.

🤖 Generated with Claude Code

zlareb1 and others added 2 commits December 6, 2026 09:48
memory.proposal_decide decides the pending row whose content hash the caller
sent, and the tab sends that hash for every row it decides: a review sends the
hash of its full read, a batch the listed hash of each rejection and the hash of
the plan's read of each acceptance. The tab therefore offers both decisions on a
key that two listed proposals share, and such a row takes a checkbox.

A call decides one pending row per key, so a batch holds one row of a key.
useRowSelection takes groupOf: a tick, a Shift-click range and the select-all
checkbox pass over a row while another row of its group is selected. The row
passed over keeps its checkbox, unavailable, and says why under its key.

A server without the decide-by-hash change rejects the newest row of a key,
whichever proposal was read, so this follows a release that carries it.

Signed-off-by: Mohammad Lareb Zafar <lareb.zafar@clickhouse.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Mohammad Lareb Zafar <lareb.zafar@clickhouse.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@vercel

vercel Bot commented Dec 6, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
loom-docs Ready Ready Preview Dec 6, 2026 10:25am UTC
loom-telemetry Ready Ready Preview Dec 6, 2026 10:25am UTC

Request Review

…l of the key lists

Among several pending rows of a key the server names one by the hash
`memory.proposals` lists. A review and an accept plan send the hash of the
full read, which differs from the listed hash for a value such as an object
with a null field. When that hash is the listed hash of another pending
proposal of the key, the server decides that proposal instead of the one
read. When two proposals of a key list one hash, it answers `ambiguous`.

In that case the review offers neither decision and gives the reason on
both buttons, and an accept plan leaves the text out with the same reason.
The check covers the rows the list holds with a hash: a sensitive row and a
row past the listed ones are not seen.

`docs/features/memory/writing.md` says each of several pending proposals of
a key is decided from its own row, that only a `high` row has no checkbox
and that a batch takes one row of a key, in place of the refusal the tab no
longer makes. Its script section says a full-read hash that another pending
proposal of the key lists names that proposal.

Signed-off-by: Mohammad Lareb Zafar <lareb.zafar@clickhouse.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant