Every ticket as the root of its provenance graph — goal, patch, approval, runs and (as the ticket-class build lands) mandate, manifestations, guarantees, journey, artifacts and children. Rendered through the <<<TicketGraphList>>> tag.
Tighten the cerebras/GLM-4.7 worker path in ollama_agent.py: embedded-source-first, no cross-module exploration, exact flat deliverable path, max-steps=40
goal
Tighten the `--engine cerebras` (GLM 4.7) worker path in ollama_agent.py so a less-steerable
model can complete forge-rewrite pairs. Two live canaries (#414, #416) on 2026-07-15 failed the
pair gate despite GLM producing a genuinely good 504-line rewrite, because of OPERATIONAL drift.
Observed GLM 4.7 failure modes (from the canary logs):
1. IGNORED the embedded source. The ticket already carries the original bytes between
===ORIGINAL SOURCE=== / ===END SOURCE===, but GLM went filesystem-hunting instead
(5x redundant Reads of docs/PLAYBOOK.md, then Globs).
2. WANDERED cross-module. It spent ~18 steps reading an UNRELATED module
(forge2/audio_tagger/tagger.py) — unpredictable token burn.
3. Needed ~33 steps to first Write; the default --ollama-max-steps 12 cut it off mid-orientation.
4. Wrote to a SPURIOUS double-nested path forge2/<repo>/<repo>/mod.py instead of the flat
standard forge2/<repo>/mod.py (forge_package.py's contract), so pair_loop's deliverable
existence-check failed it.
5. Malformed tool-call schemas: Bash "command" passed as a LIST, broken shell quoting.
DELIVERABLE (checkouts/current/congruency/tools/ollama_agent.py): when the engine is cerebras
(worker role, openai flavor), prepend a tightened worker directive to the birth prompt AND adjust
defaults:
(a) "The ORIGINAL source you must rewrite is EMBEDDED in your ticket between
===ORIGINAL SOURCE=== and ===END SOURCE===. Base your rewrite on THOSE bytes. Do NOT
search the filesystem for the original — it is not there (this is a fresh forge2 tree)."
(b) "Write your COMPLETE deliverable to EXACTLY the given deliverable path, verbatim. Do not
add package nesting, do not rename, do not create sibling files."
(c) "Do NOT read, grep, or glob any module other than your own deliverable. You do not need to
explore the repo."
(d) Raise the default --ollama-max-steps for the cerebras engine to 40 (keep 12 for others).
(e) Reinforce the Bash tool contract in the tool description the openai channel sends: command
is a single STRING (argv0 must be an allowlisted program), never a list.
ACCEPTANCE: a `--engine cerebras --ticket N` pair on a forge unit writes the correct FLAT
deliverable within the step budget and passes the forge harvest gate (parse + pyproject +
package-check), with zero reads of unrelated modules in its step log. Keep Claude as the fallback
engine; this is about making GLM 4.7 carry routine forge rewrites to save budget (see the
inference-routing-policy: GLM default, Claude fallback).
patch
none
approval
unapproved
runs
no runs recorded
mandate (clauses)
not yet recorded — lands with the ticket-class build
manifestations
not yet recorded — lands with the ticket-class build
guarantees
not yet recorded — lands with the ticket-class build
journey (blunders & successes)
not yet recorded — lands with the ticket-class build
artifacts (forge)
not yet recorded — lands with the ticket-class build