refactor: reduce CRAP scores in router/workflow/notification
ci / test (push) Successful in 3m42s

- llm_router.go: Extract getStringFromMap, firstNonEmpty, paramResolver
  - buildCronSpec: 12 → 4 complexity
  - buildParameters: 9 → 5 complexity

- routing_workflow.go: Extract stateMachine, stateResult types
  - RoutingWorkflow: 11 → 6 complexity
  - Separate executeTask/executePass/executeFail

- notification.go: Extract checker interface pattern
  - DeploymentPreCheckActivity: 10 → 5 complexity
  - goCheckers() returns language-specific checkers

- Added 7 new test cases for helper functions
- Coverage: internal/routing 63.6% → 66.0%
This commit is contained in:
Test
2026-09-03 08:50:21 -07:00
parent a0e64224a7
commit 1c16869126
6 changed files with 487 additions and 169 deletions
+2 -2
View File
@@ -9,6 +9,6 @@ metadata:
app.kubernetes.io/name: poimen
app.kubernetes.io/component: orchestrator
data:
GIT_COMMIT: "303e78f7" # Updated automatically by CI/CD
GIT_COMMIT: "e82600c1" # Updated automatically by CI/CD
GIT_BRANCH: "main"
DEPLOYMENT_DATE: "2026-09-02"
DEPLOYMENT_DATE: "2026-09-03"
+2 -2
View File
@@ -13,8 +13,8 @@ spec:
labels:
app: poimen-worker
annotations:
git-commit: "303e78f7" # ✅ Updated on each push, triggers rolling restart
deployment-date: "2026-09-02"
git-commit: "e82600c1" # ✅ Updated on each push, triggers rolling restart
deployment-date: "2026-09-03"
spec:
containers:
- name: worker