Skip to content

Agent UX: linked tests cannot be edited in place; changing a note means remove + re-add, which reorders indexes and drops provenance #1419

Description

@unbraind

Problem

A linked test's metadata (note, timeout_seconds, path, scope) cannot be changed in place. The only route is to remove the entry and re-add it:

pm test pm-github-9cjx --remove-index 1
pm test pm-github-9cjx --add-json '{"command":"npm run coverage","path":"scripts/coverage-gate.ts","scope":"project","timeout_seconds":900,"note":"Exact 100/100/100/100 gate …"}'

That has real costs for agents keeping trackers accurate:

  • The agent must restate every field. A forgotten path or timeout_seconds is silently dropped.
  • The entry moves to the end of --list order, so a later --only-index N or --remove-index N in a script or prompt now targets a different test.
  • The original provenance (author, created_at, source_ref) is replaced by the editor's. The record of who linked the test, and when, is lost.
  • History shows a removal plus an addition rather than an edit, which reads as a different test.

This came up in a code review: a reviewer bot flagged that a linked test note still said "this item remains open until it measures … exact 100" after the gate passed. Notes like this go stale whenever work completes, and every tracker hygiene pass has to work around it.

Proposal

pm test <id> --update <selector> --set note=… [--set timeout_seconds=…], or --update-index <n> --note …, that:

  • edits only the named fields, keeping position and the original provenance, plus an updated_by / updated_at pair;
  • records one test_updated history event with a field-level diff;
  • refuses selectors that match zero or several entries, with the candidates listed (like --remove);
  • has an SDK equivalent (updateLinkedTest) so extensions can maintain their own receipts.

Acceptance

  • Changing a note keeps the entry's --list index and original provenance.
  • History shows a single update event naming the changed fields.
  • An ambiguous or empty selector is refused, with no mutation.

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions