@calcit/procs 0.13.44 → 0.13.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/.yarn/install-state.gz +0 -0
  2. package/editing-history/20260825-2121-macro-parameter-diagnostics.md +10 -0
  3. package/editing-history/20260825-2138-keep-malformed-macro-params-hard.md +5 -0
  4. package/editing-history/20260825-2311-macro-capability-review-followup.md +10 -0
  5. package/editing-history/20260825-2312-macro-expansion-metrics.md +11 -0
  6. package/editing-history/20260825-2337-macro-query-and-capability-scope.md +11 -0
  7. package/editing-history/20260825-2338-core-structural-macro-contracts.md +10 -0
  8. package/editing-history/20260825-2356-delayed-macro-metrics-review.md +5 -0
  9. package/editing-history/202608252220-phase-aware-macro-signatures.md +35 -0
  10. package/editing-history/202608252249-macro-compile-time-capabilities.md +27 -0
  11. package/editing-history/20260826-0007-assertion-macro-contracts.md +8 -0
  12. package/editing-history/20260826-0023-assertion-macro-review.md +4 -0
  13. package/editing-history/20260826-0038-control-flow-macro-contracts.md +9 -0
  14. package/editing-history/20260826-0100-review-exact-control-flow-contracts.md +5 -0
  15. package/editing-history/20260826-0120-pattern-macro-contracts.md +8 -0
  16. package/editing-history/20260826-0133-collection-macro-contracts.md +9 -0
  17. package/editing-history/20260826-0152-definition-macro-contracts.md +25 -0
  18. package/editing-history/20260826-0203-transform-macro-contracts.md +28 -0
  19. package/editing-history/20260826-0214-binding-update-macro-contracts.md +14 -0
  20. package/editing-history/20260826-0629-type-observability-macros.md +8 -0
  21. package/editing-history/20260826-0642-type-remaining-match-macros.md +7 -0
  22. package/editing-history/20260826-0654-macro-log-capability.md +8 -0
  23. package/editing-history/20260826-0707-release-01345.md +6 -0
  24. package/editing-history/20260826-0741-finish-core-macro-contracts.md +9 -0
  25. package/editing-history/20260826-0843-result-parsing-methods.md +7 -0
  26. package/editing-history/20260826-0847-result-parsing-error-examples.md +5 -0
  27. package/editing-history/20260826-0850-document-parser-backend-boundary.md +4 -0
  28. package/editing-history/20260826-1006-typed-decode-result.md +30 -0
  29. package/editing-history/20260826-1108-pure-macro-expansion-cache.md +17 -0
  30. package/editing-history/20260826-1149-upgrade-ternary-tree-0021.md +20 -0
  31. package/editing-history/20260826-1200-nested-macro-gensym-cache.md +16 -0
  32. package/editing-history/20260826-1208-release-01346.md +11 -0
  33. package/lib/package.json +1 -1
  34. package/package.json +1 -1
Binary file
@@ -0,0 +1,10 @@
1
+ # Macro parameter diagnostics and coverage
2
+
3
+ - Added one shared parameter-shape model for required, optional, and rest bindings, including malformed marker sequences. Both preprocessing and `analyze check-types` now use the same comparison and stable diagnostic codes.
4
+ - Preserved ordinary function compatibility: existing function schemas describe fixed arity without separately encoding the `?` marker. Strict optional-shape comparison is enabled for macros, while ordinary functions compare total fixed arity.
5
+ - Macro schema-shape mismatches remain staged during ecosystem migration. `analyze check-types` reports them by default; location-aware preprocessing warnings can be enabled with `CALCIT_WARN_MACRO_SCHEMA_SHAPE=1` and use `W_MACRO_SCHEMA_PARAM_SHAPE`.
6
+ - Corrected whole-`Dynamic` macro coverage from `Full` to `None`; explicitly typed macro schemas with Dynamic argument/result slots remain `Partial`. Explicit `:: Dynamic` now remains distinct from an omitted schema across binary serialization and reports `W_MACRO_SCHEMA_DYNAMIC`, while omission reports `W_SCHEMA_MISSING`.
7
+ - Same-command coverage baseline:
8
+ - Calcit core: overall `full/partial/none` changed from `420/107/18` to `405/107/33`; macros changed from `18/61/0` to `3/61/15`.
9
+ - Respo `respo.core`: overall changed from `12/53/1` to `7/53/6`; its five whole-`Dynamic` macros changed from `Full` to `None`.
10
+ - External regression used latest Respo 0.16.86 and Recollect 0.0.34. Respo required rebuilding `.calcit/modules` with `caps --ci` because its local `js-ffi` view was still at 0.1.9 despite `deps.cirru` declaring 0.1.10.
@@ -0,0 +1,5 @@
1
+ # Keep malformed macro parameters as hard errors
2
+
3
+ - Review identified that the staged macro-schema partition was too broad and also included `E_DEF_PARAM_SHAPE`.
4
+ - Only schema compatibility mismatches (`E_SCHEMA_REQUIRED_ARGS`, `E_SCHEMA_OPTIONAL_ARGS`, and `E_SCHEMA_REST_ARGS`) are now staged during ecosystem migration.
5
+ - Malformed source parameter sequences and schema-kind mismatches remain hard preprocessing errors.
@@ -0,0 +1,10 @@
1
+ # Macro capability review follow-up
2
+
3
+ - Keep the canonical strict Macro signature example complete by serializing an
4
+ explicit empty `:capabilities` set.
5
+ - Treat mutable BufList construction and mutation as `:mutable-state` during
6
+ macro expansion.
7
+ - Validate capability leaves as colon-prefixed tags before general Cirru EDN
8
+ parsing, preserving a stable schema-specific error instead of accepting a
9
+ write that cannot round-trip.
10
+ - Verified with the macro capability and macro schema unit-test groups.
@@ -0,0 +1,11 @@
1
+ # Macro expansion metrics baseline
2
+
3
+ - Added opt-in `--macro-metrics` JSON-on-stderr instrumentation for expansion
4
+ counts, exclusive evaluator/post-preprocess time, general evaluator fallback,
5
+ and cache outcome reasons.
6
+ - Nested macro phases pause parent timers so aggregate costs are not inflated by
7
+ recursive inclusive timing.
8
+ - Release-mode baselines on the Calcit test snapshot and latest Respo identify
9
+ post-expansion processing and common structural macros as the next targets.
10
+ - This is the instrumentation checkpoint for issue #436; it deliberately does
11
+ not add the typed Macro IR or pure expansion cache yet.
@@ -0,0 +1,11 @@
1
+ # Macro query and capability scope follow-up
2
+
3
+ - Preserve strict Macro contracts in `query schema`, `query context`, and JSON
4
+ output instead of degrading them through ordinary type serialization.
5
+ - Serialize an explicit empty `:capabilities` set for every strict/pure Macro;
6
+ legacy signatures retain their compatibility representation.
7
+ - Limit a strict macro's capability context to evaluation of its own body.
8
+ Post-preprocessing an emitted expansion may invoke a separate nested macro,
9
+ whose effects must not be charged to the outer emitter.
10
+ - Added query regression coverage and validated the boundary with the migrated
11
+ core `fn` macro emitting bodies that contain platform-sensitive legacy macros.
@@ -0,0 +1,10 @@
1
+ # Core structural macro contracts
2
+
3
+ - Migrated `let`, `fn`, `and`, `cond`, and `do` from whole-Dynamic legacy
4
+ schemas to strict, compile-time-pure phase contracts.
5
+ - Kept expansion values as `Expr<Dynamic>` where the result depends on user
6
+ code, while enforcing list-shaped binding/argument/condition syntax.
7
+ - Canonicalized strict Macro storage with explicit empty capability sets and
8
+ added snapshot assertions so the migrated set cannot silently regress.
9
+ - The Calcit test snapshot now exposes 895 strict/pure expansion candidates in
10
+ the measured run (up from 4), while preserving all 2,432 expansions.
@@ -0,0 +1,5 @@
1
+ # Delayed macro metrics review
2
+
3
+ - Clarified that `cacheHits` and `cacheInvalidations` are reserved report fields until the expansion cache is implemented.
4
+ - Made the metrics report unit test operate on local state, avoiding interference with global opt-in metrics state when Rust tests run in parallel.
5
+ - Kept production collection behavior unchanged by extracting small state-local recording and serialization helpers.
@@ -0,0 +1,35 @@
1
+ # Phase-aware macro signatures
2
+
3
+ Implemented roadmap issue #434 after the parameter-shape diagnostics from
4
+ #433/#438 landed.
5
+
6
+ - Added a dedicated `MacroSignature` model instead of representing macros as
7
+ runtime `CalcitFnTypeAnnotation` values.
8
+ - Split raw inputs into `Syntax`, `SyntaxSymbol`, `SyntaxList`, and `Expr<T>`;
9
+ split expansion results into `Expr<T>`, `Definition<T>`, and `Declarations`.
10
+ - Added required, optional, rest, generic, where-bound, and feature metadata.
11
+ - Preserved old `Macro {:args ... :return ...}` snapshots as explicit legacy,
12
+ non-strict signatures; the ordinary Fn parser rejects strict macro fields.
13
+ - Attached signatures to materialized `CalcitMacro` values, typed macro-body
14
+ locals at syntax phase, and added separate call-input and expansion-result
15
+ diagnostics with source locations and macro stacks.
16
+ - Updated snapshot, detailed snapshot, weak-type, and coverage paths so the new
17
+ model survives all formats and contributes accurate coverage.
18
+ - Migrated core `%{}?` to `SyntaxSymbol + & SyntaxList -> Expr<Struct>` and
19
+ documented Respo `defstyle` as the declaration-output case study.
20
+
21
+ Validation performed:
22
+
23
+ - `cargo fmt`
24
+ - `cargo clippy --all-targets -- -D warnings`
25
+ - `cargo test`
26
+ - `yarn compile`
27
+ - `yarn check-all`
28
+ - `yarn check-agent-interface`
29
+ - `calcit docs check-md --entry src/cirru/calcit-core.cirru docs/MacroSignature.md`
30
+ - latest Respo main: 27/27 tests and 126/126 documentation blocks
31
+ - latest Recollect main: 9/9 Calcit tests plus JS tests
32
+
33
+ External regressions used globally installed Calcit 0.13.44 and refreshed
34
+ `@calcit/procs` 0.13.44; stale local 0.13.27 packages were replaced before the
35
+ final run.
@@ -0,0 +1,27 @@
1
+ # Macro compile-time capabilities
2
+
3
+ Issue #435 adds an enforceable effect boundary around strict macro execution.
4
+ The capability policy is centralized in `runner::macro_capability` and remains
5
+ active through ordinary helper calls by using a scoped evaluator context.
6
+
7
+ Strict `MacroSignature` values now serialize a dedicated `:capabilities`
8
+ hashset. Pure expansion needs no declaration. Environment, filesystem,
9
+ platform, clock, mutable-state, and dynamic-eval reads/actions may be declared;
10
+ filesystem writes, process control, and host FFI are classified but always
11
+ rejected. Legacy macro signatures stay compatible, but their effects remain
12
+ unknown and they are not eligible for future pure-expansion caching.
13
+
14
+ The evaluator checks builtin procedures, state/dynamic-eval syntax, native
15
+ methods, registered procedures, and raw host code. Missing declarations use
16
+ `E_MACRO_CAPABILITY_MISSING`; forbidden operations use
17
+ `E_MACRO_CAPABILITY_DISALLOWED`. Both preserve the macro call location and
18
+ helper chain. Quoted code that performs an effect later at runtime remains a
19
+ pure expansion. Macro diagnostics also reuse the raw call-head location instead
20
+ of the locationless resolved import, preserving no-argument call sites.
21
+
22
+ Validation covered formatting, clippy, all Rust and CLI tests, native/JS/IR/WASM
23
+ integration, agent-interface checks, and the macro-signature documentation.
24
+ Latest Respo passed 27 tests and 126 documentation blocks. Latest Recollect
25
+ passed 9 native tests plus JS and WASM regressions. Its production build still
26
+ reports the existing Respo DOM FFI and `:unit`/`:nil` warning baseline; neither
27
+ external repository was modified.
@@ -0,0 +1,8 @@
1
+ # Assertion macro contracts
2
+
3
+ - Migrated the three `calcit.core` assertion macros and five `calcit.test` helpers to strict, pure phase-aware contracts.
4
+ - Kept input values as `Expr<Dynamic>` because equality and truthiness intentionally accept heterogeneous runtime values.
5
+ - Declared precise expansion results: `Expr<Unit>` for assertion helpers and `Expr<Bool>` for `throws?`.
6
+ - Added the missing successful `&unit` branch to `assert=` so its implementation matches its long-standing Unit contract.
7
+ - Added snapshot coverage and exercised definition-attached tests plus public examples.
8
+ - On `calcit/test.cirru`, strict/pure macro candidates increased from 895 to 1,666 while total expansions stayed at 2,432.
@@ -0,0 +1,4 @@
1
+ # Assertion macro review
2
+
3
+ - Strengthened the real Snapshot inventory test to assert the exact required input count for each `calcit.test` assertion helper.
4
+ - Kept the original history timestamp because the commit was created at `2026-08-26 00:13:33 +0800`; the review bot compared against the previous UTC date.
@@ -0,0 +1,9 @@
1
+ # Control-flow macro contracts
2
+
3
+ - Migrated `or`, `either`, `when`, `when-not`, `if-not`, `if-let`, and `when-let` to strict, pure phase-aware contracts.
4
+ - Preserved expression-level Dynamic boundaries where branch value types intentionally vary, while declaring `when-let` as `Expr<Option<Dynamic>>`.
5
+ - Corrected the `or false nil` example to expect the final falsey value (`nil`) and clarified that behavior in its documentation.
6
+ - Fixed strict macro body parameter typing: `SyntaxList` is represented as a list, `SyntaxSymbol` as a symbol, and rest bindings as lists of their declared syntax element type.
7
+ - Added regression coverage for strict macro body parameter representations and the real core Snapshot inventory.
8
+ - Increased strict macro coverage in `calcit/test.cirru` from 1666 to 1805 of 2432 expansions.
9
+ - Verified the release compiler against Respo `be8141e` (27 tests and check-only JS) and Recollect `6c235d0` (9 native tests plus JS/Node tests).
@@ -0,0 +1,5 @@
1
+ # Exact control-flow contract regression checks
2
+
3
+ - Strengthened the core Snapshot inventory to assert each migrated control-flow macro's exact required, optional, and rest syntax contracts.
4
+ - Asserted exact expansion types, including `when-let` as `Expr<Option<Dynamic>>` and the remaining macros as `Expr<Dynamic>`.
5
+ - Documented the strict macro body type helpers added by the original change.
@@ -0,0 +1,8 @@
1
+ # Pattern-matching macro contracts
2
+
3
+ - Migrated `tag-match`, `list-match`, `struct-match`, `case`, and their internal expansion helpers to strict, compile-time-pure macro contracts.
4
+ - Kept branch bodies as `SyntaxList`; retained `list-match`'s heterogeneous public argument sequence as an intentional `Syntax` rest boundary while typing its internal helper exactly.
5
+ - Corrected the pre-existing `tag-match` example expectation from `got:hello` to `hello:got`, matching `str x |:got`.
6
+ - Added exact Snapshot assertions for required, optional, rest, capability, and expansion contracts across both `calcit.core` and `calcit.internal`.
7
+ - Increased strict macro coverage in `calcit/test.cirru` from 1805 to 1949 of 2432 expansions.
8
+ - Verified all repository gates plus Respo `be8141e`, Recollect `6c235d0`, and js-ffi `25869b6`; js-ffi dependencies were reinstalled from its 0.13.44 lockfile before Node/browser contract tests.
@@ -0,0 +1,9 @@
1
+ # Collection macro contracts
2
+
3
+ - Migrated `{}`, `%{}`, and `{,}` to strict, compile-time-pure macro contracts.
4
+ - Declared map literal expansions as `Expr<Map<Dynamic, Dynamic>>` and struct literal expansion as `Expr<Struct>`.
5
+ - Kept pair-oriented inputs as `SyntaxList` and the flat comma-filtering `{,}` body as an intentional raw `Syntax` rest boundary.
6
+ - Corrected the pre-existing `%{}` example to use field pairs `(:x 1)` and `(:y 2)` rather than list-constructor calls that introduced extra fields.
7
+ - Added exact Snapshot assertions for each macro's input and expansion contracts.
8
+ - Increased strict macro coverage in `calcit/test.cirru` from 1949 to 2133 of 2432 expansions.
9
+ - Verified all repository gates plus Respo `be8141e`, Recollect `6c235d0`, and js-ffi `25869b6` with the current compiler.
@@ -0,0 +1,25 @@
1
+ # Definition-value macro contracts
2
+
3
+ ## Changes
4
+
5
+ - Migrated `def` to a pure phase-aware macro contract with a symbol declaration name and an explicit dynamic expression boundary.
6
+ - Migrated `deftrait`, `defstruct`, `defimpl`, and `defenum` to strict syntax-input contracts with precise `Trait`, `StructDef`, `Impl`, and `EnumDef` expression outputs.
7
+ - Kept symbol/tag compatibility for data-definition names by using unrestricted syntax for those positions; method and field forms use list syntax where the macro requires pair/list forms.
8
+ - Added Snapshot assertions for required, optional, rest, capability, and expansion fields so serialization regressions cannot silently weaken these contracts.
9
+
10
+ ## Semantic finding
11
+
12
+ Although these macros generate top-level definition values, the core `def` macro is consumed before the outer expansion-result check. Their observable expansion contract is therefore `Expr<T>`, not `Definition<T>`. Using `Definition<T>` fails against the real core corpus because the checked form is already `&trait::new`, `&struct-def:new`, `&impl::new`, or `&enum-def:new`.
13
+
14
+ ## Validation
15
+
16
+ - Core strict macro expansions: `2133/2432` -> `2341/2432`; legacy bypasses: `299` -> `91`.
17
+ - `cargo fmt --check`
18
+ - `cargo clippy -- -D warnings`
19
+ - `yarn compile`
20
+ - `cargo test`
21
+ - `yarn check-all`
22
+ - `yarn check-agent-interface`
23
+ - Respo `be8141e`: 27 definition-attached tests and JS check-only passed.
24
+ - Recollect `6c235d0`: 9 unit tests, JS generation, and Node runtime passed.
25
+ - js-ffi `25869b6`: default/node/browser checks plus Node and browser-node contracts passed.
@@ -0,0 +1,28 @@
1
+ # Transform macro contracts
2
+
3
+ ## Changes
4
+
5
+ - Migrated `->`, `->%`, and `%<-` with phase-aware base/step contracts.
6
+ - Migrated `apply-args` and `flipped` with callable input contracts and explicit dynamic result boundaries.
7
+ - Migrated anonymous function shorthands `\` and `\.` with syntax inputs and callable expression outputs.
8
+ - Migrated `[,]` with arbitrary syntax inputs and a `List<Dynamic>` expression output.
9
+ - Added exact Snapshot assertions for every required, optional, rest, capability, and expansion field.
10
+
11
+ ## Contract notes
12
+
13
+ - Thread steps in `->` remain unrestricted syntax because the macro deliberately accepts symbol, tag, method, function, and list forms.
14
+ - Calcit's canonical callable schema type is `'Fn`; `'DynFn` is not the public schema spelling.
15
+ - `%<-`, `\`, and `[,]` retain runtime empty-input diagnostics because their implementation uses rest-only parameters and the phase signature mirrors that actual binder shape.
16
+
17
+ ## Validation
18
+
19
+ - Reachable strict expansions: `2341/2432` -> `2364/2432`; legacy bypasses: `91` -> `68`.
20
+ - `cargo fmt --check`
21
+ - `cargo clippy -- -D warnings`
22
+ - `yarn compile`
23
+ - `cargo test` (one unrelated parallel feature-policy test flaked once; isolated and full reruns passed)
24
+ - `yarn check-all`
25
+ - `yarn check-agent-interface`
26
+ - Respo `be8141e`: 27 tests and JS check-only passed.
27
+ - Recollect `6c235d0`: 9 tests, JS generation, and Node runtime passed.
28
+ - js-ffi `25869b6`: default/node/browser checks and both runtime contracts passed.
@@ -0,0 +1,14 @@
1
+ # Binding and update macro contracts
2
+
3
+ ## Changes
4
+
5
+ - Migrated `let-destruct`, `let-sugar`, `let[]`, `let{}`, and `loop` to phase-aware binding and body contracts.
6
+ - Migrated `struct-with`, `swap!`, and `&doseq` with concrete struct/ref/callable inputs and struct/Unit outputs where proven.
7
+ - Added `assert-type pair 'List` inside `let-sugar` so strict macro-body analysis retains the list evidence already guaranteed by its runtime validation.
8
+ - Added exact Snapshot assertions for all contract fields.
9
+
10
+ ## Validation
11
+
12
+ - Reachable strict expansions: `2364/2432` -> `2379/2432`; legacy bypasses: `68` -> `53`.
13
+ - Full `cargo fmt`, Clippy, compile, Rust tests, `yarn check-all`, and Agent interface gates passed.
14
+ - Latest Respo `be8141e`, Recollect `6c235d0`, and js-ffi `25869b6` regressions passed.
@@ -0,0 +1,8 @@
1
+ # Type observability macro contracts
2
+
3
+ - Migrated logging, timing, hygiene, documentation, and debug function-wrapper macros to strict phase-aware signatures.
4
+ - Preserve expression result types for `w-log`, `wo-log`, `with-cpu-time`, and `noted` with a generic `T` contract.
5
+ - Require callable expressions for `call-w-log` and `call-wo-log`, structural symbol/list inputs for function-definition and gensym helpers, and definition-shaped function expansions for `defn-w-log`/`defn-wo-log`.
6
+ - Declare `:platform-read` only for macros that inspect the Calcit running mode while expanding. Runtime logging and `cpu-time` emitted into quoted code do not count as compile-time capabilities.
7
+ - Benchmarked the full macro-contract migration against `3a7afb5e`: both release check-only medians remained about 0.15 seconds across 12 warm runs. Strict/cache-eligible expansion coverage rose from 4 to 2379 before this batch; this batch moves another 8 pure expansions to cache eligibility and classifies 5 platform-dependent expansions honestly.
8
+ - Verified earlier, structured failures for invalid callable/list/ref macro arguments. No expansion cache exists yet, so this work provides visible diagnostics and cache prerequisites rather than a current runtime speedup.
@@ -0,0 +1,7 @@
1
+ # Remaining core match macro contracts
2
+
3
+ - Migrated `case-default`, `field-match`, and `calcit.internal/&field-match-internal` to strict phase-aware macro signatures.
4
+ - `case-default` now validates both value/default expression inputs and requires every pattern arm to be list-shaped syntax while keeping its branch-dependent output honest as `Expr<Dynamic>`.
5
+ - `field-match` and its recursive helper now require a map expression before expansion, so invalid values fail at the public macro boundary with `E_MACRO_INPUT_EXPR_TYPE` instead of reaching generated runtime assertions.
6
+ - Added snapshot assertions for required inputs, rest-arm syntax, pure capability sets, and expansion categories.
7
+ - The core suite now observes 2392 pure/cache-eligible expansions, 5 explicitly platform-dependent expansions, and only 35 legacy expansions, all of which belong to test helper macros.
@@ -0,0 +1,8 @@
1
+ # Compile-time macro log capability
2
+
3
+ - Added the opt-in `:log` macro capability for compile-time `echo`, `println`, and `eprintln` calls.
4
+ - Registered procedures remain forbidden host FFI by default; the three platform console aliases are the narrow exception and still require an explicit capability declaration.
5
+ - Documented that quoted runtime logging stays pure while logging actually executed during expansion is observable and therefore cache-ineligible.
6
+ - Added positive, missing-capability, and unrelated-host-procedure tests for the policy plus schema round-trip coverage for `:log`.
7
+ - Migrated the final test helper macros: `inside-eval:`/`inside-js:` declare `:platform-read`, `add-11` declares `:log`, and the hygienic no-log helper remains pure.
8
+ - Macro metrics now report zero legacy bypasses: 2393 pure/cache-eligible expansions and 39 explicitly capability-dependent expansions out of 2432 total. Cache hits remain zero until the planned cache implementation lands.
@@ -0,0 +1,6 @@
1
+ # Release 0.13.45
2
+
3
+ - Publish the completed phase-aware macro contract migration and compile-time capability policy improvements.
4
+ - Includes strict contracts across the observed core corpus, explicit `:platform-read` and `:log` effects, and zero legacy macro-signature bypasses in `calcit/test.cirru` metrics.
5
+ - Provides the stable compiler version required for Respo's six strict macro contracts, especially `defstyle` compile-time logging.
6
+ - Release validation is based on the merged PR gates plus latest Respo, Recollect, and js-ffi regressions run with the built compiler.
@@ -0,0 +1,9 @@
1
+ # Finish bundled core macro contracts
2
+
3
+ - Audited all 86 `defmacro` entries bundled in `calcit.core`, `calcit.internal`, and `calcit.test`, rather than relying only on macros reached by `calcit/test.cirru`.
4
+ - Migrated the remaining 21 legacy schemas, including aliases, Option/Result binding macros, anonymous enums, JS objects, logging helpers, deprecated compatibility macros, and open collection lookup helpers.
5
+ - Kept broad collection payloads explicitly `Dynamic` where list/string/enum/open-data behavior cannot yet be represented safely by one static contract; used concrete `String`, `Enum`, `JsObject`, `Option`, `Result`, `Nil`, and generic identity contracts where the semantics support them.
6
+ - Added a snapshot inventory test that rejects any bundled `defmacro` using a legacy whole-Dynamic schema and records the audited count.
7
+ - Added an exact `js-object` round-trip assertion for its `SyntaxList` input, `JsObject` expansion, and `:js-ffi` backend feature so schema indentation cannot silently drop the feature metadata.
8
+ - Confirmed the existing core corpus remains at 2,393 pure/cache-eligible expansions plus 39 declared-capability expansions, with zero legacy expansions. The migration itself does not implement caching, so it improves diagnostics and cache safety prerequisites without claiming a present speedup.
9
+ - Compared 12 alternating release `--check-only` runs on Respo against the installed 0.13.45 binary: both warm medians were 0.12s. The release binary grew from 9,586,224 to 9,586,256 bytes (+32 bytes), so this final schema pass shows neither a visible speed gain nor a material regression.
@@ -0,0 +1,7 @@
1
+ # Result-returning parsing methods
2
+
3
+ - Added `.parse-cirru`, `.parse-cirru-list`, `.parse-cirru-edn`, and `.parse-json` to the core String method bag. Their function-form compatibility entry points are `try-parse-*`.
4
+ - Recoverable parse failures now return nominal `Result` values instead of requiring user code to catch exceptions or interpret nil. CirruQuote/List successes retain their known outer shape; open EDN/JSON payloads deliberately remain Dynamic.
5
+ - Moved detailed Cirru parser diagnostics into `CalcitErr.msg` and removed unconditional stderr printing, so a caught failure retains line/column/nearby-input context.
6
+ - Added definition-attached native tests, native/JS examples, and EDN documentation. Full Calcit gates and latest Respo/Recollect native, JS, docs, and WASM regressions passed after refreshing locked modules and toolchains.
7
+ - A separate narrow typed Macro IR experiment reduced the measured Respo macro-evaluator phase by about 12% but did not produce a stable end-to-end check improvement; it was not landed and the evidence is recorded on issue #436.
@@ -0,0 +1,5 @@
1
+ # Cross-backend parser failure examples
2
+
3
+ - Added a malformed-input example to each Result-returning String parser method.
4
+ - Native and JavaScript example runners now exercise both `:ok` and caught `:err` paths for Cirru, Cirru-list, Cirru-EDN, and JSON parsing.
5
+ - The JavaScript Cirru-EDN parser still emits its existing parser-library diagnostic while returning the caught Result; this PR preserves compatibility and verifies the Result semantics without claiming that host parser output is fully silent.
@@ -0,0 +1,4 @@
1
+ # Document parser backend boundary
2
+
3
+ - Clarified that Result-returning parser methods are currently native/JavaScript APIs.
4
+ - Distinguished a green whole-project WASM regression from support for parser definitions: WASM deliberately skips the unsupported parser/`try` definitions while validating all supported exports.
@@ -0,0 +1,30 @@
1
+ # Typed decode Result syntax
2
+
3
+ ## Summary
4
+
5
+ - Added `try-parse-cirru-edn-as text TypeExpr` and `try-decode-map-as value TypeExpr`.
6
+ - Decoder graphs are still derived during preprocessing. Invalid or open target types remain compile-time errors.
7
+ - Runtime parse and recursive shape failures now become nominal `Result<T,String>` errors with their structural path intact.
8
+ - Known non-String text inputs are rejected during preprocessing; Dynamic boundaries retain runtime validation.
9
+ - Native and generated JavaScript implement the same Result contract. WASM keeps the existing explicit typed-decoder unsupported boundary.
10
+
11
+ ## Backend consistency
12
+
13
+ Generated JavaScript `try` handlers previously received a host `Error` object even though native Calcit and the public guide specify a String message. JS codegen now normalizes `Error.message` (or stringifies a non-Error throw) before invoking the handler. The new Result syntaxes use the same normalization, so their `:err` payload is a String on both supported backends.
14
+
15
+ ## Type and performance assessment
16
+
17
+ The visible benefit is semantic and static: successful expressions infer `Result<T,String>` with the complete target type, malformed input is explicit in control flow, invalid target schemas fail before runtime, and known invalid text arguments are rejected during preprocessing. This slice does not claim a speedup. Decoder work is unchanged and the safe success path additionally constructs one Result value; callers should choose it for recoverable external input rather than throughput.
18
+
19
+ ## Validation
20
+
21
+ - `cargo fmt`
22
+ - `cargo clippy -- -D warnings`
23
+ - `cargo test` (520 library, 246 CLI, 24 caps, 4 WASM tests)
24
+ - `yarn compile`
25
+ - `yarn check-all` (native, generated JS, IR, WASM, 228 core tests)
26
+ - `yarn check-agent-interface` (17/17)
27
+ - Native and generated-JS attached examples for success, failure, exact type, and String error payload
28
+ - `docs/data/edn.md` 24/24 and `docs/features/error-handling.md` 9/9 markdown blocks
29
+ - Latest Respo main: 27/27 tests and 111/111 documentation blocks
30
+ - Latest Recollect main: 9/9 native tests, generated JS, and required WASM checks
@@ -0,0 +1,17 @@
1
+ # Conservative pure macro expansion cache
2
+
3
+ - Added a watch-mode raw expansion cache for strict macros with no declared
4
+ compile-time capabilities. Once-mode builds bypass it to avoid cold-build
5
+ overhead.
6
+ - Keyed entries by stable macro call site, macro runtime identity, phase-aware
7
+ signature, and exact raw syntax including source locations. Macro/helper
8
+ reloads recreate the macro identity; signature and input changes have separate
9
+ invalidation reasons in `--macro-metrics`.
10
+ - Preserved hygiene by recording the per-definition gensym position and only
11
+ reusing generated-symbol expansions when the sequence still matches. Cache
12
+ hits advance the counter by the recorded delta.
13
+ - Cached only successfully validated raw expansions. Emitted code is still
14
+ preprocessed and type-checked on every hit, so this slice cannot reuse stale
15
+ type/import results and does not claim the higher post-preprocess speedup yet.
16
+ - Kept legacy and capability-bearing macros on the general evaluator with
17
+ explicit bypass reasons.
@@ -0,0 +1,20 @@
1
+ # Upgrade ternary-tree to 0.0.21
2
+
3
+ - Upgraded `im_ternary_tree` from 0.0.20 to 0.0.21. The upstream release
4
+ removes redundant cloning in owned vector construction and finger-tree
5
+ updates, and reports substantially faster full iteration and search
6
+ microbenchmarks.
7
+ - Compared optimized Calcit binaries built from the same source snapshot, with
8
+ only the ternary-tree version changed. Runs alternated old/new order on Apple
9
+ arm64 to reduce thermal and background-load drift.
10
+ - Over 30 paired process runs, `--check-only calcit/test.cirru` improved by
11
+ about 0.83% at the median and the native literal-path benchmark improved by
12
+ about 0.39%. Over 20 paired macro-metric runs, post-preprocessing improved by
13
+ about 1.22%, while macro evaluation remained effectively unchanged.
14
+ - Treat the small aggregate gains as evidence of no regression plus a modest
15
+ end-to-end benefit. Calcit parsing, type analysis, evaluation, and process
16
+ startup dominate these workloads, so the upstream collection microbenchmark
17
+ gains are not expected to transfer proportionally to whole-program timings.
18
+ - Revalidated Rust formatting, Clippy with warnings denied, the full Rust test
19
+ suite, self-hosted compilation, Agent CLI protocol checks, native/JS/IR/WASM
20
+ integration tests, and collection-path performance smoke tests.
@@ -0,0 +1,16 @@
1
+ # Preserve nested macro gensym positions on cache hits
2
+
3
+ - Fixed pure macro expansion caching so its replay delta contains only gensyms
4
+ emitted by the cached macro evaluator. The evaluator end position is captured
5
+ before recursively preprocessing the returned syntax tree.
6
+ - Excluded gensyms emitted by nested macros during post-processing from the
7
+ outer cache entry. Nested macros still run or replay their own gensym progress
8
+ when the cached outer syntax is preprocessed, preventing double advancement.
9
+ - Added a regression test that compares miss and hit paths for an outer macro
10
+ whose output invokes a gensym-producing inner macro, and verifies that the
11
+ following gensym position is identical.
12
+ - Kept the Calcit package at 0.13.45 in this functional PR. Package versions are
13
+ updated together in `Cargo.toml` and `package.json` by the separate release
14
+ commit after the feature PR merges.
15
+ - Validated formatting, Clippy with warnings denied, all 799 Rust tests, and the
16
+ full native/JS/IR/WASM integration suite through `yarn check-all`.
@@ -0,0 +1,11 @@
1
+ # Release 0.13.46
2
+
3
+ - Released the completed macro-contract, safe Result parsing/typed decode, and
4
+ pure macro expansion-cache work accumulated after 0.13.45.
5
+ - Included `im_ternary_tree` 0.0.21, which has a small measured end-to-end
6
+ improvement in Calcit check/preprocessing workloads without regressions.
7
+ - The macro cache remains a conservative watch-mode-only optimization for
8
+ strict macros with no compile-time capabilities. Its nested-macro gensym
9
+ replay is covered by a regression test.
10
+ - Kept Cargo and npm package versions in lockstep at 0.13.46 and refreshed the
11
+ workspace lockfile before tagging the main branch.
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@calcit/procs",
3
- "version": "0.13.44",
3
+ "version": "0.13.46",
4
4
  "main": "./lib/calcit.procs.mjs",
5
5
  "devDependencies": {
6
6
  "@types/node": "^25.7.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@calcit/procs",
3
- "version": "0.13.44",
3
+ "version": "0.13.46",
4
4
  "main": "./lib/calcit.procs.mjs",
5
5
  "devDependencies": {
6
6
  "@types/node": "^25.7.0",