fix(ai): match target root by basename in _apply_plan() #77

Merged
claude-code merged 1 commit from fix/issue-76-apply-plan-root-match into main 2026-04-12 20:39:16 -06:00
Collaborator

Summary

  • Fix path mismatch where _apply_plan() mapped the target root to "." but the planner used basename(target) (e.g. "luminos_lib"), causing priority/shallow/skip allocations for the root to be silently ignored.
  • Add warning log when plan paths don't match any known directory.
  • 2 new tests (262 total).

Closes #76

Test plan

  • test_target_root_matched_by_basename: plan references root by basename, allocation applied
  • test_target_root_matched_by_dot: plan references root as ".", allocation applied
  • test_unknown_paths_in_plan_ignored: now also verifies warning is emitted
  • All 262 tests pass
## Summary - Fix path mismatch where `_apply_plan()` mapped the target root to `"."` but the planner used `basename(target)` (e.g. `"luminos_lib"`), causing priority/shallow/skip allocations for the root to be silently ignored. - Add warning log when plan paths don't match any known directory. - 2 new tests (262 total). Closes #76 ## Test plan - [x] `test_target_root_matched_by_basename`: plan references root by basename, allocation applied - [x] `test_target_root_matched_by_dot`: plan references root as ".", allocation applied - [x] `test_unknown_paths_in_plan_ignored`: now also verifies warning is emitted - [x] All 262 tests pass
claude-code added 1 commit 2026-04-12 20:39:09 -06:00
The planner sees basename(target) in the tree output (e.g. "luminos_lib")
and uses that as the path in its plan. But _apply_plan() mapped the
target root to "." via os.path.relpath(), so the planner's path never
matched and the allocation was silently dropped.

Fix: register both "." and basename(target) as aliases for the target
root in the lookup table. Also log a warning when plan paths don't
match any known directory, so future mismatches are visible.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
claude-code merged commit 1328793a55 into main 2026-04-12 20:39:16 -06:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: archeious/luminos#77
No description provided.