Repository navigation
Audit the public API and dependencies before M2 - #83
Conversation
Fifteen names that only ssrobot's own modules or repository tooling use leave the top level and stay importable from their modules, so ssrobot exports 71 names instead of 86. contracts.md lists the public surface by who uses it. The dependency gate can write an import report, which the installed-wheel job uploads. Decision record 0001 gives the method, each disposition, the baseline gate measures, and defers legacy dispositions to the M5 migration. MobileBase and BaseTwistCommand, which have no consumer, go to #82. Closes #32
|
The audit is well scoped and the dependency evidence is useful, but two boundary fixes are needed before merge.
Local verification on the PR head is otherwise clean: 50 tests pass; Ruff formatting and lint, strict mypy, schema drift, and the dependency/import report all pass. GitHub's installed-wheel and Python 3.13 jobs also pass. The Python 3.11 and reference-robot jobs were cancelled with no steps after waiting for runners, so they should be rerun rather than treated as test failures. |
Every type a public name accepts, returns, or exposes is now public: AssetStore, Value, PackageManifest, and SourceItem stay top-level, and the manifest parts, model format, resolved files, and inference types join them, giving 87 names. dumps and loads are typed against Value and Record rather than the private Struct base. The dependency gate fails on any non-public type the API exposes. The architecture and the audit name Opendubs in M2 (#85) as the first consumer of MobileBase and BaseTwistCommand. Closes #84
|
Addressed both in 0d09224.
Verified: ruff, |
Outcome became a top-level name in this audit and says nothing on its own. CandidateOutcome matches Candidate, CandidateKind, and CandidateChoice. The enum values, and so the wire form, are unchanged; only the generated description text in two schemas names the new class.
Closes #32
Closes #82
Closes #84
Refs #85
This applies the milestone consolidation gate to the surface M1 shipped, before M2 adds to it. The full record, covering method, each disposition, dependencies, baseline measures, and legacy code, is docs/decisions/0001-m1-public-api-audit.md.
Public names: 86 → 87, now closed
Two rules decide the top level:
11 names left:
check_command,check_request,check_observation,check_applied;json_schema,record_types,encode,decode;InstantCommand,RuntimeEvent,TraceSink, whose members are all public.12 names joined, because public results already exposed them and the old list omitted them:
RobotPackage.manifestandPackageReport.model_format:ModelEntry,ModelFormat,ProfileEntry,FileEntry,InferenceSettings,InferenceMode,CandidateChoice;RobotPackage.filesandPackageReport.files:ResolvedFile;RobotPackage.inferenceandPackageReport.inference:InferenceReport,Candidate,CandidateKind,CandidateOutcome.The candidate outcome enum was renamed from
OutcometoCandidateOutcome, becausessrobot.Outcomesays nothing on its own. Its values, and so the wire form, are unchanged; only the generated description text in two schemas changes.AssetStore,Value,PackageManifest, andSourceItemstay.dumpsandloadsare now typed againstValue | Recordinstead of the privateStructbase. The round-trip test encodes and decodes observations containingArrayValueusing only top-level imports.contracts.md has a Public surface section that owns the list of 87 names, grouped by who uses them, and states the closure rule. The only public interfaces beyond them are the
ssrobot.conformancemodule and thessrobotcommand.MobileBaseandBaseTwistCommand: kept for OpendubsNeither Geodude nor ADA has a mobile base. Opendubs, with two OpenArm manipulators, a pan-tilt head, and a mecanum base, is their first external consumer, in M2 (#85). Both
docs/architecture.mdand the decision record name it. If #85 has not used them by the M2 gate, that gate removes them. Mobile-base inference (#71) stays deferred.Dependencies and evidence
scripts/check_core_imports.pygains a fourth check, closure. It walks every public name's parameters, return values, fields, and properties transitively, and fails on any package type that is not public.AssetStore,PackageManifest, andSourceItemremoved from__all__, it reports exactly those three, reached fromloadsandload_package.--report PATHwritesimports.json, with the requirements, the non-standard-library modules loaded, the submodules, the public names, and any failures. Theinstalledjob writes it from the clean wheel install and uploads it withinstalled-conformance.Legacy code
The dispositions for
mj_manipulator,mj_environment, and the asset manager are deferred to #30 (M5). M1 adds nothing that replaces them, and the gate requires #30 to name what it retires.Verification
ruff format --check,ruff check,mypy --strict, andgit diff --checkare clean.ssrobot.__all__: 87 names, no duplicates, no difference.