Repository navigation
fix(mcp): native reflection gaps and an honest job status - #11
Merged
Merged
Conversation
list_exchanges failed with a bare "HTTP 0" and get_dataset_import answered "Dataset import not found" for every finished import, on the native binary only. - The API's segments and liveSegments are the only uniqueItems arrays of the contract, so they are the only Set fields; Jackson fills a Set with a HashSet it builds reflectively, and that was not registered. Every other collection is a List, which is why nothing else broke. - DatasetImportState was pinned in ReflectConfigTest but the DatasetVersion it holds was not, so its version could not be read and the exception surfaced as "not found". ReflectConfigTest now also walks the fields and member types of every pinned type, which found eight more unregistered types (the enums of Dataset and DatasetVersion, EquityCurveOptions and EquityCurveRequest), and requires HashSet/LinkedHashSet whenever a serialized type holds a Set. The JVM suite cannot run the native image: the registration is checked by name, and the behaviour is to be confirmed on the next tagged native build. Refs api-feedback#66, api-feedback#67.
…a read failed The await future was consumed with exceptionally(), which logs the failure and lets the derived future complete normally. SessionJob.status() then read "done" as COMPLETED, so a run whose preparation the platform rejected showed COMPLETED on every poll with no results behind it. - The failure is now recorded and decides the status first (FAILED, or CANCELED for a cancellation). get_job_status shows the platform's reason as Detail, for runs submitted by this server and for runs read off the platform by exchangeId. The status rule is a pure function so it can be tested without a platform. - getDatasetImport no longer swallows every RuntimeException into "not found"; the tool reports the cause. - submit_backtest and the README no longer imply a kline run can be requested. The SDK's BacktestRequest has no type yet, so a dataset run still prepares ticker data; it now fails visibly instead of looking successful. Adding `type` needs sdk-java first. Refs api-feedback#67, api-feedback#68.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Three bugs reported against the MCP server by an external user, each reproduced against the released 0.20.0 / 0.21.0 binaries.
list_exchangesfailed with a bareHTTP 0on the native binary.segmentsandliveSegmentsare the onlyuniqueItemsarrays of the API contract, so they are the onlySetfields. Jackson fills aSetwith aHashSetit builds reflectively, and that class was not inreflect-config.json. Every other collection is aList, which is why nothing else broke.HashSetandLinkedHashSetare now registered.get_dataset_importanswered "Dataset import not found" for every finished import.DatasetImportStatewas registered but theDatasetVersionit holds was not, andgetDatasetImportturned anyRuntimeExceptioninto "not found". The type is registered and the exception is no longer swallowed: the tool reports the cause.get_job_statusreported a failed run asCOMPLETED. The await future was consumed withexceptionally(), which lets the derived future complete normally, and the status read "done" as completed. The failure is now recorded and decides the status first (FAILED, orCANCELEDfor a cancellation), and the platform's reason is shown asDetail, both for runs submitted by this server and for runs read byexchangeId.ReflectConfigTestalso walks the fields and member types of every pinned type now (before, only the return types ofBacktestingServicewere walked). That found eight more unregistered types (the enums ofDatasetandDatasetVersion,EquityCurveOptions,EquityCurveRequestand its mode enum), which are added. It also requiresHashSet/LinkedHashSetwhenever a serialized type holds aSet.Not in this PR
submit_backteststill cannot request a kline run.BacktestRequestinsdk-javahas notypeand its workflow fixes ticker, so that needs a change and a release there first. Meanwhile the tool description and README say so, and a kline strategy over a dataset now endsFAILEDwith the platform's reason instead of looking successful.[Unreleased]entry in the changelog.Verification
mvn verify(unit tests and the stub integration test) passes: 136 tests, including new tests for the status rule, theDetailrendering, the error propagation ofget_dataset_import, and the extended reflection checks.list_exchanges, andget_dataset_importon a finished import).