Skip to content

report: add truthful portfolio stoploss observations - #371

Open
Pigbibi wants to merge 1 commit into
mainfrom
report/portfolio-stoploss-observation
Open

Pigbibi wants to merge 1 commit into
mainfrom
report/portfolio-stoploss-observation

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

Scope

Report-only visibility for the legacy portfolio unrealized-PnL stoploss. Related to #369; this does not fix or close the stoploss gap.

  • Add independently preserved pre/post-trade observations with explicit not_evaluated/unknown states.
  • Separate cost-input coverage from enforcement evidence; counts cover the filtered strategy-member snapshot, not whole-account asset value.
  • Recognize only reviewed installed Git revisions, catalog wrapper and MEMBER v2 contract; unknown/editable provenance stays unknown. Never infer passed from APPROVE or complete costs.
  • Strictly whitelist labels/counts; no new account identifiers, symbols, balances, PnL values or arbitrary metadata. Observer/projection failures fall back to redacted unknown.
  • Preserve decisions, order/cycle callbacks, report status, notifications and existing strategy-level stops/circuit breakers.

Verification

  • Focused synthetic tests: 79 passed, 35 subtests.
  • Full pytest: 1507 passed, 224 subtests.
  • CONTRIBUTING unittest discovery: 488 tests, OK.
  • Full-repository ruff, compile checks, git diff --check and uv lock --check passed.
  • Independent review: no remaining actionable findings after adding failure isolation.
  • Test-only writable UV cache/Python directories were used because the default home cache is read-only.

No live account, actual notifications, trading workflow, production branch update, merge or deployment. Pins and trading/research behavior are unchanged. CI run 980 completed successfully for head 836d9ec8a5fbb68287dcc9c13a44c84dc2689b62, including compile, ruff, QPK pin/lock consistency, and the full unit-test step.

See docs/portfolio-stoploss-observation.md for semantics and dependency-upgrade limitations.

@Pigbibi
Pigbibi marked this pull request as ready for review October 11, 2026 13:24

This branch has not been deployed

No deployments
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