What
The Quick Start example in CLAUDE.md does not work. It is the first code a new reader copies.
transact("[[:decision/cache :decision/description \"use Redis\"]]", reason="Caching strategy")
Run verbatim against a real graph:
{'ok': False, 'error': "schema violations: entity ':decision/cache' missing required
attribute ':description'; entity ':decision/cache' has unknown attribute
':decision/description' — allowed: [':alias', ':date', ':description', ':rationale']"}
Why
MINIGRAF_SCHEMA["decision"] requires the bare :description:
"decision": {
"required": {":description": str},
"optional": {":rationale": str, ":date": str, ":alias": str},
},
The namespaced :decision/description is rejected as an unknown attribute. The bare form succeeds:
{'ok': True, 'tx': '...', 'reason': 'x'}
:decision/cache as the entity ident is correct — it is only the attribute that is wrong.
Scope
Docs-only as far as the example goes. Worth a look at whether other docs carry the same form, and whether the error message could be more directive (it does already list the allowed attributes, which is what made this quick to diagnose).
The same wrong form had leaked into two tests; both were fixed in PR #269 (_transact_and_assert_ok, and TestHandlersLeaseRatherThanHold) — notably one of them asserted only that a lease was released, so it passed while silently exercising a rejected transact. Worth grepping for other tests that write facts without asserting result["ok"].
Found during PR #269 and deliberately kept out of that branch.
What
The Quick Start example in
CLAUDE.mddoes not work. It is the first code a new reader copies.Run verbatim against a real graph:
Why
MINIGRAF_SCHEMA["decision"]requires the bare:description:The namespaced
:decision/descriptionis rejected as an unknown attribute. The bare form succeeds::decision/cacheas the entity ident is correct — it is only the attribute that is wrong.Scope
Docs-only as far as the example goes. Worth a look at whether other docs carry the same form, and whether the error message could be more directive (it does already list the allowed attributes, which is what made this quick to diagnose).
The same wrong form had leaked into two tests; both were fixed in PR #269 (
_transact_and_assert_ok, andTestHandlersLeaseRatherThanHold) — notably one of them asserted only that a lease was released, so it passed while silently exercising a rejected transact. Worth grepping for other tests that write facts without assertingresult["ok"].Found during PR #269 and deliberately kept out of that branch.