Skip to content

fix(acp): retain Magpie source groups and native Hermes controls - #1093

Open
turingcat wants to merge 3 commits into
spacering-net:mainfrom
turingcat:fix/magpie-model-groups
Open

turingcat wants to merge 3 commits into
spacering-net:mainfrom
turingcat:fix/magpie-model-groups

Conversation

@turingcat

@turingcat turingcat commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Magpie-backed model selectors can flatten source groups, and Hermes's
compatibility catalog can overwrite newer native model/thought controls.

Decode only known Magpie transport wrappers for display and derive source
groups from their contained IDs. Preserve DSH route identity, original selector
strings, meaningful native groups and display names. Native Hermes controls
own establishment, late updates and setter replies; older Hermes keeps its
legacy path. When only model/thought controls are native, retain the advertised
legacy permission selector, and reconcile native/legacy permission state and
startup assertions so explicit mode changes reach the agent.

No provider/model catalog or reasoning levels are synthesized in Codeg.
The Magpie exporter and generic Hermes metadata support remain in their owning
repositories. Refs #776 and #777.

Fixes #1092.

Validation on the clean upstream branch:

  • Full frontend: 761 files / 11,327 tests passed on 8da74b42.
  • Full server: 6,246 library tests + 2 server tests passed, with the 5 existing live tests ignored.
  • Full ESLint and TypeScript, server Clippy (-D warnings), default desktop Cargo check, and Webpack production export passed.
  • The final 6ee600ab delta changes only the native setter reply classification and one Rust regression. Its exact reviewed tree passed 99 Hermes/CLI tests and server Clippy; the frontend/build inputs are unchanged from the full run.
  • Real DSH ACP options from a Magpie-generated temporary-home config were passed into the actual grouping module. Upstream/protocol groups and every opaque selector value were preserved. Real DSH requests carried the selected high level on Chat Completions, Responses and Messages.

Tests used temporary homes and existing locked dependencies. Node 26 requires NODE_OPTIONS=--no-experimental-webstorage; the production build used supported next build --webpack because the isolated checkout reuses externally linked dependencies. Installed agent configs and running applications were not changed.

Independent review covered the branch and both scoped fixes. The final tree is 5e1cf6ea84d16f8df2ad003f4ce8f04e7d9c19dd.

Companion catalog changes: yetone/magpie#5151 (review copy turingcat/magpie#1) and NousResearch/hermes-agent#148733.

Decode only the known Magpie wrappers when an agent exposes transport
buckets instead of upstream groups. Keep DSH routes in distinct names and
keys, preserve opaque callable values, and leave unrelated native groups
alone. Upstream names always come from the catalog's model IDs.

Prefer Hermes' advertised model options over its legacy model list and use
standard ACP for native controls. Retain native groups and refreshed
reasoning choices across updates and replies, while keeping legacy-only
Hermes functional. Restore saved legacy edit modes through the advertised
native policy option.

Validation:
- Red first: 9 grouping assertions and 8 Hermes assertions failed against
  the upstream implementation.
- Full Vitest: 760 files / 11,316 tests passed with
  NODE_OPTIONS=--no-experimental-webstorage (required by Node 26 here;
  the unflagged run failed on undefined localStorage).
- Full server Rust run in a temporary HOME with four test threads:
  6,238 library tests and 2 binary tests passed; 5 existing live tests
  remained ignored. All 30 Hermes selector tests passed.
- Full ESLint, full tsc, changed-TS Prettier check, server Clippy with
  warnings denied, desktop cargo check, and git diff --check passed.
- Production Webpack build exported all 37 routes. Default Turbopack
  could not resolve dependencies linked outside the isolated worktree.

Rust validation reused cached dependencies with --offline --locked.
Real installed-agent/UI integration remains a separate follow-up check.
Address review I1-I3 and M1 at the shared compatibility boundaries.
Native Hermes edit policies now update both legacy mode fields, while
legacy mode changes update native controls. Explicit mode requests release
the old policy assertion so a restrictive CLI request is neither skipped
nor undone by the previous permissive preference.

Keep an advertised legacy mode control alongside native model/thought
options when no native mode control supersedes it. The shared backend
payload is exercised by composer, settings and automation interaction
tests. First native model options arriving after legacy or empty
establishment promote native ownership.

Refine transport groups only when their expected metadata and wrapper
identity agree. Preserve meaningful native group labels on colliding
opaque keys, original choice order, DSH route identity, and legitimate
single-model display-name slashes.

Validation:
- RED: 7 grouping assertions and 8 Hermes/CLI assertions failed.
- RED: a separate policy-assertion lifecycle check failed before the
  shared mode sender released the old preference.
- GREEN: all 98 Hermes/CLI tests and 113 picker/editor tests passed.
- Changed-file ESLint, full TypeScript and git diff --check passed.
- Node 26 tests use NODE_OPTIONS=--no-experimental-webstorage.
- Rust used cached dependencies with --offline --locked, two build jobs
  and two test threads.

Fresh full suites/builds/Clippy are deferred to the coordinating agent
after scoped review; the prior commit's broad validation is historical.
A legacy-owned Hermes session can first advertise its native model in a
setter response. Recognize that advertisement when selecting the complete
reply path, so an unchanged model does not keep withdrawn reasoning choices
through the partial-notification merge. Keep advertised legacy modes and
leave notification handling unchanged.

Validation:
- One behavioral regression first failed: a model-only complete reply for
  the unchanged model retained reasoning_effort beside model and mode.
- All 99 targeted Hermes/CLI tests passed after the fix.
- Server Clippy passed with warnings denied.
- git diff --check passed; the diff is one condition and one test.
- Rust used --offline --locked, cached dependencies and two build jobs.

The coordinator's full validation at base 8da74b4 remains frozen; frontend
source is unchanged and no full suite was repeated for this narrow fix.
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.

Preserve Magpie upstream model groups and native Hermes configuration controls

1 participant