Port bootstrap mixed-output planner to Rust kernel#88
Merged
Conversation
Move plan_bootstrap_mixed_outputs into greenfloor-signer with PyO3 bindings that return existing Python DTOs, and extend bootstrap/runtime parity tests. Co-authored-by: Cursor <cursoragent@cursor.com>
Use output_amounts_base_units in signer mixed-split, add offer_bootstrap_bridge per ADR 0011, tighten PyO3 coercion, and collapse offer PyO3 registration. Co-authored-by: Cursor <cursoragent@cursor.com>
Add offer_bootstrap_policy and runtime split helpers, strict PyO3 coercion, single-output planner tests, and drop the artificial two-output gate. Co-authored-by: Cursor <cursoragent@cursor.com>
Separate BootstrapKernelProtocol, bundle mixed-split inputs in BootstrapSplitExecution, validate non-negative ladder/coins in Rust, and use MarketLadderEntry-only ladder shaping in runtime. Co-authored-by: Cursor <cursoragent@cursor.com>
Map ready/underfunded/invalid states to distinct phase reasons, require PlannerLadderRow and BootstrapCoin at PyO3, and split bootstrap registration into offer_bootstrap_py with typed preflight orchestration. Co-authored-by: Cursor <cursoragent@cursor.com>
Extract BootstrapRuntimeDeps, move phase mapping onto BootstrapPlanOutcome, tighten BootstrapKernelProtocol types, document bridge coin coercion, and test underfunded skips block offer posting. Co-authored-by: Cursor <cursoragent@cursor.com>
Early and executed phase status/reason/ready now live in the signer kernel; Python keeps DTOs and I/O while orchestration uses BootstrapPhaseResult. Co-authored-by: Cursor <cursoragent@cursor.com>
Pass typed planner outcomes through PyO3, use bare failure reasons with a single block-error prefix, typed BootstrapPlan on phase results, and unified BootstrapRuntimeDeps injection. Co-authored-by: Cursor <cursoragent@cursor.com>
Match planner outcomes directly in Rust, add preflight factories and skip helper, and centralize manager dict serialization away from policy gates. Co-authored-by: Cursor <cursoragent@cursor.com>
Split Rust planner/phase and PyO3 marshalling, consolidate stable bridge imports, enforce BootstrapPlanOutcome invariants, and document fee vs phase ownership. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Summary
greenfloor-signer(offer/bootstrap/planner.rs,offer/bootstrap/phase.rs) with PyO3 exposure viaoffer_bootstrap_py.rsandpy_utils/bootstrap_marshal.rs.greenfloor/runtime/offer_bootstrap.py; slimoffer_runtime.pyand type orchestration withBootstrapPhaseResult,BootstrapPreflightOutcome, andBootstrapRuntimeDeps.core.offer_bootstrap_bridgeas the stable import path (DTOs + kernel wrappers); normalize block-error reasons (bare phase reasons, singlebootstrap_failed:prefix frombootstrap_block_error).Test plan
cargo test bootstrapingreenfloor-signerpytest tests/test_offer_bootstrap.py tests/test_offer_runtime.py tests/test_offer_orchestration.pypre-commit run --all-filesto_manager_dict()at the JSON boundaryMade with Cursor