feat(scenarios): add Tessera state preparation - #11
Conversation
|
26dd7ea to
8539d42
Compare
|
No actionable findings in the reviewed diff. The previously reported RPC-target issue is fixed at Tests could not run because Rustup attempted to write outside the permitted workspace. |
8539d42 to
c6449f5
Compare
|
Tessera is a proprietary market maker with no IDL, so its market accounts are written through the raw byte layout the BisonFi work introduced. Eight templates cover price, depth, curve, halt, staleness and freshness. The market catalog lists all 26 live markets with their mints, decimals and freshness limit, so the UI constrains the choice and a model can resolve one through search_constant_options. One builder exists, for the only thing a template cannot express: turning a human price into the pair of reciprocal atomic ratios, which needs both mints' decimals.
c6449f5 to
d18d14f
Compare
|
No actionable issues found in the PR changes. Focused tests could not run because Rustup attempted to write under the read-only |
Replace the static market catalog with on-chain discovery and add exact depth preparation with live swap coverage. Accept decimal u64/i64 overrides through the IDL encoder for lossless Studio editing.
|
No concrete bugs found in the specified PR range. One testing improvement: add a local RPC test for Tests could not run: the pinned toolchain required a write outside the sandbox, and the installed toolchain’s offline dependency cache lacked |
The live fetch retry loop discarded each intermediate error and panicked with only the last one. Collect every attempt and include them in the panic so a persistent failure is diagnosable.
Static review only; live tests were not run. |
| #[schemars( | ||
| description = "The port of the target running local surfnet instance (e.g., 8899, 18899, 28899, etc.). Omit to use the default port, 8899." | ||
| )] | ||
| pub surfnet_port: Option<u16>, |
There was a problem hiding this comment.
CamelCase port argument ignored
When an MCP caller sends the documented surfnetPort argument for a dynamically allocated Surfnet, this parameter struct expects surfnet_port instead, so the request is rejected or the value remains absent and account reads fall back to port 8899. This recreates the wrong-Surfnet failure the new parameter is intended to fix; the Tessera parameter structs should use the same camelCase serde convention as the analogous Pump tool.
Prompt To Fix With AI
This is a comment left during a code review.
Path: crates/mcp/src/surfpool/mod.rs
Line: 61-64
Comment:
**CamelCase port argument ignored**
When an MCP caller sends the documented `surfnetPort` argument for a dynamically allocated Surfnet, this parameter struct expects `surfnet_port` instead, so the request is rejected or the value remains absent and account reads fall back to port 8899. This recreates the wrong-Surfnet failure the new parameter is intended to fix; the Tessera parameter structs should use the same camelCase serde convention as the analogous Pump tool.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Stacked on #8 — Tessera is the same mechanism class as BisonFi (PMM, no IDL) and reuses the raw-layout engine it introduced.
create_tessera_fair_value_scenario, on the generic scenario path. No protocol HTTP endpoints.monitoring.yamlis documentation only: the program-upgrade fingerprint and the catalog refresh procedure.Greptile Summary
The PR adds declarative Tessera market-state scenarios, live market discovery, fair-value and depth builders, and MCP tooling for creating those scenarios.
Confidence Score: 4/5
The PR needs the Tessera MCP parameters to accept the advertised
surfnetPortname before merging, otherwise dynamic-Surfnet requests can still target the default RPC.The Tessera account reads correctly propagate the parsed port, but their new parameter structs expose snake_case while the stated fix and analogous scenario tool use camelCase, leaving the original wrong-target behavior reachable for callers sending
surfnetPort.Files Needing Attention: crates/mcp/src/surfpool/mod.rs
Important Files Changed
Prompt To Fix All With AI
Reviews (6): Last reviewed commit: "test(tessera): surface all retry errors ..." | Re-trigger Greptile