CLI-694 Remove legacy state writes from Claude integration#554
Conversation
✅ Deploy Preview for sonarqube-cli canceled.
|
2efde54 to
b4f7fa0
Compare
Code Review ✅ Approved 1 resolved / 1 findingsRemoves legacy state storage for Claude integration and migrates to declarative state management, resolving the duplicate SQAA hook magic string issue. ✅ 1 resolved✅ Quality: SQAA hook feature id duplicated as a magic string
OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
sophio-japharidze-sonarsource
left a comment
There was a problem hiding this comment.
removes sonar-a3s entries from state.json when SQAA hooks are installed via migration test still asserts agentExtensions contains sonar-sqaa. That only passes because runMigrations() → migrateToExtensionsRegistry() still writes legacy state
Please have a look at runMigrations code as well, and adjust the test to assert the declarative feature
7fe3b6c to
a0e5971
Compare
|
sophio-japharidze-sonarsource
left a comment
There was a problem hiding this comment.
Let's hope it's all good 😂
Code Review ✅ Approved 1 resolved / 1 findingsMigration to declarative state for Claude integration is complete, removing legacy state writes and redundant ✅ 1 resolved✅ Quality: SQAA hook feature id duplicated as a magic string
OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |



Summary by Tom
resolveSqaaProjectKeywas the last piece of logic still reading the deprecatedagentExtensionsstate field (everything else was migration or fallback only). It now reads the SQAA project key from the declarativesonar-sqaa-hookfeature inintegrations.installed, finishing the Claude integration's migration to declarative state.updateStateAfterConfiguration) and related helpers (e.g.findExtensionsByProject).agentExtensionsis now referenced only in migration tests; all other logic tests assert against the declarative state. Updated thewithSqaaExtensionhelper inenvironment-builder.tsto seed the new structure.SQAA_HOOK_FEATURE_IDconstant (_common/sqaa-entitlement.ts), reused across the Claude/Codex declarations, the reader, and the test harness.Summary by Gitar
src/cli/commands/integrate/_common/state.tsandsrc/cli/commands/integrate/claude/state.ts.agentExtensionsmanagement insrc/lib/state-manager.ts.integrations.installedstate instead of the deprecated registry.resolveSqaaProjectKeyto readsonar-sqaa-hookfeatures directly from declarative integration state.analyzeSqaato reflect the transition from legacy extensions to integrated feature state.This will update automatically on new commits.