Problem
kinetic.agent_write uses assert parent_uuid is not None after alias resolution (line ~650). Assertions are stripped under python -O and are discouraged in production CLI paths per project Clean Code guidelines (docs/BUG_HUNT_REPORT.md §6).
Proposed Solution
Replace with an explicit guard:
if parent_uuid is None:
print("Internal error: missing target block UUID.", file=sys.stderr)
raise typer.Exit(code=1)
Files
src/logseq_matryca_parser/kinetic.py
Definition of Done
- No
assert on the agent-write hot path
make all passes
- Optional one-liner test if a branch becomes reachable
Problem
kinetic.agent_writeusesassert parent_uuid is not Noneafter alias resolution (line ~650). Assertions are stripped underpython -Oand are discouraged in production CLI paths per project Clean Code guidelines (docs/BUG_HUNT_REPORT.md§6).Proposed Solution
Replace with an explicit guard:
Files
src/logseq_matryca_parser/kinetic.pyDefinition of Done
asserton the agent-write hot pathmake allpasses