Skip to content

refactor(plan): share the renamed-plan probe order - #472

Merged
umputun merged 3 commits into
masterfrom
plan-rename-probe-order
Nov 7, 2026
Merged

umputun merged 3 commits into
masterfrom
plan-rename-probe-order

Conversation

@umputun

@umputun umputun commented Nov 7, 2026

Copy link
Copy Markdown
Owner

follow-up to #470. The renamed-plan probe order (original path, same-dir alternate date name, completed/ with each name) was written out by hand in pkg/web/plan.go and pkg/processor/plan_locator.go, and the two copies drifted once: #342 gave the in-place probe only to the processor, #470 fixed the web side.

  • plan.CandidatePaths in pkg/plan/altdate.go returns that order once; the web loader and planLocator.Path both walk it. Behavior is unchanged, including the web loader stopping on any error other than not-found.
  • resolvePlanMoveTargets in pkg/git keeps its own probes, since it returns a source/destination pair against a caller-supplied completed/ dir. Its stale doc comment now points at the new helper.
  • TestLoadPlanWithFallback moves unchanged from server_test.go to a new plan_test.go, next to the function it tests.
  • CLAUDE.md's rename-tolerance bullet names the web loader and the shared helper.

the function moved from server.go to plan.go in 307f4f4, its tests stayed behind in server_test.go. Moved unchanged, one test file per source file.
the dashboard loader and the processor plan locator each spelled out the same probe order by hand, and the copies drifted after #342: the web side got only the completed/ probe until #470. plan.CandidatePaths now returns the order once (original, in-place alternate date, completed/ with each basename) and both callers walk it. Behavior is unchanged, including surfacing non-not-found errors in the web loader.

resolvePlanMoveTargets in pkg/git keeps its own probes since it returns a source/destination pair against a caller-supplied completed dir. CLAUDE.md now names the web loader and the shared helper in the rename tolerance bullet.
the comment named resolvePlanFilePath in pkg/processor/prompts.go, which became planLocator.Path in #364 and now takes its order from plan.CandidatePaths.
Copilot AI balanced review requested due to automatic review settings November 7, 2026 18:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying ralphex with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5141804
Status: ✅  Deploy successful!
Preview URL: https://ac30eb1c.ralphex.pages.dev
Branch Preview URL: https://plan-rename-probe-order.ralphex.pages.dev

View logs

@umputun
umputun merged commit a5d53e9 into master Nov 7, 2026
5 checks passed
@umputun
umputun deleted the plan-rename-probe-order branch November 7, 2026 18:37
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.

2 participants