feat: Boundary 3 bidirectional type-checker for lambda calculus#182
feat: Boundary 3 bidirectional type-checker for lambda calculus#182
Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 17 minutes and 57 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
lambda-editor | de13f65 | Commit Preview URL Branch Preview URL |
Apr 15 2026, 02:14 PM |
Benchmark Comparison ReportComparing PR branch against Main Module BenchmarksBase branch: PR branch: event-graph-walker BenchmarksBase branch: PR branch: Benchmarks run with |
There was a problem hiding this comment.
💡 Codex Review
https://github.com/dowdiness/canopy/blob/03be099a15832cdc818d95f89acc2a26d1d2faa5/loom/examples/lambda/src/typecheck/typecheck.mbt#L90-L92
Guard DefId lookups against stale encounter_order reuse
In build_typecheck_pipeline_with_index, the MemoMap resolver uses entry.encounter_order as a direct index into state.type_memos without verifying that the slot still corresponds to entry.name. After a structural edit that rebuilds the chain (for example renaming/removing/reordering defs), old InternIds remain valid in the grow-only InternTable but can now read a different definition’s type at the same index, returning silently incorrect results instead of an error. This breaks the query-by-id contract and can surface wrong types to callers that cache IDs across edits.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
incr/types/— grow-only interning table with stable InternId keys for cross-revision cache stabilitylambda/typecheck/— TInt, TArrow, TUnit, TError with infer/check, error propagation, cascading suppressionλx:Int. body,let f(x:Int) = ...), TypeAnnotViewInfrastructure validation for Boundary 3 (CST → Typed AST). Exercises InternTable, MemoMap, Scope-managed Memo chains, and diagnostic collection in incr. The type system is intentionally minimal; correctness of the incremental architecture matters more than language expressiveness.
Submodule PRs
feat/boundary3-intern-table(InternTable)feat/boundary3-bidirectional-typechecker(type-checker + parser changes)Test plan
cd loom/incr && moon test— 495 tests (4 new InternTable)cd loom/examples/lambda && moon test— 494 tests (43 new: 39 typecheck + 4 lexer)🤖 Generated with Claude Code