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

umputun / mpt / 16898343717
88%

Build:
DEFAULT BRANCH: master
Ran 12 Aug 2025 03:43AM UTC
Jobs 1
Files 15
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 Aug 2025 03:42AM UTC coverage: 87.506% (+1.4%) from 86.12%
16898343717

push

github

web-flow
Add consensus mode for multi-provider agreement checking (#27)

* feat: add consensus mode for multi-provider agreement checking

- Add --consensus flag to enable consensus checking with mix mode
- Add --consensus.attempts flag for configuring retry attempts (1-5)
- Implement iterative refinement when providers disagree
- Add comprehensive test coverage for consensus functionality
- Update README with consensus mode documentation and examples
- Improve error handling and validation for consensus options

* refactor: improve function parameter organization with request structs

- Extract consensus functionality into separate pkg/consensus package
- Replace functions with 4+ parameters with request/response struct patterns:
  * LoadContent: use LoadRequest struct for cleaner parameter passing
  * shouldExcludeFile: use ExclusionRequest struct
  * Pattern processors: use PatternRequest struct for consistency
  * processMixMode: use ProcessMixRequest struct
  * mixResults: use MixRequest/MixResponse structs
- Remove unnecessary wrapper function initializeProvider
- Consolidate consensus logic in dedicated manager with proper encapsulation
- All tests updated and passing with race detection
- Linter shows 0 issues

* test: improve test coverage and replace all manual mocks with moq-generated ones

Replace manual mocks with moq-generated mocks:
- Add moq generation directives for Provider interface across all packages
- Replace all manual mock implementations in consensus, mix, and provider packages
- Update retry_test.go to use moq-generated mocks instead of manual mockProvider struct
- Ensure consistent testing patterns using generated mocks throughout codebase

Improve test coverage:
- Add comprehensive consensus test cases including rerun scenarios and error handling
- Add test for consensus error continuation in mix package (line 86 coverage)
- Add test cases for consensus achieved after rerun
- Fix TestRetryableProvider_FormattedError to use retryable... (continued)

400 of 488 new or added lines in 7 files covered. (81.97%)

1821 of 2081 relevant lines covered (87.51%)

21.28 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
81.49
0.05% cmd/mpt/main.go
5
87.12
0.29% pkg/files/glob.go
8
92.31
pkg/mix/mix.go
10
94.19
pkg/consensus/consensus.go
13
68.85
-18.65% pkg/provider/provider.go
50
23.08
pkg/provider/provider_type_enum.go
Jobs
ID Job ID Ran Files Coverage
1 16898343717.1 12 Aug 2025 03:43AM UTC 15
87.51
GitHub Action Run
Source Files on build 16898343717
  • Tree
  • List 15
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • a2fe2f3f on github
  • Prev Build on master (#16892427964)
  • Next Build on master (#16900723482)
  • 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

© 2025 Coveralls, Inc