refactor: remove Web API facade indirection and duplicate queries - #164
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Web API services called back through
server.pyto reach their own implementation functions, and routes received the entire server module as a dependency. Call the owning modules directly and remove the late-bound_server_moduleresolver and the server's forwarding tables.server.pynow owns app composition, middleware, and event streaming; package-levelargus.webapi.build_snapshotandproject_life_dirremain available.Share daemon command execution/receipt formatting across the six command routes, retaining command IDs, revision checks, threadpool execution, and explicit provider-fence resumption. Project and cost listings share the same first-root ownership traversal. Initialize per-app caches directly instead of maintaining lazy fallbacks for test subclasses; per-app daemon services and query workers remain isolated.
Net reduction from dev
4d65e66a: 278 lines overall, including 318 production Python lines. Tests now patch the implementation owner and retain their existing behavior scenarios; no test cases were removed. The architecture counter for the legacysession_states_rootname decreases from 23 to 22 because the duplicated traversal was consolidated.Validation: 1,467 focused tests passed with 2 skips; all 43 architecture tests pass after tightening that counter. Ruff and
git diff --checkpass.npm run checkpasses all 226 tests; the full Python regression in an isolated environment passes: 11,386 passed, 99 skipped. AST comparison confirms the same 444 test functions and parameter sets across the 24 touched test files. Documentation: describe the direct Web API imports and shared command/query paths in the runtime maintenance guide. CI/workflow: no changes; require the existing Python suite and all three TypeScript/ownership platforms before merge. No service restart or deployment is included.