Skip to content

fix(mural): send API-compliant arrow widget payload#2136

Merged
WilliamBerryiii merged 4 commits into
microsoft:mainfrom
akazlow:fix/mural-arrow-payload-schema
Jun 26, 2026
Merged

fix(mural): send API-compliant arrow widget payload#2136
WilliamBerryiii merged 4 commits into
microsoft:mainfrom
akazlow:fix/mural-arrow-payload-schema

Conversation

@akazlow

@akazlow akazlow commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Pull Request

Description

Fixes the Mural arrow widget payload shape to match API expectations.

The payload builder now emits normalized origin coordinates, non-zero bounding box dimensions, and points anchored to the normalized origin so arrow creation requests pass schema validation.

Related Issue(s)

Fixes #1941

Type of Change

Select all that apply:

Code & Documentation:

  • Bug fix (non-breaking change fixing an issue)
  • New feature (non-breaking change adding functionality)
  • Breaking change (fix or feature causing existing functionality to change)
  • Documentation update

Infrastructure & Configuration:

  • GitHub Actions workflow
  • Linting configuration (markdown, PowerShell, etc.)
  • Security configuration
  • DevContainer configuration
  • Dependency update

AI Artifacts:

  • Reviewed contribution with prompt-builder agent and addressed all feedback
  • Copilot instructions (.github/instructions/*.instructions.md)
  • Copilot prompt (.github/prompts/*.prompt.md)
  • Copilot agent (.github/agents/*.agent.md)
  • Copilot skill (.github/skills/*/SKILL.md)

Other:

  • Script/automation (.ps1, .sh, .py)
  • Other (please describe):

Testing

  • Updated and expanded tests in .github/skills/experimental/mural/tests/test_mural_helpers.py for:
    • reversed X direction normalization (x1 > x2)
    • vertical arrow clamping (x1 == x2)
    • horizontal arrow clamping (y1 == y2)
  • Updated command-level tests in .github/skills/experimental/mural/tests/test_mural_commands.py for payload contract alignment.
  • Local pytest execution is currently blocked in this shell due to missing pytest in the active .venv; CI remains the source of truth for full test execution.

Checklist

Required Checks

  • Documentation is updated (if applicable)
  • Files follow existing naming conventions
  • Changes are backwards compatible (if applicable)
  • Tests added for new functionality (if applicable)

AI Artifact Contributions

  • Used /prompt-analyze to review contribution
  • Addressed all feedback from prompt-builder review
  • Verified contribution follows common standards and type-specific requirements

Required Automated Checks

The following validation commands must pass before merging:

  • Markdown linting: npm run lint:md
  • Spell checking: npm run spell-check
  • Frontmatter validation: npm run lint:frontmatter
  • Skill structure validation: npm run validate:skills
  • Link validation: npm run lint:md-links
  • PowerShell analysis: npm run lint:ps
  • Plugin freshness: npm run plugin:generate
  • Docusaurus tests: npm run docs:test

Security Considerations

  • This PR does not contain any sensitive or NDA information
  • Any new dependencies have been reviewed for security issues
  • Security-related scripts follow the principle of least privilege

Additional Notes

  • Addressed review feedback by adding a clarifying clamp-intent code comment in _build_arrow_body and adding edge-case test coverage for degenerate dimensions.

@akazlow akazlow requested a review from a team as a code owner June 22, 2026 16:19
@akazlow akazlow self-assigned this Jun 22, 2026
@codecov-commenter

codecov-commenter commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.04%. Comparing base (44b42d4) to head (fd42d7f).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2136      +/-   ##
==========================================
- Coverage   81.24%   79.04%   -2.21%     
==========================================
  Files         127       85      -42     
  Lines       18831    13409    -5422     
  Branches       12        0      -12     
==========================================
- Hits        15300    10599    -4701     
+ Misses       3528     2810     -718     
+ Partials        3        0       -3     
Flag Coverage Δ
docusaurus ?
pester 86.04% <ø> (-0.02%) ⬇️
pytest 69.07% <100.00%> (-8.83%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ls/experimental/mural/scripts/mural/_validation.py 83.55% <100.00%> (+0.45%) ⬆️

... and 43 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@akazlow

akazlow commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

Review Summary

This fix corrects arrow widget payload schema to match Mural API requirements.

Key Changes

  • _validation.py: Updated arrow payload builder to emit required geometry fields
  • test_mural_commands.py + test_mural_helpers.py: Added/updated test coverage for arrow payload shape

Impact

  • Arrow widget creation requests now pass Mural API validation
  • Prevents silent failures due to malformed payloads
  • Test suite validates both old and new payload contracts

Verification Checklist

  • Geometry fields match Mural API schema
  • Test coverage spans both builder and helpers
  • Payload shape validated in command flow
  • No regression on other widget types

@rezatnoMsirhC rezatnoMsirhC left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you for your contribution! Before we proceed with the review, could you please update the PR description to follow the repository's PR template?

A few things to address:

  • Replace the current headings with the template's sections: ## Description, ## Related Issue(s), ## Type of Change, ## Testing, ## Checklist, and ## Security Considerations.
  • Check the appropriate boxes under Type of Change (this looks like a "Bug fix" and "Script/automation" change).
  • Move Fixes #1941 into the ## Related Issue(s) section.
  • Fill in the ## Testing section describing how you tested the changes.
  • Complete the ## Checklist and ## Security Considerations checkboxes.

No rush, and thanks again for taking the time to fix this!

Comment thread .github/skills/experimental/mural/scripts/mural/_validation.py
Comment thread .github/skills/experimental/mural/tests/test_mural_helpers.py
@akazlow

akazlow commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

Thank you for your contribution! Before we proceed with the review, could you please update the PR description to follow the repository's PR template?

A few things to address:

  • Replace the current headings with the template's sections: ## Description, ## Related Issue(s), ## Type of Change, ## Testing, ## Checklist, and ## Security Considerations.
  • Check the appropriate boxes under Type of Change (this looks like a "Bug fix" and "Script/automation" change).
  • Move Fixes #1941 into the ## Related Issue(s) section.
  • Fill in the ## Testing section describing how you tested the changes.
  • Complete the ## Checklist and ## Security Considerations checkboxes.

No rush, and thanks again for taking the time to fix this!

Can do!

@WilliamBerryiii WilliamBerryiii merged commit aaef669 into microsoft:main Jun 26, 2026
76 checks passed
@github-actions github-actions Bot mentioned this pull request Jun 26, 2026
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.

fix: Mural CLI arrow create sends payload shape rejected by API

4 participants