Skip to content

Drop the dead code.redrob.ai host; generate and gate the JSON Schemas - #111

Merged
its-janghoon merged 2 commits into
developfrom
fix/drop-dead-host
Oct 15, 2026
Merged

its-janghoon merged 2 commits into
developfrom
fix/drop-dead-host

Conversation

@its-janghoon

Copy link
Copy Markdown
Member

Summary

There is no host called code.redrob.ai (nor api., dev., or bot@). This PR removes every reference to it (git grep code\.redrob\.ai is now empty) and gives the JSON Schemas those URLs promised a real, generated home.

1. $schema URLs

  • https://console.redrob.ai/code/config.json, .../code/tui.json, .../code/theme.json.
  • Centralised in packages/core/src/links.ts (CONFIG_SCHEMA_URL, TUI_SCHEMA_URL, THEME_SCHEMA_URL, plus CODE_HOME_URL / CODE_DOCS_URL / CODE_INSTALL_*). config.ts and tui-migrate.ts write the constants; JSON assets (packages/redrob/config.json, .redrob/redrob.jsonc, 33 theme files) keep the literal since JSON cannot import.

2. Generated schemas (packages/redrob/schema/)

  • bun run generate:schema → packages/redrob/script/schema.ts writes config.json (from ConfigV1.Info), tui.json (from TuiConfig.Info) and theme.json, each with $id set to the Console URL.
  • tui.json: the Effect generator inlines the same ~1.7 KB keybind schema 185 times (1.1 MB). The script hoists identical description-stripped property schemas into $defs/KeybindsValue; the result is 36 KB and accepts the same documents.
  • theme.json is hand-written (packages/tui/src/theme/schema.ts): the theme format has no zod/Effect schema, only the ThemeJson TS type and resolveTheme. The colour-key lists are satisfies-checked against Theme and an exhaustiveness type assertion fails typecheck if a key is added or removed. packages/tui/test/theme-schema.test.ts checks all 33 bundled themes against the schema's key set, hex pattern (#RGB/#RGBA/#RRGGBB/#RRGGBBAA), ref resolution and variants. I also validated the three documents and all 33 themes with a Draft 2020-12 validator locally.
  • Gate: check:generated in packages/redrob (generate:schema && git diff --exit-code -- schema), added to the core job in .github/workflows/test.yml next to the client check. nix/redrob.nix's single-file invocation still works.

3. GitHub Action fake door

  • github/index.ts, github/action.yml, github/README.md, redrob github run|install: the GitHub-App OIDC token exchange (api.code.redrob.ai/exchange_github_app_token*), the installation poll (get_github_app_installation) and the github.com/apps/redrob-agent install step are gone. The only credential is the token the workflow passes.
  • action.yml: use_github_token / oidc_base_url inputs removed; new token input defaulting to ${{ github.token }}, exported as GITHUB_TOKEN.
  • Handler: resolveGithubToken() (--token or GITHUB_TOKEN) throws a plain "No GitHub token was provided … pass token: …" error. The generated workflow asks for contents/pull-requests/issues: write instead of id-token: write. Reactions are removed by the id we created (no longer by guessing the bot login); commits are authored as github-actions[bot]. Share links come from the share service's own URL instead of a hard-coded base.

4. Provider headers

  • HTTP-Referer → https://console.redrob.ai/code in core kilo/llmgateway/nvidia/openrouter/vercel/zenmux and packages/redrob/src/provider/provider.ts; X-Title → Redrob Code.

5. Docs / homepage links

  • Prompts (anthropic.txt, default.txt, meta.txt), TUI (app.tsx, dialog-provider.tsx, dialog-retry-action.tsx, en.ts/ko.ts share tip), sdks/vscode/README.md, packages/docs/docs.json, skills, specs/tui-plugins.md, patches/install-korean-ime-fix.sh (curl -fsSL https://console.redrob.ai/code/install.sh | sh), MCP OAuth client_uri, providers.ts Cloudflare link. The legacy "Go" upsell links now point at https://console.redrob.ai/billing / /limits.

6. CI bot email

  • bot@code.redrob.ai → 44862514+savagemanage@users.noreply.github.com (5 places).

7. Tests & fixtures

  • Updated to the new values. packages/sdk/js/src/gen/types.gen.ts is the legacy v1 gen folder (the generator emits src/v2/gen), so the two doc links were hand-edited.

Tested

  • bun run typecheck (turbo, 18/18) plus direct tsgo --noEmit in packages/core, packages/redrob, packages/tui: clean.
  • bun run check:generated in packages/redrob and packages/client: clean.
  • bun test on the 13 touched redrob test files (829 pass), packages/core/test/skill/skill-writer.test.ts, packages/redrob/test/tool, llm-native-recorded, gitlab-duo (410 pass), packages/tui/test/theme*.test.ts (11 pass).
  • bun run lint: 0 errors.
  • git grep -n 'code\.redrob\.ai': 0 hits.

Notes

  • github/index.ts has 4 pre-existing tsgo errors on develop (unrelated lines: isScheduleEvent, client.agent, session.chat); the github/ package is not part of the workspace typecheck. Not touched here.
  • redrob github run has no test coverage; the token path was verified by typecheck only.

There is no host called code.redrob.ai (nor api./dev./bot@). Point every
user-facing URL at the Console and remove the fake GitHub-App token
exchange that depended on api.code.redrob.ai.

- $schema URLs -> https://console.redrob.ai/code/{config,tui,theme}.json,
  centralised in packages/core/src/links.ts (CONFIG_SCHEMA_URL,
  TUI_SCHEMA_URL, THEME_SCHEMA_URL); JSON assets keep the literal.
- GitHub action + `redrob github run/install`: PAT / GITHUB_TOKEN only.
  Removed use_github_token / oidc_base_url inputs, the OIDC exchange,
  the installation poll against api.code.redrob.ai and the
  github.com/apps/redrob-agent install step. Reactions are removed by
  id; share links come from the share service's own URL.
- HTTP-Referer -> https://console.redrob.ai/code, X-Title "Redrob Code".
- Docs/homepage links in prompts, TUI strings, SDK README, docs.json,
  skills, specs and the IME patch script -> console.redrob.ai.
- CI bot email -> 44862514+savagemanage@users.noreply.github.com.
- Tests and fixtures updated to the new values.
Give the $schema URLs a real document to serve. `bun run generate:schema`
(packages/redrob/script/schema.ts) now writes three committed files with
`$id` set to the Console URLs:

- schema/config.json  from ConfigV1.Info (Effect JSON Schema)
- schema/tui.json     from TuiConfig.Info; identical per-key keybind
                      schemas are hoisted into $defs (1.1MB -> 36KB)
- schema/theme.json   hand-written in packages/tui/src/theme/schema.ts
                      because the theme format has no runtime schema;
                      the colour-key list is type-checked against Theme
                      and a tui test validates all 33 bundled themes

`check:generated` (packages/redrob) regenerates and `git diff
--exit-code -- schema`, wired into the core CI job next to the client
check. The legacy single-file invocation used by nix still works.
@its-janghoon
its-janghoon merged commit efe2844 into develop Oct 15, 2026
17 checks passed
@its-janghoon
its-janghoon deleted the fix/drop-dead-host branch October 15, 2026 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant