Skip to content

The proposal policy's descriptions say what it does: it rejects on failed graded runs and accepts nothing - #2201

Open
zlareb1 wants to merge 1 commit into
mainfrom
docs/proposal-policy-says-what-it-does
Open

zlareb1 wants to merge 1 commit into
mainfrom
docs/proposal-policy-says-what-it-does

Conversation

@zlareb1

@zlareb1 zlareb1 commented Dec 5, 2026 •

Copy link
Copy Markdown
Member

Related: #2152

Changelog category (leave one):

  • Documentation (changelog entry is not required)

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) and memory.proposals say what the policy does: under an owner-set auto mode a grade rejects a proposal once its failed graded runs reach reject_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's proposal_policy in mode auto does one thing: on run.grade, apply_policy (server/memory/app/proposals.py) rejects a proposal whose failed graded runs reach reject_after_fails (0 = never). It never passes accept to decide, and decide refuses 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's proposed field, or a person who reads the namespace.register reference, 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:

  • the policy: under an owner-set auto policy, run.grade rejects a proposal once its failed graded runs reach reject_after_fails (0 = never);
  • acceptance: no policy accepts a proposal; a human administrator who is not its proposer accepts it with memory.proposal_decide;
  • ready on memory.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.

Place What it says
NamespaceRegisterInput.proposal_policy (server/identity/api/models.py) the policy and acceptance, with the policy in the first sentence, which is the one the reference prints
RunGradeInput docstring (server/tasks/api/models_run.py) the policy and acceptance; the first paragraph is unchanged, so the op summary and the SDK docstrings made from it do not move
RunGradeOutput.proposals_decided the proposals the auto policy rejected on this grade
RunGradeProposal.decision a comment: always reject
MemorySetInput.proposed (models_crud.py) live only once a human administrator who is not the proposer accepts it; the policy's rejection
MemorySearchInput.include_proposed (models_search.py) a human administrator accepts a fact on trial, no policy does
MemoryProposalsInput.only, MemoryProposal.ready (models_proposals.py) the two values of ready
ProposalPolicy.mode (server/memory/domain/proposal_policy.py) a comment on what auto does
memory.proposals in server/transport/mcp_descriptions.py the two values of ready; the first sentence is 197 characters of the 200 the reference prints
apply_policy docstring, the PROPOSED_STATUS comment in temporal_sql.py the policy and acceptance
RunClient.grade docstring (sdk/python/loom/run.py, written by hand) the policy
frontend/src/api/runs.ts, frontend/src/api/review.ts, frontend/src/views/admin/Proposals.tsx comments: the policy rejects; the two values of ready
frontend/src/flows/RunGrade.tsx the comment, and the toast: "N proposal(s) rejected" where it said "decided"
docs/features/namespaces-and-sharing.md the proposal_policy row states all three facts
docs/features/observability/audit.md only a memory.proposal_reject row can be the policy's, so the note about the policy's mode and thresholds names that row
docs/concepts/memory.md the lifecycle diagram gains the edge proposed --> rejected: run.grade (auto policy, at reject_after_fails)
tests/unit/test_proposals.py docstring, tests/unit/test_graded_runs.py, frontend/src/flows/RunGrade.test.tsx the stubs and mocks of a policy decision answer reject, the only value apply_policy returns

Generated: docs/reference/operations.md and operations/memory.md (memory.proposals summary and only, proposed on memory.set and memory.pin, include_proposed on memory.search and memory.search_trace), operations/namespace.md (namespace.register), operations/run.md (run.grade), and line 2 of sdk/go/wire/models.gen.go, the digest of the JSON schema, which carries the RunGradeInput docstring. 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.decision is still Literal["accept", "reject"] on the wire and in the dashboard's type. The server never sends accept; narrowing the type changes the generated SDKs and is a wire change of its own.
  • The translated pages under i18n/ carry the older English. Translations are not edited by hand; the translation workflow queues them once the English pages merge.
  • MemoryProposal.ready keeps its name and its values.

Risk: none to stored data, auth or tenant isolation. No code reads the toast text. memory.proposals is not in the default MCP tool listing, so its description does not count toward the listing's token ceiling.

Compatibility, rollout and rollback

  • Wire: no op or field added, changed or removed, and no default changed. The description of RunGradeInput in the JSON schema is the reworded docstring.
  • Operator steps: none.
  • Rolling upgrade: nothing on the wire changes shape; a build one release behind serves the older descriptions.
  • Rollback: reverting restores the older text and the previous Go digest line. Nothing is stored.

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 mocked proposals_decided entries answer reject. 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: the apply_policy stub answers ("lesson_a", "reject", GradedCounts(fails=2)) and the test reads decision and fails from proposals_decided. It fails when run.grade reports 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.
  • The repository-wide scans (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) with tests/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 and mypy --strict sdk/python/loom passes.
  • ruff format and ruff check on the changed Python files, and ruff check server extractor sdk/python tests scripts .claude: pass. The function-length and secret gates pass.
  • Every generator check of make lint except 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 build builds and npm --prefix frontend run budget prints bundle-budget: OK. Biome's format check on the five changed files and biome lint frontend/src pass.
  • Prettier's check on the seven changed Markdown pages passes.
  • A search of the tree outside 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, rustfmt and shfmt are not installed.

  • The Go generator ran with gofmt from the golang:1.27.4 image, the version CI installs. Its diff is the digest line; the other 13,507 lines of models.gen.go and all of client.gen.go are unchanged.
  • sdk_rust_gen --check and sdk_rust_gen --fixtures --check did not run. The Rust generator reads no description, so its output cannot move; CI checks it.
  • make format-check did not run as one target, since it needs shfmt; 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_verdict and decide to 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

  • 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


Note

Low Risk
Documentation, comments, and UI copy only; no handler, wire, or default changes.

Overview
Corrects misleading copy that implied proposal_policy in auto mode could accept proposals when graded runs pass thresholds. The diff retires that framing everywhere it appeared.

Policy behavior (now stated explicitly): under auto, run.grade may reject a proposal once failed graded runs reach reject_after_fails; no policy accepts—only a human administrator who is not the proposer does, via memory.proposal_decide. memory.proposals ready: accept means enough passes for person review, not automatic promotion; reject means at the fail limit.

Touches generated and hand-written API reference, namespace registration docs, memory lifecycle diagram (adds proposed → rejected on run.grade), server model/MCP comments, Python SDK RunClient.grade docstring, frontend RunGrade toasts ("N proposals rejected"), and tests that mocked policy outcomes as accept.

Reviewed by Cursor Bugbot for commit d317c3e. Bugbot is set up for automated code reviews on this repo. Configure here.

…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>
@vercel

vercel Bot commented Dec 5, 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 5, 2026 4:10am UTC
loom-telemetry Ready Ready Preview Dec 5, 2026 4:10am UTC

Request Review

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