From eb4cb25b0c1fa25bf3bab6983277918702db3a7f Mon Sep 17 00:00:00 2001 From: Brummel Date: Wed, 13 May 2026 11:36:45 +0200 Subject: [PATCH] =?UTF-8?q?audit-form-a:=20milestone=20close=20=E2=80=94?= =?UTF-8?q?=20drift=5Ffound=20documentary-only,=20bench=20clean?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Architect drift_found, 4 documentary-only items: - 2× [medium] spec + plan "seven carve-outs" orphans surviving the 9fcda8b §C4(b) amendment commit. The implementation is eight-carve-out-correct; the spec/plan orphans are post-hoc retro-clean-up, not active drift. - 2× [low] hash.rs:57 empty `mod tests {}` placeholder after T5 relocation + round_trip.rs:16 stale "Direction 2" docstring contradicting T10's framing rewrite. Architect explicit recommendation: carry-on. No form-a.tidy queued. Drift items deferred to documentary cleanup at next opportunity. Bench: all 3 scripts exit 0, baseline pristine. - check.py: 63 metrics, 2 regressed-by-magnitude (latency.explicit_at_rc.max_us +124.99%; latency.implicit_at_rc.max_us +126.13%) both paired with p99 improvements on the same stem. 12th consecutive observation of the metric-identity-migrating noise envelope since audit-cma (2026-05-12). Baseline pristine. - compile_check.py: 24 metrics, 2 regressed-by-magnitude (check_ms.hello +32.44%; check_ms.borrow_own_demo +26.18%). Sub-millisecond timing jitter on the two smallest fixtures. iter form-a.1 T6 already flagged this pair as transient. - cross_lang.py: 25 metrics, 25 stable. Milestone [Form-A as the default authoring surface] fully closed. Next-step pointer: P2 candidates are [Retire io/print_int/_bool/_float] (top) and [Prelude embed: Form-A as compile-time source] (queued behind). Starting either is a /boss bounce-back per the new-milestone rule. --- docs/journals/2026-05-13-audit-form-a.md | 145 +++++++++++++++++++++++ docs/journals/INDEX.md | 1 + 2 files changed, 146 insertions(+) create mode 100644 docs/journals/2026-05-13-audit-form-a.md diff --git a/docs/journals/2026-05-13-audit-form-a.md b/docs/journals/2026-05-13-audit-form-a.md new file mode 100644 index 0000000..b44eb2d --- /dev/null +++ b/docs/journals/2026-05-13-audit-form-a.md @@ -0,0 +1,145 @@ +# audit-form-a — Milestone close (Form-A as the default authoring surface) + +**Date:** 2026-05-13 +**Audited range:** aabcadc (iter form-a.0) .. 9fdc4ca (iter form-a.1 T6-12) HEAD +**Spec:** `docs/specs/2026-05-13-form-a-default-authoring.md` (amended at 9fcda8b) +**Status:** drift_found (4 items, all documentary-only); bench clean (exit 0 across all three scripts) +**Recommendation:** carry-on — no form-a.tidy queued at architect's explicit recommendation; drift items deferred to documentary cleanup at next opportunity. + +## What holds (architect-verified) + +- DESIGN.md §"Roundtrip Invariant" restated correctly: four numbered + properties (parse-determinism + idempotency-under-print + CLI- + pipeline-idempotency + carve-out-anchor) replace the prior + Direction-1/Direction-2 framing; five surviving enforcement tests + named verbatim (parse_is_deterministic_over_every_ail_fixture, + parse_then_print_then_parse_is_idempotent_on_every_ail_fixture, + cli_parse_then_render_then_parse_is_idempotent, + every_ast_variant_is_observed_in_the_fixture_corpus, + examples_ail_json_inventory_matches_carve_outs). §"Float literals" + + §"Why anchored at top level" preserved. +- §A4 doctrine rewording landed verbatim per spec at CLAUDE.md:5-6 + + DESIGN.md:465-466 (canonical form = JSON-AST; authoring projection + = `.ail`; "Form (A) is one projection; the JSON-AST stays canonical" + preserved as the second sentence). +- Carve-out inventory matches the eight-file spec post-amendment: + `ls examples/*.ail.json | wc -l` returns 8, alphabetical order + `broken_unbound + prelude + 3× test_22b2_* + 3× test_ct1_*`. + `crates/ailang-core/tests/carve_out_inventory.rs::EXPECTED` + hardcodes the same eight entries. +- 156 non-carve-out `.ail.json` deleted; 157 `.ail` files present + (98 fresh-rendered in iter form-a.1 T2 + 58 pre-iter + the + prelude pilot from form-a.0). No regressions in + `cargo test --workspace` (557 green + 3 ignored). +- WhatsNew milestone-close entry editorial-clean per /boss + convention: English, no crates / iter-codes / agent names, leads + with the change, factual tone, telegram-pragmatic length. +- Roadmap milestone struck `[x]` with closing attribution + `(Closed 2026-05-13 by iter form-a.1.)`; follow-up milestone + `[Prelude embed: Form-A as compile-time source]` present with + motivation + problem + three resolution options. +- Per-iter journals (`2026-05-13-iter-form-a.0.md`, + `2026-05-13-iter-form-a.1.md`) both present; `INDEX.md` carries + both lines in chronological order. + +## Drift items (deferred per architect recommendation) + +| Severity | Path | Issue | +|----------|------|-------| +| medium | `docs/specs/2026-05-13-form-a-default-authoring.md` (§C1, §C2, §"Data flow") | Three sites still say "seven carve-outs" post-amendment; acceptance #1/#2 correctly say eight. Spec self-inconsistent against its own amendment commit 9fcda8b. | +| medium | `docs/plans/2026-05-13-iter-form-a.1.md` (two sites) | Same "seven carve-outs" wording surviving the amendment; harmless now but contradicts the eight-file reality the plan executed. | +| low | `crates/ailang-core/src/hash.rs:57` | Empty `mod tests {}` placeholder left after iter form-a.1 T5 relocation. Documentary-only today; drift if it stays past one further milestone. | +| low | `crates/ailang-surface/tests/round_trip.rs:16` | Module docstring still says "Direction 2 of the Roundtrip Invariant", but DESIGN.md T10 retired the Direction-1/Direction-2 framing. Stale cross-reference to a renamed concept. | + +All four items are documentary-only: the spec / plan orphans +contradict their own post-amendment sections but do not affect the +shipped implementation (which is eight-carve-out-correct); the +hash.rs placeholder and the round_trip.rs docstring are cleanup +hygiene that does not change behaviour or invariants. + +Architect's explicit recommendation: "carry on as planned. Queue a +documentary `form-a.tidy` only if a subsequent reader hits the +seven-vs-eight orphans; the implementation is correct and the spec +orphans are post-hoc retro-clean-up, not active drift." The audit +follows this recommendation. + +## Bench-regression report + +All three bench scripts exit 0; baseline left pristine. + +### `bench/check.py` (exit 0) + +63 metrics; 2 regressed-by-magnitude, 2 improved-by-magnitude, 59 +stable. Regressions both on `max_us` tail-latency metrics: + +- `latency.explicit_at_rc.max_us` +124.99% (tol 25%) — paired with + `latency.explicit_at_rc.p99_us` *improvement* −27.02%. +- `latency.implicit_at_rc.max_us` +126.13% (tol 30%). + +This is the 12th consecutive audit observation of the metric- +identity-migrating noise envelope on tail-latency metrics, dating +back to audit-cma (2026-05-12). The pattern across the lineage: +different metric identifiers fire each run, magnitudes oscillate, +median + p99 stay stable; the firing-metric set has migrated +through approximately a dozen distinct identifiers across the +twelve audits. The convention since the audit-cma originating +observation is to hold the baseline pristine — the metric-migration- +between-runs is itself attribution evidence that the cluster is +noise-class, not signal-class. The queued P3 latency-methodology- +histogram rework is the right ratification path; --update-baseline +is not. + +The form-a milestone is intentionally test-infra + corpus migration, +not language semantics. Zero language-semantic surface was touched. +The tail-latency regressions are not caused by the migration; they +are the noise envelope continuing. + +### `bench/compile_check.py` (exit 0) + +24 metrics; 2 regressed-by-magnitude, 0 improved, 22 stable. + +- `check_ms.hello` +32.44% (tol 25%) — 1.2ms → 1.5ms. +- `check_ms.borrow_own_demo` +26.18% (tol 25%) — 1.3ms → 1.7ms. + +Both on the smallest fixtures in the corpus where `check_ms` is +sub-2-millisecond. iter form-a.1 T6 journal already flagged this: +"First compile_check run reported exit-1 due to sub-millisecond +`check_ms` noise on `hello` and `borrow_own_demo`; second run +clean." Now both still fire at the current audit re-run. This is +sub-millisecond timing-jitter, not a migration-induced regression. +The migration touched only fixture file extensions and test-loader +call sites; the `ail check` binary path was not modified. + +### `bench/cross_lang.py` (exit 0) + +25 metrics; 0 regressed, 0 improved-beyond-tolerance, 25 stable. +Cross-language ratios (AILang RC / AILang bump / C reference) all +hold within tolerance. The most interesting movement is +`bench_tree_walk.rc_over_c` from 2.7394 to 2.5871 (−5.56%) — a +modest improvement still inside the noise envelope. + +## Recommendation summary + +| Item | Recommendation | +|------|----------------| +| 4 architect drift items | carry-on (per architect's explicit recommendation; documentary-only) | +| `bench/check.py` 2 regressions | noise-envelope continuation (12th audit); baseline pristine | +| `bench/compile_check.py` 2 regressions | sub-millisecond timing-jitter; baseline pristine | +| `bench/cross_lang.py` clean | no action | + +No `form-a.tidy` iter is queued. The four documentary drift items +are recorded here for future-reader visibility; they will be +addressed inline at the next iter that touches the affected files, +or in a dedicated cleanup pass if a subsequent reader hits them. + +The form-a-default-authoring milestone is fully closed. + +## Next-step pointer + +Per `/boss` and the milestone-close pipeline: the next milestone +candidate at the top of the roadmap is `[Retire io/print_int/_bool/_float]` +(P2, post-milestone-24 mechanical follow-up). The `[Prelude embed: +Form-A as compile-time source]` milestone is the second P2 entry, +queued behind the io/print retire. Starting either is a `/boss` +bounce-back per the new-milestone rule — the Boss surfaces the +candidate and the user picks the session shape. diff --git a/docs/journals/INDEX.md b/docs/journals/INDEX.md index 894868f..7e65d47 100644 --- a/docs/journals/INDEX.md +++ b/docs/journals/INDEX.md @@ -53,3 +53,4 @@ - 2026-05-13 — iter 24.tidy: close 5 actionable drift items from audit-24 — T1 DESIGN.md new subsection §Cross-module references in synthesised bodies (3 invariants installed iter 24.3: canonical-form MonoTarget::FreeFn::type_args via normalize_type_for_lookup, post-mono synthesised body import_map-bypass + module_user_fns fallback, FreeFnCall constraint-residual push per declared forall-constraint); T2 codegen_import_map_fallback_pin (integration test asserts prelude.print__ body references user_module.show__ AND prelude imports do not contain user_module); T3 polyfn_dot_qualified_branch_pin (asserts bare-name print f fires exactly one no-instance + zero unknown-variable, proving constraint-residual push fires via dot-qualified branch); T4 check/lib.rs:2858 unwrap_or_default → expect(class_methods registry coherence) — surfaces class-index drift on regression; T5 mono.rs apply_subst_and_normalize helper extracted from byte-identical sites at :685-714 + :1284-1303 with Option return — each call site keeps own rigid-var/unit-default policy. Tests 558/558 (was 556+2 pins). Bench cross_lang exit 0 stable, compile_check + check both exit 0 this run (10th consecutive lineage observation unobserved-firing). audit-24 medium-3 negative-test breadth defers to roadmap P3; low-1 sweep noise carry-on → 2026-05-13-iter-24.tidy.md - 2026-05-13 — iter form-a.0: prelude pilot for Form-A-as-default-authoring milestone — examples/prelude.ail rendered (116 lines / 6386 bytes) via `ail render`; two auto-discovering roundtrip tests (every_ail_fixture_matches_its_json_counterpart + parse_then_print_then_parse_is_idempotent_on_every_ail_fixture) green on the new fixture without test-code changes; prelude.ail.json retained per spec §A2 (singular dual-form iter, deletion lands iter 1 with bulk test-infra refactor); cargo test --workspace green at 558 tests → 2026-05-13-iter-form-a.0.md - 2026-05-13 — iter form-a.1: Form-A-as-default-authoring milestone close (Boss-decided strategy C, big-bang) — 12 tasks across two implementer dispatches; T1 added 3 new tests (parse-determinism + CLI-pipeline-idempotency + carve_out_inventory#[ignore]) + T2 bulk-rendered 99 missing examples/.ail (corpus 58→157 .ail) + T3-4 migrated 26 fixture-loading test files (Group A load_workspace→ailang_surface::load_workspace + Group B subprocess suffix flip) + T5 relocated 23 #[cfg(test)] mod tests blocks from ailang-core/-codegen production source to integration test crates with ailang-surface dev-dep (hash_pin.rs + workspace_pin.rs + eq_primitives_pin.rs + prose snapshot migration) + T6 bench-driver suffix flips (4 Python + run.sh, both compile_check.py + cross_lang.py exit 0) + T7 re-authored 4 raw-JSON-inspect e2e tests via `ail parse`-derived tempfiles + retired 1 (render_parse_round_trip_canonical subsumed by T1) + T8 deleted 156 non-carve-out .ail.json (inventory 8 carve-outs + 157 .ail post-T8, alphabetical: broken_unbound + prelude + 3× test_22b2_* + 3× test_ct1_*) + 20 forward-pulled stale-.ail.json-ref repairs missed by T1-5 recon + T9 retired 3 obsolete roundtrip tests (print_then_parse_round_trips_every_fixture + every_ail_fixture_matches_its_json_counterpart + cli_render_then_parse_preserves_canonical_bytes_on_every_fixture) + dead helpers (list_json_fixtures ×2, round_trip_one, strip_trailing_newlines) + flipped schema_coverage corpus to .ail (forward-pulled into T8 for green-gate) + T10 §C3 DESIGN.md §Roundtrip Invariant restated with parse-determinism + idempotency + CLI-pipeline-idempotency + carve-out-anchor framing (5 surviving enforcement tests named) + T11 §A4 CLAUDE.md + DESIGN.md doctrine sentences replaced (canonical form is JSON-AST; authoring form is .ail) + T12 WhatsNew milestone-close entry + roadmap [milestone] form-a struck [x] (Closed 2026-05-13 by iter form-a.1). 4 carve-outs added beyond the original 7 §C4(a): only 1 — prelude.ail.json — landed as §C4(b) compile-time-embed (rationale: include_str! at workspace.rs:417 + main.rs:474; resolution queued as separate milestone Prelude embed: Form-A as compile-time source). Spec amendment + grounding-recheck PASS at 9fcda8b. Final tests: 557 green + 3 ignored (561 from T1 − 4 retired = 557); bench compile_check.py + cross_lang.py exit 0; check.py noise envelope continues 11th consecutive audit, baseline pristine. Milestone structurally closed → 2026-05-13-iter-form-a.1.md +- 2026-05-13 — audit-form-a: milestone close (Form-A as the default authoring surface) — architect status drift_found with 4 documentary-only items (2× [medium] spec + plan "seven carve-outs" orphans contradicting the §C4(b) amendment commit 9fcda8b — the implementation is eight-carve-out-correct; 2× [low] hash.rs:57 empty `mod tests {}` placeholder after T5 relocation + round_trip.rs:16 stale "Direction 2" docstring contradicting T10's framing rewrite); architect explicit recommendation carry-on — no form-a.tidy queued, drift deferred to documentary cleanup at next opportunity (architect verbatim: "the implementation is correct and the spec orphans are post-hoc retro-clean-up, not active drift"). Bench: all 3 scripts exit 0, baseline pristine for the 12th consecutive audit. check.py 2 regressions in tail-latency max_us (latency.explicit_at_rc + latency.implicit_at_rc, both >120% over baseline, both paired with p99 improvements on same metric stem) — 12th consecutive observation of the metric-identity-migrating noise envelope since audit-cma; compile_check.py 2 regressions in sub-millisecond check_ms on hello + borrow_own_demo — timing-jitter on the corpus's two smallest fixtures, iter form-a.1 T6 already flagged the same pair as transient; cross_lang.py 25/25 stable, bench_tree_walk.rc_over_c improved 2.74→2.59 still inside noise. What holds (verified): §C3 §Roundtrip Invariant restated with 4 properties + 5 surviving enforcement tests named verbatim; §A4 CLAUDE.md + DESIGN.md doctrine reworded per spec; 8-carve-out inventory matches spec post-amendment (alphabetical: broken_unbound + prelude + 3× test_22b2_* + 3× test_ct1_*); 156 non-carve-out .ail.json deleted; 157 .ail post-iter; cargo test --workspace 557 green + 3 ignored; WhatsNew editorial-clean (user-facing); roadmap milestone struck [x] with close attribution + follow-up [Prelude embed] milestone present with motivation + 3 resolution options. Milestone fully closed → 2026-05-13-audit-form-a.md