mirror of
https://github.com/azaion/gps-denied-onboard.git
synced 2026-06-22 06:51:13 +00:00
[AZ-326] [AZ-327] C12 operator-tool CLI + companion SSH bringup
AZ-326 (3pt): operator-tool Click CLI shell at src/gps_denied_onboard/components/c12_operator_tooling/cli.py with six subcommands (download, build-cache, upload-pending, reloc-confirm, verify-ready, set-sector); SectorClassificationStore (atomic-write JSON under ~/.azaion/onboard/sector-classifications.json); freshness-table lookup driving AC-NEW-6; EXIT_* constants; AZ-266 structured-JSON log wiring to a rotating ~/.azaion/onboard/c12-tooling.log handler; operator-tool console-script entry in pyproject.toml. AZ-327 (3pt): CompanionBringup orchestrator at src/gps_denied_onboard/components/c12_operator_tooling/companion_bringup.py that opens an SSH session against the companion (paramiko per project pin), checks the four pre-flight artifacts (Manifest, expected engines, sha256 sidecars, calibration), and returns a ReadinessReport per description.md S2; CompanionUnreachableError + ContentHashMismatchError with operator-friendly remediation hints; ParamikoSshSessionFactory + RemoteSidecarVerifier (sha256sum + cat over SSH, no bytes pulled to the workstation); paramiko>=3.4,<4.0 dep added. NFR-perf-cold-start fix: PEP 562 lazy __getattr__ in c12_operator_tooling/__init__.py and flights_api/__init__.py defers HttpxFlightsApiClient (httpx), ParamikoSshSession[Factory] (paramiko + cryptography), bbox_from_waypoints / takeoff_origin_from_flight (numpy + pyproj). cli.py imports from leaf flights_api modules. operator-tool --help cold start: ~870ms -> <200ms typical, <500ms p99. Includes 73 unit tests (incl. paramiko-version-drift smoke per AZ-327 Risk 1) + console-script integration test. All 1494 repo-wide unit tests pass; 80 skips are pre-existing environment gates. Batch report: _docs/03_implementation/batch_42_cycle1_report.md. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -82,6 +82,14 @@ dependencies = [
|
||||
# exit. Major-version bound (<4) follows the same pattern as other
|
||||
# third-party deps in this file.
|
||||
"filelock>=3.13,<4.0",
|
||||
# AZ-327 / E-C12: `CompanionBringup` opens an SSH session against the
|
||||
# operator-side companion to verify pre-flight artifacts. Shell-out
|
||||
# to `ssh ...` is forbidden by the spec (security + reliability), so
|
||||
# paramiko is the only allowed transport. Major-version bound (<4)
|
||||
# follows the same pattern as other third-party deps in this file;
|
||||
# the `MissingHostKeyPolicy` subclass surface (RejectPolicy /
|
||||
# AutoAddPolicy) is stable across paramiko 3.x.
|
||||
"paramiko>=3.4,<4.0",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
@@ -111,6 +119,7 @@ telemetry = [
|
||||
|
||||
[project.scripts]
|
||||
gps-denied-replay = "gps_denied_onboard.cli.replay:main"
|
||||
operator-tool = "gps_denied_onboard.components.c12_operator_tooling.cli:main"
|
||||
|
||||
[tool.setuptools]
|
||||
package-dir = {"" = "src"}
|
||||
|
||||
Reference in New Issue
Block a user