Skip to content

refactor(core): split settings into domain owners - #1265

Merged
Astro-Han merged 1 commit into
apache:mainfrom
me2seeks:refactor/1084-core-settings-split
Jul 20, 2026
Merged

refactor(core): split settings into domain owners#1265
Astro-Han merged 1 commit into
apache:mainfrom
me2seeks:refactor/1084-core-settings-split

Conversation

@me2seeks

@me2seeks me2seeks commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • extract bot-chat types, defaults, merging, and readiness normalization into bot-chat-settings.ts, and move package-local bot consumers to that owner
  • move web-search credential reconciliation and persisted normalization into web-search.ts, together with their focused tests
  • distinguish persisted AppNetworkSettings from runtime RuntimeNetworkSettings, while keeping both existing NetworkSettings imports as deprecated compatibility aliases
  • add focused behavior coverage and an extraction contract for public compatibility, ownership, and one-way dependency direction

The existing readiness, allowlist, and credential-safety comments move with their implementations; only stale function and source-location references were updated. Runtime behavior and persisted settings shapes are unchanged.

Refs #1084.

Verification

  • npm run build — passed
  • npm run typecheck — passed
  • Core test suite — 1,130 passed, 0 failed
  • targeted Desktop bot-runtime and settings-network suites — 10 passed, 0 failed
  • npm run test:dist — passed; all workspace tests passed
  • npm run lint — passed
  • npm run format:check — passed after rebasing onto main@bfb9ba83
  • git diff origin/main...HEAD --check — passed
  • git range-diff against the pre-rebase commit — patch equivalent

Visual validation is not applicable: this is a behavior-neutral settings module extraction with no UI changes.

Review focus

  • settings.ts remains the composition and compatibility surface; package-local bot consumers import their real owner directly
  • the new bot-chat and web-search owners do not import back from settings.ts
  • the persisted and runtime network contracts now have unambiguous canonical names without breaking their previous import paths

Move bot-chat types, defaults, merging, and readiness normalization into a package-local owner, then migrate package-local consumers to the leaf while keeping the existing settings and root exports compatible.

Move web-search credential reconciliation beside its settings model and give the persisted and runtime network contracts distinct canonical names, with deprecated NetworkSettings aliases for compatibility. Add focused behavior tests and a source-boundary contract.

Behavior and persisted shapes are unchanged. Part of apache#1084.
@me2seeks
me2seeks force-pushed the refactor/1084-core-settings-split branch from 4243813 to 1351a73 Compare July 20, 2026 09:42
@me2seeks

Copy link
Copy Markdown
Contributor Author

The branches for this PR and #1261 have been rebased onto the latest green main (bfb9ba83). The new fork CI runs are waiting for maintainer approval before any jobs can start:

Could a maintainer approve both runs when convenient? Both rebases are patch-equivalent, and local build, lint, format, typecheck, and targeted package tests pass. Thanks!

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No concrete findings. I checked the bot-chat and web-search moves against their original implementations, the compatibility exports from the root and settings entry points, and the persisted/runtime network aliases. The extraction preserves the existing shapes and keeps the new leaf modules independent from settings.ts. Typecheck, test, and e2e are green.

@Astro-Han
Astro-Han merged commit c1953de into apache:main Jul 20, 2026
3 checks passed
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.

2 participants