Skip to content

fix: added patch to lock function - #1038

Merged
dennisvankekem merged 1 commit into
mainfrom
APL-1977
Jul 29, 2026
Merged

fix: added patch to lock function#1038
dennisvankekem merged 1 commit into
mainfrom
APL-1977

Conversation

@dennisvankekem

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings July 29, 2026 08:54

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

This PR updates the session middleware to treat PATCH requests as write operations (therefore enforcing the API lock and using an isolated session stack), and adds a focused Jest test suite to validate middleware behavior plus session cleanup helpers.

Changes:

  • Extend the “write methods” list to include PATCH, so locked APIs also block PATCH writes.
  • Remove the /v1/workloadCatalog early-return special case from write handling.
  • Add src/middleware/session.test.ts with unit tests covering read vs write routing, lock behavior, and cleanSession/cleanAllSessions.

Reviewed changes

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

File Description
src/middleware/session.ts Treats PATCH as a write method (lock-enforced) and simplifies write-request branching.
src/middleware/session.test.ts Adds Jest coverage for session middleware routing/locking and session cleanup helpers.

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

@dennisvankekem dennisvankekem changed the title fix: added path to lock function fix: added patch to lock function Jul 29, 2026
@dennisvankekem
dennisvankekem merged commit e58c13c into main Jul 29, 2026
10 checks passed
@dennisvankekem
dennisvankekem deleted the APL-1977 branch July 29, 2026 09:04
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