fastify 6.0.0-alpha.0 → 6.0.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/.pi/self-learning-memory/README.md +8 -0
  2. package/.pi/self-learning-memory/core/CORE.md +33 -0
  3. package/.pi/self-learning-memory/core/index.json +735 -0
  4. package/.pi/self-learning-memory/daily/2026-07-06.md +22 -0
  5. package/.pi/self-learning-memory/daily/2026-07-29.md +50 -0
  6. package/.pi/self-learning-memory/daily/2026-08-04.md +41 -0
  7. package/.pi/self-learning-memory/daily/2026-08-18.md +40 -0
  8. package/.pi/self-learning-memory/long-term-memory.md +89 -0
  9. package/AGENTS.md +290 -0
  10. package/docs/Reference/ContentTypeParser.md +0 -4
  11. package/docs/Reference/Reply.md +14 -3
  12. package/docs/Reference/Request.md +0 -4
  13. package/docs/Reference/Server.md +8 -3
  14. package/fastify.d.ts +1 -1
  15. package/fastify.js +2 -2
  16. package/lib/content-type.js +4 -1
  17. package/lib/reply.js +11 -1
  18. package/lib/request.js +3 -2
  19. package/lib/route.js +2 -1
  20. package/lib/validation.js +10 -1
  21. package/package.json +2 -2
  22. package/test/close.test.js +34 -0
  23. package/test/content-parser.test.js +16 -18
  24. package/test/content-type.test.js +4 -0
  25. package/test/fix-root-primitive-coercion.test.js +35 -0
  26. package/test/helper.js +73 -1
  27. package/test/hooks-async.test.js +1 -2
  28. package/test/hooks.test.js +1 -2
  29. package/test/internals/reply.test.js +76 -1
  30. package/test/listen.1.test.js +17 -52
  31. package/test/listen.5.test.js +6 -9
  32. package/test/logger/instantiation.test.js +1 -1
  33. package/test/logger/logging.test.js +1 -1
  34. package/test/logger/request.test.js +1 -1
  35. package/test/logger/response.test.js +1 -1
  36. package/test/reply-media-type.test.js +131 -0
  37. package/test/route-prefix.test.js +33 -1
  38. package/test/route.6.test.js +4 -11
  39. package/test/schema-feature.test.js +36 -65
  40. package/test/schema-serialization.test.js +1 -1
  41. package/test/schema-special-usage.test.js +1 -1
  42. package/test/schema-validation.test.js +1 -1
  43. package/test/stream.2.test.js +1 -1
  44. package/test/trust-proxy.test.js +27 -21
  45. package/test/types/fastify.tst.ts +2 -0
  46. package/test/toolkit.js +0 -63
@@ -0,0 +1,8 @@
1
+ # Self-learning memory
2
+
3
+ This folder is auto-managed by pi-self-learning.
4
+
5
+ - daily/: day-by-day reflections
6
+ - monthly/: monthly summaries
7
+ - core/CORE.md: top-ranked durable learnings
8
+ - long-term-memory.md: complete learning history
@@ -0,0 +1,33 @@
1
+ # Core Learnings
2
+
3
+ Most important durable learnings collected over time.
4
+ Last updated: 2026-08-18T19:46:43.092Z
5
+
6
+ This file keeps only top-ranked, most repeated items.
7
+ For the complete history, see long-term-memory.md.
8
+
9
+ Ranked by frequency + recency (with light decay over time).
10
+
11
+ ## High-value learnings
12
+ - Closed PR #1 without merging after confirming its head SHA was already the intended private `main` commit.
13
+ - Fetched current `origin/main` and `origin/5.x`, verified each security commit’s parent exactly matched the corresponding remote tip, then used an atomic push.
14
+ - Verified public and private `main`/`5.x` refs matched, fast-forwarded local `main`, deleted temporary security branches, and confirmed a clean synchronized checkout.
15
+ - Obtained explicit approval before public disclosure, then atomically fast-forwarded `origin/main` to `af079bd4` and `origin/5.x` to `8acfea7e`, verifying both refs with `git ls-remote`.
16
+ - Fast-forwarded local `main` to `origin/main` and confirmed a clean synchronized status.
17
+ - Do not retry forbidden workspace GraphQL actions; use permitted repository operations or ask the user for an authorized alternative before attempting comments or metadata changes.
18
+ - Before any security-fix push, explicitly ask whether targets are the private advisory fork, public `origin`, or both; treat a draft advisory as a warning, not implicit authorization policy.
19
+ - Always state push destinations and exact resulting refs, e.g. `advisory-ghsa-3m5p/main` changed while `origin/main` remained at `6e95cb9f`.
20
+ - Run workspace-sensitive PR operations separately: attempt the comment, record an expected permission denial, then independently close only if authorized.
21
+ - Describe PR state from verified fields (`CLOSED`, `mergedAt: null`, head/base OIDs) rather than inferring that it is empty.
22
+
23
+ ## Watch-outs
24
+ - Private PR #1 remained open after its head commit had already been placed on private `main`; its mergeability was `UNKNOWN` and it was no longer the correct landing path.
25
+ - Local `main` and temporary security branches were left out of sync after updating the remote branches.
26
+ - Direct public branch updates bypassed the repository’s pull-request-only rules, so ancestry and target refs required explicit validation to avoid unsafe rewrites.
27
+ - Initially pushed the security fix only to the private advisory fork, leaving `origin/main` and `origin/5.x` unchanged without first confirming the intended publication target.
28
+ - After pushing remote refs, local `main` remained one commit behind, creating temporary local/remote inconsistency.
29
+ - A GraphQL `addComment` action was attempted despite workspace-repository restrictions; the denial indicates an intentional permission boundary that should not be bypassed.
30
+ - Assumed the draft advisory meant `origin/main` and `origin/5.x` must remain untouched without first confirming whether the user expected public pushes.
31
+ - Reported that the private branches were complete without clearly distinguishing advisory-fork refs from public `origin` refs, prompting the user to stop and verify deployment status.
32
+ - Combined PR closing with an unsupported workspace-repository comment under `set -e`, causing the entire command to fail before the close could occur.
33
+ - Called the PR “now-empty” even though GitHub still reported it as mergeable with different head and base OIDs.