Skip to content

Deploy staging fixes - #188

Merged
mottych merged 21 commits into
stagingfrom
dev
Dec 25, 2025
Merged

Deploy staging fixes#188
mottych merged 21 commits into
stagingfrom
dev

Conversation

@mottych

@mottych mottych commented Dec 23, 2025

Copy link
Copy Markdown
Owner

Fix staging deploy blockers: langchain verbose guard, coverage config, aligned dev deps.

@pulumi

pulumi Bot commented Dec 23, 2025

Copy link
Copy Markdown

🍹 The Update for mottych/purposepath-coaching-api/dev (at 5232ee4) was successful.

✨ Neo Explanation

A code update is being deployed to the coaching API Lambda function via a new Docker container image. This is a routine deployment that updates only the application code while preserving all infrastructure and data.

Root Cause Analysis

This deployment was triggered by a code change in the repository. The developer modified the application code in the coaching API, which triggered a rebuild of the Docker container image with a new build timestamp (2025-12-25T22:16:03).

Dependency Chain

  1. Code changes in the repository caused the Docker image to be rebuilt with a new context digest
  2. The new Docker image was pushed to ECR with a different SHA256 digest (55ab98895f... replacing c9c0200edc...)
  3. The Lambda function automatically picked up the new container image URI to deploy the updated code

Risk analysis

Low Risk - This is a standard code deployment with no infrastructure changes. The Lambda function is being updated with new application code but retains all its configuration, permissions, and connections to other resources (DynamoDB table, API Gateway). No stateful resources are affected.

Resource Changes

    Name            Type                          Operation
~   coaching-image  docker:index/image:Image      update
~   coaching-api    aws:lambda/function:Function  update

@pulumi

pulumi Bot commented Dec 23, 2025

Copy link
Copy Markdown

🍹 The Update for mottych/purposepath-coaching-infrastructure/staging (at 094b9b3) was successful.

✨ Neo Explanation

Refactoring the coaching conversations table to support multi-tenancy with snake_case naming, which requires replacing the DynamoDB table and will delete all existing conversation data.

Root Cause Analysis

This deployment was triggered by a code change in the repository that restructures the DynamoDB table schema for coaching conversations. The developer changed the attribute naming convention from camelCase to snake_case (conversationIdconversation_id, userIduser_id) and introduced a multi-tenant architecture by adding tenant_id as the new partition key with user_id as the range key.

Dependency Chain

The schema changes to the DynamoDB table are fundamental enough that AWS cannot modify the existing table in-place. When you change a table's hash key (partition key) or add/modify global secondary indexes in certain ways, DynamoDB requires a full table replacement. This means:

  1. New table created with the updated schema (tenant_id as hash key, new GSI structure)
  2. Old table deleted after the new one is provisioned
  3. Point-in-time recovery enabled on the new table (previously disabled)
  4. The S3 bucket receives minor tag updates but continues operating normally

Risk analysis

HIGH RISK - This operation will replace the DynamoDB table, resulting in permanent data loss. All existing conversation records in the coaching-conversations table will be deleted when the old table is removed. The replacement is necessary because you cannot change a table's partition key on an existing table. If you have production data in this staging environment that needs to be preserved, you must:

  1. Export/backup the existing table data before applying this change
  2. Apply the infrastructure change to create the new table
  3. Migrate and transform the data to match the new schema (including populating the new tenant_id field)

Resource Changes

    Name                     Type                      Operation
+-  coaching-conversations   aws:dynamodb/table:Table  create-replacement
~   coaching-prompts-bucket  aws:s3/bucket:Bucket      update

@pulumi

pulumi Bot commented Dec 23, 2025

Copy link
Copy Markdown

🍹 The Update for mottych/purposepath-coaching-api/staging (at 094b9b3) was successful.

✨ Neo Explanation

A code change triggered a new Docker image build and Lambda function update. The deployment updates the running application code without affecting infrastructure or data storage.

Root Cause Analysis

This deployment was triggered by a code change in the repository. The developer modified application code or dependencies, which triggered a Docker image rebuild with a new build timestamp (2025-12-23T18:49:12). The build context digest changed from the previous version, indicating actual file modifications rather than just a re-run of the same code.

Dependency Chain

  1. Code changes triggered a new Docker image build (coaching-image)
  2. The new image was pushed to ECR with a different SHA256 digest (4973c18... replacing ce80387...)
  3. The Lambda function (coaching-api) is updated to reference the new container image URI
  4. No downstream resources are affected - this is a contained deployment update

Risk Analysis

Risk Level: Low

This is a standard code deployment with no risky changes. The Lambda function is being updated in-place (not replaced), which means no downtime or resource recreation. Application state is stored in DynamoDB (not part of this update), so there's no risk of data loss.

Resource Changes

    Name            Type                          Operation
~   coaching-image  docker:index/image:Image      update
~   coaching-api    aws:lambda/function:Function  update

mottych and others added 19 commits December 24, 2025 18:21
…nts, including listing, creating, updating, and deleting KPIs. Documented request/response formats, business rules, and error handling. Deprecated old goal linking method and introduced new linked goals in KPI details.
Synced from: PurposePath_Web@2f6dab6

Original commit: document cleanup

Original author: Motty Chen

Branch: dev

[skip ci]
Synced from: PurposePath_Api@fa9d029

Original commit: Merge branch 'feature/issue-399-people-missing-fie

Original author: Motty Chen

Branch: dev

[skip ci]
Synced from: PurposePath_Api@bc11356

Original commit: docs(#399): Update people-service.md to match actu

Original author: Motty Chen

Branch: dev

[skip ci]
Synced from: PurposePath_Api@157cc98

Original commit: Revert "docs(#399): Update people-service.md to ma

Original author: Motty Chen

Branch: dev

[skip ci]
…193

- Update BusinessApiClient methods for new API endpoints:
  * get_user_goals: Change ownerId→personId param, handle paginated response
  * get_operations_actions: Handle double-nested response structure
  * get_operations_issues: Update endpoint path and use statusCategory filter

- Update retrieval_method_registry field mappings:
  * Goals: title→name, intent→description, horizon→type
  * Actions: due_date→dueDate, assigned_to→assignedPersonName, pending→not_started
  * Issues: business_impact→impact, assigned_to→assignedPersonName, status→statusConfigId

Aligns with refactored .NET API specs in docs/shared/Specifications/user-app/
…#193

- Update test_get_user_goals to use personId instead of ownerId
- Update test_get_operations_issues to use /api/issues endpoint and statusCategory param
- Update admin_ai_specifications.md with topic test endpoint details
- Update all tests to use new nested object structure (scan_id, captured_at, etc.)
- Replace deprecated fields (products, niche, ica) with new fields (company_profile, target_market, offers, credibility, conversion)
- All 5 previously failing onboarding tests now pass
…s-environment execution

This fixes an architectural bug where EventBridge rules from multiple
environments (dev/staging) would trigger on the same events, causing
the staging Lambda to execute dev jobs.

Changes:
- Add stage filter to EventBridge rule event pattern in Pulumi config
- Add stage parameter to EventBridgePublisher to include in event details
- Update dependency injection to pass stage from config to publisher

This ensures events published from dev will only trigger dev rules,
and staging events will only trigger staging rules.
@mottych
mottych merged commit 5232ee4 into staging Dec 25, 2025
7 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.

2 participants