Skip to content

[Pages] Flag server logic with-pattern issues - #129

Merged
Priyanshu Agrawal (priyanshu92) merged 2 commits into
mainfrom
users/priyanshuag/serverlogic-with-pattern-validation
Apr 28, 2026
Merged

[Pages] Flag server logic with-pattern issues#129
Priyanshu Agrawal (priyanshu92) merged 2 commits into
mainfrom
users/priyanshuag/serverlogic-with-pattern-validation

Conversation

@priyanshu92

Copy link
Copy Markdown
Collaborator
  • Detect raw with( substrings before server-side validation fails at runtime
  • Document OData startswith/endswith literal splitting workaround
  • Add tests for rejected and accepted startswith patterns

- Detect raw with( substrings before server-side validation fails at runtime
- Document OData startswith/endswith literal splitting workaround
- Add tests for rejected and accepted startswith patterns

Co-authored-by: GPT-5.5 <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 28, 2026 14:30

Copilot AI 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.

Pull request overview

Adds proactive validation and documentation to prevent Power Pages Server Logic runtime failures caused by the platform’s prohibited with\s*\( pattern matching (including within OData function literals like startswith(), plus tests to lock in the behavior.

Changes:

  • Add raw-source scanning in server logic validator to flag with\s*\( occurrences (including inside string literals) with line reporting.
  • Document the prohibited-pattern caveat and the OData literal-splitting workaround; add a troubleshooting section for decoding X-Ms-UserTrace.
  • Add unit tests that confirm startswith( is rejected and the split-literal workaround passes.

Reviewed changes

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

File Description
plugins/power-pages/skills/add-server-logic/scripts/validate-serverlogic.js Adds a new validation rule to detect with\s*\( in raw source and emit actionable errors with line numbers.
plugins/power-pages/skills/add-server-logic/SKILL.md Documents prohibited script patterns, workaround for OData startswith(/endswith(, and adds runtime troubleshooting guidance.
plugins/power-pages/scripts/tests/validate-serverlogic.test.js Adds tests covering both the failing startswith( literal and the passing split-literal workaround.

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

Comment thread plugins/power-pages/skills/add-server-logic/SKILL.md
Comment thread plugins/power-pages/skills/add-server-logic/SKILL.md Outdated
Comment thread plugins/power-pages/skills/add-server-logic/SKILL.md Outdated
- 📝 Clarified the diagnostic log retrieval process.
- 🔄 Removed specific references to the Power Pages design studio diagnostics view.
- 🔍 Updated instructions for using Playwright MCP tools.
- ❌ Removed unnecessary steps and streamlined the troubleshooting flow.

-Priyanshu

Copilot AI 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.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.


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

@priyanshu92
Priyanshu Agrawal (priyanshu92) merged commit cbc5aca into main Apr 28, 2026
9 of 10 checks passed
@priyanshu92
Priyanshu Agrawal (priyanshu92) deleted the users/priyanshuag/serverlogic-with-pattern-validation branch April 28, 2026 15:32
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.

3 participants