Skip to content

Feature/wave3 editing tools#138

Open
mrdailey99 wants to merge 2 commits intodevelopfrom
feature/wave3-editing-tools
Open

Feature/wave3 editing tools#138
mrdailey99 wants to merge 2 commits intodevelopfrom
feature/wave3-editing-tools

Conversation

@mrdailey99
Copy link
Copy Markdown
Collaborator

No description provided.

mrdailey99 and others added 2 commits May 1, 2026 15:59
Posts version, tag, deployer, and auto-extracted change notes (feat/fix
commits since previous tag) on successful publish. Falls back to GitHub
Release body when available. Payload built via jq for safe escaping.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- plan_name: tighten validation to reject dot-segments (..) via safe-name
  regex; previously plan_name=".." resolved to projectRoot
- UI-TARGET-001 / UI-LOCATOR-001 / SETVALUES-STRUCTURE-001: fire when
  <value> node is present but class attribute is absent, not only when
  class is wrong; distinguish via "(missing)" in error message
- Add 5 tests covering the new missing-class and dot-segment cases

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 1, 2026 21:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR tightens validation for test plan creation inputs, expands local test case validation to flag missing XML class attributes (not just wrong ones), and enhances the manual deploy workflow with full git history and Slack release notifications.

Changes:

  • Reject unsafe/invalid plan_name values in provar.testplan.create (e.g., dot segments and path separators) and add unit coverage.
  • Update validateTestCase rules to also error when required <value> nodes are missing class attributes, with new unit tests.
  • Update the DeployManual GitHub Actions workflow to fetch full history/tags and post a Slack notification with extracted release notes.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
test/unit/mcp/testPlanTools.test.ts Adds tests to ensure invalid plan_name inputs are rejected.
test/unit/mcp/testCaseValidate.test.ts Adds tests ensuring missing class attributes now trigger the expected validation rules.
src/mcp/tools/testPlanTools.ts Replaces path-separator checks with a stricter plan_name allowlist regex + updated error message.
src/mcp/tools/testCaseValidate.ts Expands validation rules to treat missing class as an error and improves messages to indicate “(missing)”.
.github/workflows/DeployManual.yml Fetches full git history/tags and builds/sends a Slack Block Kit notification payload after publish.
Comments suppressed due to low confidence (1)

src/mcp/tools/testPlanTools.ts:119

  • The plan_name regex currently allows trailing spaces (e.g. "MyPlan ") because the pattern ends with [\w\- ]*. On Windows/NTFS this can lead to surprising behavior (trailing spaces often get normalized/stripped), causing the returned plan_dir to differ from the actual directory created. Consider trimming plan_name and/or tightening validation to disallow leading/trailing whitespace (and possibly consecutive whitespace) before creating the directory.
        if (!/^[A-Za-z0-9][\w\- ]*$/.test(plan_name)) {
          return {
            isError: true,
            content: [
              {
                type: 'text' as const,
                text: JSON.stringify(makeError('INVALID_PLAN_NAME', `plan_name must start with a letter or digit and contain only letters, digits, underscores, hyphens, or spaces: "${plan_name}"`, requestId)),
              },
            ],
          };
        }
        const planDir = path.join(projectRoot, 'plans', plan_name);

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +409 to +411
const valueNode = targetArg['value'] as Record<string, unknown> | undefined;
if (!valueNode) return;
const valClass = valueNode['@_class'] as string | undefined;
Comment on lines +446 to +448
const locatorNode = locatorArg['value'] as Record<string, unknown> | undefined;
if (locatorNode) {
const valClass = locatorNode['@_class'] as string | undefined;
Comment on lines +470 to +472
const valuesNode = valuesArg['value'] as Record<string, unknown> | undefined;
if (valuesNode) {
const valClass = valuesNode['@_class'] as string | undefined;
# Auto-extract from git log since the previous tag
if [ "${{ github.event_name }}" = "release" ]; then
# For a release event HEAD is already the new tag; find the one before it
PREV=$(git tag --sort=-creatordate | awk "/^${GITHUB_REF_NAME}$/{found=1;next} found{print;exit}")
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.

2 participants