Skip to content

fix: docs/package.json & docs/package-lock.json to reduce vulnerabili…#927

Closed
Krosebrook wants to merge 5 commits intocoleam00:mainfrom
Krosebrook:claude/audit-refactor-codebase-01KjP7fmHus23qPLLQNsnp5x
Closed

fix: docs/package.json & docs/package-lock.json to reduce vulnerabili…#927
Krosebrook wants to merge 5 commits intocoleam00:mainfrom
Krosebrook:claude/audit-refactor-codebase-01KjP7fmHus23qPLLQNsnp5x

Conversation

@Krosebrook
Copy link
Copy Markdown

@Krosebrook Krosebrook commented Jan 14, 2026

Pull Request

Summary

Changes Made

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Performance improvement
  • Code refactoring

Affected Services

  • Frontend (React UI)
  • Server (FastAPI backend)
  • MCP Server (Model Context Protocol)
  • Agents (PydanticAI service)
  • Database (migrations/schema)
  • Docker/Infrastructure
  • Documentation site

Testing

  • All existing tests pass
  • Added new tests for new functionality
  • Manually tested affected user flows
  • Docker builds succeed for all services

Test Evidence

# Example: python -m pytest tests/
# Example: cd archon-ui-main && npm run test

Checklist

  • My code follows the service architecture patterns
  • If using an AI coding assistant, I used the CLAUDE.md rules
  • I have added tests that prove my fix/feature works
  • All new and existing tests pass locally
  • My changes generate no new warnings
  • I have updated relevant documentation
  • I have verified no regressions in existing features

Breaking Changes

Additional Notes

Summary by CodeRabbit

  • New Features

    • Added optional server and frontend configuration options for development environments.
  • Bug Fixes

    • Improved exception handling to be more specific and targeted across services.
  • Removed Features

    • Agent Work Orders feature now disabled by default.
    • Removed Button Playground component from settings UI.
    • Removed Socket.IO proxy configuration.
  • Improvements

    • Re-enabled frontend type checking and test coverage reporting in CI pipeline.
    • Updated development service startup configuration.

✏️ Tip: You can customize this high-level summary in your review settings.

snyk-bot and others added 5 commits September 30, 2025 14:29
…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.
Copilot AI review requested due to automatic review settings January 14, 2026 11:54
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 14, 2026

📝 Walkthrough

Walkthrough

This 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

Cohort / File(s) Summary
Feature Flag & Build Configuration
.env.example, python/Dockerfile.server
Disabled Agent Work Orders by default (ENABLE_AGENT_WORK_ORDERS: true → false). Removed agent_work_orders directory from Dockerfile.server build artifacts.
Frontend Environment Configuration
archon-ui-main/.env.example
Added optional server host/port, allowed hosts, agent work orders URL, and devtools flag environment variables.
Frontend Component Removal
archon-ui-main/src/components/settings/ButtonPlayground.tsx, archon-ui-main/src/pages/SettingsPage.tsx
Removed ButtonPlayground component (679 lines) and all references from SettingsPage including state, imports, and collapsible UI section.
Frontend Service Error Handling
archon-ui-main/src/features/mcp/services/mcpApi.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/migrations/services/migrationService.ts, archon-ui-main/src/features/settings/version/services/versionService.ts
Removed console.error logging from catch blocks across multiple service methods while preserving error rethrow behavior.
Frontend Code Cleanup
archon-ui-main/src/features/knowledge/components/KnowledgeCard.tsx, archon-ui-main/src/features/knowledge/components/KnowledgeCardActions.tsx
Removed unused variable comment; aliased unused sourceId parameter with underscore prefix.
Frontend Proxy & Vite Configuration
archon-ui-main/vite.config.ts
Removed Socket.IO proxy configuration entry ("/socket.io" route).
Development Targets & Docker Compose
Makefile, docker-compose.yml
Updated dev target to start only archon-server and archon-mcp; updated dev-docker to include archon-frontend; changed stop target to use agents and work-orders profiles instead of backend/frontend/full/work-orders. Updated service description comment.
CI/CD Testing
.github/workflows/ci.yml
Re-enabled and expanded frontend CI steps: TypeScript type checking, Vitest coverage testing, and artifact uploads for test results and coverage reports. Updated architecture summary description.
Python Exception Handling
python/src/agents/base_agent.py, python/src/agents/document_agent.py, python/src/server/services/knowledge/database_metrics_service.py, python/src/server/services/storage/code_storage_service.py
Narrowed broad exception handling to specific exception types (ValueError, AttributeError, IndexError, json.JSONDecodeError, TypeError) in error handlers, improving error propagation specificity.
Dependency Updates
docs/package.json
Updated @docusaurus packages from ^3.8.0 to ^3.9.0.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Possibly related PRs

Poem

🐰 Buttons played, but now they rest,
Logs are silent, passing tests,
Errors caught with sharper sight,
Agents dormant, Docker tight!
Cleanup hops into the night.

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title references reducing vulnerabilities in docs/package.json but the changeset includes far more extensive modifications across the entire codebase beyond dependency updates. Revise the title to accurately reflect the comprehensive nature of the changes (audit/refactor), such as 'refactor: comprehensive codebase audit and dependency updates' or provide a more descriptive summary.
Description check ⚠️ Warning The PR description is entirely template boilerplate with no content filled in; all sections (Summary, Changes Made, Type of Change, Testing, Checklist) remain as empty placeholders. Complete the PR description with a detailed summary of all changes, mark the appropriate type of change (refactoring, code cleanup), list affected services, and confirm testing/checklist items have been completed.
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Comment on lines +136 to 137
except (ValueError, AttributeError, IndexError):
pass
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

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

'except' clause does nothing but pass and there is no explanatory comment.

Suggested change
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,
)

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Comment thread .github/workflows/ci.yml
Comment on lines +58 to +62
- name: Upload frontend coverage to Codecov
if: always()
uses: codecov/codecov-action@v4
with:
files: ./archon-ui-main/coverage/lcov.info
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

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 unused sourceId prop from interface.

The sourceId prop 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/onDelete callbacks), consider removing sourceId from 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: to except 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: true means 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

📥 Commits

Reviewing files that changed from the base of the PR and between ecaece4 and ff45bbf.

⛔ Files ignored due to path filters (1)
  • docs/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (21)
  • .env.example
  • .github/workflows/ci.yml
  • Makefile
  • archon-ui-main/.env.example
  • archon-ui-main/src/components/settings/ButtonPlayground.tsx
  • archon-ui-main/src/features/knowledge/components/KnowledgeCard.tsx
  • archon-ui-main/src/features/knowledge/components/KnowledgeCardActions.tsx
  • archon-ui-main/src/features/mcp/services/mcpApi.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/migrations/services/migrationService.ts
  • archon-ui-main/src/features/settings/version/services/versionService.ts
  • archon-ui-main/src/pages/SettingsPage.tsx
  • archon-ui-main/vite.config.ts
  • docker-compose.yml
  • docs/package.json
  • python/Dockerfile.server
  • python/src/agents/base_agent.py
  • python/src/agents/document_agent.py
  • python/src/server/services/knowledge/database_metrics_service.py
  • python/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.tsx
  • archon-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.tsx
  • archon-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.py
  • python/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.py
  • python/src/agents/document_agent.py
  • python/src/server/services/knowledge/database_metrics_service.py
  • python/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.py
  • python/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.py
  • python/src/agents/document_agent.py
  • python/src/server/services/knowledge/database_metrics_service.py
  • python/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.tsx
  • archon-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.ts
  • 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/**/*.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: if float() receives an invalid string
  • AttributeError: if match is None and .group() is called
  • IndexError: defensive catch for regex group access

This 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 conversion
  • TypeError: None or incompatible type passed to int()
  • AttributeError: if _cache or _cache_initialized attributes are missing

The KeyError case is correctly handled by the in check on line 1039, so it doesn't need to be caught.

python/src/agents/document_agent.py (1)

318-343: Correct narrowing to json.JSONDecodeError for JSON parsing.

All three exception handlers correctly target json.JSONDecodeError, which is the specific exception raised by json.loads() for invalid JSON input. This allows other unexpected exceptions (e.g., TypeError if new_content is unexpectedly None) 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=false is 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_orders directory from the server image is appropriate. The server communicates with the agent_work_orders microservice (running as archon-agent-work-orders with its own Dockerfile.agent-work-orders) via a proxy pattern in api_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-artifact step uses archon-ui-main/coverage/ as the path, but this step runs after a job where working-directory: ./archon-ui-main is set. However, upload-artifact uses 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 at archon-ui-main/coverage/.


58-65: Frontend coverage upload to Codecov looks good.

The path ./archon-ui-main/coverage/lcov.info correctly 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-mcp is clearer than profile-based startup and aligns with the narrowed development scope.


64-64: LGTM!

Adding archon-frontend to dev-docker provides 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.

Comment thread docs/package.json
Comment on lines +17 to +19
"@docusaurus/core": "^3.9.0",
"@docusaurus/preset-classic": "^3.9.0",
"@docusaurus/theme-mermaid": "^3.9.0",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 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.

Comment thread Makefile
Comment on lines 125 to 128
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"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

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.

@Wirasm
Copy link
Copy Markdown
Collaborator

Wirasm commented Apr 6, 2026

🔄 This repository is being replaced by a new version of Archon.

The original Python/MCP codebase is being archived to the archive/v1-python-mcp branch. The new Archon (TypeScript workflow engine for AI coding agents) is replacing it.

This PR is being closed as part of the migration. Thank you for your contribution!

@Wirasm Wirasm closed this Apr 6, 2026
coleam00 pushed a commit that referenced this pull request Apr 7, 2026
…-564

feat(workflows): store node outcome counts in workflow run metadata
Tyone88 pushed a commit to Tyone88/Archon that referenced this pull request Apr 16, 2026
…ix-issue-564

feat(workflows): store node outcome counts in workflow run metadata
joaobmonteiro pushed a commit to joaobmonteiro/Archon that referenced this pull request Apr 26, 2026
…ix-issue-564

feat(workflows): store node outcome counts in workflow run metadata
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.

5 participants