Repository navigation
Create the record on an add that names another skill's subject, and the type on a bare 'start tracking' (closes #3533) - #3604
Conversation
Pragmatic Code Review: PR #3604Review Type: Initial Review (no prior review or comment on the PR; one commit, SummaryA net improvement. The three parts are cohesive, each maps to one part of the issue, and the layering is right: the add rule lives in one function ( What I ran: the 14 new unit tests (pass), Two findings are worth fixing before merge. Both are places where the code does not hold a property its own doc comment and the ADR amendment state. Neither affects the seeded registry on a single-query turn. Requirements Check
Documentation: ADR-038 and ADR-064 amendments and the Code Review Findings🟡 Important 1: the second search can put a destructive skill back, in the lead📁 The first search is filtered with let creating = second
.into_iter()
.find(|c| clears_score_gate(c) && skill_can_create_a_record(c));A skill that whitelists both Recommendation: add Related, same root: dropping the whole skill also withholds its Principle: a safety invariant must hold on every path into the set it guards, not only the first one written. 🟡 Important 2: the added skill's cross-scale score can cost a compound request its
|
malibio
left a comment
There was a problem hiding this comment.
Automated pragmatic-code-review: APPROVE (posted as a comment — GitHub blocks self-approval). Full findings in the review comment above.
Review addressed (
|
Pragmatic Code Review: PR #3604Review Type: Re-Review (first review covered Previous Review Summary: 7 recommendations. 5 addressed, 1 partially addressed (acceptable), 1 skipped with an acceptable justification, 0 not addressed. New issues found: 0 critical, 0 important, 3 suggestions, 2 nits. What I ran: 15 targeted Previous findings
Nits from the first review: the two test queries that avoid an adding verb now say why. The other two were observations with nothing to change. Checked and fine
New Findings🟢 Suggestion 1: the compound test pins the case the cost is not about📁
Recommendation: one more Principle: a documented trade-off is behaviour; pin it so it changes on purpose. 🟢 Suggestion 2: "the skill they belong to keeps its place" is not what the code guarantees📁 The new paragraph says both rules are safe on "add a priority field to the ticket type" because "the skill they belong to keeps its place". The first rule holds that. The second does not, on the path where it fires: no schema skill holds The five requests the live guard measures keep their leader, so this is a statement about the general case, and the behaviour predates this commit. Only the sentence is new. Recommendation: say what holds: neither request is offered a removing tool, and on the five measured the leading skill is unchanged; when the second search fires, the added skill leads and can take the third place. Same edit to the ADR bullet. Principle: a comment that states a safety property should state the one the code enforces. 🟢 Suggestion 3:
|
malibio
left a comment
There was a problem hiding this comment.
Automated pragmatic-code-review (re-review): APPROVE (posted as a comment — GitHub blocks self-approval). Full findings in the review comment above.
Re-review addressed (
|
7acb39b to
5b57b00
Compare
|
Merge queue: #3604 was taken out of the queue — the merge gate failed on it, on top of main. Reproduce by merging or rebasing |
|
Merge queue: #3604 was taken out of the queue — the merge gate failed on it, on top of main. Reproduce by merging or rebasing |
5b57b00 to
fde0b13
Compare
|
Merge queue: #3604 was taken out of the queue — the merge gate failed on it, on top of main. Reproduce by merging or rebasing |
…he type on a bare 'start tracking' (closes #3533) An add whose record is named after another skill's subject was retrieved as that skill's request: the deletion skill led, delete_node was offered and create_node was not. A retrieval query that opens with an adding verb is now ranked without the skills that remove user data, and when no remaining candidate can create a record a second, capability-first search adds one (ADR-038, amendment of 2026-10-05). create_schema refused an enum field sent with no values, and the model answered the refusal by calling update_schema on the type that was never created. The tool now creates such a field as text and says so in its result (ADR-064, amendment of 2026-10-05). The stored schema's refusal names coreValues, the key callers send. eval:routing scores a scenario that asks for a new type on a create_schema call the tool accepted, not on the call being made. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…row the enum-to-text change, score type creation on recorded outcomes only - The second search for a creating skill is filtered like the first, so a skill that can both create and remove cannot return through it and lead an add. Regression test added and checked to fail without the filter. - The second search asks for as many candidates as the first. - An enum field becomes text only when coreValues and userValues are both absent, null or empty; a malformed or user-values-only list is left for the handler. - createdAType no longer falls back to tool names when a turn has no per-call outcomes. - A compound request's queries are each read by themselves (pinned by a test); comments say what the adding verbs do and do not imply. - Kept the result's notes key beside warnings: it is the wording the change was measured with. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… rule guarantees - New test: in a compound request the skill the second search adds can outrank the other half's deletion skill, and delete_node is then withheld (the cost ADR-038's amendment lists). - is_add_shaped and retrieve_candidates no longer say an add-shaped request for another skill keeps its place: the second search, when it runs, can take the last judged place. - Skipped: making TurnRecord.toolCalls required. It is the shared record contract the matrix fixture reads, and no scored turn reaches the case. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…dding verb The test asserts a query decided in context is retrieved on as written. Its query opens with 'add' and its candidates hold no skill that can create, so the search for one follows. Co-Authored-By: Claude Opus 5.5 <[email protected]>
fde0b13 to
e879646
Compare
|
Post-review note: after the review cycle closed, #3621 landed with a test ( |
Closes #3533.
Two plain requests in the local AI chat ended with nothing created, and the routing eval passed one of them. All three parts are fixed and measured on
gemma-4-e4b-q4km, isolated daemon, purged database per rep.What changed
1. An add whose record is named after another skill's subject
"Add the cache invalidation decision to our architecture decisions." was retrieved as a deletion: Node Deletion led,
delete_nodewas offered andcreate_nodewas not.A retrieval query that opens with an adding verb (add, create, log, record, file, insert, register, capture, jot) is now ranked differently (
routing::retrieve_candidates):create_node, retrieval runs once more with the capability named first ("create a new record: …", the shape a lookup's query has), and the best match that holdscreate_nodejoins the ranking.No seeded skill description changed. This extends ADR-038; the amendment is in nodespace-docs (2026-10-05, "a request to add something").
2. A bare "start tracking"
The model sends
create_schemaan enum field with no values. The refusal said the field needed a value "in core_values or user_values", and the model answered by callingupdate_schema.add_field_valueson the type that was never created.create_schemaandupdate_schema'sadd_fieldsnow create such a field as text and say so in the result (notes). The tool descriptions state that and no longer point atupdate_schema. Only the local agent's tool boundary is lenient: the CLI and the stored schema's validation still refuse it, and that refusal now namescoreValues, the key callers send. Recorded in ADR-064 (amendment of 2026-10-05).3. The routing eval
Scenarios that ask for a new type (
createsType) are scored on acreate_schemacall the tool accepted. Each result recordspassedOnRoutingAloneandtypeCreated, and the summary counts scenarios that routed to type creation and created nothing.Measurements
Part 1, live, 3 reps: 0 of 3 created the record before; 3 of 3 after, with
create_nodeoffered anddelete_nodenot.Part 1, retrieval (locked embedding model): eleven developer-domain adds, ten naming another skill's subject (invalidation, merge, conflict, import, removal, drop, duplicate, purge, delete). On retrieval alone seven were led by a skill that removes user data and four reached Stage 2 with no skill that can create. With the rule all eleven have a skill holding
create_nodein their first three candidates and no destructive candidate. The second search runs for three. Five add-shaped requests that belong to another skill keep their leader.Part 2, live, 3 reps per arm (each arm's reps identical):
coreValuesPart 3,
eval:routing, 3 reps:direct-schema-createindirect-schema-money-owedindirect-schema-freelance("start tracking our planning cycles")create_schemarefused. This is the one that was passing on a failed create.indirect-schema-expenses("I need a way to log production incidents")multi-schema-and-searchAfter the fix, the nine scenarios this change touches (those five plus
direct-node-create,instance-not-schema-invoice,multi-task-and-search,single-intent-long-task) pass 9/9 in all 3 reps with no flips. One full run of the fixture as a smoke test: 19 of 19.Description wording
No seeded skill description changed, so there is no leader movement to report from wording. All 29 live retrieval guards pass, including every deletion guard, with Node Deletion at rank 1 on every request they list. Two tool-schema descriptions changed (
coreValuesoncreate_schemaand onupdate_schema.add_fields); the tool-surface golden is regenerated.Tests
routing.rs: the verb reading, andretrieve_candidatesagainst a retrieval double (destructive skills dropped, wider fetch, second search, its failure, no second search when a creating skill is reached).agent_loop.rs: a routed add issues the second retrieval and is not offereddelete_node.tools.rs: the enum-to-text change, its note, and an end-to-endcreate_schemathat used to be refused.live_skill_retrieval_stability.rs: three new guards. One of them asserts that retrieval alone still leads the two failing wordings with a destructive skill and no creating skill, so it fails if a description change ever makes the rule unnecessary.routing.test.ts: the new scoring.bun run test:changedandbun run quality:fixpass.Costs and limits
statusfield on a bare "start tracking"; the type is created with it as text, and the reply says so and asks for the values.Found and not changed here
🤖 Generated with Claude Code