beads/internal/formula
Okano, Osamu 9b4896f0e8
Fix formula search paths for worktree-aware beads dirs (#3235)
* fix(formula): resolve worktree-aware search paths (beads-oto)

intent(formula): worktree users should resolve formulas from the active shared .beads registry instead of cwd-only paths

decision(formula-search): route CLI help, formula lookup, and distill output hints through formula.DefaultSearchPaths so search path display matches runtime behavior

constraint(worktree): keep cwd/.beads fallback when no beads project is resolved so local formula registries still work before init

* fix(formula): align mol seed help with resolved search paths

intent(formula-help): worktree users should see the active beads workspace path instead of stale cwd-based guidance
constraint(formula-runtime): seed already resolves formulas through the shared default search helper so this change only updates the displayed contract

* test(formula): isolate worktree parser repo hooks

intent(formula-tests): keep worktree search path coverage focused on formula resolution instead of developer git hook state
constraint(git-test-repos): global core.hooksPath can inject failing pre-commit hooks into temp repos and break the setup commit
decision(formula-tests): reuse ForceRepoLocalHooksPath so the new worktree test follows the repo's existing git test isolation rule

* test(formula): simplify search-path test setup (beads-6kum)

intent(formula-tests): keep the new search-path coverage easy to extend without re-reading repetitive test scaffolding
constraint(formula-tests): helper extraction must preserve the hook-isolation and cache-reset behavior added for worktree coverage
decision(formula-tests): centralize repo init, fixture writing, and canonical path handling into local test helpers so each case stays focused on its assertions
2026-04-13 11:01:28 -07:00
..
advice.go chore: remove issue ID references from comments and changelogs 2025-12-28 10:05:16 -08:00
advice_test.go fix: Prevent aspect self-matching infinite recursion (gt-8tmz.16) 2025-12-25 12:21:23 -08:00
condition.go fix: Address code review issues in condition evaluator 2025-12-25 14:00:56 -08:00
condition_test.go style: run gofmt across entire codebase (bd-nmk12) 2026-02-07 19:35:20 -08:00
controlflow.go chore: remove issue ID references from comments and changelogs 2025-12-28 10:05:16 -08:00
controlflow_test.go Implement computed range expansion for loops (gt-8tmz.27) 2025-12-25 17:48:35 -08:00
expand.go feat(cook): support standalone expansion formula execution in bd mol wisp (#1903) 2026-02-22 13:00:25 -08:00
expand_test.go feat(cook): support standalone expansion formula execution in bd mol wisp (#1903) 2026-02-22 13:00:25 -08:00
parser.go Fix formula search paths for worktree-aware beads dirs (#3235) 2026-04-13 11:01:28 -07:00
parser_test.go Fix formula search paths for worktree-aware beads dirs (#3235) 2026-04-13 11:01:28 -07:00
range.go Implement computed range expansion for loops (gt-8tmz.27) 2025-12-25 17:48:35 -08:00
range_test.go style: run gofmt across entire codebase (bd-nmk12) 2026-02-07 19:35:20 -08:00
stepcondition.go feat: add negation support for step conditions (!{{var}}) 2025-12-31 00:37:59 -08:00
stepcondition_test.go style: run gofmt across entire codebase (bd-nmk12) 2026-02-07 19:35:20 -08:00
types.go fix: include convoy-type formulas in bd formula list text output 2026-03-30 06:45:14 -07:00