Skip to content

Resolve #4191: Resolve Mongoose facade sessions at operation invocation - #4315

Merged
ayden94 merged 2 commits into
mainfrom
issue-4191
Nov 26, 2026
Merged

ayden94 merged 2 commits into
mainfrom
issue-4191

Conversation

@ayden94

@ayden94 ayden94 commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #4191.

Resolve the owning Mongoose connection’s ambient session when a facade operation is invoked.

Changes

  • Preserve facade and extracted-method calls without capturing a stale session.
  • Inject only the current owning wrapper’s session and forward original arguments when its scope is inactive.
  • Keep raw models obtained outside a transaction unchanged; retain overload, projection, receiver, and explicit-session behavior.
  • Document the call-time lifetime in the package README pair.

Testing

  • Mongoose regression suite: 248 passed. Governance regression suite: 537 passed.

  • Mongoose dependency build, stable Changeset verification and npm pack dry-run passed.

  • Original concurrent pnpm test:node: 1,754 passed, 0 failed, 1 skipped. The optional packed run is not claimed locally.

  • Exact-head review axes: contract, code, and verification. No axis omitted.

  • Full local CI was not run; the canonical remote workflow verifies the exact PR head.

Release impact

  • Consumer-visible change covered by a patch Changeset for @fluojs/mongoose.
  • No consumer-visible release impact.

Public export documentation

No public export signatures were added or changed. Existing API documentation remains applicable.

Behavioral contract

The approved transaction behavior is covered by deterministic regression tests. Existing native ownership, rollback contract, and unrelated entry points remain in scope only for preservation.

Platform consistency governance (SSOT)

Platform governance checks passed; this PR adds no new platform conformance claim.

@ayden94
ayden94 merged commit 11d2568 into main Nov 26, 2026
8 checks passed
@ayden94
ayden94 deleted the issue-4191 branch November 26, 2026 08:14
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.

[mongoose] 모델 facade 호출 시점에 현재 활성 세션을 사용

1 participant