Skip to content

Make Flow documentation compiler-audited by construction - #579

Merged
godofecht merged 118 commits into
mainfrom
agent/compile-all-doc-examples
Aug 20, 2026
Merged

godofecht merged 118 commits into
mainfrom
agent/compile-all-doc-examples

Conversation

@godofecht

@godofecht godofecht commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

Make Flow documentation executable and auditable by construction without allowing existing documentation debt to brick unrelated pull requests.

This PR now establishes two complementary contracts:

  1. Current Flow-looking snippets may not hide in text or untyped fences. scripts/check_doc_flow_snippets.py fails when it finds one. Deliberately non-current syntax must be labelled flow-future or flow-pseudocode explicitly.
  2. Every pull request is checked against the compiler-backed documentation ledger. New or edited examples may not introduce new unverified Flow. Existing known debt remains visible and can only move downward.

The zero-debt command scripts/check_doc_examples_strict.py is retained as the explicit audit target for reaching 100% compiler-checked documentation. It is intentionally not the normal PR gate while baseline debt remains, because doing so would make every unrelated docs PR fail before it changed anything.

The checker runs Flow examples through parsing, strict type checking, C generation and clang, supports page-scoped id= / uses= context and preambles, resolves imports including C imports, verifies intentional expect-error examples as negative tests, and rejects vacuous or degenerate harness successes.

This PR also cleaned a large amount of historical documentation debt and rewrote the quickstart as a copy-paste path. The hidden-snippet audit is clean; remaining zero-debt failures stay explicit rather than being disguised as text.

@godofecht
godofecht marked this pull request as ready for review August 19, 2026 11:22
@godofecht
godofecht marked this pull request as draft August 19, 2026 17:34
Take the focused chapter 9 fixes from #622 and keep the audit branch's remaining documentation work on top.
Keep the newer fixes already present on main rather than reclassifying working examples as text.
Take the fully green focused fixes from #624 and keep the remaining audit work on top.
PR #606 already made the detailed dynamics reference compile without deleting its API signatures and examples. Preserve that focused cleanup instead of the older broad rewrite.
Keep the detailed lifetime-domain checks and the current theorem/assume proof surface that landed in focused PRs instead of replacing them with older condensed or future-only documentation.
Take the focused, green chapter-6 fix from #625 and keep the remaining audit work on top of current main.
Keep the focused span diagnostics, lowering notes, lifetime-domain interaction, and staging detail rather than replacing the page with the older condensed rewrite.
@godofecht
godofecht marked this pull request as ready for review August 20, 2026 18:21
@godofecht godofecht changed the title Make every Flow documentation example compile Make Flow documentation compiler-audited by construction Aug 20, 2026
@godofecht
godofecht merged commit ecfb776 into main Aug 20, 2026
22 checks passed
godofecht added a commit that referenced this pull request Sep 7, 2026
Resolve PR #579 against current main while preserving the PR's documentation rewrites and taking non-overlapping compiler, stdlib, browser, and test updates from main.
godofecht added a commit that referenced this pull request Sep 7, 2026
Resolve PR #579 against current main while preserving the PR's documentation rewrites and taking non-overlapping compiler, stdlib, browser, and test updates from main.
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.

1 participant