Skip to content

fix(kanban): decompose children inherit root workspace instead of forcing scratch#37172

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-f787aa79
Jun 2, 2026
Merged

fix(kanban): decompose children inherit root workspace instead of forcing scratch#37172
teknium1 merged 1 commit into
mainfrom
hermes/hermes-f787aa79

Conversation

@teknium1

@teknium1 teknium1 commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Summary

The /model picker no longer silently routes an OpenAI selection to OpenRouter. Users with a configured OpenAI provider (and no OpenRouter key) now stay on api.openai.com instead of hitting HTTP 401 "Missing Authentication header."

Root cause: hermes_cli/providers.py carries a legacy alias "openai" → "openrouter". The picker emitted a standalone slug="openai" row (gated on OPENAI_API_KEY); selecting it ran resolve_provider_full("openai"), which resolved that built-in alias to OpenRouter before checking the user's own providers.openai config.

Changes

  • model_switch.list_authenticated_providers: skip vendor names that are aliases to an aggregator (isolates exactly openai→openrouter; copilot/kimi/etc. are real providers and unaffected). Kills the phantom picker row.
  • providers.resolve_provider_full: user-config providers.<name> now resolves before the built-in alias table, so providers.openai (api.openai.com) beats the legacy alias.
  • model_switch PATH A: user-config providers resolve credentials via their own endpoint instead of the name-based runtime resolver that doesn't know user-config slugs; plus a fail-loud guard for explicit unauthed-aggregator hops.

Validation

Reporter config (provider=openai-api, no OpenRouter key) Before After
picker: OpenAI + gpt-4o-mini target=openrouter base=openrouter.ai → 401 target=openai base=api.openai.com ✓
explicit --provider openai-api api.openai.com ✓ api.openai.com ✓ (unchanged)

Targeted suites green (model_switch / providers / inventory / runtime / auth — 384 + 224 + 295 passing). Added 3 regression tests; converted 1 test that codified the phantom-row behavior.

Scope

Independent of #35056 (which doesn't touch the picker) and #24234 (separate encrypted-content 400). Does not change the OPENAI_API_KEY-implies-openrouter overlay (issue #6799) — that's a wider resolution-semantics change #35056 rewrites; the reported symptom is fixed without it.

Related issues: #14057 (duplicate OpenAI/openai picker rows), #19858 (model switcher hops to OpenRouter).

Infographic

kanban-workspace-inheritance

…cing scratch

decompose_triage_task hardcoded every fan-out child to workspace_kind
'scratch', ignoring the root task's workspace. A code-gen task created
with a dir:/worktree: workspace would fan out into throwaway scratch tmp
dirs (GC'd on archive), so generated code never landed in the project.

Children now inherit the root's workspace_kind + workspace_path. A child
dict may still override with its own workspace_kind/workspace_path; the
path only carries over when kinds match. Scratch roots are unchanged.
@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

🔎 Lint report: hermes/hermes-f787aa79 vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 9628 on HEAD, 9619 on base (🆕 +9)

🆕 New issues (3):

Rule Count
unresolved-attribute 2
not-subscriptable 1
First entries
tests/hermes_cli/test_kanban_decompose_db.py:230: [unresolved-attribute] unresolved-attribute: Attribute `workspace_path` is not defined on `None` in union `Task | None`
tests/hermes_cli/test_kanban_decompose_db.py:228: [not-subscriptable] not-subscriptable: Cannot subscript object of type `None` with no `__getitem__` method
tests/hermes_cli/test_kanban_decompose_db.py:205: [unresolved-attribute] unresolved-attribute: Attribute `workspace_kind` is not defined on `None` in union `Task | None`

✅ Fixed issues: none

Unchanged: 4984 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@teknium1 teknium1 merged commit 72e82f8 into main Jun 2, 2026
23 checks passed
@teknium1 teknium1 deleted the hermes/hermes-f787aa79 branch June 2, 2026 03:26
changman pushed a commit to changman/hermes-agent that referenced this pull request Jun 10, 2026
…cing scratch (NousResearch#37172)

decompose_triage_task hardcoded every fan-out child to workspace_kind
'scratch', ignoring the root task's workspace. A code-gen task created
with a dir:/worktree: workspace would fan out into throwaway scratch tmp
dirs (GC'd on archive), so generated code never landed in the project.

Children now inherit the root's workspace_kind + workspace_path. A child
dict may still override with its own workspace_kind/workspace_path; the
path only carries over when kinds match. Scratch roots are unchanged.
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