_version = 1

[workflow]
graph = "code-review.fabro"

[run]
goal = "Verify the code-review workflow against its deliberately buggy fixture."

# A medium files-mode run over the planted-bug fixtures: the cheapest shape
# that still exercises the rule-mapped planner (collapsed to local passes
# and rule audits for this small scope), the deterministic merge, repository
# rules, and the verification pass. rules_probe.py plants a violation of the
# repository rule project.fixture-inventory/function-inventory.
[run.inputs]
mode = "files"
effort = "medium"
scope = ".fabro/workflows/code-review/fixtures/inventory_utils.py,.fabro/workflows/code-review/fixtures/rules_probe.py"
base = ""
commit = ""
range = ""
model = "kimi-k3"
guidance = ""
expected_min_findings = "1"
expected_file = ".fabro/workflows/code-review/fixtures/inventory_utils.py"
expected_min_rule_findings = "1"

[run.run_branch]
enabled = false

[run.pull_request]
enabled = false

[run.model.fallbacks]
"kimi-k3" = ["moonshot:kimi-k3", "modal:kimi-k3", "claude-opus-5"]

[run.environment]
id = "code-review"

[run.environment.env]
GITHUB_TOKEN = ""
GH_TOKEN = ""

[run.artifacts]
include = [
  "CODE-REVIEW-*/.gitignore",
  "CODE-REVIEW-*/CODE-REVIEW-RESULTS.md",
  "CODE-REVIEW-*/CODE-REVIEW-RESULTS.html",
  "CODE-REVIEW-*/CODE-REVIEW-RESULTS.jsonl",
  "CODE-REVIEW-*/evidence/review-manifest.json",
  "CODE-REVIEW-*/evidence/candidate-ledger.jsonl",
  "CODE-REVIEW-*/evidence/findings.json",
  "CODE-REVIEW-*/evidence/coverage.json",
  "CODE-REVIEW-*/evidence/votes.jsonl",
  "CODE-REVIEW-*/metadata/revision.json",
  "CODE-REVIEW-*/metadata/state.json",
  "CODE-REVIEW-*/metadata/review-meta.json",
]

[environments.code-review]
provider = "daytona"

# The review's agents search the tree constantly. The mirrored buildpack-deps
# noble image is the Daytona default base. It ships grep but not ripgrep,
# which respects .gitignore and is far faster on a large repository.
# The xhigh/max rule loader needs PyYAML; the pin and hashes below must stay
# in lockstep with requirements-rules.txt (cp312 manylinux wheels + sdist).
[environments.code-review.image]
dockerfile = """
FROM ghcr.io/lithoscomputer/docker-mirror/buildpack-deps:noble@sha256:1fdce57bbb1105e0e515f6523bd0c3eb1df8b601847cfea140483672f6484afa
RUN apt-get update && apt-get install -y --no-install-recommends ripgrep python3-pip && rm -rf /var/lib/apt/lists/*
RUN echo 'PyYAML==6.0.3 --hash=sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f --hash=sha256:ba1cc08a7ccde2d2ec775841541641e4548226580ab850948cbfda66a1befcdc --hash=sha256:9149cad251584d5fb4981be1ecde53a1ca46c891a79788c0df828d2f166bda28' > /tmp/requirements-rules.txt && python3 -m pip install --break-system-packages --no-cache-dir --require-hashes -r /tmp/requirements-rules.txt && rm /tmp/requirements-rules.txt
"""

[environments.code-review.resources]
cpu = 2
memory = "4GB"
