PyCForge 1.3.32 — Deep conversion audit and corrections

Outcome
The audit reproduced five observable Runtime conversion errors, corrected their
iterator-state and dictionary-input handling, and added executable regressions.
It also corrected two UI defect areas: queued callbacks retaining destroyed
window owners, and standard window controls extending past a narrow menu bar.

The final test inventory contains 2,411 tests in 213 modules. A complete
candidate run followed by targeted correction reruns accounts for 2,339 passed,
72 skipped, zero unresolved failures, and zero unaccounted tests. This is not
a claim that one untouched full-suite run was entirely green, nor that every
possible Python input has been tested. The inventory includes conversion,
validation, packaging, editor, scanner, and UI tests; it is not 2,411 distinct
conversion programs. The original 1.3.31 inventory was 2,401 tests/211 modules.

Confirmed conversion findings

F01 — Recoverable mapping iterator errors became ordinary exhaustion.
After dictionary/set mutation invalidated an iterator, catching RuntimeError
and calling next again could silently produce the default/StopIteration.
This also affected wrappers such as enumerate, zip, and reversed. Recoverable
errors no longer latch exhaustion. Ordinary exhausted list, tuple, range,
string, dictionary, and set iterators retain their exhaustion state instead
of reviving when their underlying container later changes.

F02 — Strict zip stopped checking inputs after its first length mismatch.
Repeated next calls must retry the underlying iterators and may raise more
ValueErrors while consuming unmatched input. The old wrapper cached an end
state after the first mismatch and returned the default on subsequent calls.
The new regression checks both shorter-left and shorter-right cases, initially
empty input, repeated errors, and the elements left in each input iterator.

F03 — Non-strict zip failed to repeat left-to-right partial consumption.
With left=iter(range(5)) and pairs=zip(left, []), two calls to next(pairs, None)
leave [2, 3, 4] in left. The old result was [1, 2, 3, 4], because zip stopped
retrying after the first empty result. Input iterators now own their end state;
zip retries in order, preserving consumption even when no tuple is produced.

F04 — enumerate/zip over files could not resume after EOF and rewind.
After reaching EOF, seeking the same open file back to zero should allow the
same wrapper to obtain more values. The old wrapper permanently latched EOF.
The fix preserves file retry behavior without reviving exhausted ordinary
sequence/mapping iterators. Native/Python witnesses compare outputs across
EOF, seek(0), and subsequent next calls for enumerate and zip.

F05 — Invalid dictionary pairs consumed too little of their inner iterable.
dict(...) and dict.update(...) previously reused fixed-target assignment's
N+1-item unpack rule. Dictionary pair validation must consume the complete
inner iterable before checking that it contains exactly two items. The fix
materializes the bounded inner iterable and then checks its length. Earlier
successful dictionary updates remain observable if a later pair fails.
Tests cover zero/one/two/many items, iterator leftovers, file consumption,
noniterable pairs, and retained earlier updates. Fixed-target assignment
continues to use its separate, correct N+1 consumption rule.

Implementation and compatibility
- Runtime changes are confined to runtime.h, dict_ops.h, and everyday_ops.h.
  PI now stores ordinary input exhaustion explicitly; wrappers preserve error
  retry and file behavior. The collector already traces inputs using sizeof(PI).
- A C-caller regression retains errored/exhausted iterators and strict zip
  through repeated pv_collect calls, then verifies their subsequent behavior.
- Internal PI layout changed. Regenerate generated C and rebuild integration
  callers together. No new Python syntax profile or general-library support
  is claimed, and the Typed converter implementation is unchanged.
- The new dictionary materialization obeys existing work/memory limits.
  Resource exhaustion remains terminal under the existing Runtime contract.

Scan, diagnostics, and window findings

U01 — Deferred callbacks retained destroyed Python MainWindow owners.
Reproduced in Tools hover-reset callbacks, conversion-diagnostic navigation,
and scan-result navigation when the native window was destroyed before queued
delivery. Owned single-shot timers connected to bound methods now release the
callbacks with their UI owner. Pending navigation is cleared on delivery;
scan shutdown also stops its timer and drops the pending operation.

The same document/source/revision checks still guard navigation after tab
projection. Tests retain real conversion and scan workflows, correct source
highlighting, edit invalidation, edit-then-undo invalidation, rescan behavior,
and closing a window before queued navigation. Old line numbers are not made
usable merely because text later looks identical. The existing themed split
Tools button and separate conversion-diagnostics button remain in place.

U02 — Window controls extended outside the menu bar at 720 pixels.
The reproduced right edge was 753 against a menu-bar right edge of 719.
The title strip now hides its decorative brand and margin when space is
insufficient, prioritizing standard window controls, then restores them when
space returns. The regression resizes 720 -> 1000 -> 720 pixels. Settled Qt
renders confirm right edges 719, 999, and 719 respectively, with the brand
hidden/shown/hidden. Menu actions and controls remain disjoint in these checks.

Verification record

1. Reproduction before correction
   Four initial new Runtime witnesses failed on the old behavior; two further
   witnesses reproduced non-strict zip consumption and dictionary/file input
   consumption. Both new close-before-navigation UI cases failed before the
   timer corrections. Existing tests independently reproduced owner retention
   and narrow-window overflow. Raw failure logs are retained as evidence.

2. Complete candidate run and correction reruns
   The four subprocess shards covered every module in the then-current
   2,409-test inventory. All Qt modules ran in one shard. Initial results:
   shard 0: 730 passed, 9 failed, 5 skipped; 678.82 seconds.
   shard 1: 496 passed, 4 failed, 34 skipped; 600.74 seconds.
   shard 2: 540 passed, 2 failed, 29 skipped; 781.11 seconds.
   shard 3: 555 passed, 1 failed, 4 skipped; 827.83 seconds.
   Total: 2,321 passed, 16 failed, 72 skipped. Separately reported dynamic
   unittest subcases: 4,682 passed. These are not added to the test inventory.

   The 16 failures comprised two UI defect areas and 14 outdated active-release
   assertions. The Runtime corrections passed this full run. Active version,
   module/resource counts, QAction ownership, and README-length assertions
   were reconciled with the current application. Sealed historical identities,
   hashes, rejection expectations, and tamper checks remain intact.
   In particular, the README limit now reflects its existing reviewed 202 lines;
   README content was not changed to satisfy the test.

   Correction evidence: 163 passed/1 failed/3 skipped in the maintenance run;
   its last outdated QAction-owner expectation then passed in the final
   two-test rerun (also testing the three resize transitions). The exact README
   assertion passed again after its final cap was set. The two new navigation
   lifetime cases expanded the final inventory from 2,409 to 2,411.

   audit-test-ledger.json maps every final collected node to its passing or
   skipped evidence. Final unique totals: 2,339 passed, 72 skipped, zero missing.
   Targeted repeats and installed/sanitizer repeats are not counted as new tests.

3. Runtime and sanitizer checks
   All 8 new Runtime interaction tests passed (35.20 seconds).
   All 19 selected Runtime interaction/collection tests passed under GCC ASan
   and UBSan (206.03 seconds). Flags: -O1 -fsanitize=address,undefined
   -fno-omit-frame-pointer -fno-pie -no-pie. Both halt on errors.
   ASAN_OPTIONS=detect_leaks=0:halt_on_error=1; UBSAN_OPTIONS=halt_on_error=1.
   LeakSanitizer was disabled; this is not a leak-sanitizer acceptance claim.
   No sanitizer failures were observed in these runs. Sanitizers did not cover
   every test in the full inventory.

4. Quick-access and installed-wheel checks
   All 44 focused scan, diagnostic, Tools, and owner-lifetime tests passed
   (57.12 seconds). The separately extended window-controls test passed its
   narrow/wide/narrow transitions. All 14 focused installed-wheel checks passed
   (47.96 seconds), including the 8 new Runtime and 2 new lifetime tests plus
   actual diagnostic navigation and scan/diagnostic stale-result checks.
   All 858 packaged application files match source, wheel, and installation.

5. Documentation
   HTML Help: 26 pages in 5 categories; 65 executable Python examples with
   43 Runtime and 22 Typed native comparisons; 5 API examples; 4 C callers;
   2 module bundles; and 3 unchanged README examples. All passed. Every Help
   page opened in Qt; catalog search, anchors, and code-font checks passed.
   New iterator-retry and dictionary-pair examples were rendered and inspected
   in the existing Help theme. Their exact output is explained beside the code.

6. Distribution
   The pure-Python wheel passes public-distribution verification: 868 members,
   55 icons/495 icon assets, GPL-3.0-only, no packaged Ting compiler or Ting rule
   specification sources. Source distribution retains tests and review evidence.
   Final source/archive payload verification passes after packaging.
   Dependencies remain PySide6, NumPy, Numba, Jedi, and autopep8.

Skipped coverage and platform limits
The 72 skips consist of 33 PCFC11 checks requiring a supplied compiler path,
20 clang checks because clang was unavailable, 18 checks requiring absent
optional sealed historical archives/wheels, and one PySide6-unavailable branch
because PySide6 was installed. Individual skip reasons are retained.

Verified host: Python 3.12.14, Linux x86_64/glibc 2.39, GCC 13.3.0, Qt offscreen.
Native Windows/MSVC, clang-cl, PCFC11, macOS, and every supported Python version
were not exercised. Offscreen UI tests do not replace native desktop acceptance.
Structural/provenance validation does not prove arbitrary semantic equivalence.
No coverage percentage or exhaustive-input claim is made. No PyPI publication.

Suspicions investigated and remaining observations
- Module builtin shadowing and invalid nonlocal scopes already fail the
  existing module/symbol validation; these were not accepted conversion bugs.
- sort(reverse=...) truthiness matched the host Python witness; the suspected
  argument-validation defect was not reproduced.
- Fixed-target unpack consumption is intentionally different from dictionary
  pair validation and remains covered by a separate regression.
- Typed int64 intermediate overflow remains a documented caller precondition;
  this release does not add arbitrary-precision arithmetic to Typed C.
- An automatic-assistance timing failure in the original-tree comparison did
  not reproduce in its isolated rerun or the complete candidate run. No specific
  cause or timing fix is claimed; it remains an intermittent observation.
- At 720 pixels, an exceptionally long module identity can still crowd the
  editor header. This is a cosmetic follow-up, separate from the corrected
  menu-bar controls and conversion/diagnostic correctness.
- A supplementary serial full run against the unmodified original 1.3.31
  tree was still in progress when this report was prepared. It is not used
  for the final coverage total; the complete candidate shards and correction
  reruns are the release evidence. A partial original-run log is labelled as
  such if included. Original-tree focused reproduction results are complete.

Size and preserved content
For the identical minimal Runtime source "def main():\n    return 0\n", C source
grew from 408,341 to 408,855 bytes: +514 bytes, approximately +0.126%.
This specimen measures generated source bytes, not executable size, speed,
memory usage, or a universal percentage for all converted programs.

README.md is byte-identical to 1.3.31. SHA-256:
81408b884ec93411cd88f9734cc8cffc79bcd65751bcdfe092ea33e41addb638
The existing save workflow remains in place. Four UI Python files changed for
the callback-lifetime and menu-bar-width fixes; the two Help pages were updated.

Artifacts and reproducibility
pycforge-1.3.32-py3-none-any.whl
Wheel SHA-256: 792ee391a0c2eaa2321ff59f60eb082b891ebe5ac9a3fb24be0e04bbda5bf052
pycforge-1.3.32.tar.gz
PyCForge-1.3.32-Verification.txt
Evidence directory: evidence/conversion_deep_audit_1_3_32/
New tests: tests/test_conversion_deep_audit_1_3_32.py and
tests/test_deep_audit_ui_1_3_32.py.

From the extracted source with development dependencies and GCC available:
  QT_QPA_PLATFORM=offscreen python3 -m pytest -q tests
  QT_QPA_PLATFORM=offscreen python3 tools/verify_conversion_documentation.py
The retained shard runner and shard manifest explain the measured full run;
its workspace paths must be adjusted when reproducing elsewhere. Raw XML,
logs, exact final inventory/ledger, source diff/hashes, documentation results,
and installed-wheel verification accompany this report.

Next conversion upgrades remain separate work: C-module header/source exports,
binary/update file profiles, Typed record boundaries, and automatic collection
with explicit live temporary roots. No embedded comment scripting language is
introduced in this audit release.
