Skip to content

fix(#327): topic seeding on deploy + TOPIC_NOT_CONFIGURED - #328

Merged
mottych merged 1 commit into
devfrom
feature/issue-327-issue-root-cause-topic-config
Apr 21, 2026
Merged

fix(#327): topic seeding on deploy + TOPIC_NOT_CONFIGURED#328
mottych merged 1 commit into
devfrom
feature/issue-327-issue-root-cause-topic-config

Conversation

@mottych

@mottych mottych commented Apr 21, 2026

Copy link
Copy Markdown
Owner

Summary

Resolves investigation from PurposePath_Web #867: POST /ai/coaching/start with issue_root_cause_coaching failed when the LLMTopic row was missing in DynamoDB even though the topic exists in code.

Changes

  • Deploy workflows (deploy-dev, deploy-staging, deploy-production): after Pulumi coaching deploy, run python -m coaching.src.scripts.seed_topics (no --force-update) so new registry topics are created in purposepath-topics-{stage} and prompts in S3.
  • API: Missing DynamoDB config now returns HTTP 422 with "code": "TOPIC_NOT_CONFIGURED" and "topic_id" in detail. Unknown topic id still uses INVALID_TOPIC.

Testing

  • Unit: test_initiate_missing_llm_topic_row_raises_topic_not_configured, extended invalid-topic assertion.
  • Integration: test_start_session_topic_not_configured, extended invalid-topic response shape.

Closes #327 when merged.

- Run topic seed script post-deploy (dev/staging/prod) so registry topics get DynamoDB + S3 rows

- Distinguish missing LLMTopic row (TOPIC_NOT_CONFIGURED) from unknown topic id (INVALID_TOPIC); include topic_id in 422 detail

- Add unit and integration tests for error codes

Made-with: Cursor
@mottych
mottych merged commit dec87b4 into dev Apr 21, 2026
2 checks passed
@mottych
mottych deleted the feature/issue-327-issue-root-cause-topic-config branch April 24, 2026 00:05
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