Skip to content

Store ordinary task returns in HIR - #96

Draft
OttoApocalypse69 wants to merge 2 commits into
refactor/v4-no-syntax-local-annotationsfrom
refactor/v4-no-syntax-task-returns
Draft

Store ordinary task returns in HIR#96
OttoApocalypse69 wants to merge 2 commits into
refactor/v4-no-syntax-local-annotationsfrom
refactor/v4-no-syntax-task-returns

Conversation

@OttoApocalypse69

Copy link
Copy Markdown
Member

What changed

  • store one closed ordinary-task return-form record in HIR for explicit, implicit-block, and arrow tasks
  • carry explicit declared return surface text and exact span through HIR snapshot v5
  • make TY consume explicit ordinary-task returns through HIR while preserving isolated arrow and nonordinary fallbacks
  • add transitive anti-token-scraping guards with a helper-indirection mutation self-test
  • add snapshot validation/atomic restore and return-only HIR/TY/MIR/Meiya/editor invalidation coverage

Ownership boundary

This is a bounded No Syntax Past HIR slice. HIR owns the normalized declared return fact; TY owns canonicalization and inference; MIR/Meiya/editor continue consuming TY APIs. Impl/doctrine/extern returns, arrow-expression inference, and implicit block inference remain explicit follow-up families.

Local validation

  • independent exact-head review of 47c77abaeebfdf28e4e10c41d5f4665398fce838...a6e7de0060967e920a0fbfb7dcf3d65f225d49b3: APPROVE, no P0-P3
  • python -u -m py_compile freakc/auditor.py src/compiler/v4/check_v4.py
  • python -u -m freakc audit-conformance
  • focused task return semantic boundary smoke under Global\FreakCheckV4
  • python -u src/compiler/v4/check_v4.py --fast: all 249 fixtures passed; 3,697 flattened statements; 40.7 MB peak retained
  • git diff --check

Pending remote evidence

  • current-head GitHub CI and automated review
  • cross-platform runtime execution remains CI-owned

Conservative boundaries

  • ordinary top-level task declarations only
  • no new return inference or language semantics
  • impl, doctrine, extern, closure, and function-type return syntax remain follow-up slices
  • TY snapshot stays v1; HIR snapshot v5 is validation-before-restore atomic

- Add closed task-return facts and HIR snapshot v5 validation\n- Make TY consume explicit ordinary returns without token reconstruction\n- Add focused boundary, snapshot, invalidation, and regression coverage
Trace ordinary explicit-return adapters through their bounded call closure and prove the guard rejects fallback indirection. Exercise return-only cache invalidation and semantic recomputation through HIR, TY, MIR, Meiya, and editor facts.
@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: e4486ffe-f7db-4161-8b2f-d0710482e1ea

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