GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — review prompt: friendly green callouts + per-section severity emojis … · pullfrog/pullfrog@ddbc610

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • agents
    • claude.ts
    • opencode.test.ts
    • opencode.ts
    • postRun.ts
    • subagentModels.test.ts
  • gha.ts
  • mcp
    • review.ts
  • models.ts
  • modes.ts
  • package.json
  • utils
    • skills.ts
    • workflow.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎agents/claude.ts‎

Copy file name to clipboardExpand all lines: agents/claude.ts
+9-4Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ import {
3333
import { ThinkingTimer } from "../utils/timer.ts";
3434
import type { TodoTracker } from "../utils/todoTracking.ts";
3535
import { getDevDependencyVersion } from "../utils/version.ts";
36-
import { buildLearningsReflectionPrompt, runPostRunRetryLoop } from "./postRun.ts";
36+
import {
37+
buildLearningsReflectionPrompt,
38+
runPostRunRetryLoop,
39+
shouldRunReflection,
40+
} from "./postRun.ts";
3741
import { REVIEWER_AGENT_NAME, REVIEWER_SYSTEM_PROMPT } from "./reviewer.ts";
3842
import { formatWithLabel, ORCHESTRATOR_LABEL, SessionLabeler } from "./sessionLabeler.ts";
3943
import {
@@ -966,9 +970,10 @@ export const claude = agent({
966970
ctx,
967971
initialResult: result,
968972
initialUsage: result.usage,
969-
reflectionPrompt: ctx.toolState.learningsFilePath
970-
? buildLearningsReflectionPrompt(ctx.toolState.learningsFilePath)
971-
: undefined,
973+
reflectionPrompt:
974+
ctx.toolState.learningsFilePath && shouldRunReflection(ctx.toolState.selectedMode)
975+
? buildLearningsReflectionPrompt(ctx.toolState.learningsFilePath)
976+
: undefined,
972977
canResume: (r) => Boolean(r.sessionId),
973978
resume: async (c) => {
974979
const sessionId = c.previousResult.sessionId;
Collapse file

‎agents/opencode.test.ts‎

Copy file name to clipboard
+34Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import { describe, expect, it } from "vitest";
2+
import { modelAliases } from "../models.ts";
3+
import { geminiHighThinkingOverrides } from "./opencode.ts";
4+
5+
describe("geminiHighThinkingOverrides", () => {
6+
// Expected truth pulled the same way the helper does — both must derive from
7+
// the registry so the test exercises the wiring, not a hand-maintained list.
8+
const expectedApiIds = modelAliases
9+
.filter((a) => a.provider === "google")
10+
.map((a) => a.resolve.replace(/^google\//, ""));
11+
const overrides = geminiHighThinkingOverrides();
12+
13+
it("covers every direct-Google alias in the registry", () => {
14+
expect(Object.keys(overrides).sort()).toEqual([...expectedApiIds].sort());
15+
});
16+
17+
it("is non-empty (catches accidental whole-provider removal)", () => {
18+
expect(Object.keys(overrides).length).toBeGreaterThan(0);
19+
});
20+
21+
it("strips the `google/` prefix from each resolve to get the bare API id", () => {
22+
for (const id of Object.keys(overrides)) {
23+
expect(id).not.toMatch(/^google\//);
24+
}
25+
});
26+
27+
it("pins every entry to thinkingLevel: high", () => {
28+
for (const [id, value] of Object.entries(overrides)) {
29+
expect(value, `entry for ${id}`).toEqual({
30+
options: { thinkingConfig: { thinkingLevel: "high" } },
31+
});
32+
}
33+
});
34+
});
Collapse file

‎agents/opencode.ts‎

Copy file name to clipboardExpand all lines: agents/opencode.ts
+25-35Lines changed: 25 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ import {
3939
PULLFROG_OPENCODE_PLUGIN_FILENAME,
4040
PULLFROG_OPENCODE_PLUGIN_SOURCE,
4141
} from "./opencodePlugin.ts";
42-
import { buildLearningsReflectionPrompt, runPostRunRetryLoop } from "./postRun.ts";
42+
import {
43+
buildLearningsReflectionPrompt,
44+
runPostRunRetryLoop,
45+
shouldRunReflection,
46+
} from "./postRun.ts";
4347
import { REVIEWER_AGENT_NAME, REVIEWER_SYSTEM_PROMPT } from "./reviewer.ts";
4448
import { formatWithLabel, ORCHESTRATOR_LABEL, SessionLabeler } from "./sessionLabeler.ts";
4549
import {
@@ -95,24 +99,20 @@ type OpenCodeConfig = {
9599
// on merge in session/llm.ts), so the env var is the only working knob.
96100

97101
/**
98-
* upstream opencode hardcodes `thinkingLevel: "high"` as the default for every
99-
* gemini-3 model on the direct google SDK (`provider/transform.ts` `options()`).
100-
* that adds 30-60s of pre-tool-call TTFT and 5-46s of post-tool jabber per turn,
101-
* which is overkill for agentic loops where most steps are tool-routing
102-
* decisions. we override to "medium" for the curated slugs we ship in
103-
* `action/models.ts`; users who want max quality can still pick the `-high`
104-
* variant explicitly. flash stays at "medium" too — low-effort flash is
105-
* visibly worse on harder tasks and the latency savings aren't meaningful
106-
* (flash is already fast). other gemini-3 ids that exist in models.dev but
107-
* aren't in our curated alias map keep the upstream `"high"` default.
108-
*
109-
* keyed by upstream api id (matches the slugs in `action/models.ts`). the
110-
* merge order in opencode `session/llm.ts` is `base ← model.options ← agent.options ← variant`,
111-
* deep-merged — so an explicit `--variant high` still wins, and explicit
112-
* model.options in a user-provided opencode config would also win.
102+
* Build the `provider.google.models[id].options` map that pins every direct-Google
103+
* Gemini alias to `thinkingLevel: "high"`. Sourced from the model registry so
104+
* adding/renaming a Google alias in `action/models.ts` flows through automatically.
113105
*/
114-
const GEMINI_3_DIRECT_THINKING_LEVEL = "medium";
115-
const GEMINI_3_DIRECT_API_IDS = ["gemini-3.1-pro-preview", "gemini-3-flash-preview"];
106+
export function geminiHighThinkingOverrides(): Record<string, { options: object }> {
107+
return Object.fromEntries(
108+
modelAliases
109+
.filter((a) => a.provider === "google")
110+
.map((a) => [
111+
a.resolve.replace(/^google\//, ""),
112+
{ options: { thinkingConfig: { thinkingLevel: "high" } } },
113+
])
114+
);
115+
}
116116

117117
function buildSecurityConfig(ctx: AgentRunContext, model: string | undefined): string {
118118
const config: OpenCodeConfig = {
@@ -142,20 +142,9 @@ function buildSecurityConfig(ctx: AgentRunContext, model: string | undefined): s
142142
// the "Parallel tool execution" guidance in utils/instructions.ts so the
143143
// model actually reaches for it. see wiki/prompt.md.
144144
experimental: { batch_tool: true },
145-
provider: {
146-
google: {
147-
models: Object.fromEntries(
148-
GEMINI_3_DIRECT_API_IDS.map((id) => [
149-
id,
150-
{
151-
options: {
152-
thinkingConfig: { thinkingLevel: GEMINI_3_DIRECT_THINKING_LEVEL },
153-
},
154-
},
155-
])
156-
),
157-
},
158-
},
145+
// gemini-3 thinking pinned to high for review depth; gpt and anthropic
146+
// effort set elsewhere (gpt: upstream default, anthropic: --effort flag in claude.ts).
147+
provider: { google: { models: geminiHighThinkingOverrides() } },
159148
};
160149

161150
if (model) {
@@ -1304,9 +1293,10 @@ export const opencode = agent({
13041293
ctx,
13051294
initialResult: result,
13061295
initialUsage: result.usage,
1307-
reflectionPrompt: ctx.toolState.learningsFilePath
1308-
? buildLearningsReflectionPrompt(ctx.toolState.learningsFilePath)
1309-
: undefined,
1296+
reflectionPrompt:
1297+
ctx.toolState.learningsFilePath && shouldRunReflection(ctx.toolState.selectedMode)
1298+
? buildLearningsReflectionPrompt(ctx.toolState.learningsFilePath)
1299+
: undefined,
13101300
resume: async (c) =>
13111301
runOpenCode({
13121302
...runParams,
Collapse file

‎agents/postRun.ts‎

Copy file name to clipboardExpand all lines: agents/postRun.ts
+19-1Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ export function buildUnsubmittedReviewPrompt(mode: "Review" | "IncrementalReview
158158
return [
159159
`MISSING REVIEW OUTPUT — you selected Review mode but stopped without calling \`create_pull_request_review\`. the user has no visible signal that this run produced anything; the progress comment will be deleted on exit and no review will appear on the PR.`,
160160
"",
161-
"call `create_pull_request_review` now with your aggregated review (body + inline comments). pick the tier per the mode prompt — Review mode has no no-submit exit, so even informational `> [!NOTE]` reviews and `No new issues found.` reviews must be submitted (both use `approved: true`). the first call may error once with a diff-coverage nudge — retry the same call to proceed.",
161+
"call `create_pull_request_review` now with your aggregated review (body + inline comments). pick the tier per the mode prompt — Review mode has no no-submit exit, so even informational `> ✅ No new issues found.` reviews must be submitted (with `approved: true`). the first call may error once with a diff-coverage nudge — retry the same call to proceed.",
162162
"",
163163
"do NOT stop again until `create_pull_request_review` has been called successfully.",
164164
].join("\n");
@@ -243,6 +243,24 @@ export function buildPostRunPrompt(issues: PostRunIssues): string {
243243
return parts.join("\n\n---\n\n");
244244
}
245245

246+
/**
247+
* modes for which the post-run reflection turn is skipped. reflection costs a
248+
* full resume turn (~$0.50-0.80 per run on Opus, mostly cache-write) and only
249+
* pays for itself when the run actually produced novel, durable findings.
250+
*
251+
* `IncrementalReview` is the lowest-novelty mode — it's a tight delta review
252+
* against an existing PR with the prior summary already loaded as context.
253+
* the agent rarely discovers anything generalizable to next runs, so the
254+
* reflection turn is dead weight. initial `Review` still touches fresh PR
255+
* territory and benefits; `Build` / `Fix` / `AddressReviews` definitely do.
256+
*/
257+
const REFLECTION_SKIP_MODES: ReadonlySet<string> = new Set(["IncrementalReview"]);
258+
259+
export function shouldRunReflection(mode: string | undefined): boolean {
260+
if (!mode) return true;
261+
return !REFLECTION_SKIP_MODES.has(mode);
262+
}
263+
246264
/**
247265
* prompt for a dedicated post-run reflection turn nudging the agent to edit
248266
* the rolling learnings file if it discovered anything worth persisting.
Collapse file

‎agents/subagentModels.test.ts‎

Copy file name to clipboardExpand all lines: agents/subagentModels.test.ts
+10-7Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,20 +66,23 @@ describe("deriveSubagentModels", () => {
6666
});
6767
});
6868

69-
describe("google (gemini) — pro → flash", () => {
70-
it("direct google", () => {
69+
describe("google (gemini) — inherit (Pro for both orchestrator and lenses)", () => {
70+
// pro → flash was a meaningful capability cliff (Flash missed catastrophic
71+
// cross-file bugs the v4 e2e test surfaced); Pro is cost-effective enough
72+
// to keep on for lenses too. Google has no in-between tier.
73+
it("direct google pro inherits", () => {
7174
expect(deriveSubagentModels("google/gemini-3.1-pro-preview")).toEqual({
72-
reviewer: "google/gemini-3-flash-preview",
75+
reviewer: undefined,
7376
});
7477
});
75-
it("opencode-vendored gemini-pro", () => {
78+
it("opencode-vendored gemini-pro inherits", () => {
7679
expect(deriveSubagentModels("opencode/gemini-3.1-pro")).toEqual({
77-
reviewer: "opencode/gemini-3-flash",
80+
reviewer: undefined,
7881
});
7982
});
80-
it("openrouter-google-gemini-pro", () => {
83+
it("openrouter gemini-pro inherits", () => {
8184
expect(deriveSubagentModels("openrouter/google/gemini-3.1-pro-preview")).toEqual({
82-
reviewer: "openrouter/google/gemini-3-flash-preview",
85+
reviewer: undefined,
8386
});
8487
});
8588
it("flash has no downshift", () => {
Collapse file

‎gha.ts‎

Copy file name to clipboardExpand all lines: gha.ts
+23-1Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,11 @@ config({ path: join(actionDir, ".env") });
3434
config({ path: join(repoRoot, ".env") });
3535

3636
// host env vars that would actively conflict with the container's own
37-
// configuration (paths, identity, shell). everything else passes through.
37+
// configuration (paths, identity, shell, and outer-CI workflow-run identifiers
38+
// that don't apply to whatever repo the harness is acting against). everything
39+
// else passes through.
3840
const HOST_ONLY_VARS = new Set([
41+
// paths / identity / shell — would clobber the container's testuser setup
3942
"PATH",
4043
"HOME",
4144
"USER",
@@ -63,6 +66,25 @@ const HOST_ONLY_VARS = new Set([
6366
"COLORTERM",
6467
"ITERM_PROFILE",
6568
"ITERM_SESSION_ID",
69+
// outer-CI workflow-run identifiers — when `pnpm runtest smoke` runs inside
70+
// pullfrog/app's CI, these refer to pullfrog/app's run, NOT the test repo
71+
// the harness is acting against (e.g. pullfrog/test-repo). Anything inside
72+
// the action that uses them as keys to look up state on the test repo (most
73+
// notably `resolveRun()`'s `actions.listJobsForWorkflowRun(...)` call) will
74+
// 404. Filtering them here means the action sees them as undefined and
75+
// skips the lookup, instead of misdirecting it. `GITHUB_REPOSITORY` and
76+
// `GITHUB_TOKEN` are NOT filtered — those are genuinely needed inside.
77+
"GITHUB_RUN_ID",
78+
"GITHUB_RUN_NUMBER",
79+
"GITHUB_RUN_ATTEMPT",
80+
"GITHUB_JOB",
81+
"GITHUB_WORKFLOW",
82+
"GITHUB_ACTION",
83+
"GITHUB_REF",
84+
"GITHUB_SHA",
85+
"GITHUB_HEAD_REF",
86+
"GITHUB_BASE_REF",
87+
"GITHUB_TRIGGERING_ACTOR",
6688
]);
6789

6890
type Args = {
Collapse file

‎mcp/review.ts‎

Copy file name to clipboardExpand all lines: mcp/review.ts
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ export const CreatePullRequestReview = type({
316316
.optional(),
317317
approved: type.boolean
318318
.describe(
319-
"Set to true to submit as an approval. Use for both 'no issues found' and informational `> [!NOTE]` reviews where the PR is mergeable as-is and nothing in the body warrants code changes — approving also suppresses the Fix-button footer affordance so users don't dispatch a fix run on non-actionable feedback. Reserve approved: false for `> [!IMPORTANT]` (recommended changes) and `> [!CAUTION]` (critical) reviews. Defaults to false (comment-only review). Rejections are not supported."
319+
"Set to true to submit as an approval. Use for `> ✅ No new issues found.` reviews where the PR is mergeable as-is and nothing in the body warrants code changes — approving also suppresses the Fix-button footer affordance so users don't dispatch a fix run on non-actionable feedback. Reserve approved: false for `> ℹ️ ...` (minor suggestions inline), `> [!IMPORTANT]` (recommended changes), and `> [!CAUTION]` (critical) reviews. Defaults to false (comment-only review). Rejections are not supported."
320320
)
321321
.optional(),
322322
commit_id: type.string
@@ -850,8 +850,8 @@ async function createAndSubmitWithFooter(
850850
// introduce new throw paths. keep the whole body wrapped.
851851
try {
852852
// Fix buttons are suppressed on approving reviews — those are mergeable
853-
// by definition (either "no issues found" or `> [!NOTE]` informational
854-
// observations), so dispatching a fix run would be a UX trap.
853+
// by definition (the `> ✅ No new issues found.` tier, with no inline
854+
// comments), so dispatching a fix run would be a UX trap.
855855
const customParts: string[] = [];
856856
if (!opts.approved) {
857857
const apiUrl = getApiUrl();
Collapse file

‎models.ts‎

Copy file name to clipboardExpand all lines: models.ts
+7-3Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,11 @@ export const providers = {
170170
resolve: "google/gemini-3.1-pro-preview",
171171
openRouterResolve: "openrouter/google/gemini-3.1-pro-preview",
172172
preferred: true,
173-
subagentModel: "gemini-flash",
173+
// Inherit (subagents stay on Pro). Google has no in-between tier;
174+
// dropping to Flash for review work was a meaningful capability cliff
175+
// (Flash missed the catastrophic camelCase/snake_case mismatch in
176+
// the v4 e2e test). Pro is cost-effective enough to use for both
177+
// orchestrator and lenses.
174178
},
175179
"gemini-flash": {
176180
displayName: "Gemini Flash",
@@ -319,7 +323,7 @@ export const providers = {
319323
displayName: "Gemini Pro",
320324
resolve: "opencode/gemini-3.1-pro",
321325
openRouterResolve: "openrouter/google/gemini-3.1-pro-preview",
322-
subagentModel: "gemini-flash",
326+
// Inherit — see google/gemini-pro for rationale.
323327
},
324328
"gemini-flash": {
325329
displayName: "Gemini Flash",
@@ -432,7 +436,7 @@ export const providers = {
432436
displayName: "Gemini Pro",
433437
resolve: "openrouter/google/gemini-3.1-pro-preview",
434438
openRouterResolve: "openrouter/google/gemini-3.1-pro-preview",
435-
subagentModel: "gemini-flash",
439+
// Inherit — see google/gemini-pro for rationale.
436440
},
437441
"gemini-flash": {
438442
displayName: "Gemini Flash",

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.