Repository navigation
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Do not merge yet. This merges only after a published release carries #2237, which makes
memory.proposal_decidedecide 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):
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_decidedecides 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_sha256of 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_sha256holds 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.proposalslists, 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 answersambiguous. 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,perKeyandaloneReasonare deleted. A sensitive row still has no checkbox and says why.frontend/src/lib/useRowSelection.tstakesgroupOf, 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 nogroupOfand select as before; the hook's five existing tests pass unchanged.frontend/src/views/admin/Proposals.tsx:listedElsewheresays 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.mdand the Proposals paragraph ofdocs/features/memory/writing.mddescribe the tab as it is. The script section ofwriting.mdsays a full-read hash that another pending proposal of the key lists names that proposal.docs/architecture/rolling-upgrades.mdloses the clause that says the dashboard offers no decision on such a key.?key=link to a shared key shows, which still opens none of the key's proposals; the server.docs/features/memory/writing.md), a review sends the hash of the full read, and the answer ischanged. The row's checkbox rejects it with the listed hash.Compatibility, rollout and rollback
git merge-base --is-ancestor 34d8b34ca v1.4.2exits 1, and exits 0 fororigin/main. Once the release before this one carries it, both builds of a rolling upgrade decide by hash.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).expect(element).not.toHaveAttribute("aria-disabled").Unable to find an accessible element with the role "checkbox" and name "Select deploy_window".expect(element).toHaveAttribute("aria-disabled", "true").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.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) andadmin/ReviewQueue.test.tsx: 13 files, 357 passed. With the check, which changesProposals.tsxalone:Proposals.test.tsx,admin/ReviewQueue.test.tsx,src/views/copy.rules.test.tsandsrc/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 onmain; 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.lint frontend/srcandformat .reported no fixes before the check was added; with it,formatonProposals.tsxandProposals.test.tsxandlint frontend/src/views/adminreport none. Prettier 3.9.9--checkondocs/features/dashboard.md,docs/features/memory/writing.mdanddocs/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.pyandtests/analyzer: 1193 passed, 12 skipped, 1 failed. The failure istest_degraded_unnoted.py::test_every_broad_handler_notes_its_fallback_or_says_why_it_need_not, which names a handler inserver/code/app/index/review_brief_build.py; it fails onmainwithout this change, and this change touches no Python file.ruff checkon the pathsmake lintnames: all checks passed.make typecheck: the mypy gate reports 0 errors, andmypy --strict sdk/python/loomreports no issues.mainwas merged once before the first push, with no conflict.git merge-tree --write-tree origin/main HEADreports 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):
AI-generated (an agent wrote most of the diff): Claude Code. Checked by reading
memory.proposal_decide's input model, handler andproposal_triage.pickonmainand the handler before memory.proposal_decide decides the pending proposal whose content hash the caller sent, on a rejection as on an acceptance #2237, by reading what the tab sends for each decision, by running the first two tests against the unchanged tab and the last two against the tab without the check, and by reading the whole diff against the dashboard rule.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), the Codex plugin copies (python3 scripts/codegen/agent_plugin_sync.py) and the standalone skill bundles (python3 scripts/codegen/standalone_skills.py).main; no merged migration is edited.hooks/,lib/,bin/,skills/,.mcp.json, the Codexplugin-defaults.json) bumps both plugin manifests' version, and no other open PR uses that version.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.🤖 Generated with Claude Code