Skip to content

Conversation

@HollywoodTonight
Copy link
Contributor

The Brand Sentiment Guidelines Store allows customers to define and configure topics and guidelines for sentiment analysis. Topics represent subjects of interest (e.g., "2026 Corvette Stingray", "BMW XM Latest") with associated sub-prompts, while Guidelines define analysis focus areas with specific audit type associations.

Please ensure your pull request adheres to the following guidelines:

  • make sure to link the related issues in this description
  • when merging / squashing, make sure the fixed issue references are visible in the commits, for easy compilation of release notes

Related Issues

Thanks for contributing!

Copy link
Contributor

@iuliag iuliag left a comment

Choose a reason for hiding this comment

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

Nothing to be addressed implementation-wise.

Please add integration tests as well: https://github.com/adobe/spacecat-shared/tree/main/packages/spacecat-shared-data-access/test/it

@github-actions
Copy link

This PR will trigger a minor release when merged.

Adds new entities for Brand Sentiment Guidelines Store:

SentimentTopic:
- Composite key: siteId + topicId
- Fields: name, description, topicName, subPrompts, guidelineIds, audits, enabled
- Methods for managing sub-prompts, guidelines, and audits
- Query by siteId, enabled status, and audit type

SentimentGuideline:
- Composite key: siteId + guidelineId
- Fields: name, instruction, enabled
- Query by siteId and enabled status

Both entities include full unit test coverage.
Guidelines define HOW to analyze (specific audit type associations),
while Topics define WHAT to analyze. This separation allows:
- Same topic to be analyzed differently on different platforms
- Platform-specific guidelines (e.g., only for YouTube)
- Filter guidelines by audit type at query time

Changes:
- Remove audits, topicName from SentimentTopic schema/model
- Add audits field to SentimentGuideline schema/model
- Add allBySiteIdAndAuditType collection method to SentimentGuideline
- Remove allBySiteIdAndAuditType from SentimentTopic
- Update TypeScript definitions and tests
…llections

Per PR feedback - "Paginated" suffix is redundant since all "all..." methods
should be paginated by default.
- Add fixture data for sentiment topics and guidelines
- Add integration tests covering CRUD operations
- Add tests for custom methods and collection methods
- Add validation tests
- Add UUID auto-generation default to topicId and guidelineId schemas
- Fix removeForSiteId to extract .data from paginated response
- Fix findByIds to extract .data from paginated response
…t method names

- Add generateCompositeKeys() to SentimentGuideline model (siteId + guidelineId)
- Add generateCompositeKeys() to SentimentTopic model (siteId + topicId)
- Fix test to use correct method names: enableAudit, disableAudit, isAuditEnabled
- Handle getAudits() returning null for empty sets
@HollywoodTonight HollywoodTonight force-pushed the brand-sentiment-guidelines branch from b2d71b3 to a30c06f Compare January 30, 2026 11:18
HollywoodTonight and others added 3 commits January 30, 2026 14:45
- Add tests for empty allowedPaths in byocdn-imperva and byocdn-other
- Add tests with log parameter for getTemporalCondition
- Fix allBySiteId stubs to return { data, cursor } format matching implementation
- Add generateCompositeKeys tests for both sentiment models
@iuliag iuliag changed the title Brand sentiment guidelines feat: add brand sentiment guidelines Jan 30, 2026
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