test(view): cover ISSUE-86's caller-held bearer token in exec_report_spec - #11
Merged
Merged
Conversation
…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>
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.
Test-only. No production code changes.
Why
pyegeria/view/format_set_executor.py'stokenparameter — ISSUE-86, letting a caller that already holds an Egeria bearer token run a report without a password — is onmainwith no dedicated test.It is not dormant.
egeria-workspacesshipped3dfb10b2("rebuild pyegeria-web/jupyter for 6.1.10, wire ISSUE-86 token param"), and Egeria Advisor'sreport_pipeline.pypasses 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 thatmainhad meanwhile gained by another route. Pushing that branch wholesale would have added a duplicate implementation and aPYEGERIA_ISSUES.mdrecord 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, whichmaindoes not have. Verified they pass unchanged againstmain's inline implementation — 7 passed — so they exercise the behaviour rather than that refactor's shape.What they cover
exec_report_spec/_run_report_specwith and without a caller-supplied token: that a supplied token is installed viaset_bearer_token()rather than minting a fresh one, and that the no-token path still mints fromuser/user_pwdexactly as before.🤖 Generated with Claude Code