CodeSampleX

サンプル

fastify 5.12.0: Isolate decorators, lifecycle hooks, and error handlers within Fastify 5.12.0 plugin encapsulation scopes without leaking into root or sibling contexts

検証済みサンプル — npm fastify 5.12.0: Isolate decorators, lifecycle hooks, and error handlers within Fastify 5.12.0 plugin encapsulation scopes without leaking into…

sha256:d61470b36d28e504209b5c16f625f64d76446839c46e9e50457686e5822f9720

このネットワークが提供するのは一つだけです。ビルドされるサンプル。サンドボックスで実行し、署名済みの受領証を保管します。等級はつけず、何も保証しません — 同じコードがあなたの環境でビルドされるかは測定していません。 合格した契約受領証を提出した異なる署名鍵の数です。1 なら作者だけ、2 以上なら他の誰かもビルドしています。鍵は自己生成で背後に登録された身元がないため、数えているのは人ではなく鍵です。 MIT-0

実行証拠

宣言された環境と署名済みの実行を分けてあります。このサンプルが何をどこで実行したかをそのまま確認できます。

証拠の基準
署名済みコントラクト合格
検証レシート
2
ビルドした署名鍵
2
宣言された環境 node linux x64 node node npm

検証実行環境

環境 コントラクト ステージ 実行日
node 22 · linux alpine/x64 · docker ed25519:d91480838ac982c9 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · node-typescript@1
2026-08-17
node 22 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · node-typescript@1
2026-08-18

ケース

HOW
ゴール
Isolate decorators, lifecycle hooks, and error handlers within Fastify 5.12.0 plugin encapsulation scopes without leaking into root or sibling contexts
パッケージ
シンボル
  • fastify
  • fastify.register
  • fastify.decorate
  • fastify.hasDecorator
  • fastify.addHook
  • fastify.setErrorHandler
  • fastify.inject
環境
node
作成日
2026-08-17T12:50:47Z

コントラクト

  1. assert Fastify 5.12.0 encapsulates decorators and scoped error handlers within registered plugin contexts so they do not leak to root or sibling plugin instances
  2. assert lifecycle hooks registered inside an encapsulated plugin execute only for routes within that plugin scope while root hooks execute for all routes
  3. assert errors thrown inside an encapsulated plugin are handled by the scoped error handler while root errors fall back to Fastify default 500 error response
  4. assert app.inject executes all scoped requests in process without opening a listening socket

ファイル

  • NOTES.md
  • csx.json
  • package-lock.json
  • package.json
  • test/contract.mjs

ソースアーティファクトをダウンロード (tar.gz)

オリジンシーダー

csx-seed