Skip to content

Delete the orphaned helper_nodes package, keeping its two corrections - #298

Merged
piyushmakhija28 merged 1 commit into
mainfrom
chore/remove-helper-nodes
Aug 7, 2026
Merged

piyushmakhija28 merged 1 commit into
mainfrom
chore/remove-helper-nodes

Conversation

@piyushmakhija28

Copy link
Copy Markdown
Collaborator

Closes item 3 of #296. Five modules, 538 lines, no importers. CLAUDE.md has described the package as "scheduled for removal in a follow-up cleanup" since the subpackage migration.

"No importers" was not the whole story, and checking changed what this PR does

All nine of the package's public node functions are also defined in orchestrator.py — the module create_flow_graph actually wires. So this was an extraction begun and never finished, not a component whose callers went away. Both copies were last touched by the same commit (06b0463, the Level/Step rename), which had been maintaining them in lockstep.

Comparing them function by function: five character-identical, four divergent. Most of the divergence is what a deeper package needs — parent.parent.parent instead of parent.parent, renamed module constants, different log tags. But two are documentation corrections that exist only in the orphaned copy, with the stale text in the live one:

orphan (correct) orchestrator.py (stale)
save_workflow_memory comment ~/.claude/memory/logs/sessions/ ~/.claude/memory/sessions/ — contradicted the line directly beneath it, which writes "memory" / "logs" / "sessions"
optimize_context_after_level1 "Level 2" "Level 3" ×3 — a level that stopped existing in 06b0463

Both are ported into orchestrator.py before the deletion, not alongside it. Deleting first and noticing afterwards is how a fix disappears with nothing recording that it existed.

The new enforcement test earned its place immediately

The Quick Info counts move 253 → 248 and 493 → 488. I did not spot that by hand — tests/test_doc_counts_match_the_tree.py, merged one commit earlier in #297, went red on the deletion and named both figures:

documentation counts disagree with the tree:
{'CLAUDE.md Quick Info: Total Python Files': {'says': (253, 493), 'actual': (248, 488)}}

First real change after that test landed, and it caught it.

Verified

orchestrator imports and create_flow_graph(hook_mode=True) builds a graph; all nine functions remain callable on it. Every test that touches the orchestrator passes (10 files). All six CI gates pass. Test collection is clean. No .py file anywhere still names helper_nodes.

Not verified locally: ruff is not on PATH in this shell, so the lint gate was left to pre-commit and CI. The changes are three comment lines plus deletions, so the exposure is small — but I did not run it myself and would rather say so.

Left alone deliberately

CHANGELOG.md's historical entry, docs/architecture/impact_map-l3-collapse-draft.md and docs/orchestration_prompt.md still name the package. The first two are point-in-time records; the third explicitly sequenced this removal as separate work, which is what happened. Rewriting them would falsify the history rather than correct it.

🤖 Generated with Claude Code

…ections

langgraph_engine/helper_nodes/ held five modules and 538 lines that nothing
imported. CLAUDE.md has described it as "scheduled for removal in a follow-up
cleanup" since the subpackage migration; this is that cleanup. Closes item 3 of
issue #296.

"No importers" was not the whole justification, and checking further changed
what this commit does. All nine of the package's public node functions are also
defined in orchestrator.py -- the module create_flow_graph actually wires -- so
this was an extraction that was begun and never finished, not a component that
lost its callers. Both copies were last touched by the same commit (06b0463,
the Level/Step rename), which had been maintaining them in lockstep.

Comparing the two copies function by function found five character-identical and
four divergent. The divergences are mostly the adaptations a deeper package
needs -- parent.parent.parent instead of parent.parent, renamed module constants,
different log tags -- but two of them are documentation corrections that exist
ONLY in the orphaned copy, with the stale text in the live one:

  save_workflow_memory's comment named ~/.claude/memory/sessions/ while the code
  beneath it writes to memory/logs/sessions/. The comment contradicted the line
  it described.

  optimize_context_after_level1 said "Level 3" in a docstring line, a summary
  line and an inline comment. Level 3 stopped existing in 06b0463, which renamed
  it to Level 2. The orphan's docstring was updated by that rename; the live
  one's was not.

Both are ported into orchestrator.py here, before the deletion rather than
alongside it, so nothing is discarded that the live module lacked. Deleting the
package first and noticing afterwards is how a fix disappears without anyone
recording that it ever existed.

The Quick Info counts move 253 -> 248 and 493 -> 488. That was not spotted by
hand: tests/test_doc_counts_match_the_tree.py, merged one commit ago in #297,
failed on the deletion and named both figures. It is the first thing that
enforcement caught, and it caught it immediately.

Verified: orchestrator imports and create_flow_graph(hook_mode=True) builds a
graph, every test that touches the orchestrator passes, all six CI gates pass,
test collection is clean, and no .py file anywhere still names helper_nodes.

CHANGELOG.md, docs/orchestration_prompt.md and docs/architecture/ still refer to
the package. The CHANGELOG entry and the architecture draft are point-in-time
records; orchestration_prompt.md explicitly sequenced this removal as separate
work, which is exactly what happened. Rewriting any of them would falsify the
history rather than correct it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@piyushmakhija28
piyushmakhija28 merged commit f1bff7c into main Aug 7, 2026
6 checks passed
@piyushmakhija28
piyushmakhija28 deleted the chore/remove-helper-nodes branch August 7, 2026 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant