Skip to content

Comments

CCM-14201 - Client Subscription Management#32

Open
rhyscoxnhs wants to merge 4 commits intofeature/CCM-14200-event-driven-callback-deliveryfrom
feature/CCM-14201
Open

CCM-14201 - Client Subscription Management#32
rhyscoxnhs wants to merge 4 commits intofeature/CCM-14200-event-driven-callback-deliveryfrom
feature/CCM-14201

Conversation

@rhyscoxnhs
Copy link

Description

Context

Type of changes

  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I am familiar with the contributing guidelines
  • I have followed the code style of the project
  • I have added tests to cover my changes
  • I have updated the documentation accordingly
  • This PR is a result of pair or mob programming
  • If I have used the 'skip-trivy-package' label I have done so responsibly and in the knowledge that this is being fixed as part of a separate ticket/PR.

Sensitive Information Declaration

To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.

  • I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.

@rhyscoxnhs rhyscoxnhs requested review from a team as code owners February 16, 2026 15:05
@rhyscoxnhs rhyscoxnhs changed the base branch from main to feature/CCM-14199-foundation February 16, 2026 15:06
@rhyscoxnhs rhyscoxnhs requested a review from a team as a code owner February 19, 2026 14:06

```bash
npm --workspace scripts/client-subscriptions-management get-by-client-id \
--bucket-name my-bucket \
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we specify --environment and it figures out the bucket name itself?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bucket naming convention follows the pattern: {project}-{account_id}-{region}-{environment}-{component}-{name}. To derive the bucket name from just --environment, we would need to:

  • Know the AWS account ID (requires either hardcoding account mappings or making AWS STS API calls)
  • Know the project name, region, and component name
  • Maintain environment-to-account mappings

While this is definitely possible (we could make an STS GetCallerIdentity call), it adds complexity and requires AWS credentials to be properly configured just to construct the bucket name.

The current approach is more explicit and gives users flexibility to override if needed. Users can set the CLIENT_SUBSCRIPTION_BUCKET_NAME environment variable once in their shell profile to avoid repeating it.

Comment on lines +48 to +49
--channel-statuses DELIVERED FAILED \
--supplier-statuses READ REJECTED \
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only one of --channel-status or --supplier-status (or --message-statuses for that matter) can be provided at once. Do we check?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My current interpretation is that both --channel-statuses and --supplier-statuses are required together for channel status subscriptions. I based this on the data model specification (data-model.md lines 312-313) which states:

  • ChannelStatuses must be a non-empty array of valid channel status values
  • SupplierStatuses must be a non-empty array of valid supplier status values

However, I realize there's an alternate interpretation: these validation rules might mean "when present, must be non-empty", rather than "must always be present". This would allow subscriptions to filter on:

  • Only channel statuses (e.g., only DELIVERED events)
  • Only supplier statuses (e.g., only 'read' events)
  • OR both together (e.g., DELIVERED + received/notified/read)

In this case, we'd need validation to ensure at least one is provided (not both omitted), but they wouldn't both be required.

Could you confirm which interpretation matches the intended design?

@rhyscoxnhs rhyscoxnhs requested a review from cgitim February 19, 2026 16:00
@rhyscoxnhs rhyscoxnhs changed the base branch from feature/CCM-14199-foundation to feature/CCM-14200-event-driven-callback-delivery February 24, 2026 15:08
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.

3 participants