Skip to content

refactor: remove Web API facade indirection and duplicate queries - #164

Merged
lbx154 merged 1 commit into
devfrom
refactor/simplify-webapi-20260923
Sep 23, 2026
Merged

lbx154 merged 1 commit into
devfrom
refactor/simplify-webapi-20260923

Conversation

@lbx154

@lbx154 lbx154 commented Sep 23, 2026

Copy link
Copy Markdown
Owner

Web API services called back through server.py to 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_module resolver and the server's forwarding tables. server.py now owns app composition, middleware, and event streaming; package-level argus.webapi.build_snapshot and project_life_dir remain 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 legacy session_states_root name 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 --check pass. npm run check passes 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.

@lbx154
lbx154 merged commit 6095e2e into dev Sep 23, 2026
11 of 12 checks passed
@lbx154
lbx154 deleted the refactor/simplify-webapi-20260923 branch September 23, 2026 15:06
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.

1 participant