Skip to content

feat(analytics): result envelope, chart gating, param binders, manifest fields (ISSUE-138/139/140/149) - #453

Merged
dwolfson merged 11 commits into
odpi:mainfrom
dwolfson:feat/analytic-envelope-manifest
Oct 14, 2026
Merged

dwolfson merged 11 commits into
odpi:mainfrom
dwolfson:feat/analytic-envelope-manifest

Conversation

@dwolfson

@dwolfson dwolfson commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Summary

Analytic executor and registry changes requested by trellis-analytics (the Analytic Library walking skeleton). Fixes ISSUE-138, ISSUE-139, ISSUE-140 and ISSUE-149.

Stacked on #452 (both edit PYEGERIA_ISSUES.md). Until #452 merges, this diff also shows #452's commits. The new commit here is 78e84e77.

ISSUE-149: manifest fields on AnalyticFunctionSpec

  • AnalyticFunctionSpec gains these fields, all optional with defaults:
    • kind: routine | step, default routine;
    • source: an open string; an unknown value logs a warning (known values are in KNOWN_ANALYTIC_SOURCES: ods, egeria, resource);
    • version;
    • envelope: bool;
    • annotation_type;
    • resource_types;
    • family: the same meaning as FormatSet.family;
    • tags.
  • All 23 built-in registry entries still load, and trellis's RoutineManifest/StepManifest subclasses still validate against the new base. Once this ships, trellis-analytics can drop its own copies.

ISSUE-139: the result envelope on every output

  • The executor recognises a result's state (measured, nothing_found, not_established, not_applicable) in any of these shapes:
    • state/state_reason/subtitle;
    • resultState/resultStateReason;
    • a nested envelope dict;
    • an object's .envelope.
  • Every analytic output then carries "envelope": {state, reason, subtitle}, and charts get title: {text, subtitle}.
  • Pydantic results are returned as plain data.

ISSUE-140: chart only established answers

  • When an envelope is present, SERIES/BAR/PIE draw a chart only for an established answer: measured, or nothing_found (a real zero). For not_established and not_applicable they return the data and the state.

ISSUE-138: building non-JSON arguments

  • New ActionParameter.analytic_binders: a map from parameter name to a factory's dotted path. The factory is filled from the call params, so a routine taking a reader can be named by its own dotted path.

Compatibility: results without an envelope, and specs without binders, behave exactly as before. On trellis's side, tests/test_portal_tile.py:75 pins the old absence of a subtitle, which will change when trellis takes this release; the issue entry says so.

Test plan

  • tests/micro-tests/test_issue_138_140_149_analytic_envelope.py (13 tests: binders, envelope on DICT/BAR, gating, model results, unchanged shape without an envelope, manifest defaults/validation)
  • trellis-analytics' manifest.py subclasses validate against the new base (checked locally)
  • Full micro-test suite passes (1144 tests)
  • Documented in docs/output-formats-and-report-specs.md

🤖 Generated with Claude Code

…PROGRESS, dropping journal entries)

Reported by the egeria-workspaces-fs session.

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

Seven AssetMaker action/process queries (find_processes,
get_processes_by_category, get_action_targets,
get_actions_for_action_target, get_assigned_actions,
get_actions_for_sponsor, get_actions_for_requester) defaulted to
["IN_PROGRESS"], which silently dropped journal entries and every
finished action. _async_find_processes defaulted to [] while its sync
wrapper used ["IN_PROGRESS"], so the two disagreed. All 14 signatures
now default to None.

Behaviour change: callers that want only in-progress actions must pass
["IN_PROGRESS"] explicitly. No known caller relies on the old default
(checked with the egeria-workspaces-fs and trellis sessions). Noted for
the 6.2.3 release notes in BACKLOG.md.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…unction Dr.Egeria family); 137/141 shipped in 6.2.2

Handed off by the Resource Explorer PR/CI session on the owner's
instruction, from trellis' analytic walking-skeleton brief. A1-A5 of
the handoff were already logged as ISSUE-137..141 (137 and 141 are
fixed and released in 6.2.2).

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…ath that doesn't exist)

Reported by the RE PR/CI session; confirmed from AutomatedCurationResource
and a read-only live check. find_engine_actions("*") is the working route.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…dpoint (ISSUE-151)

get_engine_actions posted to automated-curation/engine-actions, which
AutomatedCurationResource does not map, so it always failed with a 404
(reported as "unable to connect"). EngineAction is an Asset in 6.2, so
find_engine_actions("*") is the list-all; print_engine_actions now uses
it. No callers outside egeria-python (checked egeria-workspaces-fs and
trellis). API removal noted for the 6.2.3 release notes.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…st fields (ISSUE-138/139/140/149)

Requested by trellis-analytics (the Analytic Library walking skeleton):
- ISSUE-149: AnalyticFunctionSpec gains optional kind (routine|step),
  source (open str; unknown values warn), version, envelope,
  annotation_type, resource_types, family and tags. Existing entries
  and trellis's manifest subclasses validate unchanged.
- ISSUE-139: the executor reads a result's state envelope (several
  carrier shapes) and returns it on every analytic output; charts get
  it as a subtitle.
- ISSUE-140: with an envelope, SERIES/BAR/PIE draw a chart only when
  the state is measured; otherwise the data and the state come back.
- ISSUE-138: ActionParameter.analytic_binders builds a non-JSON
  argument (e.g. a reader) from call params via a named factory, so a
  routine can be named by its own dotted path.
Results without an envelope behave exactly as before.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
nothing_found is an established answer (a real zero), so a chart of
zeros is honest; only not_established / not_applicable, whose numbers
are unknown, are never charted. Requested by the RE PR/CI session for
trellis-analytics, whose tile already charts nothing_found.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Declaration as a GovernanceActionType that Resource Explorer runs as an
engine host (async, recorded by Egeria); synchronous in-process runs for
screens and reports bypass Egeria and are not recorded.

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

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
@dwolfson
dwolfson merged commit cd57aa6 into odpi:main Oct 14, 2026
5 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