Skip to content

Enforce canonical multiline XML documentation - #20

Merged
kleeedolinux merged 3 commits into
masterfrom
docs/multiline-xml-documentation
Jul 14, 2026
Merged

Enforce canonical multiline XML documentation#20
kleeedolinux merged 3 commits into
masterfrom
docs/multiline-xml-documentation

Conversation

@serene1491

@serene1491 serene1491 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Make multiline XML documentation the only canonical source form for every non-empty element. The formatter now expands valid inline elements safely, preserves malformed input, code whitespace, indentation, and line endings, and inserts canonical separators between top-level contract elements.

This PR also migrates all repository documentation and fixtures, prevents inline regressions, restores unique ADR identities after the recent merge, and replaces potentially truncating native range conversions with checked conversions.

Architecture traceability

  • Authorizing architecture section or ADR: ADR 0057 - Multiline XML Documentation Format
  • New or changed public contract: Non-empty XML documentation elements use separate opening, content, and closing --- lines. Sibling top-level elements use one empty --- separator. Self-closing syntax remains available only for genuinely empty elements.
  • Architecture documents, examples, or terminology updated: XML documentation architecture, syntax and nomenclature, closed decisions, architecture index, compiler fixtures, standard-library source, and ADR cross-references. Duplicate implementation ADRs were renumbered to 0058-0060 with traceability notes.

Verification

  • Tests were added or updated before implementation where behavior changed.
  • Positive behavior is covered.
  • Negative/rejection boundaries are covered.
  • Convention, consistency, and regression coverage is present where relevant.
  • Cross-backend or differential coverage is present where relevant.
  • cargo fmt --all -- --check
  • cargo check --workspace --all-targets
  • cargo test --workspace --all-targets
  • cargo clippy --workspace --all-targets -- -D warnings

If a check was not run, explain why:

The full Clippy command was run. It remains unsuccessful because the current pop-types baseline reports 59 pre-existing warnings promoted to errors, primarily complexity, wildcard-import, documentation, and repeated-match-arm lints from the recent generic/iteration work. Clippy passes with -D warnings --no-deps for the formatter, documentation, architecture-test, and native-runtime components changed here. Three range conversion lints and one documentation lint discovered during this review were fixed.

Additional successful validation:

  • formatter, documentation, architecture, native ABI, LLVM, and MIR interpreter tests;
  • strict repository scan reporting zero inline XML documentation bodies across Pop and the companion skills repository;
  • Markdown link validation;
  • ADR identity/status validation;
  • stale ADR-path validation;
  • skill quick_validate.py validation;
  • zero trailing whitespace in Markdown and Pop source.

Review notes

  • No dynamic typing, runtime string lookup, broad reflection, or universal-table behavior was introduced.
  • HIR/MIR remain backend-neutral.
  • No generated artifacts, dependency caches, credentials, or editor files are included.
  • This is ready for technical review.

The formatter library implements the XML documentation rule. The complete user-facing pop format command remains roadmap work and is not claimed by this PR.

Convert signed range results through their exact i64 bit pattern and
use checked narrowing for unsigned results. This removes host casts that
Clippy identified as potentially truncating while preserving the accepted
fixed-width range semantics.

Cover signed-minimum and unsigned-maximum iteration through the native ABI.
Make separate opening, content, and closing documentation lines the only
canonical form for non-empty XML elements. Add the authorizing ADR, teach
the formatter to perform safe token-aware rewrites, preserve code whitespace
and CRLF, migrate repository examples and fixtures, and reject regressions.

Resolve duplicate ADR identities exposed by the architecture audit so every
accepted decision has one unambiguous number. Keep the Pop agent guidance in
the separately maintained skills repository synchronized with this contract.
@kleeedolinux
kleeedolinux self-requested a review July 14, 2026 05:22

@kleeedolinux kleeedolinux left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@kleeedolinux
kleeedolinux merged commit 1015346 into master Jul 14, 2026
1 check failed
@kleeedolinux
kleeedolinux deleted the docs/multiline-xml-documentation branch July 15, 2026 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants