1.9 KiB
1.9 KiB
AD-002: Deepen Node startup orchestration
- Status: needs-triage
- Priority: p1
- Dependencies: AD-001
- Evidence:
run_startup()inpackages/node/meshnet_node/startup.pyhas cyclomatic complexity 101, a broad caller-facing parameter surface, and coordinates hardware, wallet, assignment, artifacts, server construction, capability proof, and Tracker registration.
Objective
Create a deep Node startup module with explicit immutable startup intent and one execution seam, so callers and tests do not need to understand the full startup sequence.
Constraints
- Retain the existing explicit capability-validator adapter used by tests.
- Preserve current CLI behavior, registration data, startup ordering, and Transformers behavior.
- Keep native-worker supervision out of scope: DGR-040 owns it. The result may expose a phase where DGR-040 can later attach, but must not implement that worker supervision.
Acceptance criteria
- Characterization tests pin successful startup, capability refusal before registration, assignment behavior, and failure classification.
- The public startup interface accepts a cohesive intent/plan rather than leaking orchestration details across callers.
- Hardware/assignment, artifact/server, and proof/registration behavior are internally ordered and individually testable through internal seams.
- Existing
tests/test_node_startup.py,tests/test_node_admission.py, and mining CLI tests retain behavior. pytesttargeted tests andpython -m compileall packages testspass.
Likely files
- Modify:
packages/node/meshnet_node/startup.py,packages/node/meshnet_node/testing.py,packages/node/meshnet_node/cli.py - Modify/add:
tests/test_node_startup.py,tests/test_node_admission.py,tests/test_mining_cli.py
Non-goals
No new backend type, no Tracker placement algorithm change, and no native-worker process supervision.