Skip to content

feat(config): unified config — Phase B#51

Merged
aksOps merged 23 commits into
mainfrom
phase-b/unified-config
Apr 23, 2026
Merged

feat(config): unified config — Phase B#51
aksOps merged 23 commits into
mainfrom
phase-b/unified-config

Conversation

@aksOps

@aksOps aksOps commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Phase B of the code-iq hardening plan: collapses the three-tier configuration (application.yml + .osscodeiq.yml + ~30 CLI flags) into a single authoritative codeiq.yml with deterministic layered resolution, first-class validation, per-field provenance tracking, and documented migration from the legacy schema.

  • Single source of truthcodeiq.yml at repo root, snake_case keys (camelCase accepted as deprecated alias for one release)
  • 5-layer resolution — built-in defaults → user-global → project → env (CODEIQ_*) → CLI (last wins)
  • New CLI commandscode-iq config validate (type-check + field-anchored errors, exit 0/1), code-iq config explain (per-leaf provenance table)
  • Legacy shim.osscodeiq.yml loads for one release with a deprecation WARN (per-path dedupe) and transparent flat-key-to-unified-shape translation
  • Spring wiring swappedCodeIqConfig bean is now produced via UnifiedConfigAdapter.toCodeIqConfig(unified); ~100 call sites unchanged
  • application.yml cleaned — only 4 Spring-owned keys remain (codeiq.neo4j.enabled, codeiq.neo4j.bolt.port, codeiq.cors.allowed-origin-patterns, codeiq.ui.enabled), all driving @ConditionalOnProperty / @Value
  • Docsdocs/codeiq.yml.example (authoritative schema reference), README §Configuration rewrite, CLAUDE.md §Configuration rewrite

23 commits, TDD per task. 3275 tests pass, 0 failures, 0 regressions. Exit-gate report at docs/superpowers/baselines/2026-04-17/PHASE-B-EXIT-GATE.md.

Follow-ups (post-release, tracked separately)

  • Retire legacy ProjectConfigLoader static methods + migrate Analyzer/CliOutput call sites — eliminates the last setter-mutation path
  • Freeze CodeIqConfig setters once legacy path is gone
  • Detector tree taxonomy refactor (jvm/markup/sql/systems)
  • SQL/migration detector + SQL_ENTITY NodeKind
  • Slice UnifiedConfigBeansTest to avoid full @SpringBootTest context

Test plan

  • CI green across all checks
  • mvn -B test on merge commit — expect 3275 pass
  • Smoke: create a temp codeiq.yml with serving.port: 9090, run `code-iq config explain`, confirm the row reads `PROJECT`
  • Smoke: rename it to .osscodeiq.yml, run a command, confirm deprecation WARN fires once
  • Regression check: existing `.osscodeiq.yml` with flat `max_depth: 25` still caps ego-graph depth

🤖 Generated with Claude Code

aksOps and others added 23 commits April 17, 2026 14:00
…nfigExplainSubcommand

Spring 7.0 deprecated this annotation. Fields are already private with
javadoc comments that document the nullable contract, so the annotation
is pure ceremony here. No behavior change; 11 config CLI tests still green.
Neo4jConfig and Map imports were left over from an earlier draft.
Build green; 6/6 adapter tests still pass.
…accepted as deprecated alias

Canonical keys are now snake_case across the board (matches CODEIQ_*
env var casing and the legacy .osscodeiq.yml schema users are migrating
from). camelCase spellings continue to load for one release as
deprecated aliases; each alias produces at most one WARN per file.

When both spellings appear for the same leaf, snake_case wins and a
conflict WARN fires naming the camelCase form as deprecated.

Full suite: 3275 tests pass, 0 failures (up from 3271 baseline).
Records the Task 14 verification pass against spec §3.6 (Pillar 1 —
Unified Config). All four acceptance criteria met; 3275/0/31 tests
green; no release blockers.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@aksOps aksOps merged commit 2292051 into main Apr 23, 2026
9 checks passed
@aksOps aksOps deleted the phase-b/unified-config branch April 26, 2026 05:52
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.

1 participant