Commit Graph
4 Commits
Author SHA1 Message Date
poimen 7be93d1d16 fix: remove duplicate PersistInput type definition
CI / CI (pull_request) Successful in 4m33s
Type already re-exported from pkg/types at top of file
2026-09-08 17:06:44 -07:00
poimen 5ccc3711e6 refactor: extract synthesis types to pkg/types
CI / CI (pull_request) Failing after 2m17s
DRY fix: Shared types (SynthesisInput, ExtractedEntity, ExtractedFact,
ContradictionResult, PersistInput) moved to pkg/types/synthesis.go.

Both workflow and activity packages now import from pkg/types.
Re-exported as type aliases for backward compatibility.

Fixes: Duplicate type definitions between workflow and activity packages.
2026-09-08 17:05:17 -07:00
poimen 9020ccf839 feat(phase-2.1): synthesis workflow definition
CI / CI (pull_request) Successful in 4m1s
4-stage pipeline as Temporal workflow:
  Stage 1: ChunkAndEmbed — chunk text + generate embeddings
  Stage 2: ExtractEntities — LLM entity extraction with reflection
  Stage 3: ExtractFacts — pattern + LLM fact extraction
  Stage 4: DetectContradictions — pre-filter + LLM verification
  Stage 5: PersistSynthesis — save all results to DB

Types: SynthesisInput, SynthesisResult, ExtractedEntity,
       ExtractedFact, ContradictionResult, PersistInput

Retry: 3 attempts, exponential backoff (1s → 2s → 4s)
Each stage fails independently with wrapped errors.

Tests: 5 pass (success, contradictions, entity fail, chunk fail, fields)
Build: clean, 36 packages pass
2026-09-08 16:35:36 -07:00
Test 9c9e9450bc refactor: rename action→activity, statemachine→workflow, remove HTTP API layer
- action/ → activity/ (Temporal activities)
- statemachine/ → workflow/ (Temporal workflows)
- Removed internal/api/ and cmd/server/ (api-gw handles HTTP, Temporal is the API)
- Created pkg/types/types.go as single source of truth for all shared types
- Extracted CallRoleLLM helper (DRY: implementer/planner/judge shared pattern)
- Fixed circular import: workflow_graph_query uses string activity names
- Fixed logger.logf → logger.Info/Warn (method didn't exist)
- Fixed routing types: added Branches, Activity, BackoffSeconds, TaskActivity
- Fixed db.Canvas.Name, db.Client→DB, GetWorkflow→FetchWorkflow
- Removed unused imports
- All tests pass, build clean, vet clean
2026-09-05 23:59:13 -07:00