Skip to content

refactor(atlas-search): split service config out of server.rs (#16255 final slice) - #17038

Merged
developing-today-fleet[bot] merged 2 commits into
mainfrom
felix/16255-server-split
Nov 30, 2026
Merged

developing-today-fleet[bot] merged 2 commits into
mainfrom
felix/16255-server-split

Conversation

@developing-today-fleet

@developing-today-fleet developing-today-fleet Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

#16255 final slice: split the service-config cluster out of server.rs

pkgs/atlas-search/crates/atlas-search/src/server.rs was the last file over the 2500 production-line limit (2505), parity-paired with fleet-search's copy. The split it was waiting on (#15653 parity work) is done: PR #17031 re-mirrored the pair and #15653 is closed.

What moves (~365 production lines): the whole config cluster — RuntimeLimits + its file form, ClientConfig / RawClientConfig / ServiceConfigFile, ServeSettings, DEFAULT_SHARD_REFRESH_SECONDS, ServeOverrides, load_service_settings, require_loopback, validate_limits, init_service_config, and impl ServeSettings — into a new server/server_config.rs submodule, declared in server.rs exactly like the earlier server_error / server_http / server_feedback splits. Public items are re-exported (pub use server_config::{...}), so every existing path (server::ServeSettings, server::load_service_settings, …) is unchanged for main.rs / serve.rs and the rest of server.rs; require_loopback / validate_limits become pub(super) and are imported by the parent.

What deliberately stays in server.rs: home_dir + default_service_config_path + resolve_service_config_path. The #5640 HOME diagnostic — the one intentional body difference between the two copies, which the parity guard pins and normalizes — lives in home_dir, so it stays under the existing normalization instead of spreading it to a second pair.

Parity: the new file is a seventh verbatim pair (byte-identical outside the pinned headers, following the #10446/#12671 header pattern); check-fleet-search-parity.sh gains the pair + header pins, and its contract test copies the new files too. The two server.rs parents still differ only by the pinned HOME line. The now-unused OpenOptions / Deserialize imports leave both parents identically.

Result: both server.rs copies drop to ~2140 production lines — the production-line guard's over-limit list is empty when this lands.

Gate: fleet-command run on this branch (parity contract tests, parity guard, line guard, cargo test -p atlas-search, cargo test -p fleet-search --features serve --locked, fmt checks) — verdict posted on #16255 by lane 0640-HJ. Merge is Felix's.

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-30T01:42:25Z",
    "session_id": null,
    "lane": null,
    "host": "htch-runtime",
    "worktree": "/home/hatch",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/hatch",
      "repo": "developing-today/code",
      "branch": "main",
      "sha": "010b47d1c4cecdcd1b7d6ea260b7c9b0a61fb89e"
    },
    "auth_subject": "felix",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…rver/server_config.rs (#16255)

Moves the config cluster (RuntimeLimits, client table, ServeSettings,
load/init of the 0600 service config, ~365 production lines) from
server.rs into a new server/server_config.rs submodule, mirrored
byte-identically in fleet-search per the #5433 parity contract; the
parity guard gains the seventh pair. home_dir and the service-config
path resolvers stay in server.rs: the #5640 HOME diagnostic that the
guard normalizes lives in home_dir. server.rs drops from 2505 to
~2140 production lines, clearing the last over-limit file in #16255.
@coderabbitai

coderabbitai Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6285f673-7fb3-4394-a036-915b7898ea60

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

Gate results (lane 0640-HJ, job logs read firsthand; full verdict on #16255, comment 7266595871):

  • Run 46337027013: cargo test -p atlas-search 63 passed / 0 failed; cargo test -p fleet-search --features serve --locked 80 passed / 0 failed — identical counts to the pre-split fleet-search: re-mirror atlas server.rs; guard covers server_error.rs and runs on push/PR (#15653) #17031 gate.
  • Run 46337632554 at this PR's head (c27a87c): parity contract tests RC 0; parity guard RC 0 (all 7 pairs, incl. the new server/server_config.rs); production-line guard RC 0 — 1,360 .rs + 385 .ts checked, no file over the limit; cargo fmt --check RC 0 for both crates (run 46336447811).
  • One defect found and fixed during the gate: the new child initially missed use std::io::Write; (write_all in init_service_config) — cargo RC 101 on run 46336447811; fixed in c27a87c and re-proven by the runs above.

Merge-ready for Felix.

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.

0 participants