isAuditsDisabled: disabled at org level for type is overruling enabled at site level for type
- Dominant language
- JavaScript
- Stars
- 5
- Forks
- 2
- Avg merge
- 19h 55m
- Merged PRs (30d)
- 33
Description
**Description**
isAuditsDisabled: disabled at org level for type is overruling enabled at site level for type
**To Reproduce**
Steps to reproduce the behavior:
Take an organization with config:
```
{
"config": {
"audits": {
"auditsDisabled": false,
"auditTypeConfigs": {
"organic-keywords": {
"disabled": true
},
"broken-backlinks": {
"disabled": true
},
"organic-traffic": {
"disabled": true
}
}
}
}
}
```
Take a site from the organization with auditConfig:
```
"auditConfig": {
"auditsDisabled": false,
"auditTypeConfigs": {
"organic-keywords": {
"disabled": true
},
"broken-backlinks": {
"disabled": false
},
"organic-traffic": {
"disabled": true
}
}
}
```
isAuditsDisabled(site, organization, 'broken-backlinks') returns true.
**Expected behavior**
Given an organization with config:
```
{
"config": {
"audits": {
"auditsDisabled": false,
"auditTypeConfigs": {
"organic-keywords": {
"disabled": true
},
"broken-backlinks": {
"disabled": true
},
"organic-traffic": {
"disabled": true
}
}
}
}
}
```
And a site from the organization with auditConfig:
```
"auditConfig": {
"auditsDisabled": false,
"auditTypeConfigs": {
"organic-keywords": {
"disabled": true
},
"broken-backlinks": {
"disabled": false
},
"organic-traffic": {
"disabled": true
}
}
}
```
isAuditsDisabled(site, organization, 'broken-backlinks') should return false.
**Additional context**
https://github.com/adobe/spacecat-shared/blob/main/packages/spacecat-shared-utils/src/helpers.js#L39
Contributor guide
Research direction
Start in packages/spacecat-shared-utils/src/helpers.js around line 39 and trace how isAuditsDisabled resolves organization and site auditTypeConfigs. Reproduce the broken-backlinks example, then verify that a site-level enabled value returns false despite the organization-level disabled value, while other configuration behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100