Skip to content

vNext Phase 0–1: Articulation test net + lazy public-API facade (ADR-0017/0019) - #147

Merged
KraHsu merged 2 commits into
devfrom
feature/vnext-phase1
May 23, 2026
Merged

KraHsu merged 2 commits into
devfrom
feature/vnext-phase1

Conversation

@KraHsu

@KraHsu KraHsu commented May 23, 2026

Copy link
Copy Markdown
Owner

Phases 0–1 of the vNext architecture refactor. Two concept-separated commits; full suite 488 passed, pyright 0 errors, lint-imports 6/6 kept.

test(entity) — Articulation state/binding test net (ADR-0019 PR-A)

Runtime-free coverage for Articulation via a stateful fake robot handle (no Genesis): bind/enumeration, joint-matching + the four actuator-coverage ValueError paths, joint/root write_*→refresh round-trips, reset, build_per_joint_tensor, implicit-PD write_joint_targets_partial, and empty-env_ids guards. This is the prerequisite regression net gating the Phase 5 decomposition (the graph previously showed only refresh/bind covered).

refactor(lab) — lazy public-API facade + clean-cut surface changes (ADR-0017)

  • PR 1.1 — genelab.lab re-exports lazily: the 8-package import block moves under TYPE_CHECKING (type-only); runtime resolution is a module __getattr__ searching _SOURCE_MODULES (+ __dir__, from __future__ import annotations). import genelab.lab no longer eagerly drags in torch, and a new public symbol in a source package is reachable through lab without editing it. __all__ stays explicit and snapshot-guarded.
  • PR 1.2 — remove GenesisBackendCfg (clean cut, no alias) from lab.py and the genelab.__init__ re-export plumbing.
  • PR 1.3 — hard-rename the env protocol ManagerBasedEnv → ManagerBasedEnvProtocol across all three facades (lab, genelab, genelab.envs), resolving the long-standing collision with the concrete ManagerBasedRlEnv.
  • Adds tests/test_public_api_snapshot.py: pins lab.__all__ (now 76) and extensions.__all__ (9) to inline frozenset baselines, guarding against accidental surface drift.

Reference audits (repo convention)

  • GenesisBackendCfg removal — memory graph in_degree=0, out_degree=0; full-tree grep found only the definition + facade plumbing, no functional consumer (its "used by GeneLab runners" docstring was dead). Clean.
  • ManagerBasedEnv rename — graph in_degree=1, out_degree=0 (re-export edge only); whole-word grep (isolating it from ManagerBasedEnvCfg / ManagerBasedRlEnv) confirmed no annotation/isinstance usage; examples + docs clean. Old name now absent tree-wide.

Verification

ruff clean · pyright 0 errors (full src/genelab) · lint-imports 6/6 kept · full suite 488 passed · public surface guarded at 76 names; GenesisBackendCfg/ManagerBasedEnv no longer resolvable on any facade.

🤖 Generated with Claude Code

KraHsu added 2 commits May 23, 2026 16:39
Runtime-free coverage for Articulation via a stateful fake robot handle:
bind/enumeration, joint-matching + the four actuator-coverage ValueError
paths, joint/root write->refresh round-trips, reset, build_per_joint_tensor,
implicit-PD write_joint_targets_partial, and empty-env_ids guards.

The prerequisite regression net for the Phase 5 decomposition.
…R-0017)

Phase 1 of the vNext refactor:

- PR 1.1: re-export the genelab.lab surface lazily. The 8-package import
  block moves under TYPE_CHECKING (type-only); runtime resolution is a module
  __getattr__ searching _SOURCE_MODULES (+ __dir__, future annotations). So
  `import genelab.lab` no longer eagerly drags in torch, and a new public
  symbol in a source package is reachable through lab without editing it.
- PR 1.2: remove GenesisBackendCfg (clean cut, no alias) from lab.py and the
  genelab.__init__ re-export plumbing. Reference audit was clean (graph
  in_degree 0, no functional consumer).
- PR 1.3: hard-rename the env protocol ManagerBasedEnv -> ManagerBasedEnvProtocol
  across all three facades (lab, genelab, genelab.envs), resolving the
  collision with the concrete ManagerBasedRlEnv. Audit clean (re-export only).

Also adds tests/test_public_api_snapshot.py: pins lab.__all__ (now 76) and
extensions.__all__ (9) to inline frozenset baselines, guarding the surface
against accidental drift.

__all__ kept explicit and snapshot-guarded; suite 488 passed, pyright clean,
import-linter 6/6 kept.
@KraHsu
KraHsu merged commit d72a7e6 into dev May 23, 2026
3 checks passed
@KraHsu
KraHsu deleted the feature/vnext-phase1 branch May 23, 2026 08:43
KraHsu added a commit that referenced this pull request Jun 5, 2026
vNext Phase 0–1: Articulation test net + lazy public-API facade (ADR-0017/0019)
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