fix(#313): Service-token auth docs, job polling denial logs, tests - #314
Merged
Merged
Conversation
- Document coaching vs api.{env} BFF 403 vs coaching 401 in email-insights §4.6.1
- Log async_job_auth.denied with denial_reason; user_auth.denied for inactive users
- Add v2 async_execute.started has_bearer_header for observability
- Unit tests: GET /ai/jobs accepts service_enrichment JWT (snake/camel token type)
Made-with: Cursor
….1 + §4.7) Made-with: Cursor
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.
Summary
Closes the PurposePath_AI side of #313: document the coaching vs BFF auth boundary, improve CloudWatch-friendly denial logging for async job polling, and add regression tests for
service_enrichmentJWT access toGET /api/v1/ai/jobs/{jobId}.Notes
https://api.dev.purposepath.app/.../execute-asyncis expected to be fixed in PurposePath_Api (BFF policies), not coaching.detailfor invalid polling tokens; denials now includeasync_job_auth.denied denial_reason=....Validation
uv run pytest tests/unit/api/routes/test_ai_job_status_route.py tests/unit/api/routes/test_ai_execute_async.py -vruff check/format+mypyon touched Python files