feat(stage2-phase2): structlog hot-path, pytest markers, obs package

Phase 2 deliverables not yet committed from plan execution:
- structlog wired to 10 hot-path files (orchestrator, eskf, components)
- bind_contextvars(correlation_id=frame_id) in process_frame
- obs/logging_config.py: configure_logging(env) JSON/console renderer
- pyproject.toml: structlog>=25.1, --strict-markers, 6 markers registered
- tests/conftest.py: ac(id) validator plugin + pytest_collection hooks

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Yuzviak
2026-05-11 19:06:47 +03:00
parent 7f76acfe29
commit 7e64ef8d2b
15 changed files with 286 additions and 78 deletions
+14 -1
View File
@@ -17,9 +17,11 @@ dependencies = [
"diskcache>=5.6",
"numpy>=1.26,<2.0", # NumPy 2.0 silently breaks GTSAM Python bindings (issue #2264)
"opencv-python-headless>=4.9,<4.11", # 4.11+ requires numpy>=2.0 (incompatible with GTSAM)
"orjson>=3.10",
"gtsam>=4.3a0",
"pymavlink>=2.4",
"pyyaml>=6.0",
"structlog>=25.1,<26",
]
[project.optional-dependencies]
@@ -53,8 +55,19 @@ select = ["E", "F", "I", "W"]
[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
# --strict-markers makes unregistered @pytest.mark.<x> fail collection rather than warn.
# Per Phase 2 / TEST-02 contract; do not weaken without an explicit Phase 2 retrospective entry.
addopts = "--strict-markers"
markers = [
"e2e: end-to-end test against a real dataset",
# Phase 2 / TEST-01 taxonomy
"unit: pure-math or single-class test; only mocks; no I/O / no real DB / no real engines / no SITL; runs in <1s",
"integration: cross-subsystem (in-memory SQLite, ASGI transport, full FlightProcessor wiring across >=3 real components); no external process",
"blackbox: validates an external contract (e.g. MAVLink GPS_INPUT wire encoding per MAVLink #232) without a live producer",
"sitl: requires ARDUPILOT_SITL_HOST env var; talks to an ArduPilot SITL process over MAVLink; nightly-only",
"e2e: full-pipeline run against a real dataset (EuRoC, VPAIR, MARS-LVIG, Azaion) or its synthetic stand-in via E2EHarness; nightly-only",
# Phase 2 / TEST-03 traceability
"ac(ac_id): link test to one or more Acceptance Criteria (e.g. AC-1.1, AC-NEW-3); validated against _docs/00_problem/acceptance_criteria.md by scripts/gen_ac_traceability.py",
# Pre-existing (kept verbatim)
"e2e_slow: e2e test that takes > 2 minutes, nightly-only",
"needs_dataset: test requires an external dataset to be downloaded",
]