test: cover agentrun resource command followups

This commit is contained in:
Codex
2026-06-11 03:35:34 +00:00
parent 27ec1c04a5
commit 0042b7dc85
+22
View File
@@ -91,6 +91,25 @@ assertCondition(
"AgentRun CLI bridge must not collapse official AgentRun failures into bridge failures",
);
assertCondition(
agentRunSource.includes("const resourceArgs = action === undefined ? actionArgs : [action, ...actionArgs];")
&& agentRunSource.includes("const options = parseResourceOptions(resourceArgs);")
&& agentRunSource.includes("const file = options.file ?? requiredContext(\"apply\", \"-f <file>|-\");"),
"AgentRun resource parser must parse verb-level flags such as apply -f - before requiring runtime config",
);
assertCondition(
agentRunSource.includes("const effectiveLimit = options.tail ?? options.limit;")
&& agentRunSource.includes("return renderEventLike(command, result, { ...options, limit: effectiveLimit }, \"Log\""),
"AgentRun logs must map --tail N into the low-noise page limit and preserve pagination commands",
);
assertCondition(
agentRunSource.includes("function rerunWithoutDryRun(command: string): string")
&& agentRunSource.includes("options.dryRun ? [rerunWithoutDryRun(command)] : undefined"),
"AgentRun dry-run resource mutations must return resource-command follow-up instead of official bridge internals",
);
console.log(JSON.stringify({
ok: true,
checks: [
@@ -104,5 +123,8 @@ console.log(JSON.stringify({
"AgentRun control-plane status degrades empty runtime JSON snippets",
"AgentRun CLI bridge selects remote frontend backend in runner/no-Docker environments",
"AgentRun CLI bridge keeps AgentRun failures distinct from bridge failures",
"AgentRun resource parser supports apply -f -",
"AgentRun logs tail controls page limit",
"AgentRun dry-run mutations keep resource-command follow-up",
],
}));