Skip to content

[S8b] Extract private workspace and document settings routing - #156

Merged
Eduardo Villalpando Mello (edvilme) merged 1 commit into
mainfrom
refactor/s8b-routing
Nov 17, 2026
Merged

Eduardo Villalpando Mello (edvilme) merged 1 commit into
mainfrom
refactor/s8b-routing

Conversation

@edvilme

@edvilme Eduardo Villalpando Mello (edvilme) commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Part 2/2 of #154. Depends on #155; this upper layer intentionally targets refactor/s8a-settings, not main.

  • Move workspace settings registration and path/document selection into private, stateless _routing functions behind the unchanged ToolServer facade.
  • Keep the facade's writable dictionaries, in-place updates, direct map replacement/mutation, shallow value aliases, method overrides, and existing server module imports/normalization and URI seams.
  • Preserve nested-project selection, virtual/rootless paths, symlink-normalization flags, terminal-parent handling, first-workspace fallback, and the distinct per-document/CWD fallback construction. No fallback or normalization unification.
  • Add five focused regression cases in the existing server tests and document the private boundary. Existing fixtures, identity checks, and real stdio tests are unchanged.

No execution/CWD resolver, backend, process/lifecycle, wire settings, dependency, TypeScript, or consumer-pin changes. The lower _settings extraction remains unchanged.

Validation

Native Windows / Python 3.13.14, worktree-local environments:

  • Full shared Python tests through existing nox tooling: 358 passed, 2 skipped. The two Windows symlink-privilege skips are unchanged from S8a's 353 passed, 2 skipped baseline.
  • Existing nox lint session: flake8, Black, and isort pass for the package and tests.
  • Built the combined candidate wheel using setuptools.build_meta; installed it noneditably in an isolated native virtual environment.
  • 124 ToolServer facade tests pass against the installed wheel, using python -I, no PYTHONPATH, and pytest importlib mode. Verified _routing.py in distribution metadata/RECORD, source/wheel/installed bytes, and package origins in installed site-packages before and after the tests; no checkout masking.
  • AST comparison with exact lower head 0b0130e28c77ba94ae1f255fe05e6c222038a03b: extracted routing bodies unchanged apart from the receiver name; public method signatures/annotations, existing module imports, and all nonrouting methods unchanged.
  • git diff --check passes. Final validation environments have no editable installations.

Native consumer compatibility (combined stack)

All five consumers passed their complete, unchanged native nox --session install_bundled_libs tests pipelines on Windows, with Python 3.13.14 test sessions. Each comparison kept the exact consumer commit below and changed only the isolated worktree's shared-runtime gitlink from baseline 664672c16ce7848f09442ce0e301279a199ceb08 to candidate 77240b0977e15b112599df60a436f896a5e7ef37.

Consumer Consumer commit Python tests: baseline and candidate Build tests: baseline and candidate
Pylint d5eab2852f333ac9db363acd4939ea9bb95a1edb 122 passed 20 passed
Black 2a12315bb60ecbbe61c224e9a12ed86c043b02a6 70 passed, 1 unchanged skip 20 passed
Flake8 a2c9d11e7cbc6933cfa8ea8db84b97a9ec0bebcc 114 passed 23 passed
isort a120a1203e8c1d9d0af36a8f7de9ae0d67da4de3 79 passed 20 passed
Mypy 047b8a10df62ab0f43ae119bece1db3ae3721a1d 87 passed, 2 unchanged skips 21 passed

For every consumer, independently verified its native noneditable bundled distribution, private identity/provenance, and bundled server import origin. The complete installed Python filename set and contents match pinned Git objects (14 baseline modules, 16 candidate modules; universal-newline normalization only), including both new private helpers. No consumer source, tests, fixtures, requirements, or tracked artifacts were changed. Existing Windows file-descriptor cleanup warnings remain nonfatal; no failures or additional skips.

Native stack verified: #155 -> #156, ultimate base main. No merge or auto-merge was performed. Both PRs' hosted test/lint/build checks pass, including Python 3.10-3.14 on Ubuntu and Windows. This is automated compatibility evidence, not a manual VS Code smoke test.

Closes #154.

@edvilme Eduardo Villalpando Mello (edvilme) added the debt Code Cleanup, Refactorings and Repo health. Not feature related label Nov 17, 2026
@rchiodo

Copy link
Copy Markdown
Contributor

🔒 Automated review in progress — Rich Chiodo (@rchiodo) is auto-reviewing this PR.

@rchiodo

Copy link
Copy Markdown
Contributor

Reviewed commit: 77240b0977e15b112599df60a436f896a5e7ef37

Result: 🔴 could-not-verify

Verification details

Verification: Automated verification is best effort. The PR author remains responsible for testing.

Summary: [unavailable] Container verification could not start and local execution was not authorized for this PR HEAD: C:\Users\rchiodo\AppData\Local\Programs\Podman\podman.EXE --connection pyrx-automation failed: stderr: Error: unable to start container "fb769a9437ca97d125ecbff80a4e64092d8564baf9f26951d9fe2140703f0c4c": crun: open `memory.max` for writing: No such file or directory: OCI runtime attempted to invoke a command that was not found

Test runs: none recorded.

@rchiodo Rich Chiodo (rchiodo) 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.

Approved via Review Center.

@rchiodo Rich Chiodo (rchiodo) added the review-auto:approved Automated review: no blocking findings (approval posted). label Nov 17, 2026

@bschnurr Bill Schnurr (bschnurr) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approved via Review Center.

Base automatically changed from refactor/s8a-settings to main November 17, 2026 19:37
Delegate settings routing to stateless private helpers while retaining live ToolServer state, public normalization seams, and distinct lookup fallbacks. Add focused facade regressions and document the private boundary.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 85ef72cc-9e26-4bc4-b1c3-55256d9bef91
Eduardo Villalpando Mello (edvilme) added a commit that referenced this pull request Nov 17, 2026
## Summary
- Part 1/2 of #154; S8b routing is #156.
- Extract defaults and shallow workspace/fallback settings construction
into private, stateless helpers.
- Preserve the public `ToolServer` facade, writable dictionary
identities/aliases, in-place updates, precedence, normalization, routing
and lifecycle behavior. Add focused replacement/alias/context
regressions without changing existing fixtures.

## Validation
- Full Python suite: **353 passed**, two existing Windows
symlink-privilege skips (baseline: 347 passed, same skips).
- Existing flake8, Black and isort checks: pass for package and tests.
- Built and non-editably installed the wheel; isolated (`-I`)
installed-only imports, metadata and source hashes verified. All **119
ToolServer tests** pass against the installed artifact.
- Complete-stack native consumer validation passed at `77240b0` (#156)
for Pylint, Black, Flake8, isort and Mypy, with unchanged test pass/skip
totals against shared baseline `664672c`. Full baseline/candidate
results and installed-source proof are recorded in #156.
- Native stack order verified: #155 -> #156, ultimate base `main`. No
TypeScript or consumer source/test changes here.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 85ef72cc-9e26-4bc4-b1c3-55256d9bef91
@edvilme
Eduardo Villalpando Mello (edvilme) enabled stacked auto-merge (squash) November 17, 2026 19:37
stacked auto-merge was automatically disabled November 17, 2026 19:38

Pull Request is not mergeable

@edvilme
Eduardo Villalpando Mello (edvilme) merged commit 89cb5fc into main Nov 17, 2026
18 checks passed
@edvilme
Eduardo Villalpando Mello (edvilme) deleted the refactor/s8b-routing branch November 17, 2026 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

debt Code Cleanup, Refactorings and Repo health. Not feature related review-auto:approved Automated review: no blocking findings (approval posted).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[S8] Decompose private Python settings and workspace routing

3 participants