Repository navigation
Say why an analytic result is absent instead of returning it as data (ISSUE-171) - #518
Merged
Merged
Conversation
An analytic function can now say what its results mean: result kind, measures with unit, as-of and basis, and the four absence sentences. It is the minimum of trellis-analytics' Declaration, with the same field names, so trellis declarations validate here (all 42 in Resource Explorer's analysis catalog do). Optional; existing entries unchanged. Claude-Session: https://claude.ai/code/session_015pdMuPkqttD1yKAKJLS9Fc Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…(ISSUE-171) A not_established or not_applicable result now comes back from exec_report_spec as kind "absent" with the function's declared absence sentence (ISSUE-170), on every output format, with no top-level data; a partial result rides under "detail". nothing_found keeps its data or chart and carries the measured_nothing sentence. A function with no declaration gets words built from its own reason, marked declared=False. not_permitted is used only when the result claims it. Claude-Session: https://claude.ai/code/session_015pdMuPkqttD1yKAKJLS9Fc Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…ration Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com> # Conflicts: # PYEGERIA_ISSUES.md
…-spec Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com> # Conflicts: # PYEGERIA_ISSUES.md
…port-spec Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com> # Conflicts: # PYEGERIA_ISSUES.md
This was referenced Oct 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #517 (ISSUE-170) — merge that first; until then this PR's diff also shows its commit.
When an analytic function's result is not a measured value,
exec_report_specnow says so instead of returning it as ordinary data orempty(pyegeria/view/format_set_executor.py):{"kind": "absent", "content": <sentence>, "absence": {...}, "envelope": {...}}on every output format. There is no top-leveldata; a partial result rides underdetail.absenceblock; a declared chart's subtitle is themeasured_nothingsentence.absenceholds the state, the sentence, the reason anddeclared. The sentence comes from the function's registereddeclaration.absence(ISSUE-170), looked up by registry name or by dotted path. A function with no declaration gets words built from its own reason, withdeclared: False.not_establishedbecomesnot_permittedonly when the result says so ("absence": "not_permitted"); the reason text is never parsed.Consumers: Egeria Advisor (trellis) should handle
kind: "absent"explicitly; its fallback already showscontent.Tests:
tests/micro-tests/test_issue_171_state_aware_report_spec.py(9 tests running each branch end to end), plus three ISSUE-140 tests updated to the new shape. All micro-tests pass.Note: this is one of four related PRs (ISSUE-169..172). Each adds an entry near the top of
PYEGERIA_ISSUES.md, so whichever merges later needs a trivial conflict resolution there.🤖 Generated with Claude Code
https://claude.ai/code/session_015pdMuPkqttD1yKAKJLS9Fc