Skip to content

T-QK1S-adopt-preview-honours-group-under-plugin

State: planning/draft · Impact: medium · Complexity: medium

The import preview always reports paths under the default “adopted” group, even when the reader typed a different plugin name. The real import honours the typed name and lands the notes correctly, so the preview shows the reader the wrong destination for their own import.

LocationRole today
solutions/determined/crates/determined-platform/src/api/v1/agent_skills.rs:288-294get_adopt_preview(state, vault_id, source) takes no plugin argument; ontogen routes it as GET /agent-skills/adopt-preview/{vault_id}/{source}
solutions/determined/crates/determined-agent-skills/src/lib.rs:1426-1440get_adopt_preview hardcodes plugin: None into the AgentSkillAdoptRequest it builds for the dry run
solutions/determined/experiences/agent-pants/app/composables/useAgentSkillAdopt.ts:17-27useAgentSkillAdoptPreview(vault, source) calls the transport with only vault and source; it has no plugin parameter to pass
solutions/determined/packages/vault-platform-client/src/generated/transport.ts:388,1146-1153,3061-3065Generated transport method agentSkillGetAdoptPreview(vaultId, source); regenerates once the Rust signature changes

The preview takes the same plugin name the reader typed and reports every row’s entry_path/plugin under that name, matching what the real import will do.

  1. Add plugin: Option<String> to get_adopt_preview in determined-platform/src/api/v1/agent_skills.rs. Ontogen already routes an optional trailing String argument as a query parameter (see activity.rs’s athlete_id/q params), so this stays a GET.
  2. Thread plugin through to determined_agent_skills::get_adopt_preview and into the AgentSkillAdoptRequest it builds, replacing the hardcoded None.
  3. Regenerate the HTTP/IPC transports and core.generated.ts-equivalent TS client so agentSkillGetAdoptPreview gains the new parameter.
  4. Update useAgentSkillAdoptPreview to accept and forward a plugin accessor, and wire the import page’s typed field into it.
  5. Add a fixture test asserting a preview with a typed plugin name reports rows under that name, not “adopted”.
AreaNote
solutions/determined/crates/determined-platform/src/api/v1/agent_skills.rsAdd plugin: Option<String> to get_adopt_preview
solutions/determined/crates/determined-agent-skills/src/lib.rsForward plugin instead of hardcoding None
solutions/determined/crates/determined-platform/src/api/transport/http/generated.rsRegenerated: query param on the preview route
solutions/determined/crates/determined-platform/src/api/transport/ipc/generated.rsRegenerated: new IPC argument
solutions/determined/packages/vault-platform-client/src/generated/transport.tsRegenerated: new transport parameter
solutions/determined/experiences/agent-pants/app/composables/useAgentSkillAdopt.tsuseAgentSkillAdoptPreview takes and forwards a plugin accessor
solutions/determined/experiences/agent-pants/app/pages/apps/agent-pants/import.vuePass the typed “Group under plugin” field into the preview call
  • AC-1: Typing a plugin name and clicking Preview reports every row’s entry_path and plugin under that typed name, not “adopted”.
  • AC-2: Leaving the plugin field at its default still previews under “adopted”, unchanged from today.
  • AC-3: A fixture test covers both cases against get_adopt_preview.
  • Changing how the real import (runAgentSkillAdopt) resolves the plugin name — it already honours it correctly.
  • none

Found by the agent-pants bug survey, N-5LD4-bug-sweep-2026-09-12-agent-pants (row AP-68).


← Back to Tasks