PyCForge 1.3.6 — functions, closures, and starred unpacking
15 October 2026

Runtime conversion now supports nested def functions, recursive and mutually
recursive closures, nonlocal writes and deletion, variadic *args and **kwargs
parameters, expanded calls, starred list/tuple/set displays, and starred assignment,
loop and comprehension targets. Each nested definition creates a new callable and
its own definition-time defaults. Captured cells remain shared and survive their
creating function for the lifetime of the runtime context.

The binder handles positional-only and keyword-only parameters together with
variadic arguments, preserves ordered extra keyword values, and checks duplicate
or missing arguments. Variadic annotations check each collected value. Captured
annotated bindings retain their checks on nonlocal writes. Scope declarations are
validated with Python's symbol-table analysis; source is not executed. The existing
duplicate-parameter diagnostic wording is retained.

Call expansion preserves evaluation and mutation order, including the live sole
*iterable case and the evaluation of explicit keyword groups before duplicate-key
errors. ** expansion admits dictionaries with string keys without embedded NULs.
It does not implement arbitrary custom mapping protocols. Declared parameters and
supplied values after expansion are each bounded at 64. Existing memory, work,
local-binding, capture and call-depth limits remain active. Expanded argument
storage belongs to the context rather than large generated C stack arrays.

Verification

- The initial 13 new test groups passed. The final 14 groups passed under GCC
  AddressSanitizer and UndefinedBehaviorSanitizer. They exercise closure lifetime,
  aliasing, defaults, recursion, annotations, binding, error-side-effect order,
  argument and resource limits, and nested starred targets. The additional external
  C caller supplies 27 combinations of runtime inputs and checks captured cells
  and variadic binding. LeakSanitizer is disabled because this environment cannot
  inspect processes; no leak-inspection pass is claimed.
- A focused regression run across Runtime values, dictionaries, modules, files,
  arena cleanup, everyday operations, numeric/container additions and conversion
  correctness recorded 117 passing tests and 208 passing subtests. It identified
  four subtest failures from changed duplicate-parameter wording and one obsolete
  test expecting variadic main to be rejected. The wording was restored and only
  the promoted rejection case was removed. A final targeted run passed nine tests
  and 25 subtests, covering both corrections and all seven updated converter-file
  inventory checks. The initial and corrected outcomes are retained separately.
- All 21 Help pages opened in offscreen Qt. All 55 Python examples (33 Runtime,
  22 Typed), five API examples, three C callers, two module examples and three
  README examples passed. Help links/navigation/search passed, including searches
  for nonlocal, expanded calls and starred targets. The closure section was visually
  inspected. The keyword inventory remains within the existing catalog limit.
- The 21-case offline corpus compares the original 1.3.5 tree with the delivered
  1.3.6 application snapshot. Supported fixture matches increase from 9 to 16;
  five cases remain explicit rejections. Both compared runs have zero unexpected
  outcomes and zero observed network attempts. Linux seccomp enforcement includes
  an actual blocked-socket probe. Snapshot hashes, generated C hashes, toolchain
  flags, stdout/stderr and file effects remain recorded. Intermediate passing
  snapshots precede final Help catalog edits; the comparison selects the final
  verified snapshot, whose application hashes match this release.
- The installed wheel checks both conversion modes, an actual Python/native C
  comparison using nested variadic closures and starred unpacking, all 21 Help
  pages, package version, wheel RECORD hashes, source-file equality, icons and
  dependency declarations. Distribution details are recorded alongside this report.

The full historical test suite was not rerun for this release. The preceding
1.3.5 report records 20 pre-existing historical metadata/README/module-budget
failure records; this conversion upgrade does not claim to resolve those checks.
Verification was performed on Linux x86-64 with Python 3.12.14 and GCC. Native
Windows/PCFC11 execution was not performed. No PyPI publication was made.

Documentation and packaging

The approved README is byte-for-byte unchanged, including its 1.3.4 heading while
the conversion upgrades continue. SHA256:
28dec8e51de9f5a3e05ea06ec9528abadcc61f7914e2675a01066ca57ad6fc7f
The application and distribution metadata report 1.3.6. HTML Help retains its
existing 21-page structure and 55-example count, with concise coverage updates.
No development-cycle status sections or additional example collections were added
to the user documentation.

All existing application files, icons, README images, licenses and functionality
are retained. One runtime header, call_ops.h, is added. The reduced packaging from
1.3.5 remains: the 91 historical generated documentation screenshots stay excluded,
no new verification screenshots are bundled, and build caches and older embedded
distributions are excluded. The current wheel and source archive are in dist/.
Runtime dependencies remain PySide6, numpy, numba, jedi and autopep8 with no new pins.

The source-only corpus includes the new function cases and versioned expectations.
Historical case IDs remain stable when their outcomes improve. It is excluded from
the wheel. No model training, training dataset, reusable construction agents or
independent agent-review evidence is claimed.

Exception recovery, generators, async/await, inheritance and descriptors, nested
classes, decorators, mutable module globals, binary files and general third-party
API conversion remain outside this upgrade. The C-to-Assembly dialog is deferred.
Runtime C-IR proof validation and exact ForgeLens mappings remain unavailable.

Raw checks and installed/distribution records are in evidence/functions_1_3_6.
The corpus comparison is training_corpus/comparisons/1.3.5-to-1.3.6.json.
