Repository navigation
Delete the orphaned helper_nodes package, keeping its two corrections - #298
Merged
Merged
Conversation
…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>
This was referenced Aug 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes item 3 of #296. Five modules, 538 lines, no importers.
CLAUDE.mdhas 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 modulecreate_flow_graphactually 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.parentinstead ofparent.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:orchestrator.py(stale)save_workflow_memorycomment~/.claude/memory/logs/sessions/~/.claude/memory/sessions/— contradicted the line directly beneath it, which writes"memory" / "logs" / "sessions"optimize_context_after_level106b0463Both are ported into
orchestrator.pybefore 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:First real change after that test landed, and it caught it.
Verified
orchestratorimports andcreate_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.pyfile anywhere still nameshelper_nodes.Not verified locally:
ruffis 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.mdanddocs/orchestration_prompt.mdstill 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