Ferrell Synthetic Intelligence commited on
Commit ·
839157e
1
Parent(s): 61b024b
Connect Qwen runtime and tighten patch verification
Browse files- harness/README.md +1 -1
- harness/orchestrator.mjs +6 -1
- harness/test-orchestrator.mjs +1 -0
- models/manifest.json +30 -30
- runtime/README.md +4 -2
harness/README.md
CHANGED
|
@@ -36,6 +36,6 @@ intake -> guard -> retrieve -> plan -> propose -> verify -> revise -> test -> re
|
|
| 36 |
|
| 37 |
See `orchestrator.mjs` and `policy.json` for the executable contract.
|
| 38 |
|
| 39 |
-
Run `npm run veritas` from a workspace to execute the allowlisted compile, test, Git diff, manifest, secret, and path-boundary checks. A model verdict never overrides a failed execution check. The orchestrator accepts this runner as `verificationRunner` and blocks the final status until it passes.
|
| 40 |
|
| 41 |
The research and translation boundary is documented in `credo-research.md`. The product uses original engineering language rather than fictional quotations or branding.
|
|
|
|
| 36 |
|
| 37 |
See `orchestrator.mjs` and `policy.json` for the executable contract.
|
| 38 |
|
| 39 |
+
Run `npm run veritas` from a workspace to execute the allowlisted compile, test, Git diff, manifest, secret, and path-boundary checks. The orchestrator also rejects malformed or fenced model patches before verification. A model verdict never overrides a failed execution check. The orchestrator accepts this runner as `verificationRunner` and blocks the final status until it passes.
|
| 40 |
|
| 41 |
The research and translation boundary is documented in `credo-research.md`. The product uses original engineering language rather than fictional quotations or branding.
|
harness/orchestrator.mjs
CHANGED
|
@@ -59,6 +59,7 @@ export function createHarness({ providers, tools = {}, policy = {}, verification
|
|
| 59 |
task: goal,
|
| 60 |
plan: bounded(plan, rules.max_context_bytes, 'plan')
|
| 61 |
}), rules.max_patch_bytes, 'patch');
|
|
|
|
| 62 |
trace.push({ stage: 'propose', status: 'complete', bytes: Buffer.byteLength(patch) });
|
| 63 |
|
| 64 |
const verifier = requireProvider(providers, 'verify');
|
|
@@ -72,9 +73,13 @@ export function createHarness({ providers, tools = {}, policy = {}, verification
|
|
| 72 |
});
|
| 73 |
const approved = /^\s*APPROVE\b/i.test(String(verdict));
|
| 74 |
const execution = verificationRunner ? await verificationRunner({ task: goal, plan, patch, context }) : null;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
const veritas = execution
|
| 76 |
? evaluateExecution({ taskClass: context.taskClass || 'code-change', execution })
|
| 77 |
-
: evaluateVeritas({ taskClass: context.taskClass || 'code-change', evidenceScore: context.evidenceScore, checks: context.checks });
|
| 78 |
trace.push({ stage: 'verify', status: approved ? 'approved-with-notes' : 'blocked' });
|
| 79 |
trace.push({ stage: 'veritas', status: veritas.status, score: veritas.score, threshold: veritas.threshold });
|
| 80 |
return {
|
|
|
|
| 59 |
task: goal,
|
| 60 |
plan: bounded(plan, rules.max_context_bytes, 'plan')
|
| 61 |
}), rules.max_patch_bytes, 'patch');
|
| 62 |
+
const patchParsePassed = /^diff --git\s+\S+\s+\S+/m.test(patch) && !/^```/m.test(patch);
|
| 63 |
trace.push({ stage: 'propose', status: 'complete', bytes: Buffer.byteLength(patch) });
|
| 64 |
|
| 65 |
const verifier = requireProvider(providers, 'verify');
|
|
|
|
| 73 |
});
|
| 74 |
const approved = /^\s*APPROVE\b/i.test(String(verdict));
|
| 75 |
const execution = verificationRunner ? await verificationRunner({ task: goal, plan, patch, context }) : null;
|
| 76 |
+
if (execution) {
|
| 77 |
+
execution.checks = { ...execution.checks, 'patch-parse': patchParsePassed };
|
| 78 |
+
execution.passed = execution.passed === true && patchParsePassed;
|
| 79 |
+
}
|
| 80 |
const veritas = execution
|
| 81 |
? evaluateExecution({ taskClass: context.taskClass || 'code-change', execution })
|
| 82 |
+
: evaluateVeritas({ taskClass: context.taskClass || 'code-change', evidenceScore: context.evidenceScore, checks: { ...context.checks, 'patch-parse': patchParsePassed } });
|
| 83 |
trace.push({ stage: 'verify', status: approved ? 'approved-with-notes' : 'blocked' });
|
| 84 |
trace.push({ stage: 'veritas', status: veritas.status, score: veritas.score, threshold: veritas.threshold });
|
| 85 |
return {
|
harness/test-orchestrator.mjs
CHANGED
|
@@ -25,4 +25,5 @@ const verifiedHarness = createHarness({
|
|
| 25 |
const verified = await verifiedHarness.run('Run the verified flow', { taskClass: 'code-change' });
|
| 26 |
assert.equal(verified.status, 'ready-for-apply');
|
| 27 |
assert.equal(verified.veritas.status, 'verified');
|
|
|
|
| 28 |
console.log('universal harness test passed');
|
|
|
|
| 25 |
const verified = await verifiedHarness.run('Run the verified flow', { taskClass: 'code-change' });
|
| 26 |
assert.equal(verified.status, 'ready-for-apply');
|
| 27 |
assert.equal(verified.veritas.status, 'verified');
|
| 28 |
+
assert.equal(verified.execution.checks['patch-parse'], true);
|
| 29 |
console.log('universal harness test passed');
|
models/manifest.json
CHANGED
|
@@ -4,57 +4,57 @@
|
|
| 4 |
"offline_default": true,
|
| 5 |
"models": [
|
| 6 |
{
|
| 7 |
-
"id": "
|
| 8 |
-
"name": "
|
| 9 |
"lane": "research",
|
| 10 |
-
"status": "
|
| 11 |
"roles": ["research", "verify"],
|
| 12 |
"format": "GGUF / safetensors",
|
| 13 |
"runtime": "OpenAI-compatible HTTP",
|
| 14 |
-
"endpoint": "http://127.0.0.1:
|
| 15 |
-
"model": "
|
| 16 |
-
"artifact_uri": "local://
|
| 17 |
-
"source_revision": "
|
| 18 |
-
"parameters":
|
| 19 |
-
"context_tokens":
|
| 20 |
-
"metrics":
|
| 21 |
-
"description": "
|
| 22 |
"system_prompt": "You are the research and evidence lane. Analyze the task, identify constraints and risks, cite only supplied workspace evidence, and return concise structured findings. Do not edit files."
|
| 23 |
},
|
| 24 |
{
|
| 25 |
-
"id": "
|
| 26 |
"name": "Qwen2.5-Coder 1.5B Instruct Q4_K_M",
|
| 27 |
"lane": "build",
|
| 28 |
-
"status": "
|
| 29 |
"roles": ["build"],
|
| 30 |
"format": "GGUF / safetensors",
|
| 31 |
"runtime": "OpenAI-compatible HTTP",
|
| 32 |
"endpoint": "http://127.0.0.1:8081/v1",
|
| 33 |
-
"model": "
|
| 34 |
-
"artifact_uri": "
|
| 35 |
-
"source_revision": "Qwen/Qwen2.5-Coder-1.5B-Instruct-GGUF",
|
| 36 |
-
"parameters":
|
| 37 |
-
"context_tokens":
|
| 38 |
-
"metrics":
|
| 39 |
"description": "Recommended small coding model. License: Apache-2.0; verify the downloaded revision and checksum.",
|
| 40 |
"system_prompt": "You are the build lane. Produce a minimal unified diff only. Never invent files or claim tests passed."
|
| 41 |
},
|
| 42 |
{
|
| 43 |
-
"id": "verifier-
|
| 44 |
-
"name": "
|
| 45 |
"lane": "verify",
|
| 46 |
-
"status": "
|
| 47 |
"roles": ["verify"],
|
| 48 |
"format": "role-routed",
|
| 49 |
"runtime": "OpenAI-compatible HTTP",
|
| 50 |
-
"endpoint": "http://127.0.0.1:
|
| 51 |
-
"model": "
|
| 52 |
-
"artifact_uri": "local://
|
| 53 |
-
"source_revision": "
|
| 54 |
-
"parameters":
|
| 55 |
-
"context_tokens":
|
| 56 |
-
"metrics":
|
| 57 |
-
"description": "
|
| 58 |
"system_prompt": "You are the verification lane. Inspect the proposed patch and return APPROVE, REJECT, or NEEDS-EVIDENCE with concrete reasons. Do not edit files."
|
| 59 |
}
|
| 60 |
]
|
|
|
|
| 4 |
"offline_default": true,
|
| 5 |
"models": [
|
| 6 |
{
|
| 7 |
+
"id": "qwen-coder-reasoning-fallback",
|
| 8 |
+
"name": "Qwen Coder (temporary reasoning fallback)",
|
| 9 |
"lane": "research",
|
| 10 |
+
"status": "experimental",
|
| 11 |
"roles": ["research", "verify"],
|
| 12 |
"format": "GGUF / safetensors",
|
| 13 |
"runtime": "OpenAI-compatible HTTP",
|
| 14 |
+
"endpoint": "http://127.0.0.1:8081/v1",
|
| 15 |
+
"model": "qwen2.5-coder-1.5b-instruct-q4_k_m.gguf",
|
| 16 |
+
"artifact_uri": "local:///root/models/qwen2.5-coder-1.5b-instruct-q4_k_m.gguf",
|
| 17 |
+
"source_revision": "Qwen/Qwen2.5-Coder-1.5B-Instruct-GGUF@main",
|
| 18 |
+
"parameters": 1540000000,
|
| 19 |
+
"context_tokens": 4096,
|
| 20 |
+
"metrics": {"runtime_health": "verified", "coding_smoke": "passed"},
|
| 21 |
+
"description": "Temporary reasoning fallback until Liquid AI LFM2.5 Thinking is located. Replace without changing the harness.",
|
| 22 |
"system_prompt": "You are the research and evidence lane. Analyze the task, identify constraints and risks, cite only supplied workspace evidence, and return concise structured findings. Do not edit files."
|
| 23 |
},
|
| 24 |
{
|
| 25 |
+
"id": "qwen-coder-1.5b-q4",
|
| 26 |
"name": "Qwen2.5-Coder 1.5B Instruct Q4_K_M",
|
| 27 |
"lane": "build",
|
| 28 |
+
"status": "ready",
|
| 29 |
"roles": ["build"],
|
| 30 |
"format": "GGUF / safetensors",
|
| 31 |
"runtime": "OpenAI-compatible HTTP",
|
| 32 |
"endpoint": "http://127.0.0.1:8081/v1",
|
| 33 |
+
"model": "qwen2.5-coder-1.5b-instruct-q4_k_m.gguf",
|
| 34 |
+
"artifact_uri": "local:///root/models/qwen2.5-coder-1.5b-instruct-q4_k_m.gguf",
|
| 35 |
+
"source_revision": "Qwen/Qwen2.5-Coder-1.5B-Instruct-GGUF@main",
|
| 36 |
+
"parameters": 1540000000,
|
| 37 |
+
"context_tokens": 4096,
|
| 38 |
+
"metrics": {"runtime_health": "verified", "coding_smoke": "passed"},
|
| 39 |
"description": "Recommended small coding model. License: Apache-2.0; verify the downloaded revision and checksum.",
|
| 40 |
"system_prompt": "You are the build lane. Produce a minimal unified diff only. Never invent files or claim tests passed."
|
| 41 |
},
|
| 42 |
{
|
| 43 |
+
"id": "qwen-coder-verifier-fallback",
|
| 44 |
+
"name": "Qwen Coder (temporary verifier fallback)",
|
| 45 |
"lane": "verify",
|
| 46 |
+
"status": "experimental",
|
| 47 |
"roles": ["verify"],
|
| 48 |
"format": "role-routed",
|
| 49 |
"runtime": "OpenAI-compatible HTTP",
|
| 50 |
+
"endpoint": "http://127.0.0.1:8081/v1",
|
| 51 |
+
"model": "qwen2.5-coder-1.5b-instruct-q4_k_m.gguf",
|
| 52 |
+
"artifact_uri": "local:///root/models/qwen2.5-coder-1.5b-instruct-q4_k_m.gguf",
|
| 53 |
+
"source_revision": "Qwen/Qwen2.5-Coder-1.5B-Instruct-GGUF@main",
|
| 54 |
+
"parameters": 1540000000,
|
| 55 |
+
"context_tokens": 4096,
|
| 56 |
+
"metrics": {"runtime_health": "verified", "coding_smoke": "passed"},
|
| 57 |
+
"description": "Temporary verifier fallback. Replace with Liquid AI LFM2.5 Thinking when its checkpoint is available.",
|
| 58 |
"system_prompt": "You are the verification lane. Inspect the proposed patch and return APPROVE, REJECT, or NEEDS-EVIDENCE with concrete reasons. Do not edit files."
|
| 59 |
}
|
| 60 |
]
|
runtime/README.md
CHANGED
|
@@ -5,7 +5,7 @@ AIDE uses local OpenAI-compatible adapters so model runtimes can be replaced wit
|
|
| 5 |
## Recommended Pair
|
| 6 |
|
| 7 |
- **Qwen2.5-Coder 1.5B Instruct Q4_K_M:** builder lane for code completion and reviewable unified diffs.
|
| 8 |
-
- **Liquid AI LFM2.5 Thinking:** research, planning, architecture, test design, and verification lane.
|
| 9 |
|
| 10 |
Run both sequentially on constrained hardware. Do not load two large copies unless memory measurements prove it is safe.
|
| 11 |
|
|
@@ -20,9 +20,11 @@ llama-server -hf Qwen/Qwen2.5-Coder-1.5B-Instruct-GGUF:Q4_K_M \
|
|
| 20 |
|
| 21 |
For a fully offline run, download the exact GGUF first, verify its SHA-256, then replace `-hf ...` with the local file path.
|
| 22 |
|
|
|
|
|
|
|
| 23 |
## Liquid Thinking Runtime
|
| 24 |
|
| 25 |
-
The workspace does not currently contain an identifiable `LFM2.5` artifact
|
| 26 |
|
| 27 |
Do not substitute the unfinished TinyLiquid training artifact for LFM2.5. It is not part of the production package.
|
| 28 |
|
|
|
|
| 5 |
## Recommended Pair
|
| 6 |
|
| 7 |
- **Qwen2.5-Coder 1.5B Instruct Q4_K_M:** builder lane for code completion and reviewable unified diffs.
|
| 8 |
+
- **Liquid AI LFM2.5 Thinking:** intended research, planning, architecture, test design, and verification lane when its checkpoint is available.
|
| 9 |
|
| 10 |
Run both sequentially on constrained hardware. Do not load two large copies unless memory measurements prove it is safe.
|
| 11 |
|
|
|
|
| 20 |
|
| 21 |
For a fully offline run, download the exact GGUF first, verify its SHA-256, then replace `-hf ...` with the local file path.
|
| 22 |
|
| 23 |
+
The current ARM smoke-tested configuration uses the local file at `/root/models/qwen2.5-coder-1.5b-instruct-q4_k_m.gguf`, a 4096-token context, four CPU threads, and one parallel slot. It served `/v1/models` and generated a TypeScript function successfully.
|
| 24 |
+
|
| 25 |
## Liquid Thinking Runtime
|
| 26 |
|
| 27 |
+
The workspace does not currently contain an identifiable `LFM2.5` artifact. AIDE uses Qwen as a temporary reasoning/verifier fallback and records that status in `models/manifest.json`. Once the Liquid file or endpoint is located, replace only the research and verifier entries with its exact revision, tokenizer, prompt template, runtime, quantization, license, and checksum.
|
| 28 |
|
| 29 |
Do not substitute the unfinished TinyLiquid training artifact for LFM2.5. It is not part of the production package.
|
| 30 |
|