Skip to content

Conversation

@tathagat2241
Copy link
Contributor

@tathagat2241 tathagat2241 commented Jan 6, 2026

🎯 Objective

Allow Slack-triggered audits to run without permanently enabling sites, while maintaining the enabled check for scheduled audits. This addresses the issue where users forget to disable sites after one-off audits, leading to unnecessary scheduled audit runs and increased costs.

📝 Changes

Core Logic Updates

  • src/common/audit-utils.js

    • Added auditContext parameter (default: {}) to isAuditEnabledForSite() function
    • Implemented bypass logic: when auditContext.slackContext is present, skip the enabled check
    • Entitlement checks remain enforced for ALL audits (no bypass)
    • Added logging for Slack one-off audit detection
  • src/common/runner-audit.js

    • Extract auditContext from SQS message
    • Pass auditContext to isAuditEnabledForSite()
  • src/common/step-audit.js

    • Extract auditContext from SQS message
    • Pass auditContext to isAuditEnabledForSite()

🔗 Related Changes

This PR works in conjunction with:

🚀 Deployment Notes

  1. Deploy this PR FIRST before deploying the api-service PR
  2. This change is safe to deploy independently (backward compatible)
  3. No configuration changes required

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
  • If data sources for any opportunity has been updated/added, please update the wiki for same opportunity.

Related Issues

https://jira.corp.adobe.com/browse/SITES-38965

Thanks for contributing!

@codecov
Copy link

codecov bot commented Jan 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions
Copy link

This PR will trigger a minor release when merged.

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