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

umputun / cronn / 21509077922
75%

Build:
DEFAULT BRANCH: master
Ran 30 Jan 2026 08:17AM UTC
Jobs 1
Files 26
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

30 Jan 2026 08:14AM UTC coverage: 75.286% (+0.4%) from 74.846%
21509077922

push

github

web-flow
Add JSON API endpoints for job history and execution logs (#59)

* docs: add plan for JSON API history and logs endpoints

Add implementation plan for new JSON API endpoints:
- GET /api/v1/jobs/{id}/history
- GET /api/v1/jobs/{id}/executions/{exec_id}/logs

Also includes refactoring to separate JSON API code into api.go.

* feat(web): add JSON API endpoints for job history and execution logs

Create new api.go with:
- APIExecution, APIHistoryResponse, APILogsResponse types
- handleAPIJobHistory for GET /api/v1/jobs/{id}/history
- handleAPIExecutionLogs for GET /api/v1/jobs/{id}/executions/{exec_id}/logs
- Helper functions toAPIExecution and toAPIJob for type conversion
- writeJSON and writeJSONError utilities for JSON responses

Moves existing API code from handlers.go:
- APIStatusResponse, APIJob, APIStats types
- handleAPIStatus handler

* test(web): add tests for JSON API endpoints

Add comprehensive test coverage for handleAPIStatus, handleAPIJobHistory,
and handleAPIExecutionLogs handlers in new api_test.go file.

* chore: complete JSON API plan with final validation

- Remove unused json import from handlers_test.go
- Move completed plan to docs/plans/completed/

* docs: add documentation for JSON API history and logs endpoints

document the new API endpoints for job execution history
and execution logs in the README JSON API section

* fix: address codex review findings

- add ErrNotFound sentinel error in persistence package
- GetExecutionByID returns ErrNotFound for missing executions
- API handler distinguishes 404 (not found) from 500 (internal error)
- job ID mismatch returns 404 to prevent execution enumeration
- update tests to verify new error handling behavior
- use context in SQLite initialization and migration methods

150 of 163 new or added lines in 3 files covered. (92.02%)

3 existing lines in 2 files now uncovered.

2766 of 3674 relevant lines covered (75.29%)

36.77 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
13
91.1
app/web/api.go

Uncovered Existing Lines

Lines Coverage ∆ File
1
85.52
-0.13% app/web/persistence/sqlite.go
2
93.31
-0.67% app/web/jobs.go
Jobs
ID Job ID Ran Files Coverage
1 21509077922.1 30 Jan 2026 08:17AM UTC 26
75.29
GitHub Action Run
Source Files on build 21509077922
  • Tree
  • List 26
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • a977058e on github
  • Prev Build on master (#20989201362)
  • Next Build on master (#21509152267)
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