Skip to content

#106: LLM + solver end-to-end harness (manual)#113

Merged
hfoffani merged 3 commits into
mainfrom
e2e-106
Jul 13, 2026
Merged

#106: LLM + solver end-to-end harness (manual)#113
hfoffani merged 3 commits into
mainfrom
e2e-106

Conversation

@hfoffani

Copy link
Copy Markdown
Owner

Closes #106 (the harness half — the doc replacement lands after we run real rounds).

What

e2e/llm/ — a manual, non-CI harness that reproduces docs/llm-interaction.md with a real model, per the issue's steps 1–7:

  • Transient env (steps 1–4): the MCP server runs as uvx --from "pddlpy[mcp]" pddlpy-mcp — the published package in a throwaway environment, nothing from the checkout.
  • harness.py (OpenRouter, for small/open models): hands the model the courier problem in NL plus tools — a local write_file and the pddlpy MCP tools bridged to OpenRouter function-calling. Captures a full markdown transcript per run (gitignored; the winning one gets committed with the doc update).
  • Soundness gate (step 7): validate was actually used, solve returned the 7-toll optimum, and the final answer narrates cost + route. Exit 0/1/2.
  • claude_driver.sh (mid-tier models): drives the same MCP server through claude -p --mcp-config — zero custom harness, as agreed. codex exec works analogously.
  • make e2e-llm MODEL=... as the entry point; --dry-run replays the doc's scripted turns through the entire pipeline (MCP server, dispatch, transcript, soundness) with no API key — verified green locally.

Notes

  • Deliberately manual: non-deterministic, needs OPENROUTER_API_KEY, never in CI.
  • Second commit fixes a self-inflicted .gitignore bug (pattern appended to a file with no trailing newline fused with the .claude/ rule) and untracks accidentally staged paths.
  • Step 8 (replace the doc's simulation with the best real transcript, labeled model+date) happens in a follow-up PR once rounds run with the provided keys.

🤖 Generated with Claude Code

hfoffani and others added 3 commits July 12, 2026 22:23
e2e/llm/harness.py drives a real model (OpenRouter) against the pddlpy
MCP server served from the PUBLISHED package (uvx --from pddlpy[mcp]):
the model gets the courier problem in NL plus write_file + the MCP
tools, and the run is judged sound iff validate was used, solve
returned the 7-toll optimum, and the final answer narrates it. Each
run captures a markdown transcript (gitignored; the winning one gets
committed with the docs/llm-interaction.md replacement). --dry-run
replays the doc's scripted turns through the full pipeline offline —
verified green. claude_driver.sh covers mid-tier models via claude -p
with an MCP config. make e2e-llm MODEL=... as the manual entry point;
deliberately not in CI (non-deterministic).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…nscript

The previous commit appended the transcripts ignore pattern to a
.gitignore lacking a trailing newline, fusing it with the '.claude/'
line — which un-ignored both, letting 'git add -A' stage the agent
worktree gitlinks and the dry-run transcript. Restore the two rules
and drop the three paths from the index.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Round 1 exposed two weak-model failure modes: double-escaped newlines
in JSON tool arguments (PDDL written as one line of literal \n -> ANTLR
token errors) and invented cost syntax (:cost fields, fantasy function
blocks) that burned all turns in the validate loop. write_file now
decodes literal \n/\t when the content has no real newlines, the
system prompt gains a 4-line action-costs syntax reminder (the moral
equivalent of the agent skill), and max turns go 12 -> 20.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@hfoffani hfoffani self-assigned this Jul 13, 2026
@hfoffani
hfoffani merged commit 66df472 into main Jul 13, 2026
1 check 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.

LLM plus solver End-to-End test

1 participant