Skip to content

Report-only observation policy and leap hw stop cli - #58

Merged
wangxingjun778 merged 39 commits into
mainfrom
feat/mhs
Nov 18, 2026
Merged

wangxingjun778 merged 39 commits into
mainfrom
feat/mhs

Conversation

@wangxingjun778

Copy link
Copy Markdown
Member

Features

  • Report-only observation policy (hardware.observation): soft bounds, confirmation/recovery dwell, adaptive noise margin from fresh samples, per-device/per-channel overrides. Never grants write authority or changes task accuracy; channel bounds are checked at admission.
  • leap hw stop: gracefully stops the local LHP node — profile-scoped discovery from node records (plus Linux /proc fallback for legacy nodes), stop through the owning systemd unit or an identity-revalidated SIGTERM (pidfd), waits for node and workers, refuses ambiguous targets, never auto-SIGKILLs.
  • Observation episodes on events: entry/recovery/reminder phases with persisted notification checkpoints, so backoff, dedup, and "still active" state survive watch and daemon restarts.
  • New hardware/observation.py unifies policy validation, episode confirmation, and bounded dispersion shared by detection and advisory reporting.

Enhancements

  • Findings derive from active detector conditions instead of chart churn; snapshots stay INFO unless storage write failures or sampling shortfall are known.
  • Digest payload fitting discloses omissions (*_omitted) and refuses to persist an oversized frame instead of writing it silently.
  • device_busy refusals name the actual owner (session, control loop, transaction, unsettled dispatch) and the correct remedy.
  • Reading now carries sequence_scope, acquisition_at, acquisition_epoch; every transport declares its own scope.

Fixes

  • Physical rate and sample-loss detection no longer trust poll counters, device-wide sequence numbers, or remote arrival timing.
  • Alert policy evaluates raw sample evidence before presentation pacing and ignores RECORD-class warnings, so rate flooring cannot suppress a guard.
  • Staleness is judged before any await can delay a hard guard; comm loss invalidates observation evidence rather than leaving it "healthy".
  • Node shutdown runs through an AsyncExitStack, so one failing closer cannot skip remaining cleanup; completeness is recorded.
  • TargetNotSent separates pre-target motion failures from target refusals, removing a false "effect unknown" verdict.
  • Calibration invalidation is ordered by pointer-journal revision (chronology, not digest) and covers undelivered events for all affected devices.
  • Config hot reload retains the last valid policy instead of failing the whole reload.
  • Piper gripper reports signed force as explicitly unqualified and withholds stroke in angle mode.

Docs

  • README: leap hw stop usage, graceful-shutdown scope (not power-off; holding torque/grip unverified), resume instructions.
  • New hardware.observation config field description including hot-reload semantics.

Tests

  • New tests/test_hw_stop.py; expanded stream, observability, piper, LHP, leapcalib, and config coverage.

wangxingjun778 and others added 30 commits October 13, 2026 16:50
Add grouped freshness, typed health signals, optional ROS previews and native-depth encoders. Drain daemon clients during graceful shutdown and cover ownership, release, and restart paths with regression tests.
Signed-off-by: 班扬 <xingjun.wxj@alibaba-inc.com>
- Stop tracking .qoder/ (Qoder agent scratch space: build artifacts, repo snapshots and vendored wheels, ~70MB) and ignore it going forward. Local files are retained.
- Map the tooling-mislabeled "Cheney Zhang <chen.zhang@zilliz.com>" author, written by a commit skill that hardcoded --author, to the committer's real identity via .mailmap. Published history on main and the release branches is deliberately not rewritten.

Signed-off-by: wangxingjun778 <wangxingjun778@163.com>
The 18 commits whose author field was overridden by the commit skill are now rewritten in history, so the display-layer alias is dead weight.

Signed-off-by: wangxingjun778 <wangxingjun778@163.com>
- add report-only observation policy (soft bounds, confirmation, adaptive
  noise margin) with hot reload; hard envelope and write authority unchanged
- attach observation episodes to hardware events; persist notification
  checkpoints so findings survive watch/daemon restarts
- evaluate raw sample safety evidence before presentation pacing
- qualify physical rate on source acquisition epochs and declared sequence
  scopes instead of poll counters or host arrival timing
- add `leap hw stop`: node record discovery, systemd-owned or SIGTERM stop
  of the local LHP node with ordered cleanup and no automatic SIGKILL
- report unsettled effect causes in device-busy refusals; mark Piper gripper
  force as an unqualified SDK report and split target-not-sent from
  target-refused motion failures
@wangxingjun778
wangxingjun778 merged commit 5353156 into main Nov 18, 2026
1 of 2 checks passed
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