Skip to content

T-L7YP-git-panel-commit-with-validation

State: planning/proposed · Impact: high · Complexity: large

The user wants to commit a vault’s changes without leaving the app, but only after a check that the changed skills and notes still conform to their models. This task adds a Git section to the stacked left panel with stage/message/commit, running pluggable per-aspect validators first, so a broken skill or an invalid frontmatter schema is caught before it lands in history.

LocationRole today
solutions/determined/crates/determined-platform/src/api/v1/One route module per capability; no git_commit op and no validation-before-write hook
solutions/agent-pants/crates/agent-adapt-core/src/discover.rs#discover_componentsRefuses malformed components (bad name, missing description, path collisions, symlinks); reachable today only through get_component_tree
solutions/determined/crates/determined-agent-skills/src/lib.rs#get_component_treeThe one caller of discover_components reachable from the UI; returns a tree plus an in-band scan-refusal banner, not a standalone check
solutions/determined/experiences/agent-pants/app/utils/componentTreeState.tsRenders that scan-refusal banner; has no notion of “run this as a pre-commit check”
solutions/determined/experiences/polish/app/components/PolishSchemaValidationPane.vuePolish’s own schema-validation UI, over scan_schema_validation/get_schema_validation_results
solutions/determined/crates/determined-platform/src/api/v1/polish_schema.rsscan_schema_validation, get_schema_validation_results; a full scan, not scoped to a commit’s changed files
solutions/determined/packages/vault-contracts/@sksizer/vault-contracts, polish’s shared markdown-contract config; the schema source those endpoints validate against
solutions/determined/crates/determined-platform/src/api/v1/settings.rsget_namespace/set_namespace/set_value/delete_value over a whole-namespace key-value store; no “ignore this rule” convention yet
packages/ts/app-frame/app/composables/useSettingsSection.tsDeclarative zod-mode settings persistence over that same transport; no per-vault ignore-list section
solutions/determined/crates/determined-backup/src/git.rsThe one existing process-shelling git module; bare-repo-specific, not reusable for a live-vault commit

A Git section inside the stacked left panel (from T-SK5T-stacked-left-panel) lists changed files, opens a diff of the selected one in the code viewer (T-MVW5-code-editor-package), and lets the user write a message and commit through a new git_commit op. Before the commit runs, every aspect-registered validator from T-QGMQ-vault-facilities-decision runs against the changed paths: agent-pants contributes a new check_vault op wrapping discover_components’s refusals (promoted out from behind get_component_tree into its own callable check), and polish contributes its existing schema validation. A dialog lists what each validator found: a refusal (a conflict, an unreadable symlink) blocks the commit outright; a warning can be dismissed once or silenced permanently per rule, with the silence recorded in the vault’s settings namespace so it survives a restart. A changed container whose closure hash has moved gets the version-bump suggestion from T-5CZO-version-bump-suggestions inline in the same dialog.

  1. Land check_vault in agent-adapt-core/determined-agent-skills: a callable op that runs discover_components (or a narrower single-path variant) and returns its refusals and warnings as a typed list, independent of get_component_tree’s tree response.
  2. Define the pluggable-validator seam named by T-QGMQ-vault-facilities-decision: a trait or a registry keyed by VaultAspect (or by vault contents) that check_vault and polish’s schema validation both implement; the exact shape follows that task’s outcome.
  3. Add git_commit(vault_id, paths, message) to determined-platform/src/api/v1/git.rs (created by T-NS6Z-vault-git-status-service), staging the given paths and committing over easy-git/fluent-git.
  4. Wire the validator run before git_commit dispatches: a refusal returns Invalid and never reaches git; a warning rides back to the caller for the dialog to render.
  5. Add an ignore-store settings namespace (e.g. git.ignored_rules) read through useSettingsSection.ts/settings.rs, keyed by rule id, so “Always ignore this rule” persists per vault.
  6. Build the Git section’s Vue surface inside the stacked panel: file list, diff via the code viewer, message field, commit button, and the warnings dialog with Ignore once / Always ignore.
  7. Wire the version-bump suggestion’s commit-time half into the same dialog for containers whose closure hash changed since the last published manifest.
AreaNote
solutions/agent-pants/crates/agent-adapt-core/src/discover.rsExpose a callable check_vault-shaped result independent of the tree walk
solutions/determined/crates/determined-agent-skills/src/lib.rsNew check_vault op
solutions/determined/crates/determined-platform/src/api/v1/git.rsgit_commit op (the file also carries git_status from T-NS6Z-vault-git-status-service)
solutions/determined/crates/determined-platform/src/api/v1/settings.rsIgnore-store namespace conventions, if the generic settings surface needs a new shape
solutions/determined/experiences/polish/app/components/PolishSchemaValidationPane.vueExpose its validation as a callable pre-commit contributor
packages/ts/app-frame/app/composables/useSettingsSection.tsIgnore-store read/write for the commit dialog
solutions/determined/packages/shell/app/components/ShellGitPanel.vueThe Git section inside the stacked panel
solutions/determined/packages/shell/app/components/ShellGitCommitDialog.vueThe validation-warnings and commit dialog
  • AC-1: Committing a vault with an agent-pants refusal (e.g. a path collision) is blocked, and the dialog names the refused path and reason.
  • AC-2: Committing a vault with only warnings succeeds after “Ignore once”, and the same warning does not block a later commit once “Always ignore this rule” is set for it.
  • AC-3: A changed container whose closure hash differs from its last published manifest shows the version-bump suggestion in the commit dialog.
  • AC-4: The diff for a selected changed file renders in the code viewer from T-MVW5-code-editor-package.
  • AC-5: check_vault is callable independent of get_component_tree and covered by a unit test asserting it surfaces the same refusals discover_components already tests.
  • Resolving merge conflicts; a conflicted path blocks the commit with no in-app resolution UI.
  • Push, pull, branch switching, or any remote operation.
  • A generic plugin API for third-party validators; only agent-pants and polish contribute this pass.

From the user’s Agent Manager planning request of 2026-09-07, expanded in solutions/agent-pants/docs/vault/design/workflow-and-ux-assessment.md. The agent-pants half of the validator — promoting discover_components’s refusals out from behind get_component_tree — is grounded in solutions/agent-pants/docs/vault/research/agent-skills-conformance.md’s finding that spec validation runs nowhere client-facing today (its gap G10).

T-NS6Z-vault-git-status-service, T-SK5T-stacked-left-panel, T-MVW5-code-editor-package, T-QGMQ-vault-facilities-decision


← Back to Tasks