Repository navigation
Conversation
…ns and accepts nothing Under an owner-set `auto` policy, `run.grade` rejects a proposal once its failed graded runs reach `reject_after_fails`. No policy accepts a proposal: a human administrator who is not its proposer accepts it with `memory.proposal_decide`. Field comments, the `RunGradeInput` docstring, the `memory.proposals` tool description, the Python SDK's `grade` docstring, three docs pages and the dashboard's grade toast said the policy accepts or "decides", so a reader expected a fact to go live without review. Text only: no op, field, type, default or statement changes. The toast after a grade reads "N proposal(s) rejected", and the test fixtures that stubbed a policy acceptance answer `reject`, the only decision `apply_policy` returns. The reference pages and the Go SDK's schema digest are regenerated. 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.
|
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.
Related: #2152
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 descriptions of
proposal_policy,run.grade,memory.set(proposed=true)andmemory.proposalssay what the policy does: under an owner-setautomode a grade rejects a proposal once its failed graded runs reachreject_after_fails, and no policy accepts one. The dashboard's toast after a grade reads "N proposals rejected".Why
Only a human administrator who is not the proposer accepts a proposal, with
memory.proposal_decide. The namespace'sproposal_policyin modeautodoes one thing: onrun.grade,apply_policy(server/memory/app/proposals.py) rejects a proposal whose failed graded runs reachreject_after_fails(0 = never). It never passesaccepttodecide, anddeciderefuses an acceptance from any caller that is not an independent human administrator.Field descriptions, one MCP tool description, a docstring of the Python SDK, three docs pages, code comments and one toast said the policy accepts a proposal, or that it "decides" one. A model that reads
memory.set'sproposedfield, or a person who reads thenamespace.registerreference, expected a fact to go live on graded runs without a review, and a grade toast that said "2 proposals decided" read as a possible acceptance.Each text states one of three facts:
autopolicy,run.graderejects a proposal once its failed graded runs reachreject_after_fails(0 = never);memory.proposal_decide;readyonmemory.proposals:accept= enough passes for a person to review,reject= at the fail limit.Scope and risk
Text only. No op, field, type, default, handler, statement, table or setting changes.
NamespaceRegisterInput.proposal_policy(server/identity/api/models.py)RunGradeInputdocstring (server/tasks/api/models_run.py)RunGradeOutput.proposals_decidedautopolicy rejected on this gradeRunGradeProposal.decisionrejectMemorySetInput.proposed(models_crud.py)MemorySearchInput.include_proposed(models_search.py)MemoryProposalsInput.only,MemoryProposal.ready(models_proposals.py)readyProposalPolicy.mode(server/memory/domain/proposal_policy.py)autodoesmemory.proposalsinserver/transport/mcp_descriptions.pyready; the first sentence is 197 characters of the 200 the reference printsapply_policydocstring, thePROPOSED_STATUScomment intemporal_sql.pyRunClient.gradedocstring (sdk/python/loom/run.py, written by hand)frontend/src/api/runs.ts,frontend/src/api/review.ts,frontend/src/views/admin/Proposals.tsxreadyfrontend/src/flows/RunGrade.tsxdocs/features/namespaces-and-sharing.mdproposal_policyrow states all three factsdocs/features/observability/audit.mdmemory.proposal_rejectrow can be the policy's, so the note about the policy's mode and thresholds names that rowdocs/concepts/memory.mdproposed --> rejected: run.grade (auto policy, at reject_after_fails)tests/unit/test_proposals.pydocstring,tests/unit/test_graded_runs.py,frontend/src/flows/RunGrade.test.tsxreject, the only valueapply_policyreturnsGenerated:
docs/reference/operations.mdandoperations/memory.md(memory.proposalssummary andonly,proposedonmemory.setandmemory.pin,include_proposedonmemory.searchandmemory.search_trace),operations/namespace.md(namespace.register),operations/run.md(run.grade), and line 2 ofsdk/go/wire/models.gen.go, the digest of the JSON schema, which carries theRunGradeInputdocstring. No other SDK file moves: a field comment is not in the JSON schema, and the Python, TypeScript and Ruby generators read only a docstring's first line.The one string a user sees is the toast. Rejection is the only outcome a grade can report, so "rejected" is exact for every count.
Left alone:
RunGradeProposal.decisionis stillLiteral["accept", "reject"]on the wire and in the dashboard's type. The server never sendsaccept; narrowing the type changes the generated SDKs and is a wire change of its own.i18n/carry the older English. Translations are not edited by hand; the translation workflow queues them once the English pages merge.MemoryProposal.readykeeps its name and its values.Risk: none to stored data, auth or tenant isolation. No code reads the toast text.
memory.proposalsis not in the default MCP tool listing, so its description does not count toward the listing's token ceiling.Compatibility, rollout and rollback
descriptionofRunGradeInputin the JSON schema is the reworded docstring.Tests
Changed first, then the code:
frontend/src/flows/RunGrade.test.tsx: the two cases that read the toast expect "2 proposals rejected" and "1 proposal rejected", and their mockedproposals_decidedentries answerreject. With the toast unchanged: 2 failed, 4 passed. With it changed: 6 passed. The test fails when the toast says "decided".tests/unit/test_graded_runs.py: theapply_policystub answers("lesson_a", "reject", GradedCounts(fails=2))and the test readsdecisionandfailsfromproposals_decided. It fails whenrun.gradereports a policy decision other than the one the policy returned.Run on the head:
pytest -n 2 tests/unit/test_proposals.py tests/unit/test_graded_runs.py tests/unit/test_docs_reference.py tests/unit/test_public_copy.py tests/unit/test_doc_links.py tests/unit/test_mcp_listing_budget.py tests/unit/test_sdk_parity.py: 525 passed.pytest -n 2 tests/unit/test_mcp_assistant_toolset.py tests/unit/test_proposal_triage.py tests/unit/test_proposals_read_scope.py tests/unit/test_mcp_coding_toolset.py tests/unit/test_mcp_initialize_surface.py tests/unit/test_memory_set_proposed.py tests/unit/test_call_site_knobs.py tests/unit/test_hidden_op_says_why.py: 275 passed, 11 skipped.test_package_contracts.py,test_op_transport_contract.py,test_tunable_constants.py,test_store_names_refused.py,test_degraded_unnoted.py,test_public_copy.py,test_doc_links.py,test_agent_instructions.py) withtests/analyzer: 601 passed, 12 skipped. Two of the skipped are the analyzer tests that need a ClickHouse; the diff has no statement.make typecheck: the mypy gate reports 0 errors andmypy --strict sdk/python/loompasses.ruff formatandruff checkon the changed Python files, andruff check server extractor sdk/python tests scripts .claude: pass. The function-length and secret gates pass.make lintexcept the two Rust ones passes:sdk_py_gen,sdk_py_client_gen,sdk_py_admin_gen,sdk_ts_gen,sdk_rb_gen,sdk_go_gen,agent_plugin_sync,standalone_skills,served_skills,settings_reference,settings_schema,settings_example,docs_reference,op_reach_census.npm --prefix frontend run test -- src/flows/RunGrade.test.tsx src/views/admin/Proposals.test.tsx src/api/review.test.ts src/api/runs.test.ts: 47 passed.npm --prefix frontend run buildbuilds andnpm --prefix frontend run budgetprintsbundle-budget: OK. Biome's format check on the five changed files andbiome lint frontend/srcpass.i18n/for "accept or reject", "accepted or rejected", "lets loom accept", "would decide now", "policy decided" and "proposals decided" finds only the human review path, a typed-record schema test, a task transition and a benchmark judge's prompt.Tools this machine lacks:
gofmt,rustfmtandshfmtare not installed.gofmtfrom thegolang:1.27.4image, the version CI installs. Its diff is the digest line; the other 13,507 lines ofmodels.gen.goand all ofclient.gen.goare unchanged.sdk_rust_gen --checkandsdk_rust_gen --fixtures --checkdid not run. The Rust generator reads no description, so its output cannot move; CI checks it.make format-checkdid not run as one target, since it needsshfmt; ruff, Biome and Prettier ran on the changed files, and the diff has no shell or TOML file.Not run: the integration suite, since no handler or statement changed and no ClickHouse or server was started; the full unit suite and the Playwright run, which CI runs.
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 from an agreed design, changed the two tests before the code, and ran the checks listed under Tests. It read
apply_policy,policy_verdictanddecideto check each sentence against what the code does, measured each reworded first sentence against the length the reference prints, and read the regenerated diff line by line. No person has reviewed it yet.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
Note
Low Risk
Documentation, comments, and UI copy only; no handler, wire, or default changes.
Overview
Corrects misleading copy that implied
proposal_policyinautomode could accept proposals when graded runs pass thresholds. The diff retires that framing everywhere it appeared.Policy behavior (now stated explicitly): under
auto,run.grademay reject a proposal once failed graded runs reachreject_after_fails; no policy accepts—only a human administrator who is not the proposer does, viamemory.proposal_decide.memory.proposalsready:acceptmeans enough passes for person review, not automatic promotion;rejectmeans at the fail limit.Touches generated and hand-written API reference, namespace registration docs, memory lifecycle diagram (adds
proposed → rejectedonrun.grade), server model/MCP comments, Python SDKRunClient.gradedocstring, frontendRunGradetoasts ("N proposals rejected"), and tests that mocked policy outcomes asaccept.Reviewed by Cursor Bugbot for commit d317c3e. Bugbot is set up for automated code reviews on this repo. Configure here.