mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-09-05 01:07:42 +02:00
[eric] linter: record manager/ aggregator-folder + attachments.py exceptions and resolve_forced_tools vulture false-positive
This commit is contained in:
@@ -14,8 +14,8 @@
|
||||
"no-nested-imports": "Off on purpose: this codebase uses function-level/lazy imports to break import cycles (400+ sites). Flagging them all is wrong for us.",
|
||||
"eslint-knip": "Node tooling deferred to a later pass.",
|
||||
"classes": "Placeholder check, not wired up. endpoints: orphaned-endpoint triage deferred.",
|
||||
"max-file-lines-exceptions": "Grandfather list of pre-existing >300-line files (existing debt, not new). Paths updated after the folder-tree restructure moved several of them.",
|
||||
"max-folder-items-exceptions": "Exact-path allow for folders intentionally over the cap. The rule trips at >7 (7 items is fine, the 8th tips it), so only genuinely 8+ folders are listed. backend/ and backend/apps are FastAPI feature-package registries (each child is an app mounted in main.py); agents/ aggregates agent subsystems; core/, tools_lib/, tests/ are conventionally flat. Frontend: app/pages is the page registry, AgentChat/ChatInput/Settings-sections/Onboarding are organizational parents, and shared/state (Redux slices) plus hooks/steps/mcp-cards/Views are flat peer collections. scripts/, electron/, linter/checks/ are flat tool dirs. These replaced blanket .lintignore-max-folder-items sentinels (backend, frontend, scripts, electron, linter/checks) so the rule still catches NEW unplanned bloat everywhere else. Kept as whole-subtree sentinels on purpose: debugger/ (self-contained injected sub-tool with its own Vite GUI), webapp_template (Vite scaffold payload), and vendored mcp-bundles.",
|
||||
"max-file-lines-exceptions": "Grandfather list of pre-existing >300-line files (existing debt, not new). Paths updated after the folder-tree restructure moved several of them. The two manager/prompt/* entries are from the agent_manager decomposition: prompt_context.py aggregates the system-prompt context builders and attachments.py is one cohesive 230-line attachment resolver; both are single-responsibility and a few lines over, not splittable without an artificial seam.",
|
||||
"max-folder-items-exceptions": "Exact-path allow for folders intentionally over the cap. The rule trips at >7 (7 items is fine, the 8th tips it), so only genuinely 8+ folders are listed. backend/ and backend/apps are FastAPI feature-package registries (each child is an app mounted in main.py); agents/ aggregates agent subsystems; agents/manager/ is the agent_manager god-object decomposition (cohesive AgentManager mixins + standalone run helpers + the streaming/permissions/prompt/session subtrees), conventionally flat like agents/ and core/ since its standalone helpers are heterogeneous and don't group cleanly; agents/manager/streaming and agents/manager/session are flat peer collections of one-module-per-concern handlers; core/, tools_lib/, tests/ are conventionally flat. Frontend: app/pages is the page registry, AgentChat/ChatInput/Settings-sections/Onboarding are organizational parents, and shared/state (Redux slices) plus hooks/steps/mcp-cards/Views are flat peer collections. scripts/, electron/, linter/checks/ are flat tool dirs. These replaced blanket .lintignore-max-folder-items sentinels (backend, frontend, scripts, electron, linter/checks) so the rule still catches NEW unplanned bloat everywhere else. Kept as whole-subtree sentinels on purpose: debugger/ (self-contained injected sub-tool with its own Vite GUI), webapp_template (Vite scaffold payload), and vendored mcp-bundles.",
|
||||
"import-cycles": "Flags RUNTIME circular imports only (SCC>1). Skips type-only imports (import type / export type) and dynamic import() since neither runs at module init, which is why the idiomatic Redux store<->hooks type cycle is not flagged. Frontend alias resolution comes from import-cycle-aliases. Zero cycles today; the check keeps it that way."
|
||||
},
|
||||
"rules": {
|
||||
@@ -63,6 +63,7 @@
|
||||
"backend/apps/agents/browser_agent_mcp_server.py",
|
||||
"backend/apps/agents/browser/browser_schema.py",
|
||||
"backend/apps/agents/manager/prompt/prompt_context.py",
|
||||
"backend/apps/agents/manager/prompt/attachments.py",
|
||||
"backend/apps/agents/providers/pricing.py",
|
||||
"backend/apps/agents/providers/registry.py",
|
||||
"backend/apps/dashboards/dashboards.py",
|
||||
@@ -135,6 +136,9 @@
|
||||
"backend/apps",
|
||||
"backend/apps/agents",
|
||||
"backend/apps/agents/core",
|
||||
"backend/apps/agents/manager",
|
||||
"backend/apps/agents/manager/session",
|
||||
"backend/apps/agents/manager/streaming",
|
||||
"backend/apps/outputs",
|
||||
"backend/apps/tools_lib",
|
||||
"backend/tests",
|
||||
|
||||
@@ -58,3 +58,9 @@ get_provider_credentials
|
||||
# model_dump() serialization to the frontend (drives preview sort order), so vulture
|
||||
# can't see the read.
|
||||
preview_updated_at
|
||||
|
||||
# prompt/prompt_context.py: called unconditionally from build_prompt_content
|
||||
# (prompt/attachments.py), the per-turn prompt builder; vulture misses the
|
||||
# cross-module call. resolve_attached_skills next to it isn't flagged only
|
||||
# because tests also call it directly.
|
||||
resolve_forced_tools
|
||||
|
||||
Reference in New Issue
Block a user