fix: docs/package.json & docs/package-lock.json to reduce vulnerabili…#927
Conversation
…ties The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-JS-WEBPACKDEVSERVER-10300775 - https://snyk.io/vuln/SNYK-JS-INFLIGHT-6095116 - https://snyk.io/vuln/SNYK-JS-WEBPACKDEVSERVER-10300777 - https://snyk.io/vuln/SNYK-JS-BRACEEXPANSION-9789073
…2001e124718 [Snyk] Fix for 4 vulnerabilities
This commit addresses multiple code quality and architectural issues identified during a full-depth codebase audit: Backend fixes: - Fix bare except statements with specific exception types in base_agent.py, document_agent.py, code_storage_service.py, and database_metrics_service.py - Remove agent_work_orders code from server Dockerfile (separate service) Frontend fixes: - Remove console.error statements from service files (errors already thrown to TanStack Query error handling) - Remove ButtonPlayground component (YAGNI) - Remove commented-out dead code in knowledge components - Remove unused Socket.IO proxy configuration (HTTP polling policy) Infrastructure fixes: - Fix Makefile profile mismatch with docker-compose.yml (critical) - Changed from non-existent profiles to explicit service lists - Fix ENABLE_AGENT_WORK_ORDERS default to false in .env.example - Update frontend .env.example with missing VITE_* variables - Update docker-compose.yml comment to remove Socket.IO reference - Enable frontend tests in CI workflow These changes follow CLAUDE.md guidelines: no backwards compatibility, detailed errors over graceful failures, KISS, DRY, and YAGNI.
📝 WalkthroughWalkthroughThis PR disables the Agent Work Orders feature by default, removes the ButtonPlayground UI component, eliminates console logging from frontend service error handlers, refines Python exception handling specificity, re-enables frontend CI testing, updates development targets, and removes Socket.IO proxy configuration. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This pull request upgrades Docusaurus dependencies from version 3.8.0 to 3.9.0 to address vulnerabilities, while also making several code quality improvements across the codebase. The changes include replacing bare except clauses with specific exception types, removing unused code and console logging, updating configuration files, and adjusting Docker and CI/CD workflows.
Changes:
- Upgraded Docusaurus packages from 3.8.0 to 3.9.0 and updated related dependencies
- Replaced bare
except:clauses with specific exception types in Python code - Removed unused imports, components, and console.error statements from frontend code
- Updated Docker, Makefile, and CI/CD configurations to reflect architectural changes
Reviewed changes
Copilot reviewed 21 out of 22 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| docs/package.json | Upgraded Docusaurus core packages to 3.9.0 |
| docs/package-lock.json | Updated lock file with new dependency versions and tree |
| python/src/server/services/storage/code_storage_service.py | Replaced bare except with specific exception types |
| python/src/server/services/knowledge/database_metrics_service.py | Replaced bare except with Exception |
| python/src/agents/document_agent.py | Replaced bare except with json.JSONDecodeError |
| python/src/agents/base_agent.py | Replaced bare except with specific exception types |
| python/Dockerfile.server | Removed agent_work_orders copy command |
| docker-compose.yml | Updated comment removing Socket.IO reference |
| archon-ui-main/vite.config.ts | Removed Socket.IO proxy configuration |
| archon-ui-main/src/pages/SettingsPage.tsx | Removed ButtonPlayground component and imports |
| archon-ui-main/src/features//services/.ts | Removed console.error statements from error handlers |
| archon-ui-main/src/features/knowledge/components/*.tsx | Removed unused variable comments |
| archon-ui-main/.env.example | Added configuration comments and defaults |
| Makefile | Updated Docker Compose commands and profiles |
| .github/workflows/ci.yml | Re-enabled frontend tests and updated comments |
| .env.example | Changed ENABLE_AGENT_WORK_ORDERS default to false |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| except (ValueError, AttributeError, IndexError): | ||
| pass |
There was a problem hiding this comment.
'except' clause does nothing but pass and there is no explanatory comment.
| except (ValueError, AttributeError, IndexError): | |
| pass | |
| except (ValueError, AttributeError, IndexError) as exc: | |
| logger.debug( | |
| "Failed to extract wait time from error message %r: %s", | |
| error_message, | |
| exc, | |
| ) |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ff45bbf6c6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - name: Upload frontend coverage to Codecov | ||
| if: always() | ||
| uses: codecov/codecov-action@v4 | ||
| with: | ||
| files: ./archon-ui-main/coverage/lcov.info |
There was a problem hiding this comment.
Point coverage uploads to Vitest output directory
The workflow now uploads archon-ui-main/coverage/ and sends Codecov ./archon-ui-main/coverage/lcov.info, but the Vitest config writes JSON and coverage to ./public/test-results/test-results.json and ./public/test-results/coverage (see archon-ui-main/vitest.config.ts lines 30–46). As a result, the artifact upload and Codecov step will target non-existent paths, so CI loses coverage and test result artifacts even when tests pass.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@docs/package.json`:
- Around line 17-19: The Docusaurus dependency bump to
"@docusaurus/core"/"@docusaurus/preset-classic"/"@docusaurus/theme-mermaid" @
3.9.0 requires Node.js >=20; verify and enforce compatibility by either (a)
keeping the newer 3.9.0 deps and updating your Node requirement across the
project (update package.json "engines" to ">=20", update CI/workflow node
versions, and note it in README) or (b) revert these three deps to the last 3.x
that supports Node 18 (pin "@docusaurus/core", "@docusaurus/preset-classic",
"@docusaurus/theme-mermaid" to the previous compatible version); ensure
whichever path you choose is reflected in CI configs and contributor docs.
In `@Makefile`:
- Around line 125-128: The stop target currently only brings down services with
--profile agents --profile work-orders so containers started by make dev or make
dev-docker (which start archon-server, archon-mcp, archon-frontend without those
profiles) remain running; update the Makefile so the stop target runs $(COMPOSE)
down without profile filters to stop all project containers, or alternatively
add a new stop-all target (e.g., stop-all:; @$(COMPOSE) down) to perform an
unfiltered shutdown while keeping the existing profile-scoped stop intact.
🧹 Nitpick comments (3)
archon-ui-main/src/features/knowledge/components/KnowledgeCardActions.tsx (1)
32-42: Consider removing unusedsourceIdprop from interface.The
sourceIdprop is destructured but never used in this component. The underscore prefix convention is correct for suppressing lint warnings, but since the interface declares it as required (line 21), callers must provide a value that's immediately discarded.If API calls are handled via closures in the parent component (through
onRefresh/onDeletecallbacks), consider removingsourceIdfrom the interface entirely to avoid misleading documentation and unnecessary prop requirements.♻️ Suggested cleanup
interface KnowledgeCardActionsProps { - sourceId: string; // Source ID for API calls itemTitle?: string; // Title for delete confirmation isUrl: boolean; // ... rest of props } export const KnowledgeCardActions: React.FC<KnowledgeCardActionsProps> = ({ - sourceId: _sourceId, itemTitle = "this knowledge item", // ... rest of destructuring }) => {python/src/server/services/knowledge/database_metrics_service.py (1)
53-61: Consider logging the swallowed exception for better observability.The narrowing from bare
except:toexcept Exception:is an improvement. However, per coding guidelines, errors should be logged with context even when gracefully handled. The current implementation silently swallows the exception.Suggested improvement
# Code examples count try: code_examples_result = ( self.supabase.table("archon_code_examples").select("*", count="exact").execute() ) metrics["code_examples_count"] = ( code_examples_result.count if code_examples_result.count else 0 ) - except Exception: + except Exception as e: + safe_logfire_info(f"Code examples table not available, defaulting to 0 | error={str(e)}") metrics["code_examples_count"] = 0.github/workflows/ci.yml (1)
42-44: Type check errors are silently ignored.The
continue-on-error: truemeans TypeScript type errors won't fail the CI pipeline. While acceptable during a migration, consider adding a tracking issue to eventually enforce type checking strictly by removing this flag.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
docs/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (21)
.env.example.github/workflows/ci.ymlMakefilearchon-ui-main/.env.examplearchon-ui-main/src/components/settings/ButtonPlayground.tsxarchon-ui-main/src/features/knowledge/components/KnowledgeCard.tsxarchon-ui-main/src/features/knowledge/components/KnowledgeCardActions.tsxarchon-ui-main/src/features/mcp/services/mcpApi.tsarchon-ui-main/src/features/projects/services/projectService.tsarchon-ui-main/src/features/projects/tasks/services/taskService.tsarchon-ui-main/src/features/settings/migrations/services/migrationService.tsarchon-ui-main/src/features/settings/version/services/versionService.tsarchon-ui-main/src/pages/SettingsPage.tsxarchon-ui-main/vite.config.tsdocker-compose.ymldocs/package.jsonpython/Dockerfile.serverpython/src/agents/base_agent.pypython/src/agents/document_agent.pypython/src/server/services/knowledge/database_metrics_service.pypython/src/server/services/storage/code_storage_service.py
💤 Files with no reviewable changes (7)
- archon-ui-main/src/features/mcp/services/mcpApi.ts
- archon-ui-main/src/features/settings/migrations/services/migrationService.ts
- archon-ui-main/src/features/projects/services/projectService.ts
- archon-ui-main/src/features/projects/tasks/services/taskService.ts
- archon-ui-main/src/features/settings/version/services/versionService.ts
- archon-ui-main/src/components/settings/ButtonPlayground.tsx
- archon-ui-main/src/features/knowledge/components/KnowledgeCard.tsx
🧰 Additional context used
📓 Path-based instructions (10)
archon-ui-main/src/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
archon-ui-main/src/**/*.{ts,tsx}: Use TypeScript in strict mode with no implicit any in frontend code
Do not use dynamic Tailwind class construction in frontend components
Files:
archon-ui-main/src/pages/SettingsPage.tsxarchon-ui-main/src/features/knowledge/components/KnowledgeCardActions.tsx
archon-ui-main/src/!(features)/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Use ESLint with standard React rules for legacy code in the frontend
Files:
archon-ui-main/src/pages/SettingsPage.tsx
archon-ui-main/src/**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
Use ESLint for legacy frontend code outside /src/features directory with standard React rules
Files:
archon-ui-main/src/pages/SettingsPage.tsxarchon-ui-main/src/features/knowledge/components/KnowledgeCardActions.tsx
python/src/server/**/*.py
📄 CodeRabbit inference engine (CLAUDE.md)
python/src/server/**/*.py: Fail fast and loud for service startup failures, missing configuration, database connection failures, authentication/authorization failures, data corruption, critical dependency unavailability, and invalid data that would corrupt state
Never accept corrupted data - skip failed items entirely rather than storing corrupted or incomplete data
Files:
python/src/server/services/storage/code_storage_service.pypython/src/server/services/knowledge/database_metrics_service.py
python/src/**/*.py
📄 CodeRabbit inference engine (CLAUDE.md)
python/src/**/*.py: Complete batch processing, background tasks, and external API calls but log detailed errors for each failure instead of crashing
Include context about what was being attempted, preserve full stack traces with exc_info=True in Python logging, use specific exception types, include relevant IDs/URLs, never return None to indicate failure, and report both success count and detailed failure list for batch operations
Use Ruff for linting and MyPy for type checking with 120 character line length in Python backend
Use Python 3.12 with 120 character line length in backend code
Import GITHUB_REPO_OWNER and GITHUB_REPO_NAME constants from python/src/server/config/version.py as the single source of truth for repository configuration
python/src/**/*.py: Python backend code should use 120 character line length
Use Ruff for linting Python code to check for errors, warnings, and unused imports
Use Mypy for type checking in Python to ensure type safety
Files:
python/src/server/services/storage/code_storage_service.pypython/src/agents/document_agent.pypython/src/server/services/knowledge/database_metrics_service.pypython/src/agents/base_agent.py
python/src/server/services/**/*.py
📄 CodeRabbit inference engine (AGENTS.md)
python/src/server/services/**/*.py: For batch processing and background tasks, complete what you can and report detailed failures for each item rather than crashing
Never accept corrupted data - skip failed items entirely rather than storing corrupted data in batch operations
Files:
python/src/server/services/storage/code_storage_service.pypython/src/server/services/knowledge/database_metrics_service.py
python/**/*.py
📄 CodeRabbit inference engine (AGENTS.md)
Error messages must include context about what was being attempted, preserve full stack traces, use specific exception types, include relevant IDs/URLs, and report both success count and detailed failure list for batch operations
Files:
python/src/server/services/storage/code_storage_service.pypython/src/agents/document_agent.pypython/src/server/services/knowledge/database_metrics_service.pypython/src/agents/base_agent.py
archon-ui-main/src/features/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
archon-ui-main/src/features/**/*.{ts,tsx}: Use Biome for code formatting in /src/features with 120 character lines, double quotes, and trailing commas
Apply Tron-inspired glassmorphism styling with Tailwind and follow responsive design patterns with mobile-first approach
Create new UI components in the features directory with types in src/features/[feature]/types/, components in src/features/[feature]/components/, and use TanStack Query hooks
Use TanStack Query for all data fetching with smart HTTP polling where appropriate
archon-ui-main/src/features/**/*.{ts,tsx}: TypeScript strict mode enabled with no implicit any, and use Biome with 120 character lines and double quotes in /src/features directory
Use TanStack Query for all data fetching - no prop drilling
Files:
archon-ui-main/src/features/knowledge/components/KnowledgeCardActions.tsx
archon-ui-main/src/features/**/components/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Prefer using Radix UI primitives from src/features/ui/primitives/ when creating UI components
archon-ui-main/src/features/**/components/**/*.{ts,tsx}: Use Radix UI primitives from src/features/ui/primitives/ for new UI components in features directory
Apply Tron-inspired glassmorphism styling with Tailwind in features directory UI components
Files:
archon-ui-main/src/features/knowledge/components/KnowledgeCardActions.tsx
archon-ui-main/src/features/**
📄 CodeRabbit inference engine (CLAUDE.md)
Use vertical slice architecture in /features directory where features own their sub-features
Files:
archon-ui-main/src/features/knowledge/components/KnowledgeCardActions.tsx
🧠 Learnings (17)
📓 Common learnings
Learnt from: Wirasm
Repo: coleam00/Archon PR: 514
File: archon-ui-main/src/components/layouts/ArchonChatPanel.tsx:71-81
Timestamp: 2025-08-28T12:03:56.388Z
Learning: The agent chat service is disabled in the Archon codebase, so optimizations or fixes related to agent chat functionality may not be necessary to implement.
Learnt from: Wirasm
Repo: coleam00/Archon PR: 514
File: archon-ui-main/src/services/mcpService.ts:0-0
Timestamp: 2025-08-29T08:58:37.228Z
Learning: When refactoring from WebSocket to HTTP polling architecture, prefer complete removal of deprecated WebSocket methods over keeping them as no-op stubs with warnings, especially in breaking change PRs.
📚 Learning: 2025-11-29T19:24:36.223Z
Learnt from: CR
Repo: coleam00/Archon PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-29T19:24:36.223Z
Learning: Applies to archon-ui-main/src/features/**/*.{ts,tsx} : Apply Tron-inspired glassmorphism styling with Tailwind and follow responsive design patterns with mobile-first approach
Applied to files:
archon-ui-main/src/pages/SettingsPage.tsx
📚 Learning: 2025-11-29T19:25:23.987Z
Learnt from: CR
Repo: coleam00/Archon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-29T19:25:23.987Z
Learning: Applies to archon-ui-main/src/features/**/*.{ts,tsx} : TypeScript strict mode enabled with no implicit any, and use Biome with 120 character lines and double quotes in /src/features directory
Applied to files:
archon-ui-main/src/pages/SettingsPage.tsxarchon-ui-main/.env.example.github/workflows/ci.yml
📚 Learning: 2025-08-28T12:56:47.840Z
Learnt from: Wirasm
Repo: coleam00/Archon PR: 514
File: archon-ui-main/src/pages/ProjectPage.tsx:329-331
Timestamp: 2025-08-28T12:56:47.840Z
Learning: In the ProjectPage.tsx polling refactor, temporary project creation logic with progress cards was removed in favor of simpler modal loading states, as the complexity of managing in-flight temporary projects wasn't justified when HTTP polling would show new projects within seconds anyway.
Applied to files:
archon-ui-main/src/pages/SettingsPage.tsx
📚 Learning: 2025-11-29T19:25:23.987Z
Learnt from: CR
Repo: coleam00/Archon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-29T19:25:23.987Z
Learning: Applies to archon-ui-main/src/features/**/components/**/*.{ts,tsx} : Use Radix UI primitives from src/features/ui/primitives/ for new UI components in features directory
Applied to files:
archon-ui-main/src/pages/SettingsPage.tsx
📚 Learning: 2025-11-29T19:25:23.987Z
Learnt from: CR
Repo: coleam00/Archon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-29T19:25:23.987Z
Learning: Applies to archon-ui-main/src/features/**/components/**/*.{ts,tsx} : Apply Tron-inspired glassmorphism styling with Tailwind in features directory UI components
Applied to files:
archon-ui-main/src/pages/SettingsPage.tsx
📚 Learning: 2025-11-29T19:24:36.223Z
Learnt from: CR
Repo: coleam00/Archon PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-29T19:24:36.223Z
Learning: Applies to archon-ui-main/src/**/*.{ts,tsx} : Do not use dynamic Tailwind class construction in frontend components
Applied to files:
archon-ui-main/src/pages/SettingsPage.tsx
📚 Learning: 2025-11-29T19:24:36.223Z
Learnt from: CR
Repo: coleam00/Archon PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-29T19:24:36.223Z
Learning: Applies to archon-ui-main/src/features/**/components/**/*.{ts,tsx} : Prefer using Radix UI primitives from src/features/ui/primitives/ when creating UI components
Applied to files:
archon-ui-main/src/pages/SettingsPage.tsx
📚 Learning: 2025-11-29T19:24:36.223Z
Learnt from: CR
Repo: coleam00/Archon PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-29T19:24:36.223Z
Learning: Applies to archon-ui-main/src/**/*.{ts,tsx} : Use TypeScript in strict mode with no implicit any in frontend code
Applied to files:
archon-ui-main/src/pages/SettingsPage.tsx.github/workflows/ci.yml
📚 Learning: 2025-09-10T11:50:38.763Z
Learnt from: zaksnet
Repo: coleam00/Archon PR: 473
File: archon-ui-main/src/features/agents/components/provider-management/ProviderSettings.tsx:147-155
Timestamp: 2025-09-10T11:50:38.763Z
Learning: The Button component in archon-ui-main/src/components/ui/Button.tsx supports the "primary" variant along with: default, destructive, outline, secondary, ghost, link, and cyan.
Applied to files:
archon-ui-main/src/pages/SettingsPage.tsx
📚 Learning: 2025-11-29T19:24:36.223Z
Learnt from: CR
Repo: coleam00/Archon PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-29T19:24:36.223Z
Learning: Applies to python/src/**/*.py : Include context about what was being attempted, preserve full stack traces with exc_info=True in Python logging, use specific exception types, include relevant IDs/URLs, never return None to indicate failure, and report both success count and detailed failure list for batch operations
Applied to files:
python/src/server/services/storage/code_storage_service.py
📚 Learning: 2025-11-29T19:25:23.987Z
Learnt from: CR
Repo: coleam00/Archon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-29T19:25:23.987Z
Learning: Applies to python/**/*.py : Error messages must include context about what was being attempted, preserve full stack traces, use specific exception types, include relevant IDs/URLs, and report both success count and detailed failure list for batch operations
Applied to files:
python/src/server/services/storage/code_storage_service.py
📚 Learning: 2025-09-04T16:30:05.227Z
Learnt from: stevepresley
Repo: coleam00/Archon PR: 573
File: archon-ui-main/src/config/api.ts:15-25
Timestamp: 2025-09-04T16:30:05.227Z
Learning: Archon UI API config: Prefer lazy getters getApiFullUrl() and getWsUrl() over module-load constants to avoid SSR/test crashes. Avoid CommonJS exports patterns (Object.defineProperty(exports,…)) in ESM. Add typeof window guards with VITE_API_URL fallback inside getApiUrl()/getWebSocketUrl() when SSR safety is required.
Applied to files:
archon-ui-main/vite.config.tsarchon-ui-main/.env.example
📚 Learning: 2025-11-29T19:25:23.987Z
Learnt from: CR
Repo: coleam00/Archon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-29T19:25:23.987Z
Learning: Applies to archon-ui-main/**/*.test.{ts,tsx} : Use Vitest with React Testing Library for frontend testing
Applied to files:
archon-ui-main/.env.example.github/workflows/ci.yml
📚 Learning: 2025-11-29T19:24:36.223Z
Learnt from: CR
Repo: coleam00/Archon PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-29T19:24:36.223Z
Learning: Applies to archon-ui-main/src/**/*.{test,spec}.{ts,tsx} : Use Vitest with React Testing Library for frontend testing
Applied to files:
archon-ui-main/.env.example.github/workflows/ci.yml
📚 Learning: 2025-10-11T01:51:55.935Z
Learnt from: sean-eskerium
Repo: coleam00/Archon PR: 777
File: archon-ui-main/src/features/projects/documents/DocsTab.tsx:59-59
Timestamp: 2025-10-11T01:51:55.935Z
Learning: The Archon codebase is a single-user application without user authentication. Hardcoded "User" author values in document creation (e.g., in DocsTab.tsx) are intentional and serve to identify user-created content versus AI-generated content. Do not recommend adding authentication, user context, or retrieving author information from auth hooks.
Applied to files:
archon-ui-main/.env.example
📚 Learning: 2025-11-29T19:25:23.987Z
Learnt from: CR
Repo: coleam00/Archon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-29T19:25:23.987Z
Learning: Applies to archon-ui-main/src/**/*.{ts,tsx,js,jsx} : Use ESLint for legacy frontend code outside /src/features directory with standard React rules
Applied to files:
.github/workflows/ci.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: CodeQL analysis (python)
🔇 Additional comments (15)
python/src/agents/base_agent.py (1)
127-138: Good narrowing of exception handling for wait time parsing.The exception types
(ValueError, AttributeError, IndexError)correctly target the realistic failure modes:
ValueError: iffloat()receives an invalid stringAttributeError: ifmatchisNoneand.group()is calledIndexError: defensive catch for regex group accessThis is a well-scoped change that avoids masking unrelated exceptions.
python/src/server/services/storage/code_storage_service.py (1)
1035-1045: Good narrowing to specific conversion-related exceptions.The exception types correctly target the failure modes of the
int()conversion:
ValueError: invalid string format for integer conversionTypeError:Noneor incompatible type passed toint()AttributeError: if_cacheor_cache_initializedattributes are missingThe
KeyErrorcase is correctly handled by theincheck on line 1039, so it doesn't need to be caught.python/src/agents/document_agent.py (1)
318-343: Correct narrowing tojson.JSONDecodeErrorfor JSON parsing.All three exception handlers correctly target
json.JSONDecodeError, which is the specific exception raised byjson.loads()for invalid JSON input. This allows other unexpected exceptions (e.g.,TypeErrorifnew_contentis unexpectedlyNone) to propagate, revealing actual bugs rather than silently masking them.The consistent application across all three JSON parsing branches is clean and follows best practices.
docker-compose.yml (1)
9-9: LGTM! Comment accurately reflects service capabilities.The updated comment removes the Socket.IO reference, aligning with the broader Socket.IO removal in this PR (e.g., proxy entry removed from vite.config.ts per the AI summary).
.env.example (1)
56-61: LGTM! Secure default for optional feature.Disabling Agent Work Orders by default is the correct approach since it requires additional credentials (Claude API key, GitHub PAT) and is an optional feature. The documentation clearly explains how to enable it when needed.
archon-ui-main/.env.example (2)
3-11: LGTM! Well-documented optional configuration.The new server and allowed hosts configuration options are appropriately commented out by default, providing flexibility for advanced deployment scenarios without affecting default behavior.
19-23: LGTM! DevTools disabled by default.
VITE_SHOW_DEVTOOLS=falseis the correct default for end users, with clear documentation for developers who want to enable it.python/Dockerfile.server (1)
60-63: LGTM! Leaner server image without agent_work_orders source code.Removing the
agent_work_ordersdirectory from the server image is appropriate. The server communicates with the agent_work_orders microservice (running asarchon-agent-work-orderswith its ownDockerfile.agent-work-orders) via a proxy pattern inapi_routes/agent_work_orders_proxy.py, not by importing its code directly. This reduces image size and maintains clean service separation. The server only requires runtime configuration for service discovery, which doesn't depend on having the source code..github/workflows/ci.yml (3)
49-56: Artifact path may be incorrect relative to working-directory.The
actions/upload-artifactstep usesarchon-ui-main/coverage/as the path, but this step runs after a job whereworking-directory: ./archon-ui-mainis set. However,upload-artifactuses paths relative to the repository root, not the job's working-directory—so this path appears correct. Just ensure the coverage output is indeed generated atarchon-ui-main/coverage/.
58-65: Frontend coverage upload to Codecov looks good.The path
./archon-ui-main/coverage/lcov.infocorrectly references the coverage file from the repository root, and the flags/naming are appropriate for distinguishing frontend coverage.
290-290: Architecture summary correctly reflects Socket.IO removal.The update from "FastAPI + Socket.IO + Python" to "FastAPI + Python" aligns with the broader PR changes removing Socket.IO from the stack.
Makefile (2)
52-52: LGTM!Explicitly listing
archon-server archon-mcpis clearer than profile-based startup and aligns with the narrowed development scope.
64-64: LGTM!Adding
archon-frontendtodev-dockerprovides a complete Docker-based development experience.archon-ui-main/src/pages/SettingsPage.tsx (1)
14-14: Clean removal of Button Playground feature.The import cleanup (removing
AnimatePresence) and complete removal of the Button Playground UI, related state, and icons is well-executed. No dead code or unused imports remain.archon-ui-main/vite.config.ts (1)
386-387: Socket.IO proxy removal is correct and complete.The removal of the Socket.IO proxy entry from vite.config.ts aligns with the architectural refactoring to remove Socket.IO from the stack. No Socket.IO client code remains in the frontend, and the agent chat service is disabled in this codebase, so no reconnection attempts will occur.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
| "@docusaurus/core": "^3.9.0", | ||
| "@docusaurus/preset-classic": "^3.9.0", | ||
| "@docusaurus/theme-mermaid": "^3.9.0", |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
Docusaurus 3.9.0 release changelog
💡 Result:
Docusaurus 3.9.0 — highlights
- Dropped Node.js 18 support (min required: Node 20). [1][2]
- DocSearch: added runtime support for Algolia DocSearch v4 (AskAI) and related theme updates. [1][2]
- i18n improvements: new localeConfigs options and translate-related enhancements. [1]
- Mermaid: ELK layout support. [1]
- Several theme/plugins features and bug fixes (sidebar long-label fixes, clipboard API for copy, visual fixes for useColorMode, HTML minifier tweak, blog email social icon, Rspack upgrades, etc.). [1]
- Maintenance/deps updates and other minor changes. [1]
Full changelog and release notes: see the Docusaurus 3.9.0 changelog and blog post. [1][2]
Verify Node.js compatibility before updating to Docusaurus 3.9.0.
Docusaurus 3.9.0 drops support for Node.js 18 and requires Node.js 20 or higher. Confirm your project's Node.js version requirements support this breaking change before merging this update.
🤖 Prompt for AI Agents
In `@docs/package.json` around lines 17 - 19, The Docusaurus dependency bump to
"@docusaurus/core"/"@docusaurus/preset-classic"/"@docusaurus/theme-mermaid" @
3.9.0 requires Node.js >=20; verify and enforce compatibility by either (a)
keeping the newer 3.9.0 deps and updating your Node requirement across the
project (update package.json "engines" to ">=20", update CI/workflow node
versions, and note it in README) or (b) revert these three deps to the last 3.x
that supports Node 18 (pin "@docusaurus/core", "@docusaurus/preset-classic",
"@docusaurus/theme-mermaid" to the previous compatible version); ensure
whichever path you choose is reflected in CI configs and contributor docs.
| stop: | ||
| @echo "Stopping all services..." | ||
| @$(COMPOSE) --profile backend --profile frontend --profile full --profile work-orders down | ||
| @$(COMPOSE) --profile agents --profile work-orders down | ||
| @echo "✓ Services stopped" |
There was a problem hiding this comment.
The stop target may not stop containers started by dev or dev-docker.
The stop target now only brings down containers with --profile agents --profile work-orders. Containers started by make dev (archon-server, archon-mcp) or make dev-docker (archon-server, archon-mcp, archon-frontend) are not started with these profiles, so make stop won't stop them.
Consider using a simpler approach that stops all project containers:
Proposed fix
# Stop all services
stop:
`@echo` "Stopping all services..."
- @$(COMPOSE) --profile agents --profile work-orders down
+ @$(COMPOSE) down
`@echo` "✓ Services stopped"Or, if profile-based shutdown is intentional for some reason, provide an additional target like stop-all that runs $(COMPOSE) down without profile filters.
🤖 Prompt for AI Agents
In `@Makefile` around lines 125 - 128, The stop target currently only brings down
services with --profile agents --profile work-orders so containers started by
make dev or make dev-docker (which start archon-server, archon-mcp,
archon-frontend without those profiles) remain running; update the Makefile so
the stop target runs $(COMPOSE) down without profile filters to stop all project
containers, or alternatively add a new stop-all target (e.g., stop-all:;
@$(COMPOSE) down) to perform an unfiltered shutdown while keeping the existing
profile-scoped stop intact.
|
🔄 This repository is being replaced by a new version of Archon. The original Python/MCP codebase is being archived to the This PR is being closed as part of the migration. Thank you for your contribution! |
…-564 feat(workflows): store node outcome counts in workflow run metadata
…ix-issue-564 feat(workflows): store node outcome counts in workflow run metadata
…ix-issue-564 feat(workflows): store node outcome counts in workflow run metadata
Pull Request
Summary
Changes Made
Type of Change
Affected Services
Testing
Test Evidence
Checklist
Breaking Changes
Additional Notes
Summary by CodeRabbit
New Features
Bug Fixes
Removed Features
Improvements
✏️ Tip: You can customize this high-level summary in your review settings.