-
Notifications
You must be signed in to change notification settings - Fork 16
fix(agent-challenge): owned CVM teardown, fail-loud list, staging stack #51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,71 @@ | ||||||||||||
| # Local Agent Challenge staging stack — isolated from prod. | ||||||||||||
| # Host port 18082 (prod embed uses 18081 inside master). Named volume + project | ||||||||||||
| # prefix keep DB/artifacts off any prod path. | ||||||||||||
| # | ||||||||||||
| # Build from monorepo root: | ||||||||||||
| # docker compose -f packages/challenges/agent-challenge/docker-compose.staging.yml build | ||||||||||||
| # Or use scripts/staging/run_staging.sh (preferred). | ||||||||||||
|
|
||||||||||||
| name: ac-staging | ||||||||||||
|
|
||||||||||||
| services: | ||||||||||||
| agent-challenge: | ||||||||||||
| image: ghcr.io/baseintelligence/agent-challenge:staging-local | ||||||||||||
| build: | ||||||||||||
| context: . | ||||||||||||
| dockerfile: Dockerfile | ||||||||||||
| target: runtime | ||||||||||||
| additional_contexts: | ||||||||||||
| monorepo: ../../.. | ||||||||||||
| container_name: ac-staging-validator | ||||||||||||
| restart: "no" | ||||||||||||
| ports: | ||||||||||||
| - "127.0.0.1:18082:8000" | ||||||||||||
| volumes: | ||||||||||||
| - ac_staging_data:/data | ||||||||||||
| - ./scripts/staging/config/review_evidence_encryption_key:/run/secrets/base/review_evidence_encryption_key:ro | ||||||||||||
| - ./scripts/staging/config/challenge_token:/run/secrets/base/challenge_token:ro | ||||||||||||
| # Frozen Terminal-Bench 2.1 digest (eval/prepare fails closed without this). | ||||||||||||
| - ./golden:/app/golden:ro | ||||||||||||
| - ./golden:/opt/agent-challenge/golden:ro | ||||||||||||
| # dcap-qvl is baked into the runtime image; host bind is optional fallback | ||||||||||||
| - /root/.cargo/bin/dcap-qvl:/usr/local/bin/dcap-qvl:ro | ||||||||||||
|
Comment on lines
+31
to
+32
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win Unconditional host bind of Docker creates an empty directory at a missing bind source, then mounts it over 🔧 Proposed change- # dcap-qvl is baked into the runtime image; host bind is optional fallback
- - /root/.cargo/bin/dcap-qvl:/usr/local/bin/dcap-qvl:ro
+ # dcap-qvl is baked into the runtime image. If you need a host override,
+ # add it via an extra `-f` override file rather than here — a missing
+ # source path would be auto-created as a directory and shadow the binary.📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||
| env_file: | ||||||||||||
| - ./scripts/staging/config/challenge.env | ||||||||||||
| environment: | ||||||||||||
| CHALLENGE_DATABASE_URL: sqlite+aiosqlite:////data/agent-challenge.sqlite3 | ||||||||||||
| CHALLENGE_DATA_DIR: /data | ||||||||||||
| CHALLENGE_ARTIFACT_ROOT: /data/agents | ||||||||||||
| CHALLENGE_SHARED_TOKEN_FILE: /run/secrets/base/challenge_token | ||||||||||||
| CHALLENGE_REVIEW_EVIDENCE_ENCRYPTION_KEY_FILE: /run/secrets/base/review_evidence_encryption_key | ||||||||||||
| CHALLENGE_COMBINED_WORKER: "true" | ||||||||||||
| CHALLENGE_DOCKER_ENABLED: "false" | ||||||||||||
| CHALLENGE_RAW_WEIGHT_PUSH_ENABLED: "false" | ||||||||||||
| CHALLENGE_PHALA_ATTESTATION_ENABLED: "true" | ||||||||||||
| CHALLENGE_ATTESTED_REVIEW_ENABLED: "true" | ||||||||||||
| # Prod path: terminal-bench + frozen digest (default package backend is swe_forge). | ||||||||||||
| CHALLENGE_BENCHMARK_BACKEND: terminal_bench | ||||||||||||
| CHALLENGE_TERMINAL_BENCH_EXECUTION_BACKEND: own_runner | ||||||||||||
| CHALLENGE_OWN_RUNNER_DIGEST_MANIFEST: /app/golden/dataset-digest.json | ||||||||||||
| # Eval result signer — substrate dev URI (local only; never production wallet) | ||||||||||||
| CHALLENGE_EVAL_RESULT_SIGNER_URI: "//Alice" | ||||||||||||
| CHALLENGE_LOG_LEVEL: INFO | ||||||||||||
| # Shortest viable eval for spend control (still real tasks) | ||||||||||||
| CHALLENGE_EVALUATION_TASK_COUNT: "1" | ||||||||||||
| CHALLENGE_EVAL_K: "1" | ||||||||||||
| healthcheck: | ||||||||||||
| test: | ||||||||||||
| [ | ||||||||||||
| "CMD", | ||||||||||||
| "python", | ||||||||||||
| "-c", | ||||||||||||
| "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health', timeout=3)", | ||||||||||||
| ] | ||||||||||||
| interval: 5s | ||||||||||||
| timeout: 5s | ||||||||||||
| retries: 30 | ||||||||||||
| start_period: 15s | ||||||||||||
|
|
||||||||||||
| volumes: | ||||||||||||
| ac_staging_data: | ||||||||||||
| name: ac-staging-data | ||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Preserve the owned-CVM teardown boundary consistently.
The documentation mixes owned-only cleanup with account-wide zero-count and sweep language, which could lead to deletion of foreign or production CVMs.
AGENTS.md#L96-L98: verify that only the run-owned CVM count reaches zero; do not require an account-wide zero.packages/challenges/agent-challenge/docs/staging.md#L102-L102: state that--downremoves only owned CVMs and does not sweep the account.📍 Affects 2 files
AGENTS.md#L96-L98(this comment)packages/challenges/agent-challenge/docs/staging.md#L102-L102🤖 Prompt for AI Agents