Skip to content

feat(installer): default cross_service_resolution to brownfield_only on install#322

Merged
HumanBean17 merged 1 commit into
masterfrom
feat/brownfield-by-default
Jun 14, 2026
Merged

feat(installer): default cross_service_resolution to brownfield_only on install#322
HumanBean17 merged 1 commit into
masterfrom
feat/brownfield-by-default

Conversation

@HumanBean17

Copy link
Copy Markdown
Owner

What

Auto cross-service resolution is currently weak and can produce noisy / false-positive cross-service edges. This makes the safe default (brownfield_only) the out-of-the-box experience for new installs.

Change

generate_yaml_config now seeds the generated .java-codebase-rag.yml with:

cross_service_resolution: brownfield_only

In brownfield_only mode, a cross-service edge survives only when both endpoints are sourced from brownfield layers (_is_brownfield_sourced in build_ast_graph.py); auto-derived candidates are demoted to unresolved.

Uses config.setdefault(...), so:

  • Fresh install → key written as brownfield_only.
  • Reinstall / --update over a config without the key → seeded; other user-managed keys untouched.
  • Reinstall over a config that explicitly set auto → preserved, never clobbered.

Why installer-only (not a runtime default flip)

  • No disruption to current users — the runtime default in graph_enrich.py / build_ast_graph.py stays auto, so existing setups (and any config lacking the key) see no behavior change until they reinstall.
  • No existing tests require updating — only adds 3 new unit tests on generate_yaml_config (fresh-install seeding, explicit-auto preservation, absent-key seeding with an existing user key preserved).

Verification

  • pytest tests/test_installer.py → 76 passed (incl. 3 new tests).
  • pytest tests/test_cross_service_resolution_flag.py → 8 passed (runtime default confirmed unchanged).

🤖 Generated with Claude Code

…on install

Auto cross-service resolution is weak and can produce noisy / false-positive
edges. Seed `cross_service_resolution: brownfield_only` into the generated
.java-codebase-rag.yml during `java-codebase-rag install`, so only
evidence-backed cross-service edges survive by default.

Uses setdefault so an explicit user choice (e.g. `auto`) is never clobbered
on re-run update; existing configs without the key are unaffected until
reinstall. Runtime default stays `auto`, so current users see no behavior
change and no existing tests require updating.

Co-Authored-By: Claude <noreply@anthropic.com>
@HumanBean17 HumanBean17 merged commit 7a29e83 into master Jun 14, 2026
1 check passed
HumanBean17 added a commit that referenced this pull request Jun 15, 2026
Catch-up: master advanced (#322 installer cross_service_resolution,
#323 config embedding.model resolution, #325 version 0.6.2, #326 PR-1
progress.py) while the index-output-rework stack was based on #320.
This merges those in so the catch-up PR (#330) carries only PR-2/3/4.

Conflicts resolved (both add/add, feature branch is the superset):
- java_codebase_rag/progress.py  (master had PR-1 state; branch has
  PR-1 + CallbackRenderer/make_relay/build_index_progress_context)
- tests/test_progress.py         (master had PR-1's 14 tests; branch
  adds PR-2/3/4 tests)

Auto-merged cleanly: installer.py (#322 + PR-4), pyproject.toml
(version 0.6.2 + rich>=14,<15), tests/test_installer.py.

Verified: ruff clean; full suite 833 passed, 13 skipped (heavy-gated).

Co-Authored-By: Claude <noreply@anthropic.com>
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