WIP: Harness#201
Draft
petergam wants to merge 11 commits into
Draft
Conversation
Vendors the banzai Codex-agent harness (previously .github/actions/harness in framna-dk/Harness-playground) into this shared actions monorepo as harness/, so consumers reference it as framna-dk/actions/harness@<ref> instead of a local ./ path. That removes the actions/checkout step the playground needed just to resolve the local action. Self-contained (dist/ committed); compiled output unchanged from the source. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ems, required prompt - Fall back to built-in defaults when .banzai/config.json is absent instead of throwing; only a genuine read error is fatal. Guard for a missing project id. - Key per-issue workspaces by repo + issue so a shared runner never reuses (and pushes to) the wrong repository when two repos share an issue identifier. - Paginate Projects v2 items so issues beyond the first 100 board items are found. - Require a prompt_path action input and remove the built-in fallback prompt; a missing/unreadable prompt is now a hard error. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Remove inputs that were redundant or never load-bearing: - base_branch: renamed from repo_ref (it must be a branch, since the workspace reset does a --ff-only pull onto it). - dispatch_nonce: only ever logged; run↔claim correlation happens via the run name, not by the action consuming it. Removed along with the dead config_sha field that was logged but never declared as an input. - tracker_endpoint: always the GitHub GraphQL URL; keep the config-file default as the single source, overridable via .banzai/config.json if ever needed. - issue_identifier: derived from the fetched issue instead. The workspace is now keyed by the stable issue_id and the agent branch is cut after the fetch using the real identifier. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace the hand-rolled Projects v2 GraphQL with the gh CLI: - reads via `gh project field-list` + `item-list` (match the board item by issue number + repo), writes via `gh project item-edit`. - new gh.ts exec helper; delete the redundant github_graphql agent tool (the agent has gh in its shell) and the now-unused tracker.endpoint/project_id config + github_graphql tool flag. New input contract keyed by the project's URL-path identity: - issue_number, project_owner, project_number, project_node_id (replacing issue_id / tracker_project_id). Workspace is keyed by issue_number; repo_url carries the issue's owner/repo for board-item matching. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
gh project item-list doesn't expose labels, but prompts reference
{{ issue.labels }} and strictVariables would throw. Fetch them best-effort
with `gh issue view --json labels` and default to [] on failure.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Refactor toward supporting multiple trackers and agent runtimes by hiding each behind an interface + factory, with the harness as runtime/tracker-agnostic orchestration. Behavior is unchanged. - tracker/: Tracker interface (fetchSnapshot + setStatus by state name), GitHubProjectsTracker impl (was issue.ts; caches item/field ids), and createTracker(kind, opts). Callers no longer touch project/field/option ids. - agent/: AgentRuntime interface (run(opts) with injected per-turn prompt and continue/stop decision), CodexRuntime impl + app_server client (was codex/), and createAgentRuntime(kind). The runtime no longer knows about trackers. - harness.ts: builds tracker + runtime from kinds, owns the stop decision (issue left active_states) and outcome mapping. set_issue_status tool now depends on the Tracker interface, not gh. config gains agent.runtime. Adding a tracker or runtime is now one impl file + one factory case. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Generalize the agent's structured-tool surface beyond set_issue_status, behind the same interface+factory pattern: - forge/: Forge interface (openOrUpdatePullRequest + commentOnIssue), GitHubForge impl (git push + gh pr create-or-edit, idempotent across retries; gh issue comment), and createForge(kind, opts). - tools/open_pull_request.ts + tools/comment.ts: agent supplies content, harness injects branch/base/issue context. - exec.ts: shared run() for spawning git/gh; gh.ts now wraps it. - config: agent.tools gains open_pull_request + comment (default true). - harness: builds a Forge and registers all enabled tools with the runtime. Tools are dormant until the prompt references them. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The implementation moved to its own repo (framna-dk/banzai-codes-actions-harness) as the `banzai-harness` CLI. This action is now just action.yml + README.md: the composite steps run `banzai-harness preflight` / `banzai-harness run` instead of bundled `node dist/*.js`, so the action carries no source or committed bundle. The CLI is a runner prerequisite (on PATH, alongside codex/gh/node/git/jq). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The CLI (framna-dk/banzai-codes-harness) now takes explicit --flags rather than a HARNESS_INPUTS_JSON env blob; secrets (GH_TOKEN, OPENAI_API_KEY) stay in the env. Pass each input as a flag for preflight and run (run adds repo-url, workspace-root, base-branch, runner-temp). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The harness now embeds the canonical workflow and treats --prompt-path as an optional override. Make the action's prompt_path input optional and only forward --prompt-path when non-empty, so the harness falls back to its embedded template when the orchestrator omits it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Remove the prerequisite/flag comment block from the composite steps and refer to the "coding agent" instead of Codex specifically. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Github Action used for Banzai Harness