Skip to content

Feat/mvp phase2 correctness - #4

Merged
AhmadHammad21 merged 6 commits into
mainfrom
feat/mvp-phase2-correctness
May 5, 2026
Merged

AhmadHammad21 merged 6 commits into
mainfrom
feat/mvp-phase2-correctness

Conversation

@AhmadHammad21

Copy link
Copy Markdown
Owner

No description provided.

- tools/bash_tool.py: run_bash_command with prefix allowlist, 30s timeout,
  shell=False, structured {success, output, error, command, blocked} return,
  output capped at 4 KB, Loguru logging on every call
- Registered in ALL_TOOLS alongside existing 19 AWS tools
- prompts.py: bash tool rules — prefer boto3 tools first, explain reasoning,
  never attempt state-modifying commands
- 49 tests covering allowlist, blocklist, timeout, exceptions, output capping,
  result structure; all subprocess calls mocked with pytest-mock
- README: bash tool in What's inside, Security & Sandboxing section,
  Phase 2 Docker sandbox item in Later roadmap
Replace per-service prefix allowlist with verb-based check:
any aws <service> <operation> where the operation starts with
describe-, list-, get-, lookup-, filter-, search-, scan-, query, batch-get-
is allowed — covering all AWS services, not just the 7 with boto3 tools.

Blocked by operation verb: create, delete, update, put, run, invoke,
terminate, stop, send, modify, etc.

kubectl and docker keep exact prefix matching (narrower scope).
System prompt updated to tell the agent it has full AWS CLI read-only
access and should use it for any service not covered by boto3 tools.
83 tests passing.
- Dockerfile: two-stage build (uv deps + final), installs AWS CLI v2
  so run_bash_command works on any server without manual setup
- docker-compose.yml: backend + postgres (healthcheck) + nginx frontend;
  mounts ~/.aws read-only for dev; override with IAM role in production
- frontend/Dockerfile: nginx production build
- frontend/nginx.conf: proxy /chat /sessions /history /stats to backend,
  SSE-safe (proxy_buffering off), SPA fallback for React Router
- .dockerignore: excludes .venv, node_modules, .env, tests, docs
- README: Docker Compose as recommended run option, local dev as Option B
@AhmadHammad21
AhmadHammad21 merged commit 48f0fd9 into main May 5, 2026
2 checks passed
@AhmadHammad21
AhmadHammad21 deleted the feat/mvp-phase2-correctness branch May 5, 2026 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant