feat(coverage): sdk-coverage.v1.json per-capability snapshot (#182) - #183
Conversation
Publish compatibility/sdk-coverage.v1.json, mapping this SDK's client source to honua-server's canonical capability key vocabulary (capability-keys.v1.json, honua-server#2893) for the cross-product capability matrix (honua-server#2892). - scripts/gen_sdk_coverage.py hand-curates 29 covered/partial keys (of 110 canonical keys) after a full source review of packages/honua-sdk and packages/honua-admin; every other key is genuinely untouched by this client SDK and is omitted rather than padded with a "none" entry. - Every entrypoint is verified by resolving its dotted path against the installed packages, so a renamed/removed class or method fails the gate until the snapshot is updated in the same PR -- the real drift signal. - The canonical key list is consumed, never copied: keys are validated against a pinned offline fixture (compatibility/capability-keys.fixture.json) for local/offline runs, or the live published URL when HONUA_CAPABILITY_KEY_LIST_URL is set (CI sets it on every run). - sinceVersion is an honest "unreleased (source preview)" marker on every entry -- neither honua-sdk nor honua-admin has been published to PyPI. - Wired into ci.yml (gate + trunk-only artifact upload) and publish-python-sdk.yml (gate blocks both release workflows). Schema and rules documented in docs/sdk-coverage.md, linked from docs/compatibility.md.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
ReviewBest-designed of the three coverage snapshots: the entrypoint-resolution drift gate (renamed/removed SDK symbols fail CI) means the snapshot cannot rot silently — recommend the other SDK repos adopt it. Honest-omission calls verified: no identity/OIDC surface in src (omitted, correctly); GPServer vs OGC Processes distinction is exactly right; streaming bulk-query ≠ change-subscriptions not stretched to partial. 25 covered + 4 partial with concrete where-it-stops notes; full suite 1516 green at 94% coverage; gate proven against both fixture and live URL. Merging. |
|
Scorecard thread addressed: the new upload-artifact step is now pinned by commit hash (043fb46d # v7). Pre-existing unpinned uses elsewhere in the repo are prior debt, out of scope for this PR. |
Summary
Publishes
compatibility/sdk-coverage.v1.json, this SDK's producer snapshot for honua-server's cross-product capability matrix (honua-server#2892 / #2893). Mapspackages/honua-sdk+packages/honua-adminclient source to the canonical, server-owned capability key vocabulary so honua-evidence's aggregate run can join this SDK's coverage against every other producer.Changes
scripts/gen_sdk_coverage.py: generator + CI gate.COVERAGEhand-curates 29 of the 110 canonical keys ascoveredorpartial, built by readingpackages/honua-sdk/packages/honua-adminsource against every published key. Three checks run every time:COVERAGEis validated against the canonical key list (unknown key fails).entrypointsdotted path is resolved viaimportlib/getattragainst the installed packages -- a renamed/removed class or method fails the gate. This is the real drift signal for "SDK release that changes coverage without snapshot update fails."collect_snapshot()byte-for-byte.compatibility/sdk-coverage.v1.json: the generated snapshot (29 entries; 25covered, 4partialwith a required stop-note each).compatibility/capability-keys.fixture.json: pinned, point-in-time offline copy of honua-server's key list, used only whenHONUA_CAPABILITY_KEY_LIST_URLis unset (local/offline dev, and the unit test suite -- both stay network-free). CI always sets the env var to the live URL.docs/sdk-coverage.md(+ linked fromdocs/compatibility.md, added tomkdocs.ymlnav): schema table, honesty rules, drift-protection explanation, key-list resolution order..github/workflows/ci.yml: new steps in thecompatibilityjob -- run the gate against the live key list, then uploadsdk-coverage.v1.jsonas a build artifact ontrunkpushes only..github/workflows/publish-python-sdk.yml: same gate added to both thehonua-sdkandhonua-adminpublish jobs, so a release cannot ship a stale coverage claim.tests/test_sdk_coverage_gate.py: 25 tests covering entrypoint-drift detection, partial-note enforcement, key-list resolution order (fixture vs. env-var override), snapshot-drift detection, and the never-pad rule.Decisions
notewhere coverage ispartial:serve.odata: read/query only, no create/update/delete entity-set operations.serve.i3s-scene: generic byte-fetch works for I3S-tagged endpoints (same resolution path as 3D Tiles), but there's no I3S-specific.slpknode/resource-tree parsing (only the 3D Tiles tileset.json walker is implemented).raster.multidim-coverage: read-onlymultidimensionalInfometadata query; no client surface to register/configure a multidimensional coverage dataset.raster.temporal-mosaic:mosaic_rule+ ISO-8601timeselection is a typed, documented parameter on the ImageServer histogram/statistics/sample operations only -- not onexport_image/tile/identify/query.process.geoprocessingvsprocess.ogc-api-processes: only the latter is covered.HonuaGeoprocessing/AsyncHonuaGeoprocessing(client.geoprocessing()) is built entirely on OGC API Processes (/ogc/processes). The Esri GPServer surface thatprocess.geoprocessing's description specifically names is never hit live by this SDK --migration/modelbuilder.py'sGPServerreferences are an offline ArcPy-migration codemod parsing exported service-definition JSON, not a live task-submission client. Distinguishing these two kept the snapshot honest rather than conflating "geoprocessing" broadly.streaming.feature-subscriptionsomitted, not partial: the description is specifically "Subscribe to WebSocket and SSE feature-change streams with filters and replay cursors."HonuaGrpcClient.query_features_streamis a gRPC paged bulk-query stream with different transport and semantics (no subscribe/replay-cursor concept) -- close enough to look tempting but not the same capability, so it's omitted rather than stretched into a misleadingpartial.identity.*keys omitted: no OIDC/SAML/SCIM/portal-token/mTLS surface anywhere in the SDK (verified by grep) -- the SDK only forwards whatever bearer/API-key token it's given.sinceVersionis the literal string"unreleased (source preview; not yet published to PyPI)"on every entry, per the issue's instruction never to invent a released version number -- this repo has internal0.1.xrelease-please tags but no PyPI publish has ever happened.none.Test plan
ruff check .-- cleanpython -m mypy packages/honua-sdk/honua_sdk packages/honua-admin/honua_admin-- clean (scripts/ is out of mypy's scope per this repo'spyproject.toml, matchingcompatibility_gate.py/gen_sync.py)python scripts/gen_sync.py --check-- unaffected, still in syncpython scripts/compatibility_gate.py-- unaffected, passespython scripts/gen_sdk_coverage.py-- passes offline (pinned fixture) and withHONUA_CAPABILITY_KEY_LIST_URLset to the live honua-server URLpython -m pytest tests/ -q --cov=honua_sdk --cov=honua_admin --cov-fail-under=94-- 1516 passed, 18 skipped, 94.37% combined coveragehonua_sdk94.11%,honua_admin94.60%) both above the 93% gatemkdocs build --strict-- clean, no new warningsDeferred
Related: honua-io/honua-server#2892, honua-io/honua-server#2893.