Skip to content

feat(product-manager): subscription types and ODCS/ODPS documents, with Dr.Egeria commands - #427

Merged
dwolfson merged 4 commits into
odpi:mainfrom
dwolfson:feat/product-manager-subscriptions-and-data-documents
Oct 5, 2026
Merged

dwolfson merged 4 commits into
odpi:mainfrom
dwolfson:feat/product-manager-subscriptions-and-data-documents

Conversation

@dwolfson

@dwolfson dwolfson commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Summary

Three commits (plus an issues-log commit), reviewable one at a time.

1. SDK (ProductManager): the eleven product-manager calls the refreshed .http documents that the SDK lacked (the audit's product-manager section went from 11 missing to 0):

  • create_one_time_subscription / create_periodic_subscription / create_ongoing_update_subscription add a subscription type to a digital product and return the GUID of the governance action process that creates subscriptions of that type.
  • publish_data_contract_string / publish_data_product_string send an ODCS / ODPS document to an integration daemon's Bitol listeners.
  • import_data_contract[_string] / import_data_product[_string] catalog an ODCS agreement / ODPS digital product.
  • generate_data_contract / generate_data_product.
  • The string endpoints take text/plain, so _async_make_request gains a keyword-only as_text flag. It uses the existing, previously unused text_headers, the default is unchanged, and it survives the 401 retry.

2. Dr.Egeria commands (Digital Product Manager family): Create Subscription Type, Import Data Contract, Import Data Product, Publish Data Contract, Publish Data Product.

  • All five are safe to re-run, which I checked in Egeria's source and then live. They have no Update form.
  • Create Subscription Type produces the governance action process that the Automation family's Initiate Subscription runs.
  • Documents are read from a Document File path, resolved against the markdown file (new input_path in the processing context), not inline, because YAML's --- and # lines are horizontal rules and headings to the extractor.
  • Import and Publish are added to STANDARD_VERBS; without that the headings silently fall through as prose.
  • The notification interval has its own attribute, Subscription Notification Interval (minutes). The Governance Officer family's Notification Interval is milliseconds and attribute names are global, so reusing it would have sent values off by 60,000x.
  • Specs edited via the Spec Editor API. validate_compact_specs, refresh_specs --merge-reports and the attribute-consumption audit are clean. docs/dr_egeria_manual.md updated.

3. get_governance_action_processes_by_name (Product Catalog view service's governance-definitions/by-name), which finds the process Initiate Subscription runs. There is no Product Catalog client, so it lives on ProductManager with its own URL.

Live verification (2026-10-05, dev quickstart platform, through the real dr_egeria --process CLI)

result
Create Subscription Type, all three kinds (ONE_TIME, PERIODIC, ONGOING_UPDATE with a monitored resource) works; run twice, exactly one process per type afterwards (idempotent)
Import Data Contract / Import Data Product work; re-importing returned the same GUIDs (updated in place)
generate_data_contract reads back the full ODCS document with its schema
get_governance_action_processes_by_name used to verify the above
Publish Data Contract / Publish Data Product, generate_data_product, the import_* bean (dict) forms not exercised live (publishing needs an integration daemon with a Bitol listener)

Everything the check created was removed and verified gone by GUID.

A first live attempt exercised nothing: the shared checkout was on the wrong branch, so the CLI answered "No processor registered" (a warning, exit code 0). It was caught, the scripts now preflight the branch, and the run above is the real one.

Found along the way (logged, not fixed here)

  • ISSUE-126: ProductManager and DigitalBusiness never call CollectionManager.__init__, so 27 inherited collection methods raise AttributeError on them.
  • ISSUE-127: CollectionManager.delete_collection(cascade=True) silently never sends cascadeDelete (same shape as ISSUE-62). Egeria also refuses to delete a DataStructure that has a member DataField even with cascade, so an imported contract must be removed child-first.

Test plan

  • SDK: 16 micro-tests (URL, verb, body, content type, return value; as_text verified through the real _async_make_request with only httpx stubbed)
  • Dr.Egeria: 20 micro-tests through the real dispatcher with a fake client, incl. validation failures, relative-path resolution, and the new verbs being extracted as commands
  • Full tests/micro-tests passes locally (906 collected)
  • scripts/omvs_audit.py --service product-manager: 0 missing, 0 mismatched
  • Live: the table above

🤖 Generated with Claude Code

dwolfson and others added 4 commits October 5, 2026 08:15
…/product documents

Adds the eleven product-manager calls the refreshed .http documents:
create_one_time/periodic/ongoing_update_subscription (a subscription type on a
digital product, returning the GUID of the governance action process that
creates subscriptions of it), publish_data_contract_string /
publish_data_product_string (to an integration daemon's Bitol listeners),
import_data_contract[_string] / import_data_product[_string] (catalog an ODCS
agreement / ODPS digital product) and generate_data_contract /
generate_data_product. The audit's product-manager section now reports 0 missing.

The string endpoints take text/plain, so _async_make_request gains a keyword-only
as_text flag (uses the existing, previously unused, text_headers; default
unchanged, and preserved across the 401 retry).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…ct and Data Product

New Digital Product Manager commands wrapping the product_manager methods:
Create Subscription Type (one-time / periodic / ongoing-update; the governance
action process it yields is what Initiate Subscription runs), Import Data
Contract / Import Data Product (catalog an ODCS / ODPS document) and Publish Data
Contract / Publish Data Product (send one to an integration daemon). Egeria
reconciles an existing subscription type and updates a re-imported document
version, so all five are safe to re-run (no Update form).

Documents are read from a Document File path (resolved against the markdown
file via a new input_path in the processing context) rather than inline: YAML's
--- and # lines are horizontal rules and headings to the extractor.

Import and Publish are added to STANDARD_VERBS; without that the headings fall
through as prose. The notification interval gets its own attribute
(Subscription Notification Interval, minutes) because the Governance Officer
family's Notification Interval is milliseconds and attribute names are global.
Authoring errors raise ValueError, not PyegeriaException, whose boilerplate
says the client cannot connect to the platform.

Specs were edited through the Spec Editor API; validate_compact_specs,
refresh_specs --merge-reports and the attribute-consumption audit are clean.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
The Product Catalog view service's governance-definitions/by-name lookup. A
digital product's subscription types are governance action processes, so this
finds the one Initiate Subscription runs. No separate Product Catalog client
exists (it is the read-only side of the product manager's), so the method lives
on ProductManager with its own URL.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…e check

ISSUE-126: ProductManager and DigitalBusiness never set collection_command_root, so 27 inherited
CollectionManager methods raise AttributeError. ISSUE-127: delete_collection(cascade=True) silently
never sends cascadeDelete (same shape as ISSUE-62).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
@dwolfson
dwolfson marked this pull request as ready for review October 5, 2026 14:14
@dwolfson
dwolfson merged commit 1737ab2 into odpi:main Oct 5, 2026
5 checks passed
@dwolfson
dwolfson deleted the feat/product-manager-subscriptions-and-data-documents branch October 5, 2026 14:17
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