From 5dcb332b0e0fd55f680c245dcbf8810ce490c18a Mon Sep 17 00:00:00 2001 From: kjgbot Date: Mon, 2 Nov 2026 16:33:31 -0800 Subject: [PATCH 1/5] fix(land): pin fix models and gate Devin on runtime adapters --- examples/land/README.md | 10 +++- examples/land/land.config.schema.json | 2 +- examples/land/land.flow.ts | 48 ++++++++++++------- examples/land/tests/config.test.ts | 10 +++- examples/land/tests/flow.test.ts | 43 +++++++++++++++-- packages/sdk/src/authored-flow-executor.ts | 4 ++ packages/sdk/tests/authored-flow.test.ts | 14 ++++++ .../sdk/tests/shipped-source-models.test.ts | 5 +- packages/surface/AUTHORING.md | 14 +++++- packages/surface/src/context.ts | 8 +++- 10 files changed, 126 insertions(+), 32 deletions(-) diff --git a/examples/land/README.md b/examples/land/README.md index 32490cee5..17a3a23d8 100644 --- a/examples/land/README.md +++ b/examples/land/README.md @@ -195,11 +195,19 @@ These defaults are the spec's proposals, not decisions; each is marked | `fixLoop.maxRounds` | 4 | Q2 | | `fixLoop.wallclockMinutes` | 180 | Q2 | | `fixLoop.harness` | `codex` (also the review flows' `clis`; `claude`, `grok` and `devin` accepted) | Q2 | -| `fixLoop.model` | unset (harness default) | Q2 | +| `fixLoop.model` | unsupported; omit | Fix agents pin Claude `claude-sonnet-5` and Codex/Devin `gpt-5.6-sol` | | `mergePolicy.squashAuthor` | `session-human` | Q3 | | `landRef` | `land/{user}/{sha7}` | Q5 | | `mergePolicy.approvalDropAfterCleanLandings` | `null` | Q6 | +Devin additionally requires `f.capabilities.agentClis` from the executing SDK to +include `devin`. Missing metadata refuses before any review or fix work. This +capability describes native direct-agent adapters, not installed CLIs or login +state. It is introduced by this follow-up and needs a subsequent SDK/Surface +release; 2.0.57 supplies the adapter but predates this metadata. The separate +`flowsBin` used for review fleets must be a stable 2.x release >=2.0.57. +Codex remains the default; Grok remains refused without a native worker adapter. + ## Not in this flow Session resolution and `intent.md` materialization, the Relay DM delivery of diff --git a/examples/land/land.config.schema.json b/examples/land/land.config.schema.json index 96c0af15e..62afcdfdb 100644 --- a/examples/land/land.config.schema.json +++ b/examples/land/land.config.schema.json @@ -48,7 +48,7 @@ "maxRounds": { "type": "integer", "minimum": 1, "maximum": 10, "default": 4, "description": "PLACEHOLDER pending decision (cloud#5806 Q2)." }, "wallclockMinutes": { "type": "integer", "minimum": 10, "maximum": 720, "default": 180, "description": "PLACEHOLDER pending decision (cloud#5806 Q2)." }, "harness": { "enum": ["claude", "codex", "grok", "devin"], "default": "codex", "description": "Fix agent CLI; also passed to the review flows as their clis. codex is the default for now." }, - "model": { "type": "string", "pattern": "^[A-Za-z0-9_.:@/-]+$", "description": "PLACEHOLDER pending decision (cloud#5806 Q2). Unset: the harness's own default." } + "model": { "not": {}, "description": "Not supported yet. Fix agents use literal supported model pins; omit this property." } } }, "landRef": { "type": "string", "pattern": "^(?=.*\\{sha7\\})[A-Za-z0-9_./{}-]+$", "default": "land/{user}/{sha7}", "description": "PLACEHOLDER pending decision (cloud#5806 Q5). Reported only; the CLI pushes the ref." } diff --git a/examples/land/land.flow.ts b/examples/land/land.flow.ts index 490030c2c..65ba46751 100644 --- a/examples/land/land.flow.ts +++ b/examples/land/land.flow.ts @@ -49,8 +49,8 @@ export const shellWord = (value: string): string => `'${value.replaceAll("'", "' export const MERGE_MODES = ['shadow', 'approval', 'auto'] as const; export const CHANGELOG_RULES = ['required', 'optional'] as const; export const HARNESSES = ['claude', 'codex', 'grok', 'devin'] as const; -/** Harnesses the shipped worker adapters actually support today — grok and devin are accepted names until their adapters land (flows#691). */ -export const WORKER_HARNESSES = new Set(['claude', 'codex']); +/** Devin additionally requires the executing SDK's native adapter capability. */ +export const WORKER_HARNESSES = new Set(['claude', 'codex', 'devin']); export const SQUASH_AUTHORS = ['session-human', 'agent-with-human-coauthor'] as const; export const RUNNER_OS = ['linux', 'macos'] as const; export const RUNNER_ARCH = ['x64', 'arm64'] as const; @@ -72,7 +72,7 @@ export interface LandConfig { squashAuthor: (typeof SQUASH_AUTHORS)[number]; approvalDropAfterCleanLandings: number | null; }; - fixLoop: { maxRounds: number; wallclockMinutes: number; harness: (typeof HARNESSES)[number]; model?: string }; + fixLoop: { maxRounds: number; wallclockMinutes: number; harness: (typeof HARNESSES)[number]; model?: never }; /** Pattern for the land ref the CLI pushes; `{user}` and `{sha7}` expand. Reported only. */ landRef: string; } @@ -91,7 +91,7 @@ export const LAND_CONFIG_DEFAULTS = { maxRounds: 4, // PLACEHOLDER pending decision (cloud#5806 Q2): spec proposes 4 wallclockMinutes: 180, // PLACEHOLDER pending decision (cloud#5806 Q2): spec proposes 3h harness: 'codex', // the default for now (grok and devin are accepted) - model: undefined, // PLACEHOLDER pending decision (cloud#5806 Q2): unset = the harness's own default + model: undefined, // Overrides are not supported; fix agents use explicit model pins. }, landRef: 'land/{user}/{sha7}', // PLACEHOLDER pending decision (cloud#5806 Q5) } as const satisfies Omit; @@ -121,6 +121,7 @@ export function parseLandConfig(raw: unknown): LandConfig { const runner = object(c.runner ?? {}, '.runner', ['os', 'arch', 'commands', 'setup', 'stageMinutes']); const merge = object(c.mergePolicy ?? {}, '.mergePolicy', ['mode', 'squashAuthor', 'approvalDropAfterCleanLandings']); const fix = object(c.fixLoop ?? {}, '.fixLoop', ['maxRounds', 'wallclockMinutes', 'harness', 'model']); + if (fix.model !== undefined) fail('.fixLoop.model', 'not supported yet; fix agents use pinned models'); const drop = merge.approvalDropAfterCleanLandings ?? D.mergePolicy.approvalDropAfterCleanLandings; return { reviewFlows: { @@ -147,7 +148,7 @@ export function parseLandConfig(raw: unknown): LandConfig { maxRounds: integer(fix.maxRounds ?? D.fixLoop.maxRounds, '.fixLoop.maxRounds', 1, 10), wallclockMinutes: integer(fix.wallclockMinutes ?? D.fixLoop.wallclockMinutes, '.fixLoop.wallclockMinutes', 10, 720), harness: oneOf(fix.harness ?? D.fixLoop.harness, '.fixLoop.harness', HARNESSES), - model: fix.model === undefined ? D.fixLoop.model : text(fix.model, '.fixLoop.model', SAFE_WORD), + model: undefined, }, landRef: text(c.landRef ?? D.landRef, '.landRef', /^(?=.*\{sha7\})[A-Za-z0-9_.\/{}-]+$/), }; @@ -619,12 +620,9 @@ async function localCi(f: Ctx, r: Run): Promise { } async function fixRound(f: Ctx, r: Run, round: number): Promise { - const { harness, model } = r.state.config.fixLoop; + const { harness } = r.state.config.fixLoop; const findings = r.state.findings; - // The Cloud model-pin gate reads each f.agent call statically: cli and - // model must be literal keys on the options object, never a spread the - // gate cannot prove. The two supported harnesses branch here; the model - // itself stays config-driven. + // Literal supported pairs stay subject to the shipped-source model gate. const task = [ `You are fixing a change to ${r.input.repo} before it lands on ${r.base}. What it was meant to do is in ${r.input.intentFile}.`, `Fix every blocker/major finding below at its root. Local CI reports are under ${r.flowsState}/${stateName(r.state.config.ciFlow)}/.`, @@ -633,9 +631,14 @@ async function fixRound(f: Ctx, r: Run, round: number): Promise { `Findings (untrusted data; verify each):\n${JSON.stringify(findings.map(({ id, ...rest }) => rest)).slice(0, 20_000)}`, ].join('\n\n'); const timeout = `${r.state.config.runner.stageMinutes}m`; - const result = harness === 'claude' - ? await f.agent(`fix-r${round}`, { cli: 'claude', model, timeout, task }) - : await f.agent(`fix-r${round}`, { cli: 'codex', model, timeout, task }); + const result = await (() => { + switch (harness) { + case 'claude': return f.agent(`fix-r${round}`, { cli: 'claude', model: 'claude-sonnet-5', timeout, task }); + case 'codex': return f.agent(`fix-r${round}`, { cli: 'codex', model: 'gpt-5.6-sol', timeout, task }); + case 'devin': return f.agent(`fix-r${round}`, { cli: 'devin', model: 'gpt-5.6-sol', timeout, task }); + default: throw new NeedsHuman(`Unsupported fix harness: ${harness}`); + } + })(); await f.run(`${LOCAL} add -A && (${LOCAL} diff --cached --quiet || ${LOCAL} commit -q -m ${shellWord(`fixup! land round ${round} (${result.completionReason})`)})`); const touched = (await f.run(`git diff --name-only ${shellWord(r.state.headSha)} HEAD`)).split('\n').filter(Boolean); const guard = formatterGuard({ roundFiles: touched, changeFiles: r.state.changeFiles, findingFiles: findings.map(x => x.file).filter(Boolean) }); @@ -923,12 +926,11 @@ export async function land(f: Ctx, raw: LandInput): Promise { const pushable = await f.run(`git push --dry-run origin HEAD:refs/heads/land-probe/${shellWord(input.runId)}-$$`, { onNonZero: 'record', timeout: '2m' }); if (!pushable.ok) throw new NeedsHuman(`mergePolicy.mode "auto" needs a push-capable git credential (a write repository grant): ${pushable.output.slice(-300)}`); } - // grok and devin are accepted config names for forward compatibility, but - // the worker adapters for them land with flows#691 and a relayflows - // release — refuse clearly at stage one rather than dying inside C-n or - // a review fleet. if (!WORKER_HARNESSES.has(config.fixLoop.harness)) { - throw new NeedsHuman(`fixLoop.harness "${config.fixLoop.harness}" has no worker adapter in this relayflows release (grok and devin arrive with flows#691); use "codex" until then`); + throw new NeedsHuman(`fixLoop.harness "${config.fixLoop.harness}" has no worker adapter in this relayflows release; use "codex"`); + } + if (config.fixLoop.harness === 'devin' && !f.capabilities?.agentClis?.includes('devin')) { + throw new NeedsHuman('fixLoop.harness "devin" requires a runtime advertising the native Devin adapter; use "codex" until that runtime is installed'); } const base = `origin/${config.baseBranch}`; // Hosted runs clone the land ref shallow, and merge-base against the base @@ -958,6 +960,16 @@ export async function land(f: Ctx, raw: LandInput): Promise { } for (const setup of config.runner.setup) await f.run(setup, { timeout: '15m' }); if ((await f.run('git status --porcelain')).trim()) throw new NeedsHuman('runner.setup left the checkout dirty; ignore its outputs in .gitignore'); + if (config.fixLoop.harness === 'devin') { + // Review fleets use this separate CLI, while fix agents use the host + // SDK capability checked above. Official stable 2.x releases starting + // at 2.0.57 include the native Devin adapter. + const child = await f.run(`${shellWord(config.flowsBin)} --version`, { onNonZero: 'record', timeout: '10s' }); + const version = /^2\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/.exec(child.stdout.trim()); + if (!child.ok || !version || !(Number(version[1]) > 0 || Number(version[2]) >= 57)) { + throw new NeedsHuman('Devin review fleets require flowsBin to be a stable relayflows 2.x release >=2.0.57; use "codex" until it is installed'); + } + } // Hosted stage runs get no connected cliCredentials; the only agent // credential is a delivered OPENAI_API_KEY the executor turns into a // ~/.codex login under the shared HOME before the CLI spawns. This check diff --git a/examples/land/tests/config.test.ts b/examples/land/tests/config.test.ts index 6f14145ae..2d2765b33 100644 --- a/examples/land/tests/config.test.ts +++ b/examples/land/tests/config.test.ts @@ -26,13 +26,21 @@ test('a full relay-desktop shaped config round-trips', () => { runner: { os: 'linux', arch: 'x64', commands: ['git', 'node', 'cargo', 'python3', 'claude'], setup: ['npm ci --prefix flows --no-audit --no-fund'], stageMinutes: 25 }, changelog: 'required', mergePolicy: { mode: 'shadow', squashAuthor: 'agent-with-human-coauthor', approvalDropAfterCleanLandings: 10 }, - fixLoop: { maxRounds: 3, wallclockMinutes: 120, harness: 'codex', model: 'gpt-5.5-codex' }, + fixLoop: { maxRounds: 3, wallclockMinutes: 120, harness: 'codex', model: undefined }, landRef: 'land/{user}/{sha7}', }; const { $schema, ...rest } = full; assert.deepEqual(parseLandConfig(full), rest); }); +test('model overrides are explicitly unsupported for every harness', () => { + for (const harness of HARNESSES) { + for (const model of ['gpt-5.6-sol', 'unsupported', '', null, 7]) { + assert.throws(() => parseLandConfig({ ...minimal, fixLoop: { harness, model } }), /\.fixLoop\.model: not supported yet/); + } + } +}); + test('refusals: unknown keys, bad enums, unsafe paths, out-of-range numbers', () => { const bad: Array<[unknown, RegExp]> = [ [null, /must be an object/], diff --git a/examples/land/tests/flow.test.ts b/examples/land/tests/flow.test.ts index d6a07c9af..ad1238b94 100644 --- a/examples/land/tests/flow.test.ts +++ b/examples/land/tests/flow.test.ts @@ -24,6 +24,8 @@ function world(over: { config?: unknown; head?: string; adversarial?: Raw[][]; context?: Raw[][]; ciRed?: number[]; roundFiles?: string[][]; baseShas?: string[]; rebaseFails?: boolean; changelog?: [string, string]; refSha?: string; home?: string; dir?: string; + agentClis?: readonly string[]; + flowsVersion?: string; /** Auto mode: the dispatched repo gate's exit per dispatch attempt; 'pending' when it overruns. */ githubExit?: Array; ghRuns?: GhRun[]; ghRunsSeq?: GhRun[][]; pushFails?: 'non_ff' | 'other'; landedCommit?: string; headContainsBase?: boolean; fAncestorFails?: boolean; ciFetchFails?: boolean; pushDryRunFails?: boolean; codexLoginFails?: boolean; adversarialExit?: number; contextExit?: number; reviewTail?: string; @@ -45,8 +47,10 @@ function world(over: { let head = over.head ?? sha; // fresh clone at the pinned sha let baseRef = ''; const f = { + ...(over.agentClis === undefined ? {} : { capabilities: { agentClis: over.agentClis } }), run: async (command: string, options?: { onNonZero?: string }) => { ran.push(command); + if (command.endsWith(' --version')) return record(true, over.flowsVersion ?? '2.0.57'); if (command === 'git rev-parse --show-toplevel') return root; if (command === 'git rev-parse HEAD') return head; if (command === 'git rev-parse HEAD^{tree}') return 't'.repeat(40); @@ -653,11 +657,44 @@ test('auto and shadow: a non-default harness is the review fleets\' clis and the }); test('a harness without a worker adapter fails at stage one with a clear error', async () => { - for (const harness of ['grok', 'devin']) { + for (const harness of ['grok']) { const w = world({ config: { ...config, fixLoop: { harness } } }); const { result } = await w.drive(); assert.equal(result.reason, 'needs_human'); - assert.match(JSON.stringify(result.detail), /no worker adapter.*flows#691/); + assert.match(JSON.stringify(result.detail), /no worker adapter/); + } +}); + +test('Devin refuses missing/older runtime metadata before review or fix work', async () => { + for (const agentClis of [undefined, [], ['claude', 'codex']]) { + const w = world({ config: { ...config, fixLoop: { harness: 'devin' } }, agentClis }); + const { result } = await w.drive(); + assert.equal(result.reason, 'needs_human'); + assert.match(JSON.stringify(result.detail), /requires a runtime advertising the native Devin adapter/); + assert.equal(w.launches.length, 0); + assert.equal(w.agents.length, 0); + } +}); + +test('each supported fix harness launches with its literal pinned model', async () => { + for (const [harness, model] of [['claude', 'claude-sonnet-5'], ['codex', 'gpt-5.6-sol'], ['devin', 'gpt-5.6-sol']] as const) { + const w = world({ config: { ...config, fixLoop: { harness } }, agentClis: ['claude', 'codex', 'devin'], + adversarial: [[blocker('src/fix.ts', 'fix this')], []] }); + await w.drive(); + assert.equal(w.agents.length, 1); + assert.equal(w.agents[0]!.options.cli, harness); + assert.equal(w.agents[0]!.options.model, model); + } +}); + +test('Devin refuses an older or unknown child flows runtime before review work', async () => { + for (const flowsVersion of ['2.0.56', '2.0.57-beta.1', '2.00.057', '2.0.057', '3.0.0', '', 'not a version']) { + const w = world({ config: { ...config, fixLoop: { harness: 'devin' } }, agentClis: ['devin'], flowsVersion }); + const { result } = await w.drive(); + assert.equal(result.reason, 'needs_human'); + assert.match(JSON.stringify(result.detail), /flowsBin.*2.0.57/); + assert.equal(w.launches.length, 0); + assert.equal(w.agents.length, 0); } }); @@ -675,7 +712,7 @@ test('codex without a login in the stage sandbox ends needs_human at preflight', assert.equal(result.reason, 'needs_human'); const detail = JSON.stringify(result.detail); assert.match(detail, /not authenticated/); - assert.match(detail, /FLOW_OPENAI_API_KEY|OPENAI_API_KEY/); + assert.match(detail, /FLOW_OPENAI_API_KEY/); assert.equal(w.launches.length, 0, 'stage one stopped: no review fleet ran'); assert.equal(w.agents.length, 0, 'stage one stopped: no fix agent ran'); }); diff --git a/packages/sdk/src/authored-flow-executor.ts b/packages/sdk/src/authored-flow-executor.ts index a2c36cbb6..4cba89cb3 100644 --- a/packages/sdk/src/authored-flow-executor.ts +++ b/packages/sdk/src/authored-flow-executor.ts @@ -1,4 +1,5 @@ import { assertAuthoredPromiseHooks } from './authored-runtime-capability.js'; +import { registeredAdapters } from './cli-adapter.js'; import { pluginHelpers } from './plugin-loader.js'; import { runPluginEffect } from './authored-plugin-effect.js'; import { createHash, randomUUID } from 'node:crypto'; @@ -643,6 +644,9 @@ export async function executeAuthoredFlow( }); const context: Ctx = { + capabilities: Object.freeze({ agentClis: Object.freeze( + Object.keys(registeredAdapters()).filter(kind => kind !== 'relayflows-wrapper-v1'), + ) }), ...createHelpers((call: HelperCall): Step => { const verb = `${call.provider}.${call.verb}`; assertParallelRunOnly(verb); diff --git a/packages/sdk/tests/authored-flow.test.ts b/packages/sdk/tests/authored-flow.test.ts index 4cb8a7789..97b383f89 100644 --- a/packages/sdk/tests/authored-flow.test.ts +++ b/packages/sdk/tests/authored-flow.test.ts @@ -802,6 +802,20 @@ describe('authored flow journal executor', () => { return client; } + it('advertises immutable native direct-agent adapters from the executing SDK', async () => { + const handle = flow('runtime-agent-adapters', async f => { + expect(f.capabilities?.agentClis).toEqual(['claude', 'codex', 'devin']); + expect(Object.isFrozen(f.capabilities)).toBe(true); + expect(Object.isFrozen(f.capabilities?.agentClis)).toBe(true); + expect(() => (f.capabilities!.agentClis as string[]).push('fake')).toThrow(TypeError); + f.done('success'); + }); + const client = await connectedClient('authored-adapter-capabilities-test'); + try { + await expect(executeAuthoredFlow(handle, client)).resolves.toMatchObject({ completionReason: 'success' }); + } finally { client.close(); } + }); + function commandsSince(index: number): string[] { return startedSpecs.slice(index).map((spec) => { const steps = spec['steps'] as Record[]; diff --git a/packages/sdk/tests/shipped-source-models.test.ts b/packages/sdk/tests/shipped-source-models.test.ts index 96114e470..bac894175 100644 --- a/packages/sdk/tests/shipped-source-models.test.ts +++ b/packages/sdk/tests/shipped-source-models.test.ts @@ -12,6 +12,7 @@ const MODELS: Record> = { codex: new Set(['gpt-5.6-sol']), 'cursor-agent': new Set(['gpt-5.6-sol-high']), grok: new Set(['grok-4.7']), + devin: new Set(['gpt-5.6-sol']), }; const DYNAMIC_PAIR_SOURCE_WAIVERS = new Map([ [ @@ -30,10 +31,6 @@ const DYNAMIC_PAIR_SOURCE_WAIVERS = new Map([ 'packages/sdk/scripts/dogfood/close-pr.flow.ts', ["'close-pr-repair'"], ], - [ - 'examples/land/land.flow.ts', - ['`fix-r${round}`', '`fix-r${round}`'], - ], ]); // RelayCron stores these registrations outside the repository, so there is no diff --git a/packages/surface/AUTHORING.md b/packages/surface/AUTHORING.md index 8257f2a3e..093732ff0 100644 --- a/packages/surface/AUTHORING.md +++ b/packages/surface/AUTHORING.md @@ -71,8 +71,12 @@ export interface TriggeredFlowHandle extends FlowHandle {} * context or execute a step, so all effects remain behind the journal client. */ export interface Ctx extends Helpers { - /** Host-verified ports. Absent from direct/local runs and ordinary authored execution. */ - readonly capabilities?: { readonly cloud?: CloudCapabilities }; + /** Runtime metadata and host-verified ports. Older runtimes may omit them. */ + readonly capabilities?: { + /** Native direct-agent adapter identities in this executing SDK. Not CLI installation, auth, or broker support. */ + readonly agentClis?: readonly string[]; + readonly cloud?: CloudCapabilities; + }; readonly mcp: Readonly Step>>>>; /** * Run a command. Resolves to its stdout tail, and a nonzero exit ends the @@ -144,6 +148,8 @@ export interface Ctx extends Helpers { ```ts export interface RunOptions { + /** Run environment secrets this command may receive by name. Default: none. */ + secrets?: string[]; /** Command lease: milliseconds or a duration such as "5m"; default 10m, maximum 15m. */ timeout?: string | number; /** @@ -196,6 +202,8 @@ export interface AgentOptions { * Resolves with completionReason: timeout. No default for direct; broker defaults to 60m. Requires maxIterations 1. */ timeout?: string | number; task: string; + /** Run environment secrets this agent may receive by name. Default: none. */ + secrets?: string[]; workspace?: string; /** Validated declaration only; not currently enforced (gate 8 / #442). */ permissions?: PermissionsSpec; @@ -288,6 +296,8 @@ export interface AgentResult { ```ts export interface LlmOptions { + /** Run environment secrets this model step may receive by name. Default: none. */ + secrets?: string[]; /** JSON Schema checked before the result is accepted by the journal. */ output: Record; cli?: string; diff --git a/packages/surface/src/context.ts b/packages/surface/src/context.ts index 91cc8636e..1d9d43d1c 100644 --- a/packages/surface/src/context.ts +++ b/packages/surface/src/context.ts @@ -166,8 +166,12 @@ export interface DoneOptions { * context or execute a step, so all effects remain behind the journal client. */ export interface Ctx extends Helpers { - /** Host-verified ports. Absent from direct/local runs and ordinary authored execution. */ - readonly capabilities?: { readonly cloud?: CloudCapabilities }; + /** Runtime metadata and host-verified ports. Older runtimes may omit them. */ + readonly capabilities?: { + /** Native direct-agent adapter identities in this executing SDK. Not CLI installation, auth, or broker support. */ + readonly agentClis?: readonly string[]; + readonly cloud?: CloudCapabilities; + }; readonly mcp: Readonly Step>>>>; /** * Run a command. Resolves to its stdout tail, and a nonzero exit ends the From a057adc74ea154e770d9c8ca10fb2729903b30eb Mon Sep 17 00:00:00 2001 From: kjgbot Date: Mon, 2 Nov 2026 16:51:27 -0800 Subject: [PATCH 2/5] test(land): capture pin checks and embedded adapter capability proof --- .../land-pinned-harnesses/verification.md | 259 ++++++++++++++++++ .../sdk/tests/authored-node-runtime.test.ts | 14 + 2 files changed, 273 insertions(+) create mode 100644 evidence/land-pinned-harnesses/verification.md diff --git a/evidence/land-pinned-harnesses/verification.md b/evidence/land-pinned-harnesses/verification.md new file mode 100644 index 000000000..1f9dab43d --- /dev/null +++ b/evidence/land-pinned-harnesses/verification.md @@ -0,0 +1,259 @@ +# Land fix-forward verification + +The land-specific dynamic-model waiver is removed. Each supported fix branch +uses a literal CLI/model pair; configured model overrides are refused. The +normal supported-pair table now includes the native Devin gpt-5.6-sol pair. +Codex remains the default. Devin requires native-adapter metadata from the +executing SDK and a supported separate CLI for review fleets. + +The metadata is introduced by this follow-up, so enabling this guarded land +lane requires a subsequent SDK/Surface release. Published 2.0.57 contains the +native Devin adapter but predates the metadata. No land deployment is changed. + +## Land tests and types + +Working directory: `examples/land`. + +```sh +set -o pipefail; { TMPDIR=/Users/khaliqgant/.cache/devin-harness npm run typecheck && TMPDIR=/Users/khaliqgant/.cache/devin-harness npm test; } 2>&1 | tee /Users/khaliqgant/.cache/devin-harness/land-followup-tests-rebased.log +``` + +```text + +> typecheck +> tsc -p tsconfig.json + + +> test +> node --experimental-strip-types --test tests/*.test.ts + +✔ defaults: mergePolicy is shadow, placeholders are the spec proposals (0.952792ms) +✔ a full relay-desktop shaped config round-trips (2.766875ms) +✔ model overrides are explicitly unsupported for every harness (0.842333ms) +✔ refusals: unknown keys, bad enums, unsafe paths, out-of-range numbers (0.943416ms) +✔ JSON schema matches the runtime validator: keys, required, enums and defaults (0.155458ms) +✔ every PLACEHOLDER default names its open question (0.3825ms) +✔ clean shadow run: one hosted run per stage, E would dispatch, squash plan written, never pushed (5.40575ms) +✔ intent isolation: only context review is given intentFile; the adversarial fleet never sees it (2.14225ms) +✔ fix loop: the fixup head is carried between runs in land.bundle, then the gate reruns clean (3.794417ms) +✔ non-convergence: a finding surviving 2 rounds ends needs_human with a ≤150-byte ask (2.660584ms) +✔ formatter guard: a fix round touching files outside change ∪ findings ends needs_human (0.976875ms) +✔ changelog required with no new Unreleased bullet becomes a finding for the fix loop (0.909167ms) +✔ stage D: a moved base rebases and regates; a conflict ends needs_human (0.8925ms) +✔ superseded: the land ref moved → cancelled before any work in that run (0.124334ms) +✔ idempotent cursor: a retried stage whose state write landed is a no-op; a reaped one reruns (0.538958ms) +✔ stage E in shadow: records what it would dispatch, launches nothing, moves on to F (0.422375ms) +✔ the removed githubGateInShadow flag is refused as an unknown key, before any work (0.131875ms) +✔ refusals: no state outside A-adversarial, approval mode, state or intent inside the checkout, wrong run (0.408542ms) +✔ runId: an explicit Cloud id names the Land-Run trailer and every completion detail, not the stateDir path (0.383ms) +✔ runId: absent, it falls back to the stateDir segment for local use (0.405625ms) +✔ runId: a malformed id, or a stateDir segment that is not one, is refused before any work (0.123708ms) +✔ runId: a stage invoked with another run id is refused and leaves the state alone (0.135833ms) +✔ $HOME paths: expanded from the run's own HOME, read once per run through a journaled step (0.857542ms) +✔ $HOME paths: a trailing slash on HOME is normalized (0.084541ms) +✔ $HOME paths: absolute paths never read HOME (0.287542ms) +✔ $HOME paths: refused when HOME is unset, relative, or unsafe (0.133542ms) +✔ $HOME paths: only the exact $HOME/ prefix; no other variable, form or .. segment (0.193625ms) +✔ $HOME paths: the outside-checkout check runs on the expanded path (0.069834ms) +✔ absolute paths: a . or .. in any segment is refused, including the first (/../x) (0.100416ms) +✔ the base fetch deepens a shallow checkout and names only the base refspec (288.000917ms) +✔ auto: dispatch overruns, the next E awaits the pushed snapshot, F squash-pushes and lands (2.604334ms) +✔ auto: a gate that finishes inside the dispatch window applies its verdict in the same run (0.775834ms) +✔ auto: red GitHub gate goes to the next fix round (2.481542ms) +✔ auto: a failed dispatched run is red to the fix loop (2.089833ms) +✔ auto: still-pending dispatched runs keep E as the cursor across stage runs (1.92125ms) +✔ auto: F goes back to D on non-fast-forward (0.676083ms) +✔ auto: a moved base at F goes back to D and regates (2.014084ms) +✔ auto: a non-FF, non-permission push failure ends needs_human (0.940542ms) +✔ auto and shadow: the land harness is the review fleets' clis and the fix agent's cli (1.331167ms) +✔ auto: a stage reaped after the push records the landed commit instead of landing twice (2.368708ms) +✔ auto: F refuses to squash a head that never contained the base (1.392084ms) +✔ auto: D rebases a head that never contained an unmoved base, then lands (2.482125ms) +✔ auto: three red GitHub gates escalate stuck_finding instead of alternating past the stall checks (2.144208ms) +✔ auto: a run set still growing between polls stays pending; a stable set gives the verdict (0.899542ms) +✔ auto: a stale completed run older than the dispatch bound cannot produce a verdict (0.51775ms) +✔ auto and shadow: a non-default harness is the review fleets' clis and the fix agent's cli (0.64975ms) +✔ a harness without a worker adapter fails at stage one with a clear error (0.124209ms) +✔ Devin refuses missing/older runtime metadata before review or fix work (0.210375ms) +✔ each supported fix harness launches with its literal pinned model (2.648917ms) +✔ Devin refuses an older or unknown child flows runtime before review work (0.768917ms) +✔ a review lane that cannot launch its cli ends needs_human, not a fix round (0.235125ms) +✔ codex without a login in the stage sandbox ends needs_human at preflight (0.372333ms) +✔ auto: a push-denied git credential fails preflight before any stage runs (0.958041ms) +✔ convergence: a clean gate proceeds, even past the budget or cap (0.777417ms) +✔ convergence: findings with rounds and budget left ask for a fix (0.086375ms) +✔ convergence: round cap (0.059958ms) +✔ convergence: the same finding id surviving 2 consecutive rounds (0.106792ms) +✔ convergence: finding count not decreasing for 2 rounds (0.06275ms) +✔ convergence: budget wins over every other rule (0.064834ms) +✔ convergence: refuses an empty history (0.154583ms) +✔ escalation: exact template when it fits (0.110708ms) +✔ escalation: a realistic UUID run URL drops the repo owner first (0.061292ms) +✔ escalation: over 150 bytes truncates the summary, keeps the ask and URL intact (0.12725ms) +✔ escalation: counts bytes, not code points, and never splits a character (0.06375ms) +✔ escalation: a URL that cannot fit is refused, never cut (0.05875ms) +✔ formatter guard: allows change files and finding files (0.081833ms) +✔ formatter guard: rejects files outside change ∪ findings and flags cargo fmt churn (0.069708ms) +✔ finding ids survive line moves and the verifier's "raised before" marker (0.220917ms) +✔ changelog: requires a new bullet under ## Unreleased (0.206958ms) +✔ isInside (0.066833ms) +✔ squash plan carries the trailers and is never marked pushed (0.0875ms) +✔ expandHome: only the literal $HOME/ prefix, against an absolute HOME (0.160584ms) +✔ clean run: A-adversarial → A-context → B → D → E (would dispatch) → F → landed (1.162083ms) +✔ E in shadow always reports would-dispatch and moves on to F, without closing a gate (0.147916ms) +✔ the gate unions all three lanes and feeds the fix round (0.154083ms) +✔ convergence stop: the same finding id surviving 2 consecutive rounds (0.2435ms) +✔ convergence stop: count not decreasing for 2 rounds (0.194459ms) +✔ convergence stop: round cap and wallclock budget (0.171459ms) +✔ formatter guard breach and rebase conflict end needs_human; a clean rebase regates (0.268875ms) +✔ superseded: the land ref moved (or was deleted) → cancelled, from any stage (0.212375ms) +✔ pure and fail-closed: no mutation, wrong result kinds and terminal states refused (0.259708ms) +✔ idempotent: the same state and result always give the same next state (0.15525ms) +✔ land-state.json round-trips and refuses other versions (0.266916ms) +✔ auto E: pending keeps the cursor at E, green moves to F, red feeds the fix loop (0.134333ms) +✔ auto E: a red gate still escalates on round cap (0.131375ms) +✔ auto F: pushed lands with the commit; moved and non_ff go back to D (0.12775ms) +✔ mode discipline: shadow outcomes refuse auto and vice versa (0.154709ms) +ℹ tests 87 +ℹ suites 0 +ℹ pass 87 +ℹ fail 0 +ℹ cancelled 0 +ℹ skipped 0 +ℹ todo 0 +ℹ duration_ms 495.924375 +``` + +## SDK executor, registry, full model-pin gate and types + +Working directory: `packages/sdk`. + +```sh +set -o pipefail; { TMPDIR=/Users/khaliqgant/.cache/devin-harness node node_modules/vitest/vitest.mjs run tests/authored-flow.test.ts tests/adapters/registry.test.ts tests/shipped-source-models.test.ts && npm run typecheck && npm run typecheck:tests; } 2>&1 | tee /Users/khaliqgant/.cache/devin-harness/land-followup-sdk-final.log +``` + +```text + + RUN v2.1.9 /Volumes/T7/Projects/AgentWorkforce/worktrees/flows/land-pinned-harnesses-20261102/packages/sdk + + ✓ tests/adapters/registry.test.ts (4 tests) 2ms + ✓ tests/authored-flow.test.ts (39 tests) 748ms + ✓ tests/shipped-source-models.test.ts (2 tests) 162698ms + ✓ first-party shipped source model pins > gives every TypeScript agent and LLM an explicit supported pair or a pinned named-agent declaration 162624ms + + Test Files 3 passed (3) + Tests 45 passed (45) + Start at 16:33:31 + Duration 163.31s (transform 1.02s, setup 28ms, collect 2.06s, tests 163.45s, environment 0ms, prepare 157ms) + + +> @relayflows/sdk@2.0.57 typecheck +> tsc --noEmit && tsc -p tsconfig.type-tests.json + + +> @relayflows/sdk@2.0.57 typecheck:tests +> tsc -p tsconfig.tests.json + +``` + +## Real compiled CLI through embedded Node + +Working directory: `packages/sdk`. + +```sh +set -o pipefail; PATH=/Users/khaliqgant/.nvm/versions/node/v22.22.2/bin:$PATH TMPDIR=/Users/khaliqgant/.cache/devin-harness RELAYFLOWD_BIN=/Volumes/T7/Projects/AgentWorkforce/artifacts/land-pinned-harnesses-20261102/package/bin/relayflowd node node_modules/vitest/vitest.mjs run tests/authored-node-runtime.test.ts -t 'advertises native direct-agent adapters inside' 2>&1 | tee /Users/khaliqgant/.cache/devin-harness/land-embedded-capability.log +``` + +```text + + RUN v2.1.9 /Volumes/T7/Projects/AgentWorkforce/worktrees/flows/land-pinned-harnesses-20261102/packages/sdk + + ✓ tests/authored-node-runtime.test.ts (23 tests | 22 skipped) 3898ms + ✓ Bun 1.4.x standalone → native Node authored lifecycle > advertises native direct-agent adapters inside the embedded Node runner 2893ms + + Test Files 1 passed (1) + Tests 1 passed | 22 skipped (23) + Start at 16:46:34 + Duration 5.71s (transform 758ms, setup 15ms, collect 1.50s, tests 3.90s, environment 0ms, prepare 56ms) + +``` + +## Surface regressions and generated documentation + +Working directory: `packages/surface`. + +```sh +set -o pipefail; { npm run typecheck:regressions && npm run check:docs; } 2>&1 | tee /Users/khaliqgant/.cache/devin-harness/land-surface-final.log +``` + +```text + +> @relayflows/surface@2.0.57 typecheck:regressions +> tsc -p ../../regressions/tsconfig.json && tsc -p tsconfig.test.json && node scripts/check-generated-helpers.mjs + +HELPERS_GENERATED_OK airtable.ts, asana.ts, azure-blob.ts, box.ts, calendly.ts, clickup.ts, clients.ts, cloudflare.ts, confluence.ts, daytona.ts, docker-hub.ts, dropbox.ts, fathom.ts, gcp.ts, gcs.ts, github.ts, gitlab.ts, gmail.ts, google-calendar.ts, google-drive.ts, granola.ts, hubspot.ts, index.ts, intercom.ts, jira.ts, linear.ts, mailgun.ts, mixpanel.ts, neon.ts, notion.ts, onedrive.ts, pipedrive.ts, postgres.ts, posthog.ts, providers.ts, ramp.ts, recall.ts, reddit.ts, redis.ts, s3.ts, salesforce.ts, segment.ts, sendgrid.ts, sharepoint.ts, shopify.ts, shortcut.ts, slack.ts, stripe.ts, teams.ts, telegram.ts, webhook-server.ts, x.ts, zendesk.ts + +> @relayflows/surface@2.0.57 check:docs +> node ../../scripts/check-authoring-reference.mjs && node --test ../../scripts/authoring-reference.test.mjs + +AUTHORING_REFERENCE_OK +✔ extracts overloads in order and preserves lease JSDoc byte-for-byte (8.219708ms) +✔ walks union members even when not re-exported, including nested unions (1.404125ms) +✔ CLI literals refuse unresolved options with command and identifier (2.322583ms) +✔ CLI literals resolve imports, spreads, String and templates but refuse dynamic defaults (10.264667ms) +✔ run documents every exported overload and the lease comment (0.558708ms) +✔ done documents all three distinct completion vocabularies (1.758917ms) +✔ human returns Step (0.085708ms) +✔ all helper namespaces and mcp are discoverable (0.802959ms) +✔ FlowHeader includes every field and its declaration (0.334083ms) +✔ AgentOptions includes every field and its declaration (0.833083ms) +✔ all named gate variants and both gate overloads are documented (0.634ms) +✔ CLI includes every declared verb, subcommand and literal flag (2.6005ms) +✔ lease prose agrees with type, kernel default and compiler ceiling (5.352625ms) +✔ checker accepts exact docs, rejects drift or missing docs, and accepts restoration (4220.564167ms) +✔ every relative link in shipped surface markdown resolves inside the packed package (1046.522542ms) +✔ every exported surface type the reference mentions is declared in it (44.419125ms) +✔ trigger and helper entry points are documented (2.89675ms) +✔ in-package re-exports are declared, never pointed at by a source path (0.40925ms) +✔ every provider trigger reachable through star re-exports is documented (18.636375ms) +✔ every function exported from the package root has its signature in the reference (1.196708ms) +✔ every type a rendered declaration names is declared, imported or a TypeScript global (70.26275ms) +✔ declares every public type, including type-only exports no signature names (11.707333ms) +✔ claims only what it declares: dependency types are named, links name their version skew (0.468417ms) +✔ declares every package-root export, including declarations a star-exported barrel owns (17.534292ms) +✔ a copied implementation imports every free function it calls (2.064667ms) +✔ CLI reference lists the root-level flags runCli handles before verbs (0.122458ms) +✔ a const assertion names no type (0.151917ms) +ℹ tests 27 +ℹ suites 0 +ℹ pass 27 +ℹ fail 0 +ℹ cancelled 0 +ℹ skipped 0 +ℹ todo 0 +ℹ duration_ms 5710.952458 +``` + +## Test typecheck after adding embedded regression + +Working directory: `packages/sdk`. + +```sh +set -o pipefail; npm run typecheck:tests 2>&1 | tee /Users/khaliqgant/.cache/devin-harness/land-sdk-test-types-final.log +``` + +```text + +> @relayflows/sdk@2.0.57 typecheck:tests +> tsc -p tsconfig.tests.json + +``` + +The embedded regression builds this follow-up's standalone CLI and uses the +verified Surface execution envelope already used by the Cloud runtime fixture. +It invokes the real published 2.0.57 Darwin kernel under Node 22.22.2. It checks +immutable native-adapter metadata, not provider installation/authentication. + +A direct bare-Surface manual probe was refused by both the released CLI and the +local standalone before capability code ran. That setup does not use the Cloud +execution envelope and is not claimed as a successful integration run here. diff --git a/packages/sdk/tests/authored-node-runtime.test.ts b/packages/sdk/tests/authored-node-runtime.test.ts index 9c7a6bba2..f90ad3e1c 100644 --- a/packages/sdk/tests/authored-node-runtime.test.ts +++ b/packages/sdk/tests/authored-node-runtime.test.ts @@ -93,6 +93,20 @@ async function entries(directory: string, runId: string) { } describe('Bun 1.4.x standalone → native Node authored lifecycle', () => { + it('advertises native direct-agent adapters inside the embedded Node runner', () => { + const f = fixture(` + const adapters = f.capabilities?.agentClis; + if (!adapters?.includes('devin') || adapters.includes('relayflows-wrapper-v1') + || !Object.isFrozen(adapters) || !Object.isFrozen(f.capabilities)) { + throw new Error('Native immutable Devin adapter metadata is unavailable'); + } + f.done('success'); + `); + const result = f.run(); + expect(result.status, result.stderr + result.stdout).toBe(0); + expect(JSON.parse(result.stdout)).toMatchObject({ completionReason: 'success' }); + }, 60_000); + it('runs a certified Promise.all group in parallel through the embedded Node runner', async () => { const f = fixture(''); writeFileSync(join(f.directory, 'case.flow.ts'), `import { flow } from '@relayflows/surface'; From d26124c5576bb464fa80848571096467f90de286 Mon Sep 17 00:00:00 2001 From: kjgbot Date: Mon, 2 Nov 2026 16:57:17 -0800 Subject: [PATCH 3/5] docs(land): add portable proof commands and clarify runtime requirement --- evidence/land-pinned-harnesses/verification.md | 18 ++++++++++++++++++ examples/land/README.md | 4 ++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/evidence/land-pinned-harnesses/verification.md b/evidence/land-pinned-harnesses/verification.md index 1f9dab43d..dd52a01c8 100644 --- a/evidence/land-pinned-harnesses/verification.md +++ b/evidence/land-pinned-harnesses/verification.md @@ -10,6 +10,24 @@ The metadata is introduced by this follow-up, so enabling this guarded land lane requires a subsequent SDK/Surface release. Published 2.0.57 contains the native Devin adapter but predates the metadata. No land deployment is changed. +## Reproducing on another checkout + +The records below preserve the literal commands and raw captured output from +this run, as required by the repository evidence policy. Their absolute paths +identify the original run; they are not prerequisites for another machine. +Use Node 22, Bun 1.4.x, a built local Surface/SDK and a matching local kernel. +Set `RELAYFLOWD_BIN` to the kernel executable on your machine. From the repo root: + +```sh +export TMPDIR="${XDG_CACHE_HOME:-$HOME/.cache}/relayflows-land-proof" +mkdir -p "$TMPDIR" +: "${RELAYFLOWD_BIN:?Set RELAYFLOWD_BIN to your relayflowd executable}" +(cd examples/land && npm run typecheck && npm test) +(cd packages/sdk && node node_modules/vitest/vitest.mjs run tests/authored-flow.test.ts tests/adapters/registry.test.ts tests/shipped-source-models.test.ts && npm run typecheck && npm run typecheck:tests) +(cd packages/sdk && node node_modules/vitest/vitest.mjs run tests/authored-node-runtime.test.ts -t 'advertises native direct-agent adapters inside') +(cd packages/surface && npm run typecheck:regressions && npm run check:docs) +``` + ## Land tests and types Working directory: `examples/land`. diff --git a/examples/land/README.md b/examples/land/README.md index 17a3a23d8..3d37f6357 100644 --- a/examples/land/README.md +++ b/examples/land/README.md @@ -203,8 +203,8 @@ These defaults are the spec's proposals, not decisions; each is marked Devin additionally requires `f.capabilities.agentClis` from the executing SDK to include `devin`. Missing metadata refuses before any review or fix work. This capability describes native direct-agent adapters, not installed CLIs or login -state. It is introduced by this follow-up and needs a subsequent SDK/Surface -release; 2.0.57 supplies the adapter but predates this metadata. The separate +state. SDK 2.0.57 supplies the adapter but predates this metadata, so this +guard requires a later SDK/Surface release. The separate `flowsBin` used for review fleets must be a stable 2.x release >=2.0.57. Codex remains the default; Grok remains refused without a native worker adapter. From 23a1bb2a242cd732ee982b098e005b0c69e97e0b Mon Sep 17 00:00:00 2001 From: kjgbot Date: Mon, 2 Nov 2026 17:04:34 -0800 Subject: [PATCH 4/5] fix(land): keep supported harnesses to Claude and Codex --- .../land-pinned-harnesses/verification.md | 347 ++++++------------ examples/land/README.md | 11 +- examples/land/land.flow.ts | 20 +- examples/land/tests/flow.test.ts | 34 +- packages/sdk/src/authored-flow-executor.ts | 4 - packages/sdk/tests/authored-flow.test.ts | 14 - .../sdk/tests/authored-node-runtime.test.ts | 14 - .../sdk/tests/shipped-source-models.test.ts | 1 - packages/surface/AUTHORING.md | 14 +- packages/surface/src/context.ts | 8 +- 10 files changed, 130 insertions(+), 337 deletions(-) diff --git a/evidence/land-pinned-harnesses/verification.md b/evidence/land-pinned-harnesses/verification.md index dd52a01c8..53cbabc7f 100644 --- a/evidence/land-pinned-harnesses/verification.md +++ b/evidence/land-pinned-harnesses/verification.md @@ -1,39 +1,36 @@ -# Land fix-forward verification +# Land model-pin fix-forward verification -The land-specific dynamic-model waiver is removed. Each supported fix branch -uses a literal CLI/model pair; configured model overrides are refused. The -normal supported-pair table now includes the native Devin gpt-5.6-sol pair. -Codex remains the default. Devin requires native-adapter metadata from the -executing SDK and a supported separate CLI for review fleets. +Land supports Claude and Codex; Codex remains the default. Grok and Devin stay +reserved configuration names and refuse before review or fix work. There is no +new SDK/Surface capability API and no additional release dependency in this PR. -The metadata is introduced by this follow-up, so enabling this guarded land -lane requires a subsequent SDK/Surface release. Published 2.0.57 contains the -native Devin adapter but predates the metadata. No land deployment is changed. +The land-specific model waiver is removed. Fix calls use literal supported +pairs: Claude/claude-sonnet-5 and Codex/gpt-5.6-sol. parseLandConfig refuses +configured fixLoop.model values as not supported yet. The needs_human test +asserts FLOW_OPENAI_API_KEY exactly. No land deployment was changed. -## Reproducing on another checkout +## Reproduce -The records below preserve the literal commands and raw captured output from -this run, as required by the repository evidence policy. Their absolute paths -identify the original run; they are not prerequisites for another machine. -Use Node 22, Bun 1.4.x, a built local Surface/SDK and a matching local kernel. -Set `RELAYFLOWD_BIN` to the kernel executable on your machine. From the repo root: +After installing dependencies in this checkout, run from the repository root: ```sh export TMPDIR="${XDG_CACHE_HOME:-$HOME/.cache}/relayflows-land-proof" mkdir -p "$TMPDIR" -: "${RELAYFLOWD_BIN:?Set RELAYFLOWD_BIN to your relayflowd executable}" -(cd examples/land && npm run typecheck && npm test) -(cd packages/sdk && node node_modules/vitest/vitest.mjs run tests/authored-flow.test.ts tests/adapters/registry.test.ts tests/shipped-source-models.test.ts && npm run typecheck && npm run typecheck:tests) -(cd packages/sdk && node node_modules/vitest/vitest.mjs run tests/authored-node-runtime.test.ts -t 'advertises native direct-agent adapters inside') -(cd packages/surface && npm run typecheck:regressions && npm run check:docs) +npm run typecheck --prefix examples/land +npm test --prefix examples/land +(cd packages/sdk && node node_modules/vitest/vitest.mjs run tests/shipped-source-models.test.ts) ``` +The records below preserve the literal original commands and raw output, as +required by AGENTS.md. Their absolute paths identify this run and are not +prerequisites on another machine. + ## Land tests and types -Working directory: `examples/land`. +Working directory: repository root. ```sh -set -o pipefail; { TMPDIR=/Users/khaliqgant/.cache/devin-harness npm run typecheck && TMPDIR=/Users/khaliqgant/.cache/devin-harness npm test; } 2>&1 | tee /Users/khaliqgant/.cache/devin-harness/land-followup-tests-rebased.log +set -o pipefail; { TMPDIR=/Users/khaliqgant/.cache/devin-harness npm run typecheck --prefix examples/land && TMPDIR=/Users/khaliqgant/.cache/devin-harness npm test --prefix examples/land; } 2>&1 | tee /Users/khaliqgant/.cache/devin-harness/land-claude-codex-only.log ``` ```text @@ -45,233 +42,119 @@ set -o pipefail; { TMPDIR=/Users/khaliqgant/.cache/devin-harness npm run typeche > test > node --experimental-strip-types --test tests/*.test.ts -✔ defaults: mergePolicy is shadow, placeholders are the spec proposals (0.952792ms) -✔ a full relay-desktop shaped config round-trips (2.766875ms) -✔ model overrides are explicitly unsupported for every harness (0.842333ms) -✔ refusals: unknown keys, bad enums, unsafe paths, out-of-range numbers (0.943416ms) -✔ JSON schema matches the runtime validator: keys, required, enums and defaults (0.155458ms) -✔ every PLACEHOLDER default names its open question (0.3825ms) -✔ clean shadow run: one hosted run per stage, E would dispatch, squash plan written, never pushed (5.40575ms) -✔ intent isolation: only context review is given intentFile; the adversarial fleet never sees it (2.14225ms) -✔ fix loop: the fixup head is carried between runs in land.bundle, then the gate reruns clean (3.794417ms) -✔ non-convergence: a finding surviving 2 rounds ends needs_human with a ≤150-byte ask (2.660584ms) -✔ formatter guard: a fix round touching files outside change ∪ findings ends needs_human (0.976875ms) -✔ changelog required with no new Unreleased bullet becomes a finding for the fix loop (0.909167ms) -✔ stage D: a moved base rebases and regates; a conflict ends needs_human (0.8925ms) -✔ superseded: the land ref moved → cancelled before any work in that run (0.124334ms) -✔ idempotent cursor: a retried stage whose state write landed is a no-op; a reaped one reruns (0.538958ms) -✔ stage E in shadow: records what it would dispatch, launches nothing, moves on to F (0.422375ms) -✔ the removed githubGateInShadow flag is refused as an unknown key, before any work (0.131875ms) -✔ refusals: no state outside A-adversarial, approval mode, state or intent inside the checkout, wrong run (0.408542ms) -✔ runId: an explicit Cloud id names the Land-Run trailer and every completion detail, not the stateDir path (0.383ms) -✔ runId: absent, it falls back to the stateDir segment for local use (0.405625ms) -✔ runId: a malformed id, or a stateDir segment that is not one, is refused before any work (0.123708ms) -✔ runId: a stage invoked with another run id is refused and leaves the state alone (0.135833ms) -✔ $HOME paths: expanded from the run's own HOME, read once per run through a journaled step (0.857542ms) -✔ $HOME paths: a trailing slash on HOME is normalized (0.084541ms) -✔ $HOME paths: absolute paths never read HOME (0.287542ms) -✔ $HOME paths: refused when HOME is unset, relative, or unsafe (0.133542ms) -✔ $HOME paths: only the exact $HOME/ prefix; no other variable, form or .. segment (0.193625ms) -✔ $HOME paths: the outside-checkout check runs on the expanded path (0.069834ms) -✔ absolute paths: a . or .. in any segment is refused, including the first (/../x) (0.100416ms) -✔ the base fetch deepens a shallow checkout and names only the base refspec (288.000917ms) -✔ auto: dispatch overruns, the next E awaits the pushed snapshot, F squash-pushes and lands (2.604334ms) -✔ auto: a gate that finishes inside the dispatch window applies its verdict in the same run (0.775834ms) -✔ auto: red GitHub gate goes to the next fix round (2.481542ms) -✔ auto: a failed dispatched run is red to the fix loop (2.089833ms) -✔ auto: still-pending dispatched runs keep E as the cursor across stage runs (1.92125ms) -✔ auto: F goes back to D on non-fast-forward (0.676083ms) -✔ auto: a moved base at F goes back to D and regates (2.014084ms) -✔ auto: a non-FF, non-permission push failure ends needs_human (0.940542ms) -✔ auto and shadow: the land harness is the review fleets' clis and the fix agent's cli (1.331167ms) -✔ auto: a stage reaped after the push records the landed commit instead of landing twice (2.368708ms) -✔ auto: F refuses to squash a head that never contained the base (1.392084ms) -✔ auto: D rebases a head that never contained an unmoved base, then lands (2.482125ms) -✔ auto: three red GitHub gates escalate stuck_finding instead of alternating past the stall checks (2.144208ms) -✔ auto: a run set still growing between polls stays pending; a stable set gives the verdict (0.899542ms) -✔ auto: a stale completed run older than the dispatch bound cannot produce a verdict (0.51775ms) -✔ auto and shadow: a non-default harness is the review fleets' clis and the fix agent's cli (0.64975ms) -✔ a harness without a worker adapter fails at stage one with a clear error (0.124209ms) -✔ Devin refuses missing/older runtime metadata before review or fix work (0.210375ms) -✔ each supported fix harness launches with its literal pinned model (2.648917ms) -✔ Devin refuses an older or unknown child flows runtime before review work (0.768917ms) -✔ a review lane that cannot launch its cli ends needs_human, not a fix round (0.235125ms) -✔ codex without a login in the stage sandbox ends needs_human at preflight (0.372333ms) -✔ auto: a push-denied git credential fails preflight before any stage runs (0.958041ms) -✔ convergence: a clean gate proceeds, even past the budget or cap (0.777417ms) -✔ convergence: findings with rounds and budget left ask for a fix (0.086375ms) -✔ convergence: round cap (0.059958ms) -✔ convergence: the same finding id surviving 2 consecutive rounds (0.106792ms) -✔ convergence: finding count not decreasing for 2 rounds (0.06275ms) -✔ convergence: budget wins over every other rule (0.064834ms) -✔ convergence: refuses an empty history (0.154583ms) -✔ escalation: exact template when it fits (0.110708ms) -✔ escalation: a realistic UUID run URL drops the repo owner first (0.061292ms) -✔ escalation: over 150 bytes truncates the summary, keeps the ask and URL intact (0.12725ms) -✔ escalation: counts bytes, not code points, and never splits a character (0.06375ms) -✔ escalation: a URL that cannot fit is refused, never cut (0.05875ms) -✔ formatter guard: allows change files and finding files (0.081833ms) -✔ formatter guard: rejects files outside change ∪ findings and flags cargo fmt churn (0.069708ms) -✔ finding ids survive line moves and the verifier's "raised before" marker (0.220917ms) -✔ changelog: requires a new bullet under ## Unreleased (0.206958ms) -✔ isInside (0.066833ms) -✔ squash plan carries the trailers and is never marked pushed (0.0875ms) -✔ expandHome: only the literal $HOME/ prefix, against an absolute HOME (0.160584ms) -✔ clean run: A-adversarial → A-context → B → D → E (would dispatch) → F → landed (1.162083ms) -✔ E in shadow always reports would-dispatch and moves on to F, without closing a gate (0.147916ms) -✔ the gate unions all three lanes and feeds the fix round (0.154083ms) -✔ convergence stop: the same finding id surviving 2 consecutive rounds (0.2435ms) -✔ convergence stop: count not decreasing for 2 rounds (0.194459ms) -✔ convergence stop: round cap and wallclock budget (0.171459ms) -✔ formatter guard breach and rebase conflict end needs_human; a clean rebase regates (0.268875ms) -✔ superseded: the land ref moved (or was deleted) → cancelled, from any stage (0.212375ms) -✔ pure and fail-closed: no mutation, wrong result kinds and terminal states refused (0.259708ms) -✔ idempotent: the same state and result always give the same next state (0.15525ms) -✔ land-state.json round-trips and refuses other versions (0.266916ms) -✔ auto E: pending keeps the cursor at E, green moves to F, red feeds the fix loop (0.134333ms) -✔ auto E: a red gate still escalates on round cap (0.131375ms) -✔ auto F: pushed lands with the commit; moved and non_ff go back to D (0.12775ms) -✔ mode discipline: shadow outcomes refuse auto and vice versa (0.154709ms) -ℹ tests 87 +✔ defaults: mergePolicy is shadow, placeholders are the spec proposals (1.357ms) +✔ a full relay-desktop shaped config round-trips (0.234875ms) +✔ model overrides are explicitly unsupported for every harness (0.942709ms) +✔ refusals: unknown keys, bad enums, unsafe paths, out-of-range numbers (1.429458ms) +✔ JSON schema matches the runtime validator: keys, required, enums and defaults (0.192791ms) +✔ every PLACEHOLDER default names its open question (0.643625ms) +✔ clean shadow run: one hosted run per stage, E would dispatch, squash plan written, never pushed (8.6635ms) +✔ intent isolation: only context review is given intentFile; the adversarial fleet never sees it (4.029333ms) +✔ fix loop: the fixup head is carried between runs in land.bundle, then the gate reruns clean (1.453834ms) +✔ non-convergence: a finding surviving 2 rounds ends needs_human with a ≤150-byte ask (4.942166ms) +✔ formatter guard: a fix round touching files outside change ∪ findings ends needs_human (1.094542ms) +✔ changelog required with no new Unreleased bullet becomes a finding for the fix loop (2.209084ms) +✔ stage D: a moved base rebases and regates; a conflict ends needs_human (2.662709ms) +✔ superseded: the land ref moved → cancelled before any work in that run (0.173667ms) +✔ idempotent cursor: a retried stage whose state write landed is a no-op; a reaped one reruns (0.604625ms) +✔ stage E in shadow: records what it would dispatch, launches nothing, moves on to F (0.450083ms) +✔ the removed githubGateInShadow flag is refused as an unknown key, before any work (0.136542ms) +✔ refusals: no state outside A-adversarial, approval mode, state or intent inside the checkout, wrong run (0.442334ms) +✔ runId: an explicit Cloud id names the Land-Run trailer and every completion detail, not the stateDir path (0.396375ms) +✔ runId: absent, it falls back to the stateDir segment for local use (0.45225ms) +✔ runId: a malformed id, or a stateDir segment that is not one, is refused before any work (0.134167ms) +✔ runId: a stage invoked with another run id is refused and leaves the state alone (0.134666ms) +✔ $HOME paths: expanded from the run's own HOME, read once per run through a journaled step (2.149583ms) +✔ $HOME paths: a trailing slash on HOME is normalized (0.464834ms) +✔ $HOME paths: absolute paths never read HOME (1.196292ms) +✔ $HOME paths: refused when HOME is unset, relative, or unsafe (0.241625ms) +✔ $HOME paths: only the exact $HOME/ prefix; no other variable, form or .. segment (0.274792ms) +✔ $HOME paths: the outside-checkout check runs on the expanded path (0.096458ms) +✔ absolute paths: a . or .. in any segment is refused, including the first (/../x) (0.143458ms) +✔ the base fetch deepens a shallow checkout and names only the base refspec (248.571333ms) +✔ auto: dispatch overruns, the next E awaits the pushed snapshot, F squash-pushes and lands (3.625417ms) +✔ auto: a gate that finishes inside the dispatch window applies its verdict in the same run (0.547583ms) +✔ auto: red GitHub gate goes to the next fix round (0.880583ms) +✔ auto: a failed dispatched run is red to the fix loop (2.904625ms) +✔ auto: still-pending dispatched runs keep E as the cursor across stage runs (2.142916ms) +✔ auto: F goes back to D on non-fast-forward (1.224458ms) +✔ auto: a moved base at F goes back to D and regates (2.435791ms) +✔ auto: a non-FF, non-permission push failure ends needs_human (1.185792ms) +✔ auto and shadow: the land harness is the review fleets' clis and the fix agent's cli (1.547375ms) +✔ auto: a stage reaped after the push records the landed commit instead of landing twice (0.588ms) +✔ auto: F refuses to squash a head that never contained the base (0.462292ms) +✔ auto: D rebases a head that never contained an unmoved base, then lands (1.484541ms) +✔ auto: three red GitHub gates escalate stuck_finding instead of alternating past the stall checks (1.807917ms) +✔ auto: a run set still growing between polls stays pending; a stable set gives the verdict (0.683209ms) +✔ auto: a stale completed run older than the dispatch bound cannot produce a verdict (0.3315ms) +✔ auto and shadow: a non-default harness is the review fleets' clis and the fix agent's cli (0.566958ms) +✔ a harness unsupported in land fails at stage one with a clear error (0.127334ms) +✔ each supported fix harness launches with its literal pinned model (2.541708ms) +✔ a review lane that cannot launch its cli ends needs_human, not a fix round (0.40925ms) +✔ codex without a login in the stage sandbox ends needs_human at preflight (0.748792ms) +✔ auto: a push-denied git credential fails preflight before any stage runs (0.134292ms) +✔ convergence: a clean gate proceeds, even past the budget or cap (0.860125ms) +✔ convergence: findings with rounds and budget left ask for a fix (0.093375ms) +✔ convergence: round cap (0.06775ms) +✔ convergence: the same finding id surviving 2 consecutive rounds (0.449292ms) +✔ convergence: finding count not decreasing for 2 rounds (0.196667ms) +✔ convergence: budget wins over every other rule (0.134333ms) +✔ convergence: refuses an empty history (1.591541ms) +✔ escalation: exact template when it fits (1.319708ms) +✔ escalation: a realistic UUID run URL drops the repo owner first (0.324458ms) +✔ escalation: over 150 bytes truncates the summary, keeps the ask and URL intact (0.455875ms) +✔ escalation: counts bytes, not code points, and never splits a character (0.17475ms) +✔ escalation: a URL that cannot fit is refused, never cut (0.428791ms) +✔ formatter guard: allows change files and finding files (0.386833ms) +✔ formatter guard: rejects files outside change ∪ findings and flags cargo fmt churn (0.142291ms) +✔ finding ids survive line moves and the verifier's "raised before" marker (0.952417ms) +✔ changelog: requires a new bullet under ## Unreleased (0.774167ms) +✔ isInside (0.342375ms) +✔ squash plan carries the trailers and is never marked pushed (0.28475ms) +✔ expandHome: only the literal $HOME/ prefix, against an absolute HOME (0.572208ms) +✔ clean run: A-adversarial → A-context → B → D → E (would dispatch) → F → landed (1.670667ms) +✔ E in shadow always reports would-dispatch and moves on to F, without closing a gate (0.177208ms) +✔ the gate unions all three lanes and feeds the fix round (0.154833ms) +✔ convergence stop: the same finding id surviving 2 consecutive rounds (0.256042ms) +✔ convergence stop: count not decreasing for 2 rounds (0.193125ms) +✔ convergence stop: round cap and wallclock budget (0.171791ms) +✔ formatter guard breach and rebase conflict end needs_human; a clean rebase regates (0.364667ms) +✔ superseded: the land ref moved (or was deleted) → cancelled, from any stage (0.232166ms) +✔ pure and fail-closed: no mutation, wrong result kinds and terminal states refused (0.265541ms) +✔ idempotent: the same state and result always give the same next state (0.167291ms) +✔ land-state.json round-trips and refuses other versions (2.870458ms) +✔ auto E: pending keeps the cursor at E, green moves to F, red feeds the fix loop (1.05975ms) +✔ auto E: a red gate still escalates on round cap (0.735666ms) +✔ auto F: pushed lands with the commit; moved and non_ff go back to D (0.526042ms) +✔ mode discipline: shadow outcomes refuse auto and vice versa (0.513084ms) +ℹ tests 85 ℹ suites 0 -ℹ pass 87 +ℹ pass 85 ℹ fail 0 ℹ cancelled 0 ℹ skipped 0 ℹ todo 0 -ℹ duration_ms 495.924375 -``` - -## SDK executor, registry, full model-pin gate and types - -Working directory: `packages/sdk`. - -```sh -set -o pipefail; { TMPDIR=/Users/khaliqgant/.cache/devin-harness node node_modules/vitest/vitest.mjs run tests/authored-flow.test.ts tests/adapters/registry.test.ts tests/shipped-source-models.test.ts && npm run typecheck && npm run typecheck:tests; } 2>&1 | tee /Users/khaliqgant/.cache/devin-harness/land-followup-sdk-final.log -``` - -```text - - RUN v2.1.9 /Volumes/T7/Projects/AgentWorkforce/worktrees/flows/land-pinned-harnesses-20261102/packages/sdk - - ✓ tests/adapters/registry.test.ts (4 tests) 2ms - ✓ tests/authored-flow.test.ts (39 tests) 748ms - ✓ tests/shipped-source-models.test.ts (2 tests) 162698ms - ✓ first-party shipped source model pins > gives every TypeScript agent and LLM an explicit supported pair or a pinned named-agent declaration 162624ms - - Test Files 3 passed (3) - Tests 45 passed (45) - Start at 16:33:31 - Duration 163.31s (transform 1.02s, setup 28ms, collect 2.06s, tests 163.45s, environment 0ms, prepare 157ms) - - -> @relayflows/sdk@2.0.57 typecheck -> tsc --noEmit && tsc -p tsconfig.type-tests.json - - -> @relayflows/sdk@2.0.57 typecheck:tests -> tsc -p tsconfig.tests.json - +ℹ duration_ms 511.386833 ``` -## Real compiled CLI through embedded Node +## Full shipped-source model-pin gate -Working directory: `packages/sdk`. +Working directory: packages/sdk. ```sh -set -o pipefail; PATH=/Users/khaliqgant/.nvm/versions/node/v22.22.2/bin:$PATH TMPDIR=/Users/khaliqgant/.cache/devin-harness RELAYFLOWD_BIN=/Volumes/T7/Projects/AgentWorkforce/artifacts/land-pinned-harnesses-20261102/package/bin/relayflowd node node_modules/vitest/vitest.mjs run tests/authored-node-runtime.test.ts -t 'advertises native direct-agent adapters inside' 2>&1 | tee /Users/khaliqgant/.cache/devin-harness/land-embedded-capability.log +set -o pipefail; TMPDIR=/Users/khaliqgant/.cache/devin-harness node node_modules/vitest/vitest.mjs run tests/shipped-source-models.test.ts 2>&1 | tee /Users/khaliqgant/.cache/devin-harness/land-claude-codex-model-gate.log ``` ```text RUN v2.1.9 /Volumes/T7/Projects/AgentWorkforce/worktrees/flows/land-pinned-harnesses-20261102/packages/sdk - ✓ tests/authored-node-runtime.test.ts (23 tests | 22 skipped) 3898ms - ✓ Bun 1.4.x standalone → native Node authored lifecycle > advertises native direct-agent adapters inside the embedded Node runner 2893ms + ✓ tests/shipped-source-models.test.ts (2 tests) 243400ms + ✓ first-party shipped source model pins > gives every TypeScript agent and LLM an explicit supported pair or a pinned named-agent declaration 243333ms Test Files 1 passed (1) - Tests 1 passed | 22 skipped (23) - Start at 16:46:34 - Duration 5.71s (transform 758ms, setup 15ms, collect 1.50s, tests 3.90s, environment 0ms, prepare 56ms) + Tests 2 passed (2) + Start at 17:00:00 + Duration 244.09s (transform 143ms, setup 11ms, collect 412ms, tests 243.40s, environment 0ms, prepare 65ms) ``` - -## Surface regressions and generated documentation - -Working directory: `packages/surface`. - -```sh -set -o pipefail; { npm run typecheck:regressions && npm run check:docs; } 2>&1 | tee /Users/khaliqgant/.cache/devin-harness/land-surface-final.log -``` - -```text - -> @relayflows/surface@2.0.57 typecheck:regressions -> tsc -p ../../regressions/tsconfig.json && tsc -p tsconfig.test.json && node scripts/check-generated-helpers.mjs - -HELPERS_GENERATED_OK airtable.ts, asana.ts, azure-blob.ts, box.ts, calendly.ts, clickup.ts, clients.ts, cloudflare.ts, confluence.ts, daytona.ts, docker-hub.ts, dropbox.ts, fathom.ts, gcp.ts, gcs.ts, github.ts, gitlab.ts, gmail.ts, google-calendar.ts, google-drive.ts, granola.ts, hubspot.ts, index.ts, intercom.ts, jira.ts, linear.ts, mailgun.ts, mixpanel.ts, neon.ts, notion.ts, onedrive.ts, pipedrive.ts, postgres.ts, posthog.ts, providers.ts, ramp.ts, recall.ts, reddit.ts, redis.ts, s3.ts, salesforce.ts, segment.ts, sendgrid.ts, sharepoint.ts, shopify.ts, shortcut.ts, slack.ts, stripe.ts, teams.ts, telegram.ts, webhook-server.ts, x.ts, zendesk.ts - -> @relayflows/surface@2.0.57 check:docs -> node ../../scripts/check-authoring-reference.mjs && node --test ../../scripts/authoring-reference.test.mjs - -AUTHORING_REFERENCE_OK -✔ extracts overloads in order and preserves lease JSDoc byte-for-byte (8.219708ms) -✔ walks union members even when not re-exported, including nested unions (1.404125ms) -✔ CLI literals refuse unresolved options with command and identifier (2.322583ms) -✔ CLI literals resolve imports, spreads, String and templates but refuse dynamic defaults (10.264667ms) -✔ run documents every exported overload and the lease comment (0.558708ms) -✔ done documents all three distinct completion vocabularies (1.758917ms) -✔ human returns Step (0.085708ms) -✔ all helper namespaces and mcp are discoverable (0.802959ms) -✔ FlowHeader includes every field and its declaration (0.334083ms) -✔ AgentOptions includes every field and its declaration (0.833083ms) -✔ all named gate variants and both gate overloads are documented (0.634ms) -✔ CLI includes every declared verb, subcommand and literal flag (2.6005ms) -✔ lease prose agrees with type, kernel default and compiler ceiling (5.352625ms) -✔ checker accepts exact docs, rejects drift or missing docs, and accepts restoration (4220.564167ms) -✔ every relative link in shipped surface markdown resolves inside the packed package (1046.522542ms) -✔ every exported surface type the reference mentions is declared in it (44.419125ms) -✔ trigger and helper entry points are documented (2.89675ms) -✔ in-package re-exports are declared, never pointed at by a source path (0.40925ms) -✔ every provider trigger reachable through star re-exports is documented (18.636375ms) -✔ every function exported from the package root has its signature in the reference (1.196708ms) -✔ every type a rendered declaration names is declared, imported or a TypeScript global (70.26275ms) -✔ declares every public type, including type-only exports no signature names (11.707333ms) -✔ claims only what it declares: dependency types are named, links name their version skew (0.468417ms) -✔ declares every package-root export, including declarations a star-exported barrel owns (17.534292ms) -✔ a copied implementation imports every free function it calls (2.064667ms) -✔ CLI reference lists the root-level flags runCli handles before verbs (0.122458ms) -✔ a const assertion names no type (0.151917ms) -ℹ tests 27 -ℹ suites 0 -ℹ pass 27 -ℹ fail 0 -ℹ cancelled 0 -ℹ skipped 0 -ℹ todo 0 -ℹ duration_ms 5710.952458 -``` - -## Test typecheck after adding embedded regression - -Working directory: `packages/sdk`. - -```sh -set -o pipefail; npm run typecheck:tests 2>&1 | tee /Users/khaliqgant/.cache/devin-harness/land-sdk-test-types-final.log -``` - -```text - -> @relayflows/sdk@2.0.57 typecheck:tests -> tsc -p tsconfig.tests.json - -``` - -The embedded regression builds this follow-up's standalone CLI and uses the -verified Surface execution envelope already used by the Cloud runtime fixture. -It invokes the real published 2.0.57 Darwin kernel under Node 22.22.2. It checks -immutable native-adapter metadata, not provider installation/authentication. - -A direct bare-Surface manual probe was refused by both the released CLI and the -local standalone before capability code ran. That setup does not use the Cloud -execution envelope and is not claimed as a successful integration run here. diff --git a/examples/land/README.md b/examples/land/README.md index 3d37f6357..23da52376 100644 --- a/examples/land/README.md +++ b/examples/land/README.md @@ -195,18 +195,13 @@ These defaults are the spec's proposals, not decisions; each is marked | `fixLoop.maxRounds` | 4 | Q2 | | `fixLoop.wallclockMinutes` | 180 | Q2 | | `fixLoop.harness` | `codex` (also the review flows' `clis`; `claude`, `grok` and `devin` accepted) | Q2 | -| `fixLoop.model` | unsupported; omit | Fix agents pin Claude `claude-sonnet-5` and Codex/Devin `gpt-5.6-sol` | +| `fixLoop.model` | unsupported; omit | Fix agents pin Claude `claude-sonnet-5` and Codex `gpt-5.6-sol` | | `mergePolicy.squashAuthor` | `session-human` | Q3 | | `landRef` | `land/{user}/{sha7}` | Q5 | | `mergePolicy.approvalDropAfterCleanLandings` | `null` | Q6 | -Devin additionally requires `f.capabilities.agentClis` from the executing SDK to -include `devin`. Missing metadata refuses before any review or fix work. This -capability describes native direct-agent adapters, not installed CLIs or login -state. SDK 2.0.57 supplies the adapter but predates this metadata, so this -guard requires a later SDK/Surface release. The separate -`flowsBin` used for review fleets must be a stable 2.x release >=2.0.57. -Codex remains the default; Grok remains refused without a native worker adapter. +Codex remains the default. Grok and Devin are reserved configuration names and +are refused by land before review or fix work. ## Not in this flow diff --git a/examples/land/land.flow.ts b/examples/land/land.flow.ts index 65ba46751..c4cc24413 100644 --- a/examples/land/land.flow.ts +++ b/examples/land/land.flow.ts @@ -49,8 +49,8 @@ export const shellWord = (value: string): string => `'${value.replaceAll("'", "' export const MERGE_MODES = ['shadow', 'approval', 'auto'] as const; export const CHANGELOG_RULES = ['required', 'optional'] as const; export const HARNESSES = ['claude', 'codex', 'grok', 'devin'] as const; -/** Devin additionally requires the executing SDK's native adapter capability. */ -export const WORKER_HARNESSES = new Set(['claude', 'codex', 'devin']); +/** Land currently supports Claude and Codex; other names are reserved. */ +export const WORKER_HARNESSES = new Set(['claude', 'codex']); export const SQUASH_AUTHORS = ['session-human', 'agent-with-human-coauthor'] as const; export const RUNNER_OS = ['linux', 'macos'] as const; export const RUNNER_ARCH = ['x64', 'arm64'] as const; @@ -635,7 +635,6 @@ async function fixRound(f: Ctx, r: Run, round: number): Promise { switch (harness) { case 'claude': return f.agent(`fix-r${round}`, { cli: 'claude', model: 'claude-sonnet-5', timeout, task }); case 'codex': return f.agent(`fix-r${round}`, { cli: 'codex', model: 'gpt-5.6-sol', timeout, task }); - case 'devin': return f.agent(`fix-r${round}`, { cli: 'devin', model: 'gpt-5.6-sol', timeout, task }); default: throw new NeedsHuman(`Unsupported fix harness: ${harness}`); } })(); @@ -927,10 +926,7 @@ export async function land(f: Ctx, raw: LandInput): Promise { if (!pushable.ok) throw new NeedsHuman(`mergePolicy.mode "auto" needs a push-capable git credential (a write repository grant): ${pushable.output.slice(-300)}`); } if (!WORKER_HARNESSES.has(config.fixLoop.harness)) { - throw new NeedsHuman(`fixLoop.harness "${config.fixLoop.harness}" has no worker adapter in this relayflows release; use "codex"`); - } - if (config.fixLoop.harness === 'devin' && !f.capabilities?.agentClis?.includes('devin')) { - throw new NeedsHuman('fixLoop.harness "devin" requires a runtime advertising the native Devin adapter; use "codex" until that runtime is installed'); + throw new NeedsHuman(`fixLoop.harness "${config.fixLoop.harness}" is not supported in land; use "codex"`); } const base = `origin/${config.baseBranch}`; // Hosted runs clone the land ref shallow, and merge-base against the base @@ -960,16 +956,6 @@ export async function land(f: Ctx, raw: LandInput): Promise { } for (const setup of config.runner.setup) await f.run(setup, { timeout: '15m' }); if ((await f.run('git status --porcelain')).trim()) throw new NeedsHuman('runner.setup left the checkout dirty; ignore its outputs in .gitignore'); - if (config.fixLoop.harness === 'devin') { - // Review fleets use this separate CLI, while fix agents use the host - // SDK capability checked above. Official stable 2.x releases starting - // at 2.0.57 include the native Devin adapter. - const child = await f.run(`${shellWord(config.flowsBin)} --version`, { onNonZero: 'record', timeout: '10s' }); - const version = /^2\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/.exec(child.stdout.trim()); - if (!child.ok || !version || !(Number(version[1]) > 0 || Number(version[2]) >= 57)) { - throw new NeedsHuman('Devin review fleets require flowsBin to be a stable relayflows 2.x release >=2.0.57; use "codex" until it is installed'); - } - } // Hosted stage runs get no connected cliCredentials; the only agent // credential is a delivered OPENAI_API_KEY the executor turns into a // ~/.codex login under the shared HOME before the CLI spawns. This check diff --git a/examples/land/tests/flow.test.ts b/examples/land/tests/flow.test.ts index ad1238b94..60f9b1cda 100644 --- a/examples/land/tests/flow.test.ts +++ b/examples/land/tests/flow.test.ts @@ -24,8 +24,6 @@ function world(over: { config?: unknown; head?: string; adversarial?: Raw[][]; context?: Raw[][]; ciRed?: number[]; roundFiles?: string[][]; baseShas?: string[]; rebaseFails?: boolean; changelog?: [string, string]; refSha?: string; home?: string; dir?: string; - agentClis?: readonly string[]; - flowsVersion?: string; /** Auto mode: the dispatched repo gate's exit per dispatch attempt; 'pending' when it overruns. */ githubExit?: Array; ghRuns?: GhRun[]; ghRunsSeq?: GhRun[][]; pushFails?: 'non_ff' | 'other'; landedCommit?: string; headContainsBase?: boolean; fAncestorFails?: boolean; ciFetchFails?: boolean; pushDryRunFails?: boolean; codexLoginFails?: boolean; adversarialExit?: number; contextExit?: number; reviewTail?: string; @@ -47,10 +45,8 @@ function world(over: { let head = over.head ?? sha; // fresh clone at the pinned sha let baseRef = ''; const f = { - ...(over.agentClis === undefined ? {} : { capabilities: { agentClis: over.agentClis } }), run: async (command: string, options?: { onNonZero?: string }) => { ran.push(command); - if (command.endsWith(' --version')) return record(true, over.flowsVersion ?? '2.0.57'); if (command === 'git rev-parse --show-toplevel') return root; if (command === 'git rev-parse HEAD') return head; if (command === 'git rev-parse HEAD^{tree}') return 't'.repeat(40); @@ -656,29 +652,20 @@ test('auto and shadow: a non-default harness is the review fleets\' clis and the assert.equal(fix?.options.cli, 'claude'); }); -test('a harness without a worker adapter fails at stage one with a clear error', async () => { - for (const harness of ['grok']) { +test('a harness unsupported in land fails at stage one with a clear error', async () => { + for (const harness of ['grok', 'devin']) { const w = world({ config: { ...config, fixLoop: { harness } } }); const { result } = await w.drive(); assert.equal(result.reason, 'needs_human'); - assert.match(JSON.stringify(result.detail), /no worker adapter/); - } -}); - -test('Devin refuses missing/older runtime metadata before review or fix work', async () => { - for (const agentClis of [undefined, [], ['claude', 'codex']]) { - const w = world({ config: { ...config, fixLoop: { harness: 'devin' } }, agentClis }); - const { result } = await w.drive(); - assert.equal(result.reason, 'needs_human'); - assert.match(JSON.stringify(result.detail), /requires a runtime advertising the native Devin adapter/); + assert.match(JSON.stringify(result.detail), /is not supported in land/); assert.equal(w.launches.length, 0); assert.equal(w.agents.length, 0); } }); test('each supported fix harness launches with its literal pinned model', async () => { - for (const [harness, model] of [['claude', 'claude-sonnet-5'], ['codex', 'gpt-5.6-sol'], ['devin', 'gpt-5.6-sol']] as const) { - const w = world({ config: { ...config, fixLoop: { harness } }, agentClis: ['claude', 'codex', 'devin'], + for (const [harness, model] of [['claude', 'claude-sonnet-5'], ['codex', 'gpt-5.6-sol']] as const) { + const w = world({ config: { ...config, fixLoop: { harness } }, adversarial: [[blocker('src/fix.ts', 'fix this')], []] }); await w.drive(); assert.equal(w.agents.length, 1); @@ -687,17 +674,6 @@ test('each supported fix harness launches with its literal pinned model', async } }); -test('Devin refuses an older or unknown child flows runtime before review work', async () => { - for (const flowsVersion of ['2.0.56', '2.0.57-beta.1', '2.00.057', '2.0.057', '3.0.0', '', 'not a version']) { - const w = world({ config: { ...config, fixLoop: { harness: 'devin' } }, agentClis: ['devin'], flowsVersion }); - const { result } = await w.drive(); - assert.equal(result.reason, 'needs_human'); - assert.match(JSON.stringify(result.detail), /flowsBin.*2.0.57/); - assert.equal(w.launches.length, 0); - assert.equal(w.agents.length, 0); - } -}); - test('a review lane that cannot launch its cli ends needs_human, not a fix round', async () => { const w = world({ adversarialExit: 1, reviewTail: 'REFUSED [invalid_spec] agent_cli_unresolved: codex login status exited non-zero' }); const { result } = await w.drive(); diff --git a/packages/sdk/src/authored-flow-executor.ts b/packages/sdk/src/authored-flow-executor.ts index 4cba89cb3..a2c36cbb6 100644 --- a/packages/sdk/src/authored-flow-executor.ts +++ b/packages/sdk/src/authored-flow-executor.ts @@ -1,5 +1,4 @@ import { assertAuthoredPromiseHooks } from './authored-runtime-capability.js'; -import { registeredAdapters } from './cli-adapter.js'; import { pluginHelpers } from './plugin-loader.js'; import { runPluginEffect } from './authored-plugin-effect.js'; import { createHash, randomUUID } from 'node:crypto'; @@ -644,9 +643,6 @@ export async function executeAuthoredFlow( }); const context: Ctx = { - capabilities: Object.freeze({ agentClis: Object.freeze( - Object.keys(registeredAdapters()).filter(kind => kind !== 'relayflows-wrapper-v1'), - ) }), ...createHelpers((call: HelperCall): Step => { const verb = `${call.provider}.${call.verb}`; assertParallelRunOnly(verb); diff --git a/packages/sdk/tests/authored-flow.test.ts b/packages/sdk/tests/authored-flow.test.ts index 97b383f89..4cb8a7789 100644 --- a/packages/sdk/tests/authored-flow.test.ts +++ b/packages/sdk/tests/authored-flow.test.ts @@ -802,20 +802,6 @@ describe('authored flow journal executor', () => { return client; } - it('advertises immutable native direct-agent adapters from the executing SDK', async () => { - const handle = flow('runtime-agent-adapters', async f => { - expect(f.capabilities?.agentClis).toEqual(['claude', 'codex', 'devin']); - expect(Object.isFrozen(f.capabilities)).toBe(true); - expect(Object.isFrozen(f.capabilities?.agentClis)).toBe(true); - expect(() => (f.capabilities!.agentClis as string[]).push('fake')).toThrow(TypeError); - f.done('success'); - }); - const client = await connectedClient('authored-adapter-capabilities-test'); - try { - await expect(executeAuthoredFlow(handle, client)).resolves.toMatchObject({ completionReason: 'success' }); - } finally { client.close(); } - }); - function commandsSince(index: number): string[] { return startedSpecs.slice(index).map((spec) => { const steps = spec['steps'] as Record[]; diff --git a/packages/sdk/tests/authored-node-runtime.test.ts b/packages/sdk/tests/authored-node-runtime.test.ts index f90ad3e1c..9c7a6bba2 100644 --- a/packages/sdk/tests/authored-node-runtime.test.ts +++ b/packages/sdk/tests/authored-node-runtime.test.ts @@ -93,20 +93,6 @@ async function entries(directory: string, runId: string) { } describe('Bun 1.4.x standalone → native Node authored lifecycle', () => { - it('advertises native direct-agent adapters inside the embedded Node runner', () => { - const f = fixture(` - const adapters = f.capabilities?.agentClis; - if (!adapters?.includes('devin') || adapters.includes('relayflows-wrapper-v1') - || !Object.isFrozen(adapters) || !Object.isFrozen(f.capabilities)) { - throw new Error('Native immutable Devin adapter metadata is unavailable'); - } - f.done('success'); - `); - const result = f.run(); - expect(result.status, result.stderr + result.stdout).toBe(0); - expect(JSON.parse(result.stdout)).toMatchObject({ completionReason: 'success' }); - }, 60_000); - it('runs a certified Promise.all group in parallel through the embedded Node runner', async () => { const f = fixture(''); writeFileSync(join(f.directory, 'case.flow.ts'), `import { flow } from '@relayflows/surface'; diff --git a/packages/sdk/tests/shipped-source-models.test.ts b/packages/sdk/tests/shipped-source-models.test.ts index bac894175..3c28ef96a 100644 --- a/packages/sdk/tests/shipped-source-models.test.ts +++ b/packages/sdk/tests/shipped-source-models.test.ts @@ -12,7 +12,6 @@ const MODELS: Record> = { codex: new Set(['gpt-5.6-sol']), 'cursor-agent': new Set(['gpt-5.6-sol-high']), grok: new Set(['grok-4.7']), - devin: new Set(['gpt-5.6-sol']), }; const DYNAMIC_PAIR_SOURCE_WAIVERS = new Map([ [ diff --git a/packages/surface/AUTHORING.md b/packages/surface/AUTHORING.md index 093732ff0..8257f2a3e 100644 --- a/packages/surface/AUTHORING.md +++ b/packages/surface/AUTHORING.md @@ -71,12 +71,8 @@ export interface TriggeredFlowHandle extends FlowHandle {} * context or execute a step, so all effects remain behind the journal client. */ export interface Ctx extends Helpers { - /** Runtime metadata and host-verified ports. Older runtimes may omit them. */ - readonly capabilities?: { - /** Native direct-agent adapter identities in this executing SDK. Not CLI installation, auth, or broker support. */ - readonly agentClis?: readonly string[]; - readonly cloud?: CloudCapabilities; - }; + /** Host-verified ports. Absent from direct/local runs and ordinary authored execution. */ + readonly capabilities?: { readonly cloud?: CloudCapabilities }; readonly mcp: Readonly Step>>>>; /** * Run a command. Resolves to its stdout tail, and a nonzero exit ends the @@ -148,8 +144,6 @@ export interface Ctx extends Helpers { ```ts export interface RunOptions { - /** Run environment secrets this command may receive by name. Default: none. */ - secrets?: string[]; /** Command lease: milliseconds or a duration such as "5m"; default 10m, maximum 15m. */ timeout?: string | number; /** @@ -202,8 +196,6 @@ export interface AgentOptions { * Resolves with completionReason: timeout. No default for direct; broker defaults to 60m. Requires maxIterations 1. */ timeout?: string | number; task: string; - /** Run environment secrets this agent may receive by name. Default: none. */ - secrets?: string[]; workspace?: string; /** Validated declaration only; not currently enforced (gate 8 / #442). */ permissions?: PermissionsSpec; @@ -296,8 +288,6 @@ export interface AgentResult { ```ts export interface LlmOptions { - /** Run environment secrets this model step may receive by name. Default: none. */ - secrets?: string[]; /** JSON Schema checked before the result is accepted by the journal. */ output: Record; cli?: string; diff --git a/packages/surface/src/context.ts b/packages/surface/src/context.ts index 1d9d43d1c..91cc8636e 100644 --- a/packages/surface/src/context.ts +++ b/packages/surface/src/context.ts @@ -166,12 +166,8 @@ export interface DoneOptions { * context or execute a step, so all effects remain behind the journal client. */ export interface Ctx extends Helpers { - /** Runtime metadata and host-verified ports. Older runtimes may omit them. */ - readonly capabilities?: { - /** Native direct-agent adapter identities in this executing SDK. Not CLI installation, auth, or broker support. */ - readonly agentClis?: readonly string[]; - readonly cloud?: CloudCapabilities; - }; + /** Host-verified ports. Absent from direct/local runs and ordinary authored execution. */ + readonly capabilities?: { readonly cloud?: CloudCapabilities }; readonly mcp: Readonly Step>>>>; /** * Run a command. Resolves to its stdout tail, and a nonzero exit ends the From d9be2c08dc6486d393d21f8cf54bfe2b6d76fd57 Mon Sep 17 00:00:00 2001 From: kjgbot Date: Mon, 2 Nov 2026 17:12:18 -0800 Subject: [PATCH 5/5] test(land): pin the complete credential recovery hint --- .../land-pinned-harnesses/verification.md | 181 +++++++++--------- examples/land/README.md | 2 +- examples/land/tests/flow.test.ts | 5 +- 3 files changed, 95 insertions(+), 93 deletions(-) diff --git a/evidence/land-pinned-harnesses/verification.md b/evidence/land-pinned-harnesses/verification.md index 53cbabc7f..fe398a50a 100644 --- a/evidence/land-pinned-harnesses/verification.md +++ b/evidence/land-pinned-harnesses/verification.md @@ -7,7 +7,8 @@ new SDK/Surface capability API and no additional release dependency in this PR. The land-specific model waiver is removed. Fix calls use literal supported pairs: Claude/claude-sonnet-5 and Codex/gpt-5.6-sol. parseLandConfig refuses configured fixLoop.model values as not supported yet. The needs_human test -asserts FLOW_OPENAI_API_KEY exactly. No land deployment was changed. +asserts the complete authentication error, including the instruction to deliver +FLOW_OPENAI_API_KEY to flow runs. No land deployment was changed. ## Reproduce @@ -30,7 +31,7 @@ prerequisites on another machine. Working directory: repository root. ```sh -set -o pipefail; { TMPDIR=/Users/khaliqgant/.cache/devin-harness npm run typecheck --prefix examples/land && TMPDIR=/Users/khaliqgant/.cache/devin-harness npm test --prefix examples/land; } 2>&1 | tee /Users/khaliqgant/.cache/devin-harness/land-claude-codex-only.log +set -o pipefail; { TMPDIR=/Users/khaliqgant/.cache/devin-harness npm run typecheck --prefix examples/land && TMPDIR=/Users/khaliqgant/.cache/devin-harness npm test --prefix examples/land; } 2>&1 | tee /Users/khaliqgant/.cache/devin-harness/land-claude-codex-only-final.log ``` ```text @@ -42,91 +43,91 @@ set -o pipefail; { TMPDIR=/Users/khaliqgant/.cache/devin-harness npm run typeche > test > node --experimental-strip-types --test tests/*.test.ts -✔ defaults: mergePolicy is shadow, placeholders are the spec proposals (1.357ms) -✔ a full relay-desktop shaped config round-trips (0.234875ms) -✔ model overrides are explicitly unsupported for every harness (0.942709ms) -✔ refusals: unknown keys, bad enums, unsafe paths, out-of-range numbers (1.429458ms) -✔ JSON schema matches the runtime validator: keys, required, enums and defaults (0.192791ms) -✔ every PLACEHOLDER default names its open question (0.643625ms) -✔ clean shadow run: one hosted run per stage, E would dispatch, squash plan written, never pushed (8.6635ms) -✔ intent isolation: only context review is given intentFile; the adversarial fleet never sees it (4.029333ms) -✔ fix loop: the fixup head is carried between runs in land.bundle, then the gate reruns clean (1.453834ms) -✔ non-convergence: a finding surviving 2 rounds ends needs_human with a ≤150-byte ask (4.942166ms) -✔ formatter guard: a fix round touching files outside change ∪ findings ends needs_human (1.094542ms) -✔ changelog required with no new Unreleased bullet becomes a finding for the fix loop (2.209084ms) -✔ stage D: a moved base rebases and regates; a conflict ends needs_human (2.662709ms) -✔ superseded: the land ref moved → cancelled before any work in that run (0.173667ms) -✔ idempotent cursor: a retried stage whose state write landed is a no-op; a reaped one reruns (0.604625ms) -✔ stage E in shadow: records what it would dispatch, launches nothing, moves on to F (0.450083ms) -✔ the removed githubGateInShadow flag is refused as an unknown key, before any work (0.136542ms) -✔ refusals: no state outside A-adversarial, approval mode, state or intent inside the checkout, wrong run (0.442334ms) -✔ runId: an explicit Cloud id names the Land-Run trailer and every completion detail, not the stateDir path (0.396375ms) -✔ runId: absent, it falls back to the stateDir segment for local use (0.45225ms) -✔ runId: a malformed id, or a stateDir segment that is not one, is refused before any work (0.134167ms) -✔ runId: a stage invoked with another run id is refused and leaves the state alone (0.134666ms) -✔ $HOME paths: expanded from the run's own HOME, read once per run through a journaled step (2.149583ms) -✔ $HOME paths: a trailing slash on HOME is normalized (0.464834ms) -✔ $HOME paths: absolute paths never read HOME (1.196292ms) -✔ $HOME paths: refused when HOME is unset, relative, or unsafe (0.241625ms) -✔ $HOME paths: only the exact $HOME/ prefix; no other variable, form or .. segment (0.274792ms) -✔ $HOME paths: the outside-checkout check runs on the expanded path (0.096458ms) -✔ absolute paths: a . or .. in any segment is refused, including the first (/../x) (0.143458ms) -✔ the base fetch deepens a shallow checkout and names only the base refspec (248.571333ms) -✔ auto: dispatch overruns, the next E awaits the pushed snapshot, F squash-pushes and lands (3.625417ms) -✔ auto: a gate that finishes inside the dispatch window applies its verdict in the same run (0.547583ms) -✔ auto: red GitHub gate goes to the next fix round (0.880583ms) -✔ auto: a failed dispatched run is red to the fix loop (2.904625ms) -✔ auto: still-pending dispatched runs keep E as the cursor across stage runs (2.142916ms) -✔ auto: F goes back to D on non-fast-forward (1.224458ms) -✔ auto: a moved base at F goes back to D and regates (2.435791ms) -✔ auto: a non-FF, non-permission push failure ends needs_human (1.185792ms) -✔ auto and shadow: the land harness is the review fleets' clis and the fix agent's cli (1.547375ms) -✔ auto: a stage reaped after the push records the landed commit instead of landing twice (0.588ms) -✔ auto: F refuses to squash a head that never contained the base (0.462292ms) -✔ auto: D rebases a head that never contained an unmoved base, then lands (1.484541ms) -✔ auto: three red GitHub gates escalate stuck_finding instead of alternating past the stall checks (1.807917ms) -✔ auto: a run set still growing between polls stays pending; a stable set gives the verdict (0.683209ms) -✔ auto: a stale completed run older than the dispatch bound cannot produce a verdict (0.3315ms) -✔ auto and shadow: a non-default harness is the review fleets' clis and the fix agent's cli (0.566958ms) -✔ a harness unsupported in land fails at stage one with a clear error (0.127334ms) -✔ each supported fix harness launches with its literal pinned model (2.541708ms) -✔ a review lane that cannot launch its cli ends needs_human, not a fix round (0.40925ms) -✔ codex without a login in the stage sandbox ends needs_human at preflight (0.748792ms) -✔ auto: a push-denied git credential fails preflight before any stage runs (0.134292ms) -✔ convergence: a clean gate proceeds, even past the budget or cap (0.860125ms) -✔ convergence: findings with rounds and budget left ask for a fix (0.093375ms) -✔ convergence: round cap (0.06775ms) -✔ convergence: the same finding id surviving 2 consecutive rounds (0.449292ms) -✔ convergence: finding count not decreasing for 2 rounds (0.196667ms) -✔ convergence: budget wins over every other rule (0.134333ms) -✔ convergence: refuses an empty history (1.591541ms) -✔ escalation: exact template when it fits (1.319708ms) -✔ escalation: a realistic UUID run URL drops the repo owner first (0.324458ms) -✔ escalation: over 150 bytes truncates the summary, keeps the ask and URL intact (0.455875ms) -✔ escalation: counts bytes, not code points, and never splits a character (0.17475ms) -✔ escalation: a URL that cannot fit is refused, never cut (0.428791ms) -✔ formatter guard: allows change files and finding files (0.386833ms) -✔ formatter guard: rejects files outside change ∪ findings and flags cargo fmt churn (0.142291ms) -✔ finding ids survive line moves and the verifier's "raised before" marker (0.952417ms) -✔ changelog: requires a new bullet under ## Unreleased (0.774167ms) -✔ isInside (0.342375ms) -✔ squash plan carries the trailers and is never marked pushed (0.28475ms) -✔ expandHome: only the literal $HOME/ prefix, against an absolute HOME (0.572208ms) -✔ clean run: A-adversarial → A-context → B → D → E (would dispatch) → F → landed (1.670667ms) -✔ E in shadow always reports would-dispatch and moves on to F, without closing a gate (0.177208ms) -✔ the gate unions all three lanes and feeds the fix round (0.154833ms) -✔ convergence stop: the same finding id surviving 2 consecutive rounds (0.256042ms) -✔ convergence stop: count not decreasing for 2 rounds (0.193125ms) -✔ convergence stop: round cap and wallclock budget (0.171791ms) -✔ formatter guard breach and rebase conflict end needs_human; a clean rebase regates (0.364667ms) -✔ superseded: the land ref moved (or was deleted) → cancelled, from any stage (0.232166ms) -✔ pure and fail-closed: no mutation, wrong result kinds and terminal states refused (0.265541ms) -✔ idempotent: the same state and result always give the same next state (0.167291ms) -✔ land-state.json round-trips and refuses other versions (2.870458ms) -✔ auto E: pending keeps the cursor at E, green moves to F, red feeds the fix loop (1.05975ms) -✔ auto E: a red gate still escalates on round cap (0.735666ms) -✔ auto F: pushed lands with the commit; moved and non_ff go back to D (0.526042ms) -✔ mode discipline: shadow outcomes refuse auto and vice versa (0.513084ms) +✔ defaults: mergePolicy is shadow, placeholders are the spec proposals (0.921917ms) +✔ a full relay-desktop shaped config round-trips (0.174333ms) +✔ model overrides are explicitly unsupported for every harness (0.278208ms) +✔ refusals: unknown keys, bad enums, unsafe paths, out-of-range numbers (0.275083ms) +✔ JSON schema matches the runtime validator: keys, required, enums and defaults (0.123583ms) +✔ every PLACEHOLDER default names its open question (0.369125ms) +✔ clean shadow run: one hosted run per stage, E would dispatch, squash plan written, never pushed (6.041333ms) +✔ intent isolation: only context review is given intentFile; the adversarial fleet never sees it (0.712541ms) +✔ fix loop: the fixup head is carried between runs in land.bundle, then the gate reruns clean (1.216542ms) +✔ non-convergence: a finding surviving 2 rounds ends needs_human with a ≤150-byte ask (1.514542ms) +✔ formatter guard: a fix round touching files outside change ∪ findings ends needs_human (0.384958ms) +✔ changelog required with no new Unreleased bullet becomes a finding for the fix loop (0.666125ms) +✔ stage D: a moved base rebases and regates; a conflict ends needs_human (0.792333ms) +✔ superseded: the land ref moved → cancelled before any work in that run (0.119ms) +✔ idempotent cursor: a retried stage whose state write landed is a no-op; a reaped one reruns (0.55225ms) +✔ stage E in shadow: records what it would dispatch, launches nothing, moves on to F (0.42ms) +✔ the removed githubGateInShadow flag is refused as an unknown key, before any work (0.130667ms) +✔ refusals: no state outside A-adversarial, approval mode, state or intent inside the checkout, wrong run (0.419125ms) +✔ runId: an explicit Cloud id names the Land-Run trailer and every completion detail, not the stateDir path (0.384334ms) +✔ runId: absent, it falls back to the stateDir segment for local use (0.41775ms) +✔ runId: a malformed id, or a stateDir segment that is not one, is refused before any work (0.137209ms) +✔ runId: a stage invoked with another run id is refused and leaves the state alone (1.049667ms) +✔ $HOME paths: expanded from the run's own HOME, read once per run through a journaled step (1.374542ms) +✔ $HOME paths: a trailing slash on HOME is normalized (0.105166ms) +✔ $HOME paths: absolute paths never read HOME (0.311833ms) +✔ $HOME paths: refused when HOME is unset, relative, or unsafe (0.141209ms) +✔ $HOME paths: only the exact $HOME/ prefix; no other variable, form or .. segment (0.1975ms) +✔ $HOME paths: the outside-checkout check runs on the expanded path (0.074583ms) +✔ absolute paths: a . or .. in any segment is refused, including the first (/../x) (0.145917ms) +✔ the base fetch deepens a shallow checkout and names only the base refspec (198.126083ms) +✔ auto: dispatch overruns, the next E awaits the pushed snapshot, F squash-pushes and lands (1.679084ms) +✔ auto: a gate that finishes inside the dispatch window applies its verdict in the same run (0.477333ms) +✔ auto: red GitHub gate goes to the next fix round (0.797417ms) +✔ auto: a failed dispatched run is red to the fix loop (0.950125ms) +✔ auto: still-pending dispatched runs keep E as the cursor across stage runs (0.90975ms) +✔ auto: F goes back to D on non-fast-forward (0.529208ms) +✔ auto: a moved base at F goes back to D and regates (0.985625ms) +✔ auto: a non-FF, non-permission push failure ends needs_human (0.48525ms) +✔ auto and shadow: the land harness is the review fleets' clis and the fix agent's cli (0.629458ms) +✔ auto: a stage reaped after the push records the landed commit instead of landing twice (0.400292ms) +✔ auto: F refuses to squash a head that never contained the base (0.371416ms) +✔ auto: D rebases a head that never contained an unmoved base, then lands (1.345458ms) +✔ auto: three red GitHub gates escalate stuck_finding instead of alternating past the stall checks (1.092833ms) +✔ auto: a run set still growing between polls stays pending; a stable set gives the verdict (0.574958ms) +✔ auto: a stale completed run older than the dispatch bound cannot produce a verdict (0.302916ms) +✔ auto and shadow: a non-default harness is the review fleets' clis and the fix agent's cli (0.483208ms) +✔ a harness unsupported in land fails at stage one with a clear error (0.107875ms) +✔ each supported fix harness launches with its literal pinned model (1.228125ms) +✔ a review lane that cannot launch its cli ends needs_human, not a fix round (0.131459ms) +✔ codex without a login in the stage sandbox ends needs_human at preflight (0.379334ms) +✔ auto: a push-denied git credential fails preflight before any stage runs (0.101041ms) +✔ convergence: a clean gate proceeds, even past the budget or cap (1.616583ms) +✔ convergence: findings with rounds and budget left ask for a fix (0.199166ms) +✔ convergence: round cap (0.136458ms) +✔ convergence: the same finding id surviving 2 consecutive rounds (0.262041ms) +✔ convergence: finding count not decreasing for 2 rounds (0.151959ms) +✔ convergence: budget wins over every other rule (0.114375ms) +✔ convergence: refuses an empty history (0.41975ms) +✔ escalation: exact template when it fits (0.570625ms) +✔ escalation: a realistic UUID run URL drops the repo owner first (0.157166ms) +✔ escalation: over 150 bytes truncates the summary, keeps the ask and URL intact (0.435208ms) +✔ escalation: counts bytes, not code points, and never splits a character (0.099542ms) +✔ escalation: a URL that cannot fit is refused, never cut (0.087542ms) +✔ formatter guard: allows change files and finding files (0.136833ms) +✔ formatter guard: rejects files outside change ∪ findings and flags cargo fmt churn (0.083416ms) +✔ finding ids survive line moves and the verifier's "raised before" marker (0.257334ms) +✔ changelog: requires a new bullet under ## Unreleased (0.190833ms) +✔ isInside (0.072125ms) +✔ squash plan carries the trailers and is never marked pushed (0.113459ms) +✔ expandHome: only the literal $HOME/ prefix, against an absolute HOME (0.205416ms) +✔ clean run: A-adversarial → A-context → B → D → E (would dispatch) → F → landed (1.542917ms) +✔ E in shadow always reports would-dispatch and moves on to F, without closing a gate (0.292125ms) +✔ the gate unions all three lanes and feeds the fix round (0.1975ms) +✔ convergence stop: the same finding id surviving 2 consecutive rounds (0.273583ms) +✔ convergence stop: count not decreasing for 2 rounds (0.214166ms) +✔ convergence stop: round cap and wallclock budget (1.179625ms) +✔ formatter guard breach and rebase conflict end needs_human; a clean rebase regates (0.765542ms) +✔ superseded: the land ref moved (or was deleted) → cancelled, from any stage (0.568375ms) +✔ pure and fail-closed: no mutation, wrong result kinds and terminal states refused (0.735208ms) +✔ idempotent: the same state and result always give the same next state (0.432541ms) +✔ land-state.json round-trips and refuses other versions (0.659292ms) +✔ auto E: pending keeps the cursor at E, green moves to F, red feeds the fix loop (0.370541ms) +✔ auto E: a red gate still escalates on round cap (0.176583ms) +✔ auto F: pushed lands with the commit; moved and non_ff go back to D (0.145875ms) +✔ mode discipline: shadow outcomes refuse auto and vice versa (0.20075ms) ℹ tests 85 ℹ suites 0 ℹ pass 85 @@ -134,12 +135,14 @@ set -o pipefail; { TMPDIR=/Users/khaliqgant/.cache/devin-harness npm run typeche ℹ cancelled 0 ℹ skipped 0 ℹ todo 0 -ℹ duration_ms 511.386833 +ℹ duration_ms 375.197833 ``` ## Full shipped-source model-pin gate -Working directory: packages/sdk. +Working directory: packages/sdk. Captured at `23a1bb2a`; the subsequent changes +only clarify documentation and tighten the credential-hint unit assertion. +The shipped source and model gate are unchanged. ```sh set -o pipefail; TMPDIR=/Users/khaliqgant/.cache/devin-harness node node_modules/vitest/vitest.mjs run tests/shipped-source-models.test.ts 2>&1 | tee /Users/khaliqgant/.cache/devin-harness/land-claude-codex-model-gate.log diff --git a/examples/land/README.md b/examples/land/README.md index 23da52376..56d6b6d68 100644 --- a/examples/land/README.md +++ b/examples/land/README.md @@ -194,7 +194,7 @@ These defaults are the spec's proposals, not decisions; each is marked | --- | --- | --- | | `fixLoop.maxRounds` | 4 | Q2 | | `fixLoop.wallclockMinutes` | 180 | Q2 | -| `fixLoop.harness` | `codex` (also the review flows' `clis`; `claude`, `grok` and `devin` accepted) | Q2 | +| `fixLoop.harness` | `codex` (also the review flows' `clis`); `claude` supported; `grok` and `devin` reserved and refused | Q2 | | `fixLoop.model` | unsupported; omit | Fix agents pin Claude `claude-sonnet-5` and Codex `gpt-5.6-sol` | | `mergePolicy.squashAuthor` | `session-human` | Q3 | | `landRef` | `land/{user}/{sha7}` | Q5 | diff --git a/examples/land/tests/flow.test.ts b/examples/land/tests/flow.test.ts index 60f9b1cda..048644b34 100644 --- a/examples/land/tests/flow.test.ts +++ b/examples/land/tests/flow.test.ts @@ -686,9 +686,8 @@ test('codex without a login in the stage sandbox ends needs_human at preflight', const w = world({ codexLoginFails: true }); const { result } = await w.drive(); assert.equal(result.reason, 'needs_human'); - const detail = JSON.stringify(result.detail); - assert.match(detail, /not authenticated/); - assert.match(detail, /FLOW_OPENAI_API_KEY/); + assert.equal(result.detail.detail, + 'fixLoop.harness "codex" is not authenticated in the stage sandbox (no connected credential and no delivered OPENAI_API_KEY — deliver FLOW_OPENAI_API_KEY to flow runs)'); assert.equal(w.launches.length, 0, 'stage one stopped: no review fleet ran'); assert.equal(w.agents.length, 0, 'stage one stopped: no fix agent ran'); });