Skip to content

P7a: the LLM channel (provider seam, fake and local Ollama providers, context, prompts, parser, retries) - #28

Merged
Ayushxsingh100 merged 3 commits into
mainfrom
feature/p7a
Nov 12, 2026
Merged

Ayushxsingh100 merged 3 commits into
mainfrom
feature/p7a

Conversation

@Ayushxsingh100

Copy link
Copy Markdown
Owner

P7a — the LLM channel

Branch feature/p7a from origin/main at 1c3d72b. No gate or mini-gate is claimed. The external review verdict is the approval record (C-28), so this must not be merged before it. P7b (patch validation into a Candidate State, the P7 gate and M4) follows.

Decisions

  • C-181 → Decided (authors, 11 Nov 2026): "accepted as built after external review"
  • C-182 Decided (advisor, 11 Nov 2026): the only real provider is a local Ollama server; experiment models are pinned by digest, quantization, temperature and seed, with the licence checked
  • C-183 to C-187 Proposed (P7a): standard library only; the patch format reused; Ollama structured output; the wiring model; readings made while building
  • Also in this PR: the P6d section of PHASE_GATES now says passed with limits and lists the verdict's six limits (the user's request); CLAUDE.md and README.md updated to match C-71

What exists

  • Seam (ADR-006): llm/adapter/provider.py. Providers: fake.py and ollama.py (urllib, loopback addresses only, digest pin).
  • Context (§6–§8), budget (§18–§19), prompts dail-repair-prompt-1 (template hash pinned per version; infrastructure text sent as delimited data).
  • Strict parser dail-llm-parser-1 (§11, §22, §25), retries (§23), records and observability (§16, §20, §21, §32, §34).
  • Emergency switch: llm.generation_enabled; when off, no provider is called.

Wiring check (one run, local CPU)

  • Ollama 0.40.16, from the official installer, signed by Ollama Inc.
  • Model qwen2.5-coder:1.5b, digest d7372fd828518a4d38b1eb196c673c31a85f2ed302b3d1e406c4c2d1b64a0668, Q4_K_M, Apache-2.0 (library page and ollama show --license).
  • Run on the canonical objective: status PATCH, no parse errors, 31.7 s, 2381/184 tokens.
  • The patch was not turned into a candidate and its quality was not judged.

Checks (Python 3.12.10)

  • dev.py test: 4234 tests OK (skipped=2: the opt-in Ollama test, and the symbolic-link test)
  • pytest: exit 0, the same 2 skips
  • dev.py lint: black, ruff and mypy clean (mypy now also checks llm/)
  • Mutation checks on the safety rules: 12 of 12 killed
  • No new dependency
  • The default suite opens no network connection (a test blocks sockets on the fake-provider path)

Review verdict: (link to be added)

🤖 Generated with Claude Code

Ayushxsingh100 and others added 3 commits November 11, 2026 22:47
… the verdict; CLAUDE.md and README match C-71 (Doc 10 §30; C-71, C-181 to C-186)

C-181 accepted as built (authors); C-182 the only real provider is a local
Ollama server (advisor); C-183 to C-186 Proposed (stdlib only, the patch
format, Ollama structured output, the wiring model). The P6d section of
PHASE_GATES now records the verdict (merged as 1c3d72b, tagged
registry-v1.1) and its six carried limits, as the user asked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…providers, context, budget, prompts, strict parser, retries, records (Doc 10 §6-§11, §16-§25, §30-§34; Doc 14 §37; C-182 to C-186)

Standard library only (C-183). The patch field carries PatchFormat.TERRAFORM_HCL
text (C-184). Ollama's format parameter gets the response schema, and the strict
parser still checks every reply (C-185). Only loopback URLs are accepted (C-71).
generation_enabled off makes no provider call. The default suite opens no
socket (a test blocks them). llm.provider accepts "ollama"; mypy now also checks
llm/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ned model; ADR-006; C-187; the P7a stub in PHASE_GATES (Doc 10 §30, §36; Doc 02 §26; C-182 to C-187)

Ollama 0.40.16 (official installer, signed by Ollama Inc.); qwen2.5-coder:1.5b,
digest d7372fd8...a0668, Q4_K_M, Apache-2.0 (library page and ollama show
--license). One run on the canonical objective: PATCH, no parse errors, 31.7 s.
The patch was not turned into a candidate (P7b). No gate is claimed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Ayushxsingh100
Ayushxsingh100 merged commit 7ea06b0 into main Nov 12, 2026
3 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.

1 participant