Repository navigation
The coding-agent plugins' defaults and the memory skill's receipt text agree with the server - #2190
Merged
Merged
Conversation
…t agree with the server Three places where the plugins sent or said what the server does not accept or return: - The session-start hook sends LOOM_CONTEXT_TOKEN_BUDGET within 200 to 12,000, the range context.pack takes for token_budget. A value outside it was sent as typed, the op refused it, and the session started with no primer. - The capture hook's default skip list is the server's observe_skip_tools default: it gains mcp__plugin_loom*, which matches the tools of the server the plugin installs. The hook posted an observation of each of those calls and the server stored it with no content. The keys a memory read served are still stashed for the run's close. - The loom-memory skill reads a memory.set receipt by the fields the op answers: a row was written unless noop is true; a merge wrote nothing at the requested key and merged_into_key holds the fact; status: duplicate leaves both rows; a contradiction is conflict_verdict: conflict with peers and next. The skill said memory_id and version mean saved, which a merge also answers, and named a status: conflicted that no receipt carries. tests/unit/test_plugin_agrees_with_server.py compares each of the three with the server's model or setting, so a change on either side fails there. 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.
|
…ved from noop test_the_memory_skill_names_only_receipt_fields_and_statuses checked that each field the loom-memory skill's receipt text names is a field of MemorySetOutput and that a named status is one a receipt carries. memory_id and version are fields of the model, so a passage saying that those two mean a write was saved passed every assertion. A merge answers both and writes nothing at the requested key, which is the defect the skill text fixes. Each of the three passages (the receipt bullet of SKILL.md, the receipt bullets of reference.md and its "Saved" line) must now name noop, the field the saved rule reads. The test passes on the skill as it is and fails when any one of the three reads saved from memory_id and version. Signed-off-by: Mohammad Lareb Zafar <lareb.zafar@clickhouse.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…k as it is tests/unit/session_content_senders.json pins the sha256 of each source that holds a reviewed sender, and test_shipped_automatic_senders_have_an_admission_class_or_reviewed_exception fails when a pinned source changes. The session-start hook is pinned, in the Claude Code plugin and in its Codex copy, and the clamp of LOOM_CONTEXT_TOKEN_BUDGET changed its bytes, so that test failed. The hook's diff is the two bounds passed to envNumber: it sends no new op and no new field, and the budget still goes only to context.pack. Both pins are renewed to the hook's sha256. Signed-off-by: Mohammad Lareb Zafar <lareb.zafar@clickhouse.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…or version test_the_memory_skill_names_only_receipt_fields_and_statuses required each receipt passage to name noop. The receipt bullet of SKILL.md and the receipt bullets of reference.md name noop in their merge clause as well, so the rule "memory_id and version mean it was saved" put back beside that clause passed the test. The test also fails a passage that names memory_id or version, the two fields a merge answers while it writes nothing at the requested key. None of the three passages names them. With the old rule put back in one passage at a time, the test fails for each of the three. Signed-off-by: Mohammad Lareb Zafar <lareb.zafar@clickhouse.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ins match the merged hook Three files conflicted. Both plugin manifests keep main's content at version 1.2.185. Main holds 1.2.183, and the open pull requests that change a manifest hold versions up to 1.2.184. tests/unit/session_content_senders.json keeps main's entries. In both plugins the pin of hooks/loom-session-start.mjs is the sha256 of the hook in the merged tree. Against main the hook differs only in the range it clamps the token budget to, a number it already sends. Signed-off-by: Mohammad Lareb Zafar <lareb.zafar@clickhouse.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Main's one new commit changes server/identity/app/reviewers.py, server/memory/app/proposals.py and two unit test files. This branch changes none of them, and the merge has no conflict. Both plugin manifests stay at 1.2.185. Signed-off-by: Mohammad Lareb Zafar <lareb.zafar@clickhouse.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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: #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 Claude Code and Codex plugins send
LOOM_CONTEXT_TOKEN_BUDGETwithin the 200 to 12,000 thatcontext.packtakes, so a value outside that range keeps the session's primer, and they post no observation of a call to the tools of the Loom server the plugin installs. Theloom-memoryskill reads amemory.setreceipt bynoop,merged_into_key,status: duplicateandconflict_verdict, so a write that merged into another key is not reported as saved at the key it named.Why
Three places where the plugins sent or said what the server does not accept or return. The server is the reference in each and does not change.
LOOM_CONTEXT_TOKEN_BUDGETto a floor of 100 with no ceiling.context.packtakestoken_budgetfrom 200 to 12,000 (ContextPackInputinserver/memory/api/models_context.py) and refuses any other value, so a session with the variable at 150 or 20000 started with no primer. The hook clamps to{ min: 200, max: 12000 }: 150 is sent as 200, 20000 as 12000, and an unset variable as 1200.DEFAULT_SKIP_TOOLS(lib/after-tool.mjs) lackedmcp__plugin_loom*, which the server'sobserve_skip_toolsdefault has. The tools of the server the plugin installs arrive asmcp__plugin_loom_loom__*, so the hook posted an observation of each Loom call and the server stored it with no content.mcp__plugin_loom*joins the list aftermcp__loom__*, and the two lists are equal, in order.loom-memoryskill said "memory_idandversionmean it was saved" and "status: conflictednames a row to revise". A merge answersmemory_id,version,conflict_verdict: mergeandnoop: trueand writes nothing at the requested key; no receipt carriesstatus: conflicted(a stored row's receipt saysactive,duplicateorproposed, or carries no status); a contradiction answersconflict_verdict: conflictwithpeersandnext. The skill reads the receipt by those fields:noopis true;conflict_verdict: mergewithnoop: true: the store already held the fact, undermerged_into_keywhen that is set, and nothing was written at the requested key;status: duplicate:duplicate_ofholds the fact, leave both rows;conflict_verdict: conflict:peerslists the rows andnextnames the op to revise with.The "saved" rule is
noopalone, not "astatusandnoop: false". A write of a type the server does not embed (episodic,profile) or ofhighsensitivity stores a row and, unless it is a proposal, answers an emptystatus(_set_plain_insertinserver/memory/app/set_commit.pyputsproposedon a proposal's receipt and no status on any other), and the skill itself sends a run's ledger as anepisodicrow. A rule that asks for astatuswould report those rows as not saved.noopis false on every receipt of a stored row and true on a merge and a dry run.Scope and risk
integrations/claude-code-plugin/. The Codex plugin, the standaloneskills/loom-memory/and the copies the MCP transport serves (server/transport/served_skills/, with its manifest digests) are the generators' output. No op, field, table, setting or migration; no server code.SKILL.mdis 4,730 bytes (4,731 before;tests/skills.test.mjscaps it at 5,200). The receipt bullet keeps its length by naming a merge and a conflict in words;reference.md, which a session opens on demand, carries thefield: valueform of each and grows from 10,638 to 10,954 bytes.mcp__loom__*or a meta tool already left none, so a session's observation count leaves those calls out. The server stored them with no content; a server whoseobserve_skip_toolslacks the glob stored the call's input, which forloom_memory_setis the memory itself.recalled_keys(recordsToolCallhands the call to the hook whatever the skip list says); the code plane's trace stash andcode.outcomereports do not read the skip list;LOOM_OBSERVE_SKIP_TOOLSstill replaces the whole list; a session with no token, a disabled plane or an unreachable server sends nothing.tests/unit/session_content_senders.jsonpins the sha256 of each source that holds a reviewed sender, so a changed source is read again before its pin is renewed. The session-start hook is one of them, and the pins of its two copies are renewed here. The hook's diff is the two bounds of the clamp: it sends no new op and no new field, and the budget still goes only tocontext.pack. Every other pin ismain's.docs/guides/agent-integration.md(its receipt table and its last review paragraph) still saysmemory_idandversionmean a write persisted, and theloom-mentorskill's reference still names a bareconflict. Neither is plugin default orloom-memorytext.MemorySetOutput.statussays it is empty only on a write that stored no row, which the receipt of an unembedded row that is not a proposal contradicts. The server is not changed here.Compatibility, rollout and rollback
token_budgetof 200 to 12,000 and applies its own skip list, so no entry "needs the next server release" andMIN_SERVER_VERSIONdoes not move.Tests
New, each failing on
main's plugin files and passing here:integrations/claude-code-plugin/tests/session-start.test.mjsa budget below the server's floor is sent as the floor: runs the hook against a fake server with the variable at 150 and reads thecontext.packbody. Before the fix the body carried 150. It also pins the unset case at 1200.a budget above its ceiling is sent as the ceiling: 20000 was sent as typed; it is sent as 12000.integrations/claude-code-plugin/tests/after-tool.test.mjsa tool of the plugin-installed server is not observed: runs the capture hook formcp__plugin_loom_loom__loom_searchand then for aRead, waits for theRead's observation to arrive, and requires it to be the only one. Before the fix the server also receivedmcp__plugin_loom_loom__loom_search.its served keys are still stashed: the same run leaves the served key in the session's stash, andrecordsToolCallstill hands a memory read to the hook under the default list. It passes before and after: it fails if the skip also drops the hand-off.tests/unit/test_plugin_agrees_with_server.pytest_the_plugin_skip_list_is_the_servers_default: readsDEFAULT_SKIP_TOOLSfromlib/after-tool.mjsand compares it, in order, with the default of theobserve_skip_toolssetting.test_the_plugin_budget_bounds_are_the_ops: reads the clamp from the hook and compares it with thegeandleofContextPackInput.token_budget; the unset fallback must lie inside them.test_the_memory_skill_names_only_receipt_fields_and_statuses: reads three passages of the skill, the receipt bullet ofSKILL.md, the receipt bullets ofreference.mdand its "Saved" line. Everyfieldorfield: valuea passage names is a field ofMemorySetOutput, a namedstatusis one the write path stamps, each passage namesnoop, the field the saved rule reads, and none namesmemory_idorversion, which a merge also answers. Onmain's skill text none of the three namesnoop, all three namememory_idandversion,SKILL.mdnamesstatus: conflictedandreference.mda bareconflict. With the old saved rule put back in any one of the three passages and the rest as here, the test fails. TheSKILL.mdbullet and thereference.mdbullets namenoopin their merge clause as well, so thememory_idandversionassertion is the one that fails them; the "Saved" line fails onnoop.The branch holds
main. The merge conflicted in three files: both manifests, which keepmain's content at 1.2.185, andtests/unit/session_content_senders.json, which keepsmain's entries with the two session-start pins at the sha256 of the hook in the merged tree. Againstmainthat hook differs only in the two bounds of the clamp.Run on the head:
pytest tests/unit/test_plugin_agrees_with_server.py tests/unit/test_session_content_senders.py tests/unit/test_degraded_unnoted.py tests/analyzer/test_corpus.py: 34 passed, 2 skipped.test_degraded_unnoted.pyandtest_shapes_file_matches_buildersintests/analyzer/test_corpus.py, which failed in CI on the head before the merge, pass on the merged tree with no edit of this branch.pytest tests/unit/test_plugin_agrees_with_server.pywithtest_session_content_senders.pyand the plugin, skill and release unit files (test_codex_plugin.py,test_agent_plugin.py,test_cursor_plugin.py,test_standalone_skills.py,test_served_skills_codegen.py,test_mcp_served_skills.py,test_skill_eval.py,test_plugin_eval_mocks.py,test_loom_code_skill.py,test_plugin_checkout_bytes.py,test_plugin_code_query_contract.py,test_release_prepare.py,test_published_links.py): 304 passed.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 format --checkandruff checkon the new test pass. The secret gate passes; the function-length gate reports 52 functions over 50 statements against a baseline of 52.agent_plugin_sync,standalone_skillsandserved_skillseach pass with--check; the merge left nothing to regenerate.Run on the first of the two merge commits. The second brings four files of
main, underserver/andtests/unit/, that none of these reads:node --test --test-concurrency=2 integrations/claude-code-plugin/tests/*.test.mjs: 1284 tests, 1275 passed, 9 skipped, 0 failed.after-tool,session-start,skills,hooks-doc,loom-capture,hook-contract,record-hook), one file at a time: 139 passed..mjsand.jsonfiles and Prettier on the three changed pages pass; Biome's configuration leaves the pins file out.Run before the merge and not again:
node --test integrations/grep-shim/tests/*.test.mjs: 21 passed, 3 skipped.node --test integrations/cline/tests/*.test.mjs: 23 passed.bash integrations/cursor/test.shandPYTHON=.venv/bin/python bash integrations/generic/test.sh: exit 0. The merge brings no file under those four directories.node --checkover every hook, helper, shim and adapter,sh -nover the launchers,test -xover the entry points): no failure. The merge bringsmain's prompt hook and three helpers, which CI checks.claude plugin validate .: passed, with advice about the README's install line.claude plugin validate integrations/claude-code-plugin --profile directory --strict: exits 1 on one warning, that a plugin with files inbin/is refused by one host; the diff changes nothing underbin/.Not run:
claude plugin eval integrations/claude-code-plugin, which a skill change asks for, and theagent-session.mjsend-to-end run: both call a model. They are left to the QA pass that runs once the roadmap of the linked issue is merged.make lintand the shell format check run in CI;rustfmt,gofmtandshfmtare not installed on this machine, and the diff has no op, Rust, Go or shell file.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, wrote each test to fail first, and ran the checks listed under Tests. It read the write path to check the receipt fields the skill names, which is where the
nooprule comes from. 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