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

radio-t / stream-recorder / 23565677973
75%

Build:
DEFAULT BRANCH: master
Ran 25 Mar 2026 09:47PM UTC
Jobs 1
Files 5
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

25 Mar 2026 09:44PM UTC coverage: 67.598% (+38.3%) from 29.29%
23565677973

push

github

web-flow
Address issue #2: test bench, bug fixes, and code cleanup (#15)

* feat: consolidate server into single file and simplify

Merge health.go, index.go, download.go into server.go. Remove
over-engineered index struct (replaced with listEpisodes helper),
remove unused DownloadRecordHandler and /record/ route, parse
template once in NewServer. Remove unused revision param from
NewServer.

* feat: simplify recorder package and main.go

- Add doc comments explaining Client/Listener/Recorder data flow
- Rename myclient/streamlistener to client/listener/rec in main.go
- Add --dbg flag, replace revision == "local" debug logic
- Remove redundant os.IsNotExist check before MkdirAll
- Increase read buffer from 128 bytes to 32KB

* feat: fix context propagation in Recorder.Record

Record now checks ctx.Done() in the read loop and closes the stream
body on cancellation to unblock pending reads. Added tests for context
cancellation during recording and pre-cancelled context.

* feat: add server package tests

Add httptest-based tests for all server handlers:
- IndexHandler: lists episodes/files, empty dir, non-existent dir
- HealthHandler: valid dir (disk-capacity-dependent), non-existent dir
- DownloadEpisodeHandler: verifies zip contents and file data
- listEpisodes: unit tests for directory listing logic

* feat: extend integration tests with full pipeline and server verification

* feat: verify acceptance criteria and fix body close race condition

Fix race condition in Recorder.Record where stream body could be closed
concurrently by the context-cancellation goroutine and the defer. Use
sync.Once to ensure single close. All issue #2 feedback verified addressed,
tests pass with race detector, linter clean, coverage: recorder 83%, server 83%.

* feat: update README and comment on issue #2 with addressed feedback

fix: address code review findings

- fix path traversal vulnerability in DownloadEpisodeHandler (validate folder, check existence before headers)
- fix g... (continued)

139 of 183 new or added lines in 5 files covered. (75.96%)

1 existing line in 1 file now uncovered.

242 of 358 relevant lines covered (67.6%)

2.78 hits per line

Uncovered Changes

Lines Coverage ∆ File
17
82.44
82.44% app/server/server.go
15
0.0
0.0% app/main.go
12
76.92
-3.08% app/recorder/recorder.go

Coverage Regressions

Lines Coverage ∆ File
1
76.92
-3.08% app/recorder/recorder.go
Jobs
ID Job ID Ran Files Coverage
1 23565677973.1 25 Mar 2026 09:47PM UTC 5
67.6
GitHub Action Run
Source Files on build 23565677973
  • Tree
  • List 5
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 50147050 on github
  • Prev Build on master (#21940150408)
  • Next Build on master (#23625324820)
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