Skip to content

Port bootstrap mixed-output planner to Rust kernel#88

Merged
hoffmang9 merged 11 commits into
mainfrom
feat/bootstrap-planner-rust
May 29, 2026
Merged

Port bootstrap mixed-output planner to Rust kernel#88
hoffmang9 merged 11 commits into
mainfrom
feat/bootstrap-planner-rust

Conversation

@hoffmang9

Copy link
Copy Markdown
Owner

Summary

  • Move bootstrap mixed-output planning and early/executed phase policy into greenfloor-signer (offer/bootstrap/planner.rs, offer/bootstrap/phase.rs) with PyO3 exposure via offer_bootstrap_py.rs and py_utils/bootstrap_marshal.rs.
  • Extract signer bootstrap I/O into greenfloor/runtime/offer_bootstrap.py; slim offer_runtime.py and type orchestration with BootstrapPhaseResult, BootstrapPreflightOutcome, and BootstrapRuntimeDeps.
  • Add core.offer_bootstrap_bridge as the stable import path (DTOs + kernel wrappers); normalize block-error reasons (bare phase reasons, single bootstrap_failed: prefix from bootstrap_block_error).

Test plan

  • cargo test bootstrap in greenfloor-signer
  • pytest tests/test_offer_bootstrap.py tests/test_offer_runtime.py tests/test_offer_orchestration.py
  • pre-commit run --all-files
  • Live signer bootstrap on testnet (mixed-split when ladder deficits exist)
  • Confirm manager/orchestration payloads still serialize via to_manager_dict() at the JSON boundary

Made with Cursor

hoffmang9 and others added 11 commits May 28, 2026 22:17
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>
@hoffmang9 hoffmang9 marked this pull request as ready for review May 29, 2026 06:09
@hoffmang9 hoffmang9 merged commit 7e85d33 into main May 29, 2026
3 checks passed
@hoffmang9 hoffmang9 deleted the feat/bootstrap-planner-rust branch May 29, 2026 06:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant