You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .agents/sow/current/SOW-0015-20260605-codacy-scope-and-maintainability.md
+51-5Lines changed: 51 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,7 @@ Facts:
23
23
- Codacy Cloud currently reports 0 issues, 88% coverage, 42% complex files, and 41% duplicated files for commit `dbf77a8595b01e3e335db41883d2d5f8b72dfac7`.
24
24
-`.codacy/codacy.config.json` currently has top-level `"exclude": []`, so test and benchmark paths are not globally excluded in the committed local Codacy configuration.
25
25
- The installed Codacy Cloud CLI skill states that committing `.codacy/codacy.config.json` does not by itself change Codacy Cloud; `codacy tools ... --import` is required.
26
+
- Codacy's official Cloud configuration file documentation says Cloud path ignores come from a repository-root `.codacy.yml` or `.codacy.yaml` file with `exclude_paths`, not from `.codacy/codacy.config.json`.
26
27
-`SOW-0013` recorded the decision to keep complexity and duplication metrics active and fix real source hotspots.
27
28
-`SOW-0014` already implemented substantial production-source organization work, including C protocol splits, Rust/Go lookup codec splits, Rust raw service splits, and C service splits.
- Codacy Cloud goals are: max duplicated files 10%, max complex files 10%, file duplication block threshold 1, and file complexity value threshold 20.
65
66
-`.codacy/codacy.config.json` has partial Opengrep tool-specific excludes for a few Windows fixture files, but top-level global excludes are empty.
67
+
- Codacy Cloud API `listIgnoredFiles` reports `hasCodacyConfigurationFile: false` for commit `5a55246b9b4698317bdf8440c898369034a1f408`, proving Cloud did not treat `.codacy/codacy.config.json` as the repository-level Cloud configuration file.
66
68
- CodeQL is intentionally broader and still scans `src`, `tests`, and `bench`; this SOW is about Codacy maintainability scope, not weakening GitHub code scanning.
67
69
68
70
Risks:
@@ -89,12 +91,16 @@ Evidence reviewed:
89
91
-`SOW-0014` records completed C/Rust/Go production-source organization work and says further complexity or duplication work should start from fresh Codacy/GitHub evidence.
90
92
- Codacy Cloud CLI repository query reports current metrics for commit `dbf77a8595b01e3e335db41883d2d5f8b72dfac7`.
91
93
- Codacy Cloud CLI skill states `.codacy/codacy.config.json` is local-only until imported with `codacy tools ... --import`.
94
+
- Codacy official docs state Cloud repository configuration uses root `.codacy.yml` or `.codacy.yaml`, starting with `---`, and path ignores are defined under `exclude_paths`.
95
+
- Codacy Cloud API file queries after commit `5a55246b9b4698317bdf8440c898369034a1f408` still list `tests/**`, `bench/**`, Go `*_test.go`, and Rust `*_tests.rs` files in complexity and duplication data.
92
96
93
97
Affected contracts and surfaces:
94
98
95
99
- Local Codacy configuration file `.codacy/codacy.config.json`.
100
+
- Cloud Codacy configuration file `.codacy.yml`.
96
101
- Codacy Cloud repository configuration after import.
97
102
- Codacy Cloud maintainability metrics and issue scope.
- No protocol, API, wire format, runtime behavior, or public SDK behavior should change during the exclusion step.
100
106
@@ -119,15 +125,18 @@ Sensitive data handling plan:
119
125
Implementation plan:
120
126
121
127
1. Update `.codacy/codacy.config.json` global excludes to include `tests/**` and `bench/**`.
122
-
2. Validate JSON syntax and run local Codacy analysis enough to prove the config is accepted.
123
-
3. Commit and push the configuration and SOW record.
124
-
4. Import the committed Codacy configuration into Codacy Cloud and trigger reanalysis.
125
-
5. Record refreshed Codacy metrics.
126
-
6. Select the next production-file maintainability target from refreshed Codacy data or local production-source approximation if Codacy does not expose contributors.
128
+
2. Add root `.codacy.yml` with Cloud-native `exclude_paths` for test and benchmark files.
129
+
3. Add `.codacy.yml` and `.codacy.yaml` to the Codacy local-analysis workflow path filters.
130
+
4. Validate JSON/YAML syntax and run local Codacy analysis enough to prove the config is accepted.
131
+
5. Commit and push the configuration and SOW record.
132
+
6. Import the committed Codacy tool configuration into Codacy Cloud and trigger reanalysis.
133
+
7. Record refreshed Codacy metrics.
134
+
8. Select the next production-file maintainability target from refreshed Codacy data or local production-source approximation if Codacy does not expose contributors.
127
135
128
136
Validation plan:
129
137
130
138
-`jq empty .codacy/codacy.config.json`
139
+
- YAML parser check for `.codacy.yml`.
131
140
-`codacy-analysis analyze --output-format json` with the updated configuration.
- Committed and pushed `5a55246b9b4698317bdf8440c898369034a1f408`.
205
+
- Imported `.codacy/codacy.config.json` to Codacy Cloud.
206
+
- The import temporarily disabled Cloud Revive because the local file did not contain Revive. Revive was immediately re-enabled in Cloud.
207
+
- Added Revive back to `.codacy/codacy.config.json` with the 21 enabled Cloud Revive patterns so future tool imports do not disable it again.
208
+
- Verified local Codacy Analysis CLI `0.8.0` is the latest npm-published version available locally, but its Revive adapter reports a non-fatal `findings is not iterable` invocation error even when scanning one Go file. The Revive binary itself runs, and Cloud Revive remains enabled.
209
+
- Checked Codacy Cloud after commit `5a55246b9b4698317bdf8440c898369034a1f408`:
- Added Cloud-native `.codacy.yml` with `exclude_paths` for:
220
+
-`bench/**`
221
+
-`benchmarks-*`
222
+
-`tests/**`
223
+
-`**/*_test.go`
224
+
-`**/*_tests.rs`
225
+
-`**/tests.rs`
226
+
- Added `.codacy.yml` and `.codacy.yaml` to the Codacy local-analysis workflow path filters.
227
+
- Validated the new local state:
228
+
-`.codacy.yml` parses as YAML and contains the intended `exclude_paths`.
229
+
-`.codacy/codacy.config.json` parses as JSON and now includes Revive with 21 patterns.
230
+
-`git diff --check` passed.
231
+
-`bash .agents/sow/audit.sh` passed.
232
+
-`codacy-analysis analyze . --output-format json` exited with Codacy analysis status 0, produced 0 issues, and produced 1 known Revive adapter error:
233
+
- Checkov: success, 11 files, 0 issues.
234
+
- Opengrep/Semgrep: success, 265 files, 0 issues.
235
+
- Trivy: success, 266 files, 0 issues.
236
+
- cppcheck: success, 45 files, 0 issues.
237
+
- ShellCheck: success, 3 files, 0 issues.
238
+
- Spectral: success, 11 files, 0 issues.
239
+
- Revive: partial, 90 files, 0 issues, 1 `findings is not iterable` invocation error.
240
+
- The previous pushed commit `5a55246b9b4698317bdf8440c898369034a1f408` has green CI for CodeQL, Static Analysis, Supply Chain Security, Codacy Local Analysis, Codacy Coverage, and the Codacy GitHub check.
0 commit comments