|
1 | | -# 131.10 — Verification: OpenCode Go Metadata Drift Closure |
| 1 | +# 131.10 — Verification: OpenCode Go Metadata Drift Retry |
2 | 2 |
|
3 | 3 | ## Scope |
4 | 4 |
|
5 | | -Phase 131 closes the OpenCode Go metadata drift across three repositories: |
| 5 | +Phase 131 retry replaces the closed GJC PR #914 assumptions with the current official |
| 6 | +OpenCode Go web contract. |
6 | 7 |
|
7 | | -- GJC upstream clone on `dev`: `/Users/jun/Developer/new/700_projects/jawcode/devlog/_upstream_gjc` |
8 | | -- jawcode on `dev`: `/Users/jun/Developer/new/700_projects/jawcode` |
9 | | -- opencodex on `dev`: `/Users/jun/Developer/new/700_projects/opencodex` |
| 8 | +Source-of-truth split: |
10 | 9 |
|
11 | | -The source-of-truth values are recorded in `00_plan.md`. The generated model contracts still |
12 | | -support only `text` and `image` inputs, so official `video`, `audio`, and `pdf` support remains |
13 | | -recorded as source evidence but is not emitted into generated rows. |
| 10 | +- `https://opencode.ai/docs/go/#endpoints`: OpenCode Go endpoint/API SDK routing. |
| 11 | +- `https://opencode.ai/docs/go/#usage-limits`: current Go product prices for rows present |
| 12 | + in the usage table. |
| 13 | +- `https://opencode.ai/data/...`: context window, output limit, and modality facts. |
| 14 | +- `https://opencode.ai/zen/go/v1/models`: existence-only; the endpoint does not expose |
| 15 | + context/output/pricing metadata. |
| 16 | + |
| 17 | +## Official Routing Contract |
| 18 | + |
| 19 | +Routes encoded in GJC and jawcode: |
| 20 | + |
| 21 | +- `openai-completions` on `https://opencode.ai/zen/go/v1`: `deepseek-v4-flash`, |
| 22 | + `deepseek-v4-pro`, `glm-5.1`, `glm-5.2`, `kimi-k2.6`, `kimi-k2.7-code`, `mimo-v2.5`, |
| 23 | + `mimo-v2.5-pro`. |
| 24 | +- `anthropic-messages` on `https://opencode.ai/zen/go`: `minimax-m2.5`, `minimax-m2.7`, |
| 25 | + `minimax-m3`, `qwen3.6-plus`, `qwen3.7-max`, `qwen3.7-plus`. |
| 26 | + |
| 27 | +Rows present in the data catalog but absent from the current Go endpoint table retain data-page |
| 28 | +metadata and are not used to infer undocumented endpoint overrides. |
14 | 29 |
|
15 | 30 | ## GJC |
16 | 31 |
|
| 32 | +Repository: |
| 33 | + |
| 34 | +- `/Users/jun/Developer/new/700_projects/jawcode/devlog/_upstream_gjc` |
| 35 | + |
| 36 | +Branch: |
| 37 | + |
| 38 | +- `codex/opencode-go-contract`, based on `origin/dev`. |
| 39 | + |
17 | 40 | Modified: |
18 | 41 |
|
19 | 42 | - `/Users/jun/Developer/new/700_projects/jawcode/devlog/_upstream_gjc/packages/ai/src/provider-models/openai-compat.ts` |
20 | 43 | - `/Users/jun/Developer/new/700_projects/jawcode/devlog/_upstream_gjc/packages/ai/test/issue-887-repro.test.ts` |
21 | | -- `/Users/jun/Developer/new/700_projects/jawcode/devlog/_upstream_gjc/packages/ai/src/model-thinking.ts` |
22 | 44 | - `/Users/jun/Developer/new/700_projects/jawcode/devlog/_upstream_gjc/packages/ai/src/models.json` |
23 | 45 |
|
24 | 46 | Verification: |
25 | 47 |
|
26 | | -- `bun test packages/ai/test/issue-887-repro.test.ts` passed: 10 tests, 0 failures. |
| 48 | +- `bun test packages/ai/test/issue-887-repro.test.ts` passed: 17 tests, 0 failures, |
| 49 | + 32 assertions. |
27 | 50 | - `bun --cwd=packages/ai run generate-models` produced `opencode-go: 20 models`. |
| 51 | +- Generated contract check passed: `checked=8 bad=0` for routing, base URL, context, |
| 52 | + output, and price samples. |
28 | 53 | - `bun --cwd=packages/ai run check` passed. |
29 | | -- Custom 20-row comparison against generated `opencode-go` rows returned `bad=0`. |
30 | | -- GJC PR #914 (`Yeachan-Heo/gajae-code`, base `dev`) CI passed all checks: |
31 | | - `gh pr checks 914 --repo Yeachan-Heo/gajae-code` returned 12 passing checks. |
32 | | - |
33 | | -GJC needed one extra guard in `model-thinking.ts`: the global `minimax-m3` 1M policy now excludes |
34 | | -`provider === "opencode-go"`, because OpenCode Go's official `minimax-m3` context is 512000. |
35 | 54 |
|
36 | 55 | ## jawcode |
37 | 56 |
|
| 57 | +Repository: |
| 58 | + |
| 59 | +- `/Users/jun/Developer/new/700_projects/jawcode/devlog/_worktrees/opencode-go-contract` |
| 60 | + |
| 61 | +Branch: |
| 62 | + |
| 63 | +- `codex/opencode-go-contract`, based on `origin/dev` in a separate worktree to preserve |
| 64 | + unrelated dirty files in `/Users/jun/Developer/new/700_projects/jawcode`. |
| 65 | + |
38 | 66 | Modified: |
39 | 67 |
|
40 | | -- `/Users/jun/Developer/new/700_projects/jawcode/packages/ai/src/provider-models/openai-compat.ts` |
41 | | -- `/Users/jun/Developer/new/700_projects/jawcode/packages/ai/test/issue-887-repro.test.ts` |
42 | | -- `/Users/jun/Developer/new/700_projects/jawcode/packages/ai/src/models.json` |
| 68 | +- `/Users/jun/Developer/new/700_projects/jawcode/devlog/_worktrees/opencode-go-contract/packages/ai/src/provider-models/openai-compat.ts` |
| 69 | +- `/Users/jun/Developer/new/700_projects/jawcode/devlog/_worktrees/opencode-go-contract/packages/ai/test/issue-887-repro.test.ts` |
| 70 | +- `/Users/jun/Developer/new/700_projects/jawcode/devlog/_worktrees/opencode-go-contract/packages/ai/src/models.json` |
43 | 71 |
|
44 | 72 | Verification: |
45 | 73 |
|
46 | | -- `bun test packages/ai/test/issue-887-repro.test.ts` passed: 10 tests, 0 failures, 19 assertions. |
| 74 | +- `bun test packages/ai/test/issue-887-repro.test.ts` passed: 17 tests, 0 failures, |
| 75 | + 32 assertions. |
47 | 76 | - `bun --cwd=packages/ai run generate-models` produced `opencode-go: 20 models`. |
48 | | -- `bun --cwd=packages/ai run check` passed. |
49 | | -- Custom 20-row comparison against generated `opencode-go` rows returned `bad=0`. |
50 | | - |
51 | | -Commit: |
52 | | - |
53 | | -- `80395c9c fix(ai): sync opencode go model metadata` |
| 77 | +- Generated contract check passed: `checked=8 bad=0` for routing, base URL, context, |
| 78 | + output, and price samples. |
| 79 | +- `bun --cwd=packages/ai run check` passed after temporarily linking the existing parent |
| 80 | + repo `node_modules` into the worktree for type resolution; the symlink was removed and not |
| 81 | + staged. |
54 | 82 |
|
55 | | -Existing jawcode dirty files were preserved and not staged: |
| 83 | +Existing dirty files preserved outside the worktree: |
56 | 84 |
|
57 | 85 | - `/Users/jun/Developer/new/700_projects/jawcode/AGENTS.md` |
58 | 86 | - `/Users/jun/Developer/new/700_projects/jawcode/.agents/` |
59 | 87 | - `/Users/jun/Developer/new/700_projects/jawcode/.claude/` |
60 | 88 |
|
61 | 89 | ## opencodex |
62 | 90 |
|
63 | | -Modified: |
| 91 | +Repository: |
| 92 | + |
| 93 | +- `/Users/jun/Developer/new/700_projects/opencodex` |
| 94 | + |
| 95 | +Branch: |
| 96 | + |
| 97 | +- `codex/opencode-go-contract` |
| 98 | + |
| 99 | +Implementation result: |
64 | 100 |
|
65 | | -- `/Users/jun/Developer/new/700_projects/opencodex/src/generated/jawcode-model-metadata.ts` |
66 | | -- `/Users/jun/Developer/new/700_projects/opencodex/scripts/generate-jawcode-metadata.ts` |
67 | | -- `/Users/jun/Developer/new/700_projects/opencodex/src/codex-catalog.ts` |
68 | | -- `/Users/jun/Developer/new/700_projects/opencodex/tests/codex-catalog.test.ts` |
69 | | -- `/Users/jun/Developer/new/700_projects/opencodex/devlog/131_opencode-go-metadata-drift/10_verification.md` |
| 101 | +- `JAWCODE_MODELS_JSON=/Users/jun/Developer/new/700_projects/jawcode/devlog/_worktrees/opencode-go-contract/packages/ai/src/models.json bun run generate:jawcode-metadata` |
| 102 | + was executed and verified. It introduced no `opencode-go` metadata delta because opencodex |
| 103 | + stores context/output/modalities only; endpoint and price changes live in GJC/jawcode. |
| 104 | +- The generated-file diff was intentionally reduced back to zero to avoid unrelated dynamic |
| 105 | + `openrouter` metadata churn from the jawcode worktree. |
| 106 | +- The no-code-runtime rationale is recorded in `20_opencodex-integration.md`. |
70 | 107 |
|
71 | 108 | Verification: |
72 | 109 |
|
73 | | -- `bun run generate:jawcode-metadata` regenerated from |
74 | | - `/Users/jun/Developer/new/700_projects/jawcode/packages/ai/src/models.json`. |
75 | | -- `bun test tests/codex-catalog.test.ts` passed: 12 tests, 0 failures, 90 assertions. |
76 | | -- `bun test tests/provider-registry-parity.test.ts` passed: 8 tests, 0 failures, 23 assertions. |
77 | | -- `bun test tests` passed: 65 tests, 0 failures, 234 assertions. |
| 110 | +- `bun test tests/codex-catalog.test.ts` passed: 13 tests, 0 failures, 98 assertions. |
| 111 | +- `bun test tests/provider-registry-parity.test.ts` passed: 8 tests, 0 failures, |
| 112 | + 23 assertions. |
| 113 | +- OpenCode Go generated metadata sample check passed: `metadata_checked=5 bad=0`. |
| 114 | +- `bun test tests` passed: 88 tests, 0 failures, 287 assertions. |
78 | 115 | - `bun x tsc --noEmit` passed. |
79 | | -- Generated metadata 20-row comparison for `opencode-go` returned `bad=0`. |
80 | | - |
81 | | -Real `ocx` verification found one extra runtime gap after the first commit: |
82 | | - |
83 | | -- `ocx` is correctly symlinked to the local repository: |
84 | | - `/Users/jun/.local/bin/ocx` -> `/Users/jun/Developer/new/700_projects/opencodex/dist/bin/ocx` |
85 | | - -> `/Users/jun/Developer/new/700_projects/opencodex/src/cli.ts`. |
86 | | -- `ocx sync` originally still omitted official rows absent from the live provider `/v1/models` |
87 | | - response unless they were manually configured. |
88 | | -- The runtime catalog path now augments configured `opencode-go` with generated jawcode metadata |
89 | | - rows before disabled-model filtering. |
90 | | -- Current user config intentionally disables `opencode-go/qwen3.5-plus` and |
91 | | - `opencode-go/hy3-preview`, so they remain absent from the live catalog by configuration. |
92 | | - |
93 | | -Post-patch local `ocx` smoke: |
94 | | - |
95 | | -- `ocx stop; ocx start` started the proxy on `http://localhost:10100`. |
96 | | -- `GET /healthz` returned status `ok`. |
97 | | -- `GET /v1/models?client_version=0.141.0` returned HTTP 200. |
98 | | -- `opencode-go/glm-5.2` returned `context_window=1000000`, |
99 | | - `auto_compact_token_limit=900000`, `input_modalities=["text"]`, `supports_websockets=true`. |
100 | | -- `opencode-go/kimi-k2.7-code` returned `context_window=262144`, |
101 | | - `auto_compact_token_limit=235929`, `input_modalities=["text","image"]`, `supports_websockets=true`. |
102 | | -- `opencode-go/minimax-m3` returned `context_window=512000`, |
103 | | - `auto_compact_token_limit=460800`, `input_modalities=["text","image"]`, `supports_websockets=true`. |
104 | | - |
105 | | -The catalog regression test now locks high-risk OpenCode Go rows through the full opencodex path: |
106 | | - |
107 | | -- `glm-5.2`: `context_window=1000000`, `auto_compact_token_limit=900000`, `input_modalities=["text"]` |
108 | | -- `qwen3.5-plus`: `context_window=1000000`, `auto_compact_token_limit=900000`, `input_modalities=["text","image"]` |
109 | | -- `kimi-k2.7-code`: `context_window=262144`, `auto_compact_token_limit=235929`, `input_modalities=["text","image"]` |
110 | | -- `minimax-m3`: `context_window=512000`, `auto_compact_token_limit=460800`, `input_modalities=["text","image"]` |
111 | | -- `hy3-preview`: `context_window=256000`, `auto_compact_token_limit=230400`, `input_modalities=["text"]` |
112 | | - |
113 | | -## Result |
114 | | - |
115 | | -The OpenCode Go metadata drift is closed at source generation, jawcode consumption, and opencodex |
116 | | -catalog export. Codex routed catalog entries now receive corrected context limits and compaction |
117 | | -thresholds for the tracked OpenCode Go models. |
| 116 | +- local `ocx` catalog smoke passed and the proxy was stopped afterward. |
| 117 | + |
| 118 | +Runtime `ocx` smoke: |
| 119 | + |
| 120 | +- `ocx start` started the proxy on `http://localhost:10100`. |
| 121 | +- `GET http://127.0.0.1:10100/healthz` returned `health ok`. |
| 122 | +- `GET http://127.0.0.1:10100/v1/models?client_version=0.141.0` returned Codex catalog |
| 123 | + rows with corrected OpenCode Go limits: |
| 124 | + - `opencode-go/glm-5.2`: `context_window=1000000`, |
| 125 | + `max_context_window=1000000`, `auto_compact_token_limit=900000`, |
| 126 | + `input_modalities=["text"]`. |
| 127 | + - `opencode-go/kimi-k2.7-code`: `context_window=262144`, |
| 128 | + `max_context_window=262144`, `auto_compact_token_limit=235929`, |
| 129 | + `input_modalities=["text","image"]`. |
| 130 | + - `opencode-go/minimax-m3`: `context_window=512000`, |
| 131 | + `max_context_window=512000`, `auto_compact_token_limit=460800`, |
| 132 | + `input_modalities=["text","image"]`. |
| 133 | + - `opencode-go/qwen3.7-plus`: `context_window=1000000`, |
| 134 | + `max_context_window=1000000`, `auto_compact_token_limit=900000`, |
| 135 | + `input_modalities=["text","image"]`. |
| 136 | +- Final state confirmed with `ocx stop`: no running proxy found and opencodex was removed |
| 137 | + from Codex config. |
| 138 | + |
| 139 | +## PR / CI |
| 140 | + |
| 141 | +Opened PRs: |
| 142 | + |
| 143 | +- GJC upstream: `https://github.com/Yeachan-Heo/gajae-code/pull/915` |
| 144 | +- jawcode: `https://github.com/lidge-jun/jawcode/pull/1` |
| 145 | +- opencodex: `https://github.com/lidge-jun/opencodex/pull/1` |
| 146 | + |
| 147 | +Initial CI status after PR creation: |
| 148 | + |
| 149 | +- GJC PR #915: checks pending (`Affected path validation / plan`, `gjc-state-gates / integrity`, |
| 150 | + `gjc-state-gates / read`, `gjc-state-gates / runtime`, `gjc-state-gates / static`). |
| 151 | +- jawcode PR #1: checks pending (`Affected path validation`, `jwc-state-gates`). |
| 152 | +- opencodex PR #1: no checks reported on the branch at creation time. |
0 commit comments