Skip to content

Conversation

@fank
Copy link
Member

@fank fank commented Feb 2, 2026

Summary

  • Change all handlers to return nil instead of "ok" for success
  • formatDispatchResponse already converts nil to ["ok"]
  • Avoids redundant ["ok", "ok"] responses

Test plan

  • Build succeeds
  • Verify extension returns ["ok"] for commands that previously returned ["ok", "ok"]

fank added 4 commits February 2, 2026 18:18
Handlers now return nil for success, which formatDispatchResponse
converts to ["ok"]. This avoids redundant ["ok", "ok"] responses.
@github-actions
Copy link

github-actions bot commented Feb 2, 2026

Merging this branch will not change overall coverage

Impacted Packages Coverage Δ 🤖
github.com/OCAP2/extension/v5/cmd/ocap_recorder 0.00% (ø)
github.com/OCAP2/extension/v5/internal/dispatcher 17.52% (ø)
github.com/OCAP2/extension/v5/internal/worker 1.77% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/OCAP2/extension/v5/cmd/ocap_recorder/main.go 0.00% (ø) 0 0 0
github.com/OCAP2/extension/v5/internal/worker/dispatch.go 2.02% (ø) 2080 42 2038

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/OCAP2/extension/v5/internal/dispatcher/dispatcher_test.go
  • github.com/OCAP2/extension/v5/internal/worker/dispatch_test.go

@fank fank merged commit 63cb7f2 into main Feb 2, 2026
3 checks passed
@fank fank deleted the refactor/handler-return-nil-for-success branch February 2, 2026 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants