Skip to content

Commit 52797ca

Browse files
Default repository audits to gpt-5.3-codex high so runs are more stable than Spark while preserving override controls. Add date-prefixed output directories and update docs/workflow defaults so repeated test runs stay easier to organize. (#26)
1 parent 85c94d5 commit 52797ca

File tree

5 files changed

+48
-21
lines changed

5 files changed

+48
-21
lines changed

.github/workflows/daytona-e2e.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ on:
1010
model:
1111
description: "Model to use"
1212
required: false
13-
default: "zai-coding-plan/glm-4.7-flash"
13+
default: "openai/gpt-5.3-codex"
14+
variant:
15+
description: "Model variant"
16+
required: false
17+
default: "high"
1418
analyze_timeout_sec:
1519
description: "Analyze timeout seconds"
1620
required: false
@@ -26,6 +30,7 @@ permissions:
2630
env:
2731
DAYTONA_API_KEY: ${{ secrets.DAYTONA_API_KEY }}
2832
DAYTONA_API_URL: ${{ vars.DAYTONA_API_URL }}
33+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
2934
ZHIPU_API_KEY: ${{ secrets.ZHIPU_API_KEY }}
3035

3136
jobs:
@@ -58,6 +63,7 @@ jobs:
5863
bun run analyze -- \
5964
--out-dir .memory/daytona-e2e/findings \
6065
--model "${{ inputs.model }}" \
66+
--variant "${{ inputs.variant }}" \
6167
--install-timeout-sec "${{ inputs.install_timeout_sec }}" \
6268
--analyze-timeout-sec "${{ inputs.analyze_timeout_sec }}" \
6369
"${{ inputs.repo_url }}"

README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,11 @@ bun run start -- --no-open
179179
### Defaults and behavior
180180

181181
- Default model selection:
182-
- Standard: `zai-coding-plan/glm-4.7-flash`
182+
- Standard: `openai/gpt-5.3-codex`
183+
- Standard variant: `high`
183184
- Vision mode (`--vision`): `zai-coding-plan/glm-4.6v`
184185
- Override with `--model`, `--variant`, `OPENCODE_ANALYZE_MODEL`, or `OPENCODE_ANALYZE_VARIANT`
186+
- If you override the model, variant is opt-in (no forced default variant for custom/env model overrides)
185187
- Auto-installs missing `git` and `node/npm` inside sandbox
186188
- Forwards provider env vars (`OPENAI_*`, `ANTHROPIC_*`, `XAI_*`, `OPENROUTER_*`, `ZHIPU_*`, `MINIMAX_*`, etc.)
187189
- Syncs local OpenCode config files from `~/.config/opencode` when present
@@ -196,7 +198,7 @@ bun run start -- --no-open
196198
```bash
197199
bun run analyze -- --input example.md
198200
bun run analyze -- https://github.com/owner/repo-one https://github.com/owner/repo-two
199-
bun run analyze -- --out-dir findings --model zai-coding-plan/glm-4.7-flash --target us
201+
bun run analyze -- --out-dir findings --model openai/gpt-5.3-codex --variant high --target us
200202
bun run analyze -- --vision
201203
bun run analyze -- --analyze-timeout-sec 3600 --keep-sandbox
202204
```
@@ -208,15 +210,15 @@ If no URLs and no `--input` are provided, the script uses `example.md` when it e
208210
## Output Layout
209211

210212
- `<out-dir>/index.md` - summary across all URLs
211-
- `<out-dir>/<NN-slug>/findings.md` - final report for each repository
212-
- `<out-dir>/<NN-slug>/README.*` - copied repository README (if found)
213-
- `<out-dir>/<NN-slug>/opencode-run.log` - raw OpenCode run output
214-
- `<out-dir>/<NN-slug>/opencode-models-anthropic.log` - Anthropic model-list preflight output (only when `anthropic/*` model is requested)
213+
- `<out-dir>/<YYYY-MM-DD-NN-slug>/findings.md` - final report for each repository
214+
- `<out-dir>/<YYYY-MM-DD-NN-slug>/README.*` - copied repository README (if found)
215+
- `<out-dir>/<YYYY-MM-DD-NN-slug>/opencode-run.log` - raw OpenCode run output
216+
- `<out-dir>/<YYYY-MM-DD-NN-slug>/opencode-models-anthropic.log` - Anthropic model-list preflight output (only when `anthropic/*` model is requested)
215217

216-
Example retained in this repo:
218+
Recommended naming convention for manual runs:
217219

218220
```bash
219-
bun run analyze -- --input example.md --out-dir findings-confidence-3 --analyze-timeout-sec 3600 --keep-sandbox
221+
bun run analyze -- --input example.md --out-dir findings-2026-03-03 --analyze-timeout-sec 3600 --keep-sandbox
220222
```
221223

222224
---

src/analyze-model.test.ts

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ describe("resolveAnalyzeModel", () => {
2020
delete process.env.OPENCODE_ANALYZE_VISION_MODEL;
2121

2222
const resolved = resolveAnalyzeModel({});
23-
expect(resolved.model).toBe("zai-coding-plan/glm-4.7-flash");
24-
expect(resolved.variant).toBeUndefined();
23+
expect(resolved.model).toBe("openai/gpt-5.3-codex");
24+
expect(resolved.variant).toBe("high");
2525
});
2626

2727
test("uses vision default when requested", () => {
@@ -34,6 +34,15 @@ describe("resolveAnalyzeModel", () => {
3434
expect(resolved.variant).toBeUndefined();
3535
});
3636

37+
test("does not force default variant when model is overridden by env", () => {
38+
process.env.OPENCODE_ANALYZE_MODEL = "openai/gpt-5.3-codex";
39+
delete process.env.OPENCODE_ANALYZE_VARIANT;
40+
41+
const resolved = resolveAnalyzeModel({});
42+
expect(resolved.model).toBe("openai/gpt-5.3-codex");
43+
expect(resolved.variant).toBeUndefined();
44+
});
45+
3746
test("respects env overrides", () => {
3847
process.env.OPENCODE_ANALYZE_MODEL = "zai-coding-plan/glm-5";
3948
process.env.OPENCODE_ANALYZE_VARIANT = "high";
@@ -44,15 +53,15 @@ describe("resolveAnalyzeModel", () => {
4453
});
4554

4655
test("cli args override env", () => {
47-
process.env.OPENCODE_ANALYZE_MODEL = "zai-coding-plan/glm-4.7-flash";
56+
process.env.OPENCODE_ANALYZE_MODEL = "openai/gpt-5.3-codex";
4857
process.env.OPENCODE_ANALYZE_VARIANT = "low";
4958

5059
const resolved = resolveAnalyzeModel({
51-
model: "zai-coding-plan/glm-4.6v",
60+
model: "anthropic/claude-sonnet-4-6",
5261
variant: "high",
5362
});
5463

55-
expect(resolved.model).toBe("zai-coding-plan/glm-4.6v");
64+
expect(resolved.model).toBe("anthropic/claude-sonnet-4-6");
5665
expect(resolved.variant).toBe("high");
5766
});
5867

src/analyze-model.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ export type ResolvedAnalyzeModel = {
1212
};
1313

1414
export function resolveAnalyzeModel(input: AnalyzeModelInput): ResolvedAnalyzeModel {
15+
const modelOverride = input.model ?? process.env.OPENCODE_ANALYZE_MODEL;
1516
const defaultModel = input.vision
1617
? (process.env.OPENCODE_ANALYZE_VISION_MODEL ?? "zai-coding-plan/glm-4.6v")
17-
: "zai-coding-plan/glm-4.7-flash";
18-
const model = input.model ?? process.env.OPENCODE_ANALYZE_MODEL ?? defaultModel;
19-
const variant = input.variant ?? process.env.OPENCODE_ANALYZE_VARIANT;
18+
: "openai/gpt-5.3-codex";
19+
const model = modelOverride ?? defaultModel;
20+
const defaultVariant = !input.vision && !modelOverride ? "high" : undefined;
21+
const variant = input.variant ?? process.env.OPENCODE_ANALYZE_VARIANT ?? defaultVariant;
2022

2123
return {
2224
model,

src/analyze-repos.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,13 @@ function slugFromRepoUrl(url: string): string {
116116
return sanitizeSlug(`${owner}-${repo}`);
117117
}
118118

119+
function formatDatePrefix(date: Date): string {
120+
const year = String(date.getFullYear());
121+
const month = String(date.getMonth() + 1).padStart(2, "0");
122+
const day = String(date.getDate()).padStart(2, "0");
123+
return `${year}-${month}-${day}`;
124+
}
125+
119126
function normalizeUrlCandidate(raw: string): string | undefined {
120127
const cleaned = raw.trim().replace(/[),.;]+$/g, "");
121128
if (!cleaned.startsWith("http://") && !cleaned.startsWith("https://")) {
@@ -250,7 +257,7 @@ function parseCliOptions(): CliOptions {
250257
Examples:
251258
bun run analyze -- --input example.md
252259
bun run analyze -- https://github.com/agenticnotetaking/arscontexta
253-
bun run analyze -- --input links.md --out-dir findings --model zai-coding-plan/glm-4.7-flash
260+
bun run analyze -- --input links.md --out-dir findings --model openai/gpt-5.3-codex --variant high
254261
bun run analyze -- --vision
255262
256263
Options:
@@ -260,8 +267,8 @@ Options:
260267
--install-timeout-sec <n> OpenCode install timeout (default: 900)
261268
--analyze-timeout-sec <n> Per-repo analysis timeout (default: 2400)
262269
--target <name> Daytona target override
263-
--model <provider/model> OpenCode model (default: zai-coding-plan/glm-4.7-flash)
264-
--variant <name> Model variant (example: xhigh)
270+
--model <provider/model> OpenCode model (default: openai/gpt-5.3-codex)
271+
--variant <name> Model variant (default: high, when using built-in default model)
265272
--vision Prefer vision-capable default model (zai-coding-plan/glm-4.6v)
266273
--keep-sandbox Keep each sandbox instead of deleting it
267274
-h, --help Show this help
@@ -676,7 +683,8 @@ async function analyzeOneRepo(params: {
676683
const { daytona, options, config, url, index, total } = params;
677684
const slug = slugFromRepoUrl(url);
678685
const runPrefix = `${String(index + 1).padStart(2, "0")}-${slug}`;
679-
const localDir = path.join(options.outDir, runPrefix);
686+
const datedRunPrefix = `${formatDatePrefix(new Date())}-${runPrefix}`;
687+
const localDir = path.join(options.outDir, datedRunPrefix);
680688
const findingsPath = path.join(localDir, "findings.md");
681689
let readmePath: string | undefined;
682690

0 commit comments

Comments
 (0)