gina 0.7.13 → 0.7.14

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 (636) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +42 -39
  3. package/ROADMAP.md +2 -0
  4. package/framework/v0.7.14/VERSION +1 -0
  5. package/framework/{v0.7.13 → v0.7.14}/core/connectors/couchbase/index.js +121 -14
  6. package/framework/{v0.7.13 → v0.7.14}/core/connectors/sqlite/index.js +69 -6
  7. package/framework/{v0.7.13 → v0.7.14}/core/controller/controller.js +31 -3
  8. package/framework/{v0.7.13 → v0.7.14}/core/controller/controller.render-json.js +19 -1
  9. package/framework/{v0.7.13 → v0.7.14}/core/controller/controller.render-nunjucks.js +19 -1
  10. package/framework/{v0.7.13 → v0.7.14}/core/controller/controller.render-swig.js +29 -1
  11. package/framework/{v0.7.13 → v0.7.14}/core/controller/controller.render-v1.js +4 -0
  12. package/framework/{v0.7.13 → v0.7.14}/core/gna.js +67 -57
  13. package/framework/{v0.7.13 → v0.7.14}/core/server.isaac.js +36 -2
  14. package/framework/{v0.7.13 → v0.7.14}/core/server.js +436 -182
  15. package/framework/{v0.7.13 → v0.7.14}/helpers/json/src/main.js +48 -16
  16. package/framework/{v0.7.13 → v0.7.14}/lib/cache/src/main.js +10 -3
  17. package/framework/{v0.7.13 → v0.7.14}/lib/render-cache/src/main.js +487 -25
  18. package/framework/{v0.7.13 → v0.7.14}/lib/sqlite-driver.js +20 -4
  19. package/framework/{v0.7.13 → v0.7.14}/package.json +1 -1
  20. package/gna.js +4 -4
  21. package/llms.txt +12 -12
  22. package/package.json +3 -3
  23. package/framework/v0.7.13/VERSION +0 -1
  24. /package/framework/{v0.7.13 → v0.7.14}/AUTHORS +0 -0
  25. /package/framework/{v0.7.13 → v0.7.14}/LICENSE +0 -0
  26. /package/framework/{v0.7.13 → v0.7.14}/core/asset/html/nolayout.html +0 -0
  27. /package/framework/{v0.7.13 → v0.7.14}/core/asset/html/static.html +0 -0
  28. /package/framework/{v0.7.13 → v0.7.14}/core/asset/img/android-chrome-192x192.png +0 -0
  29. /package/framework/{v0.7.13 → v0.7.14}/core/asset/img/android-chrome-512x512.png +0 -0
  30. /package/framework/{v0.7.13 → v0.7.14}/core/asset/img/apple-touch-icon.png +0 -0
  31. /package/framework/{v0.7.13 → v0.7.14}/core/asset/img/favicon-16x16.png +0 -0
  32. /package/framework/{v0.7.13 → v0.7.14}/core/asset/img/favicon-32x32.png +0 -0
  33. /package/framework/{v0.7.13 → v0.7.14}/core/asset/img/favicon.ico +0 -0
  34. /package/framework/{v0.7.13 → v0.7.14}/core/asset/plugin/README.md +0 -0
  35. /package/framework/{v0.7.13 → v0.7.14}/core/asset/plugin/dist/vendor/gina/beemaster/beemaster.css +0 -0
  36. /package/framework/{v0.7.13 → v0.7.14}/core/asset/plugin/dist/vendor/gina/beemaster/beemaster.js +0 -0
  37. /package/framework/{v0.7.13 → v0.7.14}/core/asset/plugin/dist/vendor/gina/beemaster/index.html +0 -0
  38. /package/framework/{v0.7.13 → v0.7.14}/core/asset/plugin/dist/vendor/gina/css/gina.min.css +0 -0
  39. /package/framework/{v0.7.13 → v0.7.14}/core/asset/plugin/dist/vendor/gina/css/gina.min.css.br +0 -0
  40. /package/framework/{v0.7.13 → v0.7.14}/core/asset/plugin/dist/vendor/gina/css/gina.min.css.gz +0 -0
  41. /package/framework/{v0.7.13 → v0.7.14}/core/asset/plugin/dist/vendor/gina/html/statusbar.html +0 -0
  42. /package/framework/{v0.7.13 → v0.7.14}/core/asset/plugin/dist/vendor/gina/html/statusbar.html.br +0 -0
  43. /package/framework/{v0.7.13 → v0.7.14}/core/asset/plugin/dist/vendor/gina/html/statusbar.html.gz +0 -0
  44. /package/framework/{v0.7.13 → v0.7.14}/core/asset/plugin/dist/vendor/gina/inspector/have_heart_one-webfont.woff2 +0 -0
  45. /package/framework/{v0.7.13 → v0.7.14}/core/asset/plugin/dist/vendor/gina/inspector/index.html +0 -0
  46. /package/framework/{v0.7.13 → v0.7.14}/core/asset/plugin/dist/vendor/gina/inspector/inspector.css +0 -0
  47. /package/framework/{v0.7.13 → v0.7.14}/core/asset/plugin/dist/vendor/gina/inspector/inspector.js +0 -0
  48. /package/framework/{v0.7.13 → v0.7.14}/core/asset/plugin/dist/vendor/gina/inspector/logo.svg +0 -0
  49. /package/framework/{v0.7.13 → v0.7.14}/core/asset/plugin/dist/vendor/gina/js/gina.js +0 -0
  50. /package/framework/{v0.7.13 → v0.7.14}/core/asset/plugin/dist/vendor/gina/js/gina.min.js +0 -0
  51. /package/framework/{v0.7.13 → v0.7.14}/core/asset/plugin/dist/vendor/gina/js/gina.min.js.br +0 -0
  52. /package/framework/{v0.7.13 → v0.7.14}/core/asset/plugin/dist/vendor/gina/js/gina.min.js.gz +0 -0
  53. /package/framework/{v0.7.13 → v0.7.14}/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js +0 -0
  54. /package/framework/{v0.7.13 → v0.7.14}/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.br +0 -0
  55. /package/framework/{v0.7.13 → v0.7.14}/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.gz +0 -0
  56. /package/framework/{v0.7.13 → v0.7.14}/core/config.js +0 -0
  57. /package/framework/{v0.7.13 → v0.7.14}/core/config.param-bindings.js +0 -0
  58. /package/framework/{v0.7.13 → v0.7.14}/core/config.requirements-anchor.js +0 -0
  59. /package/framework/{v0.7.13 → v0.7.14}/core/connectors/ai/index.js +0 -0
  60. /package/framework/{v0.7.13 → v0.7.14}/core/connectors/ai/lib/connector.js +0 -0
  61. /package/framework/{v0.7.13 → v0.7.14}/core/connectors/couchbase/lib/connector.js +0 -0
  62. /package/framework/{v0.7.13 → v0.7.14}/core/connectors/couchbase/lib/connector.v3.js +0 -0
  63. /package/framework/{v0.7.13 → v0.7.14}/core/connectors/couchbase/lib/connector.v4.js +0 -0
  64. /package/framework/{v0.7.13 → v0.7.14}/core/connectors/couchbase/lib/n1ql.js +0 -0
  65. /package/framework/{v0.7.13 → v0.7.14}/core/connectors/couchbase/lib/session-store.js +0 -0
  66. /package/framework/{v0.7.13 → v0.7.14}/core/connectors/couchbase/lib/session-store.v3.js +0 -0
  67. /package/framework/{v0.7.13 → v0.7.14}/core/connectors/couchbase/lib/session-store.v4.js +0 -0
  68. /package/framework/{v0.7.13 → v0.7.14}/core/connectors/couchbase/lib/storage-store.js +0 -0
  69. /package/framework/{v0.7.13 → v0.7.14}/core/connectors/duckdb/index.js +0 -0
  70. /package/framework/{v0.7.13 → v0.7.14}/core/connectors/duckdb/lib/connector.js +0 -0
  71. /package/framework/{v0.7.13 → v0.7.14}/core/connectors/mongodb/index.js +0 -0
  72. /package/framework/{v0.7.13 → v0.7.14}/core/connectors/mongodb/lib/connector.js +0 -0
  73. /package/framework/{v0.7.13 → v0.7.14}/core/connectors/mongodb/lib/job-store.js +0 -0
  74. /package/framework/{v0.7.13 → v0.7.14}/core/connectors/mongodb/lib/pipeline-loader.js +0 -0
  75. /package/framework/{v0.7.13 → v0.7.14}/core/connectors/mongodb/lib/session-store.js +0 -0
  76. /package/framework/{v0.7.13 → v0.7.14}/core/connectors/mysql/index.js +0 -0
  77. /package/framework/{v0.7.13 → v0.7.14}/core/connectors/mysql/lib/connector.js +0 -0
  78. /package/framework/{v0.7.13 → v0.7.14}/core/connectors/param-redact.js +0 -0
  79. /package/framework/{v0.7.13 → v0.7.14}/core/connectors/postgresql/index.js +0 -0
  80. /package/framework/{v0.7.13 → v0.7.14}/core/connectors/postgresql/lib/connector.js +0 -0
  81. /package/framework/{v0.7.13 → v0.7.14}/core/connectors/redis/index.js +0 -0
  82. /package/framework/{v0.7.13 → v0.7.14}/core/connectors/redis/lib/connector.js +0 -0
  83. /package/framework/{v0.7.13 → v0.7.14}/core/connectors/redis/lib/job-store.js +0 -0
  84. /package/framework/{v0.7.13 → v0.7.14}/core/connectors/redis/lib/kv-store.js +0 -0
  85. /package/framework/{v0.7.13 → v0.7.14}/core/connectors/redis/lib/render-cache-store.js +0 -0
  86. /package/framework/{v0.7.13 → v0.7.14}/core/connectors/redis/lib/session-store.js +0 -0
  87. /package/framework/{v0.7.13 → v0.7.14}/core/connectors/scylladb/index.js +0 -0
  88. /package/framework/{v0.7.13 → v0.7.14}/core/connectors/scylladb/lib/connector.js +0 -0
  89. /package/framework/{v0.7.13 → v0.7.14}/core/connectors/scylladb/lib/session-store.js +0 -0
  90. /package/framework/{v0.7.13 → v0.7.14}/core/connectors/settle-once.js +0 -0
  91. /package/framework/{v0.7.13 → v0.7.14}/core/connectors/sql-parser.js +0 -0
  92. /package/framework/{v0.7.13 → v0.7.14}/core/connectors/sqlite/lib/connector.js +0 -0
  93. /package/framework/{v0.7.13 → v0.7.14}/core/connectors/sqlite/lib/job-store.js +0 -0
  94. /package/framework/{v0.7.13 → v0.7.14}/core/connectors/sqlite/lib/kv-store.js +0 -0
  95. /package/framework/{v0.7.13 → v0.7.14}/core/connectors/sqlite/lib/session-store.js +0 -0
  96. /package/framework/{v0.7.13 → v0.7.14}/core/content.encoding +0 -0
  97. /package/framework/{v0.7.13 → v0.7.14}/core/controller/controller.framework.js +0 -0
  98. /package/framework/{v0.7.13 → v0.7.14}/core/controller/controller.render-nunjucks-async.js +0 -0
  99. /package/framework/{v0.7.13 → v0.7.14}/core/controller/controller.render-stream.js +0 -0
  100. /package/framework/{v0.7.13 → v0.7.14}/core/controller/controller.render-swig-async.js +0 -0
  101. /package/framework/{v0.7.13 → v0.7.14}/core/controller/controller.render-xml.js +0 -0
  102. /package/framework/{v0.7.13 → v0.7.14}/core/controller/index.js +0 -0
  103. /package/framework/{v0.7.13 → v0.7.14}/core/controller/inline-script.js +0 -0
  104. /package/framework/{v0.7.13 → v0.7.14}/core/controller/inspector-window-emit.js +0 -0
  105. /package/framework/{v0.7.13 → v0.7.14}/core/controller/layout-source.js +0 -0
  106. /package/framework/{v0.7.13 → v0.7.14}/core/controller/preload-hints.js +0 -0
  107. /package/framework/{v0.7.13 → v0.7.14}/core/controller/release-banner.js +0 -0
  108. /package/framework/{v0.7.13 → v0.7.14}/core/controller/render-data.js +0 -0
  109. /package/framework/{v0.7.13 → v0.7.14}/core/controller/render-session.js +0 -0
  110. /package/framework/{v0.7.13 → v0.7.14}/core/dev/index.js +0 -0
  111. /package/framework/{v0.7.13 → v0.7.14}/core/dev/lib/class.js +0 -0
  112. /package/framework/{v0.7.13 → v0.7.14}/core/dev/lib/factory.js +0 -0
  113. /package/framework/{v0.7.13 → v0.7.14}/core/dev/lib/tools.js +0 -0
  114. /package/framework/{v0.7.13 → v0.7.14}/core/locales/README.md +0 -0
  115. /package/framework/{v0.7.13 → v0.7.14}/core/locales/currency.json +0 -0
  116. /package/framework/{v0.7.13 → v0.7.14}/core/locales/dist/language/en.json +0 -0
  117. /package/framework/{v0.7.13 → v0.7.14}/core/locales/dist/language/fr.json +0 -0
  118. /package/framework/{v0.7.13 → v0.7.14}/core/locales/dist/region/en.json +0 -0
  119. /package/framework/{v0.7.13 → v0.7.14}/core/locales/dist/region/fr.json +0 -0
  120. /package/framework/{v0.7.13 → v0.7.14}/core/locales/index.js +0 -0
  121. /package/framework/{v0.7.13 → v0.7.14}/core/mime.types +0 -0
  122. /package/framework/{v0.7.13 → v0.7.14}/core/model/entity.js +0 -0
  123. /package/framework/{v0.7.13 → v0.7.14}/core/model/index.js +0 -0
  124. /package/framework/{v0.7.13 → v0.7.14}/core/model/template/entityFactory.js +0 -0
  125. /package/framework/{v0.7.13 → v0.7.14}/core/model/template/index.js +0 -0
  126. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/README.md +0 -0
  127. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/index.js +0 -0
  128. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/csrf/README.md +0 -0
  129. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/csrf/package.json +0 -0
  130. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/csrf/src/main.js +0 -0
  131. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/README.md +0 -0
  132. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/coep/README.md +0 -0
  133. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/coep/package.json +0 -0
  134. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/coep/src/main.js +0 -0
  135. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/coop/README.md +0 -0
  136. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/coop/package.json +0 -0
  137. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/coop/src/main.js +0 -0
  138. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/corp/README.md +0 -0
  139. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/corp/package.json +0 -0
  140. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/corp/src/main.js +0 -0
  141. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/csp/README.md +0 -0
  142. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/csp/package.json +0 -0
  143. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/csp/src/main.js +0 -0
  144. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/hide-powered-by/README.md +0 -0
  145. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/hide-powered-by/package.json +0 -0
  146. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/hide-powered-by/src/main.js +0 -0
  147. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/hsts/README.md +0 -0
  148. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/hsts/package.json +0 -0
  149. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/hsts/src/main.js +0 -0
  150. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/origin-agent-cluster/README.md +0 -0
  151. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/origin-agent-cluster/package.json +0 -0
  152. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/origin-agent-cluster/src/main.js +0 -0
  153. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/package.json +0 -0
  154. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/referrer-policy/README.md +0 -0
  155. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/referrer-policy/package.json +0 -0
  156. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/referrer-policy/src/main.js +0 -0
  157. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/src/main.js +0 -0
  158. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/x-content-type-options/README.md +0 -0
  159. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/x-content-type-options/package.json +0 -0
  160. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/x-content-type-options/src/main.js +0 -0
  161. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/x-dns-prefetch-control/README.md +0 -0
  162. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/x-dns-prefetch-control/package.json +0 -0
  163. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/x-dns-prefetch-control/src/main.js +0 -0
  164. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/x-download-options/README.md +0 -0
  165. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/x-download-options/package.json +0 -0
  166. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/x-download-options/src/main.js +0 -0
  167. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/x-frame-options/README.md +0 -0
  168. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/x-frame-options/package.json +0 -0
  169. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/x-frame-options/src/main.js +0 -0
  170. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/x-permitted-cross-domain-policies/README.md +0 -0
  171. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/x-permitted-cross-domain-policies/package.json +0 -0
  172. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/x-permitted-cross-domain-policies/src/main.js +0 -0
  173. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/x-xss-protection/README.md +0 -0
  174. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/x-xss-protection/package.json +0 -0
  175. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/security-headers/x-xss-protection/src/main.js +0 -0
  176. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/session/README.md +0 -0
  177. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/session/package.json +0 -0
  178. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/session/src/main.js +0 -0
  179. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/storage/README.md +0 -0
  180. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/storage/build.json +0 -0
  181. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/storage/package.json +0 -0
  182. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/storage/src/main.js +0 -0
  183. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/validator/README.md +0 -0
  184. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/validator/build.json +0 -0
  185. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/validator/package.json +0 -0
  186. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/validator/src/form-validator.js +0 -0
  187. /package/framework/{v0.7.13 → v0.7.14}/core/plugins/lib/validator/src/main.js +0 -0
  188. /package/framework/{v0.7.13 → v0.7.14}/core/router.js +0 -0
  189. /package/framework/{v0.7.13 → v0.7.14}/core/server.express.js +0 -0
  190. /package/framework/{v0.7.13 → v0.7.14}/core/server.isaac.early-answer.js +0 -0
  191. /package/framework/{v0.7.13 → v0.7.14}/core/server.isaac.rapid-reset.js +0 -0
  192. /package/framework/{v0.7.13 → v0.7.14}/core/server.route-candidates.js +0 -0
  193. /package/framework/{v0.7.13 → v0.7.14}/core/status.codes +0 -0
  194. /package/framework/{v0.7.13 → v0.7.14}/core/template/_gitignore +0 -0
  195. /package/framework/{v0.7.13 → v0.7.14}/core/template/boilerplate/bundle/config/app.json +0 -0
  196. /package/framework/{v0.7.13 → v0.7.14}/core/template/boilerplate/bundle/config/connectors.json +0 -0
  197. /package/framework/{v0.7.13 → v0.7.14}/core/template/boilerplate/bundle/config/routing.json +0 -0
  198. /package/framework/{v0.7.13 → v0.7.14}/core/template/boilerplate/bundle/config/settings.json +0 -0
  199. /package/framework/{v0.7.13 → v0.7.14}/core/template/boilerplate/bundle/config/settings.server.json +0 -0
  200. /package/framework/{v0.7.13 → v0.7.14}/core/template/boilerplate/bundle/config/templates.json +0 -0
  201. /package/framework/{v0.7.13 → v0.7.14}/core/template/boilerplate/bundle/config/watchers.json +0 -0
  202. /package/framework/{v0.7.13 → v0.7.14}/core/template/boilerplate/bundle/controllers/controller.content.js +0 -0
  203. /package/framework/{v0.7.13 → v0.7.14}/core/template/boilerplate/bundle/controllers/controller.js +0 -0
  204. /package/framework/{v0.7.13 → v0.7.14}/core/template/boilerplate/bundle/controllers/setup.js +0 -0
  205. /package/framework/{v0.7.13 → v0.7.14}/core/template/boilerplate/bundle/index.js +0 -0
  206. /package/framework/{v0.7.13 → v0.7.14}/core/template/boilerplate/bundle/locales/en.json +0 -0
  207. /package/framework/{v0.7.13 → v0.7.14}/core/template/boilerplate/bundle_namespace/controllers/controller.js +0 -0
  208. /package/framework/{v0.7.13 → v0.7.14}/core/template/boilerplate/bundle_public/css/default.css +0 -0
  209. /package/framework/{v0.7.13 → v0.7.14}/core/template/boilerplate/bundle_public/css/home.css +0 -0
  210. /package/framework/{v0.7.13 → v0.7.14}/core/template/boilerplate/bundle_public/css/vendor/readme.md +0 -0
  211. /package/framework/{v0.7.13 → v0.7.14}/core/template/boilerplate/bundle_public/favicon.ico +0 -0
  212. /package/framework/{v0.7.13 → v0.7.14}/core/template/boilerplate/bundle_public/js/components/x-checklist.js +0 -0
  213. /package/framework/{v0.7.13 → v0.7.14}/core/template/boilerplate/bundle_public/js/vendor/readme.md +0 -0
  214. /package/framework/{v0.7.13 → v0.7.14}/core/template/boilerplate/bundle_public/manifest.webmanifest +0 -0
  215. /package/framework/{v0.7.13 → v0.7.14}/core/template/boilerplate/bundle_public/readme.md +0 -0
  216. /package/framework/{v0.7.13 → v0.7.14}/core/template/boilerplate/bundle_public/sw.js +0 -0
  217. /package/framework/{v0.7.13 → v0.7.14}/core/template/boilerplate/bundle_templates/handlers/main.js +0 -0
  218. /package/framework/{v0.7.13 → v0.7.14}/core/template/boilerplate/bundle_templates/html/content/homepage.html +0 -0
  219. /package/framework/{v0.7.13 → v0.7.14}/core/template/boilerplate/bundle_templates/html/includes/error-msg-noscript.html +0 -0
  220. /package/framework/{v0.7.13 → v0.7.14}/core/template/boilerplate/bundle_templates/html/includes/error-msg-outdated-browser.html +0 -0
  221. /package/framework/{v0.7.13 → v0.7.14}/core/template/boilerplate/bundle_templates/html/includes/x-checklist.html +0 -0
  222. /package/framework/{v0.7.13 → v0.7.14}/core/template/boilerplate/bundle_templates/html/layouts/main.html +0 -0
  223. /package/framework/{v0.7.13 → v0.7.14}/core/template/command/gina.bat.tpl +0 -0
  224. /package/framework/{v0.7.13 → v0.7.14}/core/template/command/gina.tpl +0 -0
  225. /package/framework/{v0.7.13 → v0.7.14}/core/template/conf/env.json +0 -0
  226. /package/framework/{v0.7.13 → v0.7.14}/core/template/conf/manifest.json +0 -0
  227. /package/framework/{v0.7.13 → v0.7.14}/core/template/conf/package.json +0 -0
  228. /package/framework/{v0.7.13 → v0.7.14}/core/template/conf/settings.json +0 -0
  229. /package/framework/{v0.7.13 → v0.7.14}/core/template/conf/statics.json +0 -0
  230. /package/framework/{v0.7.13 → v0.7.14}/core/template/conf/templates.json +0 -0
  231. /package/framework/{v0.7.13 → v0.7.14}/core/template/error/client/json/401.json +0 -0
  232. /package/framework/{v0.7.13 → v0.7.14}/core/template/error/client/json/403.json +0 -0
  233. /package/framework/{v0.7.13 → v0.7.14}/core/template/error/client/json/404.json +0 -0
  234. /package/framework/{v0.7.13 → v0.7.14}/core/template/error/server/html/50x.html +0 -0
  235. /package/framework/{v0.7.13 → v0.7.14}/core/template/error/server/json/500.json +0 -0
  236. /package/framework/{v0.7.13 → v0.7.14}/core/template/error/server/json/503.json +0 -0
  237. /package/framework/{v0.7.13 → v0.7.14}/core/template/extensions/logger/config.json +0 -0
  238. /package/framework/{v0.7.13 → v0.7.14}/helpers/console.js +0 -0
  239. /package/framework/{v0.7.13 → v0.7.14}/helpers/context.js +0 -0
  240. /package/framework/{v0.7.13 → v0.7.14}/helpers/data/LICENSE +0 -0
  241. /package/framework/{v0.7.13 → v0.7.14}/helpers/data/README.md +0 -0
  242. /package/framework/{v0.7.13 → v0.7.14}/helpers/data/package.json +0 -0
  243. /package/framework/{v0.7.13 → v0.7.14}/helpers/data/src/main.js +0 -0
  244. /package/framework/{v0.7.13 → v0.7.14}/helpers/dateFormat.js +0 -0
  245. /package/framework/{v0.7.13 → v0.7.14}/helpers/index.js +0 -0
  246. /package/framework/{v0.7.13 → v0.7.14}/helpers/json/LICENSE +0 -0
  247. /package/framework/{v0.7.13 → v0.7.14}/helpers/json/README.md +0 -0
  248. /package/framework/{v0.7.13 → v0.7.14}/helpers/json/package.json +0 -0
  249. /package/framework/{v0.7.13 → v0.7.14}/helpers/path.js +0 -0
  250. /package/framework/{v0.7.13 → v0.7.14}/helpers/plugins/README.md +0 -0
  251. /package/framework/{v0.7.13 → v0.7.14}/helpers/plugins/package.json +0 -0
  252. /package/framework/{v0.7.13 → v0.7.14}/helpers/plugins/src/api-error.js +0 -0
  253. /package/framework/{v0.7.13 → v0.7.14}/helpers/plugins/src/main.js +0 -0
  254. /package/framework/{v0.7.13 → v0.7.14}/helpers/prototypes.js +0 -0
  255. /package/framework/{v0.7.13 → v0.7.14}/helpers/task.js +0 -0
  256. /package/framework/{v0.7.13 → v0.7.14}/helpers/text.js +0 -0
  257. /package/framework/{v0.7.13 → v0.7.14}/lib/admin/package.json +0 -0
  258. /package/framework/{v0.7.13 → v0.7.14}/lib/admin/src/main.js +0 -0
  259. /package/framework/{v0.7.13 → v0.7.14}/lib/archiver/README.md +0 -0
  260. /package/framework/{v0.7.13 → v0.7.14}/lib/archiver/build.json +0 -0
  261. /package/framework/{v0.7.13 → v0.7.14}/lib/archiver/package.json +0 -0
  262. /package/framework/{v0.7.13 → v0.7.14}/lib/archiver/src/dep/jszip.min.js +0 -0
  263. /package/framework/{v0.7.13 → v0.7.14}/lib/archiver/src/main.js +0 -0
  264. /package/framework/{v0.7.13 → v0.7.14}/lib/async/package.json +0 -0
  265. /package/framework/{v0.7.13 → v0.7.14}/lib/async/src/main.js +0 -0
  266. /package/framework/{v0.7.13 → v0.7.14}/lib/audit/package.json +0 -0
  267. /package/framework/{v0.7.13 → v0.7.14}/lib/audit/src/main.js +0 -0
  268. /package/framework/{v0.7.13 → v0.7.14}/lib/audit-store.js +0 -0
  269. /package/framework/{v0.7.13 → v0.7.14}/lib/authn/package.json +0 -0
  270. /package/framework/{v0.7.13 → v0.7.14}/lib/authn/src/lockout.js +0 -0
  271. /package/framework/{v0.7.13 → v0.7.14}/lib/authn/src/main.js +0 -0
  272. /package/framework/{v0.7.13 → v0.7.14}/lib/authn/src/totp.js +0 -0
  273. /package/framework/{v0.7.13 → v0.7.14}/lib/authz-gate/package.json +0 -0
  274. /package/framework/{v0.7.13 → v0.7.14}/lib/authz-gate/src/main.js +0 -0
  275. /package/framework/{v0.7.13 → v0.7.14}/lib/cache/README.md +0 -0
  276. /package/framework/{v0.7.13 → v0.7.14}/lib/cache/build.json +0 -0
  277. /package/framework/{v0.7.13 → v0.7.14}/lib/cache/package.json +0 -0
  278. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/aliases.json +0 -0
  279. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/audit/arguments.json +0 -0
  280. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/audit/help.txt +0 -0
  281. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/audit/verify.js +0 -0
  282. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/bundle/add.js +0 -0
  283. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/bundle/arguments.json +0 -0
  284. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/bundle/build.js +0 -0
  285. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/bundle/copy.js +0 -0
  286. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/bundle/cp.js +0 -0
  287. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/bundle/help.js +0 -0
  288. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/bundle/help.txt +0 -0
  289. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/bundle/inc/boot-lines.js +0 -0
  290. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/bundle/inc/name-rewrite.js +0 -0
  291. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/bundle/inc/name.js +0 -0
  292. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/bundle/inc/start-status.js +0 -0
  293. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/bundle/list.js +0 -0
  294. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/bundle/man.js +0 -0
  295. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/bundle/mcp-start.js +0 -0
  296. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/bundle/mcp.js +0 -0
  297. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/bundle/oas.js +0 -0
  298. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/bundle/openapi.js +0 -0
  299. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/bundle/remove.js +0 -0
  300. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/bundle/rename.js +0 -0
  301. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/bundle/restart.js +0 -0
  302. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/bundle/rm.js +0 -0
  303. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/bundle/start.js +0 -0
  304. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/bundle/status.js +0 -0
  305. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/bundle/stop.js +0 -0
  306. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/bundle/types.js +0 -0
  307. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/cache/arguments.json +0 -0
  308. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/cache/clear.js +0 -0
  309. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/cache/help.txt +0 -0
  310. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/cache/stats.js +0 -0
  311. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/connector/add.js +0 -0
  312. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/connector/arguments.json +0 -0
  313. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/connector/help.js +0 -0
  314. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/connector/help.txt +0 -0
  315. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/connector/infer.js +0 -0
  316. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/connector/list.js +0 -0
  317. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/connector/migrate.js +0 -0
  318. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/connector/models.js +0 -0
  319. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/connector/remove.js +0 -0
  320. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/connector/rm.js +0 -0
  321. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/connector/test.js +0 -0
  322. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/container/arguments.json +0 -0
  323. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/container/help.js +0 -0
  324. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/container/help.txt +0 -0
  325. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/container/man.js +0 -0
  326. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/container/ps.js +0 -0
  327. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/container/stop.js +0 -0
  328. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/controller/add.js +0 -0
  329. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/controller/arguments.json +0 -0
  330. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/controller/help.txt +0 -0
  331. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/controller/inc/args.js +0 -0
  332. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/controller/inc/namespace.js +0 -0
  333. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/controller/inc/reference-rewrite.js +0 -0
  334. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/controller/inc/reference-scan.js +0 -0
  335. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/controller/inc/scaffold.js +0 -0
  336. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/controller/remove.js +0 -0
  337. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/controller/rename.js +0 -0
  338. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/controller/rm.js +0 -0
  339. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/env/add.js +0 -0
  340. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/env/get.js +0 -0
  341. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/env/help.js +0 -0
  342. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/env/help.txt +0 -0
  343. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/env/inc/name.js +0 -0
  344. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/env/link-dev.js +0 -0
  345. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/env/list.js +0 -0
  346. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/env/remove.js +0 -0
  347. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/env/rm.js +0 -0
  348. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/env/set.js +0 -0
  349. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/env/unset.js +0 -0
  350. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/env/use.js +0 -0
  351. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/framework/add.js +0 -0
  352. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/framework/arguments.json +0 -0
  353. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/framework/build.js +0 -0
  354. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/framework/dot.js +0 -0
  355. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/framework/get.js +0 -0
  356. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/framework/help.js +0 -0
  357. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/framework/help.txt +0 -0
  358. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/framework/inc/child-failure.js +0 -0
  359. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/framework/inc/listen-error.js +0 -0
  360. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/framework/inc/ps-titles.js +0 -0
  361. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/framework/init.js +0 -0
  362. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/framework/link-node-modules.js +0 -0
  363. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/framework/link.js +0 -0
  364. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/framework/list.js +0 -0
  365. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/framework/man.js +0 -0
  366. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/framework/msg.json +0 -0
  367. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/framework/open.js +0 -0
  368. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/framework/remove.js +0 -0
  369. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/framework/reset.js +0 -0
  370. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/framework/restart.js +0 -0
  371. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/framework/set.js +0 -0
  372. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/framework/start.js +0 -0
  373. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/framework/status.js +0 -0
  374. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/framework/stop.js +0 -0
  375. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/framework/tail.js +0 -0
  376. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/framework/update.js +0 -0
  377. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/framework/version.js +0 -0
  378. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/gina-dev.1.md +0 -0
  379. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/gina-framework.1.md +0 -0
  380. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/gina.1.md +0 -0
  381. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/helper.js +0 -0
  382. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/i18n/add.js +0 -0
  383. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/i18n/arguments.json +0 -0
  384. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/i18n/export.js +0 -0
  385. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/i18n/help.js +0 -0
  386. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/i18n/help.txt +0 -0
  387. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/i18n/import.js +0 -0
  388. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/i18n/scan.js +0 -0
  389. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/image/_host.js +0 -0
  390. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/image/arguments.json +0 -0
  391. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/image/build.js +0 -0
  392. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/image/help.js +0 -0
  393. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/image/help.txt +0 -0
  394. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/image/list.js +0 -0
  395. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/image/man.js +0 -0
  396. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/image/rm.js +0 -0
  397. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/image/run.js +0 -0
  398. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/index.js +0 -0
  399. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/inspector/help.js +0 -0
  400. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/inspector/help.txt +0 -0
  401. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/inspector/open.js +0 -0
  402. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/man-render.js +0 -0
  403. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/minion/arguments.json +0 -0
  404. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/minion/help.js +0 -0
  405. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/minion/help.txt +0 -0
  406. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/minion/kill.js +0 -0
  407. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/minion/list.js +0 -0
  408. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/msg.json +0 -0
  409. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/port/help.js +0 -0
  410. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/port/help.txt +0 -0
  411. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/port/inc/scan.js +0 -0
  412. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/port/list.js +0 -0
  413. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/port/reset.js +0 -0
  414. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/port/set.js +0 -0
  415. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/project/add.js +0 -0
  416. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/project/arguments.json +0 -0
  417. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/project/backup.js +0 -0
  418. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/project/build.js +0 -0
  419. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/project/help.js +0 -0
  420. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/project/help.txt +0 -0
  421. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/project/import.js +0 -0
  422. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/project/inc/name.js +0 -0
  423. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/project/list.js +0 -0
  424. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/project/man.js +0 -0
  425. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/project/move.js +0 -0
  426. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/project/remove.js +0 -0
  427. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/project/rename.js +0 -0
  428. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/project/restart.js +0 -0
  429. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/project/restore.js +0 -0
  430. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/project/rm.js +0 -0
  431. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/project/start.js +0 -0
  432. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/project/status.js +0 -0
  433. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/project/stop.js +0 -0
  434. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/protocol/arguments.json +0 -0
  435. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/protocol/help.js +0 -0
  436. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/protocol/help.txt +0 -0
  437. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/protocol/list.js +0 -0
  438. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/protocol/remove.js +0 -0
  439. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/protocol/set.js +0 -0
  440. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/scope/add.js +0 -0
  441. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/scope/help.js +0 -0
  442. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/scope/help.txt +0 -0
  443. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/scope/inc/name.js +0 -0
  444. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/scope/link-local.js +0 -0
  445. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/scope/link-production.js +0 -0
  446. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/scope/list.js +0 -0
  447. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/scope/remove.js +0 -0
  448. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/scope/rm.js +0 -0
  449. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/scope/use.js +0 -0
  450. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/secrets/arguments.json +0 -0
  451. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/secrets/check.js +0 -0
  452. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/secrets/help.js +0 -0
  453. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/secrets/help.txt +0 -0
  454. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/secrets/scan.js +0 -0
  455. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/service/help.js +0 -0
  456. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/service/help.txt +0 -0
  457. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/service/list.js +0 -0
  458. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/service/man.js +0 -0
  459. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/service/start.js +0 -0
  460. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/storage/arguments.json +0 -0
  461. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/storage/gc.js +0 -0
  462. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/storage/help.txt +0 -0
  463. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/storage/stats.js +0 -0
  464. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/storage/verify.js +0 -0
  465. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd/view/add.js +0 -0
  466. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd-status-format/package.json +0 -0
  467. /package/framework/{v0.7.13 → v0.7.14}/lib/cmd-status-format/src/main.js +0 -0
  468. /package/framework/{v0.7.13 → v0.7.14}/lib/collection/README.md +0 -0
  469. /package/framework/{v0.7.13 → v0.7.14}/lib/collection/build.json +0 -0
  470. /package/framework/{v0.7.13 → v0.7.14}/lib/collection/package.json +0 -0
  471. /package/framework/{v0.7.13 → v0.7.14}/lib/collection/src/main.js +0 -0
  472. /package/framework/{v0.7.13 → v0.7.14}/lib/conf-view/package.json +0 -0
  473. /package/framework/{v0.7.13 → v0.7.14}/lib/conf-view/src/main.js +0 -0
  474. /package/framework/{v0.7.13 → v0.7.14}/lib/config.js +0 -0
  475. /package/framework/{v0.7.13 → v0.7.14}/lib/connector-config/package.json +0 -0
  476. /package/framework/{v0.7.13 → v0.7.14}/lib/connector-config/src/main.js +0 -0
  477. /package/framework/{v0.7.13 → v0.7.14}/lib/connector-error/package.json +0 -0
  478. /package/framework/{v0.7.13 → v0.7.14}/lib/connector-error/src/main.js +0 -0
  479. /package/framework/{v0.7.13 → v0.7.14}/lib/connector-registry/package.json +0 -0
  480. /package/framework/{v0.7.13 → v0.7.14}/lib/connector-registry/src/main.js +0 -0
  481. /package/framework/{v0.7.13 → v0.7.14}/lib/cron/README.md +0 -0
  482. /package/framework/{v0.7.13 → v0.7.14}/lib/cron/package.json +0 -0
  483. /package/framework/{v0.7.13 → v0.7.14}/lib/cron/src/main.js +0 -0
  484. /package/framework/{v0.7.13 → v0.7.14}/lib/domain/LICENSE +0 -0
  485. /package/framework/{v0.7.13 → v0.7.14}/lib/domain/README.md +0 -0
  486. /package/framework/{v0.7.13 → v0.7.14}/lib/domain/package.json +0 -0
  487. /package/framework/{v0.7.13 → v0.7.14}/lib/domain/src/main.js +0 -0
  488. /package/framework/{v0.7.13 → v0.7.14}/lib/dto/package.json +0 -0
  489. /package/framework/{v0.7.13 → v0.7.14}/lib/dto/src/main.js +0 -0
  490. /package/framework/{v0.7.13 → v0.7.14}/lib/dto-pipe/package.json +0 -0
  491. /package/framework/{v0.7.13 → v0.7.14}/lib/dto-pipe/src/main.js +0 -0
  492. /package/framework/{v0.7.13 → v0.7.14}/lib/dto-types/package.json +0 -0
  493. /package/framework/{v0.7.13 → v0.7.14}/lib/dto-types/src/main.js +0 -0
  494. /package/framework/{v0.7.13 → v0.7.14}/lib/duration/package.json +0 -0
  495. /package/framework/{v0.7.13 → v0.7.14}/lib/duration/src/main.js +0 -0
  496. /package/framework/{v0.7.13 → v0.7.14}/lib/error-ref/package.json +0 -0
  497. /package/framework/{v0.7.13 → v0.7.14}/lib/error-ref/src/main.js +0 -0
  498. /package/framework/{v0.7.13 → v0.7.14}/lib/generator/index.js +0 -0
  499. /package/framework/{v0.7.13 → v0.7.14}/lib/i18n/package.json +0 -0
  500. /package/framework/{v0.7.13 → v0.7.14}/lib/i18n/src/main.js +0 -0
  501. /package/framework/{v0.7.13 → v0.7.14}/lib/idempotency/package.json +0 -0
  502. /package/framework/{v0.7.13 → v0.7.14}/lib/idempotency/src/main.js +0 -0
  503. /package/framework/{v0.7.13 → v0.7.14}/lib/image-build/package.json +0 -0
  504. /package/framework/{v0.7.13 → v0.7.14}/lib/image-build/src/main.js +0 -0
  505. /package/framework/{v0.7.13 → v0.7.14}/lib/index.js +0 -0
  506. /package/framework/{v0.7.13 → v0.7.14}/lib/inherits/LICENSE +0 -0
  507. /package/framework/{v0.7.13 → v0.7.14}/lib/inherits/README.md +0 -0
  508. /package/framework/{v0.7.13 → v0.7.14}/lib/inherits/package.json +0 -0
  509. /package/framework/{v0.7.13 → v0.7.14}/lib/inherits/src/main.js +0 -0
  510. /package/framework/{v0.7.13 → v0.7.14}/lib/inspector-events/package.json +0 -0
  511. /package/framework/{v0.7.13 → v0.7.14}/lib/inspector-events/src/main.js +0 -0
  512. /package/framework/{v0.7.13 → v0.7.14}/lib/inspector-redact/package.json +0 -0
  513. /package/framework/{v0.7.13 → v0.7.14}/lib/inspector-redact/src/main.js +0 -0
  514. /package/framework/{v0.7.13 → v0.7.14}/lib/instrument/package.json +0 -0
  515. /package/framework/{v0.7.13 → v0.7.14}/lib/instrument/src/main.js +0 -0
  516. /package/framework/{v0.7.13 → v0.7.14}/lib/job/package.json +0 -0
  517. /package/framework/{v0.7.13 → v0.7.14}/lib/job/src/main.js +0 -0
  518. /package/framework/{v0.7.13 → v0.7.14}/lib/job-store.js +0 -0
  519. /package/framework/{v0.7.13 → v0.7.14}/lib/json-config-header/package.json +0 -0
  520. /package/framework/{v0.7.13 → v0.7.14}/lib/json-config-header/src/main.js +0 -0
  521. /package/framework/{v0.7.13 → v0.7.14}/lib/kv/package.json +0 -0
  522. /package/framework/{v0.7.13 → v0.7.14}/lib/kv/src/main.js +0 -0
  523. /package/framework/{v0.7.13 → v0.7.14}/lib/kv-store.js +0 -0
  524. /package/framework/{v0.7.13 → v0.7.14}/lib/lane/package.json +0 -0
  525. /package/framework/{v0.7.13 → v0.7.14}/lib/lane/src/main.js +0 -0
  526. /package/framework/{v0.7.13 → v0.7.14}/lib/loading-state/package.json +0 -0
  527. /package/framework/{v0.7.13 → v0.7.14}/lib/loading-state/src/main.js +0 -0
  528. /package/framework/{v0.7.13 → v0.7.14}/lib/logger/README.md +0 -0
  529. /package/framework/{v0.7.13 → v0.7.14}/lib/logger/package.json +0 -0
  530. /package/framework/{v0.7.13 → v0.7.14}/lib/logger/src/containers/default/index.js +0 -0
  531. /package/framework/{v0.7.13 → v0.7.14}/lib/logger/src/containers/file/index.js +0 -0
  532. /package/framework/{v0.7.13 → v0.7.14}/lib/logger/src/containers/mq/index.js +0 -0
  533. /package/framework/{v0.7.13 → v0.7.14}/lib/logger/src/containers/mq/listener.js +0 -0
  534. /package/framework/{v0.7.13 → v0.7.14}/lib/logger/src/containers/mq/speaker.js +0 -0
  535. /package/framework/{v0.7.13 → v0.7.14}/lib/logger/src/helper.js +0 -0
  536. /package/framework/{v0.7.13 → v0.7.14}/lib/logger/src/main.js +0 -0
  537. /package/framework/{v0.7.13 → v0.7.14}/lib/logger/src/redact.js +0 -0
  538. /package/framework/{v0.7.13 → v0.7.14}/lib/maintenance/package.json +0 -0
  539. /package/framework/{v0.7.13 → v0.7.14}/lib/maintenance/src/main.js +0 -0
  540. /package/framework/{v0.7.13 → v0.7.14}/lib/math/index.js +0 -0
  541. /package/framework/{v0.7.13 → v0.7.14}/lib/mcp-dispatch/package.json +0 -0
  542. /package/framework/{v0.7.13 → v0.7.14}/lib/mcp-dispatch/src/main.js +0 -0
  543. /package/framework/{v0.7.13 → v0.7.14}/lib/mcp-http/package.json +0 -0
  544. /package/framework/{v0.7.13 → v0.7.14}/lib/mcp-http/src/main.js +0 -0
  545. /package/framework/{v0.7.13 → v0.7.14}/lib/mcp-server/package.json +0 -0
  546. /package/framework/{v0.7.13 → v0.7.14}/lib/mcp-server/src/main.js +0 -0
  547. /package/framework/{v0.7.13 → v0.7.14}/lib/merge/README.md +0 -0
  548. /package/framework/{v0.7.13 → v0.7.14}/lib/merge/package.json +0 -0
  549. /package/framework/{v0.7.13 → v0.7.14}/lib/merge/src/main.js +0 -0
  550. /package/framework/{v0.7.13 → v0.7.14}/lib/message-validator/package.json +0 -0
  551. /package/framework/{v0.7.13 → v0.7.14}/lib/message-validator/src/main.js +0 -0
  552. /package/framework/{v0.7.13 → v0.7.14}/lib/metrics/package.json +0 -0
  553. /package/framework/{v0.7.13 → v0.7.14}/lib/metrics/src/main.js +0 -0
  554. /package/framework/{v0.7.13 → v0.7.14}/lib/model.js +0 -0
  555. /package/framework/{v0.7.13 → v0.7.14}/lib/money/package.json +0 -0
  556. /package/framework/{v0.7.13 → v0.7.14}/lib/money/src/main.js +0 -0
  557. /package/framework/{v0.7.13 → v0.7.14}/lib/multipart/package.json +0 -0
  558. /package/framework/{v0.7.13 → v0.7.14}/lib/multipart/src/main.js +0 -0
  559. /package/framework/{v0.7.13 → v0.7.14}/lib/net-locality/package.json +0 -0
  560. /package/framework/{v0.7.13 → v0.7.14}/lib/net-locality/src/main.js +0 -0
  561. /package/framework/{v0.7.13 → v0.7.14}/lib/nunjucks-filters/README.md +0 -0
  562. /package/framework/{v0.7.13 → v0.7.14}/lib/nunjucks-filters/package.json +0 -0
  563. /package/framework/{v0.7.13 → v0.7.14}/lib/nunjucks-filters/src/main.js +0 -0
  564. /package/framework/{v0.7.13 → v0.7.14}/lib/nunjucks-resolver/package.json +0 -0
  565. /package/framework/{v0.7.13 → v0.7.14}/lib/nunjucks-resolver/src/main.js +0 -0
  566. /package/framework/{v0.7.13 → v0.7.14}/lib/priority/package.json +0 -0
  567. /package/framework/{v0.7.13 → v0.7.14}/lib/priority/src/main.js +0 -0
  568. /package/framework/{v0.7.13 → v0.7.14}/lib/proc.js +0 -0
  569. /package/framework/{v0.7.13 → v0.7.14}/lib/push/package.json +0 -0
  570. /package/framework/{v0.7.13 → v0.7.14}/lib/push/src/main.js +0 -0
  571. /package/framework/{v0.7.13 → v0.7.14}/lib/rate-limit/package.json +0 -0
  572. /package/framework/{v0.7.13 → v0.7.14}/lib/rate-limit/src/main.js +0 -0
  573. /package/framework/{v0.7.13 → v0.7.14}/lib/release-watch/package.json +0 -0
  574. /package/framework/{v0.7.13 → v0.7.14}/lib/release-watch/src/main.js +0 -0
  575. /package/framework/{v0.7.13 → v0.7.14}/lib/render-cache/package.json +0 -0
  576. /package/framework/{v0.7.13 → v0.7.14}/lib/render-cache-store.js +0 -0
  577. /package/framework/{v0.7.13 → v0.7.14}/lib/routing/README.md +0 -0
  578. /package/framework/{v0.7.13 → v0.7.14}/lib/routing/build.json +0 -0
  579. /package/framework/{v0.7.13 → v0.7.14}/lib/routing/package.json +0 -0
  580. /package/framework/{v0.7.13 → v0.7.14}/lib/routing/src/main.js +0 -0
  581. /package/framework/{v0.7.13 → v0.7.14}/lib/routing-introspect/package.json +0 -0
  582. /package/framework/{v0.7.13 → v0.7.14}/lib/routing-introspect/src/main.js +0 -0
  583. /package/framework/{v0.7.13 → v0.7.14}/lib/secrets/package.json +0 -0
  584. /package/framework/{v0.7.13 → v0.7.14}/lib/secrets/src/backends/env.js +0 -0
  585. /package/framework/{v0.7.13 → v0.7.14}/lib/secrets/src/backends/exec.js +0 -0
  586. /package/framework/{v0.7.13 → v0.7.14}/lib/secrets/src/backends/file.js +0 -0
  587. /package/framework/{v0.7.13 → v0.7.14}/lib/secrets/src/declaration.js +0 -0
  588. /package/framework/{v0.7.13 → v0.7.14}/lib/secrets/src/env-file.js +0 -0
  589. /package/framework/{v0.7.13 → v0.7.14}/lib/secrets/src/main.js +0 -0
  590. /package/framework/{v0.7.13 → v0.7.14}/lib/secrets/src/sources.js +0 -0
  591. /package/framework/{v0.7.13 → v0.7.14}/lib/security-headers-emitter/package.json +0 -0
  592. /package/framework/{v0.7.13 → v0.7.14}/lib/security-headers-emitter/src/main.js +0 -0
  593. /package/framework/{v0.7.13 → v0.7.14}/lib/session-lifetime/package.json +0 -0
  594. /package/framework/{v0.7.13 → v0.7.14}/lib/session-lifetime/src/main.js +0 -0
  595. /package/framework/{v0.7.13 → v0.7.14}/lib/session-store.js +0 -0
  596. /package/framework/{v0.7.13 → v0.7.14}/lib/shell.js +0 -0
  597. /package/framework/{v0.7.13 → v0.7.14}/lib/sri/package.json +0 -0
  598. /package/framework/{v0.7.13 → v0.7.14}/lib/sri/src/main.js +0 -0
  599. /package/framework/{v0.7.13 → v0.7.14}/lib/stall-watchdog/package.json +0 -0
  600. /package/framework/{v0.7.13 → v0.7.14}/lib/stall-watchdog/src/detector.js +0 -0
  601. /package/framework/{v0.7.13 → v0.7.14}/lib/stall-watchdog/src/frames.js +0 -0
  602. /package/framework/{v0.7.13 → v0.7.14}/lib/stall-watchdog/src/main.js +0 -0
  603. /package/framework/{v0.7.13 → v0.7.14}/lib/stall-watchdog/src/worker.js +0 -0
  604. /package/framework/{v0.7.13 → v0.7.14}/lib/state.js +0 -0
  605. /package/framework/{v0.7.13 → v0.7.14}/lib/storage/package.json +0 -0
  606. /package/framework/{v0.7.13 → v0.7.14}/lib/storage/src/local-cas.js +0 -0
  607. /package/framework/{v0.7.13 → v0.7.14}/lib/storage/src/local-stream.js +0 -0
  608. /package/framework/{v0.7.13 → v0.7.14}/lib/storage/src/local.js +0 -0
  609. /package/framework/{v0.7.13 → v0.7.14}/lib/storage/src/main.js +0 -0
  610. /package/framework/{v0.7.13 → v0.7.14}/lib/storage/src/meta-store.js +0 -0
  611. /package/framework/{v0.7.13 → v0.7.14}/lib/storage/src/s3.js +0 -0
  612. /package/framework/{v0.7.13 → v0.7.14}/lib/storage/src/util.js +0 -0
  613. /package/framework/{v0.7.13 → v0.7.14}/lib/storage-store.js +0 -0
  614. /package/framework/{v0.7.13 → v0.7.14}/lib/swig-filters/README.md +0 -0
  615. /package/framework/{v0.7.13 → v0.7.14}/lib/swig-filters/package.json +0 -0
  616. /package/framework/{v0.7.13 → v0.7.14}/lib/swig-filters/src/main.js +0 -0
  617. /package/framework/{v0.7.13 → v0.7.14}/lib/swig-resolver/package.json +0 -0
  618. /package/framework/{v0.7.13 → v0.7.14}/lib/swig-resolver/src/main.js +0 -0
  619. /package/framework/{v0.7.13 → v0.7.14}/lib/template-loaders/package.json +0 -0
  620. /package/framework/{v0.7.13 → v0.7.14}/lib/template-loaders/src/loaders/http.js +0 -0
  621. /package/framework/{v0.7.13 → v0.7.14}/lib/template-loaders/src/loaders/memory.js +0 -0
  622. /package/framework/{v0.7.13 → v0.7.14}/lib/template-loaders/src/main.js +0 -0
  623. /package/framework/{v0.7.13 → v0.7.14}/lib/url/README.md +0 -0
  624. /package/framework/{v0.7.13 → v0.7.14}/lib/url/index.js +0 -0
  625. /package/framework/{v0.7.13 → v0.7.14}/lib/url/routing.json +0 -0
  626. /package/framework/{v0.7.13 → v0.7.14}/lib/uuid/package.json +0 -0
  627. /package/framework/{v0.7.13 → v0.7.14}/lib/uuid/src/main.js +0 -0
  628. /package/framework/{v0.7.13 → v0.7.14}/lib/validator.js +0 -0
  629. /package/framework/{v0.7.13 → v0.7.14}/lib/watcher/package.json +0 -0
  630. /package/framework/{v0.7.13 → v0.7.14}/lib/watcher/src/main.js +0 -0
  631. /package/framework/{v0.7.13 → v0.7.14}/lib/ws-framing/package.json +0 -0
  632. /package/framework/{v0.7.13 → v0.7.14}/lib/ws-framing/src/main.js +0 -0
  633. /package/framework/{v0.7.13 → v0.7.14}/lib/ws-query/package.json +0 -0
  634. /package/framework/{v0.7.13 → v0.7.14}/lib/ws-query/src/main.js +0 -0
  635. /package/framework/{v0.7.13 → v0.7.14}/lib/ws-session/package.json +0 -0
  636. /package/framework/{v0.7.13 → v0.7.14}/lib/ws-session/src/main.js +0 -0
package/llms.txt CHANGED
@@ -54,9 +54,9 @@ Maintained fork of the abandoned swig 1.4.2 template engine. Published to npm as
54
54
 
55
55
  Previously vendored at `core/deps/swig-1.4.2/` — removed in the migration to the npm dep. The fork's parse-time blocklist (`__proto__`/`constructor`/`prototype`, in `parser.js` and `tags/set.js`) is prototype-chain hardening. CVE-2023-25345 itself (directory traversal through `include`/`extends`) is fixed in the fork's filesystem loader since 2.7.1 (paths are confined to the loader root) and by the path traversal boundary check in `controller.render-swig.js`, which is Gina's own code and is unaffected by this migration.
56
56
 
57
- Since 0.7.9 gina requires `^2.12.1` (#B1088; 0.7.8 required `^2.11.0` (#B1034, #B1072), 0.7.7 `^2.9.11`, 0.7.6 `^2.9.6`). On the default (sync) render path an `{% import %}` keeps what the template rendered before it: up to 2.9.3 the compiled tag re-declared the output variable and dropped that output (the text above it, the layout before a block that holds one, every item of a `for` loop that holds one, a macro's output before it; an import at the very top of a template was unaffected), so a template whose import follows a comment and blank lines now starts with those blank lines. On the async loader path (`settings.template.swig.loader`) an `{% include %}` or `{% import %}` inside a `for` loop or a `filter` tag now renders (up to 2.9.3 the template failed to compile, as did one with an include, import or block anywhere in a macro body); calling a macro whose body holds an include, import or block throws an error that names the macro and its template, and a template that only defines it renders. Pinned by `test/lib/swig-import-output-b978.test.js`, through both copies gina resolves (`GINA_B978_SWIG_FROM=<dir>` points it at another copy). Since swig 2.9.7, which `^2.9.6` resolves, an import made inside an imported file is no longer reachable through the importer's alias on the sync path either: with `{% import "buttons.html" as buttons %}` and `buttons.html` importing `icons.html` as `icons`, `{{ buttons.icons.disk() }}` renders nothing on both paths, while a macro of `buttons.html` that calls `icons.disk()` still renders it. Since swig 2.9.8, which `^2.9.6` also resolves, code that comes into an imported macro from the importing side on the async loader path (a macro passed as an argument, a macro of the importing template called back by name) sees the imported template's names only when that template's macros use them, and reads its own template's names for the others, as the sync path always did (the swig loaders guide lists the exceptions); the sync path is unchanged. Since swig 2.9.9, which `^2.9.6` also resolves, native swig reads `and`, `or`, `not`, `in` and `not in` as operators when `(` follows with no space, as it already did before a space, on both paths: `{% if a and(b) %}` now tests both values (2.9.8 read `a and(b)` as `a`), so a function from the locals named `and`, `or` or `not` can no longer be called by that name, and a `{% macro %}` so named fails to compile. Since swig 2.9.10, which `^2.9.6` also resolves, a subscript or member of a missing value renders an empty string on both paths, as a missing variable already did: `{{ arr[0] }}` or `{{ obj['k'] }}` over a missing item prints nothing (2.9.9 printed « undefined », or « null » for a null item), `{{ arr[0].x }}` and `{{ arr[0]|upper }}` no longer throw, and a function from the locals that returns nothing renders empty (`{{ fn() }}` printed « undefined »); on 2.9.10 a tag argument that filters a missing subscript (`{% set y = arr[0]|upper %}`) still throws. Since swig 2.9.11, which gina requires from 0.7.7 (#B1022), native swig applies a filter in a `set`, `if`, `elseif`, `for`, `include` or `filter` tag argument to its own operand, as in an output: `{% set y = arr[0]|upper %}` over an empty array no longer throws, shapes such as `{% for c in (x)|reverse %}` now compile, and a filter after a function or method call with an expression before it applies to that call only, in a `set`, `if`, `elseif` or `for` argument alike (up to 2.9.10 it applied to the whole expression before it: `{% set y = a + f(x)|upper %}` with `a = "x"`, `x = "ab"` gives `xAB`, where it gave `XAB`; `{% if z and f(x)|upper %}` with `z = 0` is now false); a filter after a literal in an output that holds an operator or a ternary applies to the literal (`{{ 3|default(1) + 1 }}` gives 4, 2.9.10 gave 3); an output whose variable is followed by a filter renders an empty string when the last filter returns undefined or null (`{{ items|first }}` over `[]`, a custom filter that returns nothing; 2.9.10 printed « undefined » or « null »); and inside an `{% autoescape true %}` region a missing subscript or member, or a call that returns undefined, renders an empty string (gina's `settings.swig.autoescape` is a boolean, which already did). Since swig 2.9.12, which gina requires from 0.7.8 (#B1034), blocks nested in blocks follow one chain of definitions per block name: a block nested in any block of an extending template defines its name even when the root has no block for the enclosing one (`{% block zz %}{% block b %}N{% endblock %}{% endblock %}` over a parent's `<{% block b %}P{% endblock %}>` renders `<N>`, 2.9.11 rendered `<P>`), `{% parent %}` in a block nested in an override renders the next definition of its name (`<YC>` becomes `<YCI>`), and on the sync path so does `{% parent %}` in an override of a nested block, as the async path already did (`O[C]` becomes `O[CI]`); a block that renders itself through a nested block or `{% parent %}` fails with an error naming the block (2.9.11 overflowed the stack on the sync path). Since swig 2.9.13, also required from 0.7.8: `date` of a missing, null, empty or unparseable value renders an empty string (2.9.11 printed `NaN/NaN/NaN`); a filter or call result that is undefined or null reads as an empty string at a `+` or unary operand, in outputs and `set` arguments alike (`{{ "a" + f() }}` renders `a`, `{{ 1 + f() }}` 1 and `{{ -f() }}` 0, where 2.9.11 printed `aundefined`, NaN and NaN); a filter after a filter or a call that found nothing renders an empty string (`{{ items|first|lower }}` over `[]` threw, `{{ f()|upper }}` with a null result printed `[object Object]`); `first`, `last` and `replace` give an empty string for an undefined or null input, and `length` gives 0 (they threw). The engines gina builds pass `cache: false`, so the template cache that swig 2.9.13 added to its async loader path does not engage: a layout and an include load on every render. Swig 2.10.0's notes change only the swig-twig, swig-jinja2 and swig-django frontends; native swig already rejects an unknown filter name at compile time (`Invalid filter "x" on line 1.` on 2.9.11 and 2.10.0). Swig 2.11.0's notes change only swig-jinja2 and swig-django, whose `==`, `!=` and `in` now compare with Python's equality (swig-jinja2 also gains Jinja2's comparison tests, `x is eq 1`); native swig's own lib files differ from 2.10.0 only in their version stamps, and its compiled code and output for `==`, `!=` and `in` are unchanged.
57
+ Since 0.7.9 gina requires `^2.12.1` (#B1088; 0.7.8 required `^2.11.0` (#B1034, #B1072), 0.7.7 `^2.9.11`, 0.7.6 `^2.9.6`). On the default (sync) render path an `{% import %}` keeps what the template rendered before it: up to 2.9.3 the compiled tag re-declared the output variable and dropped that output (the text above it, the layout before a block that holds one, every item of a `for` loop that holds one, a macro's output before it; an import at the very top of a template was unaffected), so a template whose import follows a comment and blank lines now starts with those blank lines. On the async loader path (`settings.template.swig.loader`) an `{% include %}` or `{% import %}` inside a `for` loop or a `filter` tag now renders (up to 2.9.3 the template failed to compile, as did one with an include, import or block anywhere in a macro body); calling a macro whose body holds an include, import or block throws an error that names the macro and its template, and a template that only defines it renders. Pinned by `test/lib/swig-import-output-b978.test.js`, through both copies gina resolves (`GINA_B978_SWIG_FROM=<dir>` points it at another copy). Since swig 2.9.7, which `^2.9.6` resolves, an import made inside an imported file is no longer reachable through the importer's alias on the sync path either: with `{% import "buttons.html" as buttons %}` and `buttons.html` importing `icons.html` as `icons`, `{{ buttons.icons.disk() }}` renders nothing on both paths, while a macro of `buttons.html` that calls `icons.disk()` still renders it. Since swig 2.9.8, which `^2.9.6` also resolves, code that comes into an imported macro from the importing side on the async loader path (a macro passed as an argument, a macro of the importing template called back by name) sees the imported template's names only when that template's macros use them, and reads its own template's names for the others, as the sync path always did (the swig loaders guide lists the exceptions); the sync path is unchanged. Since swig 2.9.9, which `^2.9.6` also resolves, native swig reads `and`, `or`, `not`, `in` and `not in` as operators when `(` follows with no space, as it already did before a space, on both paths: `{% if a and(b) %}` now tests both values (2.9.8 read `a and(b)` as `a`), so a function from the locals named `and`, `or` or `not` can no longer be called by that name, and a `{% macro %}` so named fails to compile. Since swig 2.9.10, which `^2.9.6` also resolves, a subscript or member of a missing value renders an empty string on both paths, as a missing variable already did: `{{ arr[0] }}` or `{{ obj['k'] }}` over a missing item prints nothing (2.9.9 printed « undefined », or « null » for a null item), `{{ arr[0].x }}` and `{{ arr[0]|upper }}` no longer throw, and a function from the locals that returns nothing renders empty (`{{ fn() }}` printed « undefined »); on 2.9.10 a tag argument that filters a missing subscript (`{% set y = arr[0]|upper %}`) still throws. Since swig 2.9.11, which gina requires from 0.7.7 (#B1022), native swig applies a filter in a `set`, `if`, `elseif`, `for`, `include` or `filter` tag argument to its own operand, as in an output: `{% set y = arr[0]|upper %}` over an empty array no longer throws, shapes such as `{% for c in (x)|reverse %}` now compile, and a filter after a function or method call with an expression before it applies to that call only, in a `set`, `if`, `elseif` or `for` argument alike (up to 2.9.10 it applied to the whole expression before it: `{% set y = a + f(x)|upper %}` with `a = "x"`, `x = "ab"` gives `xAB`, where it gave `XAB`; `{% if z and f(x)|upper %}` with `z = 0` is now false); a filter after a literal in an output that holds an operator or a ternary applies to the literal (`{{ 3|default(1) + 1 }}` gives 4, 2.9.10 gave 3); an output whose variable is followed by a filter renders an empty string when the last filter returns undefined or null (`{{ items|first }}` over `[]`, a custom filter that returns nothing; 2.9.10 printed « undefined » or « null »); and inside an `{% autoescape true %}` region a missing subscript or member, or a call that returns undefined, renders an empty string (gina's `settings.swig.autoescape` is a boolean, which already did). Since swig 2.9.12, which gina requires from 0.7.8 (#B1034), blocks nested in blocks follow one chain of definitions per block name: a block nested in any block of an extending template defines its name even when the root has no block for the enclosing one (`{% block zz %}{% block b %}N{% endblock %}{% endblock %}` over a parent's `<{% block b %}P{% endblock %}>` renders `<N>`, 2.9.11 rendered `<P>`), `{% parent %}` in a block nested in an override renders the next definition of its name (`<YC>` becomes `<YCI>`), and on the sync path so does `{% parent %}` in an override of a nested block, as the async path already did (`O[C]` becomes `O[CI]`); a block that renders itself through a nested block or `{% parent %}` fails with an error naming the block (2.9.11 overflowed the stack on the sync path). Since swig 2.9.13, also required from 0.7.8: `date` of a missing, null, empty or unparseable value renders an empty string (2.9.11 printed `NaN/NaN/NaN`); a filter or call result that is undefined or null reads as an empty string at a `+` or unary operand, in outputs and `set` arguments alike (`{{ "a" + f() }}` renders `a`, `{{ 1 + f() }}` 1 and `{{ -f() }}` 0, where 2.9.11 printed `aundefined`, NaN and NaN); a filter after a filter or a call that found nothing renders an empty string (`{{ items|first|lower }}` over `[]` threw, `{{ f()|upper }}` with a null result printed `[object Object]`); `first`, `last` and `replace` give an empty string for an undefined or null input, and `length` gives 0 (they threw). The engine gina's async loader delegate builds passes `cache: false`, so the template cache that swig 2.9.13 added to its async loader path does not engage there: a layout and an include load on every render on that path (since 0.7.14 the default engine keeps compiled includes outside dev mode, #B1176). Swig 2.10.0's notes change only the swig-twig, swig-jinja2 and swig-django frontends; native swig already rejects an unknown filter name at compile time (`Invalid filter "x" on line 1.` on 2.9.11 and 2.10.0). Swig 2.11.0's notes change only swig-jinja2 and swig-django, whose `==`, `!=` and `in` now compare with Python's equality (swig-jinja2 also gains Jinja2's comparison tests, `x is eq 1`); native swig's own lib files differ from 2.10.0 only in their version stamps, and its compiled code and output for `==`, `!=` and `in` are unchanged.
58
58
 
59
- Swig 2.9.5 bounds the async render path and keeps a cached layout unchanged (advisories GHSA-86pr-x856-xrq5 and GHSA-g628-5x3r-g298). On the async loader path a template that includes, imports or extends itself, directly or through another template, now fails the render once more than 1,000 templates are nested (« Template "<name>" is nested more than 1000 levels deep: a template probably includes, imports or extends itself. »), and an `extends` cycle fails at once (« Illegal circular extends of "<name>" », the sync path's error); up to 2.9.4 it loaded templates until the heap ran out and the process aborted. Up to 2.9.4, with swig's memory compile cache, the first page that overrode a block nested inside a tag of a cached layout put its override into that layout, so other pages extending it showed that block. Gina's render paths never reach that: the sync path renders through the per-bundle engine `getDefaultSwigEngine` builds with `cache: false`, and the async delegate builds its engine with `cache: false`; an application that compiles with swig itself and `cache: 'memory'` did. Pinned by `test/lib/swig-nesting-cache-b983.test.js`, through both copies gina resolves (`GINA_B983_SWIG_FROM=<dir>` points it at another copy). Swig 2.9.6 renders on a copy of the locals it is given (advisory GHSA-25w8-77gg-4ccw): up to 2.9.5 a name a template set (`{% set %}`, a macro, an import, a loop variable) landed in the locals object passed to the render, so a later render given the same object read it, and with swig's memory cache a compile given locals in its options kept them for later compiles of the same file. gina's per-render copy (`renderData.copyForRender`, #B988) keeps a plain object an action passes unwritten on every swig version and returns a class instance as is, which 2.9.6's copy covers (its prototype methods and getters still resolve); gina compiles with `cache: false`, so the cached case is not reached. Also new in 2.9.6: a top-level property of the locals that is not enumerable is no longer seen, a top-level getter is read once per render, frozen locals take a set, and on the async path `{% parent %}` renders, a macro holding `{% parent %}` throws, and an imported template's sets stay out of the importer. Unchanged: an include's set reaches the page, a child template's top-level set reaches its layout, and a dotted set (`{% set a.b = x %}`) still writes into the nested object it names. Pinned by `test/lib/swig-locals-copy-b997.test.js`, through both copies (`GINA_B997_SWIG_FROM=<dir>` points it at another copy). Swig 2.12.1 keeps a key from the template data that names `__proto__`, `constructor` or `prototype`, or a list holding one, off the prototype chain (advisory GHSA-8mf3-p375-389g): up to 2.12.0 such a key reached it in a subscript (`{{ foo[k] }}` printed the Object constructor), in a call on one (`{{ foo[a][b]("return 7")() }}` with a and b set to `constructor` ran text from the data as JavaScript) and through a native `{% set %}` bracket target (`{% set obj[k].x = 1 %}` put a property on `Object.prototype` for the whole process). 2.12.1 reads such a key as missing, a native set target given one throws « Unsafe assignment to "__proto__" via bracket notation is not allowed (prototype-chain guard) » when the template runs, and a prototype-chain name written as a variable inside a set target's brackets fails at compile. A set target keyed by a loop index compiles to a runtime key check whose output is unchanged. gina compiles each template when it renders it and stores no compiled output (its layout cache holds template source), so a restart picks the fix up; output precompiled by 2.12.0 or earlier keeps the old behaviour until it is recompiled. Pinned by `test/lib/swig-prototype-keys-b1088.test.js`, through both copies (`GINA_B1088_SWIG_FROM=<dir>` points it at another copy). Since #B1117 gina's own lockfiles lock swig 2.12.2 (the range stays `^2.12.1`, which a fresh install already resolves to 2.12.2), whose subscripts and native `in` no longer see, on the default (sync) render path, what an object only inherits from `Object.prototype`: `{{ foo[k] }}` with `k` set to `__defineGetter__` and `{{ foo["hasOwnProperty"]("b") }}` print nothing (2.12.1 printed the inherited function and `true`; the dotted `{{ foo.hasOwnProperty("b") }}` still prints `true`), and `{% if k in obj %}` over `{ b: 1 }` is false when `k` is `constructor`, `toString`, `__proto__` or `hasOwnProperty` (true for `b`), while a `{% for k, v in m %}` over data holding an own `hasOwnProperty` key lists it (2.12.1 threw « obj.hasOwnProperty is not a function »), `{% set o = {"__proto__": {"y": 3}, "a": 2} %}` keeps `"__proto__"` as an own key, so `{{ o.y }}` prints nothing (2.12.1 printed 3), and `{% block __proto__ %}` is refused with « Unsafe block name "__proto__" is not allowed (prototype-chain guard) ». Since #B1136 they lock swig 2.12.3 (the range stays `^2.12.1`), a fix release with no advisory whose native changes reach only these shapes: `{% autoescape %}` with no argument fails at compile with « Expected true, false, "html" or "js" in autoescape tag on line N. » (2.12.2 turned escaping off) and with a string other than `"html"` or `"js"` with « Unexpected token » (2.12.2 HTML-escaped), also in a part of a template that never renders; the end of a nested autoescape region restores the enclosing region, not the template default; an `autoescape` option set to `undefined` reads as `true` (gina passes only a boolean); text ending with `#}`, and an unclosed `{#`, render as text (2.12.2 rendered nothing); a second `{% else %}`, or an `{% elseif %}` or `{% elif %}` after it, fails at compile with « Multiple "else" branches in "if" tag on line N. » (2.12.2 threw « Unexpected token 'else' »); `{% for x in arr[0] %}` compiles (`{% for i in 1..3 %}` still throws « Unexpected number »); and `groupBy` leaves out a null or undefined item (2.12.2 threw a TypeError). Output precompiled by 2.12.2 keeps the old autoescape and comment behaviour until it is recompiled; gina compiles at render time, so a restart picks the change up. Since #B1138 they lock swig 2.12.4, now 2.12.6 (the range stays `^2.12.1`). 2.12.4 is a fix release with no advisory that changes how a compiled template reads a name: a reserved word (`{{ class }}`) renders its context value; a name an object gets only from `Object.prototype` reads as missing, bare, dotted or called (`{{ o.toString() }}` and `{{ o.hasOwnProperty("a") }}` on a plain object render ""), and in a gina process that includes gina's own `count` and `functionCount` helpers, so `{{ r.count() }}` renders "" and `{% if r.count %}` is false unless `r` holds its own `count` key (a query row's `count` column reads as before); a context key named like a JavaScript global (`JSON`, `Math`, `encodeURIComponent`) that holds null or undefined now hides that global; a name the compiled code uses (`_output`, `_ext`, `__k`) reads only the context, so `{{ _ext.name }}` renders "" (a custom tag's compiled code still reads `_ext`) and `{{ __k }}` in a one-name loop no longer gives the index (`loop.key` does). 2.12.5, with no advisory either, fixes a for loop that failed to compile when its compile drew a `Math.random()` value under 1e-6 (about one compile in a million). gina compiles at render time, so a restart picks the change up. 2.12.6, with no advisory, makes a sync render that reaches a template compiled with `codegenMode: 'async'` and registered (`register()`, `registerBundle()`, `run()`) fail with an error naming the template, where it printed `[object Promise]`, and makes the async render path's check for a loop, a wrapping tag or a macro that awaits linear on a long run of escaped quotes (the same answers); gina compiles nothing in async mode to register, so its output does not change, and a restart picks the release up.
59
+ Swig 2.9.5 bounds the async render path and keeps a cached layout unchanged (advisories GHSA-86pr-x856-xrq5 and GHSA-g628-5x3r-g298). On the async loader path a template that includes, imports or extends itself, directly or through another template, now fails the render once more than 1,000 templates are nested (« Template "<name>" is nested more than 1000 levels deep: a template probably includes, imports or extends itself. »), and an `extends` cycle fails at once (« Illegal circular extends of "<name>" », the sync path's error); up to 2.9.4 it loaded templates until the heap ran out and the process aborted. Up to 2.9.4, with swig's memory compile cache, the first page that overrode a block nested inside a tag of a cached layout put its override into that layout, so other pages extending it showed that block. Gina's render paths did not reach that up to 0.7.13: the sync path rendered through the per-bundle engine `getDefaultSwigEngine` builds, then with `cache: false`, and the async delegate builds its engine with `cache: false`; an application that compiles with swig itself and `cache: 'memory'` did. Since 0.7.14 (#B1176) the sync engine takes swig's memory cache outside dev only on swig 2.9.6 or later, so a project on its own swig below 2.9.5 is still not reached. Pinned by `test/lib/swig-nesting-cache-b983.test.js`, through both copies gina resolves (`GINA_B983_SWIG_FROM=<dir>` points it at another copy). Swig 2.9.6 renders on a copy of the locals it is given (advisory GHSA-25w8-77gg-4ccw): up to 2.9.5 a name a template set (`{% set %}`, a macro, an import, a loop variable) landed in the locals object passed to the render, so a later render given the same object read it, and with swig's memory cache a compile given locals in its options kept them for later compiles of the same file. gina's per-render copy (`renderData.copyForRender`, #B988) keeps a plain object an action passes unwritten on every swig version and returns a class instance as is, which 2.9.6's copy covers (its prototype methods and getters still resolve); gina's own compiles pass no locals in their options, so the cached case is not reached through them (and since 0.7.14 the default engine caches only on swig 2.9.6 or later, #B1176). Also new in 2.9.6: a top-level property of the locals that is not enumerable is no longer seen, a top-level getter is read once per render, frozen locals take a set, and on the async path `{% parent %}` renders, a macro holding `{% parent %}` throws, and an imported template's sets stay out of the importer. Unchanged: an include's set reaches the page, a child template's top-level set reaches its layout, and a dotted set (`{% set a.b = x %}`) still writes into the nested object it names. Pinned by `test/lib/swig-locals-copy-b997.test.js`, through both copies (`GINA_B997_SWIG_FROM=<dir>` points it at another copy). Swig 2.12.1 keeps a key from the template data that names `__proto__`, `constructor` or `prototype`, or a list holding one, off the prototype chain (advisory GHSA-8mf3-p375-389g): up to 2.12.0 such a key reached it in a subscript (`{{ foo[k] }}` printed the Object constructor), in a call on one (`{{ foo[a][b]("return 7")() }}` with a and b set to `constructor` ran text from the data as JavaScript) and through a native `{% set %}` bracket target (`{% set obj[k].x = 1 %}` put a property on `Object.prototype` for the whole process). 2.12.1 reads such a key as missing, a native set target given one throws « Unsafe assignment to "__proto__" via bracket notation is not allowed (prototype-chain guard) » when the template runs, and a prototype-chain name written as a variable inside a set target's brackets fails at compile. A set target keyed by a loop index compiles to a runtime key check whose output is unchanged. gina keeps compiled templates in memory only (its layout cache holds template source), so a restart picks the fix up; output precompiled by 2.12.0 or earlier keeps the old behaviour until it is recompiled. Pinned by `test/lib/swig-prototype-keys-b1088.test.js`, through both copies (`GINA_B1088_SWIG_FROM=<dir>` points it at another copy). Since #B1117 gina's own lockfiles lock swig 2.12.2 (the range stays `^2.12.1`, which a fresh install already resolves to 2.12.2), whose subscripts and native `in` no longer see, on the default (sync) render path, what an object only inherits from `Object.prototype`: `{{ foo[k] }}` with `k` set to `__defineGetter__` and `{{ foo["hasOwnProperty"]("b") }}` print nothing (2.12.1 printed the inherited function and `true`; the dotted `{{ foo.hasOwnProperty("b") }}` still prints `true`), and `{% if k in obj %}` over `{ b: 1 }` is false when `k` is `constructor`, `toString`, `__proto__` or `hasOwnProperty` (true for `b`), while a `{% for k, v in m %}` over data holding an own `hasOwnProperty` key lists it (2.12.1 threw « obj.hasOwnProperty is not a function »), `{% set o = {"__proto__": {"y": 3}, "a": 2} %}` keeps `"__proto__"` as an own key, so `{{ o.y }}` prints nothing (2.12.1 printed 3), and `{% block __proto__ %}` is refused with « Unsafe block name "__proto__" is not allowed (prototype-chain guard) ». Since #B1136 they lock swig 2.12.3 (the range stays `^2.12.1`), a fix release with no advisory whose native changes reach only these shapes: `{% autoescape %}` with no argument fails at compile with « Expected true, false, "html" or "js" in autoescape tag on line N. » (2.12.2 turned escaping off) and with a string other than `"html"` or `"js"` with « Unexpected token » (2.12.2 HTML-escaped), also in a part of a template that never renders; the end of a nested autoescape region restores the enclosing region, not the template default; an `autoescape` option set to `undefined` reads as `true` (gina passes only a boolean); text ending with `#}`, and an unclosed `{#`, render as text (2.12.2 rendered nothing); a second `{% else %}`, or an `{% elseif %}` or `{% elif %}` after it, fails at compile with « Multiple "else" branches in "if" tag on line N. » (2.12.2 threw « Unexpected token 'else' »); `{% for x in arr[0] %}` compiles (`{% for i in 1..3 %}` still throws « Unexpected number »); and `groupBy` leaves out a null or undefined item (2.12.2 threw a TypeError). Output precompiled by 2.12.2 keeps the old autoescape and comment behaviour until it is recompiled; gina compiles in the running process, never ahead of time, so a restart picks the change up. Since #B1138 they lock swig 2.12.4, now 2.12.6 (the range stays `^2.12.1`). 2.12.4 is a fix release with no advisory that changes how a compiled template reads a name: a reserved word (`{{ class }}`) renders its context value; a name an object gets only from `Object.prototype` reads as missing, bare, dotted or called (`{{ o.toString() }}` and `{{ o.hasOwnProperty("a") }}` on a plain object render ""), and in a gina process that includes gina's own `count` and `functionCount` helpers, so `{{ r.count() }}` renders "" and `{% if r.count %}` is false unless `r` holds its own `count` key (a query row's `count` column reads as before); a context key named like a JavaScript global (`JSON`, `Math`, `encodeURIComponent`) that holds null or undefined now hides that global; a name the compiled code uses (`_output`, `_ext`, `__k`) reads only the context, so `{{ _ext.name }}` renders "" (a custom tag's compiled code still reads `_ext`) and `{{ __k }}` in a one-name loop no longer gives the index (`loop.key` does). 2.12.5, with no advisory either, fixes a for loop that failed to compile when its compile drew a `Math.random()` value under 1e-6 (about one compile in a million). gina compiles in the running process, never ahead of time, so a restart picks the change up. 2.12.6, with no advisory, makes a sync render that reaches a template compiled with `codegenMode: 'async'` and registered (`register()`, `registerBundle()`, `run()`) fail with an error naming the template, where it printed `[object Promise]`, and makes the async render path's check for a loop, a wrapping tag or a macro that awaits linear on a long run of escaped quotes (the same answers); gina compiles nothing in async mode to register, so its output does not change, and a restart picks the release up.
60
60
 
61
61
  ---
62
62
 
@@ -85,7 +85,7 @@ The helpers directory (`framework/v*/helpers/`) is loaded by `helpers/index.js`
85
85
 
86
86
  ```javascript
87
87
  _(path, isAbsolute) // PathObject — resolves paths, normalises separators
88
- requireJSON(path) // JSON-with-comments loader (// always; /* */ when the file has a /** docblock; linear, string-aware since #B568). No caching: every call re-reads the file. A parse error quotes the file from 200 characters before the error to 300 after it, marked `--(ERROR !)--`, when the engine reports a position (#B917)
88
+ requireJSON(path) // JSON-with-comments loader (// always, cut only outside a quoted value since #B1170; /* */ when the file has a /** docblock; linear, string-aware since #B568). No caching: every call re-reads the file. A parse error quotes the file from 200 characters before the error to 300 after it, marked `--(ERROR !)--`, when the engine reports a position (#B917)
89
89
  getPath(name) // Get named path ('gina', 'bundle', 'project', ...)
90
90
  setPath(name, pathObj) // Register named path
91
91
  getContext(key) // Global key-value store (survives require.cache eviction)
@@ -249,7 +249,7 @@ SELECT * FROM users WHERE id = $1 AND t._scope = $scope
249
249
  ```
250
250
 
251
251
  - `@return {object}` → single row (first result or `null`)
252
- - `@return {Array}` → all rows (default for SELECT)
252
+ - `@return {Array}` → all rows (default for SELECT; SQLite asks the prepared statement instead of reading its first keyword, so a `WITH … SELECT`, a `VALUES`, a `PRAGMA` read and an `INSERT … RETURNING` read rows too, #B1169)
253
253
  - `@return {boolean}` → `changes > 0` / `affectedRows > 0` / `rowCount > 0` (write) or `rows.length > 0` (SELECT)
254
254
  - `@return {number}` → first key of first row (COUNT queries)
255
255
  - `$scope` — Couchbase only: substituted as a string literal, not a positional parameter; since 0.6.33 the scope must match `^[A-Za-z0-9_./-]+$` or the bundle refuses to boot (`GINA_COUCHBASE_INVALID_SCOPE`), and a longer placeholder such as `$scopeId` is not substituted
@@ -498,7 +498,7 @@ Counters are live — no restart required. `activeSessions` is bounded by ≥ 0.
498
498
 
499
499
  **Global routing (`routing.global.json`)** — lives at bundle `config/routing.global.json` or project-wide `shared/config/routing.global.json`. The framework reads exactly ONE key from this file: `middleware` — an array of middleware references prepended to every route's own `middleware` list. Every other key in the file is ignored; do not put caching or header configuration there. For response caching / `Cache-Control`, use the per-route `cache` field in `routing.json`; for a static header on every response, declare it under `server.response.header` in `env.json`.
500
500
 
501
- **Method checks follow the request, whatever `server.protocol` says (0.6.33).** A bundle configured `"protocol": "http/2.0"` also serves HTTP/1.1 through the HTTP/2 server's `allowHTTP1` fallback — a client that does not negotiate h2, or a reverse proxy speaking HTTP/1.1 upstream (nginx's `proxy_pass` does). Every method check compares the request's own `req.method`. Before 0.6.33 the router read the h2-only `:method` pseudo-header on such bundles, so an HTTP/1.1 request passed every method check: any method ran a single-method route without a `:param` segment and any multi-method route, and because the warm route cache is keyed `method:pathname`, one such request left the wrong route as the cached answer for later HTTP/2 clients of that method and path too. An HTTP/1.1 CORS preflight on such a bundle is answered 204, as an HTTP/2 one is. Status codes, measured on the default engine: a wrong method on a single-method route answers **404** (the early method filter skips the rule before URL matching); a URL whose matching multi-method route does not list the method answers **405**.
501
+ **Method checks follow the request, whatever `server.protocol` says (0.6.33).** A bundle configured `"protocol": "http/2.0"` also serves HTTP/1.1 through the HTTP/2 server's `allowHTTP1` fallback — a client that does not negotiate h2, or a reverse proxy speaking HTTP/1.1 upstream (nginx's `proxy_pass` does). Every method check compares the request's own `req.method`. Before 0.6.33 the router read the h2-only `:method` pseudo-header on such bundles, so an HTTP/1.1 request passed every method check: any method ran a single-method route without a `:param` segment and any multi-method route, and because the warm route cache is keyed `method:pathname`, one such request left the wrong route as the cached answer for later HTTP/2 clients of that method and path too. An HTTP/1.1 CORS preflight on such a bundle is answered 204, as an HTTP/2 one is. Status codes, measured on the default engine: a wrong method on a single-method route answers **404** (the early method filter skips the rule before URL matching); a URL whose matching multi-method route does not list the method answers **405**. **Since 0.7.14 a method Node's HTTP parser does not accept gets 501 (#B1168).** A request whose method is not in `http.METHODS` is answered `501 Not Implemented` before any rule is compared, and the method is matched as text (escaped), so the methods Node lists match as before. Only an HTTP/2 client can send such a method (any token is a valid `:method`); over HTTP/1.1 Node answers it 400 before gina sees it. Until 0.7.13 the method was compiled as a regular expression: `*` or `+` threw and left the request unanswered, and `.` matched every rule's method, so an action ran under a method its rule does not list, without its body.
502
502
 
503
503
  **A route's requirements are its own (0.6.33).** For a GET or DELETE request, a request key that names a requirement the route declares, but does not bind as a whole `:key` URL segment, is validated as an extra URL variable (this is how a `validator::` or regex requirement gates a query or body key). Only requirements the route declares itself count. Before 0.6.33 the name was looked up with a plain property read, so a query key named like a member every object inherits (`toString`, `valueOf`, `toLocaleString`, `isPrototypeOf`) read as a declared requirement; each such key, with a value shaped like that member's source text, replaced one leading segment of the compared URL (the always-empty leading position, then the webroot, then the path), so a request reached a route whose path differs from its own and the action received `req.params.toString` as a string. A path-based control applied outside the route (a reverse-proxy location rule) was bypassable; the route's own middleware still ran. Pickup: restart and re-bake (`lib/routing` is in the browser bundle).
504
504
 
@@ -794,7 +794,7 @@ Dev-mode query instrumentation captures every database query tied to the current
794
794
  - **Supported connectors** — Couchbase (`type: 'N1QL'`, `connector: 'couchbase'`), MySQL (`type: 'MySQL'`, `connector: 'mysql'`), PostgreSQL (`type: 'PG'`, `connector: 'postgresql'`), SQLite (`type: 'SQL'`, `connector: 'sqlite'`), plus DuckDB (`type: 'DUCKDB'`), ScyllaDB (`type: 'CQL'`) and MongoDB (`type: 'MQL'` — its `statement` is the op + stringified resolved body; no index badges for these three). SQLite uses synchronous `execute()` (try/catch) instead of async callbacks.
795
795
  - **`origin` tagging** — `infos.bundle` (set on `Entity.prototype.bundle` at registration). **`connector` tagging** — hardcoded string per connector.
796
796
  - **Cross-bundle propagation** — when bundle A calls B via `self.query()`, B's queries travel back as `__ginaQueries` in the JSON response (embedded by `render-json.js`). A's `query()` callback extracts, merges into its own `local._queryLog`, and deletes the field before data reaches the controller action. **The Inspector Data tab hides `__gina*` keys (#B340).** That caller-side delete does NOT cover a bundle looking at its OWN outgoing JSON payload — `render-json.js` embeds `__ginaQueries` + `__ginaFlow` (in dev (`isCacheless()`) only since #B993 (0.7.7): up to 0.7.6 also during a production instrumentation window for a request carrying `x-gina-inspector: true`, the header `self.query()` sends on a cross-bundle call, which any client can send, so an unauthenticated request read its own query log and timeline; a window's capture now leaves only over the authenticated `/_gina/agent` channel, and a caller's prod Inspector no longer shows a callee's queries merged in, one window per bundle; tests `test/core/render-json-sidecar-window-b993.test.js` + `test/integration/container-boot-inspector-sidecar-b993.test.js`) and the Data tab renders exactly that object, so both keys surfaced as top-level rows. `inspector.js` now strips any root key prefixed `__gina` (`stripInternalKeys`, applied where the payload is resolved) so the tree, root scalars, size badge, dot-path search, raw-JSON mode and the download modal + its output all agree. **Root level only** — a nested `__gina*` key is application data and is left alone. The keys stay on the wire untouched (the Flow tab's upstream merge depends on them) and remain visible first-class in the Query and Flow tabs; only the Data tab's view of them changed. **Written into a copy since #B992 (0.7.6).** `render-json.js` used to add the two sidecars to the object the action passed, so a memoized response object kept one request's query log and timeline and sent them in every later response built from it, to any client and after the window had closed; it now writes them into `copyOwn(jsonObj)` (`core/controller/render-data.js`, one level deep, made at the first write and reused by the second; a class instance is not copied). Test: `test/core/render-json-sidecar-copy-b992.test.js` (10; the shipped block run with supplied inputs; red-first 6 fail, the 2 controls pass).
797
- - **Index reporting (Couchbase)** — `extractIndexes(profile)` walks `meta.profile.executionTimings` tree (`~child`/`~children` recursion) to find `IndexScan3`/`PrimaryScan3`/`ExpressionScan`/`KeyScan` operators and extract index names. Two extraction paths: `meta.profile` (fast, SDK v3) and EXPLAIN fallback (SDK v4 — C++ binding doesn't surface `meta.profile`). `_explainCache` Map caches per unique statement. `USE KEYS` queries detected via `ExpressionScan`/`KeyScan` operators. Enabled by `queryOptions.profile = 'timings'` in dev mode for SDK v3+. Three visual states: green (secondary), amber (primary scan), red (no index). Grey N/A badge for unsupported connectors.
797
+ - **Index reporting (Couchbase)** — `extractIndexes(profile)` walks `meta.profile.executionTimings` tree (`~child`/`~children` recursion) to find `IndexScan3`/`PrimaryScan3`/`KeyScan` operators and extract index names. Two extraction paths: `meta.profile` (fast, SDK v3) and EXPLAIN fallback (SDK v4 — C++ binding doesn't surface `meta.profile`). `_explainCache` Map caches per unique statement. The EXPLAIN fallback hands the whole first row to `extractExplainIndexes(row)` (#B1161, 0.7.14): Couchbase plans a `LET`/`WITH`, a correlated or a nested subquery apart and lists each plan under `~subqueries`, a sibling of `plan` (entries `{ correlated, plan, subquery }`, nested ones listed flat; a FROM-clause subquery is inlined in `plan`), so those indexes merge in, each name once; a plan made only of no-read operators (`SELECT 1` → DummyScan, `INSERT … VALUES` → ValueScan + SendInsert, a FROM over an expression → ExpressionScan, #B1162) reports the pseudo-entry `no keyspace read` instead of `[]`, any other operator keeping the red. A Community Edition 8.0.2 server returns no `profile` member for `profile=timings`, so there the EXPLAIN fallback is the live path. `USE KEYS` queries detected via the `KeyScan` operator (an `ExpressionScan` is the plan of a FROM over an expression and reads no keyspace, #B1162). Enabled by `queryOptions.profile = 'timings'` in dev mode for SDK v3+. Three visual states: green (secondary), amber (primary scan), red (no index). Grey N/A badge for unsupported connectors.
798
798
  - **Index reporting (SQL connectors — #QI1 Phase A)** — `sql-parser.js` provides `parseCreateIndexes(src)` (parses `CREATE [UNIQUE] INDEX` statements → `{ tableName: [{ name, primary }] }` map) and `extractTargetTable(queryString)` (extracts primary table from SELECT/INSERT/UPDATE/DELETE). Each SQL connector reads an optional `indexes.sql` from the bundle's `sql/` directory at init time, builds an in-memory `_knownIndexes` map. QI resolves `_queryEntry.indexes` per query: `null` when no `indexes.sql` (N/A badge), `[]` when file exists but no index covers the table (red badge), `[{name, primary}]` when matched (green badge).
799
799
  - **Live index introspection (#QI1 Phase B)** — `/_gina/indexes` endpoint (dev-mode only, both `server.js` and `server.isaac.js`) queries actual databases for their indexes. Emits `process.emit('inspector#indexes', callback)` — each SQL connector registers a listener inside its constructor closure and responds with live index data. MySQL queries `INFORMATION_SCHEMA.STATISTICS`, PostgreSQL queries `pg_indexes`, SQLite uses `sqlite_master` + `PRAGMA index_list`. Collector pattern with 2-second timeout. `_liveIntrospected` flag prevents re-querying. Since #QI Phase C.2 the live data also carries each index's columns (STATISTICS `COLUMN_NAME`/`SEQ_IN_INDEX`, `pg_indexes.indexdef` parse, `PRAGMA index_info`), so column-level coverage survives a refresh. Inspector SPA calls the endpoint lazily (only when N/A badges are present), caches result, and re-renders Query tab with resolved indexes. Eliminates the need for manual `indexes.sql` files.
800
800
  - **Inspector UI** — split trigger badge (`entity` | `method`), SQL syntax highlighting, params table (`$1`/`$2` → value), free-text search bar with 200ms debounce, per-card weight color-coding (`bm-stat-*`), filter persistence (lang/connector/bundle in localStorage), pagination (20 cards default, "Show all" button).
@@ -859,7 +859,7 @@ Dev-mode query instrumentation captures every database query tied to the current
859
859
 
860
860
  54. **Bundle `config/*.json` shared → bundle overlay is key-level deep merge, not whole-file replace** — `core/config.js:1766` runs `merge(sharedMain, jsonFile, true)` AFTER the bundle file loads. Shared-only keys are preserved; bundle wins on conflicting keys. Applies to `connectors.json`, `env.json`, `settings.json`, and every other per-bundle config file that also has a `shared/config/<same-file>.json` sibling. Reading only the bundle file for config inspection is a silent half-picture — any CLI or tool that inspects per-bundle config must reproduce the overlay merge.
861
861
 
862
- 65. **Template engines — `lib/swig-resolver` + `lib/nunjucks-resolver` + per-request env mutation invariants** — process-cached resolver-based opt-in for both engines: `core/server.js:initSwigEngine` / `initNunjucksEngine` load via `lib.swigResolver.load()` / `lib.nunjucksResolver.load()` during bundle init; `controller.js this.render()` reads `local.options.conf.content.settings.render.engine` and dispatches to `controller.render-swig.js` (default) or `controller.render-nunjucks.js`. Both delegates receive the same `deps` object (`self`, `local`, `getData`, `hasViews`, `headersSent`, `setResources`, etc.); `process.gina._swig` / `process.gina._nunjucks` survive `refreshCoreDependencies()` evictions. Both: dev-mode mtime hot-swap on project's `package.json`, first-wins standalone-mode contract, `[<engine>-resolver]` warning logged on safety-gate fallback. **Swig**: framework fallback enabled (always-installable), version floor `DEFAULT_MIN = '2.0.0'` (bump in same commit as fork-API dependence — see global "Swig version sync" rule), three safety gates (only the configured package name is looked up, with no list of accepted names, so the abandoned bare `swig` — last released as 1.4.2 — is stopped by the next gate; same-major rule; min-version floor). `swig.package` takes `@rhinostone/swig` (default), `@rhinostone/swig-twig`, `@rhinostone/swig-jinja2` or `@rhinostone/swig-django`; a non-default one needs `useProject: true` and a 2.x project install, since only `@rhinostone/swig` has a framework copy to fall back to: otherwise `load()` throws `SWIG_PACKAGE_UNAVAILABLE`, naming the package, the reason and the install line, with `err.decision` attached (#B925; a bundle stops at start, logged as a ServerEngine error). **Boot order (#B932):** controller.js calls `get()` as it loads (server.js and gna.js require ./router at module scope, router.js requires ./controller), before `initSwigEngine` calls `load()`, so the copy `get()` caches first is PROVISIONAL (`process.gina._swigProvisional`): the first `load()` resolves the configured package and replaces it, a copy cached by `load()` still wins over later calls, and controller.js re-reads `lib.swigResolver.get()` in setOptions and render instead of using its module-load copy. Until 0.7.5 neither held: every booted bundle rendered with the framework copy whatever the settings said (a frontend's templates through the native parser, a misleading « second bundle requested » warning, a pinned swig never loaded, the dev hot-swap never armed). Unit tests that call `load()` on an empty cache cannot see the order; a real boot can (`test/integration/container-boot-swig-package-b932.test.js`, a test-double frontend whose marker filter only it registers). Phase 7 build copies upstream esbuild output to `dist/swig.min.js` (no longer Closure-compiles `bin/swig.js` — swig 2.0.0's `swig-core` lazy require breaks Closure's static analysis). **Output auto-escaping** (`settings.swig.autoescape`, boolean, default false; #B151): both `initSwigEngine` (boot) and `controller.js` per-render `setDefaults` resolve `autoescape` from `conf.content.settings.swig` (guarded to `{}`, then strict `=== true`; the per-render read goes through the REQUEST's own conf, `local.options.conf.content.settings.swig` — until 0.7.1 it went through the global no-argument `getConfig()`, whose caller walk throws under an npm install, and the surrounding `try` fell back to `false`: `autoescape: true` was silently OFF on every npm install from 0.5.25 to 0.7.0, while a checkout — every suite run — never showed it, #B695; the Tests workflow now boots a bundle from a copy of the commit placed under `node_modules/gina` to keep that install shape covered) — ABSENT ⇒ false (unchanged 0.5.x behaviour; the old dead `conf.autoescape` read never fired); a non-boolean value refuses the boot (strictly-boolean security-toggle rule); `true` ⇒ swig HTML-escapes `{{ x }}` variable output; mirrors `settings.nunjucks.autoescape` (default true) — swig's default stays OFF until 0.8.0, which makes it `true`; since 0.7.0 (#B359 prep) a bundle that renders swig (settings engine, or a `.swig` templates section) and leaves the key unset gets ONE boot warning naming 0.8.0 (an explicit `true`/`false` silences it; a nunjucks-only bundle is not warned), `gina bundle:add` scaffolds `"swig": { "autoescape": true }`, the default delegate injects its asset placeholders as `{{ page.view.stylesheets | safe }}` / `{{ page.view.scripts | safe }}` (#B690 — bare, autoescape rendered every injected `<link>`/`<script>` as visible text; a layout placing them itself writes `| safe`, as for nunjucks), and `nl2br` escapes its input and is flagged `.safe` only when the bundle escapes (never `.safe` otherwise: a `{% autoescape true %}` region would then emit its input raw); the 0.8.0 flip needs `| safe` on every variable that carries HTML on purpose, `gina.csrfInput` first (unmarked it renders as text and every POST then fails CSRF); server-side only (no dist rebuild). **Nunjucks**: NEVER framework-bundled (resolver only looks in `<projectPath>/node_modules/nunjucks/`), `load()` throws `NUNJUCKS_NOT_INSTALLED` with no fallback (bundle startup fails loud, not mid-render). `new nunjucks.Environment(loader, ...)` cached per template root on `process.gina._nunjucksEnvs`; dev-mode `FileSystemLoader({ noCache: true })` for `.njk` template hot-edit. **Render-nunjucks.js implementation invariants**: per-request `addFilter → render` mutation of cached env is safe ONLY because `env.render()` is synchronous (Node's event loop serialises requests; an async-render port needs the per-request `process.gina._renderALS` context — a per-request env does NOT fix it: the filters read a process-global `*Filters.instance._options` singleton that a fresh env does not isolate (measured, #TPL1 Tier-2/#B25)); pre-render `setResources()` + post-render `injectAssets()` cooperate via exact-substring user-placement detection (#NJ2) — pre-only loses auto-injection, post-only double-injects on opt-in templates; both wrap bodies in try/catch (must NOT 500 the page); `injectAssets` runs BEFORE `injectInspectorScripts` (Inspector payload stays last `<script>` before `</body>`); `isWithoutLayout` filters via `Collection.find({isCommon:false},{isCommon:true,name:'gina'})` on a `JSON.clone(localTemplateConf)` to keep common-gina assets while dropping common-other. Test-author traps (both resolvers): mtime collision within same wall-clock ms requires monotonic counter; macOS `os.tmpdir()` symlink requires `fs.realpathSync` for `require.cache` key parity. **Per-extension engine dispatch (#M11)**: since #M11 the effective template EXTENSION overrides the engine setting per section — `.njk`→nunjucks, `.swig`→swig, `.html`→`render.engine`; precedence: setTemplate-override ext → `templates.json` section ext → default. NO filename sniffing (an `x.njk.html` must not mis-dispatch); auto-detect-on-`.njk`-presence was measured and DROPPED — explicit per-section ext covers its only value. **#B514 (0.6.30) — the DEFAULT swig delegates entered NO render context at all, and that is the wider half of the #B25 class.** #TPL1 Tier-2 wrapped the two `-async` delegates in `_renderALS.run()` and left `controller.render-swig.js` + `controller.render-v1.js` — the path every bundle takes unless it opts into `settings.template.swig.loader` — resolving filters through the raced `SwigFilters.instance._options` singleton. Both are themselves `async` and await between the per-request `SwigFilters({…})` stamp and the template invocation (render-swig's layout read is unconditional; render-v1 awaits a `Promise.all` of two reads before its compiles), so a concurrent request's stamp lands inside the window and the resumed render emits the OTHER request's negotiated culture, webroot and proxy classification into its own response. The in-tree note asserting "on a synchronous render that's safe" was FALSE when written — the default delegate went `async` in `64b19b7b2` (2026-03-06), three months BEFORE the #B25 fix — and that wrong premise is why the default path stayed unprotected. Both delegates now call `getRenderALS().enterWith(_renderCtx)` immediately after the factory call, handing the SAME object to both so the store and the singleton cannot disagree; `enterWith` rather than `.run()` because the body is one ~1,900-line async function whose every `return` would otherwise have to move inside a callback, and the store propagates to every continuation of the current async context, which is exactly the awaited span. Measured on a built `--env=prod` release — dev MASKS this, since `lib/index.js`'s `_require` re-requires the filter module per request and no singleton is shared, so a dev repro reads clean while production bleeds: 50 of 50 concurrent request pairs carried the other request's context pre-fix, 0 of 100 post-fix, and 0 of 3 across a REUSED keep-alive connection (2 confirmed reuse events — the one shape `enterWith` could have leaked through). Structurally the rate is last-writer-wins, so for N overlapping renders N−1 read the wrong context. **`render-nunjucks.js` is the one delegate genuinely free of the window** — its singleton write (`registerGinaFilters`) and its `env.render` sit in ONE synchronous run with no await between them, which is what the per-request-env sentence above actually rests on. ✅ **Sibling limb, CLOSED in the same arc — and it was NOT surgically closable:** `controller.js`'s per-render `swig.setDefaults({loader})` on the process singleton has the identical interleave shape for `{% include %}` / `{% extends %}` basepath resolution in MERGED-PROCESS mode (several bundles, one process). A per-call `loader` handed to `swig.compile()` CANNOT fix it — measured in swig-core: `self.parse` merges per-call options into a local that never escapes the function (`engine.js:477`), while `getParentsInternal` (`:321`) and `parseFile` (`:490`) read `self.options.loader` unconditionally, and the `{% include %}` codegen emits only `resolveFrom` (`backend.js:420`); the validators at swig.js:113 and runtime.js:58 accept a per-call loader and then nothing loads through it. The only working shape is a per-bundle `new swig.Swig({ loader })` instance, and that is what `controller.js` now builds — `getDefaultSwigEngine(swigMod, templateRoot, opts)`, keyed on the bundle template root, owner-guarded against a dev swig hot-swap exactly like `_swigEngines`, handed to the delegates as `deps.swig` and pointed at by `self.engine` (the async-loader delegate builds an engine of its own from the swig MODULE, handed as `deps.swigModule`: from 0.6.30 to 0.7.3 it was given the instance, which has no `.Swig`, and every render of a bundle with `settings.template.swig.loader` answered 500 with `swigMod.Swig is not a constructor`, #B808; that engine never received what `setup.js` registers on the bundle's engine either — a template using a bundle filter answered `Invalid filter`, a tag `Unexpected tag` — until #B825: for a bundle with an async loader, `setOptions` wraps the bundle engine's three setters with `recordRegistrations` (into `engine._ginaRegistrations`, `rev` bumped per call, OUTSIDE `getDefaultSwigEngine` and the #B535 bridge so their pins and lifts hold), and the delegate's `replayBundleRegistrations` replays the record onto its own engine whenever `rev` changed, skipping any filter name `registerGinaFilters` registered: on the default path gina re-registers its filters at each render, after setup.js, so a same-name bundle filter loses there — measured — and must lose here too). That last part is load-bearing: `router.js:1079` hands `controller.engine` to the bundle's `controllers/setup.js`, so a bundle's OWN filters must land on the instance that renders it — `engine.install` gives every instance fresh tag/filter maps, so they would otherwise be silently dropped (and since #TPL3, 0.7.6, a swig render runs `setup.js` on that engine itself when the engine has not run it yet — entry 316 — so a route-middleware render sees those filters from the first request after boot). **Live-verified against a baseline**: a scaffold whose `setup.js` registers a custom filter rendered `STAMP<x>` both before and after the change. The module-level `setDefaults` is deliberately KEPT — `core/server.js` still compiles inline routing/asset strings through the module with `swig.getOptions()` — so nothing renders a bundle template through the module any more and the stamp it races is inert. ⚠️ **#B535 (0.6.30, same tree) — that instance's registrations then had to be bridged BACK to the module, because "nothing renders a bundle template through it" is not the same as "nothing compiles through it".** `engine.install` gives every `new Swig()` FRESH filter/tag/extension maps — copied from the frontend's built-in library, NOT from the module's runtime registrations — and keeps them closure-private in BOTH directions (measured on the real fork, four arms with both controls firing: a filter registered on the module BEFORE or AFTER construction never reaches an instance, and an instance's never reaches the module). So while templates stopped rendering through the module, `core/server.js:3094`/`:3352` still compile inline routing/asset strings through it, and an application's own `require('@rhinostone/swig').compile()` — an entity rendering a message outside any request — still compiles through it; every one of those silently lost the filters a bundle's `controllers/setup.js` had registered, which on 0.6.29 reached them because `self.engine` WAS the module. Reported by a consumer as a `TypeError` thrown from INSIDE a filter (so the filter was found — the diagnostic that rules out a missing-filter reading): their own module-side registration was the only one left there, and its closure had never passed the router's export block. `bridgeRegistrationsToModule(engine, swigMod)`, called on the line after the mint in `getDefaultSwigEngine`, wraps the instance's `setFilter`/`setTag`/`setExtension` to register on the INSTANCE first (its own validation throws before the module is touched) and then on the module; idempotent per (instance, module) via an `_ginaModuleBridge` marker, and the owner-guard rebuild bridges each fresh instance. The instance keeps its OWN options — the loader above all — so the include/extends isolation this entry exists for is untouched; only the registration maps are shared again, which is the state every released version had. The REVERSE direction is deliberately NOT bridged: a module-registered filter still never reaches an instance, so registering anywhere other than through `this.engine` in `setup.js` stays unsupported — and that guidance is measured-correct, not merely conventional. DEVELOP-ONLY: the defect never shipped (the `0.6.30-alpha.1` tarball carries `getDefaultSwigEngine` = 0 and the pre-#B514 `self.engine = swig;`), so no released consumer tier was affected and no advisory is owed. ⚠️ **#B538 (0.6.30, same tree) — a SIBLING of #B535, not the same defect: `self.engine.getOptions()` threw `TypeError: … is not a function` on the accessor itself, before any compile.** `controller.js` installs `swig.getOptions` on the MODULE once per request (a closure over that request's `local._swigOptions`, a `JSON.clone` of `{ autoescape, cache, loader }`), and until #B514 `self.engine` WAS the module, so the documented call shape `self.engine.compile(tpl, self.engine.getOptions())(data)` resolved; the per-bundle instance never received the accessor, and the #B535 bridge carries the three registration SETTERS, not methods. It has ZERO framework call sites — the only internal reads are `core/server.js`'s two inline routing/asset compiles, both through the module — which is why the suite stayed green: the contract is consumer-facing, documented only by the comment at the assignment site. Diagnostic worth knowing: inside an async controller callback the TypeError surfaces as an UNHANDLED REJECTION and the request is never answered, so the CALLING bundle waits out its HTTP/2 stream timeout and reports a 503 with no template error and no access line on the answering side — it presents as a proxy/network fault. The accessor cannot be copied from the module (per-REQUEST closure onto a per-BUNDLE shared instance — the cross-request-bleed shape). `exposeOptionsOnEngine(engine, opts)`, called on the line after the #B535 bridge in the mint branch, snapshots `opts` ONCE at mint (measured: neither `new Swig(opts)` nor `setDefaults(opts)` mutates the object handed in, so the snapshot equals the pre-`setDefaults` clone every released version returned) and returns a fresh `JSON.clone` of it per call — a strict HARDENING over 0.6.29, which returned one shared object by reference. `JSON.clone` is gina's own deep copy (`utils/prototypes.json_clone.js`) and PRESERVES the loader's `resolve`/`load` functions; a `JSON.parse(JSON.stringify())` stand-in — the file's own commented-out previous implementation — strips them, and swig-core REFUSES a per-call `loader: {}` (`Invalid loader option`), so any probe built on the stand-in reads a broken loader that does not exist. Measured on the real fork: `compile(tpl)` and `compile(tpl, engine.getOptions())` are IDENTICAL (a differing `autoescape` as the firing control) — the round-trip is supported for compatibility, never required. Returning `instance.options` was rejected: swig-core's merged defaults are a wider surface than any release exposed. Pickup is a bundle RESTART (the registry on `process.gina` survives hot-reload's `require.cache` eviction, so the accessor lands only on instances minted after the restart). DEVELOP-ONLY like #B535 — the published `0.6.30-alpha.1` tarball carries the pre-#B514 shape and no tag contains `0e443f83b`; no consumer tier affected, no advisory owed. ⚠️ Note the fix is structural, NOT validated against its own trigger: there is no supported CLI path to a shared port (`port:set` rejects or evicts, never shares), and the only RUNTIME-MEASURED record on file reports siblings are not served in merged mode at all, so no reachable trigger was confirmed. ⚠️ **Two naming footguns for anyone who touches merged mode:** `isStandalone === true` means MERGED — *one process serves every bundle* — which is inverted from what the name suggests (`core/config.js:719` seeds it true, `:1210` flips it FALSE the moment any bundle's port differs from the starting bundle's, and `config.js:454` describes `!isStandalone` as the non-merged case). And it is ALSO true for an ordinary single-bundle project, so it is not a merged predicate on its own: `core/server.js` gates its merged-only warn on `bundles.length > 1` for exactly that reason. Merged mode is INFERRED from `~/.gina/ports.reverse.json` (the forward `ports.json` is declared but never read at boot), never configured — which is why no CLI verb reaches it. ⚠️ Instrument trap banked from the baseline: the probe extracting the custom filter's output used `[^<]*`, and the filter's own output contains `<`, so it read EMPTY — indistinguishable from « the bundle filter was dropped ». A negative reading about a filter must be validated against a known-positive before it is believed. **#B519 / #B809 (0.7.4) — the filter context is REQUEST-BOUND: inside a request the process-wide slot is neither read nor written.** #B514 closed the two default delegates and left the slot itself in place: every factory call still stamped `<Filters>.instance._options`, and every reader with no render store of its own still read it. So a template executed on a request path OUTSIDE a render delegate — an action calling `self.engine.compile(tpl)(data)` or `compileFile` — resolved the context of whichever request had rendered last on the worker (its culture, absolute URLs from its host; no concurrency needed), and a scheduled task, a worker or a WebSocket handler rendering with no context of its own read the last request's context too. The rule now: `getRenderCtx()` reads the render store first; else, when the request store `core/server.js` `handle()` opens (`process.gina._reqALS`, carrying `req`) is active, the context a factory call bound to THIS request (`store.filterCtx`), else one built from the store — the `options` and `throwError` that `controller.setOptions` registers on it (when `store.req === req`), the request's own `_ginaIsProxyHost` classification, its `req` / `res`; only with no request does it read the slot, then the first call's own context, then an empty one. The factory follows the same split: a call made inside a request binds `conf` to that request's store and writes nothing process-wide (the first call of a module instance included — the instance keeps no request context), a call made outside any request stamps the slot as before. So the slot only ever holds a context stamped outside a request, and a caller that calls the factory and then renders still resolves its own context, per request instead of per process. A job's detached copy of a request context carries no `req` and counts as outside a request. `controller.render-nunjucks.js` no longer relies on « nothing awaits between the factory call and the render »: both render calls run inside `process.gina._renderALS.run()` with the context `registerGinaFilters` returns, so every dispatched delegate enters the render store. Not changed: a render context published on `process.gina._renderALS.run(ctx, fn)` by application code still wins (the store is read first), and `lib.routing.getRoute()` keeps its own req-less chain. Server-side only (neither filter lib is browser-bundled) ⇒ pickup = bundle RESTART, no re-bake. Tests: `test/lib/filter-context-request-scope-b519.test.js` — the real filter modules under real stores shaped as `handle()`, the controller, a delegate and `lib/job` shape them, with an accessor trap counting every read and write of the slot: request arms must count 0 and resolve their own request's host, non-request arms must fire the trap; plus source pins on every delegate, `setOptions`, `handle()` and a census that the slot is named in the two filter libs only. Rule: per-request context lives on the request (a store entered per dispatch), never in a slot the next request overwrites; a process-wide fallback is for callers with no request, and must never be fed from one.
862
+ 65. **Template engines — `lib/swig-resolver` + `lib/nunjucks-resolver` + per-request env mutation invariants** — process-cached resolver-based opt-in for both engines: `core/server.js:initSwigEngine` / `initNunjucksEngine` load via `lib.swigResolver.load()` / `lib.nunjucksResolver.load()` during bundle init; `controller.js this.render()` reads `local.options.conf.content.settings.render.engine` and dispatches to `controller.render-swig.js` (default) or `controller.render-nunjucks.js`. Both delegates receive the same `deps` object (`self`, `local`, `getData`, `hasViews`, `headersSent`, `setResources`, etc.); `process.gina._swig` / `process.gina._nunjucks` survive `refreshCoreDependencies()` evictions. Both: dev-mode mtime hot-swap on project's `package.json`, first-wins standalone-mode contract, `[<engine>-resolver]` warning logged on safety-gate fallback. **Swig**: framework fallback enabled (always-installable), version floor `DEFAULT_MIN = '2.0.0'` (bump in same commit as fork-API dependence — see global "Swig version sync" rule), three safety gates (only the configured package name is looked up, with no list of accepted names, so the abandoned bare `swig` — last released as 1.4.2 — is stopped by the next gate; same-major rule; min-version floor). `swig.package` takes `@rhinostone/swig` (default), `@rhinostone/swig-twig`, `@rhinostone/swig-jinja2` or `@rhinostone/swig-django`; a non-default one needs `useProject: true` and a 2.x project install, since only `@rhinostone/swig` has a framework copy to fall back to: otherwise `load()` throws `SWIG_PACKAGE_UNAVAILABLE`, naming the package, the reason and the install line, with `err.decision` attached (#B925; a bundle stops at start, logged as a ServerEngine error). **Boot order (#B932):** controller.js calls `get()` as it loads (server.js and gna.js require ./router at module scope, router.js requires ./controller), before `initSwigEngine` calls `load()`, so the copy `get()` caches first is PROVISIONAL (`process.gina._swigProvisional`): the first `load()` resolves the configured package and replaces it, a copy cached by `load()` still wins over later calls, and controller.js re-reads `lib.swigResolver.get()` in setOptions and render instead of using its module-load copy. Until 0.7.5 neither held: every booted bundle rendered with the framework copy whatever the settings said (a frontend's templates through the native parser, a misleading « second bundle requested » warning, a pinned swig never loaded, the dev hot-swap never armed). Unit tests that call `load()` on an empty cache cannot see the order; a real boot can (`test/integration/container-boot-swig-package-b932.test.js`, a test-double frontend whose marker filter only it registers). Phase 7 build copies upstream esbuild output to `dist/swig.min.js` (no longer Closure-compiles `bin/swig.js` — swig 2.0.0's `swig-core` lazy require breaks Closure's static analysis). **Compiled-template cache (#B1176, 0.7.14):** the per-root engine takes `cache: ( self.isCacheless() || lib.swigResolver.compareSemver(swig.version, '2.9.6') < 0 ) ? false : 'memory'`, so outside dev, on swig 2.9.6 or later, swig keeps every compiled `{% include %}`, every `compileFile` / `renderFile` result and every `compile()` given a `filename` for the life of the process, keyed by the loader's resolved path, as the nunjucks path keeps its templates (`noCache` in dev only); up to 0.7.13 `cache: false` read and compiled each include on every render and once per loop iteration, with `server.cache.enable` on or off. Each page and layout compile (render-swig, render-v1) passes its own `cache: false`: gina compiles the page from content it assembles per render under one filename (#B1129's tokened layout), and an engine-wide memory cache without it served the first render's page to every later render (measured; the likely meaning of the 2022 « `memory` is no working yet » comment). The 2.9.6 floor: before it swig's memory cache carried one page's nested block override into a cached layout (fixed 2.9.5, GHSA-g628-5x3r-g298) and one call's option locals into later calls for the same file (fixed 2.9.6), so a project on its own older swig (`swig.useProject`; `DEFAULT_MIN` stays 2.0.0) keeps `cache: false`; the swig monorepo releases in lockstep (the frontends peer-pin swig-core exactly), so `swig.version` stands for swig-core's, and a missing version reads 0.0.0 (cache off). A template change reaches a non-dev bundle at its restart; `gina cache:clear` does not drop these entries, `self.engine.invalidateCache()` drops them in its own process; `register()` works outside dev and still throws in dev (swig's registry is its compile cache). Server-side only: pickup = bundle restart. Test: `test/core/swig-include-cache-b1176.test.js`. **Output auto-escaping** (`settings.swig.autoescape`, boolean, default false; #B151): both `initSwigEngine` (boot) and `controller.js` per-render `setDefaults` resolve `autoescape` from `conf.content.settings.swig` (guarded to `{}`, then strict `=== true`; the per-render read goes through the REQUEST's own conf, `local.options.conf.content.settings.swig` — until 0.7.1 it went through the global no-argument `getConfig()`, whose caller walk throws under an npm install, and the surrounding `try` fell back to `false`: `autoescape: true` was silently OFF on every npm install from 0.5.25 to 0.7.0, while a checkout — every suite run — never showed it, #B695; the Tests workflow now boots a bundle from a copy of the commit placed under `node_modules/gina` to keep that install shape covered) — ABSENT ⇒ false (unchanged 0.5.x behaviour; the old dead `conf.autoescape` read never fired); a non-boolean value refuses the boot (strictly-boolean security-toggle rule); `true` ⇒ swig HTML-escapes `{{ x }}` variable output; mirrors `settings.nunjucks.autoescape` (default true) — swig's default stays OFF until 0.8.0, which makes it `true`; since 0.7.0 (#B359 prep) a bundle that renders swig (settings engine, or a `.swig` templates section) and leaves the key unset gets ONE boot warning naming 0.8.0 (an explicit `true`/`false` silences it; a nunjucks-only bundle is not warned), `gina bundle:add` scaffolds `"swig": { "autoescape": true }`, the default delegate injects its asset placeholders as `{{ page.view.stylesheets | safe }}` / `{{ page.view.scripts | safe }}` (#B690 — bare, autoescape rendered every injected `<link>`/`<script>` as visible text; a layout placing them itself writes `| safe`, as for nunjucks), and `nl2br` escapes its input and is flagged `.safe` only when the bundle escapes (never `.safe` otherwise: a `{% autoescape true %}` region would then emit its input raw); the 0.8.0 flip needs `| safe` on every variable that carries HTML on purpose, `gina.csrfInput` first (unmarked it renders as text and every POST then fails CSRF); server-side only (no dist rebuild). **Nunjucks**: NEVER framework-bundled (resolver only looks in `<projectPath>/node_modules/nunjucks/`), `load()` throws `NUNJUCKS_NOT_INSTALLED` with no fallback (bundle startup fails loud, not mid-render). `new nunjucks.Environment(loader, ...)` cached per template root on `process.gina._nunjucksEnvs`; dev-mode `FileSystemLoader({ noCache: true })` for `.njk` template hot-edit. **Render-nunjucks.js implementation invariants**: per-request `addFilter → render` mutation of cached env is safe ONLY because `env.render()` is synchronous (Node's event loop serialises requests; an async-render port needs the per-request `process.gina._renderALS` context — a per-request env does NOT fix it: the filters read a process-global `*Filters.instance._options` singleton that a fresh env does not isolate (measured, #TPL1 Tier-2/#B25)); pre-render `setResources()` + post-render `injectAssets()` cooperate via exact-substring user-placement detection (#NJ2) — pre-only loses auto-injection, post-only double-injects on opt-in templates; both wrap bodies in try/catch (must NOT 500 the page); `injectAssets` runs BEFORE `injectInspectorScripts` (Inspector payload stays last `<script>` before `</body>`); `isWithoutLayout` filters via `Collection.find({isCommon:false},{isCommon:true,name:'gina'})` on a `JSON.clone(localTemplateConf)` to keep common-gina assets while dropping common-other. Test-author traps (both resolvers): mtime collision within same wall-clock ms requires monotonic counter; macOS `os.tmpdir()` symlink requires `fs.realpathSync` for `require.cache` key parity. **Per-extension engine dispatch (#M11)**: since #M11 the effective template EXTENSION overrides the engine setting per section — `.njk`→nunjucks, `.swig`→swig, `.html`→`render.engine`; precedence: setTemplate-override ext → `templates.json` section ext → default. NO filename sniffing (an `x.njk.html` must not mis-dispatch); auto-detect-on-`.njk`-presence was measured and DROPPED — explicit per-section ext covers its only value. **#B514 (0.6.30) — the DEFAULT swig delegates entered NO render context at all, and that is the wider half of the #B25 class.** #TPL1 Tier-2 wrapped the two `-async` delegates in `_renderALS.run()` and left `controller.render-swig.js` + `controller.render-v1.js` — the path every bundle takes unless it opts into `settings.template.swig.loader` — resolving filters through the raced `SwigFilters.instance._options` singleton. Both are themselves `async` and await between the per-request `SwigFilters({…})` stamp and the template invocation (render-swig's layout read is unconditional; render-v1 awaits a `Promise.all` of two reads before its compiles), so a concurrent request's stamp lands inside the window and the resumed render emits the OTHER request's negotiated culture, webroot and proxy classification into its own response. The in-tree note asserting "on a synchronous render that's safe" was FALSE when written — the default delegate went `async` in `64b19b7b2` (2026-03-06), three months BEFORE the #B25 fix — and that wrong premise is why the default path stayed unprotected. Both delegates now call `getRenderALS().enterWith(_renderCtx)` immediately after the factory call, handing the SAME object to both so the store and the singleton cannot disagree; `enterWith` rather than `.run()` because the body is one ~1,900-line async function whose every `return` would otherwise have to move inside a callback, and the store propagates to every continuation of the current async context, which is exactly the awaited span. Measured on a built `--env=prod` release — dev MASKS this, since `lib/index.js`'s `_require` re-requires the filter module per request and no singleton is shared, so a dev repro reads clean while production bleeds: 50 of 50 concurrent request pairs carried the other request's context pre-fix, 0 of 100 post-fix, and 0 of 3 across a REUSED keep-alive connection (2 confirmed reuse events — the one shape `enterWith` could have leaked through). Structurally the rate is last-writer-wins, so for N overlapping renders N−1 read the wrong context. **`render-nunjucks.js` is the one delegate genuinely free of the window** — its singleton write (`registerGinaFilters`) and its `env.render` sit in ONE synchronous run with no await between them, which is what the per-request-env sentence above actually rests on. ✅ **Sibling limb, CLOSED in the same arc — and it was NOT surgically closable:** `controller.js`'s per-render `swig.setDefaults({loader})` on the process singleton has the identical interleave shape for `{% include %}` / `{% extends %}` basepath resolution in MERGED-PROCESS mode (several bundles, one process). A per-call `loader` handed to `swig.compile()` CANNOT fix it — measured in swig-core: `self.parse` merges per-call options into a local that never escapes the function (`engine.js:477`), while `getParentsInternal` (`:321`) and `parseFile` (`:490`) read `self.options.loader` unconditionally, and the `{% include %}` codegen emits only `resolveFrom` (`backend.js:420`); the validators at swig.js:113 and runtime.js:58 accept a per-call loader and then nothing loads through it. The only working shape is a per-bundle `new swig.Swig({ loader })` instance, and that is what `controller.js` now builds — `getDefaultSwigEngine(swigMod, templateRoot, opts)`, keyed on the bundle template root, owner-guarded against a dev swig hot-swap exactly like `_swigEngines`, handed to the delegates as `deps.swig` and pointed at by `self.engine` (the async-loader delegate builds an engine of its own from the swig MODULE, handed as `deps.swigModule`: from 0.6.30 to 0.7.3 it was given the instance, which has no `.Swig`, and every render of a bundle with `settings.template.swig.loader` answered 500 with `swigMod.Swig is not a constructor`, #B808; that engine never received what `setup.js` registers on the bundle's engine either — a template using a bundle filter answered `Invalid filter`, a tag `Unexpected tag` — until #B825: for a bundle with an async loader, `setOptions` wraps the bundle engine's three setters with `recordRegistrations` (into `engine._ginaRegistrations`, `rev` bumped per call, OUTSIDE `getDefaultSwigEngine` and the #B535 bridge so their pins and lifts hold), and the delegate's `replayBundleRegistrations` replays the record onto its own engine whenever `rev` changed, skipping any filter name `registerGinaFilters` registered: on the default path gina re-registers its filters at each render, after setup.js, so a same-name bundle filter loses there — measured — and must lose here too). That last part is load-bearing: `router.js:1079` hands `controller.engine` to the bundle's `controllers/setup.js`, so a bundle's OWN filters must land on the instance that renders it — `engine.install` gives every instance fresh tag/filter maps, so they would otherwise be silently dropped (and since #TPL3, 0.7.6, a swig render runs `setup.js` on that engine itself when the engine has not run it yet — entry 316 — so a route-middleware render sees those filters from the first request after boot). **Live-verified against a baseline**: a scaffold whose `setup.js` registers a custom filter rendered `STAMP<x>` both before and after the change. The module-level `setDefaults` is deliberately KEPT — `core/server.js` still compiles inline routing/asset strings through the module with `swig.getOptions()` — so nothing renders a bundle template through the module any more and the stamp it races is inert. ⚠️ **#B535 (0.6.30, same tree) — that instance's registrations then had to be bridged BACK to the module, because "nothing renders a bundle template through it" is not the same as "nothing compiles through it".** `engine.install` gives every `new Swig()` FRESH filter/tag/extension maps — copied from the frontend's built-in library, NOT from the module's runtime registrations — and keeps them closure-private in BOTH directions (measured on the real fork, four arms with both controls firing: a filter registered on the module BEFORE or AFTER construction never reaches an instance, and an instance's never reaches the module). So while templates stopped rendering through the module, `core/server.js:3094`/`:3352` still compile inline routing/asset strings through it, and an application's own `require('@rhinostone/swig').compile()` — an entity rendering a message outside any request — still compiles through it; every one of those silently lost the filters a bundle's `controllers/setup.js` had registered, which on 0.6.29 reached them because `self.engine` WAS the module. Reported by a consumer as a `TypeError` thrown from INSIDE a filter (so the filter was found — the diagnostic that rules out a missing-filter reading): their own module-side registration was the only one left there, and its closure had never passed the router's export block. `bridgeRegistrationsToModule(engine, swigMod)`, called on the line after the mint in `getDefaultSwigEngine`, wraps the instance's `setFilter`/`setTag`/`setExtension` to register on the INSTANCE first (its own validation throws before the module is touched) and then on the module; idempotent per (instance, module) via an `_ginaModuleBridge` marker, and the owner-guard rebuild bridges each fresh instance. The instance keeps its OWN options — the loader above all — so the include/extends isolation this entry exists for is untouched; only the registration maps are shared again, which is the state every released version had. The REVERSE direction is deliberately NOT bridged: a module-registered filter still never reaches an instance, so registering anywhere other than through `this.engine` in `setup.js` stays unsupported — and that guidance is measured-correct, not merely conventional. DEVELOP-ONLY: the defect never shipped (the `0.6.30-alpha.1` tarball carries `getDefaultSwigEngine` = 0 and the pre-#B514 `self.engine = swig;`), so no released consumer tier was affected and no advisory is owed. ⚠️ **#B538 (0.6.30, same tree) — a SIBLING of #B535, not the same defect: `self.engine.getOptions()` threw `TypeError: … is not a function` on the accessor itself, before any compile.** `controller.js` installs `swig.getOptions` on the MODULE once per request (a closure over that request's `local._swigOptions`, a `JSON.clone` of `{ autoescape, cache, loader }`), and until #B514 `self.engine` WAS the module, so the documented call shape `self.engine.compile(tpl, self.engine.getOptions())(data)` resolved; the per-bundle instance never received the accessor, and the #B535 bridge carries the three registration SETTERS, not methods. It has ZERO framework call sites — the only internal reads are `core/server.js`'s two inline routing/asset compiles, both through the module — which is why the suite stayed green: the contract is consumer-facing, documented only by the comment at the assignment site. Diagnostic worth knowing: inside an async controller callback the TypeError surfaces as an UNHANDLED REJECTION and the request is never answered, so the CALLING bundle waits out its HTTP/2 stream timeout and reports a 503 with no template error and no access line on the answering side — it presents as a proxy/network fault. The accessor cannot be copied from the module (per-REQUEST closure onto a per-BUNDLE shared instance — the cross-request-bleed shape). `exposeOptionsOnEngine(engine, opts)`, called on the line after the #B535 bridge in the mint branch, snapshots `opts` ONCE at mint (measured: neither `new Swig(opts)` nor `setDefaults(opts)` mutates the object handed in, so the snapshot equals the pre-`setDefaults` clone every released version returned) and returns a fresh `JSON.clone` of it per call — a strict HARDENING over 0.6.29, which returned one shared object by reference. `JSON.clone` is gina's own deep copy (`utils/prototypes.json_clone.js`) and PRESERVES the loader's `resolve`/`load` functions; a `JSON.parse(JSON.stringify())` stand-in — the file's own commented-out previous implementation — strips them, and swig-core REFUSES a per-call `loader: {}` (`Invalid loader option`), so any probe built on the stand-in reads a broken loader that does not exist. Measured on the real fork: `compile(tpl)` and `compile(tpl, engine.getOptions())` are IDENTICAL (a differing `autoescape` as the firing control) — the round-trip is supported for compatibility, never required. Returning `instance.options` was rejected: swig-core's merged defaults are a wider surface than any release exposed. Pickup is a bundle RESTART (the registry on `process.gina` survives hot-reload's `require.cache` eviction, so the accessor lands only on instances minted after the restart). DEVELOP-ONLY like #B535 — the published `0.6.30-alpha.1` tarball carries the pre-#B514 shape and no tag contains `0e443f83b`; no consumer tier affected, no advisory owed. ⚠️ Note the fix is structural, NOT validated against its own trigger: there is no supported CLI path to a shared port (`port:set` rejects or evicts, never shares), and the only RUNTIME-MEASURED record on file reports siblings are not served in merged mode at all, so no reachable trigger was confirmed. ⚠️ **Two naming footguns for anyone who touches merged mode:** `isStandalone === true` means MERGED — *one process serves every bundle* — which is inverted from what the name suggests (`core/config.js:719` seeds it true, `:1210` flips it FALSE the moment any bundle's port differs from the starting bundle's, and `config.js:454` describes `!isStandalone` as the non-merged case). And it is ALSO true for an ordinary single-bundle project, so it is not a merged predicate on its own: `core/server.js` gates its merged-only warn on `bundles.length > 1` for exactly that reason. Merged mode is INFERRED from `~/.gina/ports.reverse.json` (the forward `ports.json` is declared but never read at boot), never configured — which is why no CLI verb reaches it. ⚠️ Instrument trap banked from the baseline: the probe extracting the custom filter's output used `[^<]*`, and the filter's own output contains `<`, so it read EMPTY — indistinguishable from « the bundle filter was dropped ». A negative reading about a filter must be validated against a known-positive before it is believed. **#B519 / #B809 (0.7.4) — the filter context is REQUEST-BOUND: inside a request the process-wide slot is neither read nor written.** #B514 closed the two default delegates and left the slot itself in place: every factory call still stamped `<Filters>.instance._options`, and every reader with no render store of its own still read it. So a template executed on a request path OUTSIDE a render delegate — an action calling `self.engine.compile(tpl)(data)` or `compileFile` — resolved the context of whichever request had rendered last on the worker (its culture, absolute URLs from its host; no concurrency needed), and a scheduled task, a worker or a WebSocket handler rendering with no context of its own read the last request's context too. The rule now: `getRenderCtx()` reads the render store first; else, when the request store `core/server.js` `handle()` opens (`process.gina._reqALS`, carrying `req`) is active, the context a factory call bound to THIS request (`store.filterCtx`), else one built from the store — the `options` and `throwError` that `controller.setOptions` registers on it (when `store.req === req`), the request's own `_ginaIsProxyHost` classification, its `req` / `res`; only with no request does it read the slot, then the first call's own context, then an empty one. The factory follows the same split: a call made inside a request binds `conf` to that request's store and writes nothing process-wide (the first call of a module instance included — the instance keeps no request context), a call made outside any request stamps the slot as before. So the slot only ever holds a context stamped outside a request, and a caller that calls the factory and then renders still resolves its own context, per request instead of per process. A job's detached copy of a request context carries no `req` and counts as outside a request. `controller.render-nunjucks.js` no longer relies on « nothing awaits between the factory call and the render »: both render calls run inside `process.gina._renderALS.run()` with the context `registerGinaFilters` returns, so every dispatched delegate enters the render store. Not changed: a render context published on `process.gina._renderALS.run(ctx, fn)` by application code still wins (the store is read first), and `lib.routing.getRoute()` keeps its own req-less chain. Server-side only (neither filter lib is browser-bundled) ⇒ pickup = bundle RESTART, no re-bake. Tests: `test/lib/filter-context-request-scope-b519.test.js` — the real filter modules under real stores shaped as `handle()`, the controller, a delegate and `lib/job` shape them, with an accessor trap counting every read and write of the slot: request arms must count 0 and resolve their own request's host, non-request arms must fire the trap; plus source pins on every delegate, `setOptions`, `handle()` and a census that the slot is named in the two filter libs only. Rule: per-request context lives on the request (a store entered per dispatch), never in a slot the next request overwrites; a process-wide fallback is for callers with no request, and must never be fed from one.
863
863
 
864
864
  72. **Supply-chain visibility — tarball enumeration, peerDependencies, security-commit bundle coupling.** Enumerate a published tarball via `npm view <pkg>@<ver> dist.tarball` + `curl` + `tar tzf` (NOT `npm pack --dry-run` — it triggers the prepare script's "Prerelease update" commit). **`peerDependencies` aggregate into the dep graph regardless of `optional: true`** — Socket / Dependabot / `npm audit` all read peerDeps unconditionally; the fix pattern is removing them entirely in favour of a lib-local version registry (gina's `lib/connector-registry/`). **Security-tagged source commits MUST rebuild the browser bundle in the same commit** (pre-commit hook + the bundle-freshness CI workflow enforce it). The vendored-deps era is CLOSED: `core/deps/` was deleted 2026-07-18 (`4c173422` require-swap + `4a8eb1e6` deletion — busboy became the `@rhinostone/busboy` npm fork; the OSV workflow now queries the fork's tracked base versions (`busboy@1.6.0`, `streamsearch@1.1.0`) explicitly via a `TRACKED_FORKS` table in the vendored-CVE scan script, which still walks any future vendored sub-manifest). If a dep is ever vendored again: its sub-`package.json` dependency edges are BY DESIGN and load-bearing for CVE visibility — never strip them (the `4a29ca0c` strip was reverted in `e5d5d0a2` for exactly this).
865
865
 
@@ -948,7 +948,7 @@ Dev-mode query instrumentation captures every database query tied to the current
948
948
 
949
949
  176. **Inspector & `/_gina/*` built-in endpoints — in-process architecture, admin IP-allowlist, agent-stream auth, live index coverage** (replaces individual entries #31, #32, #38, #111, #134, #138) — the dev Inspector (formerly Beemaster) is a built-in SPA served at `/_gina/inspector/` inside the bundle's own process: no project registration, no separate port, no auto-start spawn; dev-mode only (production bundles never expose it), and same-origin with the monitored bundle so `window.opener.__ginaData` always works. Every `/_gina/*` route (healthcheck, assets, cache/stats, info, inspector, logs, agent, indexes, reveal, instrument, metrics) is a handler in the same HTTP server process; the Isaac engine is the source of truth and may carry fast-paths, but base functionality belongs in the engine-agnostic dispatcher so Express bundles get the same endpoints. Admin-grade endpoints exposing process/cache internals (`/_gina/info` — memory/uptime/version/HTTP-2 session counters; `/_gina/cache/stats` — full cache contents) are IP-allowlisted via the `admin.allowFrom` block in `app.json`: the client IP is read from the socket only (the spoofable `X-Forwarded-For` is never trusted), `::ffff:`-mapped IPv4 is normalised, the list defaults to loopback (`127.0.0.1`, `::1`) when omitted, an empty list denies everyone, and denied callers get a 403 JSON error; `/_gina/health/check` stays deliberately open for liveness probes, and `/_gina/metrics` keeps its own separate `metrics.allowFrom` axis. **#B709 (fixed for 0.7.1) — a loopback entry admits only a DIRECT caller.** The default list is loopback, and loopback is also the address a reverse proxy on the bundle's own host connects from, so the address-only gate admitted every client such a proxy relayed — maintenance on (a site-wide 503), a cache flush, a storage gc, the process and cache state — with no browser and no credential; an edge block of `/_gina/` did not close it either, because the unanchored handlers also matched a nested endpoint path (`/_gina/health/check/_gina/maintenance`, which a PREFIX proxy location forwards), the endpoint path in a query string, another letter case, or `//_gina/…`. Now (1) `lib.admin.isClientAllowed` and `lib.metrics.isClientAllowed` refuse a listed LOOPBACK caller whose request carries a proxy signal — the classifier the maintenance bypass already used (`lib.maintenance.isProxiedRequest`: any `x-forwarded-*` header name, RFC 7239 `Forwarded`, a `true` #B65 stamp, or a port-less `Host`/`:authority` unless `server.proxy.requireForwardedHeaders` is true); a listed NON-loopback address (a proxy on another host) still admits what it relays, and the first refusal per list is logged once per process. (2) That classification is stamped ONCE per `/_gina/*` request from the pristine headers at both engine tops (`request._ginaAdminProxied`, first-seer): isaac rewrites an h1 `Host` port-less before it hands a request to server.js, so a live read there would take every direct caller of a server.js-only handler (`storage/*`) for a proxied one. (3) `info`, `cache/stats`, `cache/clear`, `maintenance` and `metrics` match EXACTLY on `lib.admin.controlPath(url, webroot)` — the query-free path, in the root form or the bundle's own webroot form, nothing else (a query on these endpoints is now ignored, where it used to 404 some of them); `storage/*` and `release/*` stay `^`-anchored on the url and become case-sensitive; `health/check` and the dev/key-gated family are unchanged. Residual, pinned: a proxy that forwards a port-bearing `Host` and adds no forwarding header is byte-identical to a direct client and stays admitted — call the bundle's port directly from the host or the pod, and block `/_gina/` at the edge in any case and anywhere in the path. False positive: a bundle bound directly to port 80/443 receives a port-less Host from every direct client, so set `server.proxy.requireForwardedHeaders: true` there. Pickup = bundle restart, no re-bake. **#B712 (fixed for 0.7.1) — the handlers #B709 left out match the url's PATH.** `health/check`, `jobs/:id`, `instrument` and the dev/key-gated `inspector`, `logs`, `agent`, `indexes`, `reveal` tested the whole url with no start anchor, so a page whose QUERY ended in an endpoint path (`/web/?next=/_gina/health/check`) got the endpoint instead of the page — inside a maintenance window too, where the page's 503 was due — and a WebSocket upgrade to such a url was taken by the agent. Each matcher now starts `^[^?]*` (the endpoint path must end the url's path) and the dev endpoints' `$` became `(?:\?|$)`; prefix tolerance stays (the Inspector puts the opener page's full pathname before `/_gina/`, and a liveness probe may call the health check under the bundle's webroot), as do letter case, methods and gates. The agent WebSocket upgrade listeners test the query-free path, and the Inspector reads its asset path from it. `/_gina/assets/routing.json`, left out then (`/x?y=/_gina/assets/routing.json` got the routing map), matches its path only since #P48 (0.7.2): that url now gets the page. **#B707 (fixed for 0.7.1) — a GET of the routing table in another letter case no longer ends an isaac bundle.** isaac's fast path tested the url without regard to case, then looked the asset up by the requested spelling through an exact-match `findOne`: `Routing.json` found nothing and the `localAsset.mime` read threw an uncaughtException that ended the process — one unauthenticated request, before routing, with any path prefix. The looked-up name is now lower-cased. A request classified as proxied was served the host-stripped table and escaped it; the express engine serves the table from memory and was not affected. **#B722 (fixed for 0.7.1) — isaac's own event streams answer HTTP/2 clients.** `/_gina/logs`, `/_gina/agent` and `/_gina/release/events` passed `connection: keep-alive` to node's HTTP/2 `stream.respond()`, which throws `ERR_HTTP2_INVALID_CONNECTION_HEADERS` on any connection-specific header (`connection`, `keep-alive`, `proxy-connection`, `transfer-encoding`, `upgrade`); lib/proc.js logged the throw as a warn and the client never got headers, so an `http/2.0` bundle reached directly over HTTP/2 streamed none of them (0.3.0 through 0.7.0; release events since 0.5.18). The header now goes to HTTP/1.1 only. Reflex: a header set shared by an h1 `writeHead()` and a raw h2 `stream.respond()` must carry no HTTP/1-only header — the compat `setHeader('connection', …)` merely drops it with an `UnsupportedWarning`, while a raw `respond()` throws. Pickup for both: bundle restart, no re-bake. The `/_gina/agent` stream (combined data + log events) is dev-only by default but can be enabled outside dev behind an API key (`settings.json > inspector.agent.{enabled, key}`, `${secret:KEY}`-capable, constant-time compared, fail-closed when no key is configured); browsers pass `?key=` as a query param because `EventSource` and WebSocket handshakes cannot set custom headers — and any `$`-anchored endpoint gate regex must become `(?:\?|$)` the moment its endpoint accepts a query param, or the handler silently stops matching the query'd URL. **#B1141 (fixed for 0.7.12) — an upgrade on another path is answered or closed.** The agent's WebSocket listener is attached to every bundle's server at listen(), and once an `upgrade` listener exists Node.js accepts every upgrade request; an upgrade on any other path that no listener took was left open. A second listener now closes it after 1 s: always when gina's listeners are the server's only upgrade listeners, and otherwise when nothing has been written on its socket (engine.io's own rule and delay for an upgrade it does not own); where the server has `shouldUpgradeCallback` (Node.js 22.21 and later, 24.9 and later) such an upgrade is served as a plain request when gina's listeners are the server's only upgrade listeners. On Node.js 22.21.0 (#B1147, fixed for 0.7.13) the `http2` secure server with `allowHTTP1` lacks that callback while its HTTP/1.1 fallback calls it (nodejs/node#60336, fixed in 22.21.1), so any HTTP/1.1 request carrying upgrade headers threw inside Node's parser and stopped the bundle; at listen() gina now assigns Node 22.21.1's own default where the property is missing, before the agent's attach (not on Bun). An `ioServer` attach-mode bundle without `"websocket"` in `transports` has no engine.io upgrade listener, Isaac's included, so it is answered or closed like a bundle without `ioServer`. On Node.js an application listener that writes nothing for 1 s loses its socket; on Bun, whose socket reads `bytesWritten` 0 after another listener has answered on it, an upgrade on a server with another upgrade listener is left to that listener. Reflex: a listener on `upgrade` answers for every upgrade request the server receives (answer it, hand it off, or close it), never only for its own path. Pickup = bundle restart, no re-bake. A time-boxed, separately-keyed production instrumentation window (`POST /_gina/instrument`, hard-capped at one hour) can stream per-request query + flow capture over that authenticated channel — channel AUTH, not redaction, is what protects raw query text (redaction masks only secret-NAMED fields, never the statement or its positional params). The Query tab computes live index coverage client-side, so bundles WITHOUT an `indexes.sql` get a correct "no index for filter" badge on the first render too (cached live-index descriptors are cloned per query before stamping coverage — the cache is shared across queries that filter different columns). The live-index refetch's success re-render lands in `#tree-query` — the container the tab renderer owns and silently bails on when missing — never the scroll wrapper around it (#B222: replacing the wrapper's children destroyed `#tree-query`, so after the first render carrying an `indexes: null` query every later payload — navigation, XHR, the refresh button — froze the Query pane and badge until the Inspector window itself was reloaded; the ⟳ button re-armed the freeze via its forced refetch). Inspector toolbar CSS: native macOS `<select>` ignores `line-height` — use explicit vertical padding, and keep `select` (sans font) and `input` (mono font) on separate CSS rules. **SPA + statusbar hardening (folds former #165/#190/#191/#196):** every per-bundle `/_gina/*` consumer in the SPA derives its base URL via the shared 3-fallback `resolveBundleBase()` (`?target=` → opener pathname → path strip) — a bare `window.location.pathname` strip misroutes to the proxy's default bundle in reverse-proxy multi-bundle setups. A `?target=` value loses its own query string and fragment before `/_gina/…` is appended (`normaliseTarget()`, read by `resolveBundleBase()` and both agent builders; `gina inspector:open` does the same to a positional URL — #B719, fixed for 0.7.1): a pasted page URL (`http://host/page?x=1`) otherwise built `http://host/page?x=1/_gina/agent`, the endpoint path inside the query, which the endpoints ignore since #B712. The Inspector binds to its opener tab via a per-tab `BroadcastChannel` (`?ch=<tabId>`): pages sending COOP `same-origin` sever `window.opener` for the popup, and the bundle-global fallbacks (the shared localStorage slot + the worker-wide agent SSE) reflect whichever render last touched them — a diagnostic channel that must track ONE page needs a per-tab transport (the statusbar publishes that tab's data at its existing write points and answers a request/reply handshake; no `?ch=` keeps the prior behaviour, and `?target=` agent mode keeps priority). Structured-localStorage reads need a SHAPE check on top of the try/catch parse (a tampered key holding a JSON primitive otherwise breaks the un-guarded consumer), and every value interpolated into `innerHTML` goes through an HTML-escape helper — untrusted model/app text renders via `.textContent` instead. Server data serialised into those inline scripts goes through the shared helper `core/controller/inline-script.js` (`safeInlineJson` / `safeInlineString` / `escapeForInlineScript`), applied at every emission site in both renderers (4 swig + 3 nunjucks): `<` → `\u003c` (the earlier literal-`</script>`+`<!--` blocklist was bypassable — per the HTML5 script-data end-tag-name state `</script >`, `</script/>` and `</SCRIPT >` all terminated the block; #B451, 0.6.23), U+2028/U+2029 (JS line terminators that are legal in JSON), and — inside JSON string literals only — `{`/`}` → `\u007b`/`\u007d` (#B463): render-swig splices the `__ginaData`/`__ginaLogs` scripts into the layout BEFORE `swig.compile` (the per-request nonce there is a swig conditional), so unescaped `{{ }}`/`{% %}`/`{# #}` in stored data were evaluated as template source — `A{{ 7*7 }}B` rendered `A49B`, measured on fork 2.0.0/2.4.0/2.8.0; nunjucks splices post-render and was never exposed. Structural braces are never touched (an escape outside a literal is neither JSON nor JS), every value parses back byte-identical; pins: `test/lib/inline-script-xss.test.js` (jsdom, 11 spellings) + `test/lib/inline-script-template-injection.test.js` (renders through the real fork, with a firing control). Both server-side only ⇒ pickup = restart, no re-bake. Dev inline-script splices before `</body>` use FUNCTION replacers: `String.replace(/re/, str)` expands `$`-sequences in a STRING replacement (`` $` ``/`$'`/`$&`), so dynamic content carrying a stray dollar-sequence spliced the whole document into the statusbar `<script>` (SyntaxError → statusbar and launch link vanish) on content-heavy pages while a near-empty smoke page stayed falsely green — any `String.replace(re, dynamicX)` with dynamic content must use a function replacer or escape `$`. Inspector SPA files are copied VERBATIM to dist (no minification) — an inspector-only edit rebuilds only those dist files, never the main bundle artifacts. Bound-window data fidelity (#B225): a preload-consumed popin open sets the dev toolbar's XHR overlay on BOTH consume branches exactly like a cold click (dev-gated `updateToolbar(body)` immediately before each dispatch — in consumePreload, never in the shared dispatcher, which would double-fire the cold path); the statusbar-bound Inspector window's refresh button never reopens the passive `/_gina/agent` stream (`source !== 'broadcast'` on the reopen gate — bound mode takes page-scoped data from the statusbar publisher, and a leaked stream applied bundle-wide payloads over it, blinking the Query badge at every XHR overlay); and every Query-pane re-render (filter/search/show-all plus the live-index refetch success path) derives from the live payload via renderTab('query')'s own preference (reveal swap included) instead of the module query cache, which the empty render path never clears and which survives overlay eras ending while the Query tab is inactive — a refresh no longer resurrects a closed popin's badge count. A `?ch=`-less embedded Inspector (direct URL, bookmark, a window predating bound mode) no longer silently runs those bundle-global channels (#B231): every dev page's statusbar advertises its per-tab channel id in localStorage (`__gina_last_tab_ch`) on each publish, a `?ch=`-less Inspector adopts the most-recently-published tab's channel at boot behind a liveness handshake (the bind's request must be answered by a data frame within 1.5 s — a stale advert from a closed tab tears the bound mode down and falls back to the legacy acquisition, closing the bound-mode `/_gina/logs` stream so log entries are not double-delivered once the passive agent stream attaches), and a footer badge names the active data-source mode (`bound` / `agent` / warn-tinted `global` with a tooltip pointing at the statusbar link) so a degraded bundle-global mode is visible instead of silent. That badge renders from `updateSourceModeBadge()`, which init must call on BOTH acquisition branches (#B306): it previously ran only on the non-agent branch and from `pollData()`, and since the poll timer is deliberately never scheduled under `?target=` (agent data is SSE-pushed), a URL-entered standalone Inspector kept the element's shipped `hidden` attribute and named no mode at all — while the identical `agent` mode DID render when reached through the connect form, whose timer is already ticking when `source` flips. Badging depended on how the window was opened rather than on the mode itself, which is exactly what the badge exists to prevent. The timer stays unscheduled in agent mode on purpose, and a future reader must not "reconcile" that guard to the comment that once claimed otherwise: `pollData()` is NOT a no-op under `source === 'agent'` — it repaints the active tab from cache before returning — so putting it on a timer would repaint every `pollDataMs` and fight scroll position, expanded folds and text selection; the refresh button calls `pollData()` directly and needs no timer at all. The footer memory gauge sits its unfilled track on `--bg3` with a theme-scoped inset groove shadow (#B237) — the track previously shared `.bm-footer`'s own `--bg2` background token, so the empty portion rendered invisible in both themes and a low fill read as a floating green dot; a gauge track must contrast the surface it sits on, and an inset box-shadow paints under the fill child, so the groove shades only the empty region. The Forms tab shows the page's DOM forms enriched with runtime validation state (the statusbar merge writes `u.forms[<id>]` per form), while the whole-bundle forms catalog the server seeds into `user.forms` (`page.forms` = the walked `<bundle>/forms/` directory groups — `rules`, `mocks`, `validators`, open-ended) renders as one collapsed, muted "Bundle catalog" card at the bottom (#B343): catalog keys are recognized by their presence in the pristine `gina.forms` half of the payload (which runtime merges never write), so app-custom group directories demote too, departed runtime forms (a closed popin's form) keep their own card, and a payload with no gina half falls back to the legacy per-key rendering — nothing is ever hidden. **The page whisper excludes `mocks` (#B344, every env):** `page.environment.forms` — the RFC5987-encoded export the client loader parses into `gina.forms` — ships a SHALLOW COPY of the catalog minus the `mocks` group in every environment (dev fixture data has zero client consumers: the client bundle reads `gina.forms.rules` and `gina.forms.validators` only), trimming page weight and keeping the client contract uniform across envs; server-side `conf.forms`/`page.forms` — and therefore this catalog card — keep the full set, and the shared catalog object is never mutated. **The localStorage fallback channel is re-synced by the late-bind patch (#B386, fixed 2026-08-16, shipped in 0.6.11).** `statusbar.html` mirrors `window.__ginaData` into `localStorage.__ginaData` at statusbar-execution time, which is BEFORE the render delegates append their late-bind patch script above `</body>` — and that patch mutates the IN-MEMORY object only. Without a re-sync the mirror keeps the EMIT-TIME payload forever: `metrics.weightBytes` null (null at emit by construction, since the body length is unknown until the render finishes) and the late flow entries absent. Measured live on a dev bundle: mirror `{serverMs:2339, weightBytes:null}` with 17 flow entries against an in-page `{serverMs:2860, weightBytes:628192}` with 21 — the four missing being `swig-compile`, `swig-execute`, `response-write`, `total`. Two visible symptoms, and the asymmetry between them IS the diagnostic: the View tab drops its weight badge (both weight legs falsy) while the load badge survives, because `serverMs` IS set at emit and `weightBytes` is not — so a fallback-channel Inspector shows 2 badges instead of 3, and only until something else re-syncs; and the Flow tab loses its template-compile/execute/response-write/total bars. All three patch sites (render-swig cache-hit and cache-miss, render-nunjucks) now end their patch script by refreshing BOTH channels the Inspector can read, placed AFTER the metrics assignments — ordering is load-bearing, since syncing first would re-mirror the stale payload. **localStorage alone was NOT enough, and that was the first fix's mistake:** it is only the FALLBACK channel, while a statusbar-launched Inspector runs in BOUND mode on a per-tab `BroadcastChannel`. Measured: all SEVEN `_ginaPublish()` call sites sit BEFORE the patch (`publishesAfterPatch: 0`), and a surrogate bound listener held across a real navigation received exactly ONE frame carrying `weightBytes: null` with `serverMs` set — the 2-badges-instead-of-3 symptom, reproduced on the transport itself. The patch now also republishes there, keying the channel from `sessionStorage.__gina_tab_id` (per-tab, race-free) and NEVER from the `__gina_last_tab_ch` localStorage advert, which is last-writer-wins across tabs. The subscriber applies it immediately (`setupBoundChannel`'s `onmessage` → `_bcLatest = payload; pollData()`). ⚠️ The convention `'gina-inspector-' + tabId` now spans FOUR files (statusbar publisher, SPA subscriber, both delegates) and is pinned by a test, since a rename in one strands the Inspector on a channel nobody publishes to — silently, with no error. **Generalisable: verifying the PRODUCER and inferring the CONSUMER is not verification** — the page data measured correct on all four reported URLs while the bug was fully present. The nunjucks site was also converted to a FUNCTION replacer, which both swig sites already used. **Cross-origin WRITE guard (#B384, fixed 2026-08-16 — a CSRF that was live in every release up to 0.6.9).** The admin endpoints authenticate with an AMBIENT credential (the client IP via `lib.admin.isClientAllowed`), which a browser attaches automatically, so an operator browsing from an allowlisted address — loopback by DEFAULT, i.e. the machine running the bundle — could be lured to a page that silently wrote to `/_gina/storage/gc`, `/_gina/cache/clear`, `/_gina/release/rebuild` or `/_gina/maintenance`. The first three read their whole input from the QUERY STRING and no body, so the attack needed no `fetch` and no CORS reasoning at all: an auto-submitting `<form>` sufficed. `lib.admin.isCrossOriginWrite(req)` now fronts the WHOLE family from ONE site per engine, placed above every `/_gina/*` handler so current and future handlers inherit it — the body reader `_readInstrumentBody` was the WRONG seam (it fronts only 2 of the family), and folding the check into `isClientAllowed` would have silently widened a function whose name promises an IP check. Signals, in order: `Sec-Fetch-Site` (browser-computed, a forbidden header name so page script cannot forge it, and independent of a proxy rewriting `Host`) — `same-origin`/`none` pass, `same-site`/`cross-site` refused; else `Origin` vs `:authority`/`Host`, built NEVER from `X-Forwarded-*` (#B367), with `Origin: null` refused (#CSRF3). NO browser signal ⇒ ALLOWED, since curl / the gina CLI / a deploy script carry no ambient credential. SAFE methods (GET/HEAD/OPTIONS/TRACE) are untouched, so the Inspector's deliberately cross-origin GET/SSE channels keep working — measured: the plugin source issues ZERO POSTs to `/_gina/*`, control firing at 23 hits on `/_gina/agent`. `/_gina/instrument` was NOT the worst of the family as first filed: it is key-gated (`_instrumentKeyValid`), so an attacker without the key cannot invoke it; its `access-control-allow-origin: *` is set BEFORE the key check, making only the 401 cross-origin readable. Verified live: 5 attack arms (incl. the query-param form vector and an `X-Forwarded-Host` spoof) all 403 with state never flipping, 5 control arms all allowed incl. a real browser's `no-cors` POST refused where it previously flipped the toggle. Residual, pinned: a browser sending NEITHER signal on a POST would pass — legacy-only, and narrower than the IP allowlist already fronting these endpoints. **#B708 (fixed for 0.7.1) — placement was not enough: the guard's URL test must MATCH WHEREVER A WRITE HANDLER MATCHES.** It tested `/^\/_gina\//`, while the unanchored handlers (`cache/clear`, `maintenance`, `instrument`) test the FULL url — so a leading segment (`/web/_gina/…`, `//_gina/…`) and the endpoint path at the END of the query string (`/?next=/_gina/maintenance`) reached them — and `cache/clear`, `storage/*` and `release/*` match in any case (`/_GINA/storage/gc`). Driven live on isaac (dev and prod): a cross-site `text/plain` POST to each shape got 200 and turned maintenance on (a site-wide 503). The guard now tests `/\/_gina\//i` on the full url, a superset of every write handler on both engines, locked by a source-extraction test that derives the write handlers from each condition's methods (a looser future handler turns it red) and a live boot test. Side effect: a cross-origin browser request with an unsafe method to an app URL merely containing `/_gina/` (query included) is refused too; same-origin and non-browser clients are unaffected. #B679 — the isaac `X-Forwarded-Prefix` handler in this same forwarded-header block ran its trailing-slash trim (`/\/+$/`, which backtracks quadratically on a long run of slashes) on the RAW header BEFORE the length+charset gate, on every request: a 15 KB header cost ~100–170 ms CPU (measured on a booted bundle; the regex alone ~8 s at the 64 KB an HTTP/2 header list admits). The gate now runs BEFORE the trim, so a >255 value is zeroed before any regex sees it; a legitimate ≤255 mount path is unchanged. Reflex: any per-request regex over an attacker-controllable header caps length first, then matches.
950
950
 
951
- 177. **Couchbase connector — install-derived SDK resolution (v2 removed), `connectors.json` semantics, `getCluster()`, dev-mode index reporting** (replaces individual entries #29, #40, #41, #57, #136, #153) — connectors are keyed in `schema/connectors.json` by LOGICAL name (`primary`, `sessionStore`, `cache`, …) with the driver selected by the `connector` enum field (`couchbase`/`mysql`/`postgresql`/`sqlite`/`redis`/`ai`/…); since 0.7.5 an entry WITHOUT `connector` whose key is itself a built-in type (`"sqlite": {…}`) takes that type, filled once where `core/config.js` finalises a bundle's connectors by `lib/connector-config` `applyKeyTypes()` (types = `lib.connectorRegistry.getDriverTypes()` + `ai`) — the convention `connector:add` (which omits the field when name = type, since 0.3.7), `connector:list` and the schema already followed, while the model layer read only `connector`, so such an entry stopped the boot with `No connector found` (#B900); a set `connector` always wins and a key naming no type still needs the field. Entities load from `models/<database>/entities`; since 0.7.5 the Couchbase factory creates that directory when missing, as the six other ORM factories do — before, an entry named differently from its bucket aborted the boot with `ENOENT … scandir …/models/<bucket>/entities` on a project without it (#B894) — and the model layer creates only the models root, the one directory the Couchbase reconnect checks (before 0.7.5 it also created an empty `models/<entry key>/entities` for every entry, which nothing reads, #B901) — never introduce a separate `driver` field; the optional `version` field carries a semver range used by `connector:add --driver-version=…` for the npm-install hint. The Couchbase SDK major is derived from the project's INSTALLED `couchbase` npm version — the leading major of `dependencies.couchbase` selects `connector.v<major>.js`, which stamps `conn.sdk = { version: N }` — never from a config key, so migrating SDK majors is a driver bump (`npm install couchbase@^4`), not a config edit. SDK v2 is REMOVED as of 0.4.0: the resolver now throws a clear "SDK v2 is no longer supported — upgrade couchbase@^3/^4" error when the installed major is ≤ 2 or the connector file is missing (previously a silent fallback that crashed later with an opaque MODULE_NOT_FOUND); the v3-vs-v4 split remains for param shaping. Generalises: when a connector's behavior-version derives from an installed dependency rather than config, fail fast once the installed major drops below the supported floor. Couchbase entities expose a public `getCluster()` (on both the model-entity and N1QL-entity prototypes) returning the underlying SDK `Cluster` handle for features the ORM doesn't wrap — chiefly multi-document ACID transactions (`cluster.transactions().run(...)`, needs SDK 3.2+/4.x) — without touching private `_*` internals; it throws a coded `GINA_COUCHBASE_CLUSTER_UNRESOLVED` error when neither connection shape resolves. Dev-mode index reporting: the SDK v4 C++ binding never populates `meta.profile` despite `profile: 'timings'` being sent (confirmed on v4.6.0), so an async `EXPLAIN <statement>` fallback with a per-process per-statement cache supplies the plan instead (the first request for a new statement may show N/A; subsequent requests hit the cache), and `USE KEYS` plans surface as "KV lookup" via `ExpressionScan`/`KeyScan` operator detection. Three historical traps locked by tests: `conn._cluster.query()` must receive the full `queryOptions` object, not the raw params array (the raw form silently dropped `profile`/`scanConsistency`/`adhoc` from every query); of the connector's two `register()` dispatch paths, Option B (`!_isRegisteredFromProto`) is the ALWAYS-active one — instrumentation or logging added to Option A never executes; and (#B193, 0.6.3) the plan walker must visit the NESTED scan containers, not just `~child`/`~children` — the multi-index operators (`IntersectScan`/`UnionScan`/`OrderedIntersectScan`) put their child `IndexScan3` nodes under a `scans` array and `DistinctScan` under a singular `scan`, so before the fix any plan the planner served with more than one index extracted `[]` and the Inspector rendered the red "no index — full bucket scan" badge/banner for a fully-indexed query — a false negative inviting a pointless (write-amplifying) index build. Both extraction paths (SDK `meta.profile` and the EXPLAIN fallback) share the walker, so one fix covers both; index names still dedupe, and the Query tab already renders one chip per index so multi-index plans display correctly with no client change. A consumer-runnable SDK soak harness ships at `script/soak/couchbase-soak.js` (#CN12): it scaffolds a fully isolated throwaway project, installs a candidate `couchbase` SDK into it (`--sdk=<version>` / `--sdk-path=<dir>` — the install IS the version selector, since the connector resolves the SDK from the project node_modules and derives v3/v4 dispatch from its dependency pin), builds + boots prod, and drives N1QL (incl. a `request_plus` arm) + entity-handle KV (promise AND 4-arg callback forms) + the couchbase session store under sustained concurrent load for `--duration`, FAILING on premature process exit (a clean exit 0 counts as failure — the silent-death class it screens for), unbounded RSS growth, error-rate drift, or a dead arm. A screen, not proof: run it as the first filter on an SDK-bump candidate, ahead of a workload-shaped soak. Pure parts (arg parsing, RSS slope, verdict) are unit-tested in `test/lib/couchbase-soak-evaluator.test.js`; the live harness needs a real cluster and never runs in CI. Named scopes/collections stance (2026-08-02): document-field partitioning (`_scope`/`_collection` fields, one bucket, default collection) IS the data model; the `useScopeAndCollections` option (+ `scope`/`collection` defaults) is accepted but INERT — declared and merged, consumed by nothing — and `schema/connectors.json` says so honestly; named-collection KV is reachable per call via `entity.getConnection(scope, collection)`; native scope/collection routing is deliberately not built (demand-gated). #B203 (2026-08-02): both SDK-major resolver twins derive the major as the dependency pin's FIRST integer — the former caret-only strip mangled range pins (`~4.5.0` → `~4`, `>=4.5` → `>=4`), which slipped the v2 floor (parseInt NaN) into a misdirecting existsSync "supported majors are 3 and 4" error; a digit-less pin (`*`, `latest`) now refuses naming the pin, a package.json without a `dependencies` key no longer TypeErrors, and the v2 floor fires for range v2 pins too (`~2.5.0`). #B243 (2026-08-04): a query parameter the SDK cannot serialize — a bare `undefined`, a function, or a Symbol — was PROCESS-FATAL rather than throwable: the SDK maps `JSON.stringify` over the parameter list, those three types yield no string at all, the native binding coerces that to `""`, and the C++ core's JSON parse of `""` throws on an internal thread reaching `std::terminate()`/`abort()` — uncatchable by `try/catch`, `uncaughtException` or `unhandledRejection`, so the whole bundle died instead of the request 500-ing (measured against a live cluster on SDK 4.1.3 AND 4.7.1; 4.2.0+ maps a bare `undefined` to null but still aborts on functions and Symbols). Reachable with NO misuse of the driver: the cursor-style assembly branch (queries matching `\w+\.($|%)`) fills `queryParams[i]` for every `i < params.length` while guarding only `undefined`, so a call one argument SHORT with a trailing callback puts the CALLBACK into a parameter slot — the arity check cannot catch that shape because it only fires when the last argument is not a function. `getUnserializableParamError()` now gates the single `queryOptions.parameters` assignment (so both assembly branches and any future one are covered) and surfaces a `TypeError` coded `GINA_COUCHBASE_UNSERIALIZABLE_PARAM` naming the offending position, routed through the query callback when there is one and thrown otherwise. Serializable values are untouched: `null`, `0`, `''`, `false` and objects carrying `undefined` PROPERTIES still reach the SDK. An object whose own `toJSON()` returns undefined is deliberately left unguarded — detecting it costs a full `JSON.stringify` per parameter on every query for a shape no realistic call site produces. **`.sql` `@options` annotation — the exact contract, and the consistency gate that silently dropped keys (former #282, #B155; warns since 0.5.26):** the parser accepts ONLY `@options { … }` — a brace-delimited JS-object-literal after exactly ONE space (unquoted keys fine: a key-quoting normalisation runs before `JSON.parse`; a malformed body warns and is skipped). The historical docs-taught brace-less form (`@options consistency=request_plus`) and a double-space-before-brace both MISS the parse regex entirely. The passthrough into the SDK's query options is GATED on the `consistency` key: any other key (`adhoc`, `timeout`, `profile`, …) applies ONLY when `consistency` is present alongside it — alone it is parsed then dropped. Since 0.5.26 BOTH failure shapes warn (was silent): an unparseable `@options` mention warns with the exact working form; a gate-shut drop warns naming the ignored keys + the `"consistency": "not_bounded"` remedy; an empty `@options {}` drops nothing and stays quiet. An UNKNOWN consistency VALUE warns and falls back to `not_bounded` but STILL opens the gate — the gate keys on presence, not validity. Query-path defaults: `adhoc: false` (statement plans cached — `true` disables that) + `not_bounded`; user keys WIN over framework values (direct assignment — including dev-mode's `profile: 'timings'`). `bulkInsert` is a SEPARATE surface: a JS `options` argument, UNGATED, merged caller-wins-on-conflict / defaults-fill-missing (its default is `adhoc: true`). The gate itself deliberately stays: un-gating would make historically-inert options suddenly live for every consumer, and a bare un-gate CRASHES (the next statement dereferences `options.consistency`) — a restructure gated on field evidence, which the warns now collect. Tests: `test/core/couchbase-connector.test.js §09` drives the SHIPPED parse+gate bytes (unique-text-anchored slices — line numbers rot and the parse block's regex holds an unbalanced `{` that defeats brace-matching). **#B204 (0.6.24) — the `gina.onError` reconnect classifier is guarded; it used to THROW under every supported SDK.** `lib/connector.v3.js`/`lib/connector.v4.js` tested `err instanceof couchbase.Error`, but no supported couchnode exports a bare `Error` class (measured on a real 4.1.3 `dist/errors.js`: `Error` undefined, `CouchbaseError` + 81 siblings present, and the classifier condition executed against that surface throws `TypeError: Right-hand side of 'instanceof' is not an object`). Because that operand is evaluated FIRST, the shutdown-bucket message arm — which needs no SDK class — was unreachable too, so the classifier could not classify anything by any route. **Dispatch topology, measured:** `gina.onError` listeners fire ONLY under 4-arg (Express-engine) error-middleware invocation; Isaac's dispatchers invoke middlewares 3-arg, so the arity shim sets `error = false` and the emit branch never runs — on Isaac the listener, broken or fixed, never executes. **Fix = guard, deliberately NOT an activation:** each `instanceof` is prefixed `typeof(couchbase.Error) == 'function' &&` (4 live sites, both files). Modern SDK errors carry no numeric `.code`, so the guarded arms stay inert; the SDK-2 message string greps 0 in the 4.1.3 dist JS (`timeout` firing as control); on Express the real error now reaches the handler's designed terminal (log + JSON 500 / `next(err)`) instead of being replaced by the TypeError. ⚠️ **Do NOT "modernize" this into an active reconnect without a live-cluster gate:** gina's own `connect()` mints a NEW cluster handle per call (`couchbase.connect` at `connector.v4.js:265`) and the only `disconnect()` sits inside the code-23 arm — an activated retry loop would stack unclosed handles. Also do NOT remove the listener: `e` (`gna.js:81`) is a plain EventEmitter, and an `'error'` emit with no listener THROWS (measured), so the registration is load-bearing on Express. Tests: `§16` (both files' real condition bytes extracted and driven — no-`Error` SDK must not throw and the message arm must be evaluable, with an SDK-2-shape control green pre- and post-fix; red-first 3 red / 2 green). **#B509 (0.6.29) — a failed statement's RESULT ROWS no longer ride the synthesized query error.** Both onError sites (`register()` and `bulkInsert`) build `new Error(cause.first_error_message)` from the N1QL `cause` envelope and used to set `error.stack = trigger + '\n' + cause.http_body` and `error.cause = cause` VERBATIM — and `http_body` is the query service's WHOLE response, whose `results` is non-empty whenever the failing statement had already produced rows (a `RETURNING` DML losing a CAS race, 12009; a SELECT timing out part-way, 1080). So the rows reached every sink that printed the error: the controller error path prints `.stack` in ALL scopes; any `console.error(err)` / `logger.error(err)` prints enumerable `cause` through `util.inspect` (the logger's `inspectError` IS `util.inspect`; Node's default `maxStringLength` lets 10,000 chars of the body through); the JSON error response carries `.stack` in LOCAL scope only (stripped elsewhere, #B131 on both engines); a custom error template receives `stack` ungated. NOT sinks: the Inspector query log (`error: err.message` only) and `lib/connector-error` (reads exactly `first_error_code` + `retry`). A consumer measured 17 of 18 logged query errors in 16 h carrying 1–7 full documents each, with no interception point (the controller prints the stack before any bundle `onError` runs). Fix: `param-redact.redactResultRows(httpBody)` — the #B350 module, same fail-safe contract on the OUTPUT side — parses the envelope, replaces `results` with `[N result rows redacted]`, keeps `errors`/`requestID`/`status`/`signature`/metrics, and FAILS CLOSED (a non-string or unparseable body becomes a byte-count marker, never the raw text; it never throws); both sites set `.stack` from the redacted body and `error.cause = Object.assign({}, cause, { http_body: redacted })` — a shallow copy, so the SDK's object is never mutated and the classifier's two inputs survive. The #B153 empty-message guard is untouched. Consumer-visible: nothing reads rows out of a query error's stack any more. Server-side, load-once ⇒ bundle RESTART, no re-bake. Tests: `test/core/couchbase-b509.test.js` (helper arms incl. fail-closed and a `__proto__`-key body; both-site source pins with an anti-vacuity control; a replica proving every channel clean, with the pre-fix branch as the subtract control); `couchbase-connector.test.js §08`'s fixed replica realigned. Generalises: an error object that carries a foreign payload leaks through EVERY generic printer, not just the one you instrumented — redact at the point the payload is attached, and copy foreign objects rather than mutate them. **#B541 (0.6.31) — a connector that cannot CONNECT at boot fails loudly instead of hanging, and one failed attempt reports once instead of twice.** Consumers wait on a ONE-SHOT `ready` (`onReady` registers `self.once('ready', cb)`), and every failure path in `connect()` routes to `onError`, which only re-arms a retry — it never emits. So an unreachable cluster at boot settled nothing: `lib/model.js`'s all-or-nothing ready gate never closed, the bundle never printed the two flags `bundle:start` waits on, and the CLI killed it at ~64s (`lib/cmd/bundle/start.js`: maxRetry 15 × maxTimeout 4000ms) with no error anywhere. The loud path — `console.error` + `process.exit(1)` in `onModelReady` — was already correct and is how every OTHER connector reports a dead database (the other eight invoke the caller's callback on every path, failure included); it was simply unreachable here. Fix, both files: `init()` arms a readiness deadline and, if nothing has settled by it, emits `ready(err, null)` itself so that path runs. ⚠️ Do NOT "fix" this by un-commenting the disabled `self.emit('ready', bErr, null)` — the same 2023 hunk that commented it ADDED the retry, so un-commenting restores the loud path and destroys the retry. Tunable per `connectors.json` entry via `readyTimeout` (MILLISECONDS, default 50000, in `schema/connectors.json`); a value at or above the ~64s start budget cannot take effect because the CLI terminates first, and a non-positive/non-numeric one falls back to the default. Two deliberate shapes: the deadline is NOT unref'd (were it the only handle holding the event loop, unref would let node exit 0 silently instead of reporting), and `_markSettled()` only records the settle + disarms the timer — it does NOT gate the emit, because `core/model/index.js` attaches a persistent `.on('ready')` bridging reconnect churn onto the Inspector event signal while both `onReady` consumers use `once`, which already drops a late delivery. Retry is untouched: uncapped after a settle, so a serving bundle still survives a blip. **Same arc, the double report:** on failure the SDK settles BOTH channels — the `onBucketOpened` callback AND the awaited promise — so one failed attempt called `onError` twice, arming TWO retry chains that each armed two more (2→4→8…) and double-counting `_reconnectAttempts` so the backoff hit its 60s cap after five real attempts instead of ten; `onError` now goes through `settleOnce` minted PER `connect()` invocation (driven: counter 2 → 1). That guard also fixes a shape it was masking — `onError` dereferences `self.instance`, which is never initialised at construction and is assigned only by the callback channel, so an SDK rejection that never calls back THREW at `onError`'s first statement, arming no retry and emitting nothing, visible only as an unhandled rejection of the bare `self.connect(dbString)` (driven: counter `undefined` → 1) — a silent death, which is why it went unnoticed. v3 matters as much as v4: it is the DEFAULT when a project pins no `couchbase` dependency. Server-side, load-once ⇒ bundle RESTART, no re-bake. Tests: `test/core/couchbase-boot-deadline.test.js` (boots the REAL connector against a planted project-side SDK stub — `connector.v*.js` requires the SDK at `getPath('project') + '/node_modules/couchbase'`, so seeding the project dir IS the seam; mocked timers, because `onError` does not retain its retry handle and a real chain would re-arm forever and hang the file; a SUCCESS arm as the firing control, since `init()` reads `getConfig()` inside a try whose catch emits `ready(err)` and an unwired harness therefore makes the FAIL arm settle and read as no-defect). Generalises: a connector that reports readiness by EVENT rather than by invoking the caller's callback has no failure path unless one is built — an error-only retry loop is indistinguishable, from the gate's side, from a connector still trying. **#B608 (0.6.33) — no caller or configuration value reaches N1QL statement TEXT unvalidated.** Three splice sites, three fixes. (1) `SEARCH()`: the 2021 block matched `(search\(|search\s+\().*\)` — greedy, so the span ran to the statement's LAST `)` — and rewrote every `$N` inside it to `'"' + value + '"'` through a STRING replacement: no escaping (a search term carrying `"` made the statement malformed), `$&` expanded, `$1` also rewrote `$10`, value params that merely followed the call were re-typed as string literals, and every distinct term compiled its own prepared plan (`adhoc:false`). Its premise ("N1QL parameters are not interpolated into SEARCH()") was wrong: Couchbase documents a parameter as SEARCH()'s query argument when it resolves to a string or an object (docs 6.5 → 8.0; the engine's `ValidOperands()` accepts a static parameter since 6.5.1, source-read), and it was measured on Server 8.0 CE — ad-hoc AND prepared, a complete search-request object with the parameter nested inside, a `"`-carrying term bound without error, the plan still `IndexFtsSearch`. The block is commented out and `$N` stays bound; behaviour changes: a non-string term is no longer stringified, a value param after SEARCH() keeps its type, one prepared plan per statement. (2) Field-path `$N` (`doc.flags.$2`, which cannot be bound): `getInvalidFieldPathError()` admits only `identifier(.identifier)*` (`[A-Za-z_][A-Za-z0-9_]*`, `$` excluded) and the call is refused BEFORE dispatch with a `TypeError` coded `GINA_COUCHBASE_INVALID_FIELD_PATH`, delivered like #B243 (callback when there is one, else thrown — the Promise form throws synchronously). (3) `$scope`: `resolveScope(infos.scope, process.env.NODE_SCOPE)` resolves it ONCE at factory load (same `||` precedence; the factory runs again when a couchbase reconnect rebuilds the models through `reloadModels`, which passes the entry's `scope` since #B624 — the rebuild used to omit it and fall back to `NODE_SCOPE`; since #B893 the entry's `scope` is the user's own — `connector.v{3,4}.js` `init()` merges its SDK defaults (the inert collections `scope: '_default'` among them) into a COPY of the entry and the keep-alive ping reconnects with that copy, where merging INTO the shared entry had given an entry without `scope` the data scope `_default` instead of `NODE_SCOPE` — and the factory logs « data scope: <value> (from connectors.json "scope" | NODE_SCOPE) » at every load) against `^[A-Za-z0-9_./-]+$` (`/` stays admitted so that a scope registered under the retired `scope:add <bundle>/<scope>` form keeps booting; since #B626 `scope:add` checks the whole name and refuses `/`, pointing at the `manifest.json` `bundles.<name>.scopes` allow-list, the real per-bundle mechanism), stamps both prototypes with it and feeds `/\$scope\b/g` through a function replacer; a refusal ends the boot through the EXPLICIT terminal (`console.emerg` → `fs.writeSync(2)` → `process.exit(1)`, placed just before `return init()` so every factory-level `var x = function` is assigned) — never a bare throw: the factory runs inside the model layer's ready handler, which this connector reaches from inside the SDK's connect callback, and the SDK 4.x hands a throw from that callback back to the same callback as a connection error — logged as a failure to connect and retried, the bundle never listening (read from the SDK 4.1.3 source). Since #B617 `lib/model.js`'s `done()` catches such a throw too; the explicit terminal keeps the refusal's own message and code. Server-side, load-once ⇒ bundle RESTART, no re-bake. Tests: `test/core/couchbase-b608.test.js` — both helpers extracted from the shipped bytes and executed; the REAL connector against a recording cluster stub; the boot terminal in a CHILD process (a `process.exit(1)` in the runner takes the whole file down); comment-stripped source pins with raw-text anti-vacuity checks; the env seam `GINA_COUCHBASE_CONNECTOR_SRC` runs the whole file against pre-fix bytes (8 controls green, 32 fix arms red). Generalises: a comment asserting "the driver cannot bind X" is a claim to re-measure against the vendor docs and a live server before it may justify a splice. **#B616 (0.6.33) — the fourth splice site #B608 missed:** `bulkInsert` wrote the bucket name (the entry's `database`) bare into `INSERT INTO <bucket> (KEY, VALUE)` and `RETURNING <bucket>.*`, so a legal dashed bucket such as `beer-sample` (N1QL needs it escaped) could not be bulk-inserted into. One keyspace string, backtick-quoted with any embedded backtick doubled, now serves both clauses and the redacted log copy; no load-time refusal was added, since Couchbase bucket names may contain `.` and `%`, which the storage store's `IDENTIFIER_RE` excludes. The statement text changes for every bucket; the query means the same. Load-once ⇒ bundle RESTART. Pin: the self-contained `#B616` arm in `test/core/couchbase-concurrency.test.js` §06 (the real factory on a `beer-sample` bucket). The REST query transport is RETIRED (#B634, #B623): `useRestApi: true` used to route every N1QL query through a hand-written plain-http `http.request()` to the query service — `Authorization: Basic` in cleartext even on `couchbases://`, every `'` in the statement rewritten to `"`, parameters spliced in unescaped — so the option is now ignored with ONE warning per connector, and queries always go through the SDK (`conn._cluster.query`).
951
+ 177. **Couchbase connector — install-derived SDK resolution (v2 removed), `connectors.json` semantics, `getCluster()`, dev-mode index reporting** (replaces individual entries #29, #40, #41, #57, #136, #153) — connectors are keyed in `schema/connectors.json` by LOGICAL name (`primary`, `sessionStore`, `cache`, …) with the driver selected by the `connector` enum field (`couchbase`/`mysql`/`postgresql`/`sqlite`/`redis`/`ai`/…); since 0.7.5 an entry WITHOUT `connector` whose key is itself a built-in type (`"sqlite": {…}`) takes that type, filled once where `core/config.js` finalises a bundle's connectors by `lib/connector-config` `applyKeyTypes()` (types = `lib.connectorRegistry.getDriverTypes()` + `ai`) — the convention `connector:add` (which omits the field when name = type, since 0.3.7), `connector:list` and the schema already followed, while the model layer read only `connector`, so such an entry stopped the boot with `No connector found` (#B900); a set `connector` always wins and a key naming no type still needs the field. Entities load from `models/<database>/entities`; since 0.7.5 the Couchbase factory creates that directory when missing, as the six other ORM factories do — before, an entry named differently from its bucket aborted the boot with `ENOENT … scandir …/models/<bucket>/entities` on a project without it (#B894) — and the model layer creates only the models root, the one directory the Couchbase reconnect checks (before 0.7.5 it also created an empty `models/<entry key>/entities` for every entry, which nothing reads, #B901) — never introduce a separate `driver` field; the optional `version` field carries a semver range used by `connector:add --driver-version=…` for the npm-install hint. The Couchbase SDK major is derived from the project's INSTALLED `couchbase` npm version — the leading major of `dependencies.couchbase` selects `connector.v<major>.js`, which stamps `conn.sdk = { version: N }` — never from a config key, so migrating SDK majors is a driver bump (`npm install couchbase@^4`), not a config edit. SDK v2 is REMOVED as of 0.4.0: the resolver now throws a clear "SDK v2 is no longer supported — upgrade couchbase@^3/^4" error when the installed major is ≤ 2 or the connector file is missing (previously a silent fallback that crashed later with an opaque MODULE_NOT_FOUND); the v3-vs-v4 split remains for param shaping. Generalises: when a connector's behavior-version derives from an installed dependency rather than config, fail fast once the installed major drops below the supported floor. Couchbase entities expose a public `getCluster()` (on both the model-entity and N1QL-entity prototypes) returning the underlying SDK `Cluster` handle for features the ORM doesn't wrap — chiefly multi-document ACID transactions (`cluster.transactions().run(...)`, needs SDK 3.2+/4.x) — without touching private `_*` internals; it throws a coded `GINA_COUCHBASE_CLUSTER_UNRESOLVED` error when neither connection shape resolves. Dev-mode index reporting: the SDK v4 C++ binding never populates `meta.profile` despite `profile: 'timings'` being sent (confirmed on v4.6.0), so an async `EXPLAIN <statement>` fallback with a per-process per-statement cache supplies the plan instead (the first request for a new statement may show N/A; subsequent requests hit the cache), and `USE KEYS` plans surface as "KV lookup" via `KeyScan` operator detection (an `ExpressionScan`, the plan of a FROM over an expression, reads no keyspace: `no keyspace read`, #B1162). Three historical traps locked by tests: `conn._cluster.query()` must receive the full `queryOptions` object, not the raw params array (the raw form silently dropped `profile`/`scanConsistency`/`adhoc` from every query); of the connector's two `register()` dispatch paths, Option B (`!_isRegisteredFromProto`) is the ALWAYS-active one — instrumentation or logging added to Option A never executes; and (#B193, 0.6.3) the plan walker must visit the NESTED scan containers, not just `~child`/`~children` — the multi-index operators (`IntersectScan`/`UnionScan`/`OrderedIntersectScan`) put their child `IndexScan3` nodes under a `scans` array and `DistinctScan` under a singular `scan`, so before the fix any plan the planner served with more than one index extracted `[]` and the Inspector rendered the red "no index — full bucket scan" badge/banner for a fully-indexed query — a false negative inviting a pointless (write-amplifying) index build. Both extraction paths (SDK `meta.profile` and the EXPLAIN fallback) share the walker, so one fix covers both; index names still dedupe, and the Query tab already renders one chip per index so multi-index plans display correctly with no client change. A consumer-runnable SDK soak harness ships at `script/soak/couchbase-soak.js` (#CN12): it scaffolds a fully isolated throwaway project, installs a candidate `couchbase` SDK into it (`--sdk=<version>` / `--sdk-path=<dir>` — the install IS the version selector, since the connector resolves the SDK from the project node_modules and derives v3/v4 dispatch from its dependency pin), builds + boots prod, and drives N1QL (incl. a `request_plus` arm) + entity-handle KV (promise AND 4-arg callback forms) + the couchbase session store under sustained concurrent load for `--duration`, FAILING on premature process exit (a clean exit 0 counts as failure — the silent-death class it screens for), unbounded RSS growth, error-rate drift, or a dead arm. A screen, not proof: run it as the first filter on an SDK-bump candidate, ahead of a workload-shaped soak. Pure parts (arg parsing, RSS slope, verdict) are unit-tested in `test/lib/couchbase-soak-evaluator.test.js`; the live harness needs a real cluster and never runs in CI. Named scopes/collections stance (2026-08-02): document-field partitioning (`_scope`/`_collection` fields, one bucket, default collection) IS the data model; the `useScopeAndCollections` option (+ `scope`/`collection` defaults) is accepted but INERT — declared and merged, consumed by nothing — and `schema/connectors.json` says so honestly; named-collection KV is reachable per call via `entity.getConnection(scope, collection)`; native scope/collection routing is deliberately not built (demand-gated). #B203 (2026-08-02): both SDK-major resolver twins derive the major as the dependency pin's FIRST integer — the former caret-only strip mangled range pins (`~4.5.0` → `~4`, `>=4.5` → `>=4`), which slipped the v2 floor (parseInt NaN) into a misdirecting existsSync "supported majors are 3 and 4" error; a digit-less pin (`*`, `latest`) now refuses naming the pin, a package.json without a `dependencies` key no longer TypeErrors, and the v2 floor fires for range v2 pins too (`~2.5.0`). #B243 (2026-08-04): a query parameter the SDK cannot serialize — a bare `undefined`, a function, or a Symbol — was PROCESS-FATAL rather than throwable: the SDK maps `JSON.stringify` over the parameter list, those three types yield no string at all, the native binding coerces that to `""`, and the C++ core's JSON parse of `""` throws on an internal thread reaching `std::terminate()`/`abort()` — uncatchable by `try/catch`, `uncaughtException` or `unhandledRejection`, so the whole bundle died instead of the request 500-ing (measured against a live cluster on SDK 4.1.3 AND 4.7.1; 4.2.0+ maps a bare `undefined` to null but still aborts on functions and Symbols). Reachable with NO misuse of the driver: the cursor-style assembly branch (queries matching `\w+\.($|%)`) fills `queryParams[i]` for every `i < params.length` while guarding only `undefined`, so a call one argument SHORT with a trailing callback puts the CALLBACK into a parameter slot — the arity check cannot catch that shape because it only fires when the last argument is not a function. `getUnserializableParamError()` now gates the single `queryOptions.parameters` assignment (so both assembly branches and any future one are covered) and surfaces a `TypeError` coded `GINA_COUCHBASE_UNSERIALIZABLE_PARAM` naming the offending position, routed through the query callback when there is one and thrown otherwise. Serializable values are untouched: `null`, `0`, `''`, `false` and objects carrying `undefined` PROPERTIES still reach the SDK. An object whose own `toJSON()` returns undefined is deliberately left unguarded — detecting it costs a full `JSON.stringify` per parameter on every query for a shape no realistic call site produces. **`.sql` `@options` annotation — the exact contract, and the consistency gate that silently dropped keys (former #282, #B155; warns since 0.5.26):** the parser accepts ONLY `@options { … }` — a brace-delimited JS-object-literal after exactly ONE space (unquoted keys fine: a key-quoting normalisation runs before `JSON.parse`; a malformed body warns and is skipped). The historical docs-taught brace-less form (`@options consistency=request_plus`) and a double-space-before-brace both MISS the parse regex entirely. The passthrough into the SDK's query options is GATED on the `consistency` key: any other key (`adhoc`, `timeout`, `profile`, …) applies ONLY when `consistency` is present alongside it — alone it is parsed then dropped. Since 0.5.26 BOTH failure shapes warn (was silent): an unparseable `@options` mention warns with the exact working form; a gate-shut drop warns naming the ignored keys + the `"consistency": "not_bounded"` remedy; an empty `@options {}` drops nothing and stays quiet. An UNKNOWN consistency VALUE warns and falls back to `not_bounded` but STILL opens the gate — the gate keys on presence, not validity. Query-path defaults: `adhoc: false` (statement plans cached — `true` disables that) + `not_bounded`; user keys WIN over framework values (direct assignment — including dev-mode's `profile: 'timings'`). `bulkInsert` is a SEPARATE surface: a JS `options` argument, UNGATED, merged caller-wins-on-conflict / defaults-fill-missing (its default is `adhoc: true`). The gate itself deliberately stays: un-gating would make historically-inert options suddenly live for every consumer, and a bare un-gate CRASHES (the next statement dereferences `options.consistency`) — a restructure gated on field evidence, which the warns now collect. Tests: `test/core/couchbase-connector.test.js §09` drives the SHIPPED parse+gate bytes (unique-text-anchored slices — line numbers rot and the parse block's regex holds an unbalanced `{` that defeats brace-matching). **#B204 (0.6.24) — the `gina.onError` reconnect classifier is guarded; it used to THROW under every supported SDK.** `lib/connector.v3.js`/`lib/connector.v4.js` tested `err instanceof couchbase.Error`, but no supported couchnode exports a bare `Error` class (measured on a real 4.1.3 `dist/errors.js`: `Error` undefined, `CouchbaseError` + 81 siblings present, and the classifier condition executed against that surface throws `TypeError: Right-hand side of 'instanceof' is not an object`). Because that operand is evaluated FIRST, the shutdown-bucket message arm — which needs no SDK class — was unreachable too, so the classifier could not classify anything by any route. **Dispatch topology, measured:** `gina.onError` listeners fire ONLY under 4-arg (Express-engine) error-middleware invocation; Isaac's dispatchers invoke middlewares 3-arg, so the arity shim sets `error = false` and the emit branch never runs — on Isaac the listener, broken or fixed, never executes. **Fix = guard, deliberately NOT an activation:** each `instanceof` is prefixed `typeof(couchbase.Error) == 'function' &&` (4 live sites, both files). Modern SDK errors carry no numeric `.code`, so the guarded arms stay inert; the SDK-2 message string greps 0 in the 4.1.3 dist JS (`timeout` firing as control); on Express the real error now reaches the handler's designed terminal (log + JSON 500 / `next(err)`) instead of being replaced by the TypeError. ⚠️ **Do NOT "modernize" this into an active reconnect without a live-cluster gate:** gina's own `connect()` mints a NEW cluster handle per call (`couchbase.connect` at `connector.v4.js:265`) and the only `disconnect()` sits inside the code-23 arm — an activated retry loop would stack unclosed handles. Also do NOT remove the listener: `e` (`gna.js:81`) is a plain EventEmitter, and an `'error'` emit with no listener THROWS (measured), so the registration is load-bearing on Express. Tests: `§16` (both files' real condition bytes extracted and driven — no-`Error` SDK must not throw and the message arm must be evaluable, with an SDK-2-shape control green pre- and post-fix; red-first 3 red / 2 green). **#B509 (0.6.29) — a failed statement's RESULT ROWS no longer ride the synthesized query error.** Both onError sites (`register()` and `bulkInsert`) build `new Error(cause.first_error_message)` from the N1QL `cause` envelope and used to set `error.stack = trigger + '\n' + cause.http_body` and `error.cause = cause` VERBATIM — and `http_body` is the query service's WHOLE response, whose `results` is non-empty whenever the failing statement had already produced rows (a `RETURNING` DML losing a CAS race, 12009; a SELECT timing out part-way, 1080). So the rows reached every sink that printed the error: the controller error path prints `.stack` in ALL scopes; any `console.error(err)` / `logger.error(err)` prints enumerable `cause` through `util.inspect` (the logger's `inspectError` IS `util.inspect`; Node's default `maxStringLength` lets 10,000 chars of the body through); the JSON error response carries `.stack` in LOCAL scope only (stripped elsewhere, #B131 on both engines); a custom error template receives `stack` ungated. NOT sinks: the Inspector query log (`error: err.message` only) and `lib/connector-error` (reads exactly `first_error_code` + `retry`). A consumer measured 17 of 18 logged query errors in 16 h carrying 1–7 full documents each, with no interception point (the controller prints the stack before any bundle `onError` runs). Fix: `param-redact.redactResultRows(httpBody)` — the #B350 module, same fail-safe contract on the OUTPUT side — parses the envelope, replaces `results` with `[N result rows redacted]`, keeps `errors`/`requestID`/`status`/`signature`/metrics, and FAILS CLOSED (a non-string or unparseable body becomes a byte-count marker, never the raw text; it never throws); both sites set `.stack` from the redacted body and `error.cause = Object.assign({}, cause, { http_body: redacted })` — a shallow copy, so the SDK's object is never mutated and the classifier's two inputs survive. The #B153 empty-message guard is untouched. Consumer-visible: nothing reads rows out of a query error's stack any more. Server-side, load-once ⇒ bundle RESTART, no re-bake. Tests: `test/core/couchbase-b509.test.js` (helper arms incl. fail-closed and a `__proto__`-key body; both-site source pins with an anti-vacuity control; a replica proving every channel clean, with the pre-fix branch as the subtract control); `couchbase-connector.test.js §08`'s fixed replica realigned. Generalises: an error object that carries a foreign payload leaks through EVERY generic printer, not just the one you instrumented — redact at the point the payload is attached, and copy foreign objects rather than mutate them. **#B541 (0.6.31) — a connector that cannot CONNECT at boot fails loudly instead of hanging, and one failed attempt reports once instead of twice.** Consumers wait on a ONE-SHOT `ready` (`onReady` registers `self.once('ready', cb)`), and every failure path in `connect()` routes to `onError`, which only re-arms a retry — it never emits. So an unreachable cluster at boot settled nothing: `lib/model.js`'s all-or-nothing ready gate never closed, the bundle never printed the two flags `bundle:start` waits on, and the CLI killed it at ~64s (`lib/cmd/bundle/start.js`: maxRetry 15 × maxTimeout 4000ms) with no error anywhere. The loud path — `console.error` + `process.exit(1)` in `onModelReady` — was already correct and is how every OTHER connector reports a dead database (the other eight invoke the caller's callback on every path, failure included); it was simply unreachable here. Fix, both files: `init()` arms a readiness deadline and, if nothing has settled by it, emits `ready(err, null)` itself so that path runs. ⚠️ Do NOT "fix" this by un-commenting the disabled `self.emit('ready', bErr, null)` — the same 2023 hunk that commented it ADDED the retry, so un-commenting restores the loud path and destroys the retry. Tunable per `connectors.json` entry via `readyTimeout` (MILLISECONDS, default 50000, in `schema/connectors.json`); a value at or above the ~64s start budget cannot take effect because the CLI terminates first, and a non-positive/non-numeric one falls back to the default. Two deliberate shapes: the deadline is NOT unref'd (were it the only handle holding the event loop, unref would let node exit 0 silently instead of reporting), and `_markSettled()` only records the settle + disarms the timer — it does NOT gate the emit, because `core/model/index.js` attaches a persistent `.on('ready')` bridging reconnect churn onto the Inspector event signal while both `onReady` consumers use `once`, which already drops a late delivery. Retry is untouched: uncapped after a settle, so a serving bundle still survives a blip. **Same arc, the double report:** on failure the SDK settles BOTH channels — the `onBucketOpened` callback AND the awaited promise — so one failed attempt called `onError` twice, arming TWO retry chains that each armed two more (2→4→8…) and double-counting `_reconnectAttempts` so the backoff hit its 60s cap after five real attempts instead of ten; `onError` now goes through `settleOnce` minted PER `connect()` invocation (driven: counter 2 → 1). That guard also fixes a shape it was masking — `onError` dereferences `self.instance`, which is never initialised at construction and is assigned only by the callback channel, so an SDK rejection that never calls back THREW at `onError`'s first statement, arming no retry and emitting nothing, visible only as an unhandled rejection of the bare `self.connect(dbString)` (driven: counter `undefined` → 1) — a silent death, which is why it went unnoticed. v3 matters as much as v4: it is the DEFAULT when a project pins no `couchbase` dependency. Server-side, load-once ⇒ bundle RESTART, no re-bake. Tests: `test/core/couchbase-boot-deadline.test.js` (boots the REAL connector against a planted project-side SDK stub — `connector.v*.js` requires the SDK at `getPath('project') + '/node_modules/couchbase'`, so seeding the project dir IS the seam; mocked timers, because `onError` does not retain its retry handle and a real chain would re-arm forever and hang the file; a SUCCESS arm as the firing control, since `init()` reads `getConfig()` inside a try whose catch emits `ready(err)` and an unwired harness therefore makes the FAIL arm settle and read as no-defect). Generalises: a connector that reports readiness by EVENT rather than by invoking the caller's callback has no failure path unless one is built — an error-only retry loop is indistinguishable, from the gate's side, from a connector still trying. **#B608 (0.6.33) — no caller or configuration value reaches N1QL statement TEXT unvalidated.** Three splice sites, three fixes. (1) `SEARCH()`: the 2021 block matched `(search\(|search\s+\().*\)` — greedy, so the span ran to the statement's LAST `)` — and rewrote every `$N` inside it to `'"' + value + '"'` through a STRING replacement: no escaping (a search term carrying `"` made the statement malformed), `$&` expanded, `$1` also rewrote `$10`, value params that merely followed the call were re-typed as string literals, and every distinct term compiled its own prepared plan (`adhoc:false`). Its premise ("N1QL parameters are not interpolated into SEARCH()") was wrong: Couchbase documents a parameter as SEARCH()'s query argument when it resolves to a string or an object (docs 6.5 → 8.0; the engine's `ValidOperands()` accepts a static parameter since 6.5.1, source-read), and it was measured on Server 8.0 CE — ad-hoc AND prepared, a complete search-request object with the parameter nested inside, a `"`-carrying term bound without error, the plan still `IndexFtsSearch`. The block is commented out and `$N` stays bound; behaviour changes: a non-string term is no longer stringified, a value param after SEARCH() keeps its type, one prepared plan per statement. (2) Field-path `$N` (`doc.flags.$2`, which cannot be bound): `getInvalidFieldPathError()` admits only `identifier(.identifier)*` (`[A-Za-z_][A-Za-z0-9_]*`, `$` excluded) and the call is refused BEFORE dispatch with a `TypeError` coded `GINA_COUCHBASE_INVALID_FIELD_PATH`, delivered like #B243 (callback when there is one, else thrown — the Promise form throws synchronously). (3) `$scope`: `resolveScope(infos.scope, process.env.NODE_SCOPE)` resolves it ONCE at factory load (same `||` precedence; the factory runs again when a couchbase reconnect rebuilds the models through `reloadModels`, which passes the entry's `scope` since #B624 — the rebuild used to omit it and fall back to `NODE_SCOPE`; since #B893 the entry's `scope` is the user's own — `connector.v{3,4}.js` `init()` merges its SDK defaults (the inert collections `scope: '_default'` among them) into a COPY of the entry and the keep-alive ping reconnects with that copy, where merging INTO the shared entry had given an entry without `scope` the data scope `_default` instead of `NODE_SCOPE` — and the factory logs « data scope: <value> (from connectors.json "scope" | NODE_SCOPE) » at every load) against `^[A-Za-z0-9_./-]+$` (`/` stays admitted so that a scope registered under the retired `scope:add <bundle>/<scope>` form keeps booting; since #B626 `scope:add` checks the whole name and refuses `/`, pointing at the `manifest.json` `bundles.<name>.scopes` allow-list, the real per-bundle mechanism), stamps both prototypes with it and feeds `/\$scope\b/g` through a function replacer; a refusal ends the boot through the EXPLICIT terminal (`console.emerg` → `fs.writeSync(2)` → `process.exit(1)`, placed just before `return init()` so every factory-level `var x = function` is assigned) — never a bare throw: the factory runs inside the model layer's ready handler, which this connector reaches from inside the SDK's connect callback, and the SDK 4.x hands a throw from that callback back to the same callback as a connection error — logged as a failure to connect and retried, the bundle never listening (read from the SDK 4.1.3 source). Since #B617 `lib/model.js`'s `done()` catches such a throw too; the explicit terminal keeps the refusal's own message and code. Server-side, load-once ⇒ bundle RESTART, no re-bake. Tests: `test/core/couchbase-b608.test.js` — both helpers extracted from the shipped bytes and executed; the REAL connector against a recording cluster stub; the boot terminal in a CHILD process (a `process.exit(1)` in the runner takes the whole file down); comment-stripped source pins with raw-text anti-vacuity checks; the env seam `GINA_COUCHBASE_CONNECTOR_SRC` runs the whole file against pre-fix bytes (8 controls green, 32 fix arms red). Generalises: a comment asserting "the driver cannot bind X" is a claim to re-measure against the vendor docs and a live server before it may justify a splice. **#B616 (0.6.33) — the fourth splice site #B608 missed:** `bulkInsert` wrote the bucket name (the entry's `database`) bare into `INSERT INTO <bucket> (KEY, VALUE)` and `RETURNING <bucket>.*`, so a legal dashed bucket such as `beer-sample` (N1QL needs it escaped) could not be bulk-inserted into. One keyspace string, backtick-quoted with any embedded backtick doubled, now serves both clauses and the redacted log copy; no load-time refusal was added, since Couchbase bucket names may contain `.` and `%`, which the storage store's `IDENTIFIER_RE` excludes. The statement text changes for every bucket; the query means the same. Load-once ⇒ bundle RESTART. Pin: the self-contained `#B616` arm in `test/core/couchbase-concurrency.test.js` §06 (the real factory on a `beer-sample` bucket). The REST query transport is RETIRED (#B634, #B623): `useRestApi: true` used to route every N1QL query through a hand-written plain-http `http.request()` to the query service — `Authorization: Basic` in cleartext even on `couchbases://`, every `'` in the statement rewritten to `"`, parameters spliced in unescaped — so the option is now ignored with ONE warning per connector, and queries always go through the SDK (`conn._cluster.query`).
952
952
 
953
953
  178. **HTTP/2 query paths must tolerate a released response — retry re-entries and late upstream responses run after terminal exits (#B33, 2026-06-12, commit `9c2d802a`).** Terminal exits release the per-request refs, and `redirect()` releases them and THEN calls next(), so an inter-bundle HTTP/2 query can outlive its own request in three measured ways, each previously an uncaughtException → SIGTERM bundle kill: (1) every retry re-entry (the 502/stream-error/preflight setTimeout paths, and the stream-timeout one until `0.7.6`, #B967) re-executes the header-forward prep block, which read the released request's headers — null deref from a timer callback outside all try/catch; (2) a late upstream response's success path calls isHaltedRequest → getSession, which read the released request's session from the stream end handler; (3) a parsed upstream payload claiming a 3xx status routed into the redirect intercepts, which wrote headers to the released response (the emitter-mode intercept uncaught; the callback-mode one contained only via a fragile catch chain). All sites null-guarded: forwards and intercepts no-op on a released request (the same options object travels through retries, so options.headers already carries the attempt-1 values — nothing is lost), getSession reports no session, and the emitter-mode 3xx intercept answers the redirect and returns without delivering — the same outcome the callback-mode twin gives the application (measured 2026-09-05 under #B475; that emitter-mode branch — with the other nineteen dead emitter arms, its array-key listener eviction and the #MS5 no-callback probe-release branch — was REMOVED by the #B475 cleanup commit of 2026-09-05: every fluent query rides the callback path, and `query()`'s one-tick fallback is the only `query#complete` emitter left). Live-request behaviour is byte-identical. Runtime-verified by driving the REAL query() through a standalone controller harness against local h2c servers (six probe modes, crash reproduced pre-fix and clean post-fix per site). Sibling unguarded request-header reads exist in OTHER lifecycle functions; the §23 guard pin is block-scoped to the fixed functions for exactly that reason. **Follow-up #B35 (2026-06-13, `714d816f`+next):** the 5 directly-callable SYNCHRONOUS siblings were MEASURED (standalone harness: createTestInstance → renderTEXT() releases the triplet → call → confirmed `uncaughtException`-class crash) and guarded with top-of-function early-returns — `isPopinContext` → false, `setRequestMethod` → null, `setRequestMethodParams` → (void), `getRequestMethodParams` → the cached value, `getFormsRules` → {} (tests `controller.test.js §25`). **#B36 (`c5eaeeb7`+next):** `renderJSON()` is the same shape — its delegate reads `local.res.stream` synchronously before any `headersSent` guard, measured (standalone harness driving the real `render-json.js` delegate: CONTROL live rendered, RELEASE after `renderTEXT()` threw `reading 'stream'`) to crash a released response → SIGTERM; guarded with a top-of-function `if (local.res == null) return` (tests `render-json.test.js §03`). The render-swig / render-nunjucks delegates share the same read but are the NON-FATAL async class (measured 2026-06-13, initially NOT guarded — GUARDED as of #B45, see below): their `render()` is `async` and `this.render` returns the delegate promise un-awaited, so a released-instance read rejects → `unhandledRejection` → `gna.js:871` logs it (no SIGTERM). This is the canonical severity-axis example — a SYNCHRONOUS released read (render-json `#B36`, the `#B35` helpers) is a SIGTERM bundle-kill worth guarding; the same read in an ASYNC delegate is a logged unhandledRejection not worth editing the hot render path for. **#B45 (2026-06-14, `d9bfc5af`) reversed that for the render delegates:** production surfaced exactly the predicted `unhandledRejection` (a controller firing several parallel `self.query()` calls against a downed upstream — the first failure callback renders+releases the triplet, a later callback re-enters `render()` at `local.res === null` → render-swig.js:259 `res.stream` throws), which is the #B36 "revisit only if the log noise proves operationally costly" trigger. All four async delegates (render-swig / render-nunjucks + both async variants) now carry the same top-of-function `if (local.res == null) return` guard as render-json/render-stream — one null check at the top, byte-identical on live requests; the rarer in-flight #M1 `setResources` race (render-swig.js:613 → controller.js:896, caught + #B31-guarded) is unchanged. The severity-axis lesson still holds (sync → SIGTERM → always guard; async → unhandledRejection → guard only once the noise is shown operationally costly) — #B45 is the worked example of the async "guard-when-costly" branch firing (tests `render-swig.test.js §19` / `render-nunjucks.test.js §08` / `render-engine-dispatch.test.js §08`). `redirect` GUARDED too (**#B37**, `a03e6f84`+next): measured synchronous, so a released second-call (redirect-then-redirect, or render-error-then-redirect) crashed `reading 'originalMethod'` → SIGTERM; top-of-function `if (local.req == null) return` (tests `controller.test.js §26`). **#B38 (2026-06-13) — the #B37 "SIGTERM class CLOSED" claim was premature: an exhaustive sweep of EVERY synchronous controller surface found SIX more lethal sync residuals, each measured (CONTROL no-throw / RELEASE positive crash, then no-throw post-guard) and guarded top-of-function with the same `if (local.req|res == null) return <default>` shape:** `downloadFromLocal` (`reading 'setHeader'`), the inner `start` of `store` (`reading 'files'` — reached SYNCHRONOUSLY through the documented `store(target).onComplete(cb)` wrapper, which calls `start` OUTSIDE the async `store` body; the #B35 probe had only tried `store('t')`, which returns the wrapper WITHOUT calling `start`, so `store` was wrongly filed as async-deferred here), `renderStream` (`reading 'stream'` — its controller wrapper AND the delegate are both synchronous, and the read precedes the delegate's headersSent guard, mirroring the #B36 render-json placement), `push` (`reading 'method'`), `pauseRequest` (`reading 'url'`), `resumeRequest` (`reading 'session'`/`'method'`) — tests `controller.test.js §27` + `render-stream.test.js §11`. Genuinely document-skipped (measured NON-FATAL, by the same async-boundary reasoning — the render delegates themselves since GUARDED, see #B45 above): `downloadFromURL` (its reads sit inside an `async function`, so any throw is a rejected promise → `unhandledRejection`, and the request gets no response; since 0.7.11 its input failures answer 500 through `throwError` instead: an `options` that is neither an object nor `null` (a function there is copied like one), a url that is not a string or whose scheme is not exactly `http` or `https`, and an `options.file` that is not a string or has no ASCII-word extension, which used to replace the url's name after the url's own extension test — #B1111, #B1114, #B1118; it also works on a copy of the `options` object it is given and of its `headers`, where up to 0.7.10 it wrote its defaults, the formatted content-disposition and the forwarded `x-request-id` into the caller's object, so one object passed to two calls sent the second under the first one's name and request id — #B1112; an `https` url that names no port goes to port 443 since 0.7.11, where the defaults' `port: 80` sent it to port 80 and the download answered 500 — #B1119; a url aimed at the host of an `app.proxy` `bundle@project` entry on another port goes to that bundle's port, where the override set the host to the port number and the method answered 500 — #B1120; and the host and the port come from the url's authority since 0.7.11, where a `:<digits>/` anywhere in the url (a path segment, a query) set the port, a `user:password@` stayed in the host and an IPv6 literal lost part of its address, while a url carrying credentials now answers 500 and names `options.auth` — #B1121), and the render-path inner fns `setResources` / `getNodeRes` (sync, but invoked ONLY from the async render delegates, so a throw rejects the delegate promise — and the captured-req fix-shape was declined because the captured req is itself null in the released-response case). **Rule: lethality follows the NEAREST async boundary, not the function's own sync/async keyword — a sync read with no async function between it and the dispatcher is a SIGTERM bundle-kill (guard it); the same read reached only through an async function degrades to a logged unhandledRejection (skip it). Probe-asymmetry corollary: "no throw" is NOT proof of safety — feed inputs that actually REACH the deref (`resumeRequest({})` dodged its `req.session` read via an `&&` short-circuit + an early `throwError` return and looked safe until re-measured with a deref-reaching input).** **#B44 (2026-06-14, commit `d95ac2fe`) — closes the one throwError-OWN residual the #B38 sweep flagged, and is the worked example of the measurement-scope-gap.** `throwError` reads `res.stream` (the HTTP/2 protocol branch) and then builds the error object from `res.error`/`res.stack`/`res.fallback` (~10 reads) BEFORE its OWN #B31 guard. For the 2-arg `throwError(code, Error|string)` and 3-arg `throwError(local.res, code, msg)` shapes `res` is already the released `local.res` (null) at those reads, so a released response crashed at `res.stream` on HTTP/2 bundles and at `res.error` on EVERY bundle (HTTP/1.1 reaches it because the `res.stream` read short-circuits off-h2). The 1-arg shape is unaffected (its `res` stays the truthy errObj until reassigned just before the guard — why #B31 sufficed for ITS scenario). Fixed with an up-front `if (!res) { warn; return false; }` early guard before any deref (tests `controller.test.js §28`); severity LOW (only the async `downloadFromURL` path reaches it today → non-fatal `unhandledRejection`), but it lifts the #B38 qualification for the synchronous 2-arg/3-arg surface on both protocols. **Measurement-scope-gap lesson: the FIRST-proposed fix (guard the `res.stream` read only) was INSUFFICIENT — it does NOTHING on HTTP/1.1 (already short-circuits there; the crash is at the `res.error` build) and merely RELOCATES the HTTP/2 crash to that same build. The prior repro was VERBATIM-TRUNCATED at the first crash line (it ran through the `res.stream` read, saw the TypeError, STOPPED), so it proved "the crash exists" but never executed the NEXT deref and so couldn't see that guarding one site just moves the crash. A repro that stops at the first crash cannot validate a "falls through to the guard" claim — match the repro's SCOPE to the claim's scope (the "match the measurement's scope to the claim's scope" rule, applied to a runtime repro). A per-site `&& res` is whack-a-mole here (~10 derefs before the guard); one early guard covers them all.** **The family's origin (#B31, folds former #172):** the first two guarded entry points were `throwError` — it normalizes every 1-/2-arg call shape to `res = local.res`, then read `typeof(res.getHeaders)` off the null — and `headersSent()` (read `typeof(_res.stream)`); both were uncaughtException → SIGTERM bundle kills with no application frames. Field shape: an auth middleware that 301-redirects unauthenticated requests and lets the chain continue makes the crash deterministic on every unauthenticated hit, and the crash-respawn loop keeps every process cold — masquerading as a separate "valid sessions never authenticate" bug (each request lands on a freshly-respawned process whose session-store connector hasn't warmed). Now `headersSent()` reports a released response as already-sent (a single chokepoint — every `!headersSent()` caller no-ops) and `throwError` logs the serialized late error (naming what previously died opaque) and returns false; live-response paths are byte-identical. Reusable repro recipe: `controller.js` loads standalone — inject the framework dir into NODE_PATH + `Module._initPaths()`, require the framework helpers (injects the path/JSON globals), `setPath('gina', { core: <fw>/core })`, then `SuperController.createTestInstance({req, res, next, options})` with a minimal mock response; `renderTEXT()` is the lightest terminal exit to reproduce any released-response sequence against the real class.
954
954
 
@@ -1015,7 +1015,7 @@ Dev-mode query instrumentation captures every database query tied to the current
1015
1015
  256. **Region locale data (`core/locales`) — standalone per-language files, localized `countryName`, additive `getCountries(code)` projection (#50, 2026-07-18, 0.5.20).** The region generator (`node src/make --target=region --region=en,fr`; CSV `resources/region.csv` = datahub country-codes, `;`-separated) emits ONE STANDALONE `dist/region/<lang>.json` per requested language: the row accumulator is reset per pass (it used to APPEND each language's rows to the previous output, so every `isoShort` was duplicated with the English copy FIRST and `findOne({isoShort})` always matched English), the requireJSON-cached column mapping is cloned per pass (a mutating pass used to leak into the next language's build — a `fr,en` order lost `officialStateName` for en), and rows without an ISO 3166 alpha-2 code are dropped (2 M49 aggregates with empty `isoShort` AND empty `countryName`; `en.json` 251→249). Non-en passes overlay `countryName` from `resources/region.names.<lang>.json` beside the CSV (French ships with the framework) and FAIL FAST when that file is missing for a requested language — never silently shipping English names under a non-en filename. The names files use PLAIN CLDR territory names: the fr `-alt-short` variants are abbreviations (`É.-U.`, `R.-U.`), not display names, so plain deliberately wins — a knowing style asymmetry with the CSV's own English column, which prefers `-alt-short` (`US`, `UK`). `--outdir=<path>` overrides the target dir; `require.main === module` gates the CLI so the module is require-safe/testable. Controller side: `getCountries(code)` honors its documented projection arg ADDITIVELY — a valid string field (`capital`, `continent`, `tld`) is added to each returned row, the 4 historical fields stay untouched, no-arg output is byte-identical, unknown/dotted codes warn and are ignored — and `getLocales()` on a bundle with no locale set degrades to an empty list instead of throwing. Composition: the per-request negotiated `req.culture` selects which language's region set a request sees through the setOptions locale bridge (#B100 guarded fallback to the bundle default then `en` when the resolved language has no region file), so an `Accept-Language` flip changes `countryName` per request — warm cached routes included (#B84: the cached fast-path re-negotiates). Region files are read ONCE at boot (`core/locales/index.js` loads ALL `dist/region/*.json` onto the gina context) — regenerated data needs a bundle restart; dev hot-reload does not deliver it. **#B101 (2026-07-20) completes the bridge's last dead leg:** the setOptions country lookup filtered on a `short` key the rows never carried, so `page.view.locale` was ALWAYS `{}` (+ the date stamp) with a country code present — and an arbitrary first record without one (an undefined-valued filter key serializes away and match-alls). Now `findOne({ isoShort: userCountryCode.toUpperCase() })` (the rows are uppercase; the normalization makes a lowercase Accept-Language country segment resolve too), gated on a non-empty country code so a country-less culture (bare `en`) resolves an explicit `{}` — `page.view.locale` carries the real record (countryName / currency / capital / …) for the first time. Measured zero framework consumers pre-fix (the set site was the object's only reference), so nothing shifts under existing templates — they simply gain a working surface.
1016
1016
 
1017
1017
 
1018
- 258. **CSP useNonce × server cache (#B130, shipped 0.5.21) — the bootstrap-script nonce is render-time, and cache hits re-mint; since #B464 (0.6.27) the compiled template carries no Inspector payload, and since #B1131 (0.7.11) no per-request loader value.** With `Csp({useNonce:true})` + `server.cache.enable:true`, the framework-injected onGinaLoaded bootstrap `<script>` used to carry a nonce frozen at first compile (baked into the per-view compiled-template cache AND the persisted layout-cache file, which is only re-primed when missing), while the middleware minted a fresh header nonce per request — so header != markup on every later response of a cached route (misses included), breaking enforce-mode CSP. Now: (1) the loader injection is a swig conditional evaluated per execute against `page.cspNonce` (assigned pre-execute on both the compiled-cache-hit and compile branches), so cached compiled templates are nonce-agnostic; (2) stale layout-cache files written by pre-fix builds are normalized in place on the next compile (anchored on the loader's own comment-wrapper idiom + the dev Inspector script openers; idempotent; app-authored tags untouched); (3) output-cache HITS mint fresh per response — both engines' serve paths rewrite the stored CSP header (enforce and report-only) and swap the old nonce values in the stored body (exact-string split/join, base64-safe) without ever mutating the stored entry; the isaac fs read-back buffers instead of streaming only when a re-nonce applies. Verify on a live route: header nonce == every markup nonce AND rotating across responses on miss + hit. Dev/cacheless was never affected (layout re-primed every request). **The same per-view compiled-template cache + persisted layout-cache file also froze the dev Inspector's `window.__ginaData` payload (#B464, fixed 0.6.27):** with `server.cache.enable:true` and the Inspector block injected (automatic in dev; in prod only via `self.render(data, true)`), the data script — a JSON literal of `data.page` (the controller's userData, the session card, the environment) — was baked into the layout PRE-compile, cached per view and persisted to `.gina-layout-cache`, so every later request of that view, every other view compiled after it, and every later PROCESS (the file is re-primed only when missing) served request 1's payload — measured on isolated dev + built-prod boots, a restart included; the popin hidden inputs `gina-without-layout-xhr-data` / `-view` were a second pre-compile carrier, and `_lastGinaData` / `/_gina/reveal` / the `inspector#data` stream froze with them (miss-only sinks). Now the pre-compile plugin carries only an HTML-comment marker (`<!--gina:inspector-data-->`, inert to swig and to the #B463 escape contract); both cache paths build the payload AFTER `compiledTemplate(data)` (a module-scope helper taking every render-scoped input as a parameter — the #B60/#B61 shape) and splice the script with the LITERAL per-request nonce ahead of the statusbar body, which reads `window.__ginaData` at load — or drop the marker when the Inspector is not wanted — so cache HITS refresh the sinks too; the hidden inputs are spliced post-execute under the same gates; a stale layout-cache file is healed in place on the next compile-cache miss (persisted data script → marker, persisted inputs dropped; anchored on the framework's own opener forms, idempotent, app-authored tags untouched) and persisted back. Only `__ginaLogs` stays compile-baked (template-form nonce). **`user.view.assets` is the parsed http/2 preload map since #B490 (0.6.28)** — resolved at splice time from the per-template `template.assets` for BOTH the payload and the XHR view input. That map is filled by the compile path and, since #B495 (same release), memoised on the compiled-template cache entry and restored onto each HIT's per-request template clone — the router clones `options` per request, so the map a compile wrote to `localOptions.template` died with that request and a hit resolved `view.assets` to nothing (measured before the memo: present on the miss, absent on the hit). ABSENT under http/1.1, where the http/2 preload block never runs, and for an XHR render only while the compiled-template cache is off — with it on, an XHR request computes the map too, so a view first loaded by XHR never leaves the shared entry empty. **The http/2 `link` preload header rides the same entry (#B495, 0.6.28):** the compile path assembles it once per view through the module-scope, parameters-only `buildH2PreloadLinks(h2Links, assets)` (the former inline loop, lifted verbatim) and memoises it as `cacheObject.h2Link`; a compiled-template cache HIT re-emits it under the compile path's own gates (`!isXMLRequest() && !isCacheless()`). Until 0.6.28 the hit path returned before the block that built the header, so with `server.cache.enable: true` only the FIRST request of a view carried it — measured on isolated prod h2 boots: 270 B of `rel=preload` on request one, none on two and three, while the cache-off control carried it on all three and `early103` was empty in both arms (nothing compensated). An empty `link` header is no longer sent when nothing qualifies. Verify: two GETs of one view with the cache on — both must carry the same `link` header, and the second must carry `view.assets` in the Inspector payload. It had carried the literal placeholder `{assets:"${assets}"}` since 0.6.25 — #B463's brace escape made the layout-level substitution inert and #B464 removed its target from the layout, so the View tab rendered `${assets}` for three releases; the dead substitution is retired with it (#B481). Verify: two GETs of one view with different data — `window.__ginaData.user.data` must track each response, on a cache hit and after a restart. Server-side only: pickup = bundle restart; deleting `.gina-layout-cache` under the bundle's templates root is optional, never required. **The re-point that sends a child template AT that layout-cache file is directive-scoped since #B482/#B484 (0.6.28):** the target used to be substituted by a bare string search for the layout's bare filename over the WHOLE template, so the first occurrence anywhere won — a child naming its layout in a leading comment had the COMMENT rewritten while the directive kept the raw path, and the page then extended the un-assembled layout instead of the assembled copy that carries the injected asset shell. The same extraction was greedy on both quantifiers, so a one-line directive followed by another quoted tag ran the match to the LAST closing delimiter and the quoted-path match to the LAST quote, yielding a corrupted path that matched nothing and skipped the re-point entirely (#B484). Both quantifiers are lazy now and the substitution is spliced inside the matched directive via a module-scope helper using a FUNCTION replacer (a dollar-pattern in the built cache path cannot expand); a later legitimate mention of the same filename elsewhere in the child is left untouched. Server-side ⇒ pickup = bundle restart. **Per-request RESPONSE headers are never stored either (#B1100 + #B1101, 0.7.10):** the three render delegates store `res.getHeaders()` at fill time (before `writeHead`), which held the filling request's `X-Request-Id` and every `Set-Cookie` set before the render (a middleware's, the Csrf plugin's `gina-csrf-token` on every safe GET included, or the action's), and both replay loops wrote them back: every hit answered with the filler's id (an inbound one was REPLACED) and sent the filler's cookies to every later visitor (the session cookie was safe: express-session adds it at `writeHead`). Now `RenderCache.PER_REQUEST_HEADERS` (`set-cookie`, `x-request-id`) names them once: `instance.set()` drops them for every strategy (memory, the fs `.meta` sidecar, the redis L2 value) and both loops skip them via `RenderCache.isPerRequestHeader()`, which also covers entries stored by older releases; the isaac pre-routing hit, which answers before `onInstance`, resolves its own id through a twin of server.js's `_resolveRequestId` (a test pins the two equal). A per-request header found later is one more name in that list, unless it must be recomputed per hit rather than dropped (a list-configured `Access-Control-Allow-Origin`: no `completeHeaders` runs on isaac's hit). Server-side ⇒ pickup = bundle restart. **The loader's per-request values are rendered by swig since #B1131 (0.7.11):** render-swig whispered every `data.page.*` and `data.page.environment.*` value into the assembled layout BEFORE compiling it (the client loader `gina.onload.min.js` carries 18 `{{ page.environment.* }}` placeholders), so with `server.cache.enable: true` (each view compiled once, the layout persisted to `.gina-layout-cache` and read back by every later compile) the first page render after that file was created fixed `hostname`, `webroot`, `culture`, `validatorLabels`, `isProxyHost`, `proxyHost`, `proxyHostname` and a layout's `{{ page.section }}` for every later render of every view sharing the layout, a restarted process included: a forwarded host or prefix sent by that first request reached every visitor (measured on a booted prod bundle; a route's output cache then replays such a page). Now those eight keys (`WHISPER_PER_REQUEST_KEYS`, a frozen module constant in controller.render-swig.js) stay out of the whisper dictionary and swig renders their placeholders from each request's `data.page`, on a compile and on a compiled-template hit alike; swig's autoescape leaves their values byte for byte (host tokens, `[A-Za-z0-9._~/%-]` paths, catalog names, RFC 5987-encoded JSON). Every other key is whispered as before. `getAssets()` (the http/2 preload map) reads a copy of the layout whispered with every key (`_assetsDic`), so its input is unchanged and a layout URL written with `{{ page.environment.webroot }}` keeps its hint. A persisted layout file that carries the loader without its `{{ page.environment.hostname }}` placeholder (written by 0.7.10 or earlier) is re-primed once from the raw layout at the prime decision; a loader-less layout is never re-primed. A NEW per-request value whispered into the layout must join `WHISPER_PER_REQUEST_KEYS`, or it freezes again with the cache on. The route output cache still keys a page on its URL alone, so a cached page keeps the host and culture of the request that filled it until it expires. Server-side ⇒ pickup = bundle restart.
1018
+ 258. **CSP useNonce × server cache (#B130, shipped 0.5.21) — the bootstrap-script nonce is render-time, and cache hits re-mint; since #B464 (0.6.27) the compiled template carries no Inspector payload, and since #B1131 (0.7.11) no per-request loader value.** With `Csp({useNonce:true})` + `server.cache.enable:true`, the framework-injected onGinaLoaded bootstrap `<script>` used to carry a nonce frozen at first compile (baked into the per-view compiled-template cache AND the persisted layout-cache file, which is only re-primed when missing), while the middleware minted a fresh header nonce per request — so header != markup on every later response of a cached route (misses included), breaking enforce-mode CSP. Now: (1) the loader injection is a swig conditional evaluated per execute against `page.cspNonce` (assigned pre-execute on both the compiled-cache-hit and compile branches), so cached compiled templates are nonce-agnostic; (2) stale layout-cache files written by pre-fix builds are normalized in place on the next compile (anchored on the loader's own comment-wrapper idiom + the dev Inspector script openers; idempotent; app-authored tags untouched); (3) output-cache HITS mint fresh per response — both engines' serve paths rewrite the stored CSP header (enforce and report-only) and swap the old nonce values in the stored body (exact-string split/join, base64-safe) without ever mutating the stored entry; the isaac fs read-back buffers instead of streaming only when a re-nonce applies. Verify on a live route: header nonce == every markup nonce AND rotating across responses on miss + hit. Dev/cacheless was never affected (layout re-primed every request). **The same per-view compiled-template cache + persisted layout-cache file also froze the dev Inspector's `window.__ginaData` payload (#B464, fixed 0.6.27):** with `server.cache.enable:true` and the Inspector block injected (automatic in dev; in prod only via `self.render(data, true)`), the data script — a JSON literal of `data.page` (the controller's userData, the session card, the environment) — was baked into the layout PRE-compile, cached per view and persisted to `.gina-layout-cache`, so every later request of that view, every other view compiled after it, and every later PROCESS (the file is re-primed only when missing) served request 1's payload — measured on isolated dev + built-prod boots, a restart included; the popin hidden inputs `gina-without-layout-xhr-data` / `-view` were a second pre-compile carrier, and `_lastGinaData` / `/_gina/reveal` / the `inspector#data` stream froze with them (miss-only sinks). Now the pre-compile plugin carries only an HTML-comment marker (`<!--gina:inspector-data-->`, inert to swig and to the #B463 escape contract); both cache paths build the payload AFTER `compiledTemplate(data)` (a module-scope helper taking every render-scoped input as a parameter — the #B60/#B61 shape) and splice the script with the LITERAL per-request nonce ahead of the statusbar body, which reads `window.__ginaData` at load — or drop the marker when the Inspector is not wanted — so cache HITS refresh the sinks too; the hidden inputs are spliced post-execute under the same gates; a stale layout-cache file is healed in place on the next compile-cache miss (persisted data script → marker, persisted inputs dropped; anchored on the framework's own opener forms, idempotent, app-authored tags untouched) and persisted back. Only `__ginaLogs` stays compile-baked (template-form nonce). **`user.view.assets` is the parsed http/2 preload map since #B490 (0.6.28)** — resolved at splice time from the per-template `template.assets` for BOTH the payload and the XHR view input. That map is filled by the compile path and, since #B495 (same release), memoised on the compiled-template cache entry and restored onto each HIT's per-request template clone — the router clones `options` per request, so the map a compile wrote to `localOptions.template` died with that request and a hit resolved `view.assets` to nothing (measured before the memo: present on the miss, absent on the hit). ABSENT under http/1.1, where the http/2 preload block never runs, and for an XHR render only while the compiled-template cache is off — with it on, an XHR request computes the map too, so a view first loaded by XHR never leaves the shared entry empty. **The http/2 `link` preload header rides the same entry (#B495, 0.6.28):** the compile path assembles it once per view through the module-scope, parameters-only `buildH2PreloadLinks(h2Links, assets)` (the former inline loop, lifted verbatim) and memoises it as `cacheObject.h2Link`; a compiled-template cache HIT re-emits it under the compile path's own gates (`!isXMLRequest() && !isCacheless()`). Until 0.6.28 the hit path returned before the block that built the header, so with `server.cache.enable: true` only the FIRST request of a view carried it — measured on isolated prod h2 boots: 270 B of `rel=preload` on request one, none on two and three, while the cache-off control carried it on all three and `early103` was empty in both arms (nothing compensated). An empty `link` header is no longer sent when nothing qualifies. Verify: two GETs of one view with the cache on — both must carry the same `link` header, and the second must carry `view.assets` in the Inspector payload. It had carried the literal placeholder `{assets:"${assets}"}` since 0.6.25 — #B463's brace escape made the layout-level substitution inert and #B464 removed its target from the layout, so the View tab rendered `${assets}` for three releases; the dead substitution is retired with it (#B481). Verify: two GETs of one view with different data — `window.__ginaData.user.data` must track each response, on a cache hit and after a restart. Server-side only: pickup = bundle restart; deleting `.gina-layout-cache` under the bundle's templates root is optional, never required. **The re-point that sends a child template AT that layout-cache file is directive-scoped since #B482/#B484 (0.6.28):** the target used to be substituted by a bare string search for the layout's bare filename over the WHOLE template, so the first occurrence anywhere won — a child naming its layout in a leading comment had the COMMENT rewritten while the directive kept the raw path, and the page then extended the un-assembled layout instead of the assembled copy that carries the injected asset shell. The same extraction was greedy on both quantifiers, so a one-line directive followed by another quoted tag ran the match to the LAST closing delimiter and the quoted-path match to the LAST quote, yielding a corrupted path that matched nothing and skipped the re-point entirely (#B484). Both quantifiers are lazy now and the substitution is spliced inside the matched directive via a module-scope helper using a FUNCTION replacer (a dollar-pattern in the built cache path cannot expand); a later legitimate mention of the same filename elsewhere in the child is left untouched. Server-side ⇒ pickup = bundle restart. **Per-request RESPONSE headers are never stored either (#B1100 + #B1101, 0.7.10):** the three render delegates store `res.getHeaders()` at fill time (before `writeHead`), which held the filling request's `X-Request-Id` and every `Set-Cookie` set before the render (a middleware's, the Csrf plugin's `gina-csrf-token` on every safe GET included, or the action's), and both replay loops wrote them back: every hit answered with the filler's id (an inbound one was REPLACED) and sent the filler's cookies to every later visitor (the session cookie was safe: express-session adds it at `writeHead`). Now `RenderCache.PER_REQUEST_HEADERS` (`set-cookie`, `x-request-id`; `ratelimit` and `ratelimit-policy` since #B1105) names them once: `instance.set()` drops them for every strategy (memory, the fs `.meta` sidecar, the redis L2 value) and both loops skip them via `RenderCache.isPerRequestHeader()`, which also covers entries stored by older releases; the isaac pre-routing hit, which answers before `onInstance`, resolves its own id through a twin of server.js's `_resolveRequestId` (a test pins the two equal). A per-request header found later is one more name in that list, unless it must be recomputed per hit rather than dropped. **`RateLimit` and `RateLimit-Policy` joined it in 0.7.14 (#B1105):** a hit answers before the router's rate-limit gate, so it is not counted, and every hit used to replay the counted caller's remaining count to later visitors, anonymous ones included; now a hit carries neither. **`Access-Control-Allow-Origin` is recomputed since 0.7.14 (#B1104):** `completeHeaders` picks it per request (a configured comma list → the request's origin when listed, else none; the bundle's own origin → itself; an empty configured value → the request's origin), and every hit used to answer with the value picked for the request that filled the entry. `RenderCache.RECOMPUTED_HEADERS` names it: `instance.set()` never stores it and both loops skip it (`isRecomputedHeader()`, stored entries of older releases included); isaac's pre-routing hit, where no `completeHeaders` runs, then sets the request's own value through `instance._renderCacheAllowOrigin`, which applies `allowOriginFor(request)` — the rule lifted verbatim out of `completeHeaders`, which calls it too, so it is held once; since #B1166 it compiles no pattern from the request (a malformed `Origin` or `Host`, or no `Host` at all, made it throw, and on a static file the throw stopped the bundle), an HTTP/1.1 request without an `Origin` takes the configured scheme, both callers send none when it throws (a configured value that is not a string), and #B1167 resolves a `{bundle@project}` token in a configured value only, never in the request's own origin — and `serveRenderCacheHit` keeps the value `completeHeaders` set for the request in `handle()` before the hit. Server-side ⇒ pickup = bundle restart. **The loader's per-request values are rendered by swig since #B1131 (0.7.11):** render-swig whispered every `data.page.*` and `data.page.environment.*` value into the assembled layout BEFORE compiling it (the client loader `gina.onload.min.js` carries 18 `{{ page.environment.* }}` placeholders), so with `server.cache.enable: true` (each view compiled once, the layout persisted to `.gina-layout-cache` and read back by every later compile) the first page render after that file was created fixed `hostname`, `webroot`, `culture`, `validatorLabels`, `isProxyHost`, `proxyHost`, `proxyHostname` and a layout's `{{ page.section }}` for every later render of every view sharing the layout, a restarted process included: a forwarded host or prefix sent by that first request reached every visitor (measured on a booted prod bundle; a route's output cache then replays such a page). Now those eight keys (`WHISPER_PER_REQUEST_KEYS`, a frozen module constant in controller.render-swig.js) stay out of the whisper dictionary and swig renders their placeholders from each request's `data.page`, on a compile and on a compiled-template hit alike; swig's autoescape leaves their values byte for byte (host tokens, `[A-Za-z0-9._~/%-]` paths, catalog names, RFC 5987-encoded JSON). Every other key is whispered as before. `getAssets()` (the http/2 preload map) reads a copy of the layout whispered with every key (`_assetsDic`), so its input is unchanged and a layout URL written with `{{ page.environment.webroot }}` keeps its hint. A persisted layout file that carries the loader without its `{{ page.environment.hostname }}` placeholder (written by 0.7.10 or earlier) is re-primed once from the raw layout at the prime decision; a loader-less layout is never re-primed. A NEW per-request value whispered into the layout must join `WHISPER_PER_REQUEST_KEYS`, or it freezes again with the cache on. Up to 0.7.13 the route output cache keyed a page on its URL alone, so a cached page kept the host and culture of the request that filled it until it expired; since 0.7.14 the key carries the request's variant (#B1132, see the render/output cache entry). Server-side ⇒ pickup = bundle restart.
1019
1019
 
1020
1020
  259. **Server-side error responses strip stack traces outside local scope — the engine-level throwError sanitizes centrally; the full stack goes to the server log (2026-07-20, 0.5.21).** Two throwError implementations exist: the controller-side one (scope-gated since 0.5.x — it strips the `stack` FIELD outside local scope) and the SERVER-side engine-attached one, whose feeders (router action/middleware catches, server internals) flatten `err.stack` INTO the message string — so non-local 500 bodies used to carry absolute framework paths + stack frames in the JSON `error` field, the inline HTML error fallback, and custom-error page data. The server-side throwError now detects a stack-bearing message (`/\n\s+at\s/`, the V8 frame format) outside local scope, logs the FULL text server-side, and ships only the message line; an object msg has `.stack` logged then stripped off a clone (the caller's object is untouched). Local scope is byte-identical — the dev toolbar reads the stack off the wire. The gate reads the same NODE_SCOPE_IS_LOCAL env var as the controller-side gate (set once at bootstrap), deliberately NOT the config-derived per-bundle scope flag: that flag derives from the project's DEFAULT scope and can lag a boot started with an explicit NODE_SCOPE/--scope. Siblings fixed with it: the JSON render delegate's HTTP/1.1 reason-phrase catch ships `err.message` (a multi-line reason phrase is invalid on the HTTP/1.1 status line — Node rejects the write), and the cached-file stream error path ships message-only. Consumers who relied on wire stacks for service-to-service debugging keep them on LOCAL scope only; everywhere else the server log carries the diagnostic.
1021
1021
 
@@ -1042,7 +1042,7 @@ Dev-mode query instrumentation captures every database query tied to the current
1042
1042
  275. **The `controller:` CLI group — `add` scaffolds, `remove`/`rm` reference-awarely deletes, `rename` reference-awarely renames a namespace controller (#R9, 2026-07-23).** `gina controller:add <name> <bundle> @<project> [--controls=a,b,c] [--api|--views]` — a new OFFLINE CLI group (`lib/cmd/controller/`, registered in `bin/cli` allowedOffline; a develop install serves the verb immediately, npm consumers from 0.5.25). Generates `controllers/controller.<name>.js` with one JSDoc'd action stub per `--controls` entry (omitted → a single `default` action — the `core/template/boilerplate/bundle_namespace` seed's own action name). Bundle FLAVOR auto-detected via `config/templates.json` presence (config.js's `hasViews` signal, offline-readable without a boot): a VIEW bundle → `self.render()` stubs + one template per action at `templates/html/<name>/<action>.html`; an API-only bundle → `self.renderJSON()` stubs, no templates. `--api`/`--views` force it (both → error). Route wiring is PRINT-ONLY: prints paste-ready rules keyed `<name>-<action>` carrying `namespace` + `param.control`, and for a VIEW rule an explicit `param.file: "<action>"` — render-swig.js:364-383 strips a `<namespace>-` prefix from a DEFAULTED `param.file` (which equals the rule name) and emits a per-request "does not respect gina naming convention" WARN, so the explicit file resolves `templates/html/<ns>/<action>.html` warn-free (the boilerplate `homepage` rule sidesteps it with a non-prefixed name); the `default` action's URL is the namespace root `/<name>`, else `/<name>/<action>`. Refuses an existing `controller.<name>.js` (no `--force` overwrite — remove it first), and validates the namespace charset `/^[a-z][a-z0-9_]*$/i` BEFORE any path build (`controller` reserved case-insensitively; the value is interpolated into file paths, a RegExp and a JS class name, so a loose value is an injection vector). Positionals come from the group's own pure `inc/args.js` parser (`opt.argv.slice(3)` minus `@project`/`--flags`) — CmdHelper's clean positional cleanup is `bundle:`-ONLY (helper.js:482), so `self.bundles` for any other topic is contaminated with the project's OTHER bundles and cannot be read for `<name> <bundle>`. Pure `inc/` helpers (`namespace` charset+className, `scaffold` parseControls/buildRules/formatRulesBlock/renderController/renderTemplate, `args` positionals) are require-by-path unit-tested behaviourally; the paste-ready report prints via flush-safe `fs.writeSync(1, …)` (the connector:infer precedent — a `console.log`/`process.stdout.write` before `process.exit` truncates on a pipe). Boot-verified end-to-end in an isolated home: the scaffolded view controller serves HTTP 200 with the rendered body and NO naming-convention warn. Tests: `test/lib/controller-add.test.js` (38). **`controller:remove <name> <bundle> @<project> [--dry-run] [--force] [--format=json]`** (alias `controller:rm` = `module.exports = require('./remove')`) is REFERENCE-AWARE: a namespace with no matching `controller.<name>.js` doesn't error — `router.js:521-525` WARNs and silently falls back to the default `controller.js` (a misdispatch), so a bare delete is unsafe. The pure `inc/reference-scan.js` (node `fs`/`path` only, no framework globals) scans the four measured reference sites — the controller file, routing.json rule-level `namespace` AND `param.namespace` (both load a controller; the body is comment-stripped with a STRING-AWARE regex so a `$schema` URL survives, and non-object entries are skipped like `config.js:2029`), and `requireController('<name>')` literals (both quote styles) across the bundle's `.js` tree — then REFUSES with a per-file blocker list unless clean (routing rules + external `requireController` calls block; a self-reference inside the file being deleted is moot). Clean → interactive readline yes/no (the `view:add` idiom; a non-TTY stdin aborts, naming `--force`/`--dry-run`) → deletes the controller file + its `templates/html/<name>/` tree. It NEVER edits routing.json. `--force` deletes the file+templates even with blockers (listing what remains to clean by hand), `--dry-run` previews, `--format=json` emits an envelope (`{controllerFile,templateDir,routingRefs,requireRefs,dynamicRefs,blocking,removable,removed}`) and deletes only with `--force`. Dynamic references a static scan cannot resolve (`param.namespace` `:variable`, non-literal `requireController(expr)`) are surfaced as an ADVISORY note, never silently cleared. The default `controller.js` can never be removed (`controller` is reserved). Deletion-plan file counts are taken BEFORE the delete. Tests: `test/lib/controller-remove.test.js` (34). **`controller:rename <old> <new> <bundle> @<project> [--dry-run] [--force] [--format=json]`** reuses the scanner + adds the pure `inc/reference-rewrite.js` (also fs/global-free): it moves `controller.<old>.js` → `controller.<new>.js`, moves `templates/html/<old>/`, and rewrites the old namespace at the two ANCHORED sites — routing.json `"namespace": "<old>"` VALUES (rule-level AND param.namespace; a QUOTED-STRING-anchored `replace`, NOT a JSON parse→stringify, so comments/ordering/whitespace survive byte-for-byte, and a substring like `checkout2` or a `:variable` value is never matched) and every `requireController('<old>')` literal (both quote styles, spacing preserved). Unlike `remove`, rename DOES edit routing.json (only those values). A full plan is shown, then an interactive readline confirm (non-TTY aborts naming `--force`); apply is ALL-OR-NOTHING — snapshot every write+move, roll back on any failure. `--force` applies without the prompt, `--dry-run` previews, `--format=json` emits an envelope and applies only with `--force`. Residuals it REPORTS-not-rewrites: `:variable`/non-literal dynamic refs and the cosmetic `<Bundle><Namespace>Controller` class name (gina loads by file path, so it is a label, not a reference). Target collision (`controller.<new>.js` or `templates/html/<new>/` exists) hard-refuses — no overwrite. Tests: `test/lib/controller-rename.test.js` (18).
1043
1043
 
1044
1044
  276. **Worker-global proxy-context poisoning by port-less internal calls — the `getUrl`/`url` template filters, the cross-bundle redirect-by-URL target and the error-fallback redirect now prefer the emitting request's own classification; opt-in `server.proxy.requireForwardedHeaders` makes classification deterministic (#B152).** A request whose inbound Host carries no `:port` is classified reverse-proxied (the first arm of the per-request classification, both engines) and REFRESHES `process.gina.PROXY_HOST`/`PROXY_HOSTNAME` — but a port-less Host is also what an internal call addressed by service/DNS name carries (a container health probe on an app route — only `/_gina/health/check` itself, `$`-anchored, bypasses the classification block — a mesh hop, a sibling-bundle request), so ONE such call repointed every later worker-global read at the internal host: both `getUrl` filter branches (the path/bundle-override `hostname` composition AND the post-`getRoute` `proxy_hostname` override feeding `toUrl()`), the redirect-by-URL `getRoute(path).toUrl()` branch, and `throwError`'s route-object fallback. On a proxy-less fresh worker the same call CREATES proxy mode permanently (the composite latch arms once the global exists). Fixed server-side, NO dist rebuild (`getUrl` is not browser-bundled — the dist's `getUrl` hits are `getUrlProps`, a substring artifact): all four readers prefer THIS request's per-request slots (`req._ginaIsProxyHost` strict-`=== true` + `req._ginaProxyHostname`) over the worker-global, which stays the fallback for renders with no request of their own — a raw victim resolves the config host despite the latch, a proxied victim emits its own host, a slot-less caller is byte-identical; `core/router.js` fills the slots when ABSENT so the Express engine (which never set them) gets per-request truth engine-agnostically, isaac's earlier identical classification always winning. The opt-in key (settings.json + published schema; strict boolean, fail-safe false, boot-resolved once, `console.info` when armed) disables the port-less heuristic so ONLY X-Forwarded-Host classifies as proxied — the one mechanism that also protects req-less renders; enable it only behind a front proxy that always sends X-Forwarded-Host. Two mechanism corrections vs the field report that surfaced this: `PROXY_PORT` is boot-static (never request-refreshed; the boot scheme-switch forces it to 80/443, clobbering any proxy.json-hostname port), so a nonstandard port in an emitted URL comes from the victim request's OWN normalized `headers.port`/`[':port']`, never the poisoner; and moving container probes off `/_gina/health/check` onto app routes is what acquires the bug — nothing signals it. Pickup: restart (server-side only). Tests: `test/core/proxy-request-scope.test.js` (44, incl. a real `getRoute`/`toUrl` subtract reproducing the internal-host emission pre-fix). **Falsy proxy-host state degrades the URL builder, never crashes it (former #291, #B168, 0.6.0):** server-side `getRoute()` resolves `route.proxy_hostname` from the worker global with an envConf fallback, and BOTH are framework-produced falsy states (the global is boot-set only from a proxy config carrying a hostname and otherwise first written by a proxied request; the envConf fallback is deliberately written null for a direct-classified render) — with the worker-wide proxied latch true and both unset, the unguarded rewrite threw `TypeError: Cannot read properties of null (reading 'replace')` on EVERY server-side `getRoute()` while the state lasted: URL building for mail/workers, redirects and health checks alike (observed live: 72 identical failures through a readiness probe, healing in-process once a later render rewrote the envConf fallback). The truthiness guard falls back to the route's direct hostname AND flips `route.isProxyHost` false — `toUrl()` keys on that flag, so a bare skip would stringify the unset value into the emitted URL, converting a loud crash into silently wrong links; a once-per-process warning names the degraded state. The `url` template filters hold `getRoute()`'s own resolution and degrade only when nothing resolved anywhere (their per-request override used to re-force the flag with an unresolved value in slot-less renders, undoing the fix — and replacing a usable envConf-derived value with an unset one); the non-proxied branch's gate requires TRUTHY (the old `typeof` admitted a defined-but-falsy global — typeof null is 'object'). Browser bundle changed (`lib/routing` ships in it) with zero client behavior change — the client arm resolves from `window.location`, which cannot be unset. Rule: a framework-produced falsy state must DEGRADE the builder, and the degrade must flip the flag downstream code keys on. **#B367 (0.6.8) — those same headers are now VALIDATED WHERE THEY ARE READ, because until 0.6.8 they reached the browser unescaped and were a reflected-XSS vector.** `X-Forwarded-Host`, `X-Forwarded-Proto`, `X-Forwarded-Prefix` and the caller's own `Host`/`:authority` feed `page.environment.hostname` / `.webroot` / `.proxyHost` / `.proxyHostname`, which the client bootstrap (`gina.onload.min.js`) carries in SINGLE-QUOTED JS string literals (`hostname:'{{ … }}'`, `window.__ginaWebroot='{{ … }}'`). The substitution is `whisper(dic, layout, /\{{ ([a-zA-Z.]+) \}}/g)` — whisper's rule branch is `replaceable.replace(rule, (s,key) => dictionary[key] || s)`, a RAW splice that escapes nothing — and the loader is injected AFTER template compilation precisely so the engine never sees those tokens. So a single quote in one header closed the literal and executed attacker script on every rendered page, unauthenticated (reproduced live over HTTP on both the host and prefix vectors). The guard is at INGEST, not emission, and that choice is load-bearing: whisper runs over the WHOLE layout, so the same dictionary also feeds HTML contexts where a JS-string escape would emit literal backslashes; and the sibling values already safe (`forms`, `routing`, `validatorLabels`) use `encodeRFC5987ValueChars` + a client `decodeURIComponent`, so extending that pattern would have changed the browser bundle and billed every consumer a re-bake for a server-side flaw. A host must be `name[:port]` or a bracketed IPv6 literal (`/^[A-Za-z0-9._:\[\]-]+$/`, ≤255), a forwarded scheme must be exactly `http`/`https`, a prefix must be URL-path characters; anything else is REFUSED and the request falls back to the bundle's configured host/webroot as if the header were absent — including the classification itself, so a malformed `X-Forwarded-Host` no longer marks the request proxied. The guard is TWINNED in `core/server.isaac.js` and `core/router.js` (the same deliberate twinning as the classification above) and a test pins the two character classes EQUAL, because a drift makes one engine exploitable again. Known consequence: a comma-separated `X-Forwarded-Host` (chained proxies) now fails the guard and falls back — pre-fix it produced `scheme://a.example, b.example`, i.e. already garbage; splitting the list is deliberately NOT done, since element 0 is the original client's own value and taking it would reopen the vector, and any other element needs a trusted-hop count the framework does not have. Server-side only ⇒ pickup is a bundle RESTART, no re-bake. ⚠️ **Field reachability (consumer-reported 2026-08-15, and it INVALIDATED our own published check): `X-Forwarded-Prefix` is the header that actually exposes people, and the obvious audit question misses it.** We had told operators to ask whether their proxy SETS the `X-Forwarded-*` headers from its own knowledge or FORWARDS what the client sent. That question is a FALSE-NEGATIVE GENERATOR: a conscientious edge config sets `Host`/`X-Forwarded-Host`/`X-Forwarded-Proto`/`X-Forwarded-For` and never MENTIONS `X-Forwarded-Prefix` (a mount path is a concern most deployments never set deliberately), and nginx forwards any header it does not explicitly override — so the prefix travels verbatim while the other three are correctly replaced, and the operator answers "we overwrite them, we're fine" and is WRONG. Reported on a two-layer nginx topology (both layers setting Host + proto, outer setting X-Forwarded-Host, NEITHER naming the prefix — measured 0 with firing controls). **Verified first-hand here at the `v0.6.7` tag: the prefix block's only enclosing scope is `server.on('request', …)` — there is NO proxy-classification gate on it at all**, so the prefix is accepted whether or not the request counts as proxied, and correctly overriding `X-Forwarded-Host` cannot close it; the gap is sufficient alone. Ask the question PER HEADER ("is `X-Forwarded-Prefix` named in this config?") at EVERY layer, never as a blanket `X-Forwarded-*` question. Rule: a request header that will be interpolated into a client-side script is untrusted input at the READ site, and the cheapest correct place to reject it is where it enters — not where it is emitted. Second rule, from the reachability miss: when you hand operators a check for whether a flaw can reach them, make it name EACH input separately — a check phrased over a family of headers silently assumes the proxy treats the family uniformly, and proxies do not. **#B1129 (0.7.11) — the charset alone did not make the prefix a PATH:** a value opening with two slashes passed `^[A-Za-z0-9._~\/%-]*$`, and the webroot composed from it (`//evil.example/<webroot>/`) is protocol-relative, so the browser fetched `_gina/assets/routing.json` (and the gina stylesheet when not already linked) from that host and the client built its route URLs from the table it served; the isaac prefix block now refuses a value whose first two characters are slashes, like a malformed one (`//` alone was already dropped by the trailing-slash trim). Third rule: a value that becomes the START of a URL is checked for what a URL parser reads there (`//` opens an authority), not only for its character set. **#B502 (0.6.28) — the LAST req-less reader now resolves per request, and the router twin stops rewriting the worker-global from direct requests.** Everything above re-pointed the framework's OWN callers; an APPLICATION-level `getRoute(…).toUrl()` — the form this file documents — still resolved from `getContext('isProxyHost')` (a latch that arms the moment any request writes `process.gina.PROXY_HOSTNAME` and never resets) plus that global. Measured on isolated two-bundle scenes: after ONE port-less-Host request, every later DIRECT request's `toUrl()` lost its port on an http/1.1 bundle (`http://127.0.0.1/web/echo/3` for a bundle on `localhost:9940` — isaac strips the port from `headers.host` BEFORE the router twin re-classifies, so every direct isaac request re-wrote the globals from the stripped host) and, on an http/2 + https bundle, emitted the LAST port-less client's host verbatim (`http://evil.example/…` after one `Host: evil.example` — attacker-choosable, and the shape a field report described). Fix in three parts: `server.js handle()` enters `process.gina._reqALS` on EVERY request in every log mode (#M12b had it JSON-only) with a `proxy` slot; `core/router.js` fills the slot from THIS request's stamps right after the engine-agnostic classification; `lib/routing getRoute()` reads the store FIRST and keeps the latch + worker-global only for req-less callers (boot, CLI, cron — no store). The router twin's `proxyReqIsProxied` now defers to an existing isaac stamp (the pre-strip truth), so direct requests no longer rewrite the worker-global; isaac's port-less scheme chain matches the twin's (X-Forwarded-Proto, then PROXY_SCHEME, then the bundle scheme). Both logger readers stay JSON-gated, so text mode gains only the ALS enter. `requireForwardedHeaders` closes the port-less-Host path only on earlier versions — the classification's `X-Forwarded-Host` term is ungated on both engines (`server.isaac.js:2188-2192`, router twin), so a client with direct reach could still supply the host; the complete interim was a proxy overriding both headers. `lib/routing` is browser-bundled ⇒ pickup is a bundle RESTART **and a re-bake** — the only dist hunks are the server branch's three lines and the client branch is byte-identical, so the re-bake keeps bundle-freshness honest and changes no client behaviour. Residual, by design: `PROXY_SCHEME` is the PROJECT's `def_scheme` (gna.js), so with no `X-Forwarded-Proto` an https bundle in an http-default project still stamps `http://` on both twins (#B506, LOW). Tests: `test/core/proxy-context-b502.test.js` (source pins on all three parts + a real-ALS replica of the resolution rule; red-first 6/4 on the pre-change source). **#B511 (0.6.29) — a path-form `getUrl` route containing `@` no longer 500s the render (both engines).** The swig and nunjucks `getUrl` filters split any `@`-bearing route as `rule@bundle` BEFORE testing whether it was a path, so `'/assets/img/common/header@2x.png' | getUrl` — the retina idiom the filter's own comment cites — became rule `/assets/img/common/header` @ bundle `2x.png`, failed the bundle lookup and called `throwError(500)` mid-template; `throwError` RENDERS (it never throws), the site is outside the filter's routing try, and nothing returns after it, so the page answered 500 while the action's own render was discarded by the released-response guard (measured live on an isolated prod boot: 500 → 200 with the extension intact after the fix, on swig and on a bare-template nunjucks scene). The guard adds one term to the split's condition — a route starting with `/` is a path, never a rule reference — at both sites. Unchanged: `'rule@bundle'` still splits, a passed base still wins over the in-string form, and a path that needs another bundle's host passes it as the base argument (`| getUrl(null, 'web')`) — the only form one measured consumer corpus used (zero bare calls). Disclosed consequence: a path-form route cannot name a bundle in-string. Neither filter lib is browser-bundled (`build.json` 0/0) ⇒ pickup = bundle RESTART, no re-bake. Tests: `test/lib/geturl-b511.test.js` (per-engine source pins incl. the guard's position BEFORE the path branch — the ordering IS the defect — and a predicate lifted from each engine's shipped condition, with the pre-fix decision as the subtract control). Generalises: a soft-failing filter can still hard-fail through a render-side `throwError` reached before its own try — pin the ORDER of the guards, not just their presence. **#B516 (0.7.4) — a `getUrl` call in a render context with no request, or with no bundle configuration, degrades instead of throwing (both engines).** Every rule form (a bare rule gets the current bundle as its base) and every path with a bundle base runs a branch that read `ctx.req.headers` unguarded, and `ctx.options.conf` was read before it. So a context built outside a request — an application's mail or scheduled-task renderer calling the filter factory itself with `{ options, isProxyHost }` — threw `TypeError … reading 'headers'`, and a context with no `options.conf` (the boot registration, an async delegate's context-free registration) threw on every form, a plain path included. `getUrl` now builds a request-shaped VIEW of such a context — empty headers, the context's method (else GET), the current bundle's conf from the Config registry — and leaves every downstream line as it was, so a request render is byte-identical and the caller's context object is never written. A request-less rule form resolves through `getRoute()`'s own req-less chain; a path with a bundle base takes the worker's proxy host when one is known, else the bundle's configured hostname; an unknown port is never appended (`:NaN`) and an unresolvable proxy host is never stringified (`scheme://undefined`). Two cases throw a named `Error`: an unknown bundle when the context has no `throwError`, and no bundle configuration anywhere. Neither filter lib is browser-bundled ⇒ pickup = bundle RESTART, no re-bake. Tests: `test/lib/geturl-requestless-b516.test.js` (real modules, both engines; 16 of the 18 arms per engine are red on the pre-fix bytes).
1045
- 277. **Render/output cache — pluggable backends, release-namespaced keys, event invalidation, flush, Cache-Status (consolidates former #234/#235/#237/#238/#242/#244; 0.5.18–0.5.22).** The framework caches rendered responses under two key namespaces — `static:` HTML + `data:` JSON — in the multi-purpose server Map (which ALSO holds `swig:` compiled templates + `http2session:` sessions: every bulk operation scopes to the output namespaces ONLY). CONFIG: bundle-wide defaults on `server.cache` (`enable` is the hard gate for writer AND reader; plus `path`/`ttl`/`sliding`/`maxAge`); `type`/`store` come from the bundle `config/settings.json` top-level `cache` block, folded into the runtime `server.cache` at config-load (env.json keys win; without the fold the documented default was inert). **Where `server.cache` is set — measured (#B744): `settings.server.cache.<env>.json` > `settings.json` `server.cache` > the project `env.json` `<bundle>.<env>.server.cache` > the framework template (`enable:false`, `ttl:3600`, `path:${cachePath}`, `sliding:false`, `maxAge:0`, `maxEntries:1000`); those six keys are INERT in the top-level `cache` block (the fold is fill-only and runs after the template filled them), and since 0.7.4 the boot warns per such key found there, naming `server.cache` (`RenderCache.inertTopLevelKeys`; the schema marks them deprecated at that place). A whole-settings `settings.<env>.json` is merged at the top level and wins over `settings.json` since 0.7.4 (#B784 — the section was derived prefix-first, so it nested under a `<env>` key); the general form is `settings[.<section>][.<env>].json`.** per-route via a routing.json rule's top-level `cache: {…}` with FILL-only inheritance — a per-route value always wins, and a route that sets `type` at all keeps it (only an OMITTED `type` inherits the bundle default). STRATEGIES: `memory` (inline content); `fs` (body file + a `.meta` sidecar carrying created/ttl/sliding/maxAge/headers/events; restart READ-BACK on an index miss with ABSOLUTE expiry preserved — a restart never extends a TTL; pure-sliding read-back counts as a fresh access, a documented imprecision; **since 0.7.4 isaac roots the read-back at the WRITER's `server.cache.path`, stamped `server._cachePath` at init (#B785 — it used the top-level infra `cachePath`, equal only by default, so a custom path missed every entry after a restart), and `cache:clear`'s offline reclaim resolves the same root offline via `RenderCache.resolveCacheRoot` (sub-file > settings.json > env.json > default)**); `redis` two-tier (L1 = the in-process Map written synchronously; L2 = shared redis via fire-and-forget `PSETEX` — the response never waits; `warm()` repopulates L1 with the AUTHORITATIVE remaining PTTL and re-registers the route's events so a warmed entry stays evictable; fail-open with one once-per-process warn + a 1s `commandTimeout` so a blackholed socket cannot hang the render hot path; a graceful shutdown leaves L2 INTACT — peer replicas and the restarting replica warm from it; every redis route needs a ttl or `invalidateOnEvents` — boot-enforced fail-fast, with proportionality: an `enable:false` bundle never opens a connection and would-be-fatals downgrade to loud warns). KEYS: one `buildKey` owns `[<token>:]<kind>:<bundle>:<url>` at every writer AND reader (the format was previously duplicated at 4 sites and drifted); the token (`GINA_CACHE_NAMESPACE || GINA_VERSION`, sanitized) release-namespaces every cache so a framework upgrade auto-invalidates, and the token is ALSO an fs PATH segment — a measured requirement, not cosmetics: with the token only in the key, a namespace change reused the same file path and read-back served stale cross-namespace bytes. EVENTS: routes register `cache.invalidateOnEvents`; fire from a controller via `self.cache.invalidateByEvent(event)` (a deliberately NARROW facade — it never exposes `from()`/`set()`, and reaches the OWN process only) or cross-bundle via `gina cache:clear @<project> --event=<name>` / `POST /_gina/cache/clear?event=<name>`; TTL/sliding expiry runs the SAME eviction as an explicit delete (cleanup fns fire + registrations reclaim), and fs/redis persistence re-registers events on read-back/warm. FLUSH: the CLI runs the offline fs reclaim FIRST (works with the bundle down; reclaims prior-release orphan dirs; never touches the reserved `config`/`swig` infra-cache dirs) then the in-heap endpoint (admin-gated, POST-only — a flush is a mutation a prefetch must not fire; `event` WINS over `bundle`); `--dry-run` previews the fs set + probes reachability read-only and deliberately claims NO count. READ PATH: engine-agnostic in the shared request handler (express included — previously isaac-only), so a fresh replica's FIRST GET can serve a peer replica's write; every hit carries RFC 9211 `Cache-Status: <name>; hit; ttl=N; detail=memory|redis|fs` (naming the physical tier that served the bytes) and every genuine miss `<name>; fwd=uri-miss` — `<name>` = `server.cache.name` when set to a valid token (#B238: a letter then up to 63 of `[A-Za-z0-9._-]`, a conservative RFC 8941 subset; an invalid value boot-warns and falls back), else the default `gina-cache`, resolved ONCE at boot (server.js stamps `instance._cacheName`; all mint sites on both engines read the stamp, so the identifier cannot disagree across engines or hit/miss) — and when `server.hidePoweredBy` is true + the cache enabled + no name set, boot warns that the wire still names the framework (warn-not-flip: the identifier is a documented-stable wire value — set any token e.g. `cache` to close the disclosure, or explicit `gina-cache` to silence); cached routes re-mint CSP nonces on hits (#B130 — header + body, stored entries never mutated). **The miss-path `Cache-Control: <visibility>, max-age=<ttl>` (#C6) rides the write's own gate since 0.7.4 (#B744): `server.cache.enable === 'true'` + GET + a route `cache`, at all four delegate sites (swig ×2, json, nunjucks) — with the switch off no header goes out (until 0.7.3 it went out whatever the switch, dev included, so a browser reused a route's response for its whole ttl while the server stored nothing); `visibility` (`private` default | `public`) is a per-route `cache` key.** **A gated route is never cached** — pairing `cache` with `param.requireAuth`/`roles`/`policy` (or leaving it mode-gated) REFUSES the boot, and the delegates skip the write regardless: the key carries no principal and both serve points precede the authorization gate (#B158). Server-side only — none of this ever needs a dist rebuild. Tests: `test/lib/render-cache.test.js`, `test/core/server-render-cache-read.test.js`, `test/core/server-render-cache-boot.test.js`, `test/lib/cache-clear.test.js`, `test/core/render-cache-control-b744.test.js`, `test/core/render-cache-top-level-warn-b744.test.js`, `test/core/server-render-cache-readback-b785.test.js`, `test/core/config-settings-env-file-b784.test.js`; consumer guide: the docs-site caching guide. Since 0.7.1 the isaac PRE-ROUTING read runs only while `server.cache.enable` is on (the phase-2 per-request trims, slice H) — parity with the writers and the express-side read; an entry left on disk by a run that had caching enabled is no longer served while it is disabled. **#B750 (fixed for 0.7.2):** `serveRenderCacheHit`'s HTTP/2 branch assigned `res.headersSent = true` after `stream.end()` — `headersSent` is a getter-only accessor on BOTH Node response classes (it already reports a raw send), so in strict-mode server.js the assignment threw a TypeError after the body went out: every redis L2 warm over HTTP/2 (`detail=redis`) logged an unhandled rejection and lost its access line. Never assign `headersSent`; the same fix removed four strict-mode siblings (render-nunjucks HEAD and body over HTTP/2, render-xml over HTTP/2 and HTTP/1.1). A fake response with a plain writable `headersSent` cannot reproduce the throw, which is why the suites missed it: test on a real `Http2ServerResponse`. Tests: `test/core/h2-raw-send-b749-b750.test.js`.
1045
+ 277. **Render/output cache — pluggable backends, release-namespaced keys, event invalidation, flush, Cache-Status (consolidates former #234/#235/#237/#238/#242/#244; 0.5.18–0.5.22).** The framework caches rendered responses under two key namespaces — `static:` HTML + `data:` JSON — in the multi-purpose server Map (which ALSO holds `swig:` compiled templates + `http2session:` sessions: every bulk operation scopes to the output namespaces ONLY). CONFIG: bundle-wide defaults on `server.cache` (`enable` is the hard gate for writer AND reader; plus `path`/`ttl`/`sliding`/`maxAge`); `type`/`store` come from the bundle `config/settings.json` top-level `cache` block, folded into the runtime `server.cache` at config-load (env.json keys win; without the fold the documented default was inert). **Where `server.cache` is set — measured (#B744): `settings.server.cache.<env>.json` > `settings.json` `server.cache` > the project `env.json` `<bundle>.<env>.server.cache` > the framework template (`enable:false`, `ttl:3600`, `path:${cachePath}`, `sliding:false`, `maxAge:0`, `maxEntries:1000`); those six keys are INERT in the top-level `cache` block (the fold is fill-only and runs after the template filled them), and since 0.7.4 the boot warns per such key found there, naming `server.cache` (`RenderCache.inertTopLevelKeys`; the schema marks them deprecated at that place). A whole-settings `settings.<env>.json` is merged at the top level and wins over `settings.json` since 0.7.4 (#B784 — the section was derived prefix-first, so it nested under a `<env>` key); the general form is `settings[.<section>][.<env>].json`.** per-route via a routing.json rule's top-level `cache: {…}` with FILL-only inheritance — a per-route value always wins, and a route that sets `type` at all keeps it (only an OMITTED `type` inherits the bundle default). STRATEGIES: `memory` (inline content); `fs` (body file + a `.meta` sidecar carrying created/ttl/sliding/maxAge/headers/events; restart READ-BACK on an index miss with ABSOLUTE expiry preserved — a restart never extends a TTL; pure-sliding read-back counts as a fresh access, a documented imprecision; **since 0.7.4 isaac roots the read-back at the WRITER's `server.cache.path`, stamped `server._cachePath` at init (#B785 — it used the top-level infra `cachePath`, equal only by default, so a custom path missed every entry after a restart), and `cache:clear`'s offline reclaim resolves the same root offline via `RenderCache.resolveCacheRoot` (sub-file > settings.json > env.json > default)**); `redis` two-tier (L1 = the in-process Map written synchronously; L2 = shared redis via fire-and-forget `PSETEX` — the response never waits; `warm()` repopulates L1 with the AUTHORITATIVE remaining PTTL and re-registers the route's events so a warmed entry stays evictable; fail-open with one once-per-process warn + a 1s `commandTimeout` so a blackholed socket cannot hang the render hot path; a graceful shutdown leaves L2 INTACT — peer replicas and the restarting replica warm from it; every redis route needs a ttl or `invalidateOnEvents` — boot-enforced fail-fast, with proportionality: an `enable:false` bundle never opens a connection and would-be-fatals downgrade to loud warns). KEYS: one `buildKey` owns `[<token>:]<kind>:<bundle>:[<variant>:]<url>` at every writer AND reader (the format was previously duplicated at 4 sites and drifted); **the variant (#B1132, since 0.7.14) is `v` + 32 hex of SHA-256 over `<scheme>://<host>|<prefix>|<culture>` — a proxied request's public origin, its `X-Forwarded-Prefix` and the culture its culture cookie or Accept-Language selects, compared as written (`fr` and `fr_FR` are two entries) — stamped ONCE per request as `req._ginaCacheVariant` before any read (isaac right before its pre-routing read; a slot-less engine, Express, first thing in the shared read, deriving the host from the headers as router.js will), and every writer RECOMPUTES it from the page's own values (`RenderCache.storableVariant`) and REFUSES a mismatch (a URL-prefix or middleware culture the headers do not select, a merged-mode direct host, a request its engine never classified) — the #B158 / #SPA1 idiom; it is also an fs PATH segment under the release token, and `/_gina/cache/stats` lists each entry's readable `variant`. Up to 0.7.13 the key was the URL alone: the filling request's host (in `getUrl()` links and form actions too), webroot and culture reached every visitor until the entry expired**; the token (`GINA_CACHE_NAMESPACE || GINA_VERSION`, sanitized) release-namespaces every cache so a framework upgrade auto-invalidates, and the token is ALSO an fs PATH segment — a measured requirement, not cosmetics: with the token only in the key, a namespace change reused the same file path and read-back served stale cross-namespace bytes. EVENTS: routes register `cache.invalidateOnEvents`; fire from a controller via `self.cache.invalidateByEvent(event)` (a deliberately NARROW facade — it never exposes `from()`/`set()`, and reaches the OWN process only) or cross-bundle via `gina cache:clear @<project> --event=<name>` / `POST /_gina/cache/clear?event=<name>`; TTL/sliding expiry runs the SAME eviction as an explicit delete (cleanup fns fire + registrations reclaim), and fs/redis persistence re-registers events on read-back/warm. FLUSH: the CLI runs the offline fs reclaim FIRST (works with the bundle down; reclaims prior-release orphan dirs; never touches the reserved `config`/`swig` infra-cache dirs) then the in-heap endpoint (admin-gated, POST-only — a flush is a mutation a prefetch must not fire; `event` WINS over `bundle`); `--dry-run` previews the fs set + probes reachability read-only and deliberately claims NO count. READ PATH: engine-agnostic in the shared request handler (express included — previously isaac-only), so a fresh replica's FIRST GET can serve a peer replica's write; every hit carries RFC 9211 `Cache-Status: <name>; hit; ttl=N; detail=memory|redis|fs` (naming the physical tier that served the bytes) and every genuine miss `<name>; fwd=uri-miss` — `<name>` = `server.cache.name` when set to a valid token (#B238: a letter then up to 63 of `[A-Za-z0-9._-]`, a conservative RFC 8941 subset; an invalid value boot-warns and falls back), else the default `gina-cache`, resolved ONCE at boot (server.js stamps `instance._cacheName`; all mint sites on both engines read the stamp, so the identifier cannot disagree across engines or hit/miss) — and when `server.hidePoweredBy` is true + the cache enabled + no name set, boot warns that the wire still names the framework (warn-not-flip: the identifier is a documented-stable wire value — set any token e.g. `cache` to close the disclosure, or explicit `gina-cache` to silence); cached routes re-mint CSP nonces on hits (#B130 — header + body, stored entries never mutated). **The miss-path `Cache-Control: <visibility>, max-age=<ttl>` (#C6) rides the write's own gate since 0.7.4 (#B744): `server.cache.enable === 'true'` + GET + a route `cache`, at all four delegate sites (swig ×2, json, nunjucks) — with the switch off no header goes out (until 0.7.3 it went out whatever the switch, dev included, so a browser reused a route's response for its whole ttl while the server stored nothing); `visibility` (`private` default | `public`) is a per-route `cache` key.** **Since 0.7.14 (#B1164) each of those responses, and every hit's, lists the variant's request headers in `Vary`:** `RenderCache.VARY_HEADERS` (`Accept-Language, Cookie, X-Forwarded-Host, X-Forwarded-Proto, X-Forwarded-Prefix`), appended by `RenderCache.appendVariantVary(res)` right after each of the six `Cache-Control: <visibility>, max-age=` writes (the four delegate miss sites and both hit sites) by the #B743 `appendVary` rules (names already listed, a configured `vary: Origin` included, keep their place; no duplicate; nothing after `*`); `instance.set()` appends them to the stored `vary` of an entry keyed on a variant (`withVariantVary`), so a release that does not append them serves them from a shared L2 too. Until then a browser kept a cached route's page in the language it first received for the page's whole `max-age`. `Vary: Cookie` makes a browser refetch after any cookie change, and most shared caches do not reuse a response that varies on `Cookie`. **A gated route is never cached** — pairing `cache` with `param.requireAuth`/`roles`/`policy` (or leaving it mode-gated) REFUSES the boot, and the delegates skip the write regardless: the key carries no principal and both serve points precede the authorization gate (#B158). Server-side only — none of this ever needs a dist rebuild. Tests: `test/lib/render-cache.test.js`, `test/core/server-render-cache-read.test.js`, `test/core/server-render-cache-boot.test.js`, `test/lib/cache-clear.test.js`, `test/core/render-cache-control-b744.test.js`, `test/core/render-cache-top-level-warn-b744.test.js`, `test/core/server-render-cache-readback-b785.test.js`, `test/core/config-settings-env-file-b784.test.js`, `test/lib/render-cache-vary-recompute-b1164.test.js`, `test/core/render-cache-vary-acao-b1164.test.js`, `test/core/server-allow-origin-b1104.test.js`; consumer guide: the docs-site caching guide. Since 0.7.1 the isaac PRE-ROUTING read runs only while `server.cache.enable` is on (the phase-2 per-request trims, slice H) — parity with the writers and the express-side read; an entry left on disk by a run that had caching enabled is no longer served while it is disabled. **#B750 (fixed for 0.7.2):** `serveRenderCacheHit`'s HTTP/2 branch assigned `res.headersSent = true` after `stream.end()` — `headersSent` is a getter-only accessor on BOTH Node response classes (it already reports a raw send), so in strict-mode server.js the assignment threw a TypeError after the body went out: every redis L2 warm over HTTP/2 (`detail=redis`) logged an unhandled rejection and lost its access line. Never assign `headersSent`; the same fix removed four strict-mode siblings (render-nunjucks HEAD and body over HTTP/2, render-xml over HTTP/2 and HTTP/1.1). A fake response with a plain writable `headersSent` cannot reproduce the throw, which is why the suites missed it: test on a real `Http2ServerResponse`. Tests: `test/core/h2-raw-send-b749-b750.test.js`.
1046
1046
 
1047
1047
  278. **A cache key is opaque DATA — never route it through an expression/condition evaluator.** An output-cache key embeds the request URL, so a querystring's `?`/`=` parse as OPERATOR tokens in any condition-DSL lookup — the render cache's event registry originally lived in a collection whose dedup ran keys through the condition evaluator, and the SECOND cache-miss render of any cached GET route with `invalidateOnEvents` + a querystring THREW (in the swig path that rejection unwound to the function-level try, whose catch answered 500 — discarding an already-rendered page). The registry became a plain array matched with `===`. Generalizes beyond caching: never let a value carrying user-controlled characters reach a query/condition DSL as an expression — match registry rows with `===` on plain structures, and treat every composite key as an opaque string.
1048
1048
 
@@ -1092,8 +1092,8 @@ Dev-mode query instrumentation captures every database query tied to the current
1092
1092
 
1093
1093
  313. **Redis is a store backend only — no entity/ORM wiring, by design.** The redis connector class is deliberately empty: it backs FOUR purpose-bound subsystems, each minting its OWN client — the session store (`lib.SessionStore`), the async-job store (`app.json` `jobs.store`), the render-cache L2 (`settings.json` `server.cache` `type: "redis"`), and — since #KV1 slice 1 — a KV namespace backend (`settings.json` `kv.namespaces.<name>.store`; entry 314), one client PER NAMESPACE. Client failure policy diverges per subsystem by design — the render-cache L2 sets `enableOfflineQueue: false` plus a `commandTimeout` so an outage fails page-serving open instead of hanging every request, while the job store keeps ioredis's default offline queue on, and the KV store imposes NEITHER: it passes those knobs through from the `connectors.json` entry so the operator tunes per namespace (a `failMode: "open"` namespace wants the fail-fast trio; a `closed` one usually wants the queue). NON-KV redis use — data structures, pub/sub, third-party queue libraries — stays app-owned by design: it is outside the KV contract, so an app needing it reads its `connectors.json` entry via `getConfig()` and mints its own ioredis client. Redis operations do NOT appear in the Inspector's query log: `_devQueryLog` capture hangs off the entity query path, which this connector deliberately does not implement; a render-cache L2 hit is instead observable per response via the RFC 9211 `Cache-Status` header. Per-operation Inspector capture of redis store traffic was evaluated 2026-08-21 and demand-gated (measured consumer demand: zero); if demand arrives, the evidenced shape is a store-reachability/lifecycle signal on the events channel (with app-registered clients joining the same signal), not query-log wiring.
1094
1094
 
1095
- 314. **General-purpose KV primitive (#KV1) — `gina.kv('<namespace>')`, strict-declared namespaces over pluggable per-namespace backends (`settings.json > kv`).** Declare namespaces under `kv.namespaces` (`{ "kv": { "default": "cache", "namespaces": { "cache": { "failMode": "open" }, "tokens": {} } } }`); `gina.kv(name)` THROWS on an unconfigured block or unknown name (the throw is what surfaces a typo — the `gina.storage()` stance), and the whole feature is dormant when the block is absent. Namespaces are process-global, read once at boot from the STARTING bundle's settings. The handle is promise-native with 13 ops: `get` / `set(k, v, {ttl})` / `del` / `has` / `ttl(k)` (null=miss, -1=no expiry, else remaining ms) / `expire(k, ttlMs)` / `setnx` (set-if-absent) / `consume` (atomic read-AND-delete — the one-shot-token op; the second reader gets null) / `incr` / `decr` (integer counters; `{ttl}` applies on CREATE only; non-integer values and safe-range overflow reject) / `delIfEquals` (compare-and-delete — the safe lock-release primitive; compose with `setnx` for lock recipes) / `clear()` / `getOrSet(k, {ttl}, loader)` (fetch-or-compute with per-process single-flight; no negative caching). Value model: JSON-serialized; `undefined` AND `null` are REFUSED on every write (a stored null would be indistinguishable from a miss — store a wrapper or use `del()`); TTLs are MILLISECONDS, positive integers only — `ttl: 0` refuses rather than meaning no-expiry. Per-namespace `failMode`: `closed` (default) rejects on backend errors; `open` degrades every op to its miss-shaped result with a warning (cache-like namespaces) — consulted on backend errors only, so it becomes operative with connector-backed stores. THREE backends ship, differing by SHARING SCOPE. **In-memory** per namespace (zero config; lazy expiry plus an unref'd sweep, `sweepInterval` ms, default 30000) — SINGLE-PROCESS, lost on restart. **SQLite** (`core/connectors/sqlite/lib/kv-store.js`, #KV1 slice 2) — zero npm deps via the `lib/sqlite-driver` seam (node:sqlite, `bun:sqlite` adapter under Bun), DURABLE across restarts and shared across PROCESSES on ONE HOST; namespaces sharing a file are isolated by a composite `(ns, key)` primary key rather than a prefix, `clear()` is one namespace-scoped DELETE, and every read-modify-write verb runs inside `BEGIN IMMEDIATE`/`COMMIT` — the synchronous driver makes a verb indivisible only WITHIN a process, which is precisely the guarantee that fails once a second process opens the file, i.e. the reason to pick this backend at all. **Redis** — shared across HOSTS. **Redis** (`core/connectors/redis/lib/kv-store.js`, #KV1 slice 1): point a namespace's `store` at a `connectors.json` entry and the `lib/kv-store` dispatcher resolves `core/connectors/<connector>/lib/kv-store.js`; naming a connector that has none still REFUSES the boot rather than degrading silently to memory (the others arrive demand-first, the audit-store shipping order). The redis backend keeps every guarantee server-side: `SET .. PX .. NX` for setnx, `GETDEL` for consume when the server has it (>= 6.2) with a **Lua fallback below that — never a GET+DEL pair**, which would let two concurrent readers both redeem; Lua also for compare-and-delete and for TTL-on-CREATE-only counters (`n === by` is a racy proxy for "was created", so existence is checked inside the script). Keys are prefixed `kv:<namespace>:` by default, so two namespaces may share one entry; cluster prefixes are deliberately NOT hash-tagged (every KV op is single-key, and tagging would pin a namespace to one slot — the opposite of the job store, whose MULTI/SUNION/MGET require the tag), so `clear()` scans each master node and deletes per key rather than assuming one slot. Connection policy (`commandTimeout`/`maxRetriesPerRequest`/`enableOfflineQueue`) is passed through from the entry and otherwise left at ioredis's defaults — deliberately NOT the render-cache's fail-fast tuning, because the right policy depends on the namespace's `failMode`. Deliberate boundary — NOT a redis client: no data structures (lists/hashes/sets/streams/pub-sub), no batch `mget`/`mset`, no key scanning (use `clear()` or track your own keys), no binary values (the storage layer owns bytes), no first-class distributed locks (compose `setnx` + `delIfEquals`; a lock API done right needs fencing/renewal policy no half-primitive should imply). `lib/kv` is framework-independent (config, connector stores and the warn sink are injected by gna.js at boot; `test/lib/kv-import-boundary.test.js` enforces the boundary) and plain-require'd (its namespace registry and sweep timers survive dev-mode refreshCore). Server-side only — NOT browser-bundled, so pickup is a bundle RESTART, no re-bake.
1096
- 315. **Rate limiting (#MS6) — identified-caller quotas at the router band.** Opt-in via settings.json `server.rateLimit` (`enabled` strictly true, `namespace`, `keyField`, `limit`, `window`; folded into the runtime server block with env.json keys winning, resolved once at engine start onto the instance, so changes need a bundle restart; structurally invalid values on an enabled block refuse the boot). QUOTA semantics, not flood control: the gate runs AFTER route authorization (`authorizeRequest` is the principal resolver — the only writer of `req.machineCaller`, and session identity is its predicate) and BEFORE DTO validation, so the order is 401 -> 429 -> the validation-tier 422s (message validation when declared, then DTO) and a throttled caller never receives a 422 field map. A request with NO resolvable principal is SKIPPED, never bucketed — anonymous flood control belongs to the edge proxy and the #H9 HTTP/2 rapid-reset guard, and IP-keying is dishonest behind a proxy (every socket.remoteAddress is the proxy's). Keys: `u:<session.user[keyField]>` for signed-in callers (the field is operator-named because session.user is app-owned shape; an absent/empty value means unidentified => skipped) and `m:<machineCaller.name>` for #MS3 machine callers; session wins, mirroring the authz gate; values over 180 chars are sha256-hexed under the kv 512-char key cap. Counters are FIXED WINDOWS over the #KV1 primitive — `incr(key, 1, {ttl: windowMs})`, TTL-on-create-only, race-free in all three backends — so choosing the namespace's backend chooses the quota's SCOPE: in-memory counts PER PROCESS (each replica grants the quota again; the resolver warns), redis/sqlite share across replicas/processes. For a redis-backed namespace set `enableOfflineQueue: false` + `commandTimeout` on the connectors entry (the render-cache L2 fail-fast trio; with ioredis defaults an outage QUEUES every gated request so neither failMode ever fires — the resolver warns about this too). Outage policy IS the namespace's `failMode`: `open` => incr degrades to null and the gate ALLOWS without headers (the explicit `count === null` check is load-bearing — `null <= limit` is true by coercion); `closed` => the rejection is owned and answers 503 + Retry-After (the caller is NOT over quota). Denials answer 429 via `controller.throwError` with Retry-After (from the store's own ttl — one extra read on the throttled path only) plus the draft-ietf-httpapi-ratelimit-headers-11 structured fields (`RateLimit: "<policy>";r=<remaining>[;t=<sec>]`, `RateLimit-Policy: "<policy>";q=<limit>;w=<windowSec>`); allowed limited requests carry both without `t` (reporting it honestly would cost a second read per request and the parameter is optional). Per-route overrides are TOP-LEVEL routing.json keys (never under `param` — the #CSRF2 trap), propagated by BOTH route builders (cold typeof-guarded — `false` is meaningful — and the warm cached-route opt-in copy): `"rateLimit": false` exempts the route; `{limit, window}` REPLACES the default for that route in its OWN bucket (`<principal>:<rule>`), partial objects inherit the missing key; shapes are linted at boot (a malformed value refuses the boot — the DTO registrar doctrine). Dormant => the dispatch band runs today's exact synchronous path with ZERO promises minted; armed, every terminal of the verdict promise is owned (allow -> band, deny/outage -> answered inside the gate) so a store failure can never strand a request. Implementation: `lib/rate-limit` (plain-required, router-bound), wired in `core/router.js` at both dispatch sites; server-side only, but the route-flag propagation lives in browser-bundled `lib/routing`, so the release carries a dist rebuild (dead code client-side). Tests: `test/core/rate-limit.test.js` (45 — source pins on every seam, resolver refusal/warn matrix, gate behaviour over a scripted namespace, 5 mutation controls fired red-first).
1095
+ 314. **General-purpose KV primitive (#KV1) — `gina.kv('<namespace>')`, strict-declared namespaces over pluggable per-namespace backends (`settings.json > kv`).** Declare namespaces under `kv.namespaces` (`{ "kv": { "default": "cache", "namespaces": { "cache": { "failMode": "open" }, "tokens": {} } } }`); `gina.kv(name)` THROWS on an unconfigured block or unknown name (the throw is what surfaces a typo — the `gina.storage()` stance), and the whole feature is dormant when the block is absent. Namespaces are process-global, read once at boot from the STARTING bundle's settings, and installed before the engine starts, so `server.rateLimit` and `server.idempotency` (resolved at engine start) find them; before #B1165 they were installed after `listen()` and both features refused every boot. The handle is promise-native with 13 ops: `get` / `set(k, v, {ttl})` / `del` / `has` / `ttl(k)` (null=miss, -1=no expiry, else remaining ms) / `expire(k, ttlMs)` / `setnx` (set-if-absent) / `consume` (atomic read-AND-delete — the one-shot-token op; the second reader gets null) / `incr` / `decr` (integer counters; `{ttl}` applies on CREATE only; non-integer values and safe-range overflow reject) / `delIfEquals` (compare-and-delete — the safe lock-release primitive; compose with `setnx` for lock recipes) / `clear()` / `getOrSet(k, {ttl}, loader)` (fetch-or-compute with per-process single-flight; no negative caching). Value model: JSON-serialized; `undefined` AND `null` are REFUSED on every write (a stored null would be indistinguishable from a miss — store a wrapper or use `del()`); TTLs are MILLISECONDS, positive integers only — `ttl: 0` refuses rather than meaning no-expiry. Per-namespace `failMode`: `closed` (default) rejects on backend errors; `open` degrades every op to its miss-shaped result with a warning (cache-like namespaces) — consulted on backend errors only, so it becomes operative with connector-backed stores. THREE backends ship, differing by SHARING SCOPE. **In-memory** per namespace (zero config; lazy expiry plus an unref'd sweep, `sweepInterval` ms, default 30000) — SINGLE-PROCESS, lost on restart. **SQLite** (`core/connectors/sqlite/lib/kv-store.js`, #KV1 slice 2) — zero npm deps via the `lib/sqlite-driver` seam (node:sqlite, `bun:sqlite` adapter under Bun), DURABLE across restarts and shared across PROCESSES on ONE HOST; namespaces sharing a file are isolated by a composite `(ns, key)` primary key rather than a prefix, `clear()` is one namespace-scoped DELETE, and every read-modify-write verb runs inside `BEGIN IMMEDIATE`/`COMMIT` — the synchronous driver makes a verb indivisible only WITHIN a process, which is precisely the guarantee that fails once a second process opens the file, i.e. the reason to pick this backend at all. **Redis** — shared across HOSTS. **Redis** (`core/connectors/redis/lib/kv-store.js`, #KV1 slice 1): point a namespace's `store` at a `connectors.json` entry and the `lib/kv-store` dispatcher resolves `core/connectors/<connector>/lib/kv-store.js`; naming a connector that has none still REFUSES the boot rather than degrading silently to memory (the others arrive demand-first, the audit-store shipping order). The redis backend keeps every guarantee server-side: `SET .. PX .. NX` for setnx, `GETDEL` for consume when the server has it (>= 6.2) with a **Lua fallback below that — never a GET+DEL pair**, which would let two concurrent readers both redeem; Lua also for compare-and-delete and for TTL-on-CREATE-only counters (`n === by` is a racy proxy for "was created", so existence is checked inside the script). Keys are prefixed `kv:<namespace>:` by default, so two namespaces may share one entry; cluster prefixes are deliberately NOT hash-tagged (every KV op is single-key, and tagging would pin a namespace to one slot — the opposite of the job store, whose MULTI/SUNION/MGET require the tag), so `clear()` scans each master node and deletes per key rather than assuming one slot. Connection policy (`commandTimeout`/`maxRetriesPerRequest`/`enableOfflineQueue`) is passed through from the entry and otherwise left at ioredis's defaults — deliberately NOT the render-cache's fail-fast tuning, because the right policy depends on the namespace's `failMode`. Deliberate boundary — NOT a redis client: no data structures (lists/hashes/sets/streams/pub-sub), no batch `mget`/`mset`, no key scanning (use `clear()` or track your own keys), no binary values (the storage layer owns bytes), no first-class distributed locks (compose `setnx` + `delIfEquals`; a lock API done right needs fencing/renewal policy no half-primitive should imply). `lib/kv` is framework-independent (config, connector stores and the warn sink are injected by gna.js at boot; `test/lib/kv-import-boundary.test.js` enforces the boundary) and plain-require'd (its namespace registry and sweep timers survive dev-mode refreshCore). Server-side only — NOT browser-bundled, so pickup is a bundle RESTART, no re-bake.
1096
+ 315. **Rate limiting (#MS6) — identified-caller quotas at the router band.** Opt-in via settings.json `server.rateLimit` (`enabled` strictly true, `namespace`, `keyField`, `limit`, `window`; folded into the runtime server block with env.json keys winning, resolved once at engine start onto the instance, so changes need a bundle restart; structurally invalid values on an enabled block refuse the boot). QUOTA semantics, not flood control: the gate runs AFTER route authorization (`authorizeRequest` is the principal resolver — the only writer of `req.machineCaller`, and session identity is its predicate) and BEFORE DTO validation, so the order is 401 -> 429 -> the validation-tier 422s (message validation when declared, then DTO) and a throttled caller never receives a 422 field map. A request with NO resolvable principal is SKIPPED, never bucketed — anonymous flood control belongs to the edge proxy and the #H9 HTTP/2 rapid-reset guard, and IP-keying is dishonest behind a proxy (every socket.remoteAddress is the proxy's). Keys: `u:<session.user[keyField]>` for signed-in callers (the field is operator-named because session.user is app-owned shape; an absent/empty value means unidentified => skipped) and `m:<machineCaller.name>` for #MS3 machine callers; session wins, mirroring the authz gate; values over 180 chars are sha256-hexed under the kv 512-char key cap. Counters are FIXED WINDOWS over the #KV1 primitive — `incr(key, 1, {ttl: windowMs})`, TTL-on-create-only, race-free in all three backends — so choosing the namespace's backend chooses the quota's SCOPE: in-memory counts PER PROCESS (each replica grants the quota again; the resolver warns), redis/sqlite share across replicas/processes. For a redis-backed namespace set `enableOfflineQueue: false` + `commandTimeout` on the connectors entry (the render-cache L2 fail-fast trio; with ioredis defaults an outage QUEUES every gated request so neither failMode ever fires — the resolver warns about this too). Outage policy IS the namespace's `failMode`: `open` => incr degrades to null and the gate ALLOWS without headers (the explicit `count === null` check is load-bearing — `null <= limit` is true by coercion); `closed` => the rejection is owned and answers 503 + Retry-After (the caller is NOT over quota). Denials answer 429 via `controller.throwError` with Retry-After (from the store's own ttl — one extra read on the throttled path only) plus the draft-ietf-httpapi-ratelimit-headers-11 structured fields (`RateLimit: "<policy>";r=<remaining>[;t=<sec>]`, `RateLimit-Policy: "<policy>";q=<limit>;w=<windowSec>`); allowed limited requests carry both without `t` (reporting it honestly would cost a second read per request and the parameter is optional). A render-cache hit answers before this gate: it is not counted and carries neither header (#B1105). Per-route overrides are TOP-LEVEL routing.json keys (never under `param` — the #CSRF2 trap), propagated by BOTH route builders (cold typeof-guarded — `false` is meaningful — and the warm cached-route opt-in copy): `"rateLimit": false` exempts the route; `{limit, window}` REPLACES the default for that route in its OWN bucket (`<principal>:<rule>`), partial objects inherit the missing key; shapes are linted at boot (a malformed value refuses the boot — the DTO registrar doctrine). Dormant => the dispatch band runs today's exact synchronous path with ZERO promises minted; armed, every terminal of the verdict promise is owned (allow -> band, deny/outage -> answered inside the gate) so a store failure can never strand a request. Implementation: `lib/rate-limit` (plain-required, router-bound), wired in `core/router.js` at both dispatch sites; server-side only, but the route-flag propagation lives in browser-bundled `lib/routing`, so the release carries a dist rebuild (dead code client-side). Tests: `test/core/rate-limit.test.js` (45 — source pins on every seam, resolver refusal/warn matrix, gate behaviour over a scripted namespace, 5 mutation controls fired red-first).
1097
1097
  316. **Reserved-action controller hooks (`onReady`, `setup`) — dispatch semantics + the #B399 ownership guard** — Before the main action, `core/router.js` dispatches the two reserved hooks at BOTH dispatch sites (with- and without-middleware), in order, synchronously, without awaiting: an app defines `this.onReady = function(req, res, next){...}` on the controller, and `setup` resolves through a framework-synthesized wrapper that requires the bundle's `controllers/setup.js` once per controller instance (the wrapper returns the app call's own result). Since #TPL3 (0.7.6) a swig render also runs `setup.js`: `controller.js` `runBundleSetupForRender`, called before the delegate, runs it on the render's engine when that engine has not run this module yet, with the router's 15-member receiver — so a route-middleware render (whose request never reaches the hooks: `done` is never called) and an XHR render see the bundle's registrations from the first request after boot; outside dev one run per engine (a recorded run, or a recorded absence of the file, ends the check without a probe), in dev the module is the key; not awaited; a throw or a rejection is logged and the render goes on; the router records its own run on the engine (`engine._ginaSetupFn`) so an action request runs it once, and gina's own filters, re-registered by the delegate after it, still win. A `setup.js` therefore also runs for a request a middleware refuses with a render (a login wall's), with that request's `req`. Since #B399, both hook loops run INSIDE the dispatch try and each hook's return value is captured — a thenable gets a `.catch` routing to `throwError(response, 500, ...)` naming the failing hook, the same guard shape the main action dispatch carries. The route middleware call in `processMiddlewares` owns its result the same way since #B812 (2026-10-07): it used to discard it, so an `async` middleware that threw after an await — or handed over through `done` to a later middleware that threw, the throw becoming the first one's rejection — left its request unanswered and the rejection unhandled; a thenable now gets a `.catch` answering `throwError(res, 500, 'route middleware `<name>` rejected: …')`, the name read BEFORE the call because a synchronous `done` splices the list during it (`test/core/router-middleware-rejection-b812.test.js` drives the real bytes in a child process, where the pre-fix rejection is recorded instead of reaching the test runner). Consequences: a SYNC hook throw answers 500 (previously it escaped to process level — on the built-in engine that was uncaughtException → emerg + SIGTERM, killing the whole bundle; Express's layer-catch answered its own 500 — engine-asymmetric); an ASYNC hook rejection answers 500 when it lands before the response is released, and degrades to the #ERRREF pairing log line when the action already responded (`throwError` is `!headersSent`-guarded). Ordering caveat: hooks are dispatched in the same synchronous frame as the action (never awaited), so a rejecting async hook does NOT prevent the action from running — its side effects still execute even when the wire answers 500; hooks are not a gating mechanism (use route middleware, route authorization, or DTO validation to refuse a request before the action). Sync or absent hooks mint zero promises — dispatch timing is unchanged for every controller that does not return a thenable from a hook. **The QUERY-DELIVERY half of the same #B399 arc (shipped separately): every app-callback delivery in `Controller::query()`** — the Node-style callback form and the `{onComplete}` facade, both transports, success/status AND transport-error deliveries — routes an `async` callback's rejected promise through one constructor-scope `_ownAsyncCbRejection` helper to the same throwError(500) shape the sync-delivery catches build (marker: `Controller Query Exception on async callback rejection.`). Pre-fix the rejection floated to the process handler and the request hung; the two success-delivery sync catches are byte-unchanged, plain callbacks mint zero promises, and a callback that responded before rejecting is absorbed by the #B31 released-response guard. The SYNC half of the same error-path surface is owned too (#B402): all 14 formerly-bare transport-error deliveries (host-missing, circuit refusal, the query-scope outer catch, both ca-read catches, h1 ALPN/request-error, the h2 typed terminals and both pre-flight PING failures) wrap the callback in try/catch routing to a shared `_ownSyncCbThrow` guard (marker: `Controller Query Exception on transport-error callback throw.`, flat 500) — previously an event/timer-frame throw escaped to the process handler (lib/proc.js: emerg + SIGTERM, a whole-bundle kill on BOTH engines for consumer bundles, since an app bug's error code matches none of the transport-lifecycle survive branches), and the caller-frame sites re-invoked the app callback a second time through the query-scope catch, handing it its own exception as the query error. The h2 session-error handler no longer answers the request itself (#B403): request notification on a failing session is owned solely by the stream-level typed deliveries (every live stream self-delivers), retiring the session-level throwError that raced the app callback's own response — and that, on a REUSED session, could answer with the CREATING request's context (session listeners bind once at fresh connect; the cache-hit path never re-binds them). Its by-catch #B404 is FIXED in the same pending release: every error-path `query#complete` emit is SINGLE-argument (mirroring the callback form — `callback(err)` on failure), while both `onComplete` facades' `(err, data)` dispatch dereferenced `data.status` unconditionally — so in handle/emitter mode a transport error or non-2xx outcome never reached the app's listener and the request answered 500 through the facade's sync catch with a marker misattributing it to an app callback exception. A `typeof data == 'undefined'` guard opening each facade's sync-guard try now delivers the payload as the error argument (on failure `cb(err)` with `data` undefined — a plain `{status, error}` object for a non-2xx status or a transport failure, a native `Error` for a pre-transport failure (missing host, unreadable certificate, open circuit) — and on success `cb(false, data)`); listener sync throws and async rejections are owned like every other delivery — and the host-missing emitter branch gained the `return` its callback twin always had (the only fall-through of the 20 emit sites — all 20 of which, with the probe-release branch, were removed by the #B475 cleanup commit of 2026-09-05 once `query()` always supplied a callback; the event now fires only from `query()`'s one-tick fallback). The documented `util.promisify(self.query)` idiom always used the callback form and was never affected by #B404 — but WAS broken by the last divergent cell, retired as #B405 (measured with controls in both directions): the h2 CALLBACK-mode dispatch delivered only 5xx to the callback and answered every other deliverable non-2xx itself via throwError, so h2 graceful degradation was impossible for 4xx and a promisified h2 query NEVER SETTLED on any non-5xx status (the await's continuation silently abandoned). Every body-announced non-2xx with a known status code now invokes `callback(data)` on both transports (h1 has done this since its #Q1 change, whose inline comment states the intent; the 3xx-with-headers replay is untouched; the retired split is preserved as comments at the site), so the promisify rejection contract now holds transport-uniformly.
1098
1098
  317. **Boot-frame failure ownership — a crash during bundle bootstrap aborts loudly instead of hanging (#B406, 2026-08-23).** `core/gna.js`'s boot callback (`onGettingProjectConfig`) is declared `async`, so a synchronous throw anywhere in its ~1470-line direct frame became a promise REJECTION: the caller's try/catch (written for a plain callback) could never see it, and the process-level `unhandledRejection` net only logs at error level — no `[ emerg` marker, no exit. The daemon's startup watchdog (`lib/cmd/bundle/start.js`) reads the child's STDOUT only, during startup only, and matches `/(\[|\[\s+)emerg/` — on a match it SIGKILLs the child, prints the cause, and clears the startup timer; a child that dies WITHOUT the marker gets the immediate exit-code report; a child that neither exits nor emits the marker got the 60-second timeout with no cause. Pre-fix, a boot crash in that frame was the third shape. The whole frame is now owned by one try/catch routing every failure — sync throws today, any awaited rejection added later — into `abort()`, the existing boot terminal (context-aware `console.emerg` + synchronous `fs.writeSync(2)` flush + `process.exit(1)`), with non-Error rejections (`throw null`) coerced to an Error FIRST because `abort()` reads `.stack` through branches that would themselves throw on null — and a throw inside the catch would escape back to the silent net. Measured: the levelled emerg line SURVIVES an immediate `process.exit(1)` on a POSIX pipe (short writes; the 64KB truncation class is large payloads), so the single marker line reaches the watchdog — deliberately ONE marker-bearing line, since the watchdog's emerg branch has no re-entry guard and two lines risk double-firing its bulk-start accounting. Behaviour change: a throw LATE in the frame that previously left a half-initialised process limping now refuses the boot. Extends entry 178's severity-axis rule ("lethality follows the nearest async boundary") with the boot-time tier: at boot there is no request to degrade to a logged rejection — an unowned rejection means the process neither starts nor exits, which is strictly worse than either crash-and-respawn or a 500. Tests: `test/core/gna-boot-frame-ownership.test.js` (source pins red-first vs the pre-fix blob; replica arms incl. an awaited-rejection arm proving the seam is ready for a boot-time `await`, a child-process SUBTRACT reproducing the pre-fix escape at a real process-level net, and a plain-callback CONTROL locking the caller contract). Server-side only: pickup is a bundle restart, no re-bake.
1099
1099