Skip to content

test(agent_writer): regression for append_child without trailing source newline #73

Description

@MarcoPorcellato

Summary

Add a pytest that reproduces #72: append_child_to_node must not splice a new bullet onto the previous line when the source .md file lacks a final newline.

Clean Architecture lens

Aspect Assessment
Ring Tests (driver contract) validating adapter agent_writer.py
SOLID LSP — file shape variants (with/without trailing \n) should behave identically

Task

  1. Extend tests/test_agent_writer.py with a case where page_path.write_text("- parent\n - existing", encoding="utf-8") (no trailing newline).
  2. Assert disk lines and in-memory parent.children after append_child_to_node.
  3. Pair with fix in fix(agent_writer): append_child corrupts markdown when source file lacks trailing newline #72.

Context

Local code study wave 11. See docs/GOOD_FIRST_ISSUES.md GFI-34.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliKINETIC CLI (matryca-parse)good first issueGood for newcomers — scoped, documented, low risktestsTest coverage or quality gates

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions