Skip to content

PCART-1.4

Latest

Choose a tag to compare

@guanpingxiao guanpingxiao released this 24 Jul 03:54

PCART 1.4 improves cross-platform project execution, API-call identification, runtime artifact isolation, and dynamic matching reliability.

Highlights

More flexible project command execution

PCART now supports a broader range of Python project run commands across Windows and Linux, including:

  • Python scripts such as python run.py
  • Module execution such as python -m pytest
  • Commands such as pytest, flask, and other tools installed in the configured environment
  • Commands containing quoted paths and arguments

Python commands are routed through the configured currentEnv or targetEnv, while other supported commands are resolved from the corresponding environment.

Commands are now executed as argument lists without shell=True, improving cross-platform consistency and preventing unintended shell expansion.

Isolated run workspaces

Each PCART execution now uses an isolated workspace under:

PCARTRuns/runs/<project>__<timestamp>-<sequence>/<command-id>/

Runtime copies, dynamic files, PKL data, temporary files, internal reports, and metadata are kept within the workspace. User-facing reports are exported to:

Report/runs/<run-id>/<command-id>/

This prevents artifacts from different executions from overwriting or contaminating one another and makes individual runs easier to inspect.

Structured callsite identities

API callsites now use stable artifact IDs derived from:

  • Project-relative source path
  • AST source span
  • Normalized call expression
  • SHA-256 identity hash

PKL files, manifests, dynamic-match snapshots, caches, repair validation, and reports now share the same callsite identity. This prevents collisions between identical calls and same-named files in different directories.

Optional experimental PCResolve integration

PCART can optionally use PCResolve for cross-file API-call identification:

pip install "pcresolve>=1.0.4"

When installed, PCResolve improves:

  • Import-alias resolution
  • Assignment-chain tracing
  • Chained-call identification
  • Lexical-scope analysis
  • Decorator-based library attribution

PCResolve analysis is cached per project and reused during preprocessing and compatibility analysis. When PCResolve is not installed, or when its analysis fails, PCART automatically falls back to the existing single-file extractor.

PCResolve remains experimental and is not included in PCART's base requirements.

Added

  • Added optional experimental PCResolve integration for cross-file API-call identification. (a8396c9)
  • Added isolated per-run workspaces and metadata snapshots. (3c14213)
  • Added structured callsite records and readable artifact filenames. (fccf48c)
  • Added current- and target-version dynamic-match snapshots. (d21988f)
  • Added object and expression candidates for dynamically resolved receiver aliases. (d21988f, a6c80c1)
  • Added a reusable runtime value recorder for pytest-style and console-command entry points. (785dc98, 0acc6ab)
  • Added Windows Conda configurations for 13 example projects. (ec3f303)

Changed

  • Routed Python execution through the configured current or target environment. (785dc98)
  • Resolved supported project commands from the corresponding virtual environment. (785dc98)
  • Parsed project commands and quoted arguments consistently with shlex. (c4fb470)
  • Executed subprocesses without shell=True. (636643e)
  • Stripped leading and trailing whitespace from all string configuration fields. (c4fb470)
  • Routed runtime artifacts through explicit workspace paths. (e31c346)
  • Added source-location and call-expression comments to generated instrumentation. (95bd5b8)
  • Consolidated runtime PKL persistence and used temporary-file replacement for safer writes. (0acc6ab, fa88688)
  • Enabled PCResolve lexical-scope analysis and decorator-based library attribution. (b673ab8)
  • Made experimental PCResolve integration opt-in by removing it from the base requirements. (83cc750)
  • Clarified the AGPL v3 license information in README. (1aebe2c)

Fixed

  • Fixed unintended dollar-sign expansion during dynamic matching. (88b17d8)
  • Fixed coverage collisions between same-named files in different directories. (f662fe3)
  • Fixed API instrumentation and receiver restoration inside with statements. (d21988f)
  • Fixed instrumentation placement for calls used in decorator expressions. (bfbe815)
  • Fixed target-version PKL regeneration after candidate persistence failures. (dd762fe)
  • Fixed missing expression candidates for resolved receiver aliases. (a6c80c1)
  • Fixed AST fallback behavior in the main repair flow. (f53bcaf)
  • Fixed duplicate Python prefixes in reports. (cc6e39e)
  • Fixed duplicate Invoked API lines in reports. (4712567)
  • Fixed report lookup for structured callsite artifact keys. (5c3d679)
  • Fixed incomplete PCResolve instrumentation coverage. (fb38d12)
  • Fixed PCResolve path normalization and overly broad library matching. (2b2b4ea)
  • Fixed library API path-shortening cache behavior across Windows and Linux. (49dcca0)
  • Fixed TensorFlow source resolution for installations exposing APIs through tensorflow_core. (192b2b9)
  • Regenerated TensorFlow API extraction data for versions 1.15.0–1.15.5, 2.0.0–2.0.4, and 2.1.0–2.1.4. (13630fc)

Upgrade notes

  • Reports are now written below Report/runs/ instead of directly under Report/. (3c14213)
  • Legacy callsite artifact names and lookup fallbacks were removed; runtime artifacts from v1.3 should not be reused. (fccf48c)
  • runCommand is no longer interpreted by a shell. Shell expansion, pipes, redirection, and compound shell commands should not be relied upon. (636643e)
  • PCResolve is not installed by default. Install pcresolve>=1.0.4 separately to enable the experimental integration. (83cc750)
  • The configuration schema remains unchanged.

Full changelog: v1.3...v1.4