Skip to content

Agent Cabinet genuine-path dogfood (one local receipt) - #65

Merged
RaapTechllc merged 1 commit into
mainfrom
cursor/agent-eval-dogfood-15e3
Sep 11, 2026
Merged

RaapTechllc merged 1 commit into
mainfrom
cursor/agent-eval-dogfood-15e3

Conversation

@RaapTechllc

Copy link
Copy Markdown
Owner

Why

PRD #30 infrastructure is on main. The remaining gap is a genuine evaluation path from execution to an inspectable product receipt — not another fake/gold dry-run sold as live evidence.

This PR does not merge, does not publish to production, and does not enable a paid campaign.

Preflight (reuse, no new adapter family)

Documented in docs/validation/agent-eval-reuse-preflight.md.

Reused as-is:

  • AgentAdapter + run_agent_trial + OfflineTextEnvironment
  • OpenAICompatClient (injectable Transport)
  • build_agent_artifact / apply_agent_cabinet_to_artifact
  • publication_receipt (still refuses dry_run)
  • the existing offline-text-repair@1 fixture

python -m agentbench.agent_eval is a binding of that contract. Family CLIs stay offline gold/fake runners.

What landed

  • FilesystemModelAgent inspects the workspace, calls the existing client, applies JSON writes, and leaves hidden verification in the environment

  • Local product receipt: scorecard (completion, category completion, cost, latency) + publication gate + technician provenance

  • Honest labels:

    Class dry_run Meaning
    offline-reference always true fake/gold
    injected-transport always true model adapter + scripted transport (CI/dogfood)
    live-local false local Ollama only; CLI still does not POST
    paid OpenRouter / Ollama Cloud refused needs owner authorization
  • Tests prove the path, including “wrong model write fails hidden verify” (not a gold agent)

  • CI runs the injected-transport dogfood and asserts dry_run, published: false, and publishable: false

Live-provider blocker

This environment has no OPENROUTER_API_KEY, no local Ollama daemon, and this CLI does not use OLLAMA_API_KEY (Ollama Cloud is treated as paid). A live-local receipt needs an operator machine with Ollama. A paid campaign is a separate authorized task. Do not flip dry_run.

Dogfood locally

python -m agentbench.agent_eval \
    --manifest agentbench/tasks/minibench-agent-v1-dogfood.json \
    --agent model \
    --scripted-reply-file agentbench/tasks/dogfood-scripted-reply.json \
    --trials 2 \
    --out /tmp/minibench-agent-eval.json \
    --receipt-out /tmp/minibench-agent-eval-receipt.json

Inspect the receipt. Then:

python -m agentbench.import_results /tmp/minibench-agent-eval.json --check
# expected: REFUSED … dry_run … destination=/api/v1/agent-cabinet/runs

Optional live-local (unpublished):

python -m agentbench.agent_eval \
    --manifest agentbench/tasks/minibench-agent-v1-dogfood.json \
    --agent model --provider ollama --model llama3.2:1b \
    --trials 1 \
    --out /tmp/minibench-agent-eval-ollama.json \
    --receipt-out /tmp/minibench-agent-eval-ollama-receipt.json

Operator notes: docs/operators/agent-cabinet.md (Genuine dogfood).

Verification

  • cd agentbench && pytest -q → 503 passed, 3 skipped
  • Injected dogfood CLI → receipt evaluation_class=injected-transport, dry_run=true, published=false
  • import_results --check refuses the dogfood artifact
  • --provider openrouter exits 2 and writes nothing
  • Existing agent_tasks smoke and MoA --dry-run still pass

Does not close #30. Does not touch Folio/FabOps, secrets, or production publication flags.

Open in Web Open in Cursor 

Reuse AgentAdapter, run_agent_trial, OpenAICompatClient, and
publication_receipt for one inspectable local product receipt.
Scripted transports stay injected-transport / dry_run; paid
OpenRouter and Ollama Cloud calls are refused without authorization.

Co-authored-by: RaapTechllc <RaapTechllc@users.noreply.github.com>
@RaapTechllc
RaapTechllc marked this pull request as ready for review September 11, 2026 03:52
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 11, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-11T03:57:45.780760Z 2ce33b7 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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

Copy link
Copy Markdown

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: 2ce33b78cb

ℹ️ 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 agentbench/agent_eval.py
Comment on lines +53 to +57
_SYSTEM = (
"You edit files in a local workspace. Read the user request and the file "
"listing. Reply with JSON only: "
'{"writes": {"relative/path": "full file contents"}}'
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Hash the model adapter's actual prompt configuration

For live-local artifacts, this is the real system prompt, but write_agent_artifact still derives prompt_config_sha256 from only the manifest's public prompt and the literal agent-harness; neither _SYSTEM nor the workspace-listing/output-format template is included. Changing this prompt or comparing against another adapter using the same manifest and harness can therefore leave every COMPARABILITY_FIELDS value equal and incorrectly classify prompt-different results as exactly comparable, so the actual model prompt template needs to be threaded into the provenance hash.

Useful? React with 👍 / 👎.

Comment thread agentbench/agent_eval.py
Comment on lines +379 to +384
if artifact["provenance"].get("self_check") == "failed":
return 1
if not all(trial.get("workspace_disposed") for trial in artifact["trials"]):
return 1
# Injected/fake dogfood is a path proof, not a leaderboard publish.
return 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.

P2 Badge Return nonzero for infrastructure-failed evaluations

When the Ollama probe succeeds but the subsequent chat call fails—for example because the requested model is absent or the daemon disappears—run_agent_trial records execution_failed, and the receipt refuses the artifact for infrastructure_errors; however, the self-check and disposal checks here still pass, so the CLI returns 0 even though no valid model evaluation occurred. Check the trial or summary infrastructure status before returning success so shell automation cannot treat this as a completed run.

Useful? React with 👍 / 👎.

Comment thread agentbench/agent_eval.py
[ChatMessage(role="system", content=_SYSTEM), ChatMessage(role="user", content=user)],
temperature=0.0,
top_p=1.0,
max_tokens=min(budget.max_tokens, self.max_output_tokens) or 1,

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 Respect a zero-token budget before calling the model

AgentBudget.from_dict explicitly permits max_tokens == 0, but this expression converts that limit to max_tokens=1 and still performs the provider call before budget.consume reports an overage. A valid zero-token manifest therefore executes a model request despite forbidding all token use; reject that mode or return a timeout before invoking client.chat rather than overriding the configured budget.

Useful? React with 👍 / 👎.

@RaapTechllc
RaapTechllc merged commit ce9c499 into main Sep 11, 2026
4 checks passed
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.

PRD: Real-Work Agent Cabinet — minibench-agent-v1

2 participants