adityamparikh opened a new pull request, #295:
URL: https://github.com/apache/solr-mcp/pull/295
Stacked on #270 (`get-cluster-status`, `list-configsets`), with current
`main` merged in: review the last commit only.
## Summary
`get-cluster-status`, `solr://cluster/status` and `list-configsets` return
records instead of nested maps and a bare list.
```text
ClusterStatus(collections, liveNodes "live_nodes", other) #
other: aliases, roles, properties…
Collection(health, configName, shards, other) #
other: router, replicationFactor, znodeVersion…
Shard(state, health, range, replicas, other)
Replica(core, nodeName "node_name", state, type, leader, other) #
other: base_url, force_set_state…
ConfigSetList(configSets, other) # names
sorted, as before
```
The records type what the tool description tells the model to read and
**compute nothing**: replica `state`, `leader` and shard/collection `health`
are Solr's own values, so the derived `healthy`/`issues` fields #270 removed
are not reintroduced. Every other property is kept in a `@JsonAnySetter
@JsonAnyGetter` catch-all and written back at the same level, so the JSON keeps
Solr's keys and a property a later Solr version adds is passed on.
One value changes type:
```diff
-"leader": "true"
+"leader": true
```
## Evidence
-
`ClusterServiceTest.getClusterStatus_coercesLeaderAndKeepsUntypedProperties`:
`"leader":"true"` becomes `"leader":true`; `base_url`, `router` and an unknown
top-level section reach the JSON unchanged; no `other` key.
-
`ClusterServiceIntegrationTest.recordsTypeWhatTheToolDescriptionTellsTheModelToRead`
on real SolrCloud: the replica is `active`, `leader` is `true`, `node_name`
equals the live node, `type` is `NRT`, and `base_url` / `router` are kept. The
existing JSON-path tests pass unchanged apart from `leader` now being a boolean.
-
`McpClientIntegrationTestBase.getClusterStatusWritesTheRecordsAsSolrsShape`
(HTTP and STDIO), through Spring AI's serialization: no `other` key, `leader`
is `true`, `node_name` and `base_url` present.
- `ClusterServiceTest.listConfigSets_sortsTheNames`.
- `./gradlew build`: 473 tests, 0 failures, 0 skipped.
- `./gradlew nativeTest -Pnative`: 313 successful, 0 failed; the cluster
integration tests and both MCP `get-cluster-status` checks (HTTP and STDIO)
pass in the native image. The skipped tests are the `@DisabledInNativeImage`
Mockito tests.
## Merge Danger
**Door:** two-way
**Blast Radius:** cluster-consumers
`leader` becomes a boolean, and `list-configsets` returns `{"configSets":
[...]}` instead of a bare array. Both tools are new in #270, so no released
client reads them.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]