Repository navigation
Accepting a proposal on a key a required regression suite covers needs satisfied checks for its exact content - #2363
Conversation
…s satisfied checks for its content `knowledge.suites.publish` takes `required`. While a suite is required, `memory.proposal_decide` accepts a covered key only when the state of the row's stored content is `satisfied` at the suite's current revision. Otherwise the key answers the code `checks_required` with the suite, the revision and what the results say, and stays pending; the other keys of the call are decided. The check is the last refusal of an acceptance, a rejection reads no checks, and a failed read of the checks fails the call before any write. The requirement is part of the revision (`loom.knowledge_suites.required`, migration 136). A publish without the field keeps the suite's value, and a revision written by a build without the column states none, so the suite keeps the requirement it had. Turning it on, turning it off, and removing a key, a prefix or a case from a required suite write the audit row `knowledge.suites.requirement` before the revision; a row that cannot be written fails the publish with 503. `required: true` answers 503 until every live replica runs migration 136. `knowledge.suites.get`, `knowledge.suites.list`, `knowledge.suites.results` and each proposal's `checks` answer `required`, the proposal advice gains the blocker `checks_required`, and the acceptance's audit row records the checks it read. The dashboard's suite page has the switch, which goes out with Publish. The list of suites and the Proposals tab say which suite is required, and a review whose results are not satisfied says why Accept is unavailable. Signed-off-by: Mohammad Lareb Zafar <lareb.zafar@clickhouse.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The analyzer corpus is rewritten from the merged statements, and the rolling-upgrade rule for a required suite takes the next free number, 100. Signed-off-by: Mohammad Lareb Zafar <lareb.zafar@clickhouse.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The handler raises again from its broad except, so the waiver named a rule that does not fire there. Signed-off-by: Mohammad Lareb Zafar <lareb.zafar@clickhouse.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ctions `knowledge.suites.publish` requires `memory_key_prefixes`, so the set's `require` step sends an empty list beside the case's key. 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.
|
… it read The review dialog kept the results its Suite checks panel last reported and compared them with the open review by content hash alone. A review that draws no panel, for a key no suite covers or a row listed without checks, sets none, so Accept stayed unavailable for a text with the hash of a held one until the page was reloaded. Opening a review clears that read, and the review's own panel reports again when it is drawn. The suite page's alert after a publish whose requirement the server did not take said that accepting needs no results and to turn it on again. A publish that turned the requirement off and was served by a build a release behind got the same words, while the requirement stays stored. That publish says the suite is still required. The refusal a test of the review mocks is worded as the server words it. Signed-off-by: Mohammad Lareb Zafar <lareb.zafar@clickhouse.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…of the listed checks The listing reads the checks for a row's stored hash and an acceptance for the hash a full read serves. The two differ for an object with a null field, so such a row lists `outdated` and the blocker `checks_required` while its acceptance goes through. The guide and the architecture page state that limit, and the integration test that compares the three reads names it. The guide also said that an accept reads no result, quoted two reason strings the server does not send, and left out that a proposal under a key outside the suite's selection is not held. Rule 100, the rollback note and the audit page say that a publish a build a release behind serves writes no `knowledge.suites.requirement` row. The reference row of `knowledge.suites.publish`'s `required` says what an omitted value does. `test_turning_required_on_outdates_recorded_results` reads `required` back from `knowledge.suites.get` and `knowledge.suites.list`, which no test asserted, and the audit-row test asserts `written` on its last publish. Signed-off-by: Mohammad Lareb Zafar <lareb.zafar@clickhouse.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Both sides added rule 100 to docs/architecture/rolling-upgrades.md. The rule for a Worklist card in a saved chat keeps the number, and the rule for a required regression suite is rule 101, as the guide, the architecture page, the audit page and the rollback note name it. Signed-off-by: Mohammad Lareb Zafar <lareb.zafar@clickhouse.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit bd9a1a5. Configure here.
| // What was sent is the suite now, with the requirement the answer holds; the read | ||
| // after it brings who wrote it and when. | ||
| const required = answer.required ?? detail.required; | ||
| setRead({ detail: { ...detail, ...next, required, revision: answer.revision }, error: null }); |
There was a problem hiding this comment.
Refetch hides a requirement still on
Medium Severity
After a publish whose answer omits required, the page keeps the previous requirement, then setRetry reloads the suite and replaces that value. An older server omits required on the reload too, so the switch shows off while the alert still says the suite is required.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit bd9a1a5. Configure here.
| // the server refuses that accept. Before the read answers, and when it fails, Accept | ||
| // stays available and the server decides. | ||
| const unmet = review?.row?.content_sha256 === checksRead?.sha ? requiredHold(checksRead?.results ?? null) : null; | ||
| const checksReason = unmet ? `A required suite's checks are not satisfied: ${unmet}` : null; |
There was a problem hiding this comment.
Failed case read still blocks accept
Medium Severity
Accept is disabled from onResults as soon as the results read returns. If the later case-text read fails, the panel shows "Couldn't load the suite checks" and never clears that report, so Accept stays unavailable even though a failed panel read is supposed to leave the decision to the server.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit bd9a1a5. Configure here.
…rds the checks state it read The 503 row of the publish table links the rolling-upgrade rule for a required regression suite. That rule is 101; rule 100 is the Worklist card rule. An acceptance reads the checks of every key a suite covers and writes the state on its audit row, whether or not the suite is required. Only the refusal depends on the requirement. The runner section says that, as the page's audit section does, instead of saying an accept reads no result. Signed-off-by: Mohammad Lareb Zafar <lareb.zafar@clickhouse.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The rolling-upgrade rule for knowledge reports is rule 101 and the rule for a required regression suite is rule 102. The schema baseline test lists the migrations of both sides. Every generator reports its files current on the merged tree. Signed-off-by: Mohammad Lareb Zafar <lareb.zafar@clickhouse.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… 102 The migration that adds `loom.knowledge_suites.required` is `138_knowledge_suite_required.sql`, numbered after the newest migration on main. `REQUIRED_MIGRATION` is 138, so `knowledge.suites.publish` with `required: true` answers 503 until every live replica runs schema version 138. The pages that cite the rule for a required suite cite rule 102, the number it holds in `docs/architecture/rolling-upgrades.md` beside rule 101 for knowledge reports. `tests/analyzer/shapes.txt` is rewritten from the merged tree and holds one shape for the schema dump. Signed-off-by: Mohammad Lareb Zafar <lareb.zafar@clickhouse.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The merge has no conflict. Every generator reports its files current on the merged tree, which holds 426 operations. Signed-off-by: Mohammad Lareb Zafar <lareb.zafar@clickhouse.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The merge has no conflict. Every generator reports its files current on the merged tree, which holds 426 operations. Signed-off-by: Mohammad Lareb Zafar <lareb.zafar@clickhouse.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>


Closes: #1767
Part of: #1177
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):
A regression suite can be required: publish it with
required: true, or turn on Require passing results to accept a proposal on the suite's dashboard page.memory.proposal_decidethen accepts a proposal on a key the suite covers only when the suite's checks are satisfied for the proposal's exact content at the suite's current revision, and answers the key with the codechecks_requiredotherwise.Why
A suite's results are shown on each proposal and in its review, and they decide nothing: an acceptance can be sent with the results failed, recorded for other content or an earlier revision, or absent. An owner who wants the suite to hold a change has no way to say so.
This change lets the owner state it on the suite and makes the server check it on the acceptance, for the hash the acceptance binds. The check is on the server because the dashboard is one of several clients of
memory.proposal_decide.Design rationale, for the belief-revision invariant: this narrows Expand. Where an owner required a suite, a proposal becomes a served fact only with a record that its exact text did not break the suite's cases. It adds no revision operator and changes no stored fact.
docs/architecture/regression-suites.mdhas the section "A required suite".What the linked epic still lacks after this: its criterion that no other write route skips the requirement, and its documents. A direct write by a writer of the namespace, a definition draft approved in the review queue and a promotion are not checked, and the docs and the switch's hint say so. A suite covers memory keys only, so the documents the epic asks to start with are not covered either.
Scope and risk
What it touches:
knowledge.suites.publish: the field, the fleet gate forrequired: true, the audit row written before the revision.memory.proposal_decide: an acceptance reads the suite checks of the rows it picked, in the two statements the listing already uses, inside the call's sequential reads.decide()grows by one statement, to 32 of the gate's 50.memory.proposals:checks.requiredand the advice blocker.What it leaves alone: a rejection and the rejection an owner's policy writes read no checks. Direct writes, approved definition drafts and promotions are not checked, and neither is a proposal under a key outside the suite's selection.
What could break:
exceptsurrounds the reads.(org, namespace).knowledge.suites.requirementis written withaudit.emit_strictunder the publish's claim and is not fail-open: a publish whose row cannot be written answers 503 and writes no revision. Its subject holds memory keys and prefixes and counts the cases; it holds no case id or text.requiredmakes the recorded result setsoutdated, like any other revision. The dashboard's confirmation says so.outdatedand the blockerchecks_requiredwhile its acceptance goes through. The guide and the architecture page state the limit; serving one state for both needs the listing to read each row's whole value.Compatibility, rollout and rollback
knowledge.suites.publishinputrequired(optional boolean). Omitted, it keeps the suite's value; a first revision without it is not required.requiredon the answers ofknowledge.suites.publish,knowledge.suites.get, each row ofknowledge.suites.list, andknowledge.suites.results.checks.requiredon each proposal ofmemory.proposals.checks_requiredofmemory.proposal_decide, with areasonthat names the suite, its revision and one of four states. It is a result code of a 200 answer, not an error code.checks_required, titled "Required checks not satisfied", which blocksaccept.knowledge.suites.requirement, andchecks(suite,revision,state) on amemory.proposal_acceptrow of a covered key.loom.knowledge_suites.required,Int8 DEFAULT -1(migration138_knowledge_suite_required.sql, additive). 1 or 0 is a stated requirement and -1 states none; reads take the newest stated value withargMaxIf(required, revision, required >= 0).knowledge.suites.publishwithrequired: trueanswers 503OVERLOADEDuntil every live replica runs migration 138 (rolling-upgrades rule 102). A publish without the field, or withfalse, is not held by that gate.requiredin a request and names it inignored_args, and its answers carry norequired. The dashboard compares the answer with what it sent and says when the requirement was not turned on, or not turned off.knowledge.suites.requirementrow: a key, a prefix or a case it removes from a required suite shows only in the counts of itsknowledge.suites.publishrow. The generated SDK tables, the operations reference,schemas/schema.sqland the analyzer corpus revert with the commit.Tests
Run against a server started from this branch and a ClickHouse started for it (ports 19921 and 20921), on the tree merged with
main.pytest -n 2): 1797 passed. The run holds the newtests/unit/test_proposal_requirement.py(21 tests: a reject reads no checks, an unreadable checks read fails the accept before any write, the reads are sequential, each state's refusal text, the refusal order, the accept's audit row, a row a build without the column wrote keeps the requirement, the requirement's audit row is written before the insert and fails the publish, the fleet gate, the migration constant), the changed suite, proposal, advice and triage tests, the schema baseline,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,test_pg_durable_reads.py,test_mcp_listing_budget.pyandtest_sdk_surface_contract.py.tests/analyzer: 12 passed, afterpython -m tests.analyzer.corpus --write(7 shapes change, the suite head reads).LOOM_AUTH_REQUIRED=true:test_knowledge_suites.py,test_knowledge_suite_drafts.py,test_suite_results.py,test_proposal_checks_state.pyand the newtest_proposal_checks_requirement.py: 44 passed.LOOM_AUTH_REQUIRED=false:test_proposal_checks_requirement.py13 passed;test_proposal_triage_set.py(with the newchecks_requiredcase),test_proposals.py,test_proposals_listing.py,test_proposal_triage.py,test_proposal_advice.pyandtest_proposal_independent_review.py: 16 passed.must_not_statecase holds the accept, a case that could not run holds it with no failure and no regression, and the rerun then waits only for an independent reviewer. It also covers results for other content, results for an earlier revision, turning the requirement on, a service account and the proposer with satisfied checks, a contradiction, the audit rows, one state across the listing, the results read and the accept, one refused key beside decided ones, and a key no suite covers.vitest --maxWorkers=2):Suites.test.tsx,Proposals.test.tsx,ProposalChecks.test.tsxandsuiteChanges.test.ts: 149 passed.npm --prefix frontend run buildpasses, and the bundle budget is OK with the index chunk at 112.4 kB of 120 kB, the figure onmain.ruff format,ruff check, Biome format and lint, Prettier on the changed docs, the function-length gate, the secrets check,make typecheck, and every generator with its--check(Python, TypeScript, Ruby, Rust with its fixtures, Go, the docs reference, the reach census, the plugin eval tools).sdk/rust/src/wire_models.rsis 2,400,913 bytes of its 4,194,304 limit.After the review fixes, on the tree with them and a ClickHouse started for that run (ports 19924 and 20924):
Proposals.test.tsxandSuites.test.tsx, 128 passed, andReviewQueue.test.tsx, 101 passed. Two tests are new and each failed before its fix: "a review that draws no panel is not held by what the review before it read" and "says the suite is still required when the server did not turn the requirement off".npm --prefix frontend run buildpasses and the bundle budget is OK.LOOM_AUTH_REQUIRED=true:test_proposal_checks_requirement.py, 13 passed.test_turning_required_on_outdates_recorded_resultsnow readsrequiredback fromknowledge.suites.get, at the head and at revision 1, and from theknowledge.suites.listrow.pytest -n 2):test_proposal_requirement.py, the three suite test files that import the changed model module,test_knowledge_sources_sql.py, the repository scans named above andtests/analyzer: 716 passed, 24 skipped. The skipped tests need theclickhousebinary, which this run did not have.ruff format,ruff check, Biome format and lint, Prettier on the changed docs,make typecheck, and the Python, TypeScript, Ruby, docs reference, reach census and plugin eval generators. The changed field comment reaches the docs reference alone. The Rust and Go generators were not run again:rustfmtandgofmtare not installed, and no generated Rust or Go file holds a field comment.main, which holds rule 101 for knowledge reports and the migration137_knowledge_reports.sql: the rule for a required suite is rule 102 and its migration is138_knowledge_suite_required.sql. The merge had two conflicts, the rule list ofdocs/architecture/rolling-upgrades.mdand the migration list oftests/unit/test_schema_baseline.py, and each keeps both sides.At this head, on the tree merged with
main(426 operations, 312 of them experimental), with a ClickHouse started for the run (ports 19921 and 20921):make migratefrom an empty store applies 108 migrations, the last138_knowledge_suite_required.sql, andmake schema-dumpreportsschemas/schema.sqlcurrent: it holdsloom.knowledge_reportsand therequiredcolumn.--check: the Python tables with the client and admin tables, TypeScript, Ruby, Rust with its fixtures, Go, the docs reference, the reach census and the plugin eval tools. Each reports every file current, withrustfmtandgofmtfrom the pinned images.sdk/rust/src/wire_models.rsis 2,400,913 bytes of its 4,194,304 limit.python -m tests.analyzer.corpus --writeleaves one shape for the schema dump where the merge had left two.pytest -n 2): the schema baseline,test_proposal_requirement.py, the suite, proposal, advice and result test files, the column-set, table-classification and write-path scans, the SDK, Go, docs reference, reach census and MCP listing contracts, the session-content census, the repository scans named above andtests/analyzer: 1176 passed, 33 skipped. Six of these files hold tests that need theclickhousebinary; they then ran with it: 159 passed.LOOM_AUTH_REQUIRED=false:test_proposal_checks_requirement.pyandtest_proposal_triage_set.py: 15 passed. The 16 tests oftest_proposal_checks_state.pyandtest_suite_results.pyskip there, because they need a server that enforces auth. Server withLOOM_AUTH_REQUIRED=true:test_suite_results.py,test_proposal_checks_state.pyandtest_proposal_checks_requirement.py: 29 passed.vitest --maxWorkers=2):ProposalChecks.test.tsxandsuiteChanges.test.tspass, 23 tests.Suites.test.tsxandProposals.test.tsx: 128 passed with--testTimeout=30000. At the default timeout of 5 s, five tests of the two files timed out in one run and four in the next, not the same tests, on a machine loaded by other work; the merge changes nothing underfrontend/src/views/admin,frontend/src/apiorfrontend/src/lib.npm --prefix frontend run buildpasses, and the bundle budget is OK with the index chunk at 112.4 kB of 120 kB, the figure onmain.ruff format --check,ruff check, the function-length gate, the secrets check,make typecheckand Prettier on the changed docs pages.maingained four commits during these runs, and the head holds them through two more merges with no conflict. They change the code index's history answers with their generated SDK output, the coding-agent plugin, the image build and one docs page. After the first of the two merges every generator reports every file current, and the SDK, Go, docs reference, reach census and MCP listing contracts, the session-content census, the schema baseline,test_public_copy.py,test_doc_links.py,test_agent_instructions.pyandtests/analyzerpass: 797 passed, 2 skipped. After the second, every generator's--checkpasses. The integration and dashboard runs andmake typecheckwere not repeated after them.Not run here:
ci.ymland written for either authority; its conflict case skips there, because it records the conflict with a direct ClickHouse write.Tools this environment lacked:
rustfmt,gofmtand theclickhousebinary are not installed on the host. The formatters ran from the pinnedrustandgolangimages, and the unit tests that needclickhouse localran with the binary copied out of this change's own ClickHouse container.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 the whole diff, by the unit and integration runs above against a server and a ClickHouse started for this change, and by the generators'
--checkruns.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