Skip to content

test(view): cover ISSUE-86's caller-held bearer token in exec_report_spec - #11

Merged
dwolfson merged 1 commit into
mainfrom
chore/issue-86-executor-token-tests
Sep 7, 2026
Merged

test(view): cover ISSUE-86's caller-held bearer token in exec_report_spec#11
dwolfson merged 1 commit into
mainfrom
chore/issue-86-executor-token-tests

Conversation

@dwolfson

@dwolfson dwolfson commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Test-only. No production code changes.

Why

pyegeria/view/format_set_executor.py's token parameter — ISSUE-86, letting a caller that already holds an Egeria bearer token run a report without a password — is on main with no dedicated test.

It is not dormant. egeria-workspaces shipped 3dfb10b2 ("rebuild pyegeria-web/jupyter for 6.1.10, wire ISSUE-86 token param"), and Egeria Advisor's report_pipeline.py passes a caller-held token through this path so a Portal-SSO user can run reports without their password ever leaving the Portal. That is a live production path today.

If it regresses, the symptom is a 401 from Egeria that reads as an auth-configuration problem rather than a code one — an expensive thing to chase, and exactly the misdiagnosis this coverage prevents.

Provenance, stated plainly

These tests existed only on an unpushed local branch (claude/cranky-chebyshev-be2494), alongside a second, parallel implementation of the same feature that main had meanwhile gained by another route. Pushing that branch wholesale would have added a duplicate implementation and a PYEGERIA_ISSUES.md record citing a commit hash that exists only on that branch — main's own record is newer (fixed 2026-09-05). The tests were the part worth keeping, so they are salvaged here on their own.

They were written against that branch's _authenticate_client() helper, which main does not have. Verified they pass unchanged against main's inline implementation — 7 passed — so they exercise the behaviour rather than that refactor's shape.

What they cover

exec_report_spec / _run_report_spec with and without a caller-supplied token: that a supplied token is installed via set_bearer_token() rather than minting a fresh one, and that the no-token path still mints from user/user_pwd exactly as before.

🤖 Generated with Claude Code

…spec

format_set_executor.py's `token` parameter (ISSUE-86 — let a caller that
already holds an Egeria bearer token run a report without a password) is on
main with no dedicated test.

These tests existed only on an unpushed local branch,
claude/cranky-chebyshev-be2494, alongside a second, parallel implementation
of the same feature that main had meanwhile gained by another route.
Pushing that branch would have added a duplicate implementation; the tests
were the part worth keeping, so they are salvaged here on their own.

They were written against that branch's `_authenticate_client()` helper,
which main does not have — verified they pass unchanged against main's
inline implementation (7 passed), so they test the behaviour rather than
that refactor's shape.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@dwolfson
dwolfson merged commit 15b0318 into main Sep 7, 2026
2 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