Repository navigation
Let rules and queries read a checkbox's checked state; let update and set-status name the version they change - #3573
Conversation
Pragmatic Code Review: PR #3573 (issue #3556)Review Type: Initial review (no prior reviews or comments on the PR). Summary: The change is a clear net improvement and is well tested. Derived attributes are declared once in the registry, and the CEL builder, graph resolver, save-time validation, query compiler and write path all read that declaration, with no How this was checked: I read the full diff, the surrounding code and docs commit Requirements CheckDerived attributes
Version on writes
General
Code Review Findings1. 🟡 Important:
|
malibio
left a comment
There was a problem hiding this comment.
Automated pragmatic-code-review: REQUEST CHANGES (posted as a comment — GitHub blocks self-approval). Full findings in the review comment above.
Review addressedAddressed
Skipped
Re-Review DecisionDecision: RE-REVIEW NEEDED Rationale: Findings 1 and 2 changed write-path and transport behaviour, not just tests or docs. |
Pragmatic Code Review: PR #3573 (issue #3556)Review Type: Re-Review Scope: commit Summary: The one blocking finding is fixed, and the fix is at the ops layer, so the CLI, gRPC and agent callers are all covered. The header cap is sound and does not break the desktop client. I found no bug in the new commit. The findings below are all optional. How this was checked: I read the commit, the surrounding code in Previous Review Summary
1. 2. Conflict header size: addressed. Consumers of
This is also an improvement for the desktop app: a conflict on a node over 16 KB previously failed the stream and surfaced as 3. 4. A 5. Wording of the first acceptance criterion: skipped, reason accepted. It is a record-keeping point on the issue, not code. 6. String operand on a derived boolean filter: skipped, reason accepted. A user-defined type can declare an ordinary field of the same name, where a string operand is valid. A check would have to resolve the type first, which is more than a nit warrants. Findings on the new commitA. 🟢 Suggestion: a collection-only
|
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 addressedAddressed
Skipped
The two touched tests and Re-Review DecisionDecision: NO RE-REVIEW NEEDED Rationale: One documentation sentence and two tightened test assertions. No product code changed. |
… set-status name the version they change (closes #3556) Derived attributes are declared in the type registry (checkbox declares checked), read by name in Play conditions, .where predicates and query property filters, refused on write, and computed by one Rust function with a SQL form held to the same answers. node update, node set-status and the agent's update tools accept the version the caller read; a stale one is refused with the node, the version given and the current version. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…d the conflict header - A version named on an update that changes only collections is checked before they are applied, instead of being ignored. - The x-version-conflict header leaves the node out above 8 KB, so a large node's conflict still reaches the client with its versions. - Pin how a comprehension reads a derived attribute on items that derive nothing. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…tive controls to two tests Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
0ac85bf to
a7ce330
Compare
Closes #3556. Implements ADR-094 §5 (derived attributes are readable) and §6 (a write names the version it read).
Derived attributes
Kind and category: no new type.
checkbox(concrete, primitive) gains one declared derived attribute,checked(boolean). No schema field, relationship or structural rule changes; nothing is stored.nodespace-types/src/core_type.rs):CoreTypeInfo.derivedlists a type'sDerivedAttributes; subtypes inherit throughextends. Each attribute has a name, a value type, one Rust function (derive) and the same computation as SQL (sql).checkbox_is_checkedis the one definition of checked state.node.checked,c.checkedand.where(checked == false)read it. The graph resolver reads it for action bindings too.nullon an item whose type does not declare it, sonode.has_child.exists(c, c.checked == false)answers for the checkboxes instead of failing on the first note.node.checkedform and items of a relationship with a declared target type. A user type's own field of the same name is still a field.propertyfilter that names a declared attribute compiles to a per-rowCASE(computed fromcontentfor rows whose type declares it, the stored property otherwise), so it works at the top level, under a wildcard and inside arelatedfilter. Filters on every other name keep their exact expression.Version on writes
nodespace node updateandnodespace node set-statustake--version <n>. A stale version exits non-zero with the node, the version given and the current version;--jsonalso prints{"error": "version_conflict", ...}. Without it they behave as before.update_nodeandupdate_task_statustake an optionalversion, with a refusal that tells the model to read the node again.x-version-conflictheader now escapes non-ASCII text. Before, a conflict on a node with any non-ASCII content produced a header clients could not read as a string, so they saw no conflict data at all.Docs
packages/skill/references/cli.mdandSKILL.md: the version flag, what a conflict means, re-read before deciding.096a65a, pushed with the merge):components/node-types.md§3,components/type-registry.md,architecture/playbook-system.md.Notes for review
checkedis declared. The other derived values in the node-types sheet (header level, code-block language) stay undeclared until a rule or query needs them.versionparameter.Testing
bun run test:changedpasses (rust, skill, scripts tiers).🤖 Generated with Claude Code