• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

agnaldo4j / kanban_vision_api_iex / af23e3d1034dfc03efd6f4bf3ae3c96320b274fc
88%

Build:
DEFAULT BRANCH: main
Ran 12 Feb 2026 07:33PM UTC
Jobs 1
Files 20
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 Feb 2026 07:33PM UTC coverage: 93.013% (-4.5%) from 97.479%
af23e3d1034dfc03efd6f4bf3ae3c96320b274fc

push

github

web-flow
Refactor: Implement explicit Use Cases with observability and validation (#11)

* Refactor: Implement explicit Use Cases with observability and validation

This commit applies architectural improvements to align with Platform
Engineering Standards and Clean Architecture principles.

## Major Changes

### 1. Explicit Use Cases (SRP)
- Created 8 dedicated Use Case modules (one per operation)
- Organizations: CreateOrganization, DeleteOrganization, GetOrganizationById,
  GetOrganizationByName, GetAllOrganizations
- Simulations: CreateSimulation, GetAllSimulations, GetSimulationByOrgAndName
- GenServers now only orchestrate; business logic moved to Use Cases

### 2. Observability (Logger + Telemetry)
- Added structured logging with correlation_id to all Use Cases
- INFO logs for mutations (create, delete)
- DEBUG logs for queries
- ERROR logs for failures
- Telemetry events emitted after mutations: :organization_created,
  :organization_deleted, :simulation_created

### 3. Input Validation
- Commands/Queries now use factory functions with validation
- @enforce_keys for required fields
- Type and size validation in new/N functions
- Returns {:ok, cmd} | {:error, :invalid_*}

### 4. Contract Tests
- Added OrganizationRepositoryContractTest
- Added SimulationRepositoryContractTest
- Verify Agents correctly implement Port behaviours
- Tagged with @integration (excluded by default)

### 5. Updated Tests
- All tests adapted to use factory functions
- Added validation tests for Commands/Queries
- All tests passing (39 tests, 0 failures)

### 6. Documentation
- README completely rewritten with new architecture
- Added "Architecture Evolution" section documenting changes
- Updated project structure showing Use Case modules
- Added Key Design Decisions section

## Files Changed
- New: 8 Use Case modules in usecase/organizations/ and usecase/simulations/
- New: 2 contract test files
- New: docs/skills/definition-of-done.md
- Modified: Commands/Queries with validatio... (continued)

121 of 134 new or added lines in 14 files covered. (90.3%)

6 existing lines in 3 files now uncovered.

213 of 229 relevant lines covered (93.01%)

3.01 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
66.67
-33.33% apps/usecase/lib/kanban_vision_api/usecase/organization/commands.ex
2
50.0
-50.0% apps/usecase/lib/kanban_vision_api/usecase/organization/queries.ex
2
33.33
-66.67% apps/usecase/lib/kanban_vision_api/usecase/simulation/queries.ex
3
81.25
apps/usecase/lib/kanban_vision_api/usecase/organizations/delete_organization.ex
4
80.95
apps/usecase/lib/kanban_vision_api/usecase/simulations/create_simulation.ex

Uncovered Existing Lines

Lines Coverage ∆ File
2
66.67
-33.33% apps/usecase/lib/kanban_vision_api/usecase/organization/commands.ex
2
50.0
-50.0% apps/usecase/lib/kanban_vision_api/usecase/organization/queries.ex
2
33.33
-66.67% apps/usecase/lib/kanban_vision_api/usecase/simulation/queries.ex
Jobs
ID Job ID Ran Files Coverage
1 af23e3d1034dfc03efd6f4bf3ae3c96320b274fc.1 12 Feb 2026 07:33PM UTC 20
93.01
GitHub Action Run
Source Files on build af23e3d1034dfc03efd6f4bf3ae3c96320b274fc
  • Tree
  • List 20
  • Changed 6
  • Source Changed 0
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • af23e3d1 on github
  • Prev Build on main (#18FE25B0...)
  • Next Build on main (#D4581F97...)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc