Skip to content

feat(project-router): native routing + drop invalid openrouter/free fallback#244

Merged
JacobPEvans-personal merged 2 commits into
mainfrom
feat/native-project-router
Jun 4, 2026
Merged

feat(project-router): native routing + drop invalid openrouter/free fallback#244
JacobPEvans-personal merged 2 commits into
mainfrom
feat/native-project-router

Conversation

@JacobPEvans-personal
Copy link
Copy Markdown
Member

What

Two related changes:

  1. Project Router → native, no AI. project-router.yml now adds issues/PRs to the org board with actions/add-to-project@v1 instead of running claude-code-action against a custom prompt. The board exposes only Status and Phase fields (no Priority/Size/Type — the old prompt set fields that don't exist), so board membership is the only meaningful action. Items route only when they carry a type:* label (if: gate), preserving the original inclusion rule. .github/prompts/project-router.md deleted.
  2. Drop the broken model fallback across the other 16 AI workflows: remove || 'openrouter/free' everywhere and collapse the phantom AI_MODEL_OPS/REVIEW/DOCS tiers (defined in no repo) to vars.AI_MODEL. Real tiers (CODE/ISSUES/PLAN) retained as overrides.

Why

docs / Project Router has failed 100% since ~2026-06-01: model resolved to the literal openrouter/free, which the docs OpenRouter key can't access. Root cause is the per-repo model-variable fan-out (only 5 repos) leaving other callers with nothing to inherit. The companion terraform-github PR makes AI_MODEL an org-level variable so every repo inherits a valid model — making the literal fallback both unnecessary and harmful. Routing via an LLM for what actions/add-to-project does deterministically was also unnecessary token spend.

⚠️ Prerequisite (auth)

The native router writes to an org Projects v2 board, which the default GITHUB_TOKEN cannot do. It mints an app token via actions/create-github-app-token@v3 (same pattern as the run-claude-code composite). The JacobPEvans-claude App must have organization Projects: write permission — please confirm/grant before relying on this. Without it, add-to-project 403s.

Sequencing

Merge after terraform-github#9 is applied and the org AI_MODEL variable is live. Otherwise callers without a repo-level var get an empty --model. (The native project-router itself has no model dependency, so the docs board failure is fixed regardless.)

Notes

  • claude-review.yml is deprecated (disabled, if: false, marked for deletion). It only received the consistent one-line literal strip; its pre-existing actionlint findings (undeclared inputs in never-running jobs) are out of scope. Suggest a follow-up to delete it + its caller refs.

Verification done

  • bun test: 147 pass / 0 fail.
  • actionlint (run ad-hoc): changed workflows clean; only pre-existing findings in the deprecated claude-review.yml.
  • No openrouter/free literal or phantom-tier ref remains (the only match is a doc comment example in smoke-test.yml).

Verification still needed (manual)

  • Confirm the App has org Projects: write, then open a test issue with a type:* label in a calling repo and confirm it lands on Project chore: finalize v0.0.1 release #1 "Server Infrastructure" and that an untyped item does not.

🤖 Generated with Claude Code

Replace the AI-driven router (claude-code-action + custom prompt) with a deterministic actions/add-to-project step. The org board exposes only Status and Phase fields, so board membership is the meaningful action; the model, prompt, and token spend were unnecessary. Items route only when they carry a type:* label, preserving the original inclusion rule. An app installation token (org Projects: write) authorizes the org board write.

Assisted-by: Claude:claude-opus-4-8
Remove the literal '|| openrouter/free' fallback from every AI workflow's model selection and collapse the phantom AI_MODEL_OPS/REVIEW/DOCS tier references (defined in no repo) down to vars.AI_MODEL. With AI_MODEL now an org-level variable, every repo inherits a valid model, so the literal fallback (an OpenRouter slug callers' keys can't access) is both unnecessary and harmful. Real tiers (CODE/ISSUES/PLAN) are retained as overrides.

Assisted-by: Claude:claude-opus-4-8
@JacobPEvans-personal JacobPEvans-personal merged commit 2f28cd4 into main Jun 4, 2026
1 check passed
@JacobPEvans-personal JacobPEvans-personal deleted the feat/native-project-router branch June 4, 2026 02:04
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