Skip to content

Configure mover exit chains and registered exit parameter bounds - #1017

Merged
seathatflowsinourveins merged 1 commit into
mainfrom
foundation/mover-exit-chain-20261011
Oct 11, 2026
Merged

seathatflowsinourveins merged 1 commit into
mainfrom
foundation/mover-exit-chain-20261011

Conversation

@seathatflowsinourveins

@seathatflowsinourveins seathatflowsinourveins commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

Scope

Mover configurations can now select an exit chain such as ["X3", "X2"], so
a trailing exit or first-fill time limit can fire. Simultaneous triggers use
the existing adaptive precedence: X1 calendar force, X4 stop/TP, X3 trail,
then X2 time. X2 hold and X3/X4 price ratios become bounded config fields;
legacy scalar exits and the 3600/0.85/0.85/1.50 defaults retain their behavior.

  • Base commit: 99e72aeff932fce30069092b1763736cb9e64c1b.
  • Lane: lane:trading.
  • Owned paths: mover config/evaluator/plan fields, runner parameter receipt
    and synthetic X1 activation, README, new regression tests, and their current
    source/evidence hashes. RiskLimits, quote-freshness checks and exit pricing
    are outside this change; the parallel freshness PR owns those paths.

SOTA sources

  • Registered bounds: SIM-MOVER-1-GRID-2, us-equities-trading
    ebdc4d69b5c71b258485ee94aa1789b8c5646d01:GRID-2-AMENDMENT.json,
    SHA256 2f67ad1c0ecd6b09df3bb098e43ef769310f29c5568aebca2c25da0f0ab06738.
    Hold interval 900–3600 s, trail ratio 0.80–0.97; registered stop bps
    1000–1500 convert to X4 ratios 0.85–0.90, and TP bps 2500–5000 to
    ratios 1.25–1.50. These are candidate [C] bounds, not a selected winner.
  • Order and first-match semantics: native-agent-stack
    exits.py:161-168,216-223
    at 1e6a49ffe8652918479e59bcb3751c0eb418e6d3.
  • Compatibility references at the same pin: mover.py:75-79,936-954 for
    legacy ratios/hold/evaluation; mover_runner.py:471-499 for receipt keys
    and types; safety.py RiskLimits.frozen_json for the omission/byte-stability
    principle. This PR adds no RiskLimits fields or serialized limit keys.
  • Runtime: the existing NautilusTrader 2.0.0rc5 / alpaca-py 0.44.0
    installation and its repository native-mover harness. No new dependency,
    broker adapter, model or order transport is introduced.

Evidence-class table

Claim Evidence class Command / receipt
Chain ordering/OR triggers, field outcomes, finite interval refusal synthetic New 14-case regression module; all 14 pass in native runtime
Every new regression fails on the main baseline synthetic Immutable Git-object baseline driver: 14/14 fail against 99e72ae; driver exit 0 verifies this expected red result
Legacy receipt formatting and frozen ledger-limit bytes preserved synthetic / retained fixture Explicit default values, including equivalent Decimal spellings, compare byte-for-byte with absent fields; full retained RTH receipt re-emitted through changed projection/save boundary matches its original bytes
Native chain selects time or trail first and ends flat synthetic Actual Nautilus LiveNode/controller/ledger with a local synthetic port, both event sequences pass; no broker/network/credential acceptance
Bounds belong to a preregistered source, not an optimized setting source_review GRID-2 Git blob hash and full_ranges inspected; the insufficient-sample rule keeps PRE's configured X3

Local commands run

python3 -m unittest tests.test_mover_exit_chain -q
exit 0; 14 tests, 1 optional-native skip on system Python

# Existing native runtime, NautilusTrader 2.0.0rc5 / alpaca-py 0.44.0:
python -m unittest tests.test_mover_exit_chain -q
exit 0; 14 tests, no skips

python -m unittest tests.test_mover_exit_chain tests.test_adaptive_paper_mover tests.test_adaptive_paper_mover_native -q
exit 0; 118 tests, no skips

# main-regressions.py in the co-op review packet; reads main modules from Git,
# never overwrites the checkout or mirrors:
python main-regressions.py CHECKOUT 99e72aeff932fce30069092b1763736cb9e64c1b
exit 0; verifies all 14 new tests fail on the unchanged main modules

python3 scripts/evidence_manifest.py --check
exit 0

git diff --cached --check
exit 0

python3 scripts/validate.py
exit 0; 70 components, 4 profiles, 239 receipts, 11,633 hashed files

Full validation passed after staging the final hashes. Source/evidence hashes cover
the changed runtime/docs and new tests; historical execution receipts are
preserved.

Decision record

The CC's rule-7 interim mover-chain direction, trading-cc's scoped direction,
and registered GRID-2 supply this change. The wider adaptive T15 policy
research remains a separate item. Array order enables rules rather than
changing protective priority. X3's high remains seeded from entry fills;
the separately proposed bid-only design is not adopted here. The synthetic
CLI retains its explicit accelerated --hold-seconds timing override.

Host evidence

No host-receipt files are changed. All new execution claims are synthetic.

Follow-ups

  • Astra FIRST read at 33d2ab61 ACK, P3 verification gap: her sandbox runs 14 cases with the native case skipped and reproduces 13/14 expected main-baseline failures, so it independently verifies neither native 14/14 claim. Retain the native head and main-baseline transcripts with skip counts and dependency versions in the read packet; this gap does not establish that the reported author runs are false (tests/test_mover_exit_chain.py:243).
  • Astra P3 source-packet gap: retain hashed captures of exits.py, mover.py, mover_runner.py and safety.py at native-agent-stack 1e6a49ffe8652918479e59bcb3751c0eb418e6d3 under extra/, and register project mirrors or document the accepted exact-object source location. Astra checked the ordinary repositories' exact objects and found the citations supported; GRID-2 is captured and hash-verified, while those four independent captures are missing (body source citations; mover.py:82).
  • Astra P3 lifecycle boundary: completed/check receipts record the effective chain and four parameters; early refusal, starting and recovery artifacts carry narrower policy information, chiefly config hashes, and recovery flattens rather than resuming that policy (mover_runner.py:679,684,738,804,896). If independent reconstruction is required for those artifacts, add a separately scoped policy snapshot and startup/crash regression; no defect was demonstrated in this PR's completed-run projection.
  • Astra P3 hostname hygiene: the full evidence manifest has 20 pre-existing occurrences across 18 lines; the patch has 0. Report counts only. Any desired normalization belongs to a separate historical-record change under the CC's non-blocking hostname ruling; Astra found 0 blocking privacy hits in the changed scope.
  • An earlier combined runtime run emitted two cross-thread drop diagnostics for PyStrategy/PyNodeRun during cleanup (116 passed/exit 0); final 118-case run passed with no such diagnostic. Retain the earlier occurrence for upstream/test-lifecycle triage; do not infer broker acceptance from these synthetic runs.
  • Widened T15 research, grid analysis and any later parameter selection proceed under their own recorded readiness inputs; this PR keeps existing PRE defaults.
  • If the freshness PR lands first, take the CC-cued single conflict-only rebase and reconcile overlapping current-file hashes before landing.

Checklist

  • No Actions/workflow changes.
  • No credentials, tokens or new required secrets introduced.
  • No paid service or new billing surface introduced.
  • Peer-owned files/worktrees preserved; held arithmetic commit remains on its separate local branch.

@seathatflowsinourveins seathatflowsinourveins added the lane:trading Trading lane: sim, paper and live north star label Oct 11, 2026
@seathatflowsinourveins
seathatflowsinourveins marked this pull request as ready for review October 11, 2026 19:54
@seathatflowsinourveins
seathatflowsinourveins merged commit 0f00a1a into main Oct 11, 2026
36 checks passed
@seathatflowsinourveins
seathatflowsinourveins deleted the foundation/mover-exit-chain-20261011 branch October 11, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lane:trading Trading lane: sim, paper and live north star

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant