Resolve #2753: Document Prisma readiness without AsyncLocalStorage#2762
Merged
Conversation
…d fallback boundary Document the not-ready readiness state when the host runtime does not provide AsyncLocalStorage while the Prisma client supports interactive transactions. The readiness reason, details.transactionContext 'unavailable' value, and the application-owned fallback boundary were implemented in status.ts and service.ts but not surfaced in the Prisma README or the beginner book chapter. - README.md / README.ko.md: extend the Shutdown and Status Contracts readiness bullet with the ALS-unavailable condition, the readiness reason text, and a paragraph describing the application-owned fallback boundary (raw PrismaClient via PRISMA_CLIENT, or a host that provides ALS). - book/beginner/ch12-prisma.md / ch12-prisma.ko.md: add a Readiness Without AsyncLocalStorage section after Transaction Awareness so readers meet the unavailable readiness state before the transaction chapter. Closes #2753
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Linked context: #2753 —
[audit][area:persistence] Document Prisma readiness without AsyncLocalStorage (priority:p2).The Prisma package already implements the not-ready readiness state when the host runtime does not provide
AsyncLocalStorage(packages/prisma/src/status.tsandservice.ts), but that state was not surfaced in the Prisma README or the beginner book chapter. Operators could not distinguish an unsupported transaction context from an ordinary database readiness failure. This PR documents the unavailable-ALS readiness behavior and the application-owned fallback boundary.Changes
packages/prisma/README.md— Extended the Shutdown and Status Contracts readiness bullet to include the ALS-unavailable condition (client supports interactive transactions but host has noAsyncLocalStorage), the readiness reason text, and thedetails.transactionContext: 'unavailable'value. Added a paragraph describing the application-owned fallback boundary: callers must use the rawPrismaClient(viaPRISMA_CLIENT) and manage their own consistency, or run on a host that provides ALS. Surface theunavailablestate in health checks and route traffic away from transaction-dependent handlers.packages/prisma/README.ko.md— Korean mirror of the same README changes (behavioral contract Rule 1 EN/KO parity).book/beginner/ch12-prisma.md— Added a Readiness Without AsyncLocalStorage section after Transaction Awareness so readers meet theunavailablereadiness state before the transaction chapter.book/beginner/ch12-prisma.ko.md— Korean mirror of the same book section.Testing
Doc-only change. Verification run in the dedicated worktree:
pnpm verify:platform-consistency-governance— Platform consistency governance checks passed.pnpm lint— No new diagnostics on changed files (only pre-existing warnings/infos on unrelated files).pnpm verify:public-export-tsdoc— Public export TSDoc checks passed (changed mode).No runtime behavior, public API, package contents, or release metadata changed; no tests added because no behavior changed.
Release impact
Doc-only edit. No public
@fluojs/*package behavior, API surface, package contents, or release metadata changed. PerCONTRIBUTING.md, docs-only edits do not require a changeset.Public export documentation
See docs/contracts/public-export-tsdoc-baseline.md for the repo-wide authoring baseline.
@param/@returnstags where applicable. — No exported functions changed.@exampleblocks and README scenario examples still play complementary roles. — README scenario examples extended, not replaced.Behavioral contract
See docs/contracts/behavioral-contract-policy.md for full details.
status.ts/service.tsbehavior is already covered bymodule.test.tsandtransaction-compat.test.ts.Platform consistency governance (SSOT)
See docs/architecture/platform-consistency-design.md and docs/contracts/release-governance.md.
pnpm verify:platform-consistency-governancepassed.Closes #2753