Skip to content

selfhost: port ordering provenance core to Flow - #706

Merged
godofecht merged 6 commits into
mainfrom
selfhost/port-ordering-hints-core
Aug 22, 2026
Merged

godofecht merged 6 commits into
mainfrom
selfhost/port-ordering-hints-core

Conversation

@godofecht

Copy link
Copy Markdown
Contributor

Ports the deterministic ordering-provenance calculations from src/flow/ordering_hints.py into compiler/src/ordering_hints.flow.

The Flow module covers numeric literal order classification, integer key-range inference, sort-result ordering semantics including unique and descending order, and the short-initializer coverage rule.

Production AST traversal and conservative invalidation remain in Python for now. That boundary is intentional: this PR moves the pure calculations first without inventing an adapter between the production Python AST and Stage-A AST shapes.

Adds tests/lang/test_ordering_hints_port.flow covering strict/non-strict ascending and descending inputs, unknown mixed order, key ranges, sort semantics, multi-key conservatism, and initializer coverage.

Copy link
Copy Markdown
Contributor Author

CI diagnosis after the array-syntax repair: Tier-1 now reaches the strict corpus, but the branch still fails because the new test_ordering_hints_port.flow itself does not pass strict compilation. The broader CI also fails Stage-A/B fixed-point and pytest. Keeping this PR draft; it is not merge-ready. Next change should make the port test strict-valid first, then rerun and only promote after both self-host fixed-point and Python tests are green.

@godofecht
godofecht marked this pull request as ready for review August 22, 2026 07:21
@godofecht
godofecht merged commit f0477f5 into main Aug 22, 2026
22 checks passed
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