feat(scenarios): add HumidiFi state preparation - #16
Open
92Infinitus92 wants to merge 3 commits into
Open
92Infinitus92 wants to merge 3 commits into
92Infinitus92 wants to merge 3 commits into
Conversation
92Infinitus92
force-pushed
the
wip/humidifi-rebuild
branch
from
September 14, 2026 13:29
dd2c404 to
79e1e95
Compare
The Tessera, HumidiFi and GoonFi parameter structs deserialized their fields as snake_case, so a client sending surfnetPort the way the pump, get_template and search_constant_options tools expect it was ignored and the read fell back to port 8899. Scenario tools now share one convention.
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.
HumidiFi markets can now be discovered and prepared through the existing scenario and MCP paths. Adds fair-value, persistent-freshness, stale-quote and liquidity scenarios, with an explicitly selected market and guarded raw-layout writes. Fair-value scenarios fetch the market before Play, then keep its quote fresh locally.
Stacked on #15 (
feat/scenarios/raw-layout). Reuses its raw-layout materializer and registry loader, adding an optional eight-byte XOR mask for HumidiFi account fields.Validation:
cargo fmt --all -- --checkcargo test --offline --workspace --features surfpool-core/ignore_tests_ci -- --test-threads=1: 943 passed, 0 failed, 66 ignored.cargo test --offline -p surfpool-core --features integration-tests tests::humidifi -- --test-threads=1 --nocapture: 10 passed, including deployed-program swap and exact account-byte checks.cargo clippy --offline --workspace --all-targets: exit 0, existing warnings.cargo build --offline --release --features supervisor_ui: exit 0.The live integration tests execute the deployed HumidiFi program in the test VM through the documented DFlow test wrapper.
Greptile Summary
Adds HumidiFi market discovery and scenario preparation through the existing scenario, HTTP, and MCP paths.
Confidence Score: 5/5
The PR appears safe to merge, with no unresolved correctness, security, contract, or repository-rule findings.
The latest changes consistently expose HumidiFi MCP parameters in camelCase across deserialization, generated schemas, tests, and documentation. Both previous findings were resolved after Greptile conceded that caller-side reads hydrate the relevant accounts before Play, so neither remains outstanding.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart LR Client[MCP or scenario client] --> Discover[list_humidifi_markets] Discover --> RPC[Surfnet RPC] RPC --> Validate[Validate owner, layout tag, schema, and mints] Validate --> Select[Explicit market selection] Select --> FairValue[Build fair-value scenario] Select --> Liquidity[Build liquidity scenario] FairValue --> Overrides[Raw-layout price and persistent freshness overrides] Liquidity --> Overrides2[Vault balance and persistent freshness overrides] Overrides --> Play[Scenario Play] Overrides2 --> PlayReviews (4): Last reviewed commit: "fix(mcp): take camelCase tool arguments ..." | Re-trigger Greptile