Files
AILang/docs/journals/2026-05-18-iter-form-a-scalar-param-mode-carveout.md
T
Brummel 7d7f04e1a4 iter form-a-scalar-param-mode-carveout: scalar-param mode carve-out (docs-honesty tidy)
Resolves the M1-fieldtest [friction] + [spec_gap]#1 shared root:
form_a.md stated an unconditional 'every (fn ...) param needs an
(own/borrow) mode' rule in 4 places, contradicting shipped checker
behaviour (scalars take and require bare (con Int); a mode on a
scalar trips body-pointing use-after-consume/consume-while-borrowed).
All 4 sites rewritten symmetric to the existing return-type carve-out;
DESIGN.md gains the bare-scalar export-param rule + a corpus-grounded
Form-A snippet; RED-first anti-regrowth pin via FORM_A_SPEC + norm().
Zero language/checker/codegen change. Plan 4c266a6.
2026-05-18 15:51:34 +02:00

3.0 KiB
Raw Blame History

iter form-a-scalar-param-mode-carveout — form_a.md scalar-parameter mode carve-out (docs-honesty tidy)

Date: 2026-05-18 Started from: 4c266a64b4 Status: DONE Tasks completed: 4 of 4

Summary

Docs-honesty tidy in the docs-honesty-lint class resolving the fieldtest [friction] + [spec_gap]#1 from docs/specs/2026-05-18-fieldtest-embedding-abi-m1.md: crates/ailang-core/specs/form_a.md and docs/DESIGN.md §"Embedding ABI (M1)" stated an unconditional "every (fn ...) parameter MUST carry a mode" rule that contradicts the shipped checker behaviour (scalar Int/Bool/Unit/Str params take — and require — no mode, mirroring the existing return-type carve-out). RED-first: the new pin form_a_scalar_param_carveout_present_and_old_rule_absent was written asserting the post-edit state and failed correctly (Task 1), then the four form_a.md sites + one DESIGN.md insertion turned it green (Tasks 23). Zero language/checker/codegen change; exactly three files touched. Workspace suite 622 → 623 (delta = +1, the new pin), zero failures.

Per-task notes

  • iter form-a-scalar-param-mode-carveout.1: RED pin — use ailang_core::FORM_A_SPEC; added + new #[test] fn form_a_scalar_param_carveout_present_and_old_rule_absent (4 ABSENT + 4 PRESENT form_a + 1 PRESENT DESIGN assertions); failed at the first ABSENT check (site 3) as designed; 4 pre-existing pins unaffected (4 passed / 1 failed).
  • iter form-a-scalar-param-mode-carveout.2: form_a.md four sites — site 1 ### Function prose, site 2 grammar-block comment, site 3 Schema-invariants item 1 (+ checker-behaviour rationale), site 4 Pitfalls bullet split into heap-shaped-forget + inverse scalar-over-wrap. Pin then failed only on the DESIGN.md assertion; spec_drift all 8 green (not a lockstep partner, confirmed).
  • iter form-a-scalar-param-mode-carveout.3: DESIGN.md §"Embedding ABI (M1)" — inserted the bare-scalar export-param rule + the corpus-grounded step Form-A snippet (byte-identical to examples/embed_backtest_step.ail lines 3-11). Pin fully green; docs_honesty_pin 5 passed / 0 failed.
  • iter form-a-scalar-param-mode-carveout.4: regression gate — cargo test -p ailang-core 112 passed / 0 failed; workspace TOTAL_PASSED=623 (baseline 622, +1 expected) / 0 failed; zero src-code diff under ailang-check / ailang-codegen / ailang-core/src / ailang-surface.

Concerns

(none)

Known debt

(none — site 5 form_a.md:521-524 already-correct few-shot annotation left verbatim by design; the carve-out text deliberately reuses its heap-shaped/primitive vocabulary so the document is internally consistent end to end.)

Blocked detail

(none — DONE)

Files touched

  • crates/ailang-core/specs/form_a.md (4 carve-out sites)
  • docs/DESIGN.md (1 §"Embedding ABI (M1)" insertion)
  • crates/ailang-core/tests/docs_honesty_pin.rs (1 use + 1 new #[test])

Stats

bench/orchestrator-stats/2026-05-18-iter-form-a-scalar-param-mode-carveout.json