Skip to content

feat: search and get filters universal, checked and typed; specs filter as named (6.2.28) - #567

Merged
dwolfson merged 16 commits into
odpi:mainfrom
dwolfson:feat/search-filter-kwargs
Nov 9, 2026
Merged

dwolfson merged 16 commits into
odpi:mainfrom
dwolfson:feat/search-filter-kwargs

Conversation

@dwolfson

@dwolfson dwolfson commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Search and get filters: universal, checked, typed and documented (6.2.28)

Depends on #564 (fix/egeria-held-binder-warning); merge after it. This branch already contains it, through the merge commit 4cd09173.

Branch dwolfson:feat/search-filter-kwargs @ c564e3be, off upstream/main 0fdf951. 8 commits and 1 merge:
eb511d24 filters · fe390e64 report-spec fixes · 90b168c1 Digital-Product-Catalog spec ·
8988fd9a one name for the type filters · 88ab7775 generic-search specs → ClassificationExplorer ·
137132c6 technology specs exact and ANDed server-side · 4cd09173 merge of the safety branch (9b0fffe) ·
4bbcc6c4 technology as a run parameter ("*" = any) · c564e3be technology match ignores case.

Identity for every live count in this PR: erinoverview on qs-view-server (quickstart),
read only. Counts depend on the viewer's zone visibility: the Architect, reading as a different
user, saw 80 rows for Data-Sharing-Agreement where erinoverview sees 598.

The owner fixed the Data-Classes report spec by passing a DataClass subtype filter to
DataDesigner.find_data_value_specifications. That worked only because the filter slipped
through undocumented **kwargs. This PR makes that pattern universal, checked and documented.
Signatures stay short; no explicit parameters are added.

1. Every find/get method accepts and forwards **kwargs

  • 509 public find_*/get_* methods (sync and async) send a filterable request body. "In
    scope" means the method reaches a shared request helper, found by following self. calls in a
    static survey (pyegeria/core/_filter_kwargs_survey.py). All of them now accept **kwargs and
    pass them on toward the helper.
  • 53 methods were fixed, including DataDesigner.find_all_data_structures and
    find_all_data_fields, the RuntimeManager platform and server lookups,
    CollectionManager.get_collection_hierarchy and get_member_list, the
    *_rel_elements helpers, and get_glossary_for_term.
  • Existing explicit metadata_element_type/metadata_element_subtypes parameters are unchanged.
  • 8 SecurityOfficer methods are exempt, each with its reason listed in the test. They reach a
    helper only through a platform-GUID lookup or a computed summary.

2. Names are checked in one place

  • The new pyegeria.core.request_filters.filter_body_kwargs(kind, kwargs) is called by every
    shared helper:
    • search, by-name, get-by-GUID, request-body and results;
    • the activity, content and deployment status variants.
  • It is also called by the three finds that build their own bodies: find_digital_products,
    find_metadata_elements and find_root_elements.
  • What it does:
    • Takes the valid names from the matching request-body model (GetRequestBody,
      ResultsRequestBody, FilterRequestBody, SearchStringRequestBody +
      FindPropertyNamesRequestBody, FindRequestBody, the status bodies). They are not a hand
      list.
    • Maps the public spellings (metadata_element_type, metadata_element_subtypes,
      anchor_domain, relationship_page_size) and legacy spellings (classification_names
      and the report-param aliases) to wire names.
    • Drops None.
    • Warns on anything unknown. The warning is UnknownFilterWarning(UserWarning), also logged
      at WARNING. It names the method and the bad key and lists the valid names. It is attributed
      to the caller's line using skip_file_prefixes.
  • Report specs: spec_params reach the same check. A micro-test runs a typo through
    _async_run_report_impl into a real DataDesigner helper and sees the warning.
  • The plan to raise TypeError in a later release is stated in the release note, the docs and
    the warning text.

3. Typed kwargs (PEP 692)

  • GetFilters ⊂ ListFilters ⊂ SearchFilters, plus FindFilters. They are TypedDicts with a
    docstring per field.
  • 281 methods are annotated **kwargs: Unpack[...].
  • One source: micro-tests check that each TypedDict, mapped through PUBLIC_ALIASES and together
    with CALL_PARAMETERS, equals its model's field set exactly. They also check that the docs
    tables equal filter_reference_markdown().

Mapping gaps (said rather than forced):

  1. PEP 692 overlap. 208 methods declare some filters as explicit parameters, for example
    skip_relationships or metadata_element_subtypes. PEP 692 forbids a TypedDict key that
    repeats a named parameter, so those methods keep a plain **kwargs. Their filters still pass
    through and are still checked. A test requires each un-annotated method to have such an
    overlap. Annotating them would mean removing the explicit parameters (churn ruled out) or
    generating per-method TypedDicts.
  2. Call parameters. graph_query_depth, start_from, page_size, search_string,
    starts_with, ends_with, ignore_case, filter_string and property_value are model
    fields but stay out of the TypedDicts, because methods declare them explicitly. They are
    listed in CALL_PARAMETERS and are valid names in the check.
  3. By-name has no separate set. FilterRequestBody adds only filter, which is a call
    parameter, so by-name and the other list gets share ListFilters.
  4. Get-by-GUID subtype filter. metadata_element_subtypes is still a GetRequestBody field,
    but Egeria ignores it on a get-by-GUID since it moved to QueryOptions. It is documented that
    way.
  5. Not wired. _async_get_level_identifier_query_body_request sends only a caller-supplied
    body. MetadataExpert.find_relationships_between_elements takes a required caller-owned body
    (FindRelationshipRequestBody is not modelled). Neither applies kwargs filters.
  6. No docstrings. 45 in-scope methods have no docstring at all, so they did not get the
    one-line pointer.

4. Docs

  • docs/search-and-get-filters.md has:
    • the request kinds and which body each maps to;
    • examples, including find_data_value_specifications("*", metadata_element_subtypes=["DataClass"]);
    • the check and the warn-then-raise plan;
    • report specs;
    • generated filter tables.
  • 444 docstrings gained a one-line pointer, for example: "Accepts the standard search filters as
    keyword arguments (see SearchFilters …)".
  • docs/release-notes/6.2.28.md has its own section, "Search and get filters". The other 6.2.28
    branches also create this file, so expect an add/add merge. It is the only file this PR shares
    with fix/egeria-held-binder-warning, fix/capped-scans-and-viewer-none and
    fix/dre-detach-member.

Behaviour changes — some reports now return fewer rows

These reports used to ignore part of their filter and list everything; now they return only
what they are named for. Live read counts on the quickstart:

Report spec (Basic + Advanced) Before Now
Cited-Document-DrE-* 87 (every external reference) 2
Related-Media-DrE-* 87 4
External-Data-Source/-Model-Source/-Source-Code-DrE-*, External-Standard-DrE-* 87 each 0
Question-DrE-* TypeError (would have listed 1000+ terms) 152
Data-Sharing-Agreement-DrE-* (find_collections) 1000+ (every collection) 598
Digital-Product-Catalog-DrE-* (find_collections) 1000+ (every collection) 3
  • classification_names on a find now filters. It is sent as
    includeOnlyClassifiedElements (as it already was on by-name gets); before, a find dropped it
    silently. The two specs that pass it to find_collections return fewer rows (table above). The
    project-family specs (Campaign etc.) already used include_only_classified_elements and are
    unchanged (Campaign: 7 rows before and after).

  • The external-reference and Question specs now return only their own type. Commit
    fe390e64 fixed their Dr.Egeria find_constraints through the Spec Editor API and
    regenerated with refresh_specs --merge-reports:

    • 6 external-reference Create commands: metadata_element_types: ["X"] →
      metadata_element_type: "X";
    • Create Question: classification: "Question" → include_only_classified_elements: ["Question"].

    Dr.Egeria command processing is unchanged (_derive_egeria_type_name reads the singular key
    the same way). The diff in base_report_formats.py is exactly those 14 specs. The two template
    diffs are existing drift that the generator rewrote.

  • Hard-coded filters no longer collide with the caller's. 58 call sites passed a filter such
    as metadata_element_type explicitly beside **kwargs, so passing that filter raised
    TypeError: got multiple values. That is why Question-DrE-* failed on upstream/main. The
    built-in value is now a default that the caller's keyword overrides, and a micro-test keeps it
    that way.

  • None never overrides a method default. find_metadata_elements builds its default body from
    any FindRequestBody keyword.

  • KNOWN_BAD_SPEC_PARAMS is gone. A micro-test requires every built-in spec's spec_params to
    name a filter or parameter of the method it calls.

Merge with the safety branch (4cd09173)

  • Conflicts were resolved as in the Coordinator's trial merge 2f33e479:
    • the 6.2.28 note keeps both sections;
    • asset_catalog.py keeps _generate_asset_graph_output and @deprecated_names;
    • format_set_executor.py keeps the safety side's logger.error, then re-raises.
  • The safety branch's positive find-method allowlist gains:
    • ClassificationExplorer.find_elements_by_property_value, named by the 40 generic-search specs
      (census part 46 → 47 methods);
    • ClassificationExplorer.find_root_elements, a reviewed addition: read only, a FindRequestBody
      to /elements/by-complex-query, called internally for the technology query.
    • get_elements was already listed.
  • Both allowlist tests and the write-word scan pass.
  • Census 437 / 376 / 0 / 61: 352 find plus 24 analytic runnable, 0 unrunnable, 61 format-only.

Also in this PR / not done

  • Existing test-order dependence (also on upstream/main): test_rs_egeria_tier's allowlist test fails when run directly after test_format_set_executor_resolution.py. The normal full-suite order passes.
  • Digital-Product-Catalog-DrE-* (fixed in the third commit, on the owner's word). Its
    find constraint said classification_names: ["DigitalProductCatalog"], but
    DigitalProductCatalog is a type. It is now metadata_element_type: "DigitalProductCatalog":
    3 rows (Basic and Advanced) on the quickstart, where it used to list every collection.
  • Not done (by brief): Dr.Egeria help-glossary write (skill step 4) and the template rsync into
    egeria-workspaces-fs (step 5).
  • pyegeria/{,config/,view/}dr_egeria_reports.py are standalone gen_report_specs snapshots
    that nothing imports and refresh_specs does not write. They still hold the old
    find_constraints and were left untouched.

5. One name for the type filters (8988fd9a)

Owner: "Make it consistent with either metadata_element_type_name or metadata_element_type everywhere".
metadata_element_type was chosen: it matches the TypedDicts and the search helper.

  • Note: metadata_element_type_name was actually the commoner signature spelling (124 vs 43).
  • 135 signatures renamed: 124 metadata_element_type_name, 8 metadata_element_sub_type,
    2 metadata_element_subtype, 1 metadata_element_name. The renames carry through their bodies,
    docstrings and every in-repo call site, including **params dicts and the report-spec cache.
  • request_filters.DEPRECATED_NAMES with the @deprecated_names decorator:
    • the old spelling still works and raises one DeprecationWarning naming the new one;
    • a lone string given for the subtype list becomes a one-item list;
    • old and new given with different values raise TypeError;
    • filter_body_kwargs does the same for **kwargs.
  • The report executor renames old spellings quietly, because spec vocabulary is not the caller's code.
  • The helper _async_get_name_request is renamed too. Its old test, "type_name wins over type", now
    asserts the refusal instead.
  • 10 methods lose their Unpack annotation, because the renamed parameter now repeats a TypedDict
    key (PEP 692).
  • A test fails if any signature uses a deprecated name.

6. Generic-search report specs → ClassificationExplorer (88ab7775)

Owner: "it is better to use ClassificationExplorer instead of MetadataExpert for generic calls".

  • What changed. 40 specs, from 20 Create commands, used to call
    find_metadata_elements_with_string with no type. Now:
    • only find_method changed in the compact specs, via the Spec Editor;
    • gen_report_specs derives metadata_element_type from each command's OM_TYPE (Architect:
      "through the generator, not by hand"). The generic Element command gets OpenMetadataRoot;
    • property_names are displayName and qualifiedName.
  • Technology commands (9). Kafka, Postgres server/database and Unity Catalog
    server/catalog/schema/table/function/volume add deployed_implementation_type.
    • It comes from automated_curation.ELEMENT_TEMPLATE_TECHNOLOGY, the table their
      create-from-template calls now use as well, so there is one source.
    • Exact, and ANDed server-side (Architect P2/P3, fixed in 137132c6). Egeria evaluates
      deployedImplementationType EQ the technology AND, for a search string, ANY of
      displayName/qualifiedName matching it, as one ClassificationExplorer.find_root_elements
      complex query (/elements/by-complex-query). So ClassificationExplorer is kept, as the owner
      prefers.
      • Paging stays exact, and nothing is filtered client-side.
      • starts_with/ends_with/ignore_case pick STARTS_WITH, ENDS_WITH, EQ or LIKE, or their
        CASE_INSENSITIVE_* variants. Egeria's Postgres repository matches LIKE literally: it escapes
        %/_, so regex patterns never match. I checked this in QueryBuilder.java and live.
      • Live, as erinoverview, page_size 25:
        • Postgres-Server "Coco" → empty. Before, 10 other SoftwareServers came back; the only
          PostgreSQL Server element is a template.
        • UC-Server '*' → 2, both exactly "Unity Catalog Server". Before it was 3, including
          "Databricks Unity Catalog Server".
        • UC-Server "Coco" → 1.
        • Kafka '*' → 1.
        • All 9 technology specs re-run with '*' after the fix: every row is exactly its own technology. Only UC-Server's count changed. Each query took 0.2 s, against 11–20 s for the old contains search.
      • Those specs show a Deployed Implementation Type column.
    • The technology is a run parameter (4bbcc6c4). Owner: "allow the tech type to be a
      wildcard"
      .
      • Each technology spec pins default_deployed_implementation_type, its own technology from the
        generator, and declares deployed_implementation_type as an optional run parameter. So it is
        not an unknown filter, and it shows in the Portal's run form.
      • Behaviour:
        • not given → the spec's technology, exact but ignoring case (CASE_INSENSITIVE_EQ, c564e3be): "postgresql server" finds the PostgreSQL Server (checked live);
        • "*" → any technology: every element of the type. '*' still lists at most 100 per call,
          and the root-type refusal still applies;
        • any other value → that technology, exact.
      • Why the default is a separate parameter: spec_params beat caller params (§9.13, unchanged),
        so a pinned deployed_implementation_type could never be overridden. A general "optional
        overrides spec" rule would have changed 245 existing specs.
      • Live, Postgres-Server-Element-DrE-Basic, page_size 25, as erinoverview, with no
        UnknownFilterWarning:
        • default with '*' → 1 PostgreSQL Server;
        • technology "*" → 19 SoftwareServers across 14 technologies;
        • default with "Coco" → empty;
        • technology "*" with "Coco" → 10.
  • '*' with a type lists that type through get_elements: the caller's page_size, default 100,
    never more than 100 per call, paged by start_from.
  • Reverses option (a) for '*' only. '*' with no type, or with OpenMetadataRoot/Referenceable,
    is refused with "give a search string or a narrower type". So Element-DrE-* works only with a
    search string, the same breadth it searched before this branch.
    • Why: a live Element-DrE-* '*' read (OpenMetadataRoot, page_size 1000) was very likely the last
      straw for egeria-main's heap. It ran out of memory at 11:53:19Z on 2026-11-09 and auto-restarted.
    • The Coordinator notes the heap was already near its limit from the audit-log Kafka backlog; it had
      also run out of memory at 01:03.
  • find_metadata_elements_with_string("*") with no type is now refused in words ("give a search
    string or a type") instead of passing Egeria's "searchString is null" through.
  • Report executor:
    • a run's search_string reaches a method that takes property_value;
    • P3 (predates the branch): a caller's run parameter that the report does not take now warns
      with UnknownFilterWarning instead of vanishing;
    • when spec_params and caller params collide, the spec wins, unchanged and now stated in the
      docs (§9.13);
    • the sync exec_report_spec re-raises ValueError instead of printing it and returning None.
      That was existing behaviour, and it turned the refusal into "no result".
  • Census test: every spec whose function is a generic search must carry a type or classification
    filter. ClassificationExplorer.get_elements is excluded because it always sends a type
    (Referenceable by default).

Live '*' counts per spec (Basic and Advanced identical), as erinoverview on qs-view-server,
page_size 100, graph_query_depth 0, run one at a time after the Coordinator cleared the platform
(12:05Z). "100" is a full first page, not a total. Before this branch every one of these failed with
"searchString is null".

Spec family type (+ technology) '*' rows
Element OpenMetadataRoot refused: give a search string or a narrower type
Embedded-Process EmbeddedProcess 100 (full page)
Folder-Element DataFolder 30
CSV-Data-File-Element CSVFile 124 (taken before the cap at page_size 1000; 'Coco' → 32)
Kafka-Server-Element SoftwareServer + Apache Kafka Server 1
Postgres-Server-Element SoftwareServer + PostgreSQL Server 1
Postgres-Database-Element RelationalDatabase + PostgreSQL Relational Database 2
Report Report 100 (full page)
Saved-Query SavedQuery 0
Schema-Attribute (+ From-Template) SchemaAttribute 100 (full page)
Schema-Type (+ From-Template) SchemaType 100 (full page)
Secrets-Store-Element SecretsCollection 35
UC-Server-Element SoftwareServer + Unity Catalog Server 2 after the exact-match fix (3 before it, incl. Databricks)
UC-Catalog-Element SoftwareCapability + Unity Catalog Catalog 0
UC-Schema-Element DeployedDatabaseSchema + Unity Catalog Schema 6
UC-Table-Element RelationalTable + Unity Catalog Table 0
UC-Function-Element DeployedAPI + Unity Catalog Function 3
UC-Volume-Element StorageVolume + Unity Catalog Volume 0

Search-string change (before the crash, same identity): "Coco" used to return the same 972 untyped
hits in every one of these specs. Now each returns its own type, e.g. Report 47, CSV 32, Secrets 3.

Tests

  • New: tests/micro-tests/test_search_get_filter_kwargs.py (24 tests). It covers:
    • every in-scope method accepts and forwards **kwargs;
    • the exemptions are still needed;
    • the annotation matches the request kind;
    • TypedDict == model;
    • docs tables are current;
    • unknown names warn and known ones reach the wire body (find, get-by-GUID, by-name);
    • find_all_data_fields now filters;
    • a spec_params typo warns through the report executor;
    • report-param aliases don't warn;
    • built-in spec_params are valid;
    • no hard-coded filter keyword sits beside forwarded **kwargs;
    • no signature uses a deprecated type name, and both spellings reach the body through a
      ClassificationExplorer method (the deprecated one warns, and a conflict is refused);
    • generic-search census, generator derivation, technology column, the '*' paths, the cap at 100,
      the refusals, the executor run-param warning, and the sync executor surfacing a refusal.
  • Full micro-suite, uv run -p 3.13 pytest tests/micro-tests/ --junitxml:
tests failures errors skipped
this branch (c564e3b) 2450 0 0 3
this branch (4bbcc6c, after merging the safety branch) 2449 0 0 3
this branch (137132c, before the merge) 2406 0 0 3
this branch (88ab777, 5th commit) 2400 0 0 3
this branch (90b168c, 3rd commit) 2403 0 0 3
this branch (fe390e6, 2nd commit) 2403 0 0 3
this branch (eb511d2, 1st commit) 2402 0 0 3
upstream/main (0fdf951) 2379 0 0 3

2400 at 88ab7775 is 3 fewer than at 90b168c1. test_metadata_expert_report_spec_kwarg is parametrized over the specs still on find_metadata_elements_with_string, and 40 of those moved to ClassificationExplorer (52 → 12 cases). The new tests add 37 (filters +24, by-name spellings +13). Two existing tests were updated for the intended changes: Report-DrE-Basic no longer uses that function, and an untyped '*' is now refused. No UnknownFilterWarning fires anywhere in the suite.

  • No UnknownFilterWarning was raised anywhere in the existing suite.

Live read checks (quickstart, no writes)

  • find_data_value_specifications(metadata_element_subtypes=["DataClass"]) returned the 6
    DataClass specs. With ["DataGrain"] it returned none.
  • With the typo metadata_element_subtipes the call returned unfiltered results and raised one
    UnknownFilterWarning.
  • find_all_data_fields(sequencing_order="PROPERTY_ASCENDING", sequencing_property="displayName", page_size=5)
    returned 5 sorted fields. That method could not filter before.
  • find_all_data_fields(limit_results_by_status=["DELETED"]) reached Egeria. Egeria then failed
    server-side (OPEN-METADATA-500-025) while formatting a soft-deleted DataField. That is an
    Egeria issue, not this PR.

🤖 Generated with Claude Code

…e does (O1-a)

Architect read-back P2 of RS-EGERIA-TIER stage 1 (odpi#563) against RS-W2-4 PR-0 (odpi#561):
a stage's analytic_binders key on a spec held in Egeria was recorded only as a
generic "ignored" note, so odpi#561's BINDERS_DEPRECATED_PREFIX warning never fired for
the very case owner decision O1-a was for.

- microflow_to_format_set now passes a stage's analytic_binders into the action. The
  PR-B ActionParameter shim drops it there, raises its DeprecationWarning and records
  the names, and the spec resolver warns with BINDERS_DEPRECATED_PREFIX, the same text
  as for a local spec. An empty binder stays silent; other unknown stage keys are
  still notes. Works for format 0 and microflow/1, and on every tier load, since the
  tier rebuilds from the cached micro-flow text, which keeps the key.
- PR-0 P3: the shim's docstring now says the marker survives model_copy but not
  model_dump and a reload.
- Tests: a synced Egeria-held spec (format 0 and microflow/1) with a non-empty binder
  resolves with exactly the odpi#561 warning; empty, None, [] and absent stay silent.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
The Architect's stage-2 allowlist items (read-back of RS-EGERIA-TIER stage 1, P2 and
note (a) on 224f189), pulled forward so pyegeria 6.2.28, the first release with the
EGERIA tier, ships them.

- The find_/get_/list_ prefix rule is gone. FIND_METHOD_ALLOWLIST is a positive list of
  Class.method entries (an _async_ twin is allowed too). It is _CENSUS_FIND_METHODS,
  the 45 find methods today's runnable built-in specs name (taken from the 437-spec
  census; the two unrunnable specs' missing methods are left out), plus
  FIND_METHOD_ADDITIONS, the reviewed additions, which is empty for now. A method not on it
  is refused with words, whatever its prefix.
- FIND_METHOD_DENYLIST is kept as a second, independent check: it is tested first, it
  denies on any class, and a test fails if the two lists overlap.
- The write-word scan now runs over the allowlist itself, on the name and on the first
  docstring line of both the sync method and its _async_ twin. The reviewed reads are
  keyed by Class.method: DataDiscovery.get_security_posture_history and
  ServerClient.get_attached_comments.
- New test: every runnable built-in or generated spec's function is on the list, so
  the stage-2 seed cannot be refused. Plus tests that every entry resolves, that an
  _async_ twin is allowed, and that same-method different-class spellings are refused.
- microflow-1.json and the module docstring describe the allowlist.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…able

The owner's fix for the census's two unrunnable specs (pyegeria 6.2.28).

- Asset-Graph named ServerClient.get_asset_graph, which no longer exists. It now calls
  AssetCatalog.get_asset_graph_by_guid. The required parameter is now guid instead of
  asset_guid; the optional ones are start_from and page_size. commands/cat/
  get_asset_graph.py (the hey_egeria asset graph command) passes the new name.
- Data-Classes named DataDesigner.find_data_classes, which no longer exists. It now
  calls DataDesigner.find_data_value_specifications with
  spec_params={"metadata_element_subtypes": ["DataClass"]}. DataClass is a
  DataValueSpecification subtype that shares the same search endpoint, and the filter
  travels in the search body as metadataElementSubtypeNames (through **kwargs into
  _async_find_request). The two subtype keys are removed from the spec's optional
  params so a caller cannot override the filter.
- Live READ against qs-view-server (no writes):
  - The DataClass filter returns 6 DataClass elements; DataGrain returns none, so
    the filter is honoured.
  - Data-Classes DICT returns 6 DataClass rows. It fills the same columns as
    Data-Value-Spec does on the same data.
  - Asset-Graph DICT and MERMAID run on a real asset guid.
- AssetCatalog.get_asset_graph_by_guid is added to the positive allowlist (46
  entries). find_data_value_specifications was already on it. The every-runnable-
  built-in test now covers both specs.
- Census: 437 specs, 376 runnable, 61 format-only, 0 unrunnable (was 374 / 61 / 2).
  The resolver tests that used Data-Classes as their unrunnable example now register
  a probe spec. KNOWN_UNRUNNABLE is now empty. The log_lines fixture re-enables the
  pyegeria logger, because another module's test can leave it disabled.
- Docs: the census numbers in output-formats-and-report-specs.md are updated, and
  the two "unrunnable today" examples are now history with their fix. A new
  docs/release-notes/6.2.28.md is added.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Every public find_*/get_* method that sends a request body (509, sync and
async) now accepts **kwargs and forwards them to the shared request helper;
the 53 that dropped them (find_all_data_structures/find_all_data_fields,
the RuntimeManager lookups, get_collection_hierarchy, ...) are fixed.

pyegeria.core.request_filters is the one source:
- GetFilters / ListFilters / SearchFilters / FindFilters TypedDicts (PEP 692,
  a docstring per field); 281 methods annotate **kwargs: Unpack[...]. The
  other 208 name some filters explicitly, which PEP 692 forbids repeating in
  the TypedDict, so they keep plain **kwargs.
- filter_body_kwargs(kind, kwargs), called by every shared helper, derives
  the valid names from the request-body model, maps the public spellings to
  wire names, and warns (UnknownFilterWarning, also logged) on unknown names.
  Report-spec spec_params reach the same check through the executor.
- filter_reference_markdown() renders the tables in
  docs/search-and-get-filters.md; micro-tests fail if the TypedDicts, models
  or docs drift.

Unknown names warn in 6.2.28; a later release will raise.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…lares

This fixes the Architect's P2 on e2e8a8c (READBACK-allowlist-specfix-cappedscans-2026-11-09 §2).
Asset-Graph resolved and ran, but its output was not the graph.

What was actually wrong, checked live and against a recorded response:
- The anchor graph column's key was misspelt `anchorMermaidGRaph`, so Anchor Graph was
  always empty. It is now `anchorMermaidGraph`, and an Action Graph column
  (`actionMermaidGraph`, which the response also carries) is added.
- The spec declared only ALL. Requesting ALL as an output format returned a 62-82 char
  markdown string holding just the asset's name, labelled kind "json".
- Requesting MD or FORM rendered a Dr.Egeria "Update Asset" form, and LIST a markdown table,
  none of which can show a graph.

Two read-back findings did not reproduce:
- REPORT and MERMAID were not empty. They return kind "text" with the graph in `content`
  (`data` is not used for text results). The read-back read `data`.
- DICT's single row is the asset itself. On this repository the first find_assets result is a
  GovernanceActionProcessInstance, whose display name reads like an audit message. DICT gave
  one row equal to the asset on four asset types live.

Changes:
- Asset-Graph declares DICT/TABLE/JSON, REPORT/HTML and MERMAID:
  - DICT, TABLE and JSON give the asset's own fields plus the graphs as text.
  - REPORT and HTML give the fields, with the asset, anchor and action graphs rendered as
    mermaid.
  - MERMAID gives the asset graph.
  - The columns are a named ASSET_GRAPH_COLUMNS list. ALL, MD, FORM and LIST are dropped, with
    the reason in a comment. Asking for one now raises the executor's existing error, which
    lists the declared formats.
- format_set_executor: a ValueError from the find path was printed and swallowed, so the call
  returned None. It is now logged and re-raised.
- Tests (17) against a recorded get_asset_graph_by_guid response
  (tests/micro-tests/data/asset_graph_by_guid_response.json, from qs-view-server, read only,
  relationships trimmed). They run the real path from exec_report_spec down to
  _generate_asset_output; only the HTTP request is replaced, and building a real client fails
  the test. They cover:
  - each declared format, with DICT a single row that is the asset and has all three graphs;
  - REPORT with three mermaid blocks;
  - MERMAID equal to the rendered mermaidGraph;
  - ALL, MD, FORM and LIST raising with words;
  - no declared format returning None.
- Live READ against qs-view-server, after the fix:
  - DICT is 1 row with Mermaid 740 / Anchor 878 / Action 804 characters.
  - REPORT has 3 mermaid blocks; HTML and MERMAID carry the graph.
  - ALL and MD raise with words.
  - DICT is one row, the asset itself, on Notification, EngineAction and
    ConnectorActivityReport assets.
- docs/release-notes/6.2.28.md is updated.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Dr.Egeria find_constraints (edited via the Spec Editor API, then
refresh_specs --merge-reports; generated outputs as written):
- 6 external-reference Create commands: metadata_element_types: ["X"] ->
  metadata_element_type: "X" (the validator's preferred form; Dr.Egeria
  processing reads it the same way). Their report specs now return only
  their own type: Cited-Document 87 -> 2 rows, Related-Media 87 -> 4,
  External-Data-Source/-Model-Source/-Source-Code/-Standard 87 -> 0
  (quickstart).
- Create Question: classification: "Question" (read by nothing) ->
  include_only_classified_elements: ["Question"]. Question-DrE-* now
  returns the 152 Question terms instead of failing.

58 call sites passed a filter such as metadata_element_type explicitly
beside **kwargs, so a caller or spec passing that filter raised TypeError
("multiple values") -- why Question-DrE-* failed. The built-in value is now
a default in the splat that the caller's keyword overrides; a micro-test
keeps it that way.

KNOWN_BAD_SPEC_PARAMS is gone: every built-in spec's spec_params must name
a filter or parameter of the method it calls.

Release note states the row-count changes, including classification_names
now filtering on a find (Data-Sharing-Agreement 1000+ -> 598;
Digital-Product-Catalog 1000+ -> 0 because DigitalProductCatalog is a
type, not a classification -- its spec needs metadata_element_type).

The two template diffs are pre-existing drift rewritten by refresh_specs.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Create Digital Product Catalog's find_constraints said
classification_names: ["DigitalProductCatalog"], but DigitalProductCatalog
is a type, not a classification. Now metadata_element_type:
"DigitalProductCatalog" (edited via the Spec Editor API, then
refresh_specs --merge-reports; generated output as written).
Digital-Product-Catalog-DrE-* returns the 3 catalogs on the quickstart,
where it used to list every collection (and, with classification_names now
filtering, would have listed none). Release note updated.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
The owner asked what it means for a table to return a graph: after 883d33e,
TABLE/DICT returned one row holding ~740 characters of mermaid text. The owner's
direction: "A table of edges and a different shape for other OutputTYpes".

New pyegeria/view/asset_graph.py (pure functions) gives each declared format a shape:
- DICT and TABLE: one row per edge, with From Display Name / From Type / From GUID /
  Relationship / To Display Name / To Type / To GUID.
  - The asset's own relationships (top-level lists such as governedBy and
    requestedActions) are included.
  - Direction comes from relatedElementAtEnd1 and startingElementGUID.
  - Each relationship is listed once, by relationship GUID.
  - Rows are sorted, so the order never depends on Egeria's. Paging stays Egeria's,
    on the graph request.
- LIST: the nodes (the asset, its anchored elements, the related elements), with
  their role.
- REPORT and MD: the asset summary, its graph(s) as mermaid, then the edge table.
  HTML renders that document.
- MERMAID: the graph.
- JSON: the full graph response.
- FORM and ALL are not declared, so asking for them is an error that names the
  declared formats.

Supporting changes:
- AssetCatalog._generate_asset_graph_output applies these shapes for
  get_asset_graph_by_guid. MERMAID and other formats take the generic asset path.
- The Architect's P3: a by-GUID REPORT no longer says "found from the search string".
- markdown_to_html now enables GFM tables. The CommonMark preset had them off, so
  markdown tables came out as plain text in HTML, although the page CSS styles tables.

Tests and checks:
- The tests use a complete recorded response, rewritten to cover each format, the
  hand-read expected edges (5, one reported twice), deterministic order under a
  shuffled response, the no-edge case, and the P3 wording.
- Live READ: edge rows equal the distinct relationship GUIDs on three asset types
  (5, 6 and 3), node counts are right, and REPORT never says "search string".
- The spec docs (output-formats-and-report-specs.md) and the 6.2.28 note record
  the shape per format.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Owner: "Make it consistent with either metadata_element_type_name or
metadata_element_type everywhere". metadata_element_type matches the
SearchFilters/GetFilters TypedDicts and the search helper, so:

- 135 signatures renamed (124 metadata_element_type_name, 8
  metadata_element_sub_type, 2 metadata_element_subtype, 1
  metadata_element_name), with their body uses, docstrings and every
  in-repo call site (keywords, **params dicts, spec cache).
- request_filters.DEPRECATED_NAMES + @deprecated_names: the old spelling
  still works with one DeprecationWarning naming the new one; a lone string
  for the subtype list becomes a list; old and new with different values
  raise TypeError. filter_body_kwargs applies the same to **kwargs.
- The report executor renames old spellings quietly (spec vocabulary is
  not the caller's code).
- 10 methods whose renamed parameter now repeats a TypedDict key drop the
  Unpack annotation (PEP 692).
- Tests: no signature uses a deprecated name; alias warns/maps/refuses;
  by-name wrappers take both spellings; test fakes follow the new name.
- Docs page section + generated "Deprecated spellings" table; 6.2.28 note.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…AID for people

The Architect's choice, accepted by the owner. Supersedes the edge table
of 5fbc3c4.

- Asset-Graph no longer declares TABLE. A TABLE (or LIST, MD, FORM, ALL)
  request is refused with words naming the declared formats; a named
  NO_TABLE_FALLBACK set stops the generic TABLE->DICT fallback for this
  spec only.
- DICT is the asset itself with its graph fields; JSON is the full graph
  response; REPORT and HTML render the asset's fields and graphs; MERMAID
  is the graph.
- pyegeria/view/asset_graph.py is trimmed to the edge/node helpers kept
  for the Wave 3 edge-table spec; no spec uses them yet (tested directly).
- Keeps the P3 fix: a fetch by GUID no longer says "search string"; a
  search REPORT still names its search string.
- Tests, docs and the 6.2.28 note updated; the note says the edge table
  is planned as its own spec in Wave 3.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…ir own type

The 40 Dr.Egeria *-DrE-* specs that called
MetadataExpert.find_metadata_elements_with_string with no type now call
ClassificationExplorer.find_elements_by_property_value (owner: it returns
a more standard shape). Only find_method changed in the 20 compact
commands (Spec Editor); gen_report_specs derives each spec's
metadata_element_type from the command's OM_TYPE (OpenMetadataRoot when
empty) and property_names displayName/qualifiedName.

- The 9 technology commands (Kafka, Postgres server/database, Unity
  Catalog) also get deployed_implementation_type, from one table
  (automated_curation.ELEMENT_TEMPLATE_TECHNOLOGY) that their
  create-from-template calls now use too, plus a Deployed Implementation
  Type column. '*' lists exactly that technology (matched by Egeria, so
  paging holds); a search string matches names within the supertype.
- find_elements_by_property_value: '*' with a type lists that type via
  get_elements, at most 100 per call (caller's page_size, default 100);
  '*' with no type or OpenMetadataRoot/Referenceable is refused: "give a
  search string or a narrower type" (a whole-repository listing helped
  run the quickstart platform out of heap on 2026-11-09).
- find_metadata_elements_with_string refuses an untyped '*' in words
  instead of passing Egeria's "searchString is null" through.
- Report executor: a run's search_string reaches a property_value method;
  a caller's parameter the report does not take warns
  (UnknownFilterWarning); spec_params still win on a collision (docs say
  so); the sync exec_report_spec re-raises ValueError instead of printing
  it and returning None.
- Tests: census (every generic-search spec names a type), generator
  derivation, technology column, '*' paths and caps, refusals, both type
  spellings through ClassificationExplorer, executor warnings.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…er-side

Architect read-back of 88ab777:
- P2: a technology spec with a search string returned other technologies
  (Postgres-Server-Element-DrE-Basic "Coco" gave 10 non-Postgres
  SoftwareServers).
- P3: the technology match was "contains" (UC-Server '*' included
  "Databricks Unity Catalog Server").

find_elements_by_property_value with deployed_implementation_type now
sends one ClassificationExplorer complex query (find_root_elements,
/elements/by-complex-query): deployedImplementationType EQ the
technology AND, for a search string, ANY of property_names matching it,
with STARTS_WITH / ENDS_WITH / EQ / LIKE (CASE_INSENSITIVE_* for
ignore_case) chosen from the search options. Egeria's Postgres repository
matches LIKE literally (it escapes % and _), so no regex is sent. Paging
stays exact; nothing is filtered client-side. The technology conditions
win over a caller's search_properties.

Live as erinoverview, page_size 25: Postgres-Server "Coco" -> empty;
UC-Server '*' -> 2, both "Unity Catalog Server" (was 3 incl. Databricks);
all 9 technology specs return only their exact technology, in 0.2 s each
instead of 11-20 s. Docstring, docs page and release note drop the
limitation text.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…h-filter-kwargs

The filter PR goes in after the safety PR. Conflicts resolved as in the
Coordinator's trial merge (2f33e479):
- docs/release-notes/6.2.28.md: both sections kept (safety first).
- pyegeria/omvs/asset_catalog.py: the safety branch's
  _generate_asset_graph_output and this branch's @deprecated_names on
  _async_find_in_asset_domain.
- pyegeria/view/format_set_executor.py: both sides re-raise ValueError;
  the safety side's logger.error kept, one comment, then raise.

Integration fix: the safety branch's POSITIVE find-method allowlist gains
ClassificationExplorer.find_elements_by_property_value (now named by the
40 generic-search DrE specs; census 46 -> 47 methods) and, as a reviewed
addition, ClassificationExplorer.find_root_elements (read only: POSTs a
FindRequestBody to .../elements/by-complex-query; used internally for the
technology specs' ANDed query). get_elements was already listed.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…("*" = any)

Owner: "For the technology specs we should allow the tech type to be a
wildcard?"

The 9 technology specs (and their -Advanced twins) now pin
default_deployed_implementation_type (from ELEMENT_TEMPLATE_TECHNOLOGY via
the generator) and declare deployed_implementation_type as an optional run
parameter, so it is not an unknown filter and the Portal's run form shows
it. spec_params still win on a collision (section 9.13 unchanged), which
is why the default is a separate parameter and not a pinned
deployed_implementation_type.

find_elements_by_property_value: technology = deployed_implementation_type
or default_deployed_implementation_type;
- not given: the spec's technology, exact, ANDed server-side with the name
  match;
- "*": no technology condition; the report searches every element of its
  type ('*' lists via get_elements, at most 100 per call; a root type is
  still refused);
- anything else: that technology, exact.

Live as erinoverview, Postgres-Server-Element-DrE-Basic, page_size 25:
default '*' -> 1 PostgreSQL Server; technology "*" -> 19 SoftwareServers
across 14 technologies; default "Coco" -> empty; technology "*" + "Coco"
-> 10. No UnknownFilterWarning. Census 437/376/0/61.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Architect read-back of 4bbcc6c (P3): "postgresql server" returned empty
with no explanation because the deployedImplementationType condition was
case-sensitive EQ. It is now CASE_INSENSITIVE_EQ: still an exact match,
ignoring case. "*" still means any technology.

Live as erinoverview, Postgres-Server-Element-DrE-Basic, page_size 25:
deployed_implementation_type="postgresql server" -> 1 PostgreSQL Server.
Docstrings, docs page and release note say "ignoring case".

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…ilter-kwargs

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>

# Conflicts:
#	docs/release-notes/6.2.28.md
#	pyegeria/omvs/asset_catalog.py
#	pyegeria/view/format_set_executor.py
#	pyegeria/view/microflow.py
#	tests/micro-tests/test_rs_egeria_tier.py
@dwolfson
dwolfson merged commit 6fb44bb into odpi:main Nov 9, 2026
6 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