Skip to content

base red: arch app_lines, move ServerReachPlan out of CmuxNextApp (#26600, #31055, #22953) - #31218

Merged
lawrencecchen merged 1 commit into
feat-cmux-nextfrom
fix/base-red-arch-app-lines-1830
Nov 1, 2026
Merged

lawrencecchen merged 1 commit into
feat-cmux-nextfrom
fix/base-red-arch-app-lines-1830

Conversation

@lawrencecchen

@lawrencecchen lawrencecchen commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Base red (priority zero): the arch ratchet is red at the feat tip (STATUS 4024): [app_lines] CmuxNextApp +15 against the last green arch tip 006666a.

PR CmuxNextApp lines
#26600 (parked workspace budget, fixes #26046) +22
#31055 (incognito Runs and hand-offs) +16
#22953 (Search Tabs closed facts index) +15
#31147 +5
#31106 -1
#31182 (HandshakeFollower move) -42
at the tip +15

ServerReachPlan (which paired servers the app reaches, and the parsers of chief.list, team.hosts.list, cmux link show and cmux link peer list) holds no app state: value types and pure functions over CloudChief (CmuxNextHostedChief) and ServerReach (CmuxNextRemote). It moves as it is from CmuxNextApp/Server/ServerReachPlan.swift to CmuxNextHostedChief/ServerReachPlan.swift, with a public API (public members and explicit public inits that keep the old memberwise defaults). ServerReachService in the App calls the same API. CmuxNextHostedChief now depends on CmuxNextRemote (service to service; no cycle: CmuxNextRemote depends only on CmuxNextCompat and CmuxNextCloud).

The only body change: parseChiefs called the App's CloudChiefs.parseList after its guard proved chiefs is an array; it now maps that array with CloudChief.parse itself, which is what parseList did. No behavior change.

I did not move code that #26600, #31055 or #22953 added: what is left of them in the App reads AppServices or window state (WindowController parking, TabSearchFactsBuilder.closed), so a move of it would need new seams. ServerReachPlan is a larger pure block, so it gives a margin for the merges that keep landing.

Evidence

  • arch-ratchet.py --base 006666aa359c: app_lines -158 (CmuxNextApp -158), no rises.
  • arch-ratchet.py --base origin/feat-cmux-next (3f2a3de): app_lines -173, no rises.
  • prepush-gate.py: no new violations. lint-ios-package-conventions.sh --namespace-fix: no change, no violations.
  • Fleet compile at 2ad7f4a: job 35932741ae9a3944660bc0b5, CmuxNext passed (228 s), app passed (62 s), cmux-tui passed (18 s).
  • Fleet suites at 2ad7f4a (the tests that use the moved code): step 53bcd1114fed54331a7fc3dc exited 0. ServerReachReconciliationTests 2 tests (6 argument cases), ServerReachAdmissionTests 8 tests, CaptureNeutralNamesTests 6 tests, all passed.
  • Independent review receipt: SHIP at 2ad7f4a (comment 6562225697). The defaults guard tracks make, route and isThisMac by file path (the name make matches a Tunable helper), so the move changed 6 keys with identical hashes; it passed on its rerun after the receipt.

Observed / Not run

Changelog

none

…o CmuxNextHostedChief

The arch ratchet's app_lines row was +15 at the feat-cmux-next tip against the
last green arch tip 006666a (#26600 +22, #31055 +16, #22953 +15, #31147 +5,
#31106 -1, #31182 -42). CmuxNextApp may not grow.

ServerReachPlan (which paired servers the app reaches, and the parsers of
chief.list, team.hosts.list, `cmux link show` and `cmux link peer list`) holds
no app state: it is value types and pure functions over CloudChief
(CmuxNextHostedChief) and ServerReach (CmuxNextRemote). It moves as it is into
CmuxNextHostedChief with a public API; ServerReachService in the App calls it.
CmuxNextHostedChief now depends on CmuxNextRemote (service -> service).

Behavior-neutral: the only body change is parseChiefs, which read the chiefs
through the App's CloudChiefs.parseList after its guard proved `chiefs` is an
array; it now maps that array with CloudChief.parse itself, the same result.
@lawrencecchen lawrencecchen added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Nov 1, 2026
@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review 2ad7f4a: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr31218 -f ref=fix/base-red-arch-app-lines-1830 -f platform=macos -f backend_mode=local

Default changes

This pull request changes 6 defaults at 2ad7f4aa2d63 (what everyone gets without configuring anything):

  • tunable-source.CmuxNextApp/Server/ServerReachPlan.swift:isThisMac: "1a6f5a451e7f2cbf623524bb0debfac6cd87e03e842b7e828c952124d57ba3fd" -> (none)
  • tunable-source.CmuxNextApp/Server/ServerReachPlan.swift:make: "4a1ed4c5f7d45a9ba032186f0d9dd38187d4bc8a0673db443dbb8d014d3749c5" -> (none)
  • tunable-source.CmuxNextApp/Server/ServerReachPlan.swift:route: "6a26bb0ad4f323262aa7aa913fc74d493d6dbec71480c5682a0e7d62ce6a5a9f" -> (none)
  • tunable-source.CmuxNextHostedChief/ServerReachPlan.swift:isThisMac: (none) -> "1a6f5a451e7f2cbf623524bb0debfac6cd87e03e842b7e828c952124d57ba3fd"
  • tunable-source.CmuxNextHostedChief/ServerReachPlan.swift:make: (none) -> "4a1ed4c5f7d45a9ba032186f0d9dd38187d4bc8a0673db443dbb8d014d3749c5"
  • tunable-source.CmuxNextHostedChief/ServerReachPlan.swift:route: (none) -> "6a26bb0ad4f323262aa7aa913fc74d493d6dbec71480c5682a0e7d62ce6a5a9f"

Signed off on this commit by review (subagent, correctness first).

Merge receipt: merged as 1c00c00a4b86 with these defaults changed, signed off by review (subagent, correctness first).

Regenerate the snapshot with python3 scripts/ci/defaults_guard.py snapshot.

Shipped in:

@lawrencecchen

Copy link
Copy Markdown
Contributor Author

Review (subagent, correctness first): SHIP at 2ad7f4a

I read the diff only. I did not build or test on this machine.

  • Behavior: every moved body is the same as before. The only change is parseChiefs. It now runs the body of CloudChiefs.parseList inline: the same [String: Any] / chiefs as? [Any] guard and compactMap(CloudChief.parse). The old is [Any] guard and the new as? [Any] guard accept the same inputs, so the result is the same for every input. defaults_guard.py check gives the same declaration fingerprints for make, route and isThisMac at the old and the new path. Only the path keys change.
  • Public API: the types, nested types, properties, computed properties and static functions are public. The explicit inits keep the defaults of the old memberwise inits: PairedServer.kind = nil, and LinkPeers socket, peersFile and install each default to nil. ServerReachPlan(desired:unroutable:) and LocalServer have no defaults, as before. The file uses public import CmuxNextRemote and public import Foundation, as InternalImportsByDefault needs. The types stay nonisolated, so the nonisolated static ServerReachService.readLinkPeers can still call ServerReachPlan.linkPeers. ServerReach, Route, brainRoute, dnsLabel and its init are public in CmuxNextRemote.
  • Imports: every file that names a moved type imports CmuxNextHostedChief: ServerReachService.swift, ServerReachService+App.swift and ServerReachReconciliationTests.swift. ServerReachControl.swift only reads members of lastPlan, and MemberImportVisibility is not on, so it compiles without the import. CaptureNeutralNamesTests only compares the result with nil. No other target defines these type names, and no stale reference remains.
  • Package graph: the new edge CmuxNextHostedChief -> CmuxNextRemote makes no cycle, because CmuxNextRemote depends only on Compat and Cloud. Both targets are in the service layer, and both are mac-only in the Linux inventory. check-package-dependency-lists.py passes.
  • Gates: arch-ratchet.py --base 006666aa359c gives app_lines -158, with no rises. prepush-gate.py --base HEAD~1 reports no new violations. The package-conventions lint on the moved file shows only the old untyped warnings, which moved with the code.
  • Not blocking:
    • ci-target-graph.json and schemas/defaults/cmux-next.json are generated files, and they now give the old path or the old dependencies. Autofix regenerates them, so do not edit them by hand.
    • The test file has a stray blank line after the new import.

@blacksmith-sh

blacksmith-sh Bot commented Nov 1, 2026

Copy link
Copy Markdown

Found 1 test failure on Blacksmith runners:

Failure

Test View Logs
test_the_repository_highlights_validate (main.DigestTests.test_the_repository_highl
ights_validate)/
test_the_repository_highlights_validate (main.DigestTests.test_the_repository_highl
ights_validate)
View Logs

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

@lawrencecchen lawrencecchen added the ready-to-land Reviewed at this head; next-autoland merges it into feat-cmux-next when its only reds are base reds label Nov 1, 2026
@lawrencecchen
lawrencecchen merged commit 1c00c00 into feat-cmux-next Nov 1, 2026
217 of 228 checks passed
@lawrencecchen
lawrencecchen deleted the fix/base-red-arch-app-lines-1830 branch November 1, 2026 19:19

This branch was previously deployed

1 inactive deployment
ci-routing-agent — 2ad7f4aa Deployed Nov 1, 2026 by lawrencecchen via namespace autofix #11536
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-land Reviewed at this head; next-autoland merges it into feat-cmux-next when its only reds are base reds risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant