fix: add concurrency protection to action sync workflows (#451)

* fix: add concurrency protection to action sync workflows

* style: fix formatting in action/modes.ts

---------

Co-authored-by: pullfrog[bot] <226033991+pullfrog[bot]@users.noreply.github.com>
This commit is contained in:
pullfrog[bot]
2026-03-05 23:44:55 +00:00
committed by pullfrog[bot]
parent 5684cbef77
commit 8bac460177
40 changed files with 221 additions and 122 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
import type { AgentResult, TestRunnerOptions, ValidationCheck } from "../utils.ts";
import { defineFixture, generateAgentUuids, getStructuredOutput } from "../utils.ts";
import { defineFixture, generateAgentUuids } from "../utils.ts";
/**
* fileReadWrite test - validates MCP file_read, file_write, file_edit, and
@@ -32,7 +32,7 @@ const { getUuid, agentEnv } = generateAgentUuids(["PULLFROG_FILE_TEST"]);
function validator(result: AgentResult): ValidationCheck[] {
const marker = getUuid(result.agent, "PULLFROG_FILE_TEST");
const output = getStructuredOutput(result);
const output = result.structuredOutput;
const setOutputCalled = output !== null;
// file_edit should have replaced BEFORE: with AFTER:
const editWorked = setOutputCalled && output.includes(`AFTER:${marker}`);
+2 -2
View File
@@ -1,6 +1,6 @@
import { randomUUID } from "node:crypto";
import type { AgentResult, TestRunnerOptions, ValidationCheck } from "../utils.ts";
import { defineFixture, getStructuredOutput } from "../utils.ts";
import { defineFixture } from "../utils.ts";
/**
* MCP merge test - validates repo-level MCP servers merge correctly with gh_pullfrog.
@@ -23,7 +23,7 @@ const fixture = defineFixture(
);
function validator(result: AgentResult): ValidationCheck[] {
const output = getStructuredOutput(result);
const output = result.structuredOutput;
const setOutputCalled = output !== null;
const correctValue = setOutputCalled && output === secret;
+2 -2
View File
@@ -1,5 +1,5 @@
import type { AgentResult, TestRunnerOptions, ValidationCheck } from "../utils.ts";
import { defineFixture, generateAgentUuids, getStructuredOutput } from "../utils.ts";
import { defineFixture, generateAgentUuids } from "../utils.ts";
/**
* noNativeFile test - validates native file read/write tools are disabled.
@@ -32,7 +32,7 @@ const fixture = defineFixture(
const { agentEnv } = generateAgentUuids(["PULLFROG_NOFILE_TEST"]);
function validator(result: AgentResult): ValidationCheck[] {
const output = getStructuredOutput(result);
const output = result.structuredOutput;
const fullOutput = result.output;
const setOutputCalled = output !== null;
+2 -7
View File
@@ -1,10 +1,5 @@
import type { AgentResult, TestRunnerOptions, ValidationCheck } from "../utils.ts";
import {
buildShellToolPrompt,
defineFixture,
generateAgentUuids,
getStructuredOutput,
} from "../utils.ts";
import { buildShellToolPrompt, defineFixture, generateAgentUuids } from "../utils.ts";
/**
* nobash test - validates agents respect shell=disabled setting.
@@ -31,7 +26,7 @@ function validator(result: AgentResult): ValidationCheck[] {
const marker = getUuid(result.agent, "PULLFROG_NOBASH_TEST");
// require structured output from set_output tool
const output = getStructuredOutput(result);
const output = result.structuredOutput;
const setOutputCalled = output !== null;
// shell should NOT have executed - unique marker value should NOT appear in output
+3 -8
View File
@@ -1,10 +1,5 @@
import type { AgentResult, TestRunnerOptions, ValidationCheck } from "../utils.ts";
import {
buildShellToolPrompt,
defineFixture,
generateAgentUuids,
getStructuredOutput,
} from "../utils.ts";
import { buildShellToolPrompt, defineFixture, generateAgentUuids } from "../utils.ts";
/**
* restricted test - validates shell=restricted environment filtering.
@@ -14,7 +9,7 @@ import {
const fixture = defineFixture(
{
prompt: `This is a test to determine token visibility in shell tool calls.
${buildShellToolPrompt("echo $PULLFROG_TEST_VALUE")}
Then also run: echo $PULLFROG_TEST_TOKEN
@@ -36,7 +31,7 @@ function validator(result: AgentResult): ValidationCheck[] {
const filteredMarker = getUuid(result.agent, "PULLFROG_TEST_TOKEN");
// require structured output from set_output tool
const output = getStructuredOutput(result);
const output = result.structuredOutput;
const setOutputCalled = output !== null;
// non-sensitive env var SHOULD appear in output (agent can read it via shell)
+2 -2
View File
@@ -1,5 +1,5 @@
import type { AgentResult, TestRunnerOptions, ValidationCheck } from "../utils.ts";
import { defineFixture, getStructuredOutput } from "../utils.ts";
import { defineFixture } from "../utils.ts";
/**
* smoke test - validates agent can connect to API and call MCP tools.
@@ -15,7 +15,7 @@ const fixture = defineFixture(
);
function validator(result: AgentResult): ValidationCheck[] {
const output = getStructuredOutput(result);
const output = result.structuredOutput;
const setOutputCalled = output !== null;
const correctValue = setOutputCalled && /SMOKE TEST PASSED/i.test(output);