Skip to content

[Bug][multi-agent-shared-context]: 'Deprecated modules rebuilt' comparison row counts the wrong thing and can go negative #486

Open
smaramwbc/statewave-multi-agent-shared-context
#4

Description

@jy7lsna

Affected Component

statewave-multi-agent-shared-context — main.py (compare())

Bug Description

The BEFORE vs AFTER table's "Deprecated modules rebuilt" row doesn't count deprecated modules:

# main.py, compare()
("Deprecated modules rebuilt",
 str(len(naive_result["coder"]["implementing"])),
 str(len(sw_result["coder"]["implementing"]) - sw_skipped if sw_skipped else "0")),
  • Naive side: len(implementing) is every module the coder built, not just the deprecated ones. Building 6 modules, 1 of them deprecated, reports "6".
  • Statewave side: implementing already excludes skipped modules (the coder parses IMPLEMENTING and SKIPPING as separate sections, agents/coder.py:80-81). Subtracting sw_skipped again is meaningless and can go negative (e.g. 2 implemented, 3 skipped → "-1"). When nothing was skipped it prints "0" even if a deprecated module was rebuilt.

pipeline_naive.py:64 already computes the right thing: the intersection of built modules with the planner's deprecated ones.

Expected Behavior

Both columns show how many deprecated modules the coder built.

Suggested fix

Have each pipeline return the deprecated-and-built count (the naive pipeline already computes built), e.g. result["deprecated_rebuilt"], and use that in both columns.

Steps to Reproduce

python main.py and compare the row against the coder's printed implementation list.

Environment

main @ eb66ddc.

Severity

Low — the headline comparison table reports a wrong number.

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions