76879b27ec
* docker testing rewrite: bake the image, drop the allowlist, kill the quoting - new `pnpm gha <script>` wrapper. one entry point for running any node script in the GHA-like container; replaces the runtime apt-get + useradd + chown ceremony in `action/utils/docker.ts`. - `action/Dockerfile` bakes ubuntu:24.04 + node 24 + gh + jq + sudo + testuser at uid 1000. `action/docker-entrypoint.sh` remaps to the host uid/gid and `exec`s the requested command — no `bash -c` nesting, no `escapeForDoubleQuotes`. - env passthrough: full `process.env` (+ `.env` via dotenv) flows through `--env-file`, multi-line values via `-e` fallback. drops `EnvFilterMode` / `testEnvAllowList`. - image rebuild is content-hash gated on Dockerfile + entrypoint; volume is versioned by hash so a stale `node_modules` cache from an old image can't poison a new one. - `action/play.ts` slimmed to a CLI; `run()` extracted to `action/utils/runFixture.ts`. drops the `--local` / `PLAY_LOCAL` dual mode in favor of explicit `play:local` / `runtest:local` scripts. - `action/test/run.ts` no longer self-relaunches into docker — that's `gha`'s job now. - `action/test/coverage.ts` `ALWAYS_RUN_ALL` updated to track the new files. - `wiki/docker.md` rewritten (243 → 105 lines). `wiki/action-tests.md`, `wiki/billing.md`, `wiki/adversarial.md`, `README.md`, `AGENTS.md` all updated to drop `--local` / `PLAY_LOCAL` references. verified end-to-end: `pnpm play` runs the default fixture against pullfrog/scratch, exit 0; `sudo unshare --pid` still works inside the container; `pnpm runtest` boots through the wrapper. * gha: address review feedback + 3 related issues found locally review-flagged: - bare `pnpm gha --build` now builds the image and exits 0 (was printing help and exiting 1 — docs claimed it was a valid standalone) - `initVolumeOwnership` skipped when the named volume already exists; saves the ~240ms `docker run … chown` on every warm invocation - `GIT_SSH_COMMAND` gate widened to any `id_*` private key (was hard- coded to `id_rsa`, leaving ed25519-only linux contributors with the default ssh config). dropped `-i` so ssh picks whichever key exists - new `action/.dockerignore` — partial mitigation noted: BuildKit (default since docker 23) only sends files referenced by the Dockerfile (~42B in practice), so the perf concern is mostly hypothetical. file is still worth keeping for `DOCKER_BUILDKIT=0` fallback and as documented intent for future `COPY . .` additions related issues found while validating locally: - `parseArgs` now stops flag-parsing at the first positional (or literal `--`); `pnpm gha test/run.ts --build` previously intercepted `--build` as a gha flag instead of forwarding to `test/run.ts` - new `pnpm gha --clean` command prunes orphan `pullfrog-gha:*` images and `pullfrog-gha-node-modules-*` volumes whose hash doesn't match the current Dockerfile (each Dockerfile/entrypoint edit creates a fresh hash and orphans the prior pair, ~600MB + ~200MB each — without a cleaner they accumulate silently) - `--shell` without a TTY now fails fast with an actionable message before docker is invoked, instead of producing the confusing `the input device is not a TTY` from docker run wiki updated: documents `--clean`, the parseArgs passthrough rule, and a new "Reclaiming disk" section. * gha: fidelity, flexibility, and signal-safety improvements investigated local fidelity vs the real GHA ubuntu-24.04 runner and addressed the gaps that have actually bitten contributors or could. fidelity (image now matches GHA closer): - bake build-essential, wget, xz-utils, file alongside the existing toolset. gh, jq, git, python3, sudo, ssh, build-essential, wget, xz, file, unzip, curl all present. native module builds (node-gyp, any package missing arm64 prebuilts) now work; common agent shell calls don't hit ENOENT - `host.docker.internal:host-gateway` flag wires the host into the container's DNS on linux (macOS Docker Desktop bakes it in). lets scripts that hit a local dev server use `API_URL=http://host.docker. internal:3100` and work identically on both platforms - `--init` makes tini PID 1, fixing signal forwarding during the pre-exec warmup window (Ctrl-C was previously taking up to 10s to tear down because bash-as-PID-1 swallowed the signal) - pnpm version is correctly pinned via the workspace's `packageManager` field — corepack resolves it at install time; verified via the new `--doctor` command flexibility (new affordances): - `pnpm gha --doctor` runs an inside-the-container fidelity audit: os + arch + node/pnpm/python versions, version snapshots of every baked tool, env vars (CI, HOME, TMPDIR), uid/gid, and the host.docker.internal resolution. useful for "works in CI fails locally" or vice versa - `pnpm gha --build --no-cache` busts the docker layer cache when an apt mirror, base image, or external download has changed upstream - entrypoint's `pnpm install` warmup is now wrapped in a `flock` on a file in the shared node_modules volume — concurrent `pnpm gha` invocations (e.g. play in one terminal, runtest in another) serialize their install instead of racing docs: - new "Gaps (known)" section in wiki/docker.md explicitly calling out the things this system can't do yet, including the missing `uses: ./action` semantics gap that `.github/workflows/action-gha-e2e-adhoc.yml` currently fills via GHA only (designing a local `pnpm gha-action <fixture>` is on the roadmap), service containers, parallel-run sharing, and arch differences (arm64 vs amd64) * docs: audit + corrections after testing fronts self-audit pass for stale references and incomplete pointers: - wiki/browser.md: `Docker (node:24)` → `pnpm gha container (ubuntu:24.04)`. the substance was right (chrome not preinstalled) but the base image reference was stale. - wiki/docker.md: the "Permission errors" troubleshooting line claimed the node_modules volume is chowned on every run; now correctly says "owned by the host uid on first creation; warm runs skip the chown" to match the actual behavior after the initVolumeOwnership fix. - wiki/action-tests.md: `API_URL` env-var doc now mentions BOTH paths (`localhost:` from play:local, `host.docker.internal:` from inside the container). Proxy/router recipe now shows both invocations side-by-side instead of saying "must use play:local". - wiki/billing.md: same dual-recipe update for the loop-including-the- action proxy walkthrough. - gha.ts header: expanded the usage block to include --clean / --doctor / --no-cache / --shell-TTY, added the host.docker.internal note, and pointed at wiki/docker.md for design rationale. self-document check: a future agent landing on this code can answer "how do I run a fixture / debug in shell / add a tool / diagnose fidelity / reach a local dev server" purely from gha.ts header + wiki/docker.md without spelunking through the entrypoint or git history.
101 lines
2.9 KiB
JSON
101 lines
2.9 KiB
JSON
{
|
|
"name": "pullfrog",
|
|
"version": "0.1.8",
|
|
"type": "module",
|
|
"bin": {
|
|
"pullfrog": "dist/cli.mjs",
|
|
"pullfrog-dev": "dist/cli.mjs",
|
|
"pf": "dist/cli.mjs"
|
|
},
|
|
"files": [
|
|
"dist/"
|
|
],
|
|
"scripts": {
|
|
"test": "vitest",
|
|
"test:catalog": "vitest run --config vitest.main.config.ts",
|
|
"typecheck": "tsc --noEmit",
|
|
"build": "node esbuild.config.js && tsc -p tsconfig.exports.json",
|
|
"check:entrypoints": "node scripts/check-entrypoint-imports.ts",
|
|
"gha": "node gha.ts",
|
|
"play": "node gha.ts play.ts",
|
|
"play:local": "node play.ts",
|
|
"runtest": "node gha.ts test/run.ts",
|
|
"runtest:local": "node test/run.ts",
|
|
"scratch": "node scratch.ts",
|
|
"upDeps": "pnpm up --latest",
|
|
"lock": "pnpm install --no-frozen-lockfile",
|
|
"prepare": "cd .. && husky"
|
|
},
|
|
"devDependencies": {
|
|
"@actions/core": "^1.11.1",
|
|
"@anthropic-ai/claude-code": "2.1.112",
|
|
"@ark/fs": "0.56.0",
|
|
"@ark/util": "0.56.0",
|
|
"@clack/prompts": "^1.2.0",
|
|
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
"@octokit/plugin-throttling": "^11.0.3",
|
|
"@octokit/rest": "^22.0.0",
|
|
"@octokit/webhooks-types": "^7.6.1",
|
|
"@standard-schema/spec": "1.1.0",
|
|
"@toon-format/toon": "^1.0.0",
|
|
"@types/node": "^24.7.2",
|
|
"@types/semver": "^7.7.1",
|
|
"@types/turndown": "^5.0.5",
|
|
"agent-browser": "0.25.4",
|
|
"ajv": "^8.18.0",
|
|
"arg": "^5.0.2",
|
|
"arkregex": "0.0.5",
|
|
"arktype": "2.2.0",
|
|
"dotenv": "^17.2.3",
|
|
"esbuild": "^0.25.9",
|
|
"execa": "^9.6.0",
|
|
"fastmcp": "^3.34.0",
|
|
"file-type": "^21.3.0",
|
|
"husky": "^9.0.0",
|
|
"opencode-ai": "1.1.56",
|
|
"package-manager-detector": "^1.6.0",
|
|
"picocolors": "^1.1.1",
|
|
"semver": "^7.7.3",
|
|
"skills": "1.4.9",
|
|
"table": "^6.9.0",
|
|
"turndown": "^7.2.0",
|
|
"typescript": "^5.9.3",
|
|
"vitest": "^4.0.17",
|
|
"yaml": "^2.8.2"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/pullfrog/pullfrog.git"
|
|
},
|
|
"keywords": [
|
|
"github-actions",
|
|
"ai-coding-agent",
|
|
"code-review"
|
|
],
|
|
"author": "Pullfrog <support@pullfrog.com>",
|
|
"license": "MIT",
|
|
"bugs": {
|
|
"url": "https://github.com/pullfrog/pullfrog/issues"
|
|
},
|
|
"homepage": "https://github.com/pullfrog/pullfrog#readme",
|
|
"main": "./dist/index.js",
|
|
"module": "./dist/index.js",
|
|
"types": "./dist/index.d.ts",
|
|
"exports": {
|
|
".": {
|
|
"@pullfrog/source": "./index.ts",
|
|
"types": "./dist/index.d.ts",
|
|
"import": "./dist/index.js",
|
|
"default": "./dist/index.js"
|
|
},
|
|
"./internal": {
|
|
"@pullfrog/source": "./internal/index.ts",
|
|
"types": "./dist/internal/index.d.ts",
|
|
"import": "./dist/internal.js",
|
|
"default": "./dist/internal.js"
|
|
},
|
|
"./package.json": "./package.json"
|
|
},
|
|
"packageManager": "pnpm@10.27.0+sha512.72d699da16b1179c14ba9e64dc71c9a40988cbdc65c264cb0e489db7de917f20dcf4d64d8723625f2969ba52d4b7e2a1170682d9ac2a5dcaeaab732b7e16f04a"
|
|
}
|