check server.py implements all methods of openrpc #1

Open
opened 2026-04-06 04:24:15 +00:00 by despiegk · 5 comments
Owner

/Volumes/T7/code0/claude_server/crates/hero_claude_server/server.py
does it fully implement

/Volumes/T7/code0/claude_server/crates/hero_claude_server/openrpc.json

is it registered on right socket? ~/hero/var/sockets/hero_claude_server.sock

as UDS see skill /hero_sockets

make sure we have good tests in
/Volumes/T7/code0/claude_server/crates/hero_claude_examples/tests/integration.rs

use make run to start the server

/Volumes/T7/code0/claude_server/crates/hero_claude_server/server.py does it fully implement /Volumes/T7/code0/claude_server/crates/hero_claude_server/openrpc.json is it registered on right socket? ~/hero/var/sockets/hero_claude_server.sock as UDS see skill /hero_sockets make sure we have good tests in /Volumes/T7/code0/claude_server/crates/hero_claude_examples/tests/integration.rs use make run to start the server
Author
Owner

Implementation Spec for Issue #1 — ACP Server OpenRPC Compliance & Integration Tests

Objective

Verify and close all gaps between openrpc.json (the authoritative ACP spec), server.py (the Python implementation), and integration.rs (the Rust integration test suite). Fix the confirmed socket-path discrepancy in the spec, add integration-test coverage for every missing OpenRPC method group, and confirm make run correctly starts the server on the required UDS.

Findings Summary

  • server.py: All 30 methods (26 OpenRPC + 2 internal rpc.*) are fully implemented — no gaps.
  • openrpc.json servers[0].url: Uses unix:///hero/var/sockets/hero_claude_server.sock (absolute path) — should be unix://~/hero/var/sockets/hero_claude_server.sock (home-relative, per hero_sockets standard). server.py is correct; the spec doc is wrong.
  • test_ping assertion: Asserts pong.service == "acp" but server returns "hero_claude_server" — test will fail.
  • Integration test coverage: 17 OpenRPC methods have no test in integration.rs (agent update/start/stop/restart/heartbeat/state/capabilities, task cancel/retry/messages/input/steps/logs, all 4 event methods).
  • make run: Correctly starts server via hero_proc. No make test-integration combined target exists.

Requirements

  • R1 Fix openrpc.json servers[0].url to unix://~/hero/var/sockets/hero_claude_server.sock
  • R2 Fix test_ping assertion: pong.service should equal "hero_claude_server" not "acp"
  • R3 Add test_agent_extended covering: acp.agent.update, acp.agent.start, acp.agent.stop, acp.agent.restart, acp.agent.heartbeat, acp.agent.state, acp.agent.capabilities
  • R4 Add test_task_extended covering: acp.task.cancel, acp.task.retry, acp.task.messages, acp.task.input, acp.task.steps, acp.task.logs
  • R5 Add test_event_lifecycle covering: acp.event.subscribe, acp.event.poll, acp.event.list, acp.event.unsubscribe
  • R6 Add make test-integration Makefile target

Files to Modify

File Action
crates/hero_claude_server/openrpc.json Fix servers[0].url socket path
crates/hero_claude_examples/tests/integration.rs Fix test_ping assertion + add 3 new test functions
Makefile Add test-integration target

Implementation Plan

Step 1 — Fix openrpc.json socket URL

File: crates/hero_claude_server/openrpc.json
Change unix:///hero/var/sockets/hero_claude_server.sockunix://~/hero/var/sockets/hero_claude_server.sock
Dependencies: None

Step 2 — Fix test_ping service-name assertion

File: crates/hero_claude_examples/tests/integration.rs
Change assert_eq!(pong.service, "acp", ...)assert_eq!(pong.service, "hero_claude_server", ...)
Dependencies: None (independent of Step 1)

Step 3 — Add test_agent_extended

File: crates/hero_claude_examples/tests/integration.rs
New #[tokio::test] covering agent update/heartbeat/state/capabilities/start/restart/stop sequence.
Dependencies: Step 2 (same file)

Step 4 — Add test_task_extended

File: crates/hero_claude_examples/tests/integration.rs
New #[tokio::test] covering task input/messages/steps/logs/cancel/retry.
Dependencies: Steps 2–3 (same file)

Step 5 — Add test_event_lifecycle

File: crates/hero_claude_examples/tests/integration.rs
New #[tokio::test] covering event subscribe/poll/list/unsubscribe.
Dependencies: Steps 2–4 (same file)

Step 6 — Add make test-integration target

File: Makefile
Add combined test-integration target that starts server, runs cargo test --test integration, stops server.
Dependencies: None (independent of Steps 2–5)

Acceptance Criteria

  • openrpc.json servers[0].url reads unix://~/hero/var/sockets/hero_claude_server.sock
  • test_ping passes against the live server (pong.service == "hero_claude_server")
  • test_agent_extended compiles and passes: all 7 agent sub-methods return valid responses
  • test_task_extended compiles and passes: all 6 task sub-methods return valid responses
  • test_event_lifecycle compiles and passes: subscribe → poll → unsubscribe round-trip succeeds
  • make test-integration starts server, runs all integration tests, stops server
  • Every method in openrpc.json has at least one integration test assertion in integration.rs

Notes

  • No Python changes needed — server.py is complete and correct.
  • SDK types are auto-generated by openrpc_client! macro from openrpc.json — after Step 1, run cargo check to confirm nothing breaks.
  • test_task_retry logic must be conditional on task status (server rejects retry on completed tasks).
  • make test-integration requires hero_proc to be running; tests gracefully skip if not available.
## Implementation Spec for Issue #1 — ACP Server OpenRPC Compliance & Integration Tests ### Objective Verify and close all gaps between `openrpc.json` (the authoritative ACP spec), `server.py` (the Python implementation), and `integration.rs` (the Rust integration test suite). Fix the confirmed socket-path discrepancy in the spec, add integration-test coverage for every missing OpenRPC method group, and confirm `make run` correctly starts the server on the required UDS. ### Findings Summary - **server.py**: All 30 methods (26 OpenRPC + 2 internal `rpc.*`) are fully implemented — no gaps. - **openrpc.json `servers[0].url`**: Uses `unix:///hero/var/sockets/hero_claude_server.sock` (absolute path) — should be `unix://~/hero/var/sockets/hero_claude_server.sock` (home-relative, per hero_sockets standard). **server.py is correct; the spec doc is wrong.** - **test_ping assertion**: Asserts `pong.service == "acp"` but server returns `"hero_claude_server"` — test will fail. - **Integration test coverage**: 17 OpenRPC methods have no test in `integration.rs` (agent update/start/stop/restart/heartbeat/state/capabilities, task cancel/retry/messages/input/steps/logs, all 4 event methods). - **make run**: Correctly starts server via hero_proc. No `make test-integration` combined target exists. ### Requirements - **R1** Fix `openrpc.json` `servers[0].url` to `unix://~/hero/var/sockets/hero_claude_server.sock` - **R2** Fix `test_ping` assertion: `pong.service` should equal `"hero_claude_server"` not `"acp"` - **R3** Add `test_agent_extended` covering: `acp.agent.update`, `acp.agent.start`, `acp.agent.stop`, `acp.agent.restart`, `acp.agent.heartbeat`, `acp.agent.state`, `acp.agent.capabilities` - **R4** Add `test_task_extended` covering: `acp.task.cancel`, `acp.task.retry`, `acp.task.messages`, `acp.task.input`, `acp.task.steps`, `acp.task.logs` - **R5** Add `test_event_lifecycle` covering: `acp.event.subscribe`, `acp.event.poll`, `acp.event.list`, `acp.event.unsubscribe` - **R6** Add `make test-integration` Makefile target ### Files to Modify | File | Action | |---|---| | `crates/hero_claude_server/openrpc.json` | Fix `servers[0].url` socket path | | `crates/hero_claude_examples/tests/integration.rs` | Fix test_ping assertion + add 3 new test functions | | `Makefile` | Add `test-integration` target | ### Implementation Plan #### Step 1 — Fix openrpc.json socket URL **File:** `crates/hero_claude_server/openrpc.json` Change `unix:///hero/var/sockets/hero_claude_server.sock` → `unix://~/hero/var/sockets/hero_claude_server.sock` **Dependencies:** None #### Step 2 — Fix test_ping service-name assertion **File:** `crates/hero_claude_examples/tests/integration.rs` Change `assert_eq!(pong.service, "acp", ...)` → `assert_eq!(pong.service, "hero_claude_server", ...)` **Dependencies:** None (independent of Step 1) #### Step 3 — Add test_agent_extended **File:** `crates/hero_claude_examples/tests/integration.rs` New `#[tokio::test]` covering agent update/heartbeat/state/capabilities/start/restart/stop sequence. **Dependencies:** Step 2 (same file) #### Step 4 — Add test_task_extended **File:** `crates/hero_claude_examples/tests/integration.rs` New `#[tokio::test]` covering task input/messages/steps/logs/cancel/retry. **Dependencies:** Steps 2–3 (same file) #### Step 5 — Add test_event_lifecycle **File:** `crates/hero_claude_examples/tests/integration.rs` New `#[tokio::test]` covering event subscribe/poll/list/unsubscribe. **Dependencies:** Steps 2–4 (same file) #### Step 6 — Add make test-integration target **File:** `Makefile` Add combined `test-integration` target that starts server, runs `cargo test --test integration`, stops server. **Dependencies:** None (independent of Steps 2–5) ### Acceptance Criteria - [ ] `openrpc.json` `servers[0].url` reads `unix://~/hero/var/sockets/hero_claude_server.sock` - [ ] `test_ping` passes against the live server (`pong.service == "hero_claude_server"`) - [ ] `test_agent_extended` compiles and passes: all 7 agent sub-methods return valid responses - [ ] `test_task_extended` compiles and passes: all 6 task sub-methods return valid responses - [ ] `test_event_lifecycle` compiles and passes: subscribe → poll → unsubscribe round-trip succeeds - [ ] `make test-integration` starts server, runs all integration tests, stops server - [ ] Every method in `openrpc.json` has at least one integration test assertion in `integration.rs` ### Notes - No Python changes needed — server.py is complete and correct. - SDK types are auto-generated by `openrpc_client!` macro from `openrpc.json` — after Step 1, run `cargo check` to confirm nothing breaks. - `test_task_retry` logic must be conditional on task status (server rejects retry on completed tasks). - `make test-integration` requires `hero_proc` to be running; tests gracefully skip if not available.
Author
Owner

Implementation Spec for Issue #1 — ACP Server OpenRPC Compliance & Integration Tests

Objective

Verify and close all gaps between openrpc.json (the authoritative ACP spec), server.py (the Python implementation), and integration.rs (the Rust integration test suite). Fix the confirmed socket-path discrepancy in the spec, add integration-test coverage for every missing OpenRPC method group, and confirm make run correctly starts the server on the required UDS.

Findings Summary

  • server.py: All 30 methods (26 OpenRPC + 2 internal rpc.*) are fully implemented — no gaps.
  • openrpc.json servers[0].url: Uses unix:///hero/var/sockets/hero_claude_server.sock (absolute path) — should be unix://~/hero/var/sockets/hero_claude_server.sock (home-relative, per hero_sockets standard). server.py is correct; the spec doc is wrong.
  • test_ping assertion: Asserts pong.service == "acp" but server returns "hero_claude_server" — test will fail.
  • Integration test coverage: 17 OpenRPC methods have no test in integration.rs (agent update/start/stop/restart/heartbeat/state/capabilities, task cancel/retry/messages/input/steps/logs, all 4 event methods).
  • make run: Correctly starts server via hero_proc. No make test-integration combined target exists.

Requirements

  • R1 Fix openrpc.json servers[0].url to unix://~/hero/var/sockets/hero_claude_server.sock
  • R2 Fix test_ping assertion: pong.service should equal "hero_claude_server" not "acp"
  • R3 Add test_agent_extended covering: acp.agent.update, acp.agent.start, acp.agent.stop, acp.agent.restart, acp.agent.heartbeat, acp.agent.state, acp.agent.capabilities
  • R4 Add test_task_extended covering: acp.task.cancel, acp.task.retry, acp.task.messages, acp.task.input, acp.task.steps, acp.task.logs
  • R5 Add test_event_lifecycle covering: acp.event.subscribe, acp.event.poll, acp.event.list, acp.event.unsubscribe
  • R6 Add make test-integration Makefile target

Files to Modify

File Action
crates/hero_claude_server/openrpc.json Fix servers[0].url socket path
crates/hero_claude_examples/tests/integration.rs Fix test_ping assertion + add 3 new test functions
Makefile Add test-integration target

Implementation Plan

Step 1 — Fix openrpc.json socket URL

File: crates/hero_claude_server/openrpc.json
Change unix:///hero/var/sockets/hero_claude_server.sockunix://~/hero/var/sockets/hero_claude_server.sock
Dependencies: None

Step 2 — Fix test_ping service-name assertion

File: crates/hero_claude_examples/tests/integration.rs
Change assert_eq!(pong.service, "acp", ...)assert_eq!(pong.service, "hero_claude_server", ...)
Dependencies: None (independent of Step 1)

Step 3 — Add test_agent_extended

File: crates/hero_claude_examples/tests/integration.rs
New #[tokio::test] covering agent update/heartbeat/state/capabilities/start/restart/stop sequence.
Dependencies: Step 2 (same file)

Step 4 — Add test_task_extended

File: crates/hero_claude_examples/tests/integration.rs
New #[tokio::test] covering task input/messages/steps/logs/cancel/retry.
Dependencies: Steps 2–3 (same file)

Step 5 — Add test_event_lifecycle

File: crates/hero_claude_examples/tests/integration.rs
New #[tokio::test] covering event subscribe/poll/list/unsubscribe.
Dependencies: Steps 2–4 (same file)

Step 6 — Add make test-integration target

File: Makefile
Add combined test-integration target that starts server, runs cargo test --test integration, stops server.
Dependencies: None (independent of Steps 2–5)

Acceptance Criteria

  • openrpc.json servers[0].url reads unix://~/hero/var/sockets/hero_claude_server.sock
  • test_ping passes against the live server (pong.service == "hero_claude_server")
  • test_agent_extended compiles and passes: all 7 agent sub-methods return valid responses
  • test_task_extended compiles and passes: all 6 task sub-methods return valid responses
  • test_event_lifecycle compiles and passes: subscribe → poll → unsubscribe round-trip succeeds
  • make test-integration starts server, runs all integration tests, stops server
  • Every method in openrpc.json has at least one integration test assertion in integration.rs

Notes

  • No Python changes needed — server.py is complete and correct.
  • SDK types are auto-generated by openrpc_client! macro from openrpc.json — after Step 1, run cargo check to confirm nothing breaks.
  • test_task_retry logic must be conditional on task status (server rejects retry on completed tasks).
  • make test-integration requires hero_proc to be running; tests gracefully skip if not available.
## Implementation Spec for Issue #1 — ACP Server OpenRPC Compliance & Integration Tests ### Objective Verify and close all gaps between `openrpc.json` (the authoritative ACP spec), `server.py` (the Python implementation), and `integration.rs` (the Rust integration test suite). Fix the confirmed socket-path discrepancy in the spec, add integration-test coverage for every missing OpenRPC method group, and confirm `make run` correctly starts the server on the required UDS. ### Findings Summary - **server.py**: All 30 methods (26 OpenRPC + 2 internal `rpc.*`) are fully implemented — no gaps. - **openrpc.json `servers[0].url`**: Uses `unix:///hero/var/sockets/hero_claude_server.sock` (absolute path) — should be `unix://~/hero/var/sockets/hero_claude_server.sock` (home-relative, per hero_sockets standard). **server.py is correct; the spec doc is wrong.** - **test_ping assertion**: Asserts `pong.service == "acp"` but server returns `"hero_claude_server"` — test will fail. - **Integration test coverage**: 17 OpenRPC methods have no test in `integration.rs` (agent update/start/stop/restart/heartbeat/state/capabilities, task cancel/retry/messages/input/steps/logs, all 4 event methods). - **make run**: Correctly starts server via hero_proc. No `make test-integration` combined target exists. ### Requirements - **R1** Fix `openrpc.json` `servers[0].url` to `unix://~/hero/var/sockets/hero_claude_server.sock` - **R2** Fix `test_ping` assertion: `pong.service` should equal `"hero_claude_server"` not `"acp"` - **R3** Add `test_agent_extended` covering: `acp.agent.update`, `acp.agent.start`, `acp.agent.stop`, `acp.agent.restart`, `acp.agent.heartbeat`, `acp.agent.state`, `acp.agent.capabilities` - **R4** Add `test_task_extended` covering: `acp.task.cancel`, `acp.task.retry`, `acp.task.messages`, `acp.task.input`, `acp.task.steps`, `acp.task.logs` - **R5** Add `test_event_lifecycle` covering: `acp.event.subscribe`, `acp.event.poll`, `acp.event.list`, `acp.event.unsubscribe` - **R6** Add `make test-integration` Makefile target ### Files to Modify | File | Action | |---|---| | `crates/hero_claude_server/openrpc.json` | Fix `servers[0].url` socket path | | `crates/hero_claude_examples/tests/integration.rs` | Fix test_ping assertion + add 3 new test functions | | `Makefile` | Add `test-integration` target | ### Implementation Plan #### Step 1 — Fix openrpc.json socket URL **File:** `crates/hero_claude_server/openrpc.json` Change `unix:///hero/var/sockets/hero_claude_server.sock` → `unix://~/hero/var/sockets/hero_claude_server.sock` **Dependencies:** None #### Step 2 — Fix test_ping service-name assertion **File:** `crates/hero_claude_examples/tests/integration.rs` Change `assert_eq!(pong.service, "acp", ...)` → `assert_eq!(pong.service, "hero_claude_server", ...)` **Dependencies:** None (independent of Step 1) #### Step 3 — Add test_agent_extended **File:** `crates/hero_claude_examples/tests/integration.rs` New `#[tokio::test]` covering agent update/heartbeat/state/capabilities/start/restart/stop sequence. **Dependencies:** Step 2 (same file) #### Step 4 — Add test_task_extended **File:** `crates/hero_claude_examples/tests/integration.rs` New `#[tokio::test]` covering task input/messages/steps/logs/cancel/retry. **Dependencies:** Steps 2–3 (same file) #### Step 5 — Add test_event_lifecycle **File:** `crates/hero_claude_examples/tests/integration.rs` New `#[tokio::test]` covering event subscribe/poll/list/unsubscribe. **Dependencies:** Steps 2–4 (same file) #### Step 6 — Add make test-integration target **File:** `Makefile` Add combined `test-integration` target that starts server, runs `cargo test --test integration`, stops server. **Dependencies:** None (independent of Steps 2–5) ### Acceptance Criteria - [ ] `openrpc.json` `servers[0].url` reads `unix://~/hero/var/sockets/hero_claude_server.sock` - [ ] `test_ping` passes against the live server (`pong.service == "hero_claude_server"`) - [ ] `test_agent_extended` compiles and passes: all 7 agent sub-methods return valid responses - [ ] `test_task_extended` compiles and passes: all 6 task sub-methods return valid responses - [ ] `test_event_lifecycle` compiles and passes: subscribe → poll → unsubscribe round-trip succeeds - [ ] `make test-integration` starts server, runs all integration tests, stops server - [ ] Every method in `openrpc.json` has at least one integration test assertion in `integration.rs` ### Notes - No Python changes needed — server.py is complete and correct. - SDK types are auto-generated by `openrpc_client!` macro from `openrpc.json` — after Step 1, run `cargo check` to confirm nothing breaks. - `test_task_retry` logic must be conditional on task status (server rejects retry on completed tasks). - `make test-integration` requires `hero_proc` to be running; tests gracefully skip if not available.
Author
Owner

Test Results

Compilation

  • Status: PASS
  • Details: cargo check --test integration completed successfully in 1.13s with no errors or warnings.

Test Run

  • Status: FAIL (server running, but 6 of 9 tests failed)
  • Total: 9
  • Passed: 3
  • Failed: 6
  • Skipped: 0

Passing Tests

  • test_ping — ok
  • test_agent_lifecycle — ok
  • test_task_lifecycle — ok

Failing Tests

All 6 failures share the same root cause: Transport("Request failed: connection closed before message completed")

  • test_health — panicked at line 106: health failed: Transport(...)
  • test_rpc_discover — panicked at line 130: rpc.discover failed: Some(Transport(...))
  • test_agent_extended — panicked at line 226: register failed: Transport(...)
  • test_task_extended — panicked at line 416: task.messages failed: Transport(...)
  • test_event_lifecycle — panicked at line 566: event.poll failed: Transport(...)
  • test_metrics — panicked at line 618: metrics failed: Transport(...)

Details

The UDS server is reachable (basic ping, agent lifecycle, and task lifecycle pass), but the connection is being closed prematurely before some method responses complete. The repeated log line OpenRPC transport: connection error: error shutting down connection suggests the server is closing the socket after handling certain requests before the client finishes reading the response. This points to a server-side issue with request handling or connection keep-alive for methods like health, rpc.discover, agent.register, task.messages, event.poll, and metrics.

## Test Results ### Compilation - Status: PASS - Details: `cargo check --test integration` completed successfully in 1.13s with no errors or warnings. ### Test Run - Status: FAIL (server running, but 6 of 9 tests failed) - Total: 9 - Passed: 3 - Failed: 6 - Skipped: 0 ### Passing Tests - `test_ping` — ok - `test_agent_lifecycle` — ok - `test_task_lifecycle` — ok ### Failing Tests All 6 failures share the same root cause: `Transport("Request failed: connection closed before message completed")` - `test_health` — panicked at line 106: `health failed: Transport(...)` - `test_rpc_discover` — panicked at line 130: `rpc.discover failed: Some(Transport(...))` - `test_agent_extended` — panicked at line 226: `register failed: Transport(...)` - `test_task_extended` — panicked at line 416: `task.messages failed: Transport(...)` - `test_event_lifecycle` — panicked at line 566: `event.poll failed: Transport(...)` - `test_metrics` — panicked at line 618: `metrics failed: Transport(...)` ### Details The UDS server is reachable (basic ping, agent lifecycle, and task lifecycle pass), but the connection is being closed prematurely before some method responses complete. The repeated log line `OpenRPC transport: connection error: error shutting down connection` suggests the server is closing the socket after handling certain requests before the client finishes reading the response. This points to a server-side issue with request handling or connection keep-alive for methods like `health`, `rpc.discover`, `agent.register`, `task.messages`, `event.poll`, and `metrics`.
Author
Owner

Implementation Complete — Issue #1

Changes Made

crates/hero_claude_server/openrpc.json

  • Fixed servers[0].url from unix:///hero/var/sockets/hero_claude_server.sock to unix://~/hero/var/sockets/hero_claude_server.sock (home-relative, per hero_sockets standard)

crates/hero_claude_examples/tests/integration.rs

  • Fixed test_ping assertion: pong.service now asserts "hero_claude_server" (was wrong "acp")
  • Added test_agent_extended: covers acp.agent.update, acp.agent.heartbeat, acp.agent.state, acp.agent.capabilities, acp.agent.start, acp.agent.restart, acp.agent.stop
  • Added test_task_extended: covers acp.task.input, acp.task.messages, acp.task.steps, acp.task.logs, acp.task.cancel, acp.task.retry
  • Added test_event_lifecycle: covers acp.event.subscribe, acp.event.poll, acp.event.list, acp.event.unsubscribe

crates/hero_claude_server/server.py

  • Fixed connection shutdown race condition: added Connection: close middleware so aiohttp closes the socket cleanly after each request/response cycle

Makefile

  • Added test-integration target: starts server, runs cargo test --test integration, stops server, exits with test exit code

Test Results

  • Compilation: PASS
  • All 9 integration tests: PASS
    • test_ping
    • test_health
    • test_rpc_discover
    • test_agent_lifecycle
    • test_agent_extended (new)
    • test_task_lifecycle
    • test_task_extended (new)
    • test_event_lifecycle (new)
    • test_metrics

Acceptance Criteria

  • openrpc.json servers[0].url reads unix://~/hero/var/sockets/hero_claude_server.sock
  • test_ping passes (pong.service == "hero_claude_server")
  • test_agent_extended covers all 7 agent sub-methods
  • test_task_extended covers all 6 task sub-methods
  • test_event_lifecycle covers subscribe → poll → unsubscribe round-trip
  • make test-integration target added
  • All 9 integration tests pass (0 failures)
  • Every method in openrpc.json has at least one integration test assertion
## Implementation Complete — Issue #1 ### Changes Made **`crates/hero_claude_server/openrpc.json`** - Fixed `servers[0].url` from `unix:///hero/var/sockets/hero_claude_server.sock` to `unix://~/hero/var/sockets/hero_claude_server.sock` (home-relative, per hero_sockets standard) **`crates/hero_claude_examples/tests/integration.rs`** - Fixed `test_ping` assertion: `pong.service` now asserts `"hero_claude_server"` (was wrong `"acp"`) - Added `test_agent_extended`: covers `acp.agent.update`, `acp.agent.heartbeat`, `acp.agent.state`, `acp.agent.capabilities`, `acp.agent.start`, `acp.agent.restart`, `acp.agent.stop` - Added `test_task_extended`: covers `acp.task.input`, `acp.task.messages`, `acp.task.steps`, `acp.task.logs`, `acp.task.cancel`, `acp.task.retry` - Added `test_event_lifecycle`: covers `acp.event.subscribe`, `acp.event.poll`, `acp.event.list`, `acp.event.unsubscribe` **`crates/hero_claude_server/server.py`** - Fixed connection shutdown race condition: added `Connection: close` middleware so aiohttp closes the socket cleanly after each request/response cycle **`Makefile`** - Added `test-integration` target: starts server, runs `cargo test --test integration`, stops server, exits with test exit code ### Test Results - **Compilation:** PASS - **All 9 integration tests:** PASS - `test_ping` ✅ - `test_health` ✅ - `test_rpc_discover` ✅ - `test_agent_lifecycle` ✅ - `test_agent_extended` ✅ (new) - `test_task_lifecycle` ✅ - `test_task_extended` ✅ (new) - `test_event_lifecycle` ✅ (new) - `test_metrics` ✅ ### Acceptance Criteria - [x] `openrpc.json` `servers[0].url` reads `unix://~/hero/var/sockets/hero_claude_server.sock` - [x] `test_ping` passes (`pong.service == "hero_claude_server"`) - [x] `test_agent_extended` covers all 7 agent sub-methods - [x] `test_task_extended` covers all 6 task sub-methods - [x] `test_event_lifecycle` covers subscribe → poll → unsubscribe round-trip - [x] `make test-integration` target added - [x] All 9 integration tests pass (0 failures) - [x] Every method in `openrpc.json` has at least one integration test assertion
Author
Owner

Implementation Complete — Issue #1

Changes Made

crates/hero_claude_server/openrpc.json

  • Fixed servers[0].url from unix:///hero/var/sockets/hero_claude_server.sock to unix://~/hero/var/sockets/hero_claude_server.sock (home-relative, per hero_sockets standard)

crates/hero_claude_examples/tests/integration.rs

  • Fixed test_ping assertion: pong.service now asserts "hero_claude_server" (was wrong "acp")
  • Added test_agent_extended: covers acp.agent.update, acp.agent.heartbeat, acp.agent.state, acp.agent.capabilities, acp.agent.start, acp.agent.restart, acp.agent.stop
  • Added test_task_extended: covers acp.task.input, acp.task.messages, acp.task.steps, acp.task.logs, acp.task.cancel, acp.task.retry
  • Added test_event_lifecycle: covers acp.event.subscribe, acp.event.poll, acp.event.list, acp.event.unsubscribe

crates/hero_claude_server/server.py

  • Fixed connection shutdown race condition: added Connection: close middleware so aiohttp closes the socket cleanly after each request/response cycle

Makefile

  • Added test-integration target: starts server, runs cargo test --test integration, stops server, exits with test exit code

Test Results

  • Compilation: PASS
  • All 9 integration tests: PASS
    • test_ping
    • test_health
    • test_rpc_discover
    • test_agent_lifecycle
    • test_agent_extended (new)
    • test_task_lifecycle
    • test_task_extended (new)
    • test_event_lifecycle (new)
    • test_metrics

Acceptance Criteria

  • openrpc.json servers[0].url reads unix://~/hero/var/sockets/hero_claude_server.sock
  • test_ping passes (pong.service == "hero_claude_server")
  • test_agent_extended covers all 7 agent sub-methods
  • test_task_extended covers all 6 task sub-methods
  • test_event_lifecycle covers subscribe → poll → unsubscribe round-trip
  • make test-integration target added
  • All 9 integration tests pass (0 failures)
  • Every method in openrpc.json has at least one integration test assertion
## Implementation Complete — Issue #1 ### Changes Made **`crates/hero_claude_server/openrpc.json`** - Fixed `servers[0].url` from `unix:///hero/var/sockets/hero_claude_server.sock` to `unix://~/hero/var/sockets/hero_claude_server.sock` (home-relative, per hero_sockets standard) **`crates/hero_claude_examples/tests/integration.rs`** - Fixed `test_ping` assertion: `pong.service` now asserts `"hero_claude_server"` (was wrong `"acp"`) - Added `test_agent_extended`: covers `acp.agent.update`, `acp.agent.heartbeat`, `acp.agent.state`, `acp.agent.capabilities`, `acp.agent.start`, `acp.agent.restart`, `acp.agent.stop` - Added `test_task_extended`: covers `acp.task.input`, `acp.task.messages`, `acp.task.steps`, `acp.task.logs`, `acp.task.cancel`, `acp.task.retry` - Added `test_event_lifecycle`: covers `acp.event.subscribe`, `acp.event.poll`, `acp.event.list`, `acp.event.unsubscribe` **`crates/hero_claude_server/server.py`** - Fixed connection shutdown race condition: added `Connection: close` middleware so aiohttp closes the socket cleanly after each request/response cycle **`Makefile`** - Added `test-integration` target: starts server, runs `cargo test --test integration`, stops server, exits with test exit code ### Test Results - **Compilation:** PASS - **All 9 integration tests:** PASS - `test_ping` ✅ - `test_health` ✅ - `test_rpc_discover` ✅ - `test_agent_lifecycle` ✅ - `test_agent_extended` ✅ (new) - `test_task_lifecycle` ✅ - `test_task_extended` ✅ (new) - `test_event_lifecycle` ✅ (new) - `test_metrics` ✅ ### Acceptance Criteria - [x] `openrpc.json` `servers[0].url` reads `unix://~/hero/var/sockets/hero_claude_server.sock` - [x] `test_ping` passes (`pong.service == "hero_claude_server"`) - [x] `test_agent_extended` covers all 7 agent sub-methods - [x] `test_task_extended` covers all 6 task sub-methods - [x] `test_event_lifecycle` covers subscribe → poll → unsubscribe round-trip - [x] `make test-integration` target added - [x] All 9 integration tests pass (0 failures) - [x] Every method in `openrpc.json` has at least one integration test assertion
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_claude#1
No description provided.