Skip to content

Add tests for the guarantees in docs/guarantees.md that don't have one #107

Description

@willkg

A pass through docs/guarantees.md found several guarantees marked Holds or Partial that have no test actually proving the specific claim, even where the underlying mechanism is sound. Tracking here before splitting into work.

Gaps found

  • L2 (invocation-independent): no test proves either half of the claim — that root resolution doesn't depend on the working directory, and that it doesn't depend on which other files are in the same batch. internal/project's tests all check per-call correctness from a given start directory; none runs the same file through two different cwds or two different sibling-file batches and asserts the resolved root/attachment name is identical.
  • L8 (no-layout-inference): no test asserts that page hierarchy is never inferred from directory structure. Needs a case with files nested in a directory tree that would suggest a parent/child relationship, confirming no such relationship forms unless frontmatter or --parent says so.
  • L7 (output-is-valid-markdown): nothing parses markfluence's own written output back through a markdown parser. What's tested today is the encoding mechanism (percent-encoding a destination), not the guarantee itself — that what read/export write to disk actually renders as markdown with no dangling/broken syntax.
  • Laws generally (L1-L8): docs/guarantees.md's own "How each kind is verified" table says Laws are checked by property tests ("generate trees, assert the equation"). No property-testing framework (testing/quick, rapid, gopter) is used anywhere in the repo; every Law is backed only by hand-picked examples. Worth a separate decision about whether to adopt one — out of scope for the specific gaps above, noting it so it isn't lost.

Not included here

  • L1 (resolve-what-was-named) and L4 (publish-is-idempotent) were checked and are already adequately covered — L1 by the internal-doc-links/link-cross-directory regression fixtures, L4 by cmd/update's mtime-skip test.
  • L5/L6 (the round-trip guarantees) need a live Confluence server to verify properly; tracked on Add a manual live-server smoke test suite #73 instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions