PyCForge 1.3.12 — Conversion Quality Audit
Reference release: 1.3.11
Validation environment: Linux x86-64, CPython 3.12.14, GCC 13.3, offscreen Qt

Purpose and result

This audit examined both supported conversion modes from source admission to
generated-C execution. It combined the complete existing test collection with
new comparisons against CPython, failure-path checks, memory instrumentation,
documented examples, and tests of the installed wheel.

Four groups of conversion defects were corrected. Six targeted regression
methods reproduced the defects against the unchanged 1.3.11 package. The same
regressions pass in 1.3.12. The results establish the behavior of the tested
cases; they are not a claim that every possible input is defect-free.

Verified corrections

1. Set methods and shared iterators

   Intersection, subset, and superset operations previously consumed iterator
   arguments eagerly. A later use of the same iterator could therefore produce
   different output from CPython. These operations now consume incrementally
   and stop at the corresponding point in the reference implementation.

   In-place difference now removes elements as it reads them. A set's own live
   iterator consequently reports mutation after the first removal instead of
   silently completing. Nonmutating frozenset difference uses an independent
   working set and preserves the original immutable value.

2. Numeric values selected by set intersections

   Equal numeric keys are not always the same value representation: an integer,
   boolean, and float can compare equal while printing differently. Intersection
   now retains the representative selected by the reference operation. In-place
   operations preserve aliases while adopting the selected representatives.

3. Typed scalar operations combined with other supported features

   Scalar elaboration skipped keyword argument values, chained comparison
   operands, fixed-container elements, and file-context expressions or bodies.
   String types established in branches were also lost after the branch.
   Supported combinations were incorrectly rejected as a result.

   The elaborator now visits these expression contexts and carries consistent
   branch types forward. Independent type and definite-assignment checks remain
   active. New negative cases confirm that uninitialized or conflicting locals
   still reject conversion without publishing C.

4. Scope analysis across multiple Typed functions

   Scope facts from multiple functions were published in source-function order,
   while their validator required global binding order. Valid programs could
   fail with InternalFailure PYC9501. Facts are now sorted by binding identity
   before publication. Repeated conversion produces identical C and fingerprints.

Coverage and checks

Full regression collection:
  1,813 tests and 4,379 subtests passed; 64 tests were skipped.
  No failures or test errors occurred.
  Every one of the 188 test modules was included. Completed groups have separate
  logs and JUnit records. Application hashes were verified before and after the
  run. An earlier interrupted run is not included in these totals.

New audit tests:
  21 test methods, with 28 pytest subtests, passed. Generated C was compiled and
  run against independently executed Python fixtures. The installed wheel also
  passed all 21 methods, including allocation-failure cleanup.

The combined existing and new tests cover:
  - Typed scalar representations, arithmetic, comparisons, control flow,
    definite assignment, call binding, modules, containers, records, files,
    generated interfaces, deterministic facts, and rejection diagnostics.
  - Runtime integer/float/boolean interactions, signed 64-bit boundaries,
    division and remainder, numeric parsing, Unicode strings and formatting.
  - List slicing, slice mutation, aliases, dictionaries and views, numeric keys,
    sets and frozensets, live iterators, and iterator exhaustion.
  - Evaluation order, short-circuiting, comprehensions, nested functions,
    closure cells, nonlocal state, defaults, decorators, expanded calls,
    positional-only and keyword-only arguments, and recursion.
  - Classes, single-inheritance chains, super calls, inherited fields,
    overridden methods, saved bound methods, and supplied-module imports.
  - Connected UTF-8 file workflows that combine decorated module functions,
    inheritance, parsing, container transformations, and byte-for-byte output
    comparison. Runtime errors are checked for prior observable effects and
    termination before later statements.
  - Resource budgets, cancellation, malformed input, process lifecycle,
    compiler profiles, editor completion, and startup regressions through the
    existing test collection.

Additional deterministic probes use 400 seeded signed-64-bit operand pairs,
240 seeded container mutations, and a slicing matrix covering extreme signed
bounds. A 66-case admission probe across both backends found no internal
conversion failures and confirmed that rejected inputs did not publish C.

Memory and failure handling:
  The new audit suite passed AddressSanitizer and UndefinedBehaviorSanitizer
  with halt-on-error enabled. The connected allocation harness then forced
  failure at each of 500 allocation points. Every failure was checked, and
  context destruction released all tracked allocations and resource lists.
  LeakSanitizer could not inspect process metadata in this execution host and
  was disabled for the successful sanitizer run. Allocation tracking is separate
  evidence; it is not presented as a LeakSanitizer result.

Documentation:
  All 21 Help pages opened successfully. Validation passed for 55 Python
  examples (33 Runtime and 22 Typed), five API examples, three C callers,
  two multi-module examples, and three README examples.
  README.md is byte-for-byte unchanged. The only Help prose change explains
  set-method iterator consumption and partial in-place difference effects.
  No development-status sections or additional examples were added to Help.

Offline corpus:
  37 cases: 29 matched the Python reference and eight were expected unsupported
  cases. No unexpected outcomes or network attempts occurred. The run records
  source hashes and enforces its offline policy. No model training was performed.

Installed application and packages:
  The wheel was installed into a separate directory, and its actual import path
  and version were checked. BuildService produced a working executable with the
  GCC profile. All five compiler profiles remain present.
  Six normal-startup scenarios passed without showing the recovery dialog.
  Corrupt-settings recovery displayed the read-only white report, copied its
  text correctly, and preserved the original damaged file. Safe startup avoided
  reading the saved settings.
  Wheel RECORD hashes, application payloads, Help resources, launch entry point,
  original dependencies, and all 495 icon assets were checked. The ZIP includes
  the wheel and source archive in dist/. It excludes generated build copies,
  caches, and validation screenshots; pycforge/build remains an application module.

Test maintenance and exclusions

The first broad diagnostic run reported 34 failed tests, 1,763 passed tests,
64 skips, and 4,346 successful subtests. That run was not a frozen-source release
gate. Its failures exposed stale active-version expectations, outdated package
file counts, an old diagnostic-text expectation, Qt test owners missing the
current settings interface, and assertions for superseded README headings.
Those test fixtures now reflect the existing product. Historical converter
contracts and immutable predecessor hashes were retained. A historical module
size gate still reports its existing over-budget editor module; its test checks
that explicit diagnostic instead of claiming the historical gate passes.
One tree-hash check also observed a growing test log; final logs were written
outside the tested tree.

The skipped tests were:
  - 18: Sealed predecessor artifacts are unavailable.
  - 12: Clang is unavailable.
  - 33: PCFC11 is unavailable.
  - 1: Negative missing-PySide6 scenario is inapplicable.

Native execution in this audit used GCC on Linux and CPython 3.12.14 as the
semantic reference. Native Windows, macOS, MSVC, clang-cl, Clang, and PCFC11
execution were not performed. Compiler-profile construction and diagnostics
tests do not substitute for those platform checks. Other Python versions were
not used as reference interpreters during this audit.

The documented bounded conversion profiles still apply. Arbitrary-precision
integers, general exception handling, generators, async functions, dynamic
imports, and multiple inheritance have not been added. Unsupported constructs
remain explicit rejections. Set iteration order remains unspecified. Runtime
allocations retain their documented context lifetime.

Reproduction and evidence

Run the complete suite from the source directory with:
  QT_QPA_PLATFORM=offscreen python -m pytest -q --disable-warnings

Run the focused audit with:
  python -m pytest -q tests/test_conversion_audit_1_3_12.py
  python -m pytest -q -s tests/test_conversion_memory_audit_1_3_12.py

Sanitizer checks additionally set PYCF_TEST_CFLAGS to:
  -O1 -fsanitize=address,undefined -fno-omit-frame-pointer -fno-pie -no-pie
with ASAN_OPTIONS=detect_leaks=0:halt_on_error=1 and
UBSAN_OPTIONS=halt_on_error=1:print_stacktrace=1 for this execution host.

Detailed records are in evidence/conversion_audit_1_3_12/, including the full
grouped regression results, pristine-release reproductions, sanitizer results,
installed-wheel checks, documentation checks, test inventory, and source hashes.
The offline corpus record is
training_corpus/runs/runtime-1.3.12-conversion-audit.json.

The distributable files are verified by distribution-verification.json and
SHA256SUMS.txt. This work prepares the packages; it does not publish them to PyPI.
