Skip to content

ExploreTransformations admits every edge pair concurrently #58

Description

@Nievesjyl

Description

ExploreTransformations.resolve passes one _process_edge_pair coroutine for every pair in wheel.edge_pairs to asyncio.gather at once. When no individual edge_hash is supplied, _get_target_edge_pairs returns the complete wheel collection without an admission bound. Large wheels can therefore create pending tasks and concurrent downstream transformation work proportional to their total edge-pair count.

Observed Behavior

With 64 controlled awaitables at the extracted gather call, all 64 tasks were admitted before any was released. Peak active tasks and pending child tasks both reached 64. The reproduction contacted no model provider, database, or external service.

Affected Version

  • Package: dialectical-framework 1.5.5
  • Python: CPython 3.11.0rc1
  • File: src/dialectical_framework/agents/explorer/skills/explore_transformations.py
  • Method: ExploreTransformations.resolve
  • Confirmed call site: lines 153–156 in 1.5.5
  • Current repository source retains the complete-list gather (currently lines 182–188).

Reproduction

Run the PoC below from its material directory. The shared _site_harness extracts the exact gather expression from the 1.5.5 source and supplies 64 finite local awaitables held at a barrier so admission can be measured before completion.

PoC Source Code

#!/usr/bin/env python3
from pathlib import Path
import sys

POC_ROOT = Path(__file__).resolve().parents[1]
sys.path.insert(0, str(POC_ROOT))
from _site_harness import run

REPO_ROOT = next(
    parent
    for parent in Path(__file__).resolve().parents
    if (parent / "artifacts").is_dir()
)

if __name__ == "__main__":
    raise SystemExit(run(Path(__file__).with_name("inputs") / "sites.json", Path(__file__).with_name("result.json"), REPO_ROOT))

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions