03 · MCP server: deterministic verification and git truth #5
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
cmoriarty/trog#5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Verification lives in tools, not prompts.
Architecture (decided): verification and batch logic is a plain Python library; LangGraph nodes import it directly (same process, no HTTP hop). A thin, pure MCP server wraps that library for the brain — the LLM is the only MCP consumer. No parallel REST surface like agentic-game-dev's gateway (its ~28 REST routes partly exist because the orchestrator predates the graph).
Core capabilities:
check_phase— deterministic checks (files exist, tests pass, assets present, critiques recorded), keyed to the exact commit it ran onReuse policy: agentic-game-dev's
orchestrator/orchestrator/main.pyexposes 26 MCP tools + ~28 REST routes. Audit every one before porting; expect to drop many. Each tool carried over needs a reason tied to a v1 ticket — nothing comes along by default (e.g. CC0 asset search, qdrant indexing, studio session routes are likely cuts).Reference:
/Users/cmoriarty/repos/agentic-game-dev/orchestrator/orchestrator/—check_phase.py,ledger.py,batch.py,main.py.Gateway: deterministic verification and git truthto 03 · Gateway: deterministic verification and git truth03 · Gateway: deterministic verification and git truthto 03 · MCP server: deterministic verification and git truthDone — verification is deterministic, git is truth
What was done (main commits:
53134e0,6516ba3)server/trog_lib/— the plain library, exactly as this ticket decided: graph nodes import it in-process, no HTTP hop, no REST surface.forgejo.py— per-game repos under the trog-games org via the Forgejo API (no git binary in the container): create repo, commit file, read file at any refledger.py— commit-keyed, append-only verification ledger in the stack's Postgres. Producers write rows as side effects; consumers do record lookups. A verdict is bound to the exact commit it judged — edit a file and every old record is stale by construction (design inherited from agentic-game-dev's ledger, sqlite → Postgres)check_phase.py— deterministic checks at an exact commit: doc committed, doc substantial, no scaffold{placeholders}left, passing gate critique on the ledger for that same committrog_lib/mcp_server.py→ new compose service trog-mcp (:8100, streamable-http, same image as aegra, different command). Two tools:check_phase,ledger_recent. The LLM is the only intended MCP consumer.setup_repoentry node creates the game repo + commits the brief; every phase commits its doc; gates record the brain-critique on the ledger and then route oncheck_phasefacts. The critic advises, the ledger decides.docs/mcp-audit.md— full disposition of agentic-game-dev's 26 MCP tools + 28 REST routes: 1 ported now (check_phase, reshaped), ~14 deferred to ticket 05 with reasons, the rest cut (CC0 search, web tools, Löve runner, speech, card compositing, studio-session REST).setup_reponow health-gates the run's entry; the LLM client retries transient 5xx.Live evidence (brief: herd fireflies into a jar before dawn):
The fun gate rejected two GDDs before passing the third — the backward edge fired for real, and the repo + ledger recorded all of it:
Also live-verified: check_phase FAILS before a critique is recorded and for stale commits; the MCP endpoint serves both tools to a real streamable-http client cross-container.
How to test
Notes
FORGEJO_TOKEN(write:repository + write:organization) lives only in the Portainer stack env.pullImage: false; a surprise upstream pull is what killed run one.Review complete — closing
Code and the generated game repo reviewed and approved.
Wrap-up:
trog-games/a-tiny-browser-game-2607231601(aborted run one) and…2607231604(the full firefly run) both deleted — the ledger design means their evidence lives in this ticket's comment, not in kept reposd030d53.forgejo/workflows/test.ymlruns the 15-test suite on every push/PR via the new instance runner (strongbad-runner), andcheck-updates.ymlreports dependency drift daily — both badged in the READMEVerification remains deterministic, git remains truth. On to ticket 05/10.