php-agentic/Models
darbs-claude 909c2da6df
Some checks failed
CI / PHP 8.4 (pull_request) Failing after 1m48s
CI / PHP 8.3 (pull_request) Failing after 2m0s
perf: replace N+1 find() with whereIn batch lookup in checkDependencies()
Resolves #23

- Replace per-dependency `AgentPhase::find()` loop with a single
  `AgentPhase::whereIn('id', $dependencies)->get()` call, reducing
  query count from N to 1 for any number of dependencies
- Short-circuit early when dependencies list is empty to avoid
  unnecessary query at all
- Add tests: empty deps, skipped-dep passthrough, single-query
  assertion, blocker shape validation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-23 10:40:00 +00:00
..
AgentApiKey.php refactor: add Builder return types to all Eloquent query scopes 2026-02-23 05:32:38 +00:00
AgentPhase.php perf: replace N+1 find() with whereIn batch lookup in checkDependencies() 2026-02-23 10:40:00 +00:00
AgentPlan.php refactor: add Builder return types to all Eloquent query scopes 2026-02-23 05:32:38 +00:00
AgentSession.php refactor: add Builder return types to all Eloquent query scopes 2026-02-23 05:32:38 +00:00
AgentWorkspaceState.php refactor: add Builder return types to all Eloquent query scopes 2026-02-23 05:32:38 +00:00
Prompt.php refactor: add Builder return types to all Eloquent query scopes 2026-02-23 05:32:38 +00:00
PromptVersion.php refactor: update namespaces for L1/L2 package convention 2026-01-27 17:34:46 +00:00
Task.php refactor: add Builder return types to all Eloquent query scopes 2026-02-23 05:32:38 +00:00
WorkspaceState.php refactor: add Builder return types to all Eloquent query scopes 2026-02-23 05:32:38 +00:00