You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Records the SHAPE of the architectural shift to a Polonius-style
constraint-based loan solver, the final residual on CORE-01 (#177).
Lexical / operational fragment of CORE-01 is covered by the in-flight
ref-to-ref / Slice C' / Slice D PRs (#395#396#397); this ADR is the
sole open base-language soundness gap after those land.
Decision:
- (b) Custom origin-based solver in OCaml under lib/borrow_polonius/
using Polonius's published dlv_naive shape (subset/3, loan_live_at/2,
loan_invalidated_at/2, error/1). Rejected (a) keep-lexical and
(c) Rust polonius-engine FFI for reasons in the ADR.
- Surface syntax: FULL ELISION for v1; origins inferred by the
elaborator, no source-level 'a parameters. A future surface escape
hatch is a separate ADR gated on ADR-012's grammar-conflict
disclosure rule.
- Staged M1-M4 migration with the lexical checker as merge oracle
through M3, cut over at M4.
Files:
- docs/decisions/0022-polonius-origin-variables.adoc — long-form ADR
(new directory; first ADR in this series at the repo root —
affinescript-vite and affinescriptiser have their own sub-project
decisions dirs but the main repo did not).
- .machine_readable/6a2/META.a2ml — structured [[adr]] block ADR-022
(next free after ADR-021).
- lib/borrow.ml — comment-only edit to the closing residual-TODO
block, pointing readers at ADR-022 for the migration plan.
Notes for reviewers:
- Status: Proposed. No code path or test surface changes by this PR.
Owner ratification of the shape gates the M1 PR.
- SETTLED-DECISIONS.adoc is deliberately untouched — that doc's
preamble is for fully-settled decisions; ADR-020 (Proposed) and
ADR-021 (just-accepted) are also absent. Section to be added on
ratification.
- Local dune build cannot run in this env due to a pre-existing
ppx_derivers / system-stdlib mismatch (reproducible against clean
origin/main); relying on CI. No code change in this PR, so the
blast radius is comment + .a2ml + .adoc.
Refs #177
Refs ADR-012 (grammar changes are correctness assertions — gates the
future surface-origin ADR mentioned in §"Surface syntax")
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments