Skip to content

feat(robsond): entry pipeline observability + debug endpoint#82

Closed
ldamasio wants to merge 2 commits into
mainfrom
feat/entry-pipeline-observability
Closed

feat(robsond): entry pipeline observability + debug endpoint#82
ldamasio wants to merge 2 commits into
mainfrom
feat/entry-pipeline-observability

Conversation

@ldamasio

Copy link
Copy Markdown
Owner

Summary

  • Add entry-immediate observability with structured logging throughout entry pipeline
  • Add debug endpoint for entry state inspection
  • Refactor query engine and reconciliation worker for better traceability
  • 18 files changed, ~780 insertions

Test plan

  • Verify structured entry logs appear in robsond output
  • Hit debug endpoint and confirm entry state is returned correctly
  • Run cargo test — all existing tests pass

🤖 Generated with Claude Code

Codex and others added 2 commits May 13, 2026 16:51
Structured tracing for the immediate+automatic entry flow to diagnose
positions that reach Armed state but never place orders on the exchange.

Changes:
- Add `flow = "entry_immediate"` tag to all logs across detector,
  position_manager, and executor covering the full path from ARM to
  order placement.
- Classify OHLCV errors in detector (timeout, exchange, technical_stop)
  for faster root-cause identification.
- Log first matching market-data tick per detector to confirm data flow.
- Add `GET /debug/armed-positions` read-only endpoint returning detector
  task presence/finished state, stored entry policy, and last market
  data timestamp per symbol.
- Track last market data timestamp per symbol in PositionManager.
- Document trace sequence and debug endpoint in AGENTS.md and CLAUDE.md.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…ability

- Update CHANGELOG.md with entry pipeline observability additions.
- Add GET /debug/armed-positions to README API reference.
- Remove duplicate detector_task_finished log (was logged twice
  consecutively after spawn and after HashMap insert).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@ldamasio

ldamasio commented Jun 2, 2026

Copy link
Copy Markdown
Owner Author

Closing without merge after value-risk review.

The initial split idea was to separate:

  • observability-only changes;
  • /debug/armed-positions and related debug state.

After a stricter value-risk review, we should not proceed with that split.

Findings:

  • the PR adds no meaningful new metric or trace signal; the apparent metrics change is mostly churn/reformat around existing behavior;
  • durable observability value collapses to a very small set of detector diagnostics;
  • the /debug/armed-positions endpoint exposes operational trading state and must not land without a proper admin/access model;
  • even the observability-only part includes info-level logging of sensitive operational fields such as symbol, side, account_id, entry mode, approval mode, entry price and stop loss;
  • this is not aligned with the future Robson v4 / rbx-identity direction, where tenant/account scoping, admin/operator roles, redaction and auditability must be designed first.

Decision:

Close this PR entirely. Do not split and merge #82a by inertia.

Follow-up:

Create a new design issue for Robson administrative observability/debug access model, aligned with:

  • rbx-identity;
  • tenant_id / trading_account_id scoping;
  • admin/operator roles;
  • public vs admin vs debug API separation;
  • redaction policy;
  • audit logging;
  • break-glass policy;
  • safe metrics/logging rules;
  • local/testnet-only debug gating.

Only if there is an active incident around immediate-entry diagnostics should we open a new tiny PR with just the minimal detector signals, without endpoint, debug state, broad lifecycle logs, docs churn or sensitive info-level logging.

Closing without merge.

@ldamasio ldamasio closed this Jun 2, 2026
@ldamasio ldamasio deleted the feat/entry-pipeline-observability branch June 2, 2026 19:49
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