Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
9f313a0
update imports
levisingularity Jun 16, 2026
1f91f01
small adjustment to app layout
levisingularity Jun 17, 2026
474106a
refactor configuration page style and layout
levisingularity Jun 17, 2026
055452d
General refactor on agent section
levisingularity Jun 17, 2026
283a383
small adjustment on dashboard page layout to not break with new app g…
levisingularity Jun 17, 2026
ba7c69e
refactor atomdb section layout and add AdapterDB option
levisingularity Jun 17, 2026
937b4ed
added a get defaults endpoint for the back-end
levisingularity Jun 17, 2026
00a55af
Updated atomdb section to new default fetch logic and input save logic.
levisingularity Jun 18, 2026
074d276
added default values fetch from server
levisingularity Jun 18, 2026
0ccf0cb
Updated environment section to new default fetch logic and input save…
levisingularity Jun 18, 2026
3fa8dbe
Removed old brokers section
levisingularity Jun 18, 2026
86009e7
removed old defaults file
levisingularity Jun 18, 2026
3793d2c
updated agents section to new default data fetch logic and input save…
levisingularity Jun 18, 2026
eab3f9c
refactored config preview button
levisingularity Jun 20, 2026
a87aecf
cleanup on input collection logic.
levisingularity Jun 20, 2026
a2e8895
added missing inference params
levisingularity Jun 20, 2026
54321cb
added configuration mappers and builders to build from user inputs.
levisingularity Jun 20, 2026
b252aef
updated constants format to match front-end and make it easier to mai…
levisingularity Jun 20, 2026
f70b6e9
Define shared config paths and the flat frontend config contract.
levisingularity Jun 22, 2026
f4f1057
Integrated front-end with back-end services
levisingularity Jun 22, 2026
46c93ee
Small fixes on adapterdb
levisingularity Jun 23, 2026
2b57dc7
Adjusting adapter defaults
levisingularity Jun 23, 2026
cc13d71
Reworked export functionality to only export what has been typed on t…
levisingularity Jun 23, 2026
34baacb
added 'das-cli config set' call after saving/exporting the configurat…
levisingularity Jun 23, 2026
6f80f61
Added front-end basic validation on inputs.
levisingularity Jun 23, 2026
a178712
removed unused imports.
levisingularity Jun 23, 2026
52f300a
Add coderabbit YAML file
ccgsnet Jun 23, 2026
7f1459e
CodeRabbit changes
ccgsnet Jun 23, 2026
5886ee2
fix container naiming mistake on startup script.
levisingularity Jun 23, 2026
6cab70d
codeRabbit fix:
levisingularity Jun 25, 2026
9a99fd1
codeRabbit backend fixes:
levisingularity Jun 25, 2026
6f750e5
rabbitCode fix:
levisingularity Jun 25, 2026
a3f4768
rabbidCode fixes:
levisingularity Jun 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
164 changes: 164 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
language: en-US
focus: balanced

tone_instructions: >-
Prioritize correctness, Docker/shell safety, and integration test coverage.
Flag bugs in CLI behavior, container lifecycle, and config handling. Skip style
nits already enforced by CI (black, isort, flake8, mypy on das-cli).

reviews:
profile: assertive
commit_status: true
request_changes_workflow: true
high_level_summary: true
high_level_summary_in_walkthrough: true
high_level_summary_instructions: |
Summarize the PR in 3–5 bullets. Call out: (1) correctness risks (CLI behavior,
Docker/container lifecycle, config/secrets handling), (2) impact on packaging or
deployment (Debian/Docker/self-hosted runners), and (3) whether behavior changes
have matching tests in das-cli/tests/ or component-specific test suites.
poem: false
review_status: true
collapse_walkthrough: false
tools:
eslint:
enabled: true
flake8:
enabled: true
ruff:
enabled: true
shellcheck:
enabled: true
github-checks:
enabled: true
# Self-hosted CI (lint, build, bats integration tests) can exceed the 90s default.
timeout_ms: 900000
pre_merge_checks:
docstrings:
mode: off
custom_checks:
- name: Tests for behavior changes
mode: error
instructions: |
PASS when any of the following is true:
- The PR only touches docs, CI, config, or formatting (no production logic).
- Production code changes behavior and the PR adds or updates tests (bats under
das-cli/tests/integration/, pytest under das-cli/tests/agents_integration/,
or component-specific tests where they exist).
- The PR description explains why tests are intentionally omitted.
FAIL when production logic changes (bug fixes, new CLI commands, API endpoints,
container orchestration) without corresponding test updates and without
justification in the description.
finishing_touches:
unit_tests:
enabled: true
auto_review:
enabled: true
drafts: false
base_branches:
- master
path_filters:
- "!**/__pycache__/**"
- "!**/.pytest_cache/**"
- "!**/node_modules/**"
- "!**/dist/**"
- "!**/htmlcov/**"
- "!das-dashboard/package-lock.json"
path_instructions:
- path: "das-cli/src/**/*.py"
instructions: |
DAS CLI (Python 3.11, injector DI). Follow existing module layout:
commands/<group>/{*_module.py, *_cli.py, *_docs.py} and common/ utilities.
Formatting: Black line-length 100, skip-string-normalization (src/.black.cfg).
isort profile black, line_length 100 (src/.isort.cfg). flake8 max-line-length 100;
E203/E501 ignored (src/.flake8.cfg). mypy with check_untyped_defs (src/mypy.ini).
Modules extend common.Module, bind dependencies in configure(), expose CLI via *_cli.py.
Use the project logger patterns in common/logger.py — not ad-hoc print/logging.
Docker interactions go through common/docker/ and common/container_manager/ — match
existing lifecycle patterns (start/stop/status) and error handling.
Config uses JsonConfigStore and Settings — preserve key names and JSON structure.
Prefer minimal, focused diffs. Do not flag pre-existing style in untouched code.
CI runs `make lint` in das-cli (isort, black, flake8, mypy) — do not nitpick style CI checks.
TEST COVERAGE: CLI behavior changes should have bats integration tests under
das-cli/tests/integration/ or pytest under das-cli/tests/agents_integration/;
suggest concrete test cases (error paths, missing config, container failures).
- path: "das-cli/tests/**/*.bats"
instructions: |
Bats integration tests for das-cli. CI runs via `make tests-local` on self-hosted runners.
Tests use fixtures under tests/integration/fixtures/ and libs under tests/integration/libs/.
Prioritize real end-to-end CLI behavior: config errors, container start/stop, service status.
Mirror patterns from sibling *.bats files (setup/teardown, load libs, assert_output).
Flag tests that are too shallow or miss assertions on changed CLI output/exit codes.
- path: "das-cli/tests/agents_integration/**/*.py"
instructions: |
Pytest agent integration tests. Run via `make tests-integration`. Focus on agent/CLI
contract tests and error handling; suggest cases when agent-facing APIs change without updates.
- path: "das-dashboard/src/**/*.{js,jsx}"
instructions: |
DAS Dashboard frontend (React 19, Vite, MUI, Emotion). ESLint flat config (eslint.config.js).
Match existing component structure: pages/, components/, hooks/, api/. Use functional
components and existing provider patterns (DashboardContextProvider, ConfigurationProvider).
API calls go through src/api/* — do not bypass with raw fetch scattered in components.
Prefer minimal diffs; do not suggest drive-by refactors or unrelated UI changes.
- path: "das-dashboard/backend/**/*.py"
instructions: |
DAS Dashboard mini-backend (FastAPI, uvicorn). Controllers in controllers/, business logic
in services/, DTOs in shared/dtos/, enums in shared/enums/. Routers registered in main.py.
This backend executes shell/das-cli tasks and manages local config — flag unsafe shell
invocation, missing input validation, and path traversal risks. Match existing exception
handling via shared/exceptions/. Preserve WEB_CONFIG and storage paths in shared/internal/.
- path: "gatekeeper/**/*.py"
instructions: |
Gatekeeper API (FastAPI + SQLite) and CLI (gkctl). API under api/src/, CLI under cli/src/.
Mirror existing router/service/schema patterns. Port and instance management must stay
consistent between API and CLI. Flag SQL injection risks, missing auth checks, and race
conditions in port allocation.
- path: "das-runner-manager/**/*.py"
instructions: |
GitHub Actions self-hosted runner manager. CLI commands in src/cli/commands/, Docker
daemon in src/api_server/daemon/, agent service in src/agent_service/. Scripts in scripts/
handle runner lifecycle. Flag Docker socket exposure, token handling, and container cleanup
gaps. Match existing command patterns in src/cli/main.py.
- path: "das-runner-manager/scripts/**"
instructions: |
Shell scripts for runner setup and monitoring. Must be safe for self-hosted CI environments.
Flag unquoted variables, missing error handling (set -euo pipefail), and destructive
operations without guards.
- path: ".github/**"
instructions: |
GitHub Actions and CI. This repo uses self-hosted runners and reusable workflow_call patterns.
Primary PR workflow: run-das-cli-tests.yml (lint, build .deb, bats integration tests).
Preserve existing workflow_call inputs and artifact naming conventions.
- path: "scripts/**"
instructions: |
Root packaging scripts (Debian changelog, Docker build). Changes affect `make build` and
release artifacts — flag breaking changes to PACKAGE_VERSION handling or dist/ output paths.
- path: "**/*"
instructions: |
DAS Toolbox (singnet/das-toolbox) — CLI, web dashboard, runner manager, and gatekeeper for
the Distributed Atomspace (DAS) ecosystem. PRs target master. Primary language is Python;
frontend is React/Vite under das-dashboard/.
Review focus (in order): correctness of CLI/Docker behavior, safe shell/API usage, test
coverage for behavior changes. Favor consistency with neighboring code over generic refactors.
Avoid drive-by changes, unnecessary abstractions, and comments that restate obvious code.
See component READMEs: das-cli/README.md, das-dashboard/README.md, das-runner-manager/README.md,
gatekeeper/README.md.

knowledge_base:
code_guidelines:
enabled: true
filePatterns:
- README.md
- das-cli/README.md
- das-dashboard/README.md
- das-dashboard/backend/README.md
- das-runner-manager/README.md
- gatekeeper/README.md
learnings:
scope: local
issues:
scope: local

chat:
auto_reply: true
3 changes: 2 additions & 1 deletion das-dashboard/backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ RUN apt-get update && apt-get install -y \
&& rm -rf /var/lib/apt/lists/*

RUN mkdir -p /runtime_keys \
/opt/das/.das \
/opt/web-das/.das/workspace/mapped_metta \
/opt/web-das/.das/workspace/metta_files \
&& chmod 700 /runtime_keys

ENV HOME=/opt/web-das
Expand Down
78 changes: 67 additions & 11 deletions das-dashboard/backend/controllers/config_controllers.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,82 @@
from fastapi import APIRouter, UploadFile, File
from typing import Any, Optional

from fastapi import APIRouter, HTTPException
from fastapi.responses import JSONResponse
from pydantic import BaseModel

from services_init import CONFIG_SERVICES, WEB_CONFIG
from shared.dtos.configuration_entries_dto import ConfigurationEntriesDto

router = APIRouter(prefix="/config", tags=["Configuration"])

@router.post("")
async def save_config(config_file: UploadFile = File(...)):
result = await CONFIG_SERVICES.save_config(config_file)
WEB_CONFIG.load_config_dictionary()

class ContextMappingBody(BaseModel):
content: Optional[str] = None
path: Optional[str] = None


@router.post("/save")
async def save_config(configuration_entries: ConfigurationEntriesDto):
result = await CONFIG_SERVICES.save_config(configuration_entries)

return JSONResponse(status_code=200, content=result)


@router.post("/export")
async def export_config(configuration_entries: Optional[ConfigurationEntriesDto] = None):
nested = await CONFIG_SERVICES.export_config(configuration_entries)

return JSONResponse(
status_code=200,
content={
"message": result["message"],
"stdout": result["stdout"]
}
content={"content": nested},
)


@router.post("/export/targets")
async def export_targets(configuration_entries: Optional[ConfigurationEntriesDto] = None):
return JSONResponse(
status_code=200,
content=await CONFIG_SERVICES.export_targets(configuration_entries),
)


@router.post("/export/scp/{ip}")
async def export_config_scp(ip: str, configuration_entries: Optional[ConfigurationEntriesDto] = None):
result = await CONFIG_SERVICES.export_config_scp(ip, configuration_entries)

return JSONResponse(status_code=200, content=result)
Comment thread
coderabbitai[bot] marked this conversation as resolved.


@router.post("/load")
async def load_config(nested_config: dict[str, Any]):
flat = await CONFIG_SERVICES.load_config(nested_config)

return JSONResponse(
status_code=200,
content={"content": flat},
)


@router.post("/adapter/context-mapping")
async def save_context_mapping(body: ContextMappingBody):
result = await CONFIG_SERVICES.save_context_mapping(body.content, body.path)

return JSONResponse(status_code=200, content=result)


@router.get("")
async def get_config():
return JSONResponse(
status_code=200,
content={
"content": WEB_CONFIG.config_dictionary
}
)
},
)


@router.get("/defaults")
async def get_config_defaults(factory: bool = False):
return JSONResponse(
status_code=200,
content=CONFIG_SERVICES.get_config_defaults(factory=factory),
)
3 changes: 2 additions & 1 deletion das-dashboard/backend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from shared.exceptions.exception_handlers import AppExceptionHandlers
from shared.utils.storage_check import validate_persistent_storage
from services_init import WEB_CONFIG
from services_init import WEB_CONFIG, WORKSPACE_SERVICES

# Controllers
from controllers.database_controllers import router as database_router
Expand All @@ -17,6 +17,7 @@
@asynccontextmanager
async def lifespan(app: FastAPI):
validate_persistent_storage()
WORKSPACE_SERVICES.ensure_workspace()
WEB_CONFIG.load_user_profile()
WEB_CONFIG.load_config_dictionary()
yield
Expand Down
Loading
Loading