Skip to content

Move ordinary task parameters into HIR - #98

Draft
OttoApocalypse69 wants to merge 5 commits into
fix/v4-windows-runtime-link-contractfrom
refactor/v4-no-syntax-task-params
Draft

Move ordinary task parameters into HIR#98
OttoApocalypse69 wants to merge 5 commits into
fix/v4-windows-runtime-link-contractfrom
refactor/v4-no-syntax-task-params

Conversation

@OttoApocalypse69

Copy link
Copy Markdown
Member

What changed

  • Move ordinary top-level task parameter name, mode, named lifetime, surface type, and exact spans into ordered HIR-owned records.
  • Advance the HIR component snapshot to v6 with canonical owner/child records, exact counts and ordinals, strict vocabulary/span validation, and validation-before-mutation restore.
  • Make TY ordinary-task parameter APIs consume HIR facts; preserve explicitly named token-facing fallbacks for impl, doctrine, and extern signatures.
  • Feed semantic parameter declaration spans into MIR build while retaining whole-task visibility scope, and use semantic name spans for editor definitions.
  • Register executable HIR/TY/MIR/Meiya/editor/snapshot/invalidation coverage plus conformance and boundary guards.

Why this boundary

Parameter contracts are semantic signature facts. HIR owns their normalized source form and spans; TY interprets them, MIR build consumes their declaration/scope facts, and editor queries consume their definition spans. This removes another coherent syntax dependency without moving orchestration, snapshot coordination, or editor analysis into freak_driver.

Local validation

  • Independent read-only review: APPROVE exact b5348a83bc4dec4822892c53a0d2fdef7801367e...8445f7fccb42175ffd3bb565d1655e2ec6c262ea, no P0-P3.
  • python -u -m py_compile src/compiler/v4/check_v4.py freakc/auditor.py
  • python -u -m freakc audit-conformance
  • Focused native batch: MIR local annotation + task return + task parameter semantic boundaries (LLVM-MinGW), PASS.
  • python -u src/compiler/v4/check_v4.py --fast: all 250 fixtures PASS; 3,775 flattened statements; 42.5 MB peak retained.
  • git diff --check

Pending CI/platform evidence

  • Current-head GitHub Actions and automated review.
  • Linux/macOS execution supplied by CI; local native evidence is Windows LLVM-MinGW.

Conservative boundaries

This slice covers ordinary top-level task parameters only. Impl, doctrine, extern, closure/function-type, inferred, shape/route-field, const, and remaining MIR body type families remain explicit follow-up slices. It changes fact ownership, not language semantics or backend representation.

- Store ordered parameter semantics and spans in HIR snapshot v6\n- Route TY, MIR, and editor consumers through semantic adapters\n- Add boundary, restore, and invalidation smoke coverage
- Reject over-wide parameter records and impossible identifier facts
- Enforce semantic span order before restoring editor and TY inputs
- Extend adversarial and nonordinary boundary coverage
- Mutate a valid v6 parameter name to case-insensitive TRUE vocabulary\n- Require rejected restores to preserve the byte-identical HIR snapshot
- Register HIR v6 parameter snapshot and invalidation coverage
- Guard ordinary TY adapters against syntax reconstruction
- Preserve semantic parameter scopes through MIR and editor consumers
Place the ordinary parameter HIR check before the contract-region section it precedes.
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 624de7ca-7e9a-4e4f-9be3-6583e92fbc02

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

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