gina 0.7.9 → 0.7.10

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 (632) hide show
  1. package/CHANGELOG.md +15 -6
  2. package/README.md +26 -48
  3. package/ROADMAP.md +1 -0
  4. package/framework/v0.7.10/VERSION +1 -0
  5. package/framework/{v0.7.9 → v0.7.10}/core/asset/plugin/dist/vendor/gina/js/gina.js +8 -1
  6. package/framework/{v0.7.9 → v0.7.10}/core/asset/plugin/dist/vendor/gina/js/gina.min.js +1 -1
  7. package/framework/v0.7.10/core/asset/plugin/dist/vendor/gina/js/gina.min.js.br +0 -0
  8. package/framework/{v0.7.9 → v0.7.10}/core/asset/plugin/dist/vendor/gina/js/gina.min.js.gz +0 -0
  9. package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/validator/src/main.js +8 -1
  10. package/framework/{v0.7.9 → v0.7.10}/core/server.isaac.js +38 -0
  11. package/framework/{v0.7.9 → v0.7.10}/core/server.js +71 -1
  12. package/framework/{v0.7.9 → v0.7.10}/lib/render-cache/src/main.js +81 -0
  13. package/framework/{v0.7.9 → v0.7.10}/package.json +1 -1
  14. package/gna.js +4 -4
  15. package/llms.txt +5 -5
  16. package/package.json +4 -4
  17. package/schema/settings.json +5 -0
  18. package/types/index.d.ts +2 -0
  19. package/framework/v0.7.9/VERSION +0 -1
  20. package/framework/v0.7.9/core/asset/plugin/dist/vendor/gina/js/gina.min.js.br +0 -0
  21. /package/framework/{v0.7.9 → v0.7.10}/AUTHORS +0 -0
  22. /package/framework/{v0.7.9 → v0.7.10}/LICENSE +0 -0
  23. /package/framework/{v0.7.9 → v0.7.10}/core/asset/html/nolayout.html +0 -0
  24. /package/framework/{v0.7.9 → v0.7.10}/core/asset/html/static.html +0 -0
  25. /package/framework/{v0.7.9 → v0.7.10}/core/asset/img/android-chrome-192x192.png +0 -0
  26. /package/framework/{v0.7.9 → v0.7.10}/core/asset/img/android-chrome-512x512.png +0 -0
  27. /package/framework/{v0.7.9 → v0.7.10}/core/asset/img/apple-touch-icon.png +0 -0
  28. /package/framework/{v0.7.9 → v0.7.10}/core/asset/img/favicon-16x16.png +0 -0
  29. /package/framework/{v0.7.9 → v0.7.10}/core/asset/img/favicon-32x32.png +0 -0
  30. /package/framework/{v0.7.9 → v0.7.10}/core/asset/img/favicon.ico +0 -0
  31. /package/framework/{v0.7.9 → v0.7.10}/core/asset/plugin/README.md +0 -0
  32. /package/framework/{v0.7.9 → v0.7.10}/core/asset/plugin/dist/vendor/gina/beemaster/beemaster.css +0 -0
  33. /package/framework/{v0.7.9 → v0.7.10}/core/asset/plugin/dist/vendor/gina/beemaster/beemaster.js +0 -0
  34. /package/framework/{v0.7.9 → v0.7.10}/core/asset/plugin/dist/vendor/gina/beemaster/index.html +0 -0
  35. /package/framework/{v0.7.9 → v0.7.10}/core/asset/plugin/dist/vendor/gina/css/gina.min.css +0 -0
  36. /package/framework/{v0.7.9 → v0.7.10}/core/asset/plugin/dist/vendor/gina/css/gina.min.css.br +0 -0
  37. /package/framework/{v0.7.9 → v0.7.10}/core/asset/plugin/dist/vendor/gina/css/gina.min.css.gz +0 -0
  38. /package/framework/{v0.7.9 → v0.7.10}/core/asset/plugin/dist/vendor/gina/html/statusbar.html +0 -0
  39. /package/framework/{v0.7.9 → v0.7.10}/core/asset/plugin/dist/vendor/gina/html/statusbar.html.br +0 -0
  40. /package/framework/{v0.7.9 → v0.7.10}/core/asset/plugin/dist/vendor/gina/html/statusbar.html.gz +0 -0
  41. /package/framework/{v0.7.9 → v0.7.10}/core/asset/plugin/dist/vendor/gina/inspector/have_heart_one-webfont.woff2 +0 -0
  42. /package/framework/{v0.7.9 → v0.7.10}/core/asset/plugin/dist/vendor/gina/inspector/index.html +0 -0
  43. /package/framework/{v0.7.9 → v0.7.10}/core/asset/plugin/dist/vendor/gina/inspector/inspector.css +0 -0
  44. /package/framework/{v0.7.9 → v0.7.10}/core/asset/plugin/dist/vendor/gina/inspector/inspector.js +0 -0
  45. /package/framework/{v0.7.9 → v0.7.10}/core/asset/plugin/dist/vendor/gina/inspector/logo.svg +0 -0
  46. /package/framework/{v0.7.9 → v0.7.10}/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js +0 -0
  47. /package/framework/{v0.7.9 → v0.7.10}/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.br +0 -0
  48. /package/framework/{v0.7.9 → v0.7.10}/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.gz +0 -0
  49. /package/framework/{v0.7.9 → v0.7.10}/core/config.js +0 -0
  50. /package/framework/{v0.7.9 → v0.7.10}/core/config.requirements-anchor.js +0 -0
  51. /package/framework/{v0.7.9 → v0.7.10}/core/connectors/ai/index.js +0 -0
  52. /package/framework/{v0.7.9 → v0.7.10}/core/connectors/ai/lib/connector.js +0 -0
  53. /package/framework/{v0.7.9 → v0.7.10}/core/connectors/couchbase/index.js +0 -0
  54. /package/framework/{v0.7.9 → v0.7.10}/core/connectors/couchbase/lib/connector.js +0 -0
  55. /package/framework/{v0.7.9 → v0.7.10}/core/connectors/couchbase/lib/connector.v3.js +0 -0
  56. /package/framework/{v0.7.9 → v0.7.10}/core/connectors/couchbase/lib/connector.v4.js +0 -0
  57. /package/framework/{v0.7.9 → v0.7.10}/core/connectors/couchbase/lib/n1ql.js +0 -0
  58. /package/framework/{v0.7.9 → v0.7.10}/core/connectors/couchbase/lib/session-store.js +0 -0
  59. /package/framework/{v0.7.9 → v0.7.10}/core/connectors/couchbase/lib/session-store.v3.js +0 -0
  60. /package/framework/{v0.7.9 → v0.7.10}/core/connectors/couchbase/lib/session-store.v4.js +0 -0
  61. /package/framework/{v0.7.9 → v0.7.10}/core/connectors/couchbase/lib/storage-store.js +0 -0
  62. /package/framework/{v0.7.9 → v0.7.10}/core/connectors/duckdb/index.js +0 -0
  63. /package/framework/{v0.7.9 → v0.7.10}/core/connectors/duckdb/lib/connector.js +0 -0
  64. /package/framework/{v0.7.9 → v0.7.10}/core/connectors/mongodb/index.js +0 -0
  65. /package/framework/{v0.7.9 → v0.7.10}/core/connectors/mongodb/lib/connector.js +0 -0
  66. /package/framework/{v0.7.9 → v0.7.10}/core/connectors/mongodb/lib/job-store.js +0 -0
  67. /package/framework/{v0.7.9 → v0.7.10}/core/connectors/mongodb/lib/pipeline-loader.js +0 -0
  68. /package/framework/{v0.7.9 → v0.7.10}/core/connectors/mongodb/lib/session-store.js +0 -0
  69. /package/framework/{v0.7.9 → v0.7.10}/core/connectors/mysql/index.js +0 -0
  70. /package/framework/{v0.7.9 → v0.7.10}/core/connectors/mysql/lib/connector.js +0 -0
  71. /package/framework/{v0.7.9 → v0.7.10}/core/connectors/param-redact.js +0 -0
  72. /package/framework/{v0.7.9 → v0.7.10}/core/connectors/postgresql/index.js +0 -0
  73. /package/framework/{v0.7.9 → v0.7.10}/core/connectors/postgresql/lib/connector.js +0 -0
  74. /package/framework/{v0.7.9 → v0.7.10}/core/connectors/redis/index.js +0 -0
  75. /package/framework/{v0.7.9 → v0.7.10}/core/connectors/redis/lib/connector.js +0 -0
  76. /package/framework/{v0.7.9 → v0.7.10}/core/connectors/redis/lib/job-store.js +0 -0
  77. /package/framework/{v0.7.9 → v0.7.10}/core/connectors/redis/lib/kv-store.js +0 -0
  78. /package/framework/{v0.7.9 → v0.7.10}/core/connectors/redis/lib/render-cache-store.js +0 -0
  79. /package/framework/{v0.7.9 → v0.7.10}/core/connectors/redis/lib/session-store.js +0 -0
  80. /package/framework/{v0.7.9 → v0.7.10}/core/connectors/scylladb/index.js +0 -0
  81. /package/framework/{v0.7.9 → v0.7.10}/core/connectors/scylladb/lib/connector.js +0 -0
  82. /package/framework/{v0.7.9 → v0.7.10}/core/connectors/scylladb/lib/session-store.js +0 -0
  83. /package/framework/{v0.7.9 → v0.7.10}/core/connectors/settle-once.js +0 -0
  84. /package/framework/{v0.7.9 → v0.7.10}/core/connectors/sql-parser.js +0 -0
  85. /package/framework/{v0.7.9 → v0.7.10}/core/connectors/sqlite/index.js +0 -0
  86. /package/framework/{v0.7.9 → v0.7.10}/core/connectors/sqlite/lib/connector.js +0 -0
  87. /package/framework/{v0.7.9 → v0.7.10}/core/connectors/sqlite/lib/job-store.js +0 -0
  88. /package/framework/{v0.7.9 → v0.7.10}/core/connectors/sqlite/lib/kv-store.js +0 -0
  89. /package/framework/{v0.7.9 → v0.7.10}/core/connectors/sqlite/lib/session-store.js +0 -0
  90. /package/framework/{v0.7.9 → v0.7.10}/core/content.encoding +0 -0
  91. /package/framework/{v0.7.9 → v0.7.10}/core/controller/controller.framework.js +0 -0
  92. /package/framework/{v0.7.9 → v0.7.10}/core/controller/controller.js +0 -0
  93. /package/framework/{v0.7.9 → v0.7.10}/core/controller/controller.render-json.js +0 -0
  94. /package/framework/{v0.7.9 → v0.7.10}/core/controller/controller.render-nunjucks-async.js +0 -0
  95. /package/framework/{v0.7.9 → v0.7.10}/core/controller/controller.render-nunjucks.js +0 -0
  96. /package/framework/{v0.7.9 → v0.7.10}/core/controller/controller.render-stream.js +0 -0
  97. /package/framework/{v0.7.9 → v0.7.10}/core/controller/controller.render-swig-async.js +0 -0
  98. /package/framework/{v0.7.9 → v0.7.10}/core/controller/controller.render-swig.js +0 -0
  99. /package/framework/{v0.7.9 → v0.7.10}/core/controller/controller.render-v1.js +0 -0
  100. /package/framework/{v0.7.9 → v0.7.10}/core/controller/controller.render-xml.js +0 -0
  101. /package/framework/{v0.7.9 → v0.7.10}/core/controller/index.js +0 -0
  102. /package/framework/{v0.7.9 → v0.7.10}/core/controller/inline-script.js +0 -0
  103. /package/framework/{v0.7.9 → v0.7.10}/core/controller/inspector-window-emit.js +0 -0
  104. /package/framework/{v0.7.9 → v0.7.10}/core/controller/preload-hints.js +0 -0
  105. /package/framework/{v0.7.9 → v0.7.10}/core/controller/release-banner.js +0 -0
  106. /package/framework/{v0.7.9 → v0.7.10}/core/controller/render-data.js +0 -0
  107. /package/framework/{v0.7.9 → v0.7.10}/core/controller/render-session.js +0 -0
  108. /package/framework/{v0.7.9 → v0.7.10}/core/dev/index.js +0 -0
  109. /package/framework/{v0.7.9 → v0.7.10}/core/dev/lib/class.js +0 -0
  110. /package/framework/{v0.7.9 → v0.7.10}/core/dev/lib/factory.js +0 -0
  111. /package/framework/{v0.7.9 → v0.7.10}/core/dev/lib/tools.js +0 -0
  112. /package/framework/{v0.7.9 → v0.7.10}/core/gna.js +0 -0
  113. /package/framework/{v0.7.9 → v0.7.10}/core/locales/README.md +0 -0
  114. /package/framework/{v0.7.9 → v0.7.10}/core/locales/currency.json +0 -0
  115. /package/framework/{v0.7.9 → v0.7.10}/core/locales/dist/language/en.json +0 -0
  116. /package/framework/{v0.7.9 → v0.7.10}/core/locales/dist/language/fr.json +0 -0
  117. /package/framework/{v0.7.9 → v0.7.10}/core/locales/dist/region/en.json +0 -0
  118. /package/framework/{v0.7.9 → v0.7.10}/core/locales/dist/region/fr.json +0 -0
  119. /package/framework/{v0.7.9 → v0.7.10}/core/locales/index.js +0 -0
  120. /package/framework/{v0.7.9 → v0.7.10}/core/mime.types +0 -0
  121. /package/framework/{v0.7.9 → v0.7.10}/core/model/entity.js +0 -0
  122. /package/framework/{v0.7.9 → v0.7.10}/core/model/index.js +0 -0
  123. /package/framework/{v0.7.9 → v0.7.10}/core/model/template/entityFactory.js +0 -0
  124. /package/framework/{v0.7.9 → v0.7.10}/core/model/template/index.js +0 -0
  125. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/README.md +0 -0
  126. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/index.js +0 -0
  127. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/csrf/README.md +0 -0
  128. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/csrf/package.json +0 -0
  129. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/csrf/src/main.js +0 -0
  130. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/README.md +0 -0
  131. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/coep/README.md +0 -0
  132. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/coep/package.json +0 -0
  133. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/coep/src/main.js +0 -0
  134. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/coop/README.md +0 -0
  135. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/coop/package.json +0 -0
  136. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/coop/src/main.js +0 -0
  137. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/corp/README.md +0 -0
  138. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/corp/package.json +0 -0
  139. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/corp/src/main.js +0 -0
  140. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/csp/README.md +0 -0
  141. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/csp/package.json +0 -0
  142. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/csp/src/main.js +0 -0
  143. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/hide-powered-by/README.md +0 -0
  144. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/hide-powered-by/package.json +0 -0
  145. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/hide-powered-by/src/main.js +0 -0
  146. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/hsts/README.md +0 -0
  147. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/hsts/package.json +0 -0
  148. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/hsts/src/main.js +0 -0
  149. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/origin-agent-cluster/README.md +0 -0
  150. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/origin-agent-cluster/package.json +0 -0
  151. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/origin-agent-cluster/src/main.js +0 -0
  152. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/package.json +0 -0
  153. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/referrer-policy/README.md +0 -0
  154. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/referrer-policy/package.json +0 -0
  155. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/referrer-policy/src/main.js +0 -0
  156. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/src/main.js +0 -0
  157. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/x-content-type-options/README.md +0 -0
  158. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/x-content-type-options/package.json +0 -0
  159. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/x-content-type-options/src/main.js +0 -0
  160. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/x-dns-prefetch-control/README.md +0 -0
  161. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/x-dns-prefetch-control/package.json +0 -0
  162. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/x-dns-prefetch-control/src/main.js +0 -0
  163. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/x-download-options/README.md +0 -0
  164. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/x-download-options/package.json +0 -0
  165. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/x-download-options/src/main.js +0 -0
  166. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/x-frame-options/README.md +0 -0
  167. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/x-frame-options/package.json +0 -0
  168. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/x-frame-options/src/main.js +0 -0
  169. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/x-permitted-cross-domain-policies/README.md +0 -0
  170. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/x-permitted-cross-domain-policies/package.json +0 -0
  171. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/x-permitted-cross-domain-policies/src/main.js +0 -0
  172. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/x-xss-protection/README.md +0 -0
  173. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/x-xss-protection/package.json +0 -0
  174. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/security-headers/x-xss-protection/src/main.js +0 -0
  175. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/session/README.md +0 -0
  176. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/session/package.json +0 -0
  177. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/session/src/main.js +0 -0
  178. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/storage/README.md +0 -0
  179. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/storage/build.json +0 -0
  180. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/storage/package.json +0 -0
  181. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/storage/src/main.js +0 -0
  182. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/validator/README.md +0 -0
  183. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/validator/build.json +0 -0
  184. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/validator/package.json +0 -0
  185. /package/framework/{v0.7.9 → v0.7.10}/core/plugins/lib/validator/src/form-validator.js +0 -0
  186. /package/framework/{v0.7.9 → v0.7.10}/core/router.js +0 -0
  187. /package/framework/{v0.7.9 → v0.7.10}/core/server.express.js +0 -0
  188. /package/framework/{v0.7.9 → v0.7.10}/core/server.isaac.early-answer.js +0 -0
  189. /package/framework/{v0.7.9 → v0.7.10}/core/server.isaac.rapid-reset.js +0 -0
  190. /package/framework/{v0.7.9 → v0.7.10}/core/server.route-candidates.js +0 -0
  191. /package/framework/{v0.7.9 → v0.7.10}/core/status.codes +0 -0
  192. /package/framework/{v0.7.9 → v0.7.10}/core/template/_gitignore +0 -0
  193. /package/framework/{v0.7.9 → v0.7.10}/core/template/boilerplate/bundle/config/app.json +0 -0
  194. /package/framework/{v0.7.9 → v0.7.10}/core/template/boilerplate/bundle/config/connectors.json +0 -0
  195. /package/framework/{v0.7.9 → v0.7.10}/core/template/boilerplate/bundle/config/routing.json +0 -0
  196. /package/framework/{v0.7.9 → v0.7.10}/core/template/boilerplate/bundle/config/settings.json +0 -0
  197. /package/framework/{v0.7.9 → v0.7.10}/core/template/boilerplate/bundle/config/settings.server.json +0 -0
  198. /package/framework/{v0.7.9 → v0.7.10}/core/template/boilerplate/bundle/config/templates.json +0 -0
  199. /package/framework/{v0.7.9 → v0.7.10}/core/template/boilerplate/bundle/config/watchers.json +0 -0
  200. /package/framework/{v0.7.9 → v0.7.10}/core/template/boilerplate/bundle/controllers/controller.content.js +0 -0
  201. /package/framework/{v0.7.9 → v0.7.10}/core/template/boilerplate/bundle/controllers/controller.js +0 -0
  202. /package/framework/{v0.7.9 → v0.7.10}/core/template/boilerplate/bundle/controllers/setup.js +0 -0
  203. /package/framework/{v0.7.9 → v0.7.10}/core/template/boilerplate/bundle/index.js +0 -0
  204. /package/framework/{v0.7.9 → v0.7.10}/core/template/boilerplate/bundle/locales/en.json +0 -0
  205. /package/framework/{v0.7.9 → v0.7.10}/core/template/boilerplate/bundle_namespace/controllers/controller.js +0 -0
  206. /package/framework/{v0.7.9 → v0.7.10}/core/template/boilerplate/bundle_public/css/default.css +0 -0
  207. /package/framework/{v0.7.9 → v0.7.10}/core/template/boilerplate/bundle_public/css/home.css +0 -0
  208. /package/framework/{v0.7.9 → v0.7.10}/core/template/boilerplate/bundle_public/css/vendor/readme.md +0 -0
  209. /package/framework/{v0.7.9 → v0.7.10}/core/template/boilerplate/bundle_public/favicon.ico +0 -0
  210. /package/framework/{v0.7.9 → v0.7.10}/core/template/boilerplate/bundle_public/js/components/x-checklist.js +0 -0
  211. /package/framework/{v0.7.9 → v0.7.10}/core/template/boilerplate/bundle_public/js/vendor/readme.md +0 -0
  212. /package/framework/{v0.7.9 → v0.7.10}/core/template/boilerplate/bundle_public/manifest.webmanifest +0 -0
  213. /package/framework/{v0.7.9 → v0.7.10}/core/template/boilerplate/bundle_public/readme.md +0 -0
  214. /package/framework/{v0.7.9 → v0.7.10}/core/template/boilerplate/bundle_public/sw.js +0 -0
  215. /package/framework/{v0.7.9 → v0.7.10}/core/template/boilerplate/bundle_templates/handlers/main.js +0 -0
  216. /package/framework/{v0.7.9 → v0.7.10}/core/template/boilerplate/bundle_templates/html/content/homepage.html +0 -0
  217. /package/framework/{v0.7.9 → v0.7.10}/core/template/boilerplate/bundle_templates/html/includes/error-msg-noscript.html +0 -0
  218. /package/framework/{v0.7.9 → v0.7.10}/core/template/boilerplate/bundle_templates/html/includes/error-msg-outdated-browser.html +0 -0
  219. /package/framework/{v0.7.9 → v0.7.10}/core/template/boilerplate/bundle_templates/html/includes/x-checklist.html +0 -0
  220. /package/framework/{v0.7.9 → v0.7.10}/core/template/boilerplate/bundle_templates/html/layouts/main.html +0 -0
  221. /package/framework/{v0.7.9 → v0.7.10}/core/template/command/gina.bat.tpl +0 -0
  222. /package/framework/{v0.7.9 → v0.7.10}/core/template/command/gina.tpl +0 -0
  223. /package/framework/{v0.7.9 → v0.7.10}/core/template/conf/env.json +0 -0
  224. /package/framework/{v0.7.9 → v0.7.10}/core/template/conf/manifest.json +0 -0
  225. /package/framework/{v0.7.9 → v0.7.10}/core/template/conf/package.json +0 -0
  226. /package/framework/{v0.7.9 → v0.7.10}/core/template/conf/settings.json +0 -0
  227. /package/framework/{v0.7.9 → v0.7.10}/core/template/conf/statics.json +0 -0
  228. /package/framework/{v0.7.9 → v0.7.10}/core/template/conf/templates.json +0 -0
  229. /package/framework/{v0.7.9 → v0.7.10}/core/template/error/client/json/401.json +0 -0
  230. /package/framework/{v0.7.9 → v0.7.10}/core/template/error/client/json/403.json +0 -0
  231. /package/framework/{v0.7.9 → v0.7.10}/core/template/error/client/json/404.json +0 -0
  232. /package/framework/{v0.7.9 → v0.7.10}/core/template/error/server/html/50x.html +0 -0
  233. /package/framework/{v0.7.9 → v0.7.10}/core/template/error/server/json/500.json +0 -0
  234. /package/framework/{v0.7.9 → v0.7.10}/core/template/error/server/json/503.json +0 -0
  235. /package/framework/{v0.7.9 → v0.7.10}/core/template/extensions/logger/config.json +0 -0
  236. /package/framework/{v0.7.9 → v0.7.10}/helpers/console.js +0 -0
  237. /package/framework/{v0.7.9 → v0.7.10}/helpers/context.js +0 -0
  238. /package/framework/{v0.7.9 → v0.7.10}/helpers/data/LICENSE +0 -0
  239. /package/framework/{v0.7.9 → v0.7.10}/helpers/data/README.md +0 -0
  240. /package/framework/{v0.7.9 → v0.7.10}/helpers/data/package.json +0 -0
  241. /package/framework/{v0.7.9 → v0.7.10}/helpers/data/src/main.js +0 -0
  242. /package/framework/{v0.7.9 → v0.7.10}/helpers/dateFormat.js +0 -0
  243. /package/framework/{v0.7.9 → v0.7.10}/helpers/index.js +0 -0
  244. /package/framework/{v0.7.9 → v0.7.10}/helpers/json/LICENSE +0 -0
  245. /package/framework/{v0.7.9 → v0.7.10}/helpers/json/README.md +0 -0
  246. /package/framework/{v0.7.9 → v0.7.10}/helpers/json/package.json +0 -0
  247. /package/framework/{v0.7.9 → v0.7.10}/helpers/json/src/main.js +0 -0
  248. /package/framework/{v0.7.9 → v0.7.10}/helpers/path.js +0 -0
  249. /package/framework/{v0.7.9 → v0.7.10}/helpers/plugins/README.md +0 -0
  250. /package/framework/{v0.7.9 → v0.7.10}/helpers/plugins/package.json +0 -0
  251. /package/framework/{v0.7.9 → v0.7.10}/helpers/plugins/src/api-error.js +0 -0
  252. /package/framework/{v0.7.9 → v0.7.10}/helpers/plugins/src/main.js +0 -0
  253. /package/framework/{v0.7.9 → v0.7.10}/helpers/prototypes.js +0 -0
  254. /package/framework/{v0.7.9 → v0.7.10}/helpers/task.js +0 -0
  255. /package/framework/{v0.7.9 → v0.7.10}/helpers/text.js +0 -0
  256. /package/framework/{v0.7.9 → v0.7.10}/lib/admin/package.json +0 -0
  257. /package/framework/{v0.7.9 → v0.7.10}/lib/admin/src/main.js +0 -0
  258. /package/framework/{v0.7.9 → v0.7.10}/lib/archiver/README.md +0 -0
  259. /package/framework/{v0.7.9 → v0.7.10}/lib/archiver/build.json +0 -0
  260. /package/framework/{v0.7.9 → v0.7.10}/lib/archiver/package.json +0 -0
  261. /package/framework/{v0.7.9 → v0.7.10}/lib/archiver/src/dep/jszip.min.js +0 -0
  262. /package/framework/{v0.7.9 → v0.7.10}/lib/archiver/src/main.js +0 -0
  263. /package/framework/{v0.7.9 → v0.7.10}/lib/async/package.json +0 -0
  264. /package/framework/{v0.7.9 → v0.7.10}/lib/async/src/main.js +0 -0
  265. /package/framework/{v0.7.9 → v0.7.10}/lib/audit/package.json +0 -0
  266. /package/framework/{v0.7.9 → v0.7.10}/lib/audit/src/main.js +0 -0
  267. /package/framework/{v0.7.9 → v0.7.10}/lib/audit-store.js +0 -0
  268. /package/framework/{v0.7.9 → v0.7.10}/lib/authn/package.json +0 -0
  269. /package/framework/{v0.7.9 → v0.7.10}/lib/authn/src/lockout.js +0 -0
  270. /package/framework/{v0.7.9 → v0.7.10}/lib/authn/src/main.js +0 -0
  271. /package/framework/{v0.7.9 → v0.7.10}/lib/authn/src/totp.js +0 -0
  272. /package/framework/{v0.7.9 → v0.7.10}/lib/authz-gate/package.json +0 -0
  273. /package/framework/{v0.7.9 → v0.7.10}/lib/authz-gate/src/main.js +0 -0
  274. /package/framework/{v0.7.9 → v0.7.10}/lib/cache/README.md +0 -0
  275. /package/framework/{v0.7.9 → v0.7.10}/lib/cache/build.json +0 -0
  276. /package/framework/{v0.7.9 → v0.7.10}/lib/cache/package.json +0 -0
  277. /package/framework/{v0.7.9 → v0.7.10}/lib/cache/src/main.js +0 -0
  278. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/aliases.json +0 -0
  279. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/audit/arguments.json +0 -0
  280. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/audit/help.txt +0 -0
  281. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/audit/verify.js +0 -0
  282. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/bundle/add.js +0 -0
  283. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/bundle/arguments.json +0 -0
  284. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/bundle/build.js +0 -0
  285. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/bundle/copy.js +0 -0
  286. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/bundle/cp.js +0 -0
  287. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/bundle/help.js +0 -0
  288. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/bundle/help.txt +0 -0
  289. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/bundle/inc/boot-lines.js +0 -0
  290. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/bundle/inc/name-rewrite.js +0 -0
  291. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/bundle/inc/name.js +0 -0
  292. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/bundle/inc/start-status.js +0 -0
  293. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/bundle/list.js +0 -0
  294. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/bundle/man.js +0 -0
  295. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/bundle/mcp-start.js +0 -0
  296. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/bundle/mcp.js +0 -0
  297. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/bundle/oas.js +0 -0
  298. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/bundle/openapi.js +0 -0
  299. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/bundle/remove.js +0 -0
  300. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/bundle/rename.js +0 -0
  301. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/bundle/restart.js +0 -0
  302. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/bundle/rm.js +0 -0
  303. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/bundle/start.js +0 -0
  304. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/bundle/status.js +0 -0
  305. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/bundle/stop.js +0 -0
  306. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/bundle/types.js +0 -0
  307. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/cache/arguments.json +0 -0
  308. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/cache/clear.js +0 -0
  309. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/cache/help.txt +0 -0
  310. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/cache/stats.js +0 -0
  311. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/connector/add.js +0 -0
  312. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/connector/arguments.json +0 -0
  313. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/connector/help.js +0 -0
  314. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/connector/help.txt +0 -0
  315. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/connector/infer.js +0 -0
  316. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/connector/list.js +0 -0
  317. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/connector/migrate.js +0 -0
  318. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/connector/models.js +0 -0
  319. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/connector/remove.js +0 -0
  320. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/connector/rm.js +0 -0
  321. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/connector/test.js +0 -0
  322. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/container/arguments.json +0 -0
  323. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/container/help.js +0 -0
  324. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/container/help.txt +0 -0
  325. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/container/man.js +0 -0
  326. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/container/ps.js +0 -0
  327. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/container/stop.js +0 -0
  328. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/controller/add.js +0 -0
  329. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/controller/arguments.json +0 -0
  330. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/controller/help.txt +0 -0
  331. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/controller/inc/args.js +0 -0
  332. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/controller/inc/namespace.js +0 -0
  333. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/controller/inc/reference-rewrite.js +0 -0
  334. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/controller/inc/reference-scan.js +0 -0
  335. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/controller/inc/scaffold.js +0 -0
  336. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/controller/remove.js +0 -0
  337. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/controller/rename.js +0 -0
  338. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/controller/rm.js +0 -0
  339. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/env/add.js +0 -0
  340. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/env/get.js +0 -0
  341. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/env/help.js +0 -0
  342. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/env/help.txt +0 -0
  343. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/env/inc/name.js +0 -0
  344. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/env/link-dev.js +0 -0
  345. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/env/list.js +0 -0
  346. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/env/remove.js +0 -0
  347. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/env/rm.js +0 -0
  348. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/env/set.js +0 -0
  349. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/env/unset.js +0 -0
  350. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/env/use.js +0 -0
  351. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/framework/add.js +0 -0
  352. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/framework/arguments.json +0 -0
  353. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/framework/build.js +0 -0
  354. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/framework/dot.js +0 -0
  355. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/framework/get.js +0 -0
  356. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/framework/help.js +0 -0
  357. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/framework/help.txt +0 -0
  358. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/framework/inc/child-failure.js +0 -0
  359. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/framework/inc/listen-error.js +0 -0
  360. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/framework/inc/ps-titles.js +0 -0
  361. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/framework/init.js +0 -0
  362. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/framework/link-node-modules.js +0 -0
  363. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/framework/link.js +0 -0
  364. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/framework/list.js +0 -0
  365. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/framework/man.js +0 -0
  366. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/framework/msg.json +0 -0
  367. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/framework/open.js +0 -0
  368. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/framework/remove.js +0 -0
  369. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/framework/reset.js +0 -0
  370. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/framework/restart.js +0 -0
  371. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/framework/set.js +0 -0
  372. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/framework/start.js +0 -0
  373. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/framework/status.js +0 -0
  374. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/framework/stop.js +0 -0
  375. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/framework/tail.js +0 -0
  376. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/framework/update.js +0 -0
  377. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/framework/version.js +0 -0
  378. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/gina-dev.1.md +0 -0
  379. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/gina-framework.1.md +0 -0
  380. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/gina.1.md +0 -0
  381. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/helper.js +0 -0
  382. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/i18n/add.js +0 -0
  383. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/i18n/arguments.json +0 -0
  384. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/i18n/export.js +0 -0
  385. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/i18n/help.js +0 -0
  386. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/i18n/help.txt +0 -0
  387. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/i18n/import.js +0 -0
  388. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/i18n/scan.js +0 -0
  389. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/image/_host.js +0 -0
  390. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/image/arguments.json +0 -0
  391. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/image/build.js +0 -0
  392. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/image/help.js +0 -0
  393. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/image/help.txt +0 -0
  394. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/image/list.js +0 -0
  395. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/image/man.js +0 -0
  396. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/image/rm.js +0 -0
  397. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/image/run.js +0 -0
  398. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/index.js +0 -0
  399. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/inspector/help.js +0 -0
  400. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/inspector/help.txt +0 -0
  401. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/inspector/open.js +0 -0
  402. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/man-render.js +0 -0
  403. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/minion/arguments.json +0 -0
  404. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/minion/help.js +0 -0
  405. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/minion/help.txt +0 -0
  406. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/minion/kill.js +0 -0
  407. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/minion/list.js +0 -0
  408. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/msg.json +0 -0
  409. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/port/help.js +0 -0
  410. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/port/help.txt +0 -0
  411. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/port/inc/scan.js +0 -0
  412. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/port/list.js +0 -0
  413. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/port/reset.js +0 -0
  414. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/port/set.js +0 -0
  415. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/project/add.js +0 -0
  416. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/project/arguments.json +0 -0
  417. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/project/backup.js +0 -0
  418. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/project/build.js +0 -0
  419. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/project/help.js +0 -0
  420. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/project/help.txt +0 -0
  421. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/project/import.js +0 -0
  422. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/project/inc/name.js +0 -0
  423. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/project/list.js +0 -0
  424. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/project/man.js +0 -0
  425. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/project/move.js +0 -0
  426. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/project/remove.js +0 -0
  427. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/project/rename.js +0 -0
  428. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/project/restart.js +0 -0
  429. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/project/restore.js +0 -0
  430. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/project/rm.js +0 -0
  431. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/project/start.js +0 -0
  432. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/project/status.js +0 -0
  433. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/project/stop.js +0 -0
  434. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/protocol/arguments.json +0 -0
  435. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/protocol/help.js +0 -0
  436. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/protocol/help.txt +0 -0
  437. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/protocol/list.js +0 -0
  438. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/protocol/remove.js +0 -0
  439. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/protocol/set.js +0 -0
  440. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/scope/add.js +0 -0
  441. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/scope/help.js +0 -0
  442. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/scope/help.txt +0 -0
  443. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/scope/inc/name.js +0 -0
  444. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/scope/link-local.js +0 -0
  445. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/scope/link-production.js +0 -0
  446. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/scope/list.js +0 -0
  447. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/scope/remove.js +0 -0
  448. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/scope/rm.js +0 -0
  449. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/scope/use.js +0 -0
  450. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/secrets/arguments.json +0 -0
  451. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/secrets/check.js +0 -0
  452. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/secrets/help.js +0 -0
  453. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/secrets/help.txt +0 -0
  454. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/secrets/scan.js +0 -0
  455. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/service/help.js +0 -0
  456. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/service/help.txt +0 -0
  457. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/service/list.js +0 -0
  458. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/service/man.js +0 -0
  459. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/service/start.js +0 -0
  460. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/storage/arguments.json +0 -0
  461. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/storage/gc.js +0 -0
  462. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/storage/help.txt +0 -0
  463. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/storage/stats.js +0 -0
  464. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/storage/verify.js +0 -0
  465. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd/view/add.js +0 -0
  466. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd-status-format/package.json +0 -0
  467. /package/framework/{v0.7.9 → v0.7.10}/lib/cmd-status-format/src/main.js +0 -0
  468. /package/framework/{v0.7.9 → v0.7.10}/lib/collection/README.md +0 -0
  469. /package/framework/{v0.7.9 → v0.7.10}/lib/collection/build.json +0 -0
  470. /package/framework/{v0.7.9 → v0.7.10}/lib/collection/package.json +0 -0
  471. /package/framework/{v0.7.9 → v0.7.10}/lib/collection/src/main.js +0 -0
  472. /package/framework/{v0.7.9 → v0.7.10}/lib/conf-view/package.json +0 -0
  473. /package/framework/{v0.7.9 → v0.7.10}/lib/conf-view/src/main.js +0 -0
  474. /package/framework/{v0.7.9 → v0.7.10}/lib/config.js +0 -0
  475. /package/framework/{v0.7.9 → v0.7.10}/lib/connector-config/package.json +0 -0
  476. /package/framework/{v0.7.9 → v0.7.10}/lib/connector-config/src/main.js +0 -0
  477. /package/framework/{v0.7.9 → v0.7.10}/lib/connector-error/package.json +0 -0
  478. /package/framework/{v0.7.9 → v0.7.10}/lib/connector-error/src/main.js +0 -0
  479. /package/framework/{v0.7.9 → v0.7.10}/lib/connector-registry/package.json +0 -0
  480. /package/framework/{v0.7.9 → v0.7.10}/lib/connector-registry/src/main.js +0 -0
  481. /package/framework/{v0.7.9 → v0.7.10}/lib/cron/README.md +0 -0
  482. /package/framework/{v0.7.9 → v0.7.10}/lib/cron/package.json +0 -0
  483. /package/framework/{v0.7.9 → v0.7.10}/lib/cron/src/main.js +0 -0
  484. /package/framework/{v0.7.9 → v0.7.10}/lib/domain/LICENSE +0 -0
  485. /package/framework/{v0.7.9 → v0.7.10}/lib/domain/README.md +0 -0
  486. /package/framework/{v0.7.9 → v0.7.10}/lib/domain/package.json +0 -0
  487. /package/framework/{v0.7.9 → v0.7.10}/lib/domain/src/main.js +0 -0
  488. /package/framework/{v0.7.9 → v0.7.10}/lib/dto/package.json +0 -0
  489. /package/framework/{v0.7.9 → v0.7.10}/lib/dto/src/main.js +0 -0
  490. /package/framework/{v0.7.9 → v0.7.10}/lib/dto-pipe/package.json +0 -0
  491. /package/framework/{v0.7.9 → v0.7.10}/lib/dto-pipe/src/main.js +0 -0
  492. /package/framework/{v0.7.9 → v0.7.10}/lib/dto-types/package.json +0 -0
  493. /package/framework/{v0.7.9 → v0.7.10}/lib/dto-types/src/main.js +0 -0
  494. /package/framework/{v0.7.9 → v0.7.10}/lib/duration/package.json +0 -0
  495. /package/framework/{v0.7.9 → v0.7.10}/lib/duration/src/main.js +0 -0
  496. /package/framework/{v0.7.9 → v0.7.10}/lib/error-ref/package.json +0 -0
  497. /package/framework/{v0.7.9 → v0.7.10}/lib/error-ref/src/main.js +0 -0
  498. /package/framework/{v0.7.9 → v0.7.10}/lib/generator/index.js +0 -0
  499. /package/framework/{v0.7.9 → v0.7.10}/lib/i18n/package.json +0 -0
  500. /package/framework/{v0.7.9 → v0.7.10}/lib/i18n/src/main.js +0 -0
  501. /package/framework/{v0.7.9 → v0.7.10}/lib/idempotency/package.json +0 -0
  502. /package/framework/{v0.7.9 → v0.7.10}/lib/idempotency/src/main.js +0 -0
  503. /package/framework/{v0.7.9 → v0.7.10}/lib/image-build/package.json +0 -0
  504. /package/framework/{v0.7.9 → v0.7.10}/lib/image-build/src/main.js +0 -0
  505. /package/framework/{v0.7.9 → v0.7.10}/lib/index.js +0 -0
  506. /package/framework/{v0.7.9 → v0.7.10}/lib/inherits/LICENSE +0 -0
  507. /package/framework/{v0.7.9 → v0.7.10}/lib/inherits/README.md +0 -0
  508. /package/framework/{v0.7.9 → v0.7.10}/lib/inherits/package.json +0 -0
  509. /package/framework/{v0.7.9 → v0.7.10}/lib/inherits/src/main.js +0 -0
  510. /package/framework/{v0.7.9 → v0.7.10}/lib/inspector-events/package.json +0 -0
  511. /package/framework/{v0.7.9 → v0.7.10}/lib/inspector-events/src/main.js +0 -0
  512. /package/framework/{v0.7.9 → v0.7.10}/lib/inspector-redact/package.json +0 -0
  513. /package/framework/{v0.7.9 → v0.7.10}/lib/inspector-redact/src/main.js +0 -0
  514. /package/framework/{v0.7.9 → v0.7.10}/lib/instrument/package.json +0 -0
  515. /package/framework/{v0.7.9 → v0.7.10}/lib/instrument/src/main.js +0 -0
  516. /package/framework/{v0.7.9 → v0.7.10}/lib/job/package.json +0 -0
  517. /package/framework/{v0.7.9 → v0.7.10}/lib/job/src/main.js +0 -0
  518. /package/framework/{v0.7.9 → v0.7.10}/lib/job-store.js +0 -0
  519. /package/framework/{v0.7.9 → v0.7.10}/lib/json-config-header/package.json +0 -0
  520. /package/framework/{v0.7.9 → v0.7.10}/lib/json-config-header/src/main.js +0 -0
  521. /package/framework/{v0.7.9 → v0.7.10}/lib/kv/package.json +0 -0
  522. /package/framework/{v0.7.9 → v0.7.10}/lib/kv/src/main.js +0 -0
  523. /package/framework/{v0.7.9 → v0.7.10}/lib/kv-store.js +0 -0
  524. /package/framework/{v0.7.9 → v0.7.10}/lib/lane/package.json +0 -0
  525. /package/framework/{v0.7.9 → v0.7.10}/lib/lane/src/main.js +0 -0
  526. /package/framework/{v0.7.9 → v0.7.10}/lib/loading-state/package.json +0 -0
  527. /package/framework/{v0.7.9 → v0.7.10}/lib/loading-state/src/main.js +0 -0
  528. /package/framework/{v0.7.9 → v0.7.10}/lib/logger/README.md +0 -0
  529. /package/framework/{v0.7.9 → v0.7.10}/lib/logger/package.json +0 -0
  530. /package/framework/{v0.7.9 → v0.7.10}/lib/logger/src/containers/default/index.js +0 -0
  531. /package/framework/{v0.7.9 → v0.7.10}/lib/logger/src/containers/file/index.js +0 -0
  532. /package/framework/{v0.7.9 → v0.7.10}/lib/logger/src/containers/mq/index.js +0 -0
  533. /package/framework/{v0.7.9 → v0.7.10}/lib/logger/src/containers/mq/listener.js +0 -0
  534. /package/framework/{v0.7.9 → v0.7.10}/lib/logger/src/containers/mq/speaker.js +0 -0
  535. /package/framework/{v0.7.9 → v0.7.10}/lib/logger/src/helper.js +0 -0
  536. /package/framework/{v0.7.9 → v0.7.10}/lib/logger/src/main.js +0 -0
  537. /package/framework/{v0.7.9 → v0.7.10}/lib/logger/src/redact.js +0 -0
  538. /package/framework/{v0.7.9 → v0.7.10}/lib/maintenance/package.json +0 -0
  539. /package/framework/{v0.7.9 → v0.7.10}/lib/maintenance/src/main.js +0 -0
  540. /package/framework/{v0.7.9 → v0.7.10}/lib/math/index.js +0 -0
  541. /package/framework/{v0.7.9 → v0.7.10}/lib/mcp-dispatch/package.json +0 -0
  542. /package/framework/{v0.7.9 → v0.7.10}/lib/mcp-dispatch/src/main.js +0 -0
  543. /package/framework/{v0.7.9 → v0.7.10}/lib/mcp-http/package.json +0 -0
  544. /package/framework/{v0.7.9 → v0.7.10}/lib/mcp-http/src/main.js +0 -0
  545. /package/framework/{v0.7.9 → v0.7.10}/lib/mcp-server/package.json +0 -0
  546. /package/framework/{v0.7.9 → v0.7.10}/lib/mcp-server/src/main.js +0 -0
  547. /package/framework/{v0.7.9 → v0.7.10}/lib/merge/README.md +0 -0
  548. /package/framework/{v0.7.9 → v0.7.10}/lib/merge/package.json +0 -0
  549. /package/framework/{v0.7.9 → v0.7.10}/lib/merge/src/main.js +0 -0
  550. /package/framework/{v0.7.9 → v0.7.10}/lib/message-validator/package.json +0 -0
  551. /package/framework/{v0.7.9 → v0.7.10}/lib/message-validator/src/main.js +0 -0
  552. /package/framework/{v0.7.9 → v0.7.10}/lib/metrics/package.json +0 -0
  553. /package/framework/{v0.7.9 → v0.7.10}/lib/metrics/src/main.js +0 -0
  554. /package/framework/{v0.7.9 → v0.7.10}/lib/model.js +0 -0
  555. /package/framework/{v0.7.9 → v0.7.10}/lib/money/package.json +0 -0
  556. /package/framework/{v0.7.9 → v0.7.10}/lib/money/src/main.js +0 -0
  557. /package/framework/{v0.7.9 → v0.7.10}/lib/multipart/package.json +0 -0
  558. /package/framework/{v0.7.9 → v0.7.10}/lib/multipart/src/main.js +0 -0
  559. /package/framework/{v0.7.9 → v0.7.10}/lib/net-locality/package.json +0 -0
  560. /package/framework/{v0.7.9 → v0.7.10}/lib/net-locality/src/main.js +0 -0
  561. /package/framework/{v0.7.9 → v0.7.10}/lib/nunjucks-filters/README.md +0 -0
  562. /package/framework/{v0.7.9 → v0.7.10}/lib/nunjucks-filters/package.json +0 -0
  563. /package/framework/{v0.7.9 → v0.7.10}/lib/nunjucks-filters/src/main.js +0 -0
  564. /package/framework/{v0.7.9 → v0.7.10}/lib/nunjucks-resolver/package.json +0 -0
  565. /package/framework/{v0.7.9 → v0.7.10}/lib/nunjucks-resolver/src/main.js +0 -0
  566. /package/framework/{v0.7.9 → v0.7.10}/lib/priority/package.json +0 -0
  567. /package/framework/{v0.7.9 → v0.7.10}/lib/priority/src/main.js +0 -0
  568. /package/framework/{v0.7.9 → v0.7.10}/lib/proc.js +0 -0
  569. /package/framework/{v0.7.9 → v0.7.10}/lib/push/package.json +0 -0
  570. /package/framework/{v0.7.9 → v0.7.10}/lib/push/src/main.js +0 -0
  571. /package/framework/{v0.7.9 → v0.7.10}/lib/rate-limit/package.json +0 -0
  572. /package/framework/{v0.7.9 → v0.7.10}/lib/rate-limit/src/main.js +0 -0
  573. /package/framework/{v0.7.9 → v0.7.10}/lib/release-watch/package.json +0 -0
  574. /package/framework/{v0.7.9 → v0.7.10}/lib/release-watch/src/main.js +0 -0
  575. /package/framework/{v0.7.9 → v0.7.10}/lib/render-cache/package.json +0 -0
  576. /package/framework/{v0.7.9 → v0.7.10}/lib/render-cache-store.js +0 -0
  577. /package/framework/{v0.7.9 → v0.7.10}/lib/routing/README.md +0 -0
  578. /package/framework/{v0.7.9 → v0.7.10}/lib/routing/build.json +0 -0
  579. /package/framework/{v0.7.9 → v0.7.10}/lib/routing/package.json +0 -0
  580. /package/framework/{v0.7.9 → v0.7.10}/lib/routing/src/main.js +0 -0
  581. /package/framework/{v0.7.9 → v0.7.10}/lib/routing-introspect/package.json +0 -0
  582. /package/framework/{v0.7.9 → v0.7.10}/lib/routing-introspect/src/main.js +0 -0
  583. /package/framework/{v0.7.9 → v0.7.10}/lib/secrets/package.json +0 -0
  584. /package/framework/{v0.7.9 → v0.7.10}/lib/secrets/src/backends/env.js +0 -0
  585. /package/framework/{v0.7.9 → v0.7.10}/lib/secrets/src/backends/exec.js +0 -0
  586. /package/framework/{v0.7.9 → v0.7.10}/lib/secrets/src/backends/file.js +0 -0
  587. /package/framework/{v0.7.9 → v0.7.10}/lib/secrets/src/declaration.js +0 -0
  588. /package/framework/{v0.7.9 → v0.7.10}/lib/secrets/src/env-file.js +0 -0
  589. /package/framework/{v0.7.9 → v0.7.10}/lib/secrets/src/main.js +0 -0
  590. /package/framework/{v0.7.9 → v0.7.10}/lib/secrets/src/sources.js +0 -0
  591. /package/framework/{v0.7.9 → v0.7.10}/lib/security-headers-emitter/package.json +0 -0
  592. /package/framework/{v0.7.9 → v0.7.10}/lib/security-headers-emitter/src/main.js +0 -0
  593. /package/framework/{v0.7.9 → v0.7.10}/lib/session-lifetime/package.json +0 -0
  594. /package/framework/{v0.7.9 → v0.7.10}/lib/session-lifetime/src/main.js +0 -0
  595. /package/framework/{v0.7.9 → v0.7.10}/lib/session-store.js +0 -0
  596. /package/framework/{v0.7.9 → v0.7.10}/lib/shell.js +0 -0
  597. /package/framework/{v0.7.9 → v0.7.10}/lib/sqlite-driver.js +0 -0
  598. /package/framework/{v0.7.9 → v0.7.10}/lib/sri/package.json +0 -0
  599. /package/framework/{v0.7.9 → v0.7.10}/lib/sri/src/main.js +0 -0
  600. /package/framework/{v0.7.9 → v0.7.10}/lib/state.js +0 -0
  601. /package/framework/{v0.7.9 → v0.7.10}/lib/storage/package.json +0 -0
  602. /package/framework/{v0.7.9 → v0.7.10}/lib/storage/src/local-cas.js +0 -0
  603. /package/framework/{v0.7.9 → v0.7.10}/lib/storage/src/local-stream.js +0 -0
  604. /package/framework/{v0.7.9 → v0.7.10}/lib/storage/src/local.js +0 -0
  605. /package/framework/{v0.7.9 → v0.7.10}/lib/storage/src/main.js +0 -0
  606. /package/framework/{v0.7.9 → v0.7.10}/lib/storage/src/meta-store.js +0 -0
  607. /package/framework/{v0.7.9 → v0.7.10}/lib/storage/src/s3.js +0 -0
  608. /package/framework/{v0.7.9 → v0.7.10}/lib/storage/src/util.js +0 -0
  609. /package/framework/{v0.7.9 → v0.7.10}/lib/storage-store.js +0 -0
  610. /package/framework/{v0.7.9 → v0.7.10}/lib/swig-filters/README.md +0 -0
  611. /package/framework/{v0.7.9 → v0.7.10}/lib/swig-filters/package.json +0 -0
  612. /package/framework/{v0.7.9 → v0.7.10}/lib/swig-filters/src/main.js +0 -0
  613. /package/framework/{v0.7.9 → v0.7.10}/lib/swig-resolver/package.json +0 -0
  614. /package/framework/{v0.7.9 → v0.7.10}/lib/swig-resolver/src/main.js +0 -0
  615. /package/framework/{v0.7.9 → v0.7.10}/lib/template-loaders/package.json +0 -0
  616. /package/framework/{v0.7.9 → v0.7.10}/lib/template-loaders/src/loaders/http.js +0 -0
  617. /package/framework/{v0.7.9 → v0.7.10}/lib/template-loaders/src/loaders/memory.js +0 -0
  618. /package/framework/{v0.7.9 → v0.7.10}/lib/template-loaders/src/main.js +0 -0
  619. /package/framework/{v0.7.9 → v0.7.10}/lib/url/README.md +0 -0
  620. /package/framework/{v0.7.9 → v0.7.10}/lib/url/index.js +0 -0
  621. /package/framework/{v0.7.9 → v0.7.10}/lib/url/routing.json +0 -0
  622. /package/framework/{v0.7.9 → v0.7.10}/lib/uuid/package.json +0 -0
  623. /package/framework/{v0.7.9 → v0.7.10}/lib/uuid/src/main.js +0 -0
  624. /package/framework/{v0.7.9 → v0.7.10}/lib/validator.js +0 -0
  625. /package/framework/{v0.7.9 → v0.7.10}/lib/watcher/package.json +0 -0
  626. /package/framework/{v0.7.9 → v0.7.10}/lib/watcher/src/main.js +0 -0
  627. /package/framework/{v0.7.9 → v0.7.10}/lib/ws-framing/package.json +0 -0
  628. /package/framework/{v0.7.9 → v0.7.10}/lib/ws-framing/src/main.js +0 -0
  629. /package/framework/{v0.7.9 → v0.7.10}/lib/ws-query/package.json +0 -0
  630. /package/framework/{v0.7.9 → v0.7.10}/lib/ws-query/src/main.js +0 -0
  631. /package/framework/{v0.7.9 → v0.7.10}/lib/ws-session/package.json +0 -0
  632. /package/framework/{v0.7.9 → v0.7.10}/lib/ws-session/src/main.js +0 -0
package/llms.txt CHANGED
@@ -956,15 +956,15 @@ Dev-mode query instrumentation captures every database query tied to the current
956
956
 
957
957
  206. **Observable application events surface in the dev Inspector via a per-request signal that mirrors #AISTREAM — `self.emitEvent(name, metadata)` (controller) or `lib/inspector-events.emit()` (model/service code) pushes a `{type:'event',id,name,t[,meta]}` entry and emits a live `inspector#event` frame, delivered as an `event: event` SSE/WS frame plus a `user.events` end-of-request snapshot, shown in a new SPA "Events" tab (#EVTBUS, 2026-06-29).** The per-request buffer `_devEventLog` is a THIRD key on the shared `process.gina._queryALS` store (sibling of `_devQueryLog`/`_devAiLog`, seeded at `controller.js` `setOptions`); `emit()` reaches it via `getStore()` so the snapshot is captured from any code in the request's async context (outside one — a background job / lifecycle hook — the live frame still fires but no snapshot is pushed, per Slice 2b below; a closed gate or invalid name is a no-op). Capture is gated on `NODE_ENV_IS_DEV` OR an open `process.gina._inspectorWindowUntil` (identical to the query/AI gates). The event NAME + framework stamps always ride the wire; the caller's `metadata` VALUES ride ONLY when `settings.inspector.events.captureArgs` is true (default off, seeded onto `process.gina._inspectorEventsCaptureArgs` at boot) — `lib/inspector-redact` matches secret-NAMED keys only and cannot sanitise arbitrary arg VALUES, so the gate + opt-in + authenticated channel are the protection, never redaction (same contract as #AISTREAM `captureText`). Delivery: a `server.isaac.js` SSE forwarder (`event: event`) + a `server.js` WS forwarder (`{event:'event'}`), registered/deregistered beside the data/log/token listeners; the `user.events` snapshot is attached at the SAME 5 render sites as `user.aiStream` (render-json + inspector-window-emit on `_gdUser`, render-swig cache-hit/miss + render-nunjucks on `data.page.events`), gated on `local._eventLog.length`. **Three carry-forward facts:** (1) the SPA `appendAppEvent` ACCUMULATES a capped rolling buffer (NOT single-slot-reset like `appendTokenDelta` — events are discrete, not one token stream), renders via `.textContent` (untrusted app text), and the `renderTab` `case 'events':` prefers the live buffer then falls back to the request snapshot; (2) the live `event: event` frame rides isaac-SSE + server.js-WS, and (#AISTREAM/#EVTBUS parity gap CLOSED 2026-06-29) the server.js HTTP/1 SSE `/_gina/agent` handler now forwards token + event too via `response.write` (mirroring isaac's `_agWrite` shape) — all three live transports now carry all four frame types and `event-inspection.test.js §08` is a positive pin; (3) `event` is NOT an EventSource-reserved name (unlike open/message/error) so `event: event` is collision-free. Adding the 8th SPA tab updates the 3 `TAB_LAYOUTS` presets → trips `inspector.test.js §44`'s exact-tab-set pins (now 8 tabs, updated with approval). `lib/inspector-events` registered via `_require` (stateless). There are zero pre-existing app/domain events in the framework (the only `process.emit` namespaces are `inspector#`/`logger#`/`gina#`, all internal), so the emit API is the headline — without it the signal surfaces nothing. Slice 2a (SHIPPED 2026-06-29): a curated allow-list (`settings.inspector.events.topics`, default `[]`) bridges entity-trigger emits onto the live signal via a gated block in `entity.js`'s `emit` chokepoint — skips `error`, gated on a non-empty allow-list FIRST (the opt-in IS the flood control), ships a framework-controlled `{ok,error}` summary (never raw rows; captureArgs-gated like all metadata — name+source always ride, the `{ok,error}` summary reaches the wire only when captureArgs is on, default off) tagged `source:'framework'` (a new optional 3rd arg to `inspector-events.emit` + an exported `matchTopics` helper: exact / single leading-or-trailing `*`); reached via `require('lib/inspector-events')`; request-scoped so it reuses the MVP live+snapshot delivery (no new transport/ALS key/tab). The chokepoint catches every entity emit with ZERO per-instance `.on()` / `ENTITY_MAX_LISTENERS` use (the original deferred note had conflated flood with listener-exhaustion). Only the couchbase connector emits named CRUD (`N1QL:<entity>#<method>`); the other 5 don't, and CRUD is largely redundant with the Query tab — so 2a's genuinely-new value is custom (non-query) entity methods. Slice 2b (SHIPPED 2026-06-29): an emit refactor SPLITS the store-gated buffer push from an always-on live emit — once the gate passes the live `inspector#event` frame fires store-or-not (a no-store background-job / lifecycle caller now reaches the stream; only the per-request snapshot needs a store), return `true`⟺live-frame-emitted / `false` only for gate-closed or invalid-name; this flipped §01 (`:58-63`) and CHANGED the no-op-outside-request contract, deliberately diverging from #AISTREAM (whose live `inspector#token` emit is itself store-gated at `ai/index.js` `if(_aiLog)`). On top of it a connector-lifecycle bridge surfaces a connector's recurring `ready` emit (re-fired on every reconnect) via a single additive `connector.on('ready')` at the construct-once site in `core/model/index.js this.connect` (attached once in the cache-miss branch → no per-reconnect accumulation; the existing `onReady` consumer is a one-shot `once('ready')`; couchbase is the only connector emitting `ready` today, the other 5 use a direct onReady callback; redis session-store connect/disconnect — the only other recurring pair — has no framework seam so it is deferred), live-only (lifecycle events have no request context → no snapshot, exactly the no-store path the refactor unblocked), reusing the same `_inspectorEventTopics` allow-list + `matchTopics` + `source:'framework'` tag + `{ok,error}` summary (no new config key). Tests: `test/core/event-inspection.test.js` (§01 real-module behaviour incl. the no-store live-emit, §02-§09 server wiring, §10-§11 SPA + dist propagation, §12-§14 Slice 2a: source/matchTopics + entity-bridge source-pins/replica + topics seed, §15 Slice 2b connector-lifecycle bridge: model/index.js source-pins + replica). Slices A1a `b2157113` / A1b `bb3103f1` / A1c `4f844bd6`; Slice 2b emit refactor `ea55a489` + connector-lifecycle bridge. Slices 2a + the 2b always-on-emit substrate LIVE-VERIFIED e2e 2026-06-30 (entity op → `inspector#event` frame + `user.events` snapshot; a no-store background emit → live frame), which also corrected the captureArgs note above; the couchbase-specific `couchbase#ready` reconnect→frame e2e is source + unit-replica only (no self-controlled couchbase env).
958
958
 
959
- 209. **FormValidator — engine disambiguation, string inputs, a11y reflection, and live-check message visibility (consolidates former #42/#130/#150/#186/#197).** The live form/data rule engine is `core/plugins/lib/validator/src/form-validator.js` (single source, `isGFFCtx`-branched: runs server-side via `backendInit` AND compiled into the browser bundle) with the client orchestration in `validator/src/main.js` — `framework/v*/lib/validator.js` is a DEAD standalone fluent validator with overlapping `is*` rule names; never edit it for form-rule work (tell them apart fast: the live engine's `isRequired` rejects whitespace-only input, the dead one passes it). Rule bodies must handle STRING inputs — the two DECLARATIVE contexts feed strings (`.value` + urlencoded bodies) — so a typed/numeric rule coerces or parses explicit components, never assumes a typed JS value; but "always a string" is NOT true of every path, and reading it that way shipped #B198 (see below): a JSON request body keeps real Numbers (`JSON.parse` → `req.body`/`req.post`, which the `validator::{}` routing path MERGES into the validated data before spreading array bounds through `apply()`), and `toInteger` leaves `Math.round()`'s real Number on `this.value`, so a `toInteger` → `is*` chain hands the next rule a Number even in the browser — a rule must therefore be correct for a typed value too, not merely tolerant of strings: `isFloat` coerces via `Number()` (#B46); `isDate` builds from explicit mask components + a round-trip check so non-ISO slash masks aren't US-misparsed and impossible dates still reject (#B47); `isDate` returns the FIELD again on its valid path (#B48, 0.5.4 — parsed `Date` preserved on the field's `.value`, the `isDate(mask).format(...)` idiom unchanged), so rule chaining works. ⚠️ **The FIELD keeps the `Date`; the PAYLOAD takes a `yyyy-mm-dd` string, always (#B558, 0.6.32-alpha.2).** Every validator normalises the payload to the validated canonical form (`isEmail` lowercases, `isBoolean` → boolean, `isNumber` → `Number`), so `isDate` normalising is consistent — but `Date` is the one normalised type that does NOT round-trip through JSON: `JSON.stringify` renders it via `toISOString()`, a UTC **instant**, and local midnight at any positive UTC offset is the PREVIOUS day in UTC. So a browser in Paris submitting `2026-09-18` sent `2026-09-17T22:00:00.000Z` and every reader that sliced the date part stored the 17th — silent (the instant is well-formed) and invisible to a server or CI running in UTC. The written shape is mask-INDEPENDENT: the mask governs INPUT parsing, while both `requirementToSchema()` and `dto.date()` already published the field as `{type:'string', format:'date'}` (RFC 3339 full-date, explicitly NOT `date-time`), so the payload now matches the schema gina was already advertising. Consumer-visible: `req.body.<field>` is a string, not a `Date`, and `new Date('2026-09-18')` on a date-only string is UTC midnight, not local midnight. An empty value is adjudicated by `isRequired` ALONE (#B78): the per-rule empty-bypass became unconditional on empty (`if (this.value == '')`, its old `!errors['isRequired']` gate dropped) for `isEmail`/`isJsonWebToken`/`isFloat`/`isInList` — each regating `this.valid = isValid && !errors['isRequired']` — and `isString` keeps the field invalid without recording a second message, so a required-empty field shows ONE message (`is required`) not two, optional empty fields still pass, a filled-but-invalid value still reports its own error, and custom `is` was deliberately excluded by #B78 and re-declined by #B82 — an exclusion REVERSED by #B233 (2026-08-03, 0.6.3, `307721f2`): `is` now carries the same canonical strict bypass (`if ( this.value === '' ) { isValid = true; }`) and the same regate, taking the Shape-A population from four rules to FIVE, so a required+EMPTY field carrying an `is` condition records `isRequired` ALONE instead of also collecting a second `Condition not satisfied`. `isBoolean` joined the same contract at #B235 (2026-08-03, 0.6.3, `aa1c2035`), taking that population to SIX: its pre-switch rescue `errors['isRequired'] && this.value == false` was LOOSE (`'' == false`), so a required+EMPTY boolean field LOST its isRequired error and reported `Must be a valid boolean` instead of `Cannot be left empty`; the rule now takes the canonical strict `=== ''` self-pass, and the rescue moves AFTER the accept-set switch gated on the value having been ACCEPTED (`val !== null`) — which keeps the documented unchecked-but-required-toggle case working, since a recognized `false`/`0` is a present answer, while emptiness returns to `isRequired` alone. Paired in the same commit with #B236, the SERVER-side half: the plugin's `getCastedValue` funneled EVERY value on an isBoolean-ruled field through `/^true$/i ? true : false` BEFORE the engine ran (client AND server — `validate` calls `formatFields` unconditionally), so on the server auto path junk validated CLEAN and PERSISTED as `false` — `nope`, the HTML checkbox default `on` (a CHECKED box storing UNchecked), the strings `1`/`0`, `TRUE`/`True` — and the NUMBER 1 stored `false` where the engine reads it as `true`. The pre-cast now survives ONLY in dynamised-rules mode, where a referenced boolean field must splice into a stringified `is` condition as an unquoted operand (measured NECESSARY: deleting it outright breaks a server `$flag === true` condition); the ENGINE is the single adjudicator on every surface, which is what the routing `validator::` surface always enforced and what the published reference already promised. Disclosed both directions: values that silently stored `false` now ERROR, the number 1 flips its stored value `false`→`true` on a verdict that was already valid, an optional blank boolean field now PASSES instead of erroring, and a required blank field's message changes from isBoolean to isRequired. A sibling server-path crash in the same plugin is fixed by #B234 (2026-08-03, 0.6.3, `7c56565d`): `getDynamisedRules` substitutes in two passes, and the SECOND is a DOM fallback re-deriving each splice value from the live element (`$fields[...].value`) — which `backendInit` calls with `$fields = null`, so it threw `TypeError: Cannot read properties of null` on its FIRST iteration for ANY `$` surviving pass 1: a regex end-anchor in an `is` condition, a `$` inside a human-readable message string, or a `$` in any array-rule element after the first. Plain cross-field `$peer === $me` never crashed, because pass 1 consumes tokens that NAME fields. The loop is now gated `$fields && ...`, joining the #B127 precedent one function later; `validate`'s same-text gate is deliberately left UNGUARDED, being reachable only with a live DOM. Residual, disclosed — and since FIXED (#B239): a `$` token in an ARRAY rule's FIRST argument that names no field (`isInList: ['$100']`) threw one site later at `checkFieldAgainstRules`' `d[<token>].value` — NOT DOM-dependent, so it reached the client too. The substitution is now gated on the token resolving to a REAL field (an existing `d` key with a defined `.value` — two clauses, both load-bearing: an engine-METHOD-name collision like `'$isValid'` resolves to a defined key with no `.value`, and pre-fix spliced the string "undefined" into the rule for a silent wrong verdict rather than a crash); anything else stays LITERAL so strict comparison applies (`'$100'` matches its own literal, rejects non-members with the rule's own error; bare-`$` and mixed elements covered). `$` is therefore the engine's RESERVED cross-field sigil: whether an authored `$` stays literal depends on a runtime field-name collision — a token naming a sibling field is consumed UPSTREAM by getDynamisedRules loop 1, substituted with quoting fit for `is`-condition splices, not array elements (`"yes"` with quotes can never match `yes`), so real cross-field refs in array-rule elements are always-invalid, fail-closed, never-worked, undocumented (the reference scopes `$name` to `is` expressions) — tracked as #B240 (demand-gated; the fix is relocating array-element substitution into checkFieldAgainstRules, whose guarded loop is deliberately preserved as the substrate). This reserved-sigil model is also the #DTO2 `$` guard's CURRENT rationale (the crash rationale is retired — deterministic literal semantics are impossible for any `$`, so toRules() refuses at boot rather than validate collision-dependently). The reversal is measured rather than re-argued: the old bypass was gated on `!errors['isRequired']` — off exactly when #B78 wants it on — beside a two-disjunct guard that was DEAD CODE (`x == '' && x != 0` has no witness), optional+empty ALREADY self-passed through the live else-if, and on required+empty the condition is VERDICT-IRRELEVANT (form validity is `getErrors().count()` and `isRequired` has already errored), so form validity and the request payload are identical in both directions and only the message list changes; the "coercion-sensitive" premise had already been retired by #B199's strict test, which leaves `0`/`false`/`null` as operands that still evaluate the condition. #B82 is neither regressed nor retired — its root `getCastedValue` quoting and its `is()` grammar guard stay necessary and reachable with a FILLED host; #B233 only closes that crash path a second time for an empty HOST, whose condition is no longer compiled at all. Same commit drops the dead `_defaultErrorLabels['isApiError']` entry (zero consult sites: the API path assigns the server's message directly and never calls `replace()`) - but a cross-field `is` (`"$a === $b"`) no longer THROWS when the referenced field is empty (#B82): the client dynamised-rules substitution (`getCastedValue` in `main.js`) now renders an empty referenced operand as a quoted `""` (it was spliced RAW, leaving a dangling `"7654321" === ` that `is()`'s binary-comparison grammar `_SCS_BINARY_RE` rejected -> an uncaught throw that aborted the whole-form validity pass and left the submit trigger ungated on an invalid form, breaking the documented `is`+`isRequired` value-confirmation pattern while the confirm field was blank), mirroring `getDynamisedRules`' own sibling substitution default (`: '\"\"'`); `null`/`undefined` stay raw (already valid operands). Hardening: `is()`'s grammar mismatch now FAILS-THE-FIELD (`console.warn`+`isValid=false`) instead of throwing, so a per-keystroke live check can never abort the gate on a residually-unparseable condition (e.g. a field literally valued `"NaN"`, which the root fix leaves raw). Browser-bundled -> prod dist rebuilt; the `#SCS1e`/`#SCS1h` eval-safety pins target the untouched `_SCS_BINARY_RE`/`_scsParseOperand`/regex-literal constructs, so the hardening flips none of them. **The splice itself was UNESCAPED until #B600-#B602 (gh#77, 0.6.33):** `getDynamisedRules` pastes every referenced value into the STRINGIFIED rule set and parses it back, so a `"`, `\` or control character in a referenced value (a textarea, a password) threw out of the whole pass (client: dead submit; server: the error escaped the plugin), at FOUR sites - `getCastedValue`'s string return AND its number-rule branch, the loop-1 default for a referenced field with no rule, the loop-2 DOM default - each through a STRING replacement that also expanded `$&`/`$'`/`$$`. Every splice is now `quoteForDynamisedRules(v)`, i.e. an escaped quote + `escapeForJsonString(escapeForJsonString(v))` + an escaped quote (the escaper touches ONLY `"`, `\` and U+0000-U+001F, so the splice is byte-identical to the old one for every value that did not throw), through function replacers, with the closing parse guarded (fallback: the rules as declared, which `is()` resolves or fails closed). A number-ruled referenced value splices raw only when it IS a number (typed, or text matching `/^ *-?\d+(?:\.\d+)? *$/` - the padding keeps `" 12"` vs `12` valid as before); other text compares as a string. Note the engine's `isNumber` is LENIENT (`parseInt`: `1"2` and `12abc` pass as the leading number), so a number field's own verdict never discriminates such values - compare `1"2` vs `1"3` instead. `is()`: the string operand is `"(?:[^"\\]|\\.)*"`, decoded with `JSON.parse` (an AUTHORED literal that is not valid JSON, `"C:\dir"`, is read verbatim as before; one that cannot be read at all fails the field, never throws); its own `$` substitution splices `JSON.stringify(value)` through a function replacer; the `(`/`)`/`return` strip runs OUTSIDE string literals only (#B601 - it made `ab(cd` equal `ab)cd`, also on route requirements); and a condition no longer needs an ASCII alphanumeric run to be evaluated (#B602 - `!!!`/`é€` never matched; through `$` tokens the gate saw the token NAMES, so it bit the plugin path and literal conditions only). The client `query` body: a late-resolved token splices twice-escaped and `decodeSplicedQuotes()` restores each spliced literal instead of deleting every escaped quote - byte-identical for any body whose strings carry no backslash (token-wise, so key order survives); an AUTHORED quoted segment holding a valid JSON escape is the one divergence (decoded). **One `$`-token grammar at every site (0.6.33, #B603/#B604/#B606):** `FormValidatorUtil.substituteFieldTokens(text, names, resolve)` — a token is `$` + a field name in scope, the LONGEST name wins in one pass over the original text, a token ends where its name ends provided the next character is outside `[A-Za-z0-9_-]` (so `($a) === ($b)`, `$a===$b`, `$a,` resolve while `$passwordX` leaves `password` alone), names are case-sensitive and RegExp-escaped (`$pw[0]`, `$a+b` resolve), a replacement is never scanned again, and a `$` naming no field stays literal. Before it: the plugin's `getDynamisedRules` replaced one name at a time and re-read the text after each splice, so a value holding `$<otherField>` was substituted twice (#B603 — and the two-argument `is` form re-read the resolved condition through the array-rule scan, which now skips `is`/`is<N>`); its DOM-fallback second loop, which could only act on a `$` a spliced value carried in, is retired with #B234's gate; the engine's `is()` resolved a token only when whitespace or the end followed it and interpolated names unescaped (#B604) — it now resolves OUTSIDE string literals only and never inside a regex-literal condition, so the plugin path's already-spliced literals are not resolved a second time; the client `query` body scanned `\$[-_\[\]a-z 0-9]+` — lowercase-only with a space in the class — so `$passwordConfirm` resolved `$password` + `Confirm` (another field's value on the wire), a prefix pair resolved by body order, and an unknown `$` was sent as the string `null` (#B606). Value semantics per site are unchanged (`getCastedValue`/`quoteForDynamisedRules`, `JSON.stringify`, the twice-escaped `query` splice). The form's validity comes from `getErrors().count()` (the surviving `isRequired` error), never the per-field `.valid` flag (whose only error-dropping reader, `setErrors`, is dead). Length bounds are ARITY-sensitive, and the source JSDoc was WRONG about it until 0.6.3: `"isString": [N]` (same for `isInteger`/`isNumber`) supplies `minLength` ONLY — identical in effect to the scalar `N` — because the exact-length branch fires only when `minLength === maxLength`, so an exact length needs `[N, N]`; the stale comment had propagated verbatim into the published reference page, so correct BOTH surfaces when one is found. Those bounds measure the value's STRING FORM (`val.toString().length`) — until 0.6.3 `isInteger` alone measured a bare `val.length`, which is `undefined` on a real Number, so BOTH its bounds were silently inert on every numeric value: no error, no warn, field left `valid` (#B198, a fail-OPEN bypass reachable from a JSON body, a `validator::{}` requirement, or a preceding `toInteger` — the browser included). `isString` reads the same bare `val.length` at two sites and is CORRECT there because a `typeof(val) == 'string'` guard precedes it, so this class of fix is line-scoped: a whole-file replace of the bound expression hits four sites, two of which must not change. One consequence of measuring the string form, intended: a negative number counts its sign toward the length (parity with the same value arriving as a string). The zero-swallow residual #B198 initially left open is CLOSED by #B199 (0.6.3): loose `== ''` emptiness tests conflated `0`/`-0`/`false`/`[]` with the empty string at FIVE sites — the isInteger/isNumber bounds gates AND the isEmail/isJsonWebToken/isFloat empty-bypasses, where a JSON body's `{"email": 0}` validated as a correct email — all five now compare strictly, so only the literal `''` bypasses (the designed empty-is-adjudicated-by-isRequired contract, preserved byte-exactly); `isString` stays loose behind its typeof guard (operators identical for strings), `isInList` was already strict, and `isDate`'s broader `!val` swallow (a silent half-state: `valid` false, NO error recorded, so the form passes) is deliberately untouched. STILL OPEN sibling (#B200): a TRUTHY non-string in an isEmail/isJsonWebToken field (`{"email": 123}`) hits an unguarded `.toLowerCase()` and the rule driver RE-THROWS, killing the whole validation run — the falsy/truthy non-string space is partitioned between the fixed bug and this one. Custom validators (`bundle/validators/<name>/main.js`) are a BROWSER-ONLY affordance, NEVER a server-side guarantee: the server gate reads `getContext('gina').forms` while the loop it guards reads a bare `gina` that is undefined in Node, so a custom rule never attaches server-side and the engine then silently skips the unknown rule name with no warn — re-validate such constraints in the action. (Publishing that context without also fixing the loop would make EVERY validator construction throw, including for bundles shipping no custom validators.) Since #M21d (2026-09-26) the browser compiles a custom validator as an inline `<script>` — `gina.forms.compiledValidators[<name>]`, one compile per validator per page, carrying the page's CSP nonce when one is set, `//# sourceURL=<name>.js` in DevTools — with NO `eval`, NO `Function` and no `'unsafe-eval'` needed; the scope contract is unchanged (the spliced prologue hands the body `self`/`local`/`isGFFCtx`/`replace` through `this.getValidationContext()`), a file the browser cannot compile throws `[UserFormValidator] Could not evaluate` pointing at the console's SyntaxError, and server-side a FUNCTION registered on the context is attached as it is while a source-shaped one is refused naming the browser-only contract. The bundle build (`core/asset/plugin/lib/js/no-dynamic-code.js`, run by `build` after r.js and again after Closure) also rewrites the two unreachable vendored calls the r.js output inlines — RequireJS `req.exec` (the `load.fromText` transpiler-plugin path) and engine.io-client's `Function("return this")()` global shim — by EXACT match, failing the build if a dependency bump moves them, so the published bundle carries no dynamic-code call at all: Socket's `Uses eval` verdict, which flipped the package score 62 ↔ 42 on identical bytes, has nothing left to fire on (pinned by `test/lib/validator-m21d.test.js` + `test/core/bundle-no-dynamic-code.test.js`). A rule-body edit needs a prod dist rebuild AND flips the section-locked characterization tests by design. Editing trap: `form-validator.js` embeds hidden NO-BREAK SPACE bytes (U+00A0) where a normal space appears inside several `||`/ternary sequences, so a literal-space find/replace spanning one silently fails — patch such regions with a byte-scoped script over clean-ASCII substrings, not a space-spanning match. The blur-time global validation pass sets submit-button state but renders errors ONLY for the touched field — untouched invalid fields stay quiet until interacted-with or submit. For a `<select>`, the touched field is the select whose `change` started the check: before 0.7.4 its live check (`updateSelect`) read the global `event`, which inside the whole-form pass's callback is that pass's own `validated.<form-id>` event on the form, so the lookup used the form's `name` and the select's whole-form error was never displayed; it now reads the element it is given (#B781). Accessibility (#A11Y1): the rule-agnostic chokepoint `handleErrorsDisplay` reflects committed errors into `aria-invalid="true"` (gated on committed-not-warning; `"false"` on clear mirrors native `ValidityState` so it agrees with `:user-invalid`; hidden fields skipped), auto-wires `aria-errormessage` to a gina-owned message div UNLESS the consumer provided their own, focuses the first DOM-order invalid field on a failed submit, and announces blur-time errors via a per-form visually-hidden `aria-live="polite"` region; the per-field aria passes fire only under live-check — the always-on submit pass covers every bound form regardless. Live-region LIFECYCLE (#A11Y2): creation is split out of the announcer into `ensureA11yLiveRegion($form)` and called from `bindForm` — the chokepoint every registration path funnels through — so the region is in the a11y tree from BIND time. It previously created, inserted AND populated the region in one synchronous tick, which reaches assistive tech as a single mutation batch on a node it has never observed, so the FIRST announcement per form (the one that matters most) was the one least likely to be spoken while every later one worked. The region is a CHILD OF THE FORM on purpose: a popin renders its form inside a native `<dialog>` opened with `showModal()`, which leaves everything outside the top layer inert, so a body-level region would go unspoken for exactly the forms that live in popins — the placement is an accessibility constraint, not a convenience. The price of that choice is that a subtree replacement (`$el.innerHTML =` on a popin re-render, a nav fragment swap) destroys it, so `ensureA11yLiveRegion` is create-OR-RECOVER and also re-homes a region whose form node was replaced; any region created or re-homed at announce time is marked fresh and defers its first write one macrotask, so insertion and mutation land in different ticks — that deferral is what stops a recovery from silently repeating the defect, and it is load-bearing because a re-render does NOT always re-bind (`validateFormById` early-returns on an already-registered id, and a multi-form popin's teardown loop splices while iterating so it skips every odd-indexed form). An already-bound region writes synchronously, unchanged; while a deferred write is pending a newer error replaces the pending text so the LATEST message wins, and the timer re-enters the announcer, keeping exactly ONE `textContent` write site. Rule: a live region must be observable BEFORE it is written — separate creation from announcement, and when the same call must do both, put a tick between them. **Submit LIFECYCLE exposure (#A11Y4):** the accessibility signals for an in-flight submit hang off the request window inside `send()` — the only place reached once an XHR genuinely exists — and that placement is the fix for a timing trap, not an accident: the loading state (`data-gina-loading`) is armed at CLICK time, BEFORE validation runs, so a signal hung there would arm-then-disarm on every rejected submit and announce a spurious busy/not-busy pair. Three effects, all scoped to that window. (1) The trigger's focus is captured before gina natively disables it and restored once the request settles: a natively `disabled` control cannot hold focus, so the browser drops focus to `<body>` and re-enabling does NOT bring it back (both measured), which silently cost every keyboard submit its place. The restore is deliberately conservative — only when focus is still on `<body>` and the trigger is still in the document — so a response that opened a popin, redirected, or focused the first invalid field keeps its own focus decision; gina restores what gina took, never more. The `<a>` branch is excluded from the capture: an anchor gets `aria-disabled` from the in-flight lock (since #B312 the framework's only `aria-disabled` write), which does not blur (measured control). (2) The trigger carries `aria-busy` for the request's duration — on the TRIGGER, never the form, because the live region is a CHILD of the form and an ancestor marked busy MAY be treated as "defer announcements in this subtree", which would silence the very channel used to announce; ARIA 1.2 defines no normative behaviour here, so that is a cheap hedge, and the same reading is why `aria-busy` can never substitute for an announcement (it produces none of its own). ⚠️ **Do NOT restate this as "assistive tech commonly defers"** — that wording shipped once and was WRONG: measured 2026-08-05 on VoiceOver/Chrome, an announcement made from inside an `aria-busy="true"` ancestor was spoken normally, so at least that pairing does not defer. The placement costs nothing and still guards ATs that might, but it is a precaution, never a claim about implementations. (3) The start is announced ONCE through the #A11Y2 region; completion announces NOTHING by design, because an errored response is already announced field-by-field by `handleErrorsDisplay` and a second status write over the same polite region in the same beat can truncate it. Announced strings are the framework's own, so they resolve through `gina.config.a11y` with English defaults (e.g. `{ submitting: 'Envoi…' }`) — deliberately separate from `setErrorLabels`, which is keyed by RULE name and owns rule messages. Rule: put a state signal where the state actually begins; a signal armed on intent rather than on the operation announces work that may never happen. **Error-association integrity (#A11Y5):** three fixes sharing one theme — an ARIA assertion is only worth what its target is worth. (a) Hiding the message div used gina's `.hidden` helper (`display: none !important`), which removes it from the accessibility tree entirely — fine for a soft warning, wrong at the TWO hide paths that coexist with an asserted `aria-invalid` (`refreshWarning`'s focus-driven hide, and the refresh re-create), where the field was announced invalid while `aria-errormessage` pointed at an unreachable target. Both now CLIP instead: inline declarations that hide visually but keep the node in the tree, with `display` carrying `!important` because that is what outranks the class's own `!important` (measured — a plain inline `display:block` loses to it); the class is deliberately left in place so consumer CSS keyed on `.hidden` keeps matching. (b) A polite region is announced on CHANGE, so re-writing byte-identical text is commonly not spoken — which is precisely the repeat-error case (blur a field that still fails the same rule). A trailing no-break space now makes the content differ without altering what is read out, and it self-cancels on the next write. NOTE this half is source-derived: the string demonstrably changes, but no assistive-technology pass has confirmed the re-announcement. ⚠️ The same caveat NO LONGER applies to #A11Y2's first-announcement fix — **V1 was CONFIRMED 2026-08-05 on VoiceOver/Chrome** by an A/B whose two arms differ only by a `setTimeout(0)`: the same-tick create-and-write was NOT spoken, the deferred write WAS. So the deferral is load-bearing in practice, not merely defensible in theory; the region-lifecycle discipline above is measured, not inferred. (c) `focusFirstInvalidField` (and its deliberately-duplicated inline twin) gated focusability on `typeof $field.focus == 'function'`, which is TRUE for every HTMLElement — a custom element with neither `tabindex` nor `delegatesFocus` passes it and its `focus()` is a silent no-op (measured), so a failed submit whose first invalid control was such a host focused nothing AND stopped searching. Both loops now confirm `document.activeElement` actually moved before stopping, which is also what makes the JSDoc's "skips unfocusable controls" claim true rather than aspirational. Rule: a capability probe (`typeof x.focus == 'function'`, `'foo' in el`) tests the API's PRESENCE, never its EFFECT — when the effect is what matters, assert the resulting state. Error-MESSAGE visibility has THREE write paths (create / refreshWarning's un-hide / the refresh re-create) and the re-create runs LAST in the live-check pass, so it owns the steady state: it is focus-aware — message hidden while the edited field is the active element, revealed on blur (soft warning border while typing). Rule: when an element is written by multiple paths in a single validation pass, guard the LAST writer — an earlier-writer fix is silently overridden. #B319 (0.6.5-alpha.2): the focus-driven hide is EXEMPT during the framework's own ANSWER focus — both refused-submit paths (the #B246/#B308 display-only reveal via `focusFirstInvalidField`, and the `validate.<id>` failure branch's inline focus twin) render errors then focus the first invalid field, and that focus's synchronous `focusin` re-entered the live-check listener and hid the just-rendered message: a refused submit explained itself only to a screen reader (the #A11Y5 clip kept the node resolvable) while sighted users saw nothing — despite the render itself being VISIBLE (no fieldName ⇒ the live-check branch is skipped, and activeElement is still the trigger/BODY at render time), which is also why an async `query` rule in a repro is incidental (the suppressing dispatch is synchronous inside `focus()`). Fix: a one-shot module flag raised around BOTH focus loops (try/finally, cleared on every exit) gates the focusin arm's `refreshWarning` call; the message stays visible with the hard `form-item-error` styling, aria state untouched, and the first later keystroke re-engages the mid-typing suppression unchanged (in that answered-then-typed configuration the border stays `form-item-error` — the answer focus re-registered the field so `lastFocused` reads it twice and the isWarning heuristic keeps the hard border while the active-element ternary hides the message; the hidden message is the contract, the border there is heuristic). Behavioral lock: `test/e2e/validator-submit-answer-visibility.spec.js` (4 arms, red-first against the pre-fix bundle); browserless pins: `test/core/validator-answer-focus.test.js`. #B387 (shipped in 0.6.11): the one-shot flag covers only that synchronous window — on an async-`query` form with a committed error, a refused submit whose click lands inside the UNDRAINED completion tail of the previous settle had its answer delivered, focused, then re-hidden ~0.2ms later: a stale live-check waiter (woken inside the click's cascade by the reveal pass's deferred release) or the trailing silent global re-validation ran the display-refresh pair AFTER the flag's `finally` had cleared it, and BOTH hide sites key on the same heuristic — "the field is the active element, so the user is editing it" — which cannot tell answer-placed focus from user-placed focus (`refreshWarning`'s error→warning downgrade appends ` hidden`; `handleErrorsDisplay`'s refresh branch re-creates the message born-hidden via its active-element ternary; the occurrence gate is click-inside-the-tail, which is why full-suite/CI runs flaked ~1/20 while standalone runs stayed green). Fix: focus PROVENANCE — a single module slot `answerFocusHold` ({formId, elName}; one slot is exact, only one active element exists) recorded at both confirmed answer-focus points (inside the #B319 windows), consulted by BOTH hide sites for ANY caller however late (provenance beats a pass-staleness latch: the trailing re-validation is a FRESH pass spawned inside the click cascade and would sail through any staleness check), and released on the first genuine user interaction — any TRUSTED native event reaching one of the seven form proxy handlers while the one-shot flag is down (framework `triggerEvent` dispatches are untrusted and cannot release it; the answer's own trusted synchronous focusin is excluded by the flag) — so the deliberate mid-typing suppression re-engages the moment the user actually edits; no timers. Locked by `test/core/validator-answer-focus-hold.test.js` (17 — source pins on every edit site, comment-stripped extracted-real-bytes behavioral arms for both hide sites + the release helper, red-first against the pre-fix bytes; gina.js dist pins) and the §02 e2e arm (25/25 post-fix vs the ~1/20 pre-fix CI red whose signature was `Received: 1` + msgClass `hidden` — a recurrence of that signature is a NEW defect, not #B387). #B348 (shipped in 0.6.11): `revealValidationState`'s completion STARVED on any form whose async `query` field was not declared last — the reveal pass is un-latched, writes neither `isSubmitting` nor `isValidating`, and on a valid form its verdict is clean, so its waiter completion matched NO dispatch branch (terminal errors>0 / the latched dispatch / last-field / the display-only live-check arm): `onDisabledTriggerReveal` never ran, the stale `data-gina-form-submit-gated` marker never re-synced, and a fully valid form ate every later click until reload (measured live: 2 post-settle clicks, 0 POSTs — field declaration order decided whether the documented self-heal worked). Fix: the reveal's callback carries a completion identity (`onDisabledTriggerReveal.isRevealCompletion = true`, the engine's own `cb._data`/`cb._errors` property idiom) and the waiter chain gains ONE else-if chained after the display-only arm, gated on the SAME terminal condition the errors>0 block uses (`hasParsedAllRules && asyncCount <= 0` — the guard that stops a multi-query-field early wake, where the first waiter fires at asyncCount 1): a terminal reveal completion that matched no other branch dispatches `validated.<formId>` with its own cb. Every previously-working shape is byte-identical (errored reveals keep completing via the terminal branch, query-last via last-field, latched submits via the latched dispatch, live-check stays display-only), and the un-latched programmatic-submit starve (#B347) is deliberately untouched — its cb carries no marker and its fix is gated on its own repro. Known residual, pre-existing on EVERY branch: a query field whose own rule object continues past `query` never sets the terminal flag and still starves — same guard as the existing dispatch, no new asymmetry. Locked by `test/e2e/validator-reveal-starve.spec.js` (red-first: the starve arm failed on the pre-fix bundle while the query-LAST control arm passed on the same bytes, pinning the defect to field order; the scene manufactures [valid values + stale gate + stale committed error] deterministically via a prototype-setter silent fill after an errored reveal, with every precondition an explicit expect so an impossible scene voids loudly) and `test/core/validator-reveal-completion.test.js` (9 — stamp/consult/placement pins, extracted-real-bytes reveal arm asserting the stamp as a runtime value, gina.js verbatim pins AND a gina.min.js exact-count pin — unlike a local flag, the property name survives Closure). The not-ready submit trigger is marked `data-gina-form-submit-gated="true"` + the class `gina-form-submit-disabled` (#B312 retired `aria-disabled` from this marker — its contract says not-operable while the #B246 gate deliberately answers the click with the error reveal; authored `aria-disabled` remains enforced by the gates and is never auto-cleared), NEVER native `disabled` (#B76 — a natively-disabled button emits no click, so the validate-render-focus guard could never run); `isValid()` is the real send gate, and **the framework now ships a default not-ready look (cursor `not-allowed` + dim; deliberately no `pointer-events`, which would swallow the click the reveal answers) that consumer CSS overrides**. Form-associated custom elements (FACEs) participate in binding + live-check (#CC2 — hyphenated members of `form.elements`; their own `.value` accessor is honoured, live-check rides the composed bubbling `change`; author contract: `static formAssociated`, a `name` attribute, a `.value` getter, composed `change` on commit). **Radio-group collection (#B221):** an unchecked non-boolean radio group whose rule declares a truthy `isRequired` is collected as an EMPTY value by BOTH collectors (`getFormValidationInfos` + the native-submit inline copy) so `isRequired` adjudicates it via the standard emptiness test — pre-fix no collection arm admitted the shape (each required `.checked`, a `true|false`-shaped value, or an `isBoolean` rule), the DOM handle was held in `$fields` but the VALUE never entered `fields`, so no rule ran against the group and a radio-group-only form short-circuited BOTH submit guards (field count 0 reads as nothing-to-validate → synthetic `isValid() === true`) and submitted its XHR with zero client-side validation. **Since #B926 (0.7.5) the same arm, in BOTH collectors, takes an unticked value-carrying CHECKBOX whose own rule says `isRequired`:** `isRequired` on such a box means « must be ticked » — several boxes under one name: at least one ticked; distinct names: each — where before no arm admitted it, so the form posted without the box and no rule judged it on either side (the engine never fires `isRequired` on an absent key); a boolean box (no `value`, a `true`/`false` value, or an `isBoolean` rule) keeps posting its live state and a required `false` passes, a disabled box is skipped before any arm, and a box with no rule or `isRequired: false` stays absent. Other unchecked groups stay absent-when-unchecked (native parity: no rule / `isRequired: false` unchanged; `isBoolean`-declared groups keep the force-false arm), checked members post exactly as before, and on the auto path a required-empty form is invalid and never sends — so the wire only changes for the newly-gated shape. Enforcement-tightening: forms that silently submitted with nothing picked now gate on the pick (trigger marked not-ready at bind under default-on live-check — `data-gina-form-submit-gated` + class since #B312 — message on submit attempt, re-enabled after picking). **The re-enable is real only since #B228:** the radio live-check listener was registered under a `changed.<id>` event name nothing dispatches on a user pick — the form-level click proxy short-circuits into the radio state updater (which never dispatches any gina event), and the change proxy dispatches ONLY names present in the event registry, which radios never registered (checkboxes have that registration via their state-updater relay; radios' equivalent relay is keyed on the bare element id, which nothing triggers) — so the whole-form silent pass never re-ran after a pick and the trigger kept its bind-time disabled state indefinitely, while submit-time validation (a separate call chain) accepted the checked group and let the click-guard send: flows completed, only the trigger state was wrong (announced disabled to assistive tech; automation actionability checks refuse `aria-disabled`). Radios now ALSO register the proxy-dispatched `change.<id>` name alongside `changed.<id>` — the handler's radio arm accepted `change.`-typed events all along, so one registration line closes the loop: mouse, label and keyboard picks all re-run the field + whole-form passes (single delivery per pick — native `change` fires only on real state changes; the legacy `changed.<id>` name stays registered for the relay/programmatic path; checkboxes byte-identical). Latent since the live-check's introduction, invisible until #B221 armed it. **A field that DRIVES its own conditional block lost its BASE rules until #B229:** `forEachField`'s per-field tail read `if (isInCase || caseName == field) continue;`, and `caseName` is assigned inside the `_case_` scan loop that re-runs in full on EVERY field iteration, so it always held the LAST scanned `_case_` key's driver name — when the iterated field WAS that driver the `continue` skipped the rest of the iteration, base-rule check included. A rule shape `{ "group": { "isRequired": true }, "_case_group": { "conditions": [...] } }` therefore never adjudicated `group`'s own `isRequired` on the bind pass, the live-check global pass OR the submit pass: the form never gated and an empty submit went out with zero client-side validation — the silent-submit class above, resurfacing for the self-driving shape and structurally DOWNSTREAM of the collection fix (the group IS collected as `''`; only adjudication was missing). The tail is now split: `isInCase` keeps its own `continue` (it is dead code — never assigned truthy — and is preserved as such), and the `caseName == field` arm runs the base-rule check before continuing, restoring the driver's collected value around the call (the check deletes the field from the object it is handed, and that object is where the scan block re-reads the case VALUE on every later field iteration; a deleted entry re-seeds from the DOM, which for a radio group is the FIRST member's value regardless of `.checked`). Which conditions apply is unchanged — the direct-case block is never entered for a self-driving case, pre- or post-fix (measured) — and the fix is order-independent: a driver declared BEFORE another `_case_` block was already adjudicated (the tail's comparison never matched it), so the post-fix union is every driver carrying base rules. Client-only: the server form-body path throws earlier on any `_case_`-bearing rule set (conditional rules are unsupported there). Enforcement-tightening: a form built on this shape starts gating where it silently submitted. **Every pass works on its own copy of the rules since #B885 (0.7.5):** on a rule set with NO `$` tokens, `validate()` handed `forEachField` the caller's object, and what a pass wrote into it — a matching `_case_` condition's rules over a field's own (the site-B replacement), `{ exclude: true }` over an unchecked checkbox whose rule says `isRequired: false` — outlived the pass: a case rule stayed applied after its driver changed back, so a valid form stayed gated and refused the click; through the rule-set object that forms bound to the same rule set shared, one form's case gated another; a later `reBind()` re-armed the gate from the mutated rules; and a checkbox ticked after such a pass stayed out of the posted data (#B913). The non-`$` branch now takes `JSON.clone(rules)`, as the `$` branch always parsed its own copy (`JSON.clone` keeps a non-plain value such as a RegExp condition by reference). **Each form holds its own copy of its rule set since #B931 (0.7.5):** `bindForm` kept the object it was handed — the one `getRuleObjByName` caches and returns to every caller, or the `instance.rules[name]` object the boot scan chains from one form to the next through `merge` — and the submit and click passes resolved the rules by NAME again, so the state a binding derives from its own markup and writes into its rules (`exclude` on a `data-gina-form-element-group` member, the collector's `isBoolean` on a boolean checkbox, a RegExp key's alias) reached every form bound to the same rule set, whatever the forms' ids: a form posted without its ticked value-carrying checkbox because another form's hidden field of that name had been excluded first (a popin whose content was swapped, two forms on one page in either order), or posted `true` in place of a value because the other form's same-name checkbox was boolean. `bindForm` now assigns `JSON.clone(rule)` (and re-points the singular `.rule` at it where `validateFormById` set it), and both passes validate with the record's rules, by name only when no record answers to the current id; the registry objects receive no per-form write after init. The same writes had hidden a gap, closed by #B914: a radio or checkbox group whose `isRequired` comes only from a matching `_case_` condition is never collected (the collector reads the field's own rule), so a check refused it only once an earlier pass had written the case rule into the stored rules — the first submit went out without it with live checking off or a radio driver, and every submit did on a `$`-bearing rule set. The matched condition now enters such a group as `''` with `d.addField` before the check, once per pass (guarded on `d[_r]` as well as `fields[_r]`, since the check deletes `fields[_r]` and a later field's scan would enter it again); a file input is left out. **A later condition of a `_case_` block is matched against the driver since #B920 (0.7.5):** the first scan's literal-key branch (`caseField = _r;`) also stored that field's value in `caseValue` (a boolean when its own rule says `isBoolean`), and the only reader was the NEXT condition's filter, so a later condition whose `case` equalled the named field's value applied although the driver did not match it; the write is gone, so `caseValue` holds the driver's value for every condition of the block. **A `case` written `/pattern/flags` is a regular expression since #B918 (0.7.5):** the first scan's filter compared it as a string (`case != caseValue`), so it never matched there: a regex condition applied nothing when its block was the only or last `_case_` key, and a block followed by another one reached the second scan, which applied its rules to COLLECTED fields but never refused an uncollected group it requires. `getCaseRegExp` (declared inside forEachField, so the tests that compile the forEachField slice need no new free identifier) parses `/pattern/flags` WITHOUT the bracket escaping of the regex-KEY branches (a case matches values, so `[ab]` stays a class), and a pattern the engine rejects warns and is compared as a value. **A RegExp KEY inside a condition's `rules` applies wherever its block sits since #B921 (0.7.5):** the condition scan skips a key naming no control, so a RegExp key (`"/^item[/"`) was skipped there and only the direct-case recursion of a NON-last driver expanded it — a single-block or last-block key had no effect under any case shape, and even a live one only reached COLLECTED fields (an unticked value-carrying checkbox it required was never refused). `expandCaseRegExpKeys` (declared inside forEachField, before `getCaseRegExp`, so neither the slice-compiling tests nor the #B918 helper slice change) runs once per level on the pass's own copy and gives each control the key matches a literal key of its own holding a COPY of the key's rules (plain data copied, so a pull-in `merge` into one name never reaches another), read as a top-level RegExp key is (`[`/`]` literal, flags kept), a literal key of the condition winning, then the first matching RegExp key, the block's driver left out, an invalid pattern warned and skipped, nothing on the server path (`$fields` null; the server throws earlier on any `_case_` key anyway); the condition scan then applies it exactly as a literal key (site B replacement, #B914's `''` entry, the 2/3 check). ⚠️ The direct-case loop SKIPS the names the expansion added — its own RegExp branch covers them as before; without that skip the recursion would check an uncollected field with the condition's rule alone, its base rule lost (measured, pinned by a subtract). A `$` inside a key is never a working token (getDynamisedRules splices a QUOTED value into the pattern; with no matching field it stays an end anchor): such a key matches nothing, before and after. **A select's whole-form pass collects with the form's own rules since #B915 (0.7.5):** `updateSelect` handed `getFormValidationInfos` bindForm's `rules`, the rule REGISTRY keyed by rule-set name, so no field had a rule there, an unpicked required radio group was not collected, and the pass read valid: the submit trigger lost its gated mark after a select change (a click was still refused by the submit pass). It now collects with `instance.$forms[formId].rules`, the rule set it validates with, as `addLiveForInput`'s pass does (its own `var rules = $form.rules`). **A conditional driver's collected VALUE survives every full-form pass since #B230:** the base-rule check deletes each adjudicated field from the object it is handed, and until #B230 only the last-declared driver's entry was restored (the #B229 arm above) — any OTHER field that both carries base rules and drives a `_case_` lost its stored case value the moment its own rules were adjudicated, so later field iterations re-read it from the DOM (a radio group's FIRST member regardless of `.checked`) and matched conditions against a value the user never picked — spuriously requiring the wrong flow's fields (a correctly-completed picked flow could not submit), or with excluding condition rules under-validating the picked flow — while the driver's own direct-case block read `undefined` in the same pass and matched nothing. The entry is now backed up and restored around the base-rule check for any field driving a `_case_` in the live rules OR the pass-entry rule clone; the union matters because inside a direct-case recursion the pass's rule set is the condition's own rules, which carry no `_case_` keys, so the live-rules test alone is blind there. Non-driver fields keep the deletion untouched (the condition pull-in gate, the direct-case exclude injection and the async-`query` re-validation input all read those absences today), and a driver with no rules of its own is byte-identical — including the legitimate first-scan DOM seed for rule-less unchecked groups, which is preserved. **`setFlash` `[null, "message"]` works client-side since #B226 (the form the reference documents):** it previously lost its custom message in the browser ONLY — `lib/merge` classified a `null` array element as an object (`typeof null`) and dropped it on every no-override merge, and the client rules path re-merges the whispered rules (the `data-gina-form-rule` bind merge, the `gina.hasValidator` instance re-merge, the `_case_` merges), so the engine received a one-element array, bound the message to the ignored first `regex` argument, and rendered the built-in label; `["", "message"]` always survived (empty strings, `false` and `0` are primitives — `null` was the only casualty), and the server was unaffected (it reads the boot-loaded rules without those hops). The fix is in `lib/merge` itself, so no-override merges now preserve `null` array elements as VALUES framework-wide (and the index-merge branch stops manufacturing `{}` from a `null` source element) — a merge consumer relying on the silent compaction sees the `null` slots preserved. **Bracket-notation and nested-authored rule KEYS enforce on the SERVER form-body path since #B241:** the rule parser canonicalizes every rule key to a dotted path (`account[username]` becomes `account.username`; a nested rule tree flattens to its dotted leaves) while the server's fields map kept the RAW posted keys, so such rules never joined — the field was silently skipped with no warning, fail-open for every rule-keyed directive alike: checks (`isRequired`, `isEmail`, ...), the `exclude` drop, and value transforms — on BOTH production wire shapes (flat bracket keys: the client posts its name-keyed data as JSON and the JSON body path deliberately does no bracket expansion; and nested objects: the multipart and urlencoded parsers expand bracket names). The server now synthesizes dotted-canon field aliases ALONGSIDE the raw keys (originals kept, so `$name` cross-field tokens keep resolving off the raw posted names, and an all-flat payload synthesizes nothing — byte-identical behaviour), then folds alias outcomes back at egress: error keys return under the DOM-name bracket form the client renders against, and the validated data output keeps its materialized shape with exclusions and transforms applied (a parent object emptied by an exclusion is pruned along that alias's path only — a posted empty object survives). The client join was always bracket-on-both-sides (a named rule set passes through with its authored keys; nested-authored sets are reconstructed to bracket names at bind time), so this brings the server to parity — quirks included: a caller that posts the dotted key form keeps its own addressing, and the no-rules path still returns the payload verbatim. Behaviour change by design: a bracket-keyed or nested-authored rule that never fired before now enforces — anything relying on the old silent skip starts rejecting or dropping those fields. **Upload previews carry a text alternative (#A11Y7/U1, 0.6.4).** The staged-upload client layer builds its preview `<img>` in two MUTUALLY EXCLUSIVE branches of `onUpload` — one for a file with no server-side `preview` object, one for a returned preview variant — and neither set `alt` at all (not even `alt=""`), so assistive tech fell back to reading the temp URI aloud, once per staged file (WCAG 1.1.1). Both now set `alt` from `files[f].originalFilename`: the name the USER chose, deliberately NOT the sibling `files[f][key].originalFilename` of the preview variant, which is a server-generated artefact that means nothing to the person listening — the same distinction the adjacent `data-upload-original-filename` / `data-upload-preview-original-filename` pair already encodes. The fallback is `''` (a properly ignored image) rather than letting a missing name be spoken as a placeholder. The preview is INFORMATIVE, not decorative: it is the only signal telling a user which file is staged, and everything else in the upload layer is still silent — progress is attribute+`textContent` with no `role="progressbar"`/`aria-value*`, upload errors are an `innerHTML` write with no `role="alert"` that never calls the polite region the plugin already owns, and the reset control is an `<a href="#">` (U2/U3/U5, tracked in the accessibility audit, not fixed here). Maintainer gotcha: the two branches are per-file exclusive, so a one-site fix silently misses every upload whose server returns a preview object — fix both or neither. **A not-ready submit trigger really refuses the send — and its marker is aria-free (#B246 + #B312, 0.6.5).** `updateSubmitTriggerState()` marks an invalid form's trigger with `data-gina-form-submit-gated="true"` + the `gina-form-submit-disabled` class and deliberately never native-`disabled` (a natively-disabled button emits no click at all, so nothing could tell the user WHY it is dead) — and, since #B312, never `aria-disabled`: the gate ANSWERS the click with the error reveal, which that contract forbids for a control announced disabled, so the attribute belongs to consumers (authored marks the gates enforce and never auto-clear) and to the anchor in-flight lock. #B246's origin: NOTHING READ the marker — a click ran the entire submit cycle (collect → validate → `validate.<id>`) and only the `isValid()` gate stopped the send: the trigger was inert in appearance ONLY. `clickProxyHandler` now intercepts a disabled-or-gated trigger BEFORE the `submit.<id>` dispatch — so `bindSubmitEl`'s handler never runs, `isSubmitting` is never latched, and no send path is reachable by construction — and answers the click with a display-only `revealValidationState()` pass that renders every invalid field, focuses the first, and re-syncs the trigger state so a STALE not-ready marker on a form that has since become valid heals itself — the heal touches only the marker + class; authored `aria-disabled` and the in-flight lock survive it (#B313 closed by construction). The predicate `isTriggerDisabled()` reads the CLICKED element rather than `$formInstance.submitTrigger` (a form may carry several submit buttons while only one registers) and mirrors the popin plugin's existing trigger gate on the shared channels (authored `aria-disabled` + native `disabled`), so both subsystems agree there; since #B312 it ALSO fires on the validator-owned not-ready marker `data-gina-form-submit-gated="true"`. **#B293 (0.6.5) NARROWED that predicate: the native `disabled` ATTRIBUTE now counts only where `disabled` is not a real IDL property (`!('disabled' in $el)`).** As first shipped it accepted native `disabled` on ANY element, which silently killed the near-universal double-submit guard: a click listener on the submit button that sets `disabled` to block a second submit is bound to the button and therefore runs BEFORE gina's delegated form-level proxy reaches the gate, so the gate saw the attribute, cancelled the click, and `send()` never ran — then the consumer's own handler cleared the attribute again, leaving NOTHING marked, a normal-looking button, and every subsequent click equally dead. Measured: a natively-disabled `<button>` delivers **no click to JS at all** (the browser suppresses it), so on a real form control that arm could only ever fire on an attribute set DURING the dispatch — it protected nothing and cost everything; on an `<a>` or a custom element the browser enforces nothing, so there the attribute is still the only honest signal and is still read (`'disabled' in $el` measured: button/input `true`, anchor/custom-element/span `false`). Regression cover is an **e2e** (`test/e2e/validator-submit-native-disabled.spec.js`, 4 arms), deliberately NOT a replica: the defect is an ordering interaction between a consumer's own listener and gina's delegated proxy, which only the real bundle handling a real click can exhibit — `test/core/validator-submit-trigger-state.test.js` covers the same gate with replicas and stayed GREEN throughout, including two tests named as controls for the working case. Gotcha for maintainers: `focusFirstInvalidField()` deliberately DUPLICATES the inline focus loop inside the `validate.<id>` guard — that inline shape (`_a11yErrs` / `_aField`) is locked by source pins, so collapsing the two would break tests unrelated to this fix; keep them in step by hand if the focus rule ever changes. **Staged uploads speak (#A11Y7/U2+U3+U5, 0.6.4).** Three defects in one client layer, fixed together because they share one plumbing change. (a) `updateUploadProgressIndicator` wrote `textContent` plus two `data-gina-upload-progress*` attributes and NO ARIA, so any indicator that is not a native `<progress>` was unlabelled text; it now carries `role="progressbar"` + `aria-valuemin="0"` / `aria-valuemax="100"` / `aria-valuenow`, with `aria-valuenow` tracking the percent attribute EXACTLY — absent while `preparing`/`indeterminate` and on `error`, because an absent value is how a progressbar signals "unknown" while a stale or zeroed one reads as real, stalled progress. `reset` strips the ARIA too (it strips everything this layer ever set); `processing` advances the state only, preserving the last value so a determinate bar stays full through the server-side window. A native `<progress>` is deliberately untouched — it already exposes all of this, and an explicit role risks overriding the implicit one. (b) The TRANSITIONS are announced through the polite region `bindForm` already stands up: `uploadStarted` at the selection kickoff — deliberately NOT gated on the indicator being present, since opt-in-by-presence is right for a visual and wrong for an announcement — and `uploadComplete` in the success branch only. Per-tick progress is NEVER announced: `aria-live="polite"` coalesces but does not throttle, so one announcement per `onprogress` event would bury every other message on the page. There is deliberately NO generic `uploadError` key, because the error path announces the server's own message and a generic second write in the same beat would clobber it (the region is latest-wins — the same reasoning that keeps `releaseSubmitA11y` silent). (c) The upload error container is written via `innerHTML` while `display:none` and revealed only by a fade-in — exactly where a `role="alert"` on it is unreliable — so the error routes through that same region, announcing `$error.textContent` (the RENDERED text: a message can carry markup, and the url-action checker substitutes `<br>`). Note the container being consumer-owned is NOT the discriminator: the progress indicator is equally consumer-supplied and gina already writes attributes into both; the hidden-then-revealed shape is what rules out `alert`. (d) The generated reset control was `<a href="#">Reset</a>` — announced as a link, not activatable with Space, and identical across every staged file. It now carries `role="button"` plus an `aria-label` of `<visible label> <filename>`, the visible label kept as a PREFIX so the accessible name still contains it (WCAG 2.5.3 Label in Name) and reusing the consumer's own `data-gina-form-upload-reset-label` so it is translated wherever that already is. The role is stamped ONLY on an anchor (strict `/^a$/i`, unlike the loose `/a/i` guarding `href` a few lines above, which also matches TEXTAREA/CANVAS/LABEL), so a consumer supplying their own `<button>` keeps its implicit role. A `role="button"` that cannot be operated by Space would be worse than no role at all, so the binder adds a `keydown` handler mapping Space to the removal — anchors only, since a native button already fires click on Space and would otherwise run the removal twice. (e) That control is REMOVED from the DOM while holding focus (`$resetLink.remove()`, which its own comment requires be last so the click listener dies with the node). The finding described this as a `display:none`; both happen, and the removal is the decisive one — a fix aimed only at the hide would not have worked. Focus now moves to the file input BEFORE the removal, guarded on the control actually holding focus (a programmatic reset must not steal focus from elsewhere) and CONFIRMED afterwards rather than assumed, since `typeof focus == 'function'` is true for every HTMLElement and `focus()` is a silent no-op on one that cannot take it. The removal is then announced (`fileRemoved`, default `'%s removed'`) using a FUNCTION replacer — never a string — because a file name may contain `$` and a string replacement would expand `$&`/`$1` patterns inside it. All three new strings live in `A11Y_LABELS`, so `gina.config.a11y` overrides them. **Maintainer gotcha worth the line:** `test/core/validator-upload-reset-delete.test.js`'s `fnSlice` takes a FIXED 12000-char window from its declaration anchor, and this fix grew `onUploadResetOrDelete` by ~2.6k chars — pushing the `#R8` strip and the callback dispatch outside it and reddening four pins whose code was present and correctly ordered the whole time. Widened to 16000 (the function ends ~14.2k past its anchor), but it is still a fixed window and will bite again; the durable fix is to brace-walk to the real function end, as the sibling `validator-upload-progress.test.js` already does. **Not verified against assistive technology** — source-derived plus a served-bytes check, like the rest of this arc. **#B1039 (0.7.8) — the re-validation a clean `query` verdict starts does not ask that query again.** The `query` arm leaves its field in that nested pass's input, and #B230 keeps a `_case_` driver there whatever its rules, so a field whose only rule is `query`, or a `query` field driving a `_case_` block, asked again and its clean verdict started the same pass. On a value the verdict cache answers by microtask and the tab froze (0.6.7 to 0.7.7; at page load for a field last or alone in its rule set); on an empty value, never cached, requests streamed (0.6.5 to 0.7.7). The nested pass now carries `cb.judgedQueries`, a copy per level that only grows along a chain, and the arm skips a field in it. Do not take the field out of the input instead: a driver's entry IS its case value, it would re-seed from `$allFields[name].value`, a radio group's first radio whichever is checked, and the submit control opens on an invalid form (measured, three shapes). Locked by `test/e2e/validator-query-only-b1039.spec.js` + `test/core/validator-query-judged-b1039.test.js`. **#B295 (2026-08-06) — an async `query` rule left the form's validity state STALE once it settled.** `onasyncCompleted` derives its verdict from `d.getErrors(field)`, which `form-validator.js` scopes to a SINGLE field, so its `isFormValid` means "this field passed", never "the form is valid" — and the entire update block sits behind `if (!isFormValid && …)`. A form that had just become valid therefore received NO update: `updateSubmitTriggerState` was never called, so the bind-time not-ready mark (then `aria-disabled="true"`; the `data-gina-form-submit-gated` marker since #B312) survived on a valid form and `$forms[id].errors` kept listing the field. Cosmetic until #B246 made the click gate read that marker — then the first click after the query settled was silently eaten, and only the second went through (`revealValidationState`'s re-sync self-heals it). Fixed by handing the verdict to the fresh whole-form pass the same function ALREADY runs for the not-last-field case (`needsGlobalReValidation`), whose unconditional `updateSubmitTriggerState($currentForm, gResult.isValid())` settles the marker while its `handleErrorsDisplay` empty-errors branch clears the stale record; measured to add NO extra round-trip, because the query rule's already-registered-listener guard short-circuits the re-run. **The measurement that CHOSE the fix, and the reason the two cheaper shapes are wrong:** with a second required field left invalid, that fresh pass reports its error while BOTH the field-scoped `cb._errors` AND the in-pass `d.getErrors()` report none — so un-gating the existing call, or letting `handleErrorsDisplay`'s empty-errors branch auto-enable via its own `updateSubmitTriggerState(..., true)`, would each have ENABLED submit on an invalid form and re-opened #B246's hole. Both were rejected on that arm, not on reading. Covered by `test/e2e/validator-async-query-revalidation.spec.js` (4 arms, red-first: 01+02 RED on the pre-fix dist, 03 "another field invalid ⇒ still blocked" and 04 "no query rule ⇒ sends" GREEN throughout); arm 01 deliberately waits on the QUERY settling rather than polling the trigger's not-ready marker, because polling the guard is exactly what let the pre-existing FACE e2e stay green through #B293. Browser-bundled ⇒ consumer pickup is restart AND re-bake. **#B294 (2026-08-06) — a submit trigger whose DOM NODE is REPLACED after binding (the AJAX / popin re-render shape) was PERMANENTLY and SILENTLY dead.** Submit binding is **two-stage and only the first stage is delegated**: the native click proxy is registered on the FORM (`:8090`, "Form-level proxies: capture bubbled events from in-tree controls") and survives any re-render, but the listener that does the work is attached to the trigger NODE by `bindSubmitEl` (`:8231`). `gina.events` is a **name → id-STRING** registry (`utils/events.js:42`), so the `submit.<id>` key outlives the node: after a `cloneNode(true)`+`replaceChild` the `:8037` dispatch gate still passes, `cancelEvent` suppresses the native submit, and `triggerEvent` fires at a node with no listener — so the form does not even fall back to a normal submit. Nothing self-heals (`bindForm` latches `binded` at `:8580` behind `:585`, cleared only by `unbindForm`; there is no `MutationObserver` and no `isConnected` check in the bind/dispatch path). **Pre-existing, NOT a 0.6.4 regression** — measured identically on published 0.6.3. Fixed by marking the bound node with a **JS expando** (`__ginaSubmitBoundFor`) and re-binding the live node at the dispatch gate when the marker is absent — measured: `cloneNode(true)` copies `data-*` attributes but NOT expandos, which is exactly why the inherited `dataset.ginaFormSubmitTriggerFor` is useless as a fresh-node test and was a red herring in the original filing. **The rejected alternative is worth recording:** delegating the custom `submit.<id>` event to the form also fixes it (measured), but was measured to RETAIN the `gina.events` key past `unbind` (`registryKeyDeleted:false` vs stock `true`), which would force an edit inside `unbindForm`'s removal loop — six guard variants all keyed on `gina.events[name] == element.id`. Covered by `test/e2e/validator-submit-trigger-rebind.spec.js` (4 arms, red-first: 01 single replacement and 03 double replacement RED pre-fix; 02 untouched-sends and 04 replaced-but-invalid-still-refuses GREEN throughout, so re-binding provably does not bypass validation). **Diagnostic reflex for any "it stopped working after we re-rendered" report: the question is not whether the click listener survived — it did, it is on the form — but whether the node carrying the stage-2 listener is still the node in the document.** Browser-bundled ⇒ restart AND re-bake. **The submit proxy's gesture gate reads the LIVE trigger (#B308, 0.6.5).** The per-form `submit` proxy enforced its disabled gate on a DOMParser copy of the form's innerHTML, testing only native `.disabled` on the copy — blind to the gate's own marker (then `aria-disabled`, `data-gina-form-submit-gated` since #B312, written by `updateSubmitTriggerState`) while SIGHTED on a native `disabled` written mid-dispatch by a double-submit guard (the exact attribute #B293 ruled must not count on a real control — so wrapped-label + double-submit guard was a dead submit, the #B293 signature alive on the submit path). A gated trigger's trusted gesture therefore ran the full collect → validate cycle and SENT whenever the values validated. Now an `e.isTrusted` submit on a form whose REGISTERED trigger is `isTriggerDisabled()` is cancelled and answered with the same display-only `revealValidationState()` as the #B246 click path (errors rendered, first invalid field focused, stale marker re-synced); programmatic `$forms[id].submit()` arrives untrusted (triggerEvent CustomEvent) and deliberately keeps the fresh-validate path — a programmatic submit is not operating the control, the fresh pass is the honest gate there, and cancelling on a cached marker would break fill-then-submit flows. Two gesture shapes reach this gate (probe-measured, Chromium): a wrapped-label click (`<button type="submit"><span>` — the span has no `.type`, so the click proxy never fires and the gesture surfaces as a native submit event), and Enter in a form with NO native submit button (e.g. an `<a data-gina-form-submit="true">` trigger — implicit submission fires a DIRECT trusted submit; with a native button present, Enter instead synthesizes a click on the default button that the #B246 CLICK guard already refuses while the marker stands, so that shape never needed this gate). Covered by `test/e2e/validator-submit-proxy-disabled-gate.spec.js` (5 arms, red-first BOTH directions via the committed `B308_PREFIX_BUNDLE` route-swap hook: label-click and A-tag-Enter RED pre-fix on an EVENT discriminator — the pre-fix cycle fires `validate.<id>` from the no-`on('submit')` branch, while the post-fix reveal is display-only and fires nothing; POSTs cannot discriminate, since an invalid form never sends on either side). Scene lesson for e2e authors: stale-marker scenes are racy BY CONSTRUCTION — a page-level `.value =` write on a bound field is heard SYNCHRONOUSLY (the value property is instrumented and the silent live validation repairs the marker inside the write), and a delayed global silent pass can heal a protocol-level fill's stale marker mid-arm — so pin gate behaviour on a genuinely-invalid form and discriminate on event emission. Browser-bundled ⇒ restart AND re-bake. **The anchor in-flight lock owns `aria-disabled` alone; the settle releases remove it unconditionally (#B309 → #B312, 0.6.5).** On an `<a data-gina-form-submit="true">` trigger send()'s in-flight lock and the not-ready gate historically SHARED `aria-disabled` with opposite lifecycles — the settle releases (the `loadend` fail-safe + the readyState-4 twin) removed it unconditionally, so a mid-flight gate re-mark was silently erased at settle (#B309), and the reveal's valid-form heal erased the LOCK mid-flight the same way (#B313). #B312's single-writer split dissolves the class structurally: the gate writes only `data-gina-form-submit-gated` + the class, the lock is the sole framework `aria-disabled` writer on anchors (buttons lock via native `disabled`), both settle releases are back to the plain unconditional `removeAttribute` (the interim #B309 verdict-stamp replay retired unreleased, its 18-test file with it), and the reveal's show branch never touches aria — so authored `aria-disabled` survives every framework pass (enforced by the gates, never auto-cleared: consumers relying on the old auto-clear-on-valid must migrate) and #B313 is closed by construction. Scene fact that shaped the design: live-check is DELIBERATELY quiet during a real in-flight submit (the #B192 valid branch holds the submit latch until settle), so keystrokes cannot re-mark mid-flight — the reachable mid-flight writer was the #B246/#B308 reveal itself. Covered by `test/core/validator-submit-gated-marker.test.js` (17 — block-scoped single-writer negatives immune to right-extension, authored-aria + lock survival behaviour, the shipped `isTriggerDisabled` EXTRACTED and EXECUTED, terminator-anchored release-shape pins, dist-fidelity pins validated red-first across the rebuild). Browser-bundled ⇒ restart AND re-bake. **isRequired's emptiness is anchored at both ends, and trim strips both sides (#B245, 0.6.5).** The emptiness conjunct was `!/^\s+/.test(value)` — leading-anchor only — so ANY leading-whitespace-padded value read as empty (" x" rejected, "x " accepted), and under the documented isRequired-first ordering a paired `trim` healed `local.data` AFTER the error was recorded: a rejected field carried the trimmed non-empty value in the same result. Now `/^\s+$/`: whitespace-ONLY is empty, padded values pass, all-whitespace and the empty string still fail. Same fix: `trim`'s replace gained its missing `g` flag (first-match-only rewriting left the trailing run whenever a leading run matched — " x " → "x "). The validation-rules reference is corrected (it had documented the leading-space rejection as intended while prescribing the isRequired-then-trim pairing that could not work under it). Covered by `test/core/validator-required-whitespace-trim.test.js` (block-scoped comment-stripped source pins + the heal matrix on the REAL plugin over the server auto path + dist-fidelity counts red-first across the rebuild). Browser-bundled ⇒ restart AND re-bake. #B345 (issue #59, shipped in 0.6.7): the #SCS1e paren/`return` strip used to run BEFORE the regex-vs-comparison branch split, so a parenthesized `is` regex literal compiled from MANGLED text — groups destroyed and anchors rebound (`/^(a|b)$/` behaved as `/^a|b$/`: substring-permissive for middle alternatives), quantified groups requantified (`(#TAG)?` → literal `#TA` + optional `G`), and a literal `return` inside a pattern deleted — all silent, since the stripped text still compiled as a valid regex (the `Invalid regex literal` throw structurally cannot catch it). The strip now lives inside the binary-comparison branch only (grammar lock + authored-paren tolerance unchanged — `("a") === ("a")` still strips to a valid comparison); a regex literal compiles exactly as authored, that branch never evaluating the condition as JS. Behavior change (changelog ACTION REQUIRED): paren-carrying `is` patterns now match as authored, i.e. stricter; and the paren-wrapped-regex edge `(/foo/)` now fails closed in the comparison branch instead of being unwrapped into the regex branch. Locked by `test/lib/validator-is-regex-parens.test.js` (14 — red-first source ORDER pins, the reported reproduction, anchors/quantifier/`return` arms, comparison-branch controls, gina.js + wrap-immune gina.min.js order pins). **The Safari `autocomplete="off"` workaround (#B1055, #B1063, #B1064; up to 0.7.7 a keydown interception, removed):** on a real-Safari UA (#B135 gate) a live-check `<input>` with that value (`handleAutoComplete`) stays `readonly` until it has focus, because Safari's AutoFill ignores the attribute but skips a readonly control when it fills a form; every key stays native. gina writes `readonly="gina"` and focus lifts only that value, so a `readonly` the page wrote, in its markup or from a script at any time, stays; a clone of a bound field copies the attribute and still binds. A field that already has focus when it binds (`autofocus`, a `reBind()` during typing) takes the mark on blur (#B1067), and unbinding (`destroy()`, `unbind()`) lifts gina's mark, which left the field dead before (#B1068). The removed interception cancelled each key and rebuilt the value by hand: `email` and `number`, which have no Selection API, typed backwards and posted that way (`123` sent `321`, an uncaught `InvalidStateError` per key), Tab trapped or skipped, Enter did nothing, `maxlength` was ignored, an authored `readonly` was lifted, `input` and `beforeinput` never fired, and a `query` rule sent one request per key; and on Safari 27 it did not stop the browser's list anyway (read by eye, control firing). The caret tracking #B389–#B392 fixed in it went with it. `change.<id>` still fires on focusout, so a required field left empty shows its error on blur, on this shape on Safari only. A driver's `fill()` needs `focus()` first on such a field. Browser-bundled ⇒ pickup is a re-bake. Tests: `test/core/validator-autocomplete-readonly-b1055.test.js` (source pins, the real handler and gate bytes on a fake element, dist pins) + the webkit-only e2e `test/e2e/validator-autocomplete-readonly-b1055.spec.js` (runs in the on-demand cross-engine job). **#B200 (shipped in 0.6.12): a NON-STRING field value no longer aborts the whole validation pass.** `isEmail` and `isJsonWebToken` opened with a TRUTHY-only coercion (`(this.value) ? this.value.toLowerCase() : this.value`), so a truthy non-string — `123` / `true` / `[]` from a JSON body, or a checkbox boolean on the client — reached `.toLowerCase()` and threw; `trim` was WIDER still, its type guard present but COMMENTED OUT and no truthy guard either, so EVERY non-string threw, a falsy `0` included. In all three the rule driver's catch RE-THROWS (`[ ginaFormValidator ] could not evaluate …`), so one bad field kills every remaining one: server-side the request goes unvalidated, client-side the boot-time binding loop dies and later forms silently lose validation AND CSRF injection. Fixed by type-guarding each site against a precedent already in the file — the #B87 `query` coercion for the two rules, isFloat's identical guarded `.replace()` for `trim`. **Measured, and the load-bearing check: the guard does NOT open a #B199-style silent bypass** — a non-string passes through untouched and the rule's own regex then rejects it, so `isEmail`/`isJsonWebToken` record a normal rule-keyed error (`isValid === false`), while `trim`, being a transform, leaves it untransformed (the #B245 both-ends strip on real strings is unchanged). **Reusable rule: type-guard BEFORE a string coercion, never truthy-guard** — a truthy check admits every non-string except the falsy ones (the authn.md §4 lesson, and the same split that sent falsy values to #B199 and truthy ones here). Deliberately NOT fixed in that pass: `isDate` (its throw is a purpose-built catch — an error-contract design call, #B397). `toFloat`/`format` — plus the same-family `set` — were later fixed by #B398 (context-safe rules; `test/core/validator-context-safe-rules.test.js`): `toFloat` reads the live DOM value only when one is reachable and otherwise uses the submitted `this.value` (server-side that IS the raw value, so the rule is fully functional in both contexts; the missing comma that leaked `isFloatingWithCommas` as an implicit global is fixed with it); `set` assigns the value everywhere and guards its DOM write (`isGFFCtx && target`); `format` always worked in BOTH contexts after `isDate` — the filed "dateFormat prototype extension absent server-side" mechanism was REFUTED by measurement (helpers/index installs `Date.prototype.format` unconditionally, server included) — and a non-Date value now throws a NAMED authoring error (`apply isDate(mask) before format(mask)`) instead of the opaque `val.format is not a function` (`toFloat`/`format` were first misread as this same class by a probe whose STRING CONTROL also threw, which is what exposed them). Browser-bundled ⇒ pickup is bundle restart AND re-bake. Tests: `test/core/validator-nonstring-value-guards.test.js` (comment-stripped source pins red-first vs the pre-fix blob, behavioural arms asserting the VERDICT not merely the absence of a throw, wrap-agnostic dist pins red-first vs the pre-fix artifact, plus untouched-rule controls incl. one labelled INVARIANT because it cannot go red). **The form-level keydown proxy defers the native-cancel decision to the namespaced handler (#B444, gh issue #67):** `addListener(gina, $el, 'keydown.<id>', fn)` registers a CUSTOM event type a native keydown can never fire; the form-level `keydownProxyHandler` bridges the two by re-dispatching - and it used to `cancelEvent()` the NATIVE keydown unconditionally BEFORE that dispatch, so on real-Safari UAs (where the autocomplete interception, removed by #B1055, registered exactly such a handler) EVERY modifier chord on a live-checked autocomplete-suppressed field was dead - paste, select-all, copy, cut, undo - with NO paste/beforeinput event observable anywhere (preventDefault on a native keydown suppresses the browser editing command itself), while the interception handler's own chord bail sat one layer too low to help. The proxy now dispatches FIRST and cancels the native keydown only when the handler prevented the synthetic event; `triggerEvent` returns the dispatched event to make that decision readable, undefined on the element-less path - treated fail-open to native. The keyup proxy is untouched (no `keyup.<id>` registrar exists). Measured live on WebKit: chords restored. Tests: `test/core/validator-keydown-proxy.test.js` (extract-and-execute on both changed functions) + `test/e2e/validator-autocomplete-paste.spec.js` (webkit project, cross-engine job). **#FIN4 (`isIban` / `isBic`, 0.6.x):** IBAN and BIC join the built-in rule set. `isIban` validates ISO 13616 in three ordered checks - shape (`^[A-Z]{2}[0-9]{2}[A-Z0-9]{1,30}$`), official per-country length via the constructor-scope `_ibanLengths` registry (87 countries; unknown country codes deliberately pass on shape + checksum so a registry gap never hard-fails a well-formed IBAN), and the ISO 7064 MOD 97-10 checksum folded modulo 97 in <=7-digit chunks of plain Number math (no BigInt in bundled source - build-chain constraint). Tolerant read: validation runs on an uppercased copy with spaces/hyphens stripped; the stored value and the DOM are NEVER mutated (unlike `isEmail`'s lowercase write-back). The type guard folds into `isValid` (`typeof(candidate) == 'string' && rgx.test(...)`) so a toString-spoofing object records an invalid instead of throwing into the rule driver (#B200 posture, tightened). `isBic` validates the ISO 9362 8/11-char shape case-insensitively by regex - no case mutation. Both follow Shape A (`this.valid = isValid && !errors['isRequired']`), the strict #B199 empty bypass, and register English defaults in `_defaultErrorLabels` ('A valid IBAN is required' / 'A valid BIC is required'), culture-localisable like every built-in label. Behavioral + pin coverage: `test/lib/validator-isiban-isbic.test.js` (real-engine; fixtures verified against an independent BigInt oracle). **Autofill signal (#B478, 0.6.27):** the live check re-runs only on the proxied native `change`/`keyup`/`focusin`/`focusout`, and a browser or password-manager fill produces NONE of them - on Chrome not even at fill time, and the filled VALUE stays withheld from script (`.value` reads `''` while `:-webkit-autofill` matches) until the first trusted gesture, which then releases it and fires a keydown/input/change/keyup burst per field (measured, Chrome 152 - which is also why a "gated" trigger always submitted on the first click). So a form filled without keystrokes kept its bind-time gated look on a visibly complete form, and an autofilled INVALID value showed no error. Fix: the default stylesheet (`src/vendor/gina/autofill/sass/autofill.scss`, FUNCTIONAL so deliberately outside `@layer gina`; its keyframe carries a declaration because csso strips an EMPTY `@keyframes` block) gives every `:autofill` / `:-webkit-autofill` control a 1ms keyframe named `gina-autofill-start`; the validator's form-level `animationstart` proxy (`autofillProxyHandler`, also on reassociated controls) dispatches the field's own `change.<id>` live check when the value is readable, and calls `revalidateSilently()` when the browser withholds it. `excludeWithheldAutofill()` narrows the five LIVE-CHECK collectors (bind-time, live global, select global, reveal, silent) so a withheld field neither gates nor renders a false "required" error; the SUBMIT collectors stay strict, so `isValid()` still refuses to post a withheld (empty) credential. A consumer rule setting `animation-name` on those pseudo-classes replaces the hook - keep `gina-autofill-start`. Pins: `test/core/validator-autofill-livecheck.test.js` (extract-and-execute, dist + stylesheet contract) and `test/e2e/validator-autofill.spec.js` (the served keyframe applied through a harness class - real autofill is invisible to automation and to fresh CI profiles). **Honest label for a withheld autofill at submit (#B341, 0.6.27):** the submit collectors are strict by design, so a control the browser autofilled but still withholds fails `isRequired` at click time; that verdict is right, but the plain required label named a problem the user could not see. `isRequired` now consults the plugin's single withheld predicate (exported as `gina.validator.isAutofillValueWithheld`) and, when true, composes the message from the new built-in key `isRequiredAutofill` (default `Filled in by your browser: click the field to confirm it`) - the errors key stays `isRequired`, the verdict and the gate are untouched - and marks the control `data-gina-form-autofill-withheld="true"` until its next adjudication (a CSS/JS hook and the locale-agnostic test signal). `_labelAliasFill` copies an app-supplied `isRequired` onto `isRequiredAutofill`, so a localized catalog keeps its own wording until it translates the new key: never key a test on the English text. Pins: `test/core/validator-autofill-honest-label.test.js` (the rule, `replace()` and the alias fill executed from the shipped engine bytes; red-first through `GINA_FORM_VALIDATOR`) + `test/e2e/validator-autofill-honest-label.spec.js` (chromium + webkit; the plain label read off the page first, the honest render asserted to differ and to carry the marker). **Same-name pairs with a hidden twin (#B510, 0.6.29):** the painter walks `$form.elements` in document order and, on the per-field path, exits on the first control whose name matches — and a BARE `type="hidden"` control (no `form-item-wrapper`) can never be painted (every paint gate skips it). It used to consume the error anyway (box class set, no message, no `aria-invalid`, walk stopped), so the recommended disabled-control shape — a visible control plus a hidden twin carrying `"exclude": false` — lost its server-side field error whenever the hidden twin came first; on a shared box the pre-marked class blocked the visible twin's first-error branch even without the exit. A bare hidden control is now skipped when another control of the same name can be painted (`hasPaintableTwin`); a lone bare hidden keeps the former behaviour, a wrapped hidden is still painted after its wrapper. Browser-bundled: pickup is a bundle restart AND a re-bake. Tests: `test/e2e/validator-hidden-first-paint.spec.js` (real bytes, seven shapes) + `test/core/validator-hidden-first-paint.test.js`. **Binding scope (#B549, 2026-09-17):** the boot scan binds ONLY opted-in forms — a `data-gina-form-*` attribute, an existing id naming a registered rule (`-` read as `.`), or a virtual `gina-upload-*` id; any other `<form>` is left untouched (no minted id, no `$forms` entry, no submit proxy) even on a rules-bearing page, matching the forms guide. Explicit `validateFormById()` / `getFormById()` stay ungated opt-ins. Before the fix the scan's `else` arm bound every form after minting it a generated id, so declaring ONE rule file turned every plain login/signup form on the site into an always-XHR submit — and on isaac HTTP/2 that XHR-answered `req.login()` then lost its session cookie (#B550). **Staged-upload failure paths (gh#83, #B724/#B725/#B727/#B728/#B731, 0.7.2):** (a) #B727 — `onUpload` writes a staging error into the `-error` element as `textContent` inside a created `<p>`, never `innerHTML`: a non-2xx non-JSON body is kept verbatim as `result.message`, so a proxy/WAF HTML page or a reflected filename used to be parsed as live markup (the sink dated from 0.1.1). (b) #B724 — a status-0 settle reports `{status:408, transportError:true, reason, error: a11yLabel('transportError')}`; the text is 'Transport failure: the request did not complete' (a proxy 413 mid-send over HTTP/2 and a navigation abort both DID reach the server), overridable through `gina.config.a11y.transportError`; `reason` is `'unload'` while a `pagehide` is in effect, else `'transport'` — #B728 resets that flag on `pageshow`, because a back-forward-cache restore keeps the page's JS state. (c) #B725 — both payload collectors (`getFormValidationInfos` and the submit proxy's inline loop) skip a `type=file` control carrying `data-gina-form-upload-action`, so its `.value` (`C:\fakepath\<name>`) never rides the payload. ⚠️ CORRECTED by #B1058 (0.7.9): the skip left `fields[name]` undefined, so from 0.7.2 to 0.7.8 NO rule ran on a staged input (`isRequired` let the form go with no file, where 0.7.1 refused it); the old « it stays in `$fields` for rule evaluation » held for `$fields` only, which the rules never read for it. Since 0.7.9, when `rules[name]` is defined, both collectors give it `getStagedUploadValue($input)`: the names of `customFiles` (the last successful staging's files, or the saved entries an edit form shows) and of `pendingFiles` (a selection still staging), joined with `', '`, `''` when none. `forEachField`'s terminal block then excludes the field INLINE, once every rule of the pass has run and before the errors are read (`exclude(true)`, so `toData()` never carries it; `isRequired(false)` splices a name back out of `local.excluded`, so never as an injected rule key; inline because eight suites lift `forEachField` into `new Function` and a helper call there threw in 51 of their tests). `resyncStagedUploadGate($input)` (→ `revalidateSilently`) re-derives the form's gate at the selection (after the pending write), as `onUpload`'s last statement and after a reset or delete, only for an input with a rule: the live check never binds a `file` input, so this is the only gate writer for one (without it a live-checked form's trigger stayed not ready after a staging). A staged input without a rule is collected as before, with no value. Limits: a `_case_` condition's rule on a staged input is not applied with one case key, and with two or more keys a non-last driver's condition judges the input's own `.value` (#B1095, LOW, open); a RegExp rule key does not match one; the plugin's server pass (`gina.plugins.Validator(rules, data, formId)`) sees the files as the nested `<prefix>[i][…]` array (`isRequired` refuses `[]`) but checks no key absent from the data, and gina writes none of its file fields for an input with no file (a field the page declares at an index is the page's). Tests: `validator-upload-staged-b1057.test.js` §05–08 (source, `gina.js` and `gina.min.js` arms) + e2e `validator-upload-staged-b1057.spec.js` C1–C9. ⚠️ The default error render runs ALONGSIDE a declared `data-gina-form-upload-on-error` callback (element first, then `error.<vid>` and the callback), so a callback cannot suppress it. (d) #B731 — the error element is OPTIONAL: without it the message is announced through the form's live region (`announceA11yError`, when non-empty), a dev-mode `[FormValidator] upload … no error element` warning names the missing id, and `error.<vid>` and the callback still run; `onUpload` used to `throw new Error(errMsg)` there, with `errMsg` undefined outside the rendering branch, BEFORE either dispatch, so the callback never ran, for an HTTP error and a status-0 failure alike. The slot id is read ONCE, from the file input (`data-gina-form-upload-error`, default `<input id>-error`): it was recomputed for every `<input>` of the real form and kept the LAST one's, so a custom slot was honoured only when the file input was the form's last input. Residual: the bind-time `checkUploadUrlActions` still looks its errors up only at `<id>-error`. Pin: e2e `validator-upload-error-slot-b731.spec.js` (5 arms, red-first on the pre-fix dist). **A reset, a script's write and a shared field id reach the live check by distinct paths (#B1037, #B1036, #B1035, 0.7.8).** A form reset runs no live check: `resetFields` holds the listeners off with `$form.isBeingReseted` while it writes (down in a `finally`), skips a control removed from the page and reads an empty select without throwing, clears the display and `errors`, and ends with one pass marked `cb.isSilentPass`, which only re-reads the gate (it takes the #B348 rescue of a clean verdict on a `query` field not last, ignores the answer to another value, and leaves a request's trigger lock; a master checkbox's timer re-reads the gate once its group is applied; with live check off `.resetFields()` runs no pass); `$form.resetCount` tells a pass already on its way, so the live listeners drop it, the `query` waiter in `validate` neither stores nor paints a verdict that outlived the reset, and a submit it refuses is released with nothing painted (one it accepts still sends). A pass that outlives its FORM stops the same way (#B1069): `processEvent` (the keyup debounce, the deferred radio/checkbox pass) and the `query` waiter return when the field has no form or the form has no record — `destroy()` dropped it, or the field left the form — where reading the record threw an uncaught TypeError; a pass whose record exists runs as before, a `destroy()` then bind included (pins: e2e `validator-destroy-pending-check-b1069.spec.js`, red-first through `GINA_B1069_PREFIX_BUNDLE`; unit `validator-destroy-pending-check-b1069.test.js`). On a `reset` event `text` and `hidden` inputs still end on their `defaultValue`; `.resetFields()` alone ends on the value at bind. Since 0.7.9 a reset also restores a form-associated custom element (a `-` in its tag name) through its own `formResetCallback`, which the native reset gina cancels would have run: one without it keeps its value, as a native reset leaves it, and a callback that throws is rethrown on a timer while the others still run (#B1041); as natively, the callbacks run once every other control is restored, so a callback reading a sibling sees its restored value, and a component no longer among the form's `elements` (moved into another form since the bind) is left alone (#B1087). A submit waiting for a staged upload (#B726) is dropped at the top of `resetFields` and its busy state released unless a request of the form's own is in flight, so the upload's success replays nothing (#B1043). A live-checked select's change no longer writes the page's `window.once` (#B1038: an undeclared `once = false;` in `updateSelect`'s whole-form callback). Pins: e2e `validator-reset-face-b1041.spec.js`, `validator-reset-face-order-b1087.spec.js`, `validator-reset-upload-wait-b1043.spec.js`, `validator-select-global-once-b1038.spec.js`, each red-first through its `GINA_B10xx_PREFIX_BUNDLE`; unit `test/lib/loading-state.test.js` §06 (h). A script's `el.value = …` re-checks the form and updates the gate and the store, and paints nothing new (`ginaFormIsScriptWrite`, read synchronously into `isQuietWrite`; both its passes are silent; a radio stays out, `updateRadio` writing a boolean pair's value on the user's own pick), unless the field already shows a message, which changes or clears; a real `change` dispatched after the write paints. A `textarea` and the `tel`/`url`/`search`/`time`/`datetime-local`/`month`/`week` inputs have no value setter, so a write there re-checks nothing. `gina.events['registered.<id>']` and `change.<id>` are global and keyed by the id, so of two controls that share an id only the first is live-checked: that stays (duplicate ids are invalid HTML), the bind warns once per form and id, and a reset works on the form's own controls. Pins: e2e `validator-form-reset-b1037.spec.js`, `validator-shared-field-id-b1036.spec.js`, `validator-script-write-b1035.spec.js`, each red-first on the pre-fix dist with its `GINA_B10xx_PREFIX_BUNDLE`.
959
+ 209. **FormValidator — engine disambiguation, string inputs, a11y reflection, and live-check message visibility (consolidates former #42/#130/#150/#186/#197).** The live form/data rule engine is `core/plugins/lib/validator/src/form-validator.js` (single source, `isGFFCtx`-branched: runs server-side via `backendInit` AND compiled into the browser bundle) with the client orchestration in `validator/src/main.js` — `framework/v*/lib/validator.js` is a DEAD standalone fluent validator with overlapping `is*` rule names; never edit it for form-rule work (tell them apart fast: the live engine's `isRequired` rejects whitespace-only input, the dead one passes it). Rule bodies must handle STRING inputs — the two DECLARATIVE contexts feed strings (`.value` + urlencoded bodies) — so a typed/numeric rule coerces or parses explicit components, never assumes a typed JS value; but "always a string" is NOT true of every path, and reading it that way shipped #B198 (see below): a JSON request body keeps real Numbers (`JSON.parse` → `req.body`/`req.post`, which the `validator::{}` routing path MERGES into the validated data before spreading array bounds through `apply()`), and `toInteger` leaves `Math.round()`'s real Number on `this.value`, so a `toInteger` → `is*` chain hands the next rule a Number even in the browser — a rule must therefore be correct for a typed value too, not merely tolerant of strings: `isFloat` coerces via `Number()` (#B46); `isDate` builds from explicit mask components + a round-trip check so non-ISO slash masks aren't US-misparsed and impossible dates still reject (#B47); `isDate` returns the FIELD again on its valid path (#B48, 0.5.4 — parsed `Date` preserved on the field's `.value`, the `isDate(mask).format(...)` idiom unchanged), so rule chaining works. ⚠️ **The FIELD keeps the `Date`; the PAYLOAD takes a `yyyy-mm-dd` string, always (#B558, 0.6.32-alpha.2).** Every validator normalises the payload to the validated canonical form (`isEmail` lowercases, `isBoolean` → boolean, `isNumber` → `Number`), so `isDate` normalising is consistent — but `Date` is the one normalised type that does NOT round-trip through JSON: `JSON.stringify` renders it via `toISOString()`, a UTC **instant**, and local midnight at any positive UTC offset is the PREVIOUS day in UTC. So a browser in Paris submitting `2026-09-18` sent `2026-09-17T22:00:00.000Z` and every reader that sliced the date part stored the 17th — silent (the instant is well-formed) and invisible to a server or CI running in UTC. The written shape is mask-INDEPENDENT: the mask governs INPUT parsing, while both `requirementToSchema()` and `dto.date()` already published the field as `{type:'string', format:'date'}` (RFC 3339 full-date, explicitly NOT `date-time`), so the payload now matches the schema gina was already advertising. Consumer-visible: `req.body.<field>` is a string, not a `Date`, and `new Date('2026-09-18')` on a date-only string is UTC midnight, not local midnight. An empty value is adjudicated by `isRequired` ALONE (#B78): the per-rule empty-bypass became unconditional on empty (`if (this.value == '')`, its old `!errors['isRequired']` gate dropped) for `isEmail`/`isJsonWebToken`/`isFloat`/`isInList` — each regating `this.valid = isValid && !errors['isRequired']` — and `isString` keeps the field invalid without recording a second message, so a required-empty field shows ONE message (`is required`) not two, optional empty fields still pass, a filled-but-invalid value still reports its own error, and custom `is` was deliberately excluded by #B78 and re-declined by #B82 — an exclusion REVERSED by #B233 (2026-08-03, 0.6.3, `307721f2`): `is` now carries the same canonical strict bypass (`if ( this.value === '' ) { isValid = true; }`) and the same regate, taking the Shape-A population from four rules to FIVE, so a required+EMPTY field carrying an `is` condition records `isRequired` ALONE instead of also collecting a second `Condition not satisfied`. `isBoolean` joined the same contract at #B235 (2026-08-03, 0.6.3, `aa1c2035`), taking that population to SIX: its pre-switch rescue `errors['isRequired'] && this.value == false` was LOOSE (`'' == false`), so a required+EMPTY boolean field LOST its isRequired error and reported `Must be a valid boolean` instead of `Cannot be left empty`; the rule now takes the canonical strict `=== ''` self-pass, and the rescue moves AFTER the accept-set switch gated on the value having been ACCEPTED (`val !== null`) — which keeps the documented unchecked-but-required-toggle case working, since a recognized `false`/`0` is a present answer, while emptiness returns to `isRequired` alone. Paired in the same commit with #B236, the SERVER-side half: the plugin's `getCastedValue` funneled EVERY value on an isBoolean-ruled field through `/^true$/i ? true : false` BEFORE the engine ran (client AND server — `validate` calls `formatFields` unconditionally), so on the server auto path junk validated CLEAN and PERSISTED as `false` — `nope`, the HTML checkbox default `on` (a CHECKED box storing UNchecked), the strings `1`/`0`, `TRUE`/`True` — and the NUMBER 1 stored `false` where the engine reads it as `true`. The pre-cast now survives ONLY in dynamised-rules mode, where a referenced boolean field must splice into a stringified `is` condition as an unquoted operand (measured NECESSARY: deleting it outright breaks a server `$flag === true` condition); the ENGINE is the single adjudicator on every surface, which is what the routing `validator::` surface always enforced and what the published reference already promised. Disclosed both directions: values that silently stored `false` now ERROR, the number 1 flips its stored value `false`→`true` on a verdict that was already valid, an optional blank boolean field now PASSES instead of erroring, and a required blank field's message changes from isBoolean to isRequired. A sibling server-path crash in the same plugin is fixed by #B234 (2026-08-03, 0.6.3, `7c56565d`): `getDynamisedRules` substitutes in two passes, and the SECOND is a DOM fallback re-deriving each splice value from the live element (`$fields[...].value`) — which `backendInit` calls with `$fields = null`, so it threw `TypeError: Cannot read properties of null` on its FIRST iteration for ANY `$` surviving pass 1: a regex end-anchor in an `is` condition, a `$` inside a human-readable message string, or a `$` in any array-rule element after the first. Plain cross-field `$peer === $me` never crashed, because pass 1 consumes tokens that NAME fields. The loop is now gated `$fields && ...`, joining the #B127 precedent one function later; `validate`'s same-text gate is deliberately left UNGUARDED, being reachable only with a live DOM. Residual, disclosed — and since FIXED (#B239): a `$` token in an ARRAY rule's FIRST argument that names no field (`isInList: ['$100']`) threw one site later at `checkFieldAgainstRules`' `d[<token>].value` — NOT DOM-dependent, so it reached the client too. The substitution is now gated on the token resolving to a REAL field (an existing `d` key with a defined `.value` — two clauses, both load-bearing: an engine-METHOD-name collision like `'$isValid'` resolves to a defined key with no `.value`, and pre-fix spliced the string "undefined" into the rule for a silent wrong verdict rather than a crash); anything else stays LITERAL so strict comparison applies (`'$100'` matches its own literal, rejects non-members with the rule's own error; bare-`$` and mixed elements covered). `$` is therefore the engine's RESERVED cross-field sigil: whether an authored `$` stays literal depends on a runtime field-name collision — a token naming a sibling field is consumed UPSTREAM by getDynamisedRules loop 1, substituted with quoting fit for `is`-condition splices, not array elements (`"yes"` with quotes can never match `yes`), so real cross-field refs in array-rule elements are always-invalid, fail-closed, never-worked, undocumented (the reference scopes `$name` to `is` expressions) — tracked as #B240 (demand-gated; the fix is relocating array-element substitution into checkFieldAgainstRules, whose guarded loop is deliberately preserved as the substrate). This reserved-sigil model is also the #DTO2 `$` guard's CURRENT rationale (the crash rationale is retired — deterministic literal semantics are impossible for any `$`, so toRules() refuses at boot rather than validate collision-dependently). The reversal is measured rather than re-argued: the old bypass was gated on `!errors['isRequired']` — off exactly when #B78 wants it on — beside a two-disjunct guard that was DEAD CODE (`x == '' && x != 0` has no witness), optional+empty ALREADY self-passed through the live else-if, and on required+empty the condition is VERDICT-IRRELEVANT (form validity is `getErrors().count()` and `isRequired` has already errored), so form validity and the request payload are identical in both directions and only the message list changes; the "coercion-sensitive" premise had already been retired by #B199's strict test, which leaves `0`/`false`/`null` as operands that still evaluate the condition. #B82 is neither regressed nor retired — its root `getCastedValue` quoting and its `is()` grammar guard stay necessary and reachable with a FILLED host; #B233 only closes that crash path a second time for an empty HOST, whose condition is no longer compiled at all. Same commit drops the dead `_defaultErrorLabels['isApiError']` entry (zero consult sites: the API path assigns the server's message directly and never calls `replace()`) - but a cross-field `is` (`"$a === $b"`) no longer THROWS when the referenced field is empty (#B82): the client dynamised-rules substitution (`getCastedValue` in `main.js`) now renders an empty referenced operand as a quoted `""` (it was spliced RAW, leaving a dangling `"7654321" === ` that `is()`'s binary-comparison grammar `_SCS_BINARY_RE` rejected -> an uncaught throw that aborted the whole-form validity pass and left the submit trigger ungated on an invalid form, breaking the documented `is`+`isRequired` value-confirmation pattern while the confirm field was blank), mirroring `getDynamisedRules`' own sibling substitution default (`: '\"\"'`); `null`/`undefined` stay raw (already valid operands). Hardening: `is()`'s grammar mismatch now FAILS-THE-FIELD (`console.warn`+`isValid=false`) instead of throwing, so a per-keystroke live check can never abort the gate on a residually-unparseable condition (e.g. a field literally valued `"NaN"`, which the root fix leaves raw). Browser-bundled -> prod dist rebuilt; the `#SCS1e`/`#SCS1h` eval-safety pins target the untouched `_SCS_BINARY_RE`/`_scsParseOperand`/regex-literal constructs, so the hardening flips none of them. **The splice itself was UNESCAPED until #B600-#B602 (gh#77, 0.6.33):** `getDynamisedRules` pastes every referenced value into the STRINGIFIED rule set and parses it back, so a `"`, `\` or control character in a referenced value (a textarea, a password) threw out of the whole pass (client: dead submit; server: the error escaped the plugin), at FOUR sites - `getCastedValue`'s string return AND its number-rule branch, the loop-1 default for a referenced field with no rule, the loop-2 DOM default - each through a STRING replacement that also expanded `$&`/`$'`/`$$`. Every splice is now `quoteForDynamisedRules(v)`, i.e. an escaped quote + `escapeForJsonString(escapeForJsonString(v))` + an escaped quote (the escaper touches ONLY `"`, `\` and U+0000-U+001F, so the splice is byte-identical to the old one for every value that did not throw), through function replacers, with the closing parse guarded (fallback: the rules as declared, which `is()` resolves or fails closed). A number-ruled referenced value splices raw only when it IS a number (typed, or text matching `/^ *-?\d+(?:\.\d+)? *$/` - the padding keeps `" 12"` vs `12` valid as before); other text compares as a string. Note the engine's `isNumber` is LENIENT (`parseInt`: `1"2` and `12abc` pass as the leading number), so a number field's own verdict never discriminates such values - compare `1"2` vs `1"3` instead. `is()`: the string operand is `"(?:[^"\\]|\\.)*"`, decoded with `JSON.parse` (an AUTHORED literal that is not valid JSON, `"C:\dir"`, is read verbatim as before; one that cannot be read at all fails the field, never throws); its own `$` substitution splices `JSON.stringify(value)` through a function replacer; the `(`/`)`/`return` strip runs OUTSIDE string literals only (#B601 - it made `ab(cd` equal `ab)cd`, also on route requirements); and a condition no longer needs an ASCII alphanumeric run to be evaluated (#B602 - `!!!`/`é€` never matched; through `$` tokens the gate saw the token NAMES, so it bit the plugin path and literal conditions only). The client `query` body: a late-resolved token splices twice-escaped and `decodeSplicedQuotes()` restores each spliced literal instead of deleting every escaped quote - byte-identical for any body whose strings carry no backslash (token-wise, so key order survives); an AUTHORED quoted segment holding a valid JSON escape is the one divergence (decoded). **One `$`-token grammar at every site (0.6.33, #B603/#B604/#B606):** `FormValidatorUtil.substituteFieldTokens(text, names, resolve)` — a token is `$` + a field name in scope, the LONGEST name wins in one pass over the original text, a token ends where its name ends provided the next character is outside `[A-Za-z0-9_-]` (so `($a) === ($b)`, `$a===$b`, `$a,` resolve while `$passwordX` leaves `password` alone), names are case-sensitive and RegExp-escaped (`$pw[0]`, `$a+b` resolve), a replacement is never scanned again, and a `$` naming no field stays literal. Before it: the plugin's `getDynamisedRules` replaced one name at a time and re-read the text after each splice, so a value holding `$<otherField>` was substituted twice (#B603 — and the two-argument `is` form re-read the resolved condition through the array-rule scan, which now skips `is`/`is<N>`); its DOM-fallback second loop, which could only act on a `$` a spliced value carried in, is retired with #B234's gate; the engine's `is()` resolved a token only when whitespace or the end followed it and interpolated names unescaped (#B604) — it now resolves OUTSIDE string literals only and never inside a regex-literal condition, so the plugin path's already-spliced literals are not resolved a second time; the client `query` body scanned `\$[-_\[\]a-z 0-9]+` — lowercase-only with a space in the class — so `$passwordConfirm` resolved `$password` + `Confirm` (another field's value on the wire), a prefix pair resolved by body order, and an unknown `$` was sent as the string `null` (#B606). Value semantics per site are unchanged (`getCastedValue`/`quoteForDynamisedRules`, `JSON.stringify`, the twice-escaped `query` splice). The form's validity comes from `getErrors().count()` (the surviving `isRequired` error), never the per-field `.valid` flag (whose only error-dropping reader, `setErrors`, is dead). Length bounds are ARITY-sensitive, and the source JSDoc was WRONG about it until 0.6.3: `"isString": [N]` (same for `isInteger`/`isNumber`) supplies `minLength` ONLY — identical in effect to the scalar `N` — because the exact-length branch fires only when `minLength === maxLength`, so an exact length needs `[N, N]`; the stale comment had propagated verbatim into the published reference page, so correct BOTH surfaces when one is found. Those bounds measure the value's STRING FORM (`val.toString().length`) — until 0.6.3 `isInteger` alone measured a bare `val.length`, which is `undefined` on a real Number, so BOTH its bounds were silently inert on every numeric value: no error, no warn, field left `valid` (#B198, a fail-OPEN bypass reachable from a JSON body, a `validator::{}` requirement, or a preceding `toInteger` — the browser included). `isString` reads the same bare `val.length` at two sites and is CORRECT there because a `typeof(val) == 'string'` guard precedes it, so this class of fix is line-scoped: a whole-file replace of the bound expression hits four sites, two of which must not change. One consequence of measuring the string form, intended: a negative number counts its sign toward the length (parity with the same value arriving as a string). The zero-swallow residual #B198 initially left open is CLOSED by #B199 (0.6.3): loose `== ''` emptiness tests conflated `0`/`-0`/`false`/`[]` with the empty string at FIVE sites — the isInteger/isNumber bounds gates AND the isEmail/isJsonWebToken/isFloat empty-bypasses, where a JSON body's `{"email": 0}` validated as a correct email — all five now compare strictly, so only the literal `''` bypasses (the designed empty-is-adjudicated-by-isRequired contract, preserved byte-exactly); `isString` stays loose behind its typeof guard (operators identical for strings), `isInList` was already strict, and `isDate`'s broader `!val` swallow (a silent half-state: `valid` false, NO error recorded, so the form passes) is deliberately untouched. STILL OPEN sibling (#B200): a TRUTHY non-string in an isEmail/isJsonWebToken field (`{"email": 123}`) hits an unguarded `.toLowerCase()` and the rule driver RE-THROWS, killing the whole validation run — the falsy/truthy non-string space is partitioned between the fixed bug and this one. Custom validators (`bundle/validators/<name>/main.js`) are a BROWSER-ONLY affordance, NEVER a server-side guarantee: the server gate reads `getContext('gina').forms` while the loop it guards reads a bare `gina` that is undefined in Node, so a custom rule never attaches server-side and the engine then silently skips the unknown rule name with no warn — re-validate such constraints in the action. (Publishing that context without also fixing the loop would make EVERY validator construction throw, including for bundles shipping no custom validators.) Since #M21d (2026-09-26) the browser compiles a custom validator as an inline `<script>` — `gina.forms.compiledValidators[<name>]`, one compile per validator per page, carrying the page's CSP nonce when one is set, `//# sourceURL=<name>.js` in DevTools — with NO `eval`, NO `Function` and no `'unsafe-eval'` needed; the scope contract is unchanged (the spliced prologue hands the body `self`/`local`/`isGFFCtx`/`replace` through `this.getValidationContext()`), a file the browser cannot compile throws `[UserFormValidator] Could not evaluate` pointing at the console's SyntaxError, and server-side a FUNCTION registered on the context is attached as it is while a source-shaped one is refused naming the browser-only contract. The bundle build (`core/asset/plugin/lib/js/no-dynamic-code.js`, run by `build` after r.js and again after Closure) also rewrites the two unreachable vendored calls the r.js output inlines — RequireJS `req.exec` (the `load.fromText` transpiler-plugin path) and engine.io-client's `Function("return this")()` global shim — by EXACT match, failing the build if a dependency bump moves them, so the published bundle carries no dynamic-code call at all: Socket's `Uses eval` verdict, which flipped the package score 62 ↔ 42 on identical bytes, has nothing left to fire on (pinned by `test/lib/validator-m21d.test.js` + `test/core/bundle-no-dynamic-code.test.js`). A rule-body edit needs a prod dist rebuild AND flips the section-locked characterization tests by design. Editing trap: `form-validator.js` embeds hidden NO-BREAK SPACE bytes (U+00A0) where a normal space appears inside several `||`/ternary sequences, so a literal-space find/replace spanning one silently fails — patch such regions with a byte-scoped script over clean-ASCII substrings, not a space-spanning match. The blur-time global validation pass sets submit-button state but renders errors ONLY for the touched field — untouched invalid fields stay quiet until interacted-with or submit. For a `<select>`, the touched field is the select whose `change` started the check: before 0.7.4 its live check (`updateSelect`) read the global `event`, which inside the whole-form pass's callback is that pass's own `validated.<form-id>` event on the form, so the lookup used the form's `name` and the select's whole-form error was never displayed; it now reads the element it is given (#B781). Accessibility (#A11Y1): the rule-agnostic chokepoint `handleErrorsDisplay` reflects committed errors into `aria-invalid="true"` (gated on committed-not-warning; `"false"` on clear mirrors native `ValidityState` so it agrees with `:user-invalid`; hidden fields skipped), auto-wires `aria-errormessage` to a gina-owned message div UNLESS the consumer provided their own, focuses the first DOM-order invalid field on a failed submit, and announces blur-time errors via a per-form visually-hidden `aria-live="polite"` region; the per-field aria passes fire only under live-check — the always-on submit pass covers every bound form regardless. Live-region LIFECYCLE (#A11Y2): creation is split out of the announcer into `ensureA11yLiveRegion($form)` and called from `bindForm` — the chokepoint every registration path funnels through — so the region is in the a11y tree from BIND time. It previously created, inserted AND populated the region in one synchronous tick, which reaches assistive tech as a single mutation batch on a node it has never observed, so the FIRST announcement per form (the one that matters most) was the one least likely to be spoken while every later one worked. The region is a CHILD OF THE FORM on purpose: a popin renders its form inside a native `<dialog>` opened with `showModal()`, which leaves everything outside the top layer inert, so a body-level region would go unspoken for exactly the forms that live in popins — the placement is an accessibility constraint, not a convenience. The price of that choice is that a subtree replacement (`$el.innerHTML =` on a popin re-render, a nav fragment swap) destroys it, so `ensureA11yLiveRegion` is create-OR-RECOVER and also re-homes a region whose form node was replaced; any region created or re-homed at announce time is marked fresh and defers its first write one macrotask, so insertion and mutation land in different ticks — that deferral is what stops a recovery from silently repeating the defect, and it is load-bearing because a re-render does NOT always re-bind (`validateFormById` early-returns on an already-registered id, and a multi-form popin's teardown loop splices while iterating so it skips every odd-indexed form). An already-bound region writes synchronously, unchanged; while a deferred write is pending a newer error replaces the pending text so the LATEST message wins, and the timer re-enters the announcer, keeping exactly ONE `textContent` write site. Rule: a live region must be observable BEFORE it is written — separate creation from announcement, and when the same call must do both, put a tick between them. **Submit LIFECYCLE exposure (#A11Y4):** the accessibility signals for an in-flight submit hang off the request window inside `send()` — the only place reached once an XHR genuinely exists — and that placement is the fix for a timing trap, not an accident: the loading state (`data-gina-loading`) is armed at CLICK time, BEFORE validation runs, so a signal hung there would arm-then-disarm on every rejected submit and announce a spurious busy/not-busy pair. Three effects, all scoped to that window. (1) The trigger's focus is captured before gina natively disables it and restored once the request settles: a natively `disabled` control cannot hold focus, so the browser drops focus to `<body>` and re-enabling does NOT bring it back (both measured), which silently cost every keyboard submit its place. The restore is deliberately conservative — only when focus is still on `<body>` and the trigger is still in the document — so a response that opened a popin, redirected, or focused the first invalid field keeps its own focus decision; gina restores what gina took, never more. The `<a>` branch is excluded from the capture: an anchor gets `aria-disabled` from the in-flight lock (since #B312 the framework's only `aria-disabled` write), which does not blur (measured control). (2) The trigger carries `aria-busy` for the request's duration — on the TRIGGER, never the form, because the live region is a CHILD of the form and an ancestor marked busy MAY be treated as "defer announcements in this subtree", which would silence the very channel used to announce; ARIA 1.2 defines no normative behaviour here, so that is a cheap hedge, and the same reading is why `aria-busy` can never substitute for an announcement (it produces none of its own). ⚠️ **Do NOT restate this as "assistive tech commonly defers"** — that wording shipped once and was WRONG: measured 2026-08-05 on VoiceOver/Chrome, an announcement made from inside an `aria-busy="true"` ancestor was spoken normally, so at least that pairing does not defer. The placement costs nothing and still guards ATs that might, but it is a precaution, never a claim about implementations. (3) The start is announced ONCE through the #A11Y2 region; completion announces NOTHING by design, because an errored response is already announced field-by-field by `handleErrorsDisplay` and a second status write over the same polite region in the same beat can truncate it. Announced strings are the framework's own, so they resolve through `gina.config.a11y` with English defaults (e.g. `{ submitting: 'Envoi…' }`) — deliberately separate from `setErrorLabels`, which is keyed by RULE name and owns rule messages. Rule: put a state signal where the state actually begins; a signal armed on intent rather than on the operation announces work that may never happen. **Error-association integrity (#A11Y5):** three fixes sharing one theme — an ARIA assertion is only worth what its target is worth. (a) Hiding the message div used gina's `.hidden` helper (`display: none !important`), which removes it from the accessibility tree entirely — fine for a soft warning, wrong at the TWO hide paths that coexist with an asserted `aria-invalid` (`refreshWarning`'s focus-driven hide, and the refresh re-create), where the field was announced invalid while `aria-errormessage` pointed at an unreachable target. Both now CLIP instead: inline declarations that hide visually but keep the node in the tree, with `display` carrying `!important` because that is what outranks the class's own `!important` (measured — a plain inline `display:block` loses to it); the class is deliberately left in place so consumer CSS keyed on `.hidden` keeps matching. (b) A polite region is announced on CHANGE, so re-writing byte-identical text is commonly not spoken — which is precisely the repeat-error case (blur a field that still fails the same rule). A trailing no-break space now makes the content differ without altering what is read out, and it self-cancels on the next write. NOTE this half is source-derived: the string demonstrably changes, but no assistive-technology pass has confirmed the re-announcement. ⚠️ The same caveat NO LONGER applies to #A11Y2's first-announcement fix — **V1 was CONFIRMED 2026-08-05 on VoiceOver/Chrome** by an A/B whose two arms differ only by a `setTimeout(0)`: the same-tick create-and-write was NOT spoken, the deferred write WAS. So the deferral is load-bearing in practice, not merely defensible in theory; the region-lifecycle discipline above is measured, not inferred. (c) `focusFirstInvalidField` (and its deliberately-duplicated inline twin) gated focusability on `typeof $field.focus == 'function'`, which is TRUE for every HTMLElement — a custom element with neither `tabindex` nor `delegatesFocus` passes it and its `focus()` is a silent no-op (measured), so a failed submit whose first invalid control was such a host focused nothing AND stopped searching. Both loops now confirm `document.activeElement` actually moved before stopping, which is also what makes the JSDoc's "skips unfocusable controls" claim true rather than aspirational. Rule: a capability probe (`typeof x.focus == 'function'`, `'foo' in el`) tests the API's PRESENCE, never its EFFECT — when the effect is what matters, assert the resulting state. Error-MESSAGE visibility has THREE write paths (create / refreshWarning's un-hide / the refresh re-create) and the re-create runs LAST in the live-check pass, so it owns the steady state: it is focus-aware — message hidden while the edited field is the active element, revealed on blur (soft warning border while typing). Rule: when an element is written by multiple paths in a single validation pass, guard the LAST writer — an earlier-writer fix is silently overridden. #B319 (0.6.5-alpha.2): the focus-driven hide is EXEMPT during the framework's own ANSWER focus — both refused-submit paths (the #B246/#B308 display-only reveal via `focusFirstInvalidField`, and the `validate.<id>` failure branch's inline focus twin) render errors then focus the first invalid field, and that focus's synchronous `focusin` re-entered the live-check listener and hid the just-rendered message: a refused submit explained itself only to a screen reader (the #A11Y5 clip kept the node resolvable) while sighted users saw nothing — despite the render itself being VISIBLE (no fieldName ⇒ the live-check branch is skipped, and activeElement is still the trigger/BODY at render time), which is also why an async `query` rule in a repro is incidental (the suppressing dispatch is synchronous inside `focus()`). Fix: a one-shot module flag raised around BOTH focus loops (try/finally, cleared on every exit) gates the focusin arm's `refreshWarning` call; the message stays visible with the hard `form-item-error` styling, aria state untouched, and the first later keystroke re-engages the mid-typing suppression unchanged (in that answered-then-typed configuration the border stays `form-item-error` — the answer focus re-registered the field so `lastFocused` reads it twice and the isWarning heuristic keeps the hard border while the active-element ternary hides the message; the hidden message is the contract, the border there is heuristic). Behavioral lock: `test/e2e/validator-submit-answer-visibility.spec.js` (4 arms, red-first against the pre-fix bundle); browserless pins: `test/core/validator-answer-focus.test.js`. #B387 (shipped in 0.6.11): the one-shot flag covers only that synchronous window — on an async-`query` form with a committed error, a refused submit whose click lands inside the UNDRAINED completion tail of the previous settle had its answer delivered, focused, then re-hidden ~0.2ms later: a stale live-check waiter (woken inside the click's cascade by the reveal pass's deferred release) or the trailing silent global re-validation ran the display-refresh pair AFTER the flag's `finally` had cleared it, and BOTH hide sites key on the same heuristic — "the field is the active element, so the user is editing it" — which cannot tell answer-placed focus from user-placed focus (`refreshWarning`'s error→warning downgrade appends ` hidden`; `handleErrorsDisplay`'s refresh branch re-creates the message born-hidden via its active-element ternary; the occurrence gate is click-inside-the-tail, which is why full-suite/CI runs flaked ~1/20 while standalone runs stayed green). Fix: focus PROVENANCE — a single module slot `answerFocusHold` ({formId, elName}; one slot is exact, only one active element exists) recorded at both confirmed answer-focus points (inside the #B319 windows), consulted by BOTH hide sites for ANY caller however late (provenance beats a pass-staleness latch: the trailing re-validation is a FRESH pass spawned inside the click cascade and would sail through any staleness check), and released on the first genuine user interaction — any TRUSTED native event reaching one of the seven form proxy handlers while the one-shot flag is down (framework `triggerEvent` dispatches are untrusted and cannot release it; the answer's own trusted synchronous focusin is excluded by the flag) — so the deliberate mid-typing suppression re-engages the moment the user actually edits; no timers. Locked by `test/core/validator-answer-focus-hold.test.js` (17 — source pins on every edit site, comment-stripped extracted-real-bytes behavioral arms for both hide sites + the release helper, red-first against the pre-fix bytes; gina.js dist pins) and the §02 e2e arm (25/25 post-fix vs the ~1/20 pre-fix CI red whose signature was `Received: 1` + msgClass `hidden` — a recurrence of that signature is a NEW defect, not #B387). #B348 (shipped in 0.6.11): `revealValidationState`'s completion STARVED on any form whose async `query` field was not declared last — the reveal pass is un-latched, writes neither `isSubmitting` nor `isValidating`, and on a valid form its verdict is clean, so its waiter completion matched NO dispatch branch (terminal errors>0 / the latched dispatch / last-field / the display-only live-check arm): `onDisabledTriggerReveal` never ran, the stale `data-gina-form-submit-gated` marker never re-synced, and a fully valid form ate every later click until reload (measured live: 2 post-settle clicks, 0 POSTs — field declaration order decided whether the documented self-heal worked). Fix: the reveal's callback carries a completion identity (`onDisabledTriggerReveal.isRevealCompletion = true`, the engine's own `cb._data`/`cb._errors` property idiom) and the waiter chain gains ONE else-if chained after the display-only arm, gated on the SAME terminal condition the errors>0 block uses (`hasParsedAllRules && asyncCount <= 0` — the guard that stops a multi-query-field early wake, where the first waiter fires at asyncCount 1): a terminal reveal completion that matched no other branch dispatches `validated.<formId>` with its own cb. Every previously-working shape is byte-identical (errored reveals keep completing via the terminal branch, query-last via last-field, latched submits via the latched dispatch, live-check stays display-only), and the un-latched programmatic-submit starve (#B347) is deliberately untouched — its cb carries no marker and its fix is gated on its own repro. Known residual, pre-existing on EVERY branch: a query field whose own rule object continues past `query` never sets the terminal flag and still starves — same guard as the existing dispatch, no new asymmetry. Locked by `test/e2e/validator-reveal-starve.spec.js` (red-first: the starve arm failed on the pre-fix bundle while the query-LAST control arm passed on the same bytes, pinning the defect to field order; the scene manufactures [valid values + stale gate + stale committed error] deterministically via a prototype-setter silent fill after an errored reveal, with every precondition an explicit expect so an impossible scene voids loudly) and `test/core/validator-reveal-completion.test.js` (9 — stamp/consult/placement pins, extracted-real-bytes reveal arm asserting the stamp as a runtime value, gina.js verbatim pins AND a gina.min.js exact-count pin — unlike a local flag, the property name survives Closure). The not-ready submit trigger is marked `data-gina-form-submit-gated="true"` + the class `gina-form-submit-disabled` (#B312 retired `aria-disabled` from this marker — its contract says not-operable while the #B246 gate deliberately answers the click with the error reveal; authored `aria-disabled` remains enforced by the gates and is never auto-cleared), NEVER native `disabled` (#B76 — a natively-disabled button emits no click, so the validate-render-focus guard could never run); `isValid()` is the real send gate, and **the framework now ships a default not-ready look (cursor `not-allowed` + dim; deliberately no `pointer-events`, which would swallow the click the reveal answers) that consumer CSS overrides**. Form-associated custom elements (FACEs) participate in binding + live-check (#CC2 — hyphenated members of `form.elements`; their own `.value` accessor is honoured, live-check rides the composed bubbling `change`; author contract: `static formAssociated`, a `name` attribute, a `.value` getter, composed `change` on commit). **Radio-group collection (#B221):** an unchecked non-boolean radio group whose rule declares a truthy `isRequired` is collected as an EMPTY value by BOTH collectors (`getFormValidationInfos` + the native-submit inline copy) so `isRequired` adjudicates it via the standard emptiness test — pre-fix no collection arm admitted the shape (each required `.checked`, a `true|false`-shaped value, or an `isBoolean` rule), the DOM handle was held in `$fields` but the VALUE never entered `fields`, so no rule ran against the group and a radio-group-only form short-circuited BOTH submit guards (field count 0 reads as nothing-to-validate → synthetic `isValid() === true`) and submitted its XHR with zero client-side validation. **Since #B926 (0.7.5) the same arm, in BOTH collectors, takes an unticked value-carrying CHECKBOX whose own rule says `isRequired`:** `isRequired` on such a box means « must be ticked » — several boxes under one name: at least one ticked; distinct names: each — where before no arm admitted it, so the form posted without the box and no rule judged it on either side (the engine never fires `isRequired` on an absent key); a boolean box (no `value`, a `true`/`false` value, or an `isBoolean` rule) keeps posting its live state and a required `false` passes, a disabled box is skipped before any arm, and a box with no rule or `isRequired: false` stays absent. Other unchecked groups stay absent-when-unchecked (native parity: no rule / `isRequired: false` unchanged; `isBoolean`-declared groups keep the force-false arm), checked members post exactly as before, and on the auto path a required-empty form is invalid and never sends — so the wire only changes for the newly-gated shape. Enforcement-tightening: forms that silently submitted with nothing picked now gate on the pick (trigger marked not-ready at bind under default-on live-check — `data-gina-form-submit-gated` + class since #B312 — message on submit attempt, re-enabled after picking). **The re-enable is real only since #B228:** the radio live-check listener was registered under a `changed.<id>` event name nothing dispatches on a user pick — the form-level click proxy short-circuits into the radio state updater (which never dispatches any gina event), and the change proxy dispatches ONLY names present in the event registry, which radios never registered (checkboxes have that registration via their state-updater relay; radios' equivalent relay is keyed on the bare element id, which nothing triggers) — so the whole-form silent pass never re-ran after a pick and the trigger kept its bind-time disabled state indefinitely, while submit-time validation (a separate call chain) accepted the checked group and let the click-guard send: flows completed, only the trigger state was wrong (announced disabled to assistive tech; automation actionability checks refuse `aria-disabled`). Radios now ALSO register the proxy-dispatched `change.<id>` name alongside `changed.<id>` — the handler's radio arm accepted `change.`-typed events all along, so one registration line closes the loop: mouse, label and keyboard picks all re-run the field + whole-form passes (single delivery per pick — native `change` fires only on real state changes; the legacy `changed.<id>` name stays registered for the relay/programmatic path; checkboxes byte-identical). Latent since the live-check's introduction, invisible until #B221 armed it. **A field that DRIVES its own conditional block lost its BASE rules until #B229:** `forEachField`'s per-field tail read `if (isInCase || caseName == field) continue;`, and `caseName` is assigned inside the `_case_` scan loop that re-runs in full on EVERY field iteration, so it always held the LAST scanned `_case_` key's driver name — when the iterated field WAS that driver the `continue` skipped the rest of the iteration, base-rule check included. A rule shape `{ "group": { "isRequired": true }, "_case_group": { "conditions": [...] } }` therefore never adjudicated `group`'s own `isRequired` on the bind pass, the live-check global pass OR the submit pass: the form never gated and an empty submit went out with zero client-side validation — the silent-submit class above, resurfacing for the self-driving shape and structurally DOWNSTREAM of the collection fix (the group IS collected as `''`; only adjudication was missing). The tail is now split: `isInCase` keeps its own `continue` (it is dead code — never assigned truthy — and is preserved as such), and the `caseName == field` arm runs the base-rule check before continuing, restoring the driver's collected value around the call (the check deletes the field from the object it is handed, and that object is where the scan block re-reads the case VALUE on every later field iteration; a deleted entry re-seeds from the DOM, which for a radio group is the FIRST member's value regardless of `.checked`). Which conditions apply is unchanged — the direct-case block is never entered for a self-driving case, pre- or post-fix (measured) — and the fix is order-independent: a driver declared BEFORE another `_case_` block was already adjudicated (the tail's comparison never matched it), so the post-fix union is every driver carrying base rules. Client-only: the server form-body path throws earlier on any `_case_`-bearing rule set (conditional rules are unsupported there). Enforcement-tightening: a form built on this shape starts gating where it silently submitted. **Every pass works on its own copy of the rules since #B885 (0.7.5):** on a rule set with NO `$` tokens, `validate()` handed `forEachField` the caller's object, and what a pass wrote into it — a matching `_case_` condition's rules over a field's own (the site-B replacement), `{ exclude: true }` over an unchecked checkbox whose rule says `isRequired: false` — outlived the pass: a case rule stayed applied after its driver changed back, so a valid form stayed gated and refused the click; through the rule-set object that forms bound to the same rule set shared, one form's case gated another; a later `reBind()` re-armed the gate from the mutated rules; and a checkbox ticked after such a pass stayed out of the posted data (#B913). The non-`$` branch now takes `JSON.clone(rules)`, as the `$` branch always parsed its own copy (`JSON.clone` keeps a non-plain value such as a RegExp condition by reference). **Each form holds its own copy of its rule set since #B931 (0.7.5):** `bindForm` kept the object it was handed — the one `getRuleObjByName` caches and returns to every caller, or the `instance.rules[name]` object the boot scan chains from one form to the next through `merge` — and the submit and click passes resolved the rules by NAME again, so the state a binding derives from its own markup and writes into its rules (`exclude` on a `data-gina-form-element-group` member, the collector's `isBoolean` on a boolean checkbox, a RegExp key's alias) reached every form bound to the same rule set, whatever the forms' ids: a form posted without its ticked value-carrying checkbox because another form's hidden field of that name had been excluded first (a popin whose content was swapped, two forms on one page in either order), or posted `true` in place of a value because the other form's same-name checkbox was boolean. `bindForm` now assigns `JSON.clone(rule)` (and re-points the singular `.rule` at it where `validateFormById` set it), and both passes validate with the record's rules, by name only when no record answers to the current id; the registry objects receive no per-form write after init. The same writes had hidden a gap, closed by #B914: a radio or checkbox group whose `isRequired` comes only from a matching `_case_` condition is never collected (the collector reads the field's own rule), so a check refused it only once an earlier pass had written the case rule into the stored rules — the first submit went out without it with live checking off or a radio driver, and every submit did on a `$`-bearing rule set. The matched condition now enters such a group as `''` with `d.addField` before the check, once per pass (guarded on `d[_r]` as well as `fields[_r]`, since the check deletes `fields[_r]` and a later field's scan would enter it again); a file input is left out. **A later condition of a `_case_` block is matched against the driver since #B920 (0.7.5):** the first scan's literal-key branch (`caseField = _r;`) also stored that field's value in `caseValue` (a boolean when its own rule says `isBoolean`), and the only reader was the NEXT condition's filter, so a later condition whose `case` equalled the named field's value applied although the driver did not match it; the write is gone, so `caseValue` holds the driver's value for every condition of the block. **A `case` written `/pattern/flags` is a regular expression since #B918 (0.7.5):** the first scan's filter compared it as a string (`case != caseValue`), so it never matched there: a regex condition applied nothing when its block was the only or last `_case_` key, and a block followed by another one reached the second scan, which applied its rules to COLLECTED fields but never refused an uncollected group it requires. `getCaseRegExp` (declared inside forEachField, so the tests that compile the forEachField slice need no new free identifier) parses `/pattern/flags` WITHOUT the bracket escaping of the regex-KEY branches (a case matches values, so `[ab]` stays a class), and a pattern the engine rejects warns and is compared as a value. **A RegExp KEY inside a condition's `rules` applies wherever its block sits since #B921 (0.7.5):** the condition scan skips a key naming no control, so a RegExp key (`"/^item[/"`) was skipped there and only the direct-case recursion of a NON-last driver expanded it — a single-block or last-block key had no effect under any case shape, and even a live one only reached COLLECTED fields (an unticked value-carrying checkbox it required was never refused). `expandCaseRegExpKeys` (declared inside forEachField, before `getCaseRegExp`, so neither the slice-compiling tests nor the #B918 helper slice change) runs once per level on the pass's own copy and gives each control the key matches a literal key of its own holding a COPY of the key's rules (plain data copied, so a pull-in `merge` into one name never reaches another), read as a top-level RegExp key is (`[`/`]` literal, flags kept), a literal key of the condition winning, then the first matching RegExp key, the block's driver left out, an invalid pattern warned and skipped, nothing on the server path (`$fields` null; the server throws earlier on any `_case_` key anyway); the condition scan then applies it exactly as a literal key (site B replacement, #B914's `''` entry, the 2/3 check). ⚠️ The direct-case loop SKIPS the names the expansion added — its own RegExp branch covers them as before; without that skip the recursion would check an uncollected field with the condition's rule alone, its base rule lost (measured, pinned by a subtract). A `$` inside a key is never a working token (getDynamisedRules splices a QUOTED value into the pattern; with no matching field it stays an end anchor): such a key matches nothing, before and after. **A select's whole-form pass collects with the form's own rules since #B915 (0.7.5):** `updateSelect` handed `getFormValidationInfos` bindForm's `rules`, the rule REGISTRY keyed by rule-set name, so no field had a rule there, an unpicked required radio group was not collected, and the pass read valid: the submit trigger lost its gated mark after a select change (a click was still refused by the submit pass). It now collects with `instance.$forms[formId].rules`, the rule set it validates with, as `addLiveForInput`'s pass does (its own `var rules = $form.rules`). **A conditional driver's collected VALUE survives every full-form pass since #B230:** the base-rule check deletes each adjudicated field from the object it is handed, and until #B230 only the last-declared driver's entry was restored (the #B229 arm above) — any OTHER field that both carries base rules and drives a `_case_` lost its stored case value the moment its own rules were adjudicated, so later field iterations re-read it from the DOM (a radio group's FIRST member regardless of `.checked`) and matched conditions against a value the user never picked — spuriously requiring the wrong flow's fields (a correctly-completed picked flow could not submit), or with excluding condition rules under-validating the picked flow — while the driver's own direct-case block read `undefined` in the same pass and matched nothing. The entry is now backed up and restored around the base-rule check for any field driving a `_case_` in the live rules OR the pass-entry rule clone; the union matters because inside a direct-case recursion the pass's rule set is the condition's own rules, which carry no `_case_` keys, so the live-rules test alone is blind there. Non-driver fields keep the deletion untouched (the condition pull-in gate, the direct-case exclude injection and the async-`query` re-validation input all read those absences today), and a driver with no rules of its own is byte-identical — including the legitimate first-scan DOM seed for rule-less unchecked groups, which is preserved. **`setFlash` `[null, "message"]` works client-side since #B226 (the form the reference documents):** it previously lost its custom message in the browser ONLY — `lib/merge` classified a `null` array element as an object (`typeof null`) and dropped it on every no-override merge, and the client rules path re-merges the whispered rules (the `data-gina-form-rule` bind merge, the `gina.hasValidator` instance re-merge, the `_case_` merges), so the engine received a one-element array, bound the message to the ignored first `regex` argument, and rendered the built-in label; `["", "message"]` always survived (empty strings, `false` and `0` are primitives — `null` was the only casualty), and the server was unaffected (it reads the boot-loaded rules without those hops). The fix is in `lib/merge` itself, so no-override merges now preserve `null` array elements as VALUES framework-wide (and the index-merge branch stops manufacturing `{}` from a `null` source element) — a merge consumer relying on the silent compaction sees the `null` slots preserved. **Bracket-notation and nested-authored rule KEYS enforce on the SERVER form-body path since #B241:** the rule parser canonicalizes every rule key to a dotted path (`account[username]` becomes `account.username`; a nested rule tree flattens to its dotted leaves) while the server's fields map kept the RAW posted keys, so such rules never joined — the field was silently skipped with no warning, fail-open for every rule-keyed directive alike: checks (`isRequired`, `isEmail`, ...), the `exclude` drop, and value transforms — on BOTH production wire shapes (flat bracket keys: the client posts its name-keyed data as JSON and the JSON body path deliberately does no bracket expansion; and nested objects: the multipart and urlencoded parsers expand bracket names). The server now synthesizes dotted-canon field aliases ALONGSIDE the raw keys (originals kept, so `$name` cross-field tokens keep resolving off the raw posted names, and an all-flat payload synthesizes nothing — byte-identical behaviour), then folds alias outcomes back at egress: error keys return under the DOM-name bracket form the client renders against, and the validated data output keeps its materialized shape with exclusions and transforms applied (a parent object emptied by an exclusion is pruned along that alias's path only — a posted empty object survives). The client join was always bracket-on-both-sides (a named rule set passes through with its authored keys; nested-authored sets are reconstructed to bracket names at bind time), so this brings the server to parity — quirks included: a caller that posts the dotted key form keeps its own addressing, and the no-rules path still returns the payload verbatim. Behaviour change by design: a bracket-keyed or nested-authored rule that never fired before now enforces — anything relying on the old silent skip starts rejecting or dropping those fields. **Upload previews carry a text alternative (#A11Y7/U1, 0.6.4).** The staged-upload client layer builds its preview `<img>` in two MUTUALLY EXCLUSIVE branches of `onUpload` — one for a file with no server-side `preview` object, one for a returned preview variant — and neither set `alt` at all (not even `alt=""`), so assistive tech fell back to reading the temp URI aloud, once per staged file (WCAG 1.1.1). Both now set `alt` from `files[f].originalFilename`: the name the USER chose, deliberately NOT the sibling `files[f][key].originalFilename` of the preview variant, which is a server-generated artefact that means nothing to the person listening — the same distinction the adjacent `data-upload-original-filename` / `data-upload-preview-original-filename` pair already encodes. The fallback is `''` (a properly ignored image) rather than letting a missing name be spoken as a placeholder. The preview is INFORMATIVE, not decorative: it is the only signal telling a user which file is staged, and everything else in the upload layer is still silent — progress is attribute+`textContent` with no `role="progressbar"`/`aria-value*`, upload errors are an `innerHTML` write with no `role="alert"` that never calls the polite region the plugin already owns, and the reset control is an `<a href="#">` (U2/U3/U5, tracked in the accessibility audit, not fixed here). Maintainer gotcha: the two branches are per-file exclusive, so a one-site fix silently misses every upload whose server returns a preview object — fix both or neither. **A not-ready submit trigger really refuses the send — and its marker is aria-free (#B246 + #B312, 0.6.5).** `updateSubmitTriggerState()` marks an invalid form's trigger with `data-gina-form-submit-gated="true"` + the `gina-form-submit-disabled` class and deliberately never native-`disabled` (a natively-disabled button emits no click at all, so nothing could tell the user WHY it is dead) — and, since #B312, never `aria-disabled`: the gate ANSWERS the click with the error reveal, which that contract forbids for a control announced disabled, so the attribute belongs to consumers (authored marks the gates enforce and never auto-clear) and to the anchor in-flight lock. #B246's origin: NOTHING READ the marker — a click ran the entire submit cycle (collect → validate → `validate.<id>`) and only the `isValid()` gate stopped the send: the trigger was inert in appearance ONLY. `clickProxyHandler` now intercepts a disabled-or-gated trigger BEFORE the `submit.<id>` dispatch — so `bindSubmitEl`'s handler never runs, `isSubmitting` is never latched, and no send path is reachable by construction — and answers the click with a display-only `revealValidationState()` pass that renders every invalid field, focuses the first, and re-syncs the trigger state so a STALE not-ready marker on a form that has since become valid heals itself — the heal touches only the marker + class; authored `aria-disabled` and the in-flight lock survive it (#B313 closed by construction). The predicate `isTriggerDisabled()` reads the CLICKED element rather than `$formInstance.submitTrigger` (a form may carry several submit buttons while only one registers) and mirrors the popin plugin's existing trigger gate on the shared channels (authored `aria-disabled` + native `disabled`), so both subsystems agree there; since #B312 it ALSO fires on the validator-owned not-ready marker `data-gina-form-submit-gated="true"`. **#B293 (0.6.5) NARROWED that predicate: the native `disabled` ATTRIBUTE now counts only where `disabled` is not a real IDL property (`!('disabled' in $el)`).** As first shipped it accepted native `disabled` on ANY element, which silently killed the near-universal double-submit guard: a click listener on the submit button that sets `disabled` to block a second submit is bound to the button and therefore runs BEFORE gina's delegated form-level proxy reaches the gate, so the gate saw the attribute, cancelled the click, and `send()` never ran — then the consumer's own handler cleared the attribute again, leaving NOTHING marked, a normal-looking button, and every subsequent click equally dead. Measured: a natively-disabled `<button>` delivers **no click to JS at all** (the browser suppresses it), so on a real form control that arm could only ever fire on an attribute set DURING the dispatch — it protected nothing and cost everything; on an `<a>` or a custom element the browser enforces nothing, so there the attribute is still the only honest signal and is still read (`'disabled' in $el` measured: button/input `true`, anchor/custom-element/span `false`). Regression cover is an **e2e** (`test/e2e/validator-submit-native-disabled.spec.js`, 4 arms), deliberately NOT a replica: the defect is an ordering interaction between a consumer's own listener and gina's delegated proxy, which only the real bundle handling a real click can exhibit — `test/core/validator-submit-trigger-state.test.js` covers the same gate with replicas and stayed GREEN throughout, including two tests named as controls for the working case. Gotcha for maintainers: `focusFirstInvalidField()` deliberately DUPLICATES the inline focus loop inside the `validate.<id>` guard — that inline shape (`_a11yErrs` / `_aField`) is locked by source pins, so collapsing the two would break tests unrelated to this fix; keep them in step by hand if the focus rule ever changes. **Staged uploads speak (#A11Y7/U2+U3+U5, 0.6.4).** Three defects in one client layer, fixed together because they share one plumbing change. (a) `updateUploadProgressIndicator` wrote `textContent` plus two `data-gina-upload-progress*` attributes and NO ARIA, so any indicator that is not a native `<progress>` was unlabelled text; it now carries `role="progressbar"` + `aria-valuemin="0"` / `aria-valuemax="100"` / `aria-valuenow`, with `aria-valuenow` tracking the percent attribute EXACTLY — absent while `preparing`/`indeterminate` and on `error`, because an absent value is how a progressbar signals "unknown" while a stale or zeroed one reads as real, stalled progress. `reset` strips the ARIA too (it strips everything this layer ever set); `processing` advances the state only, preserving the last value so a determinate bar stays full through the server-side window. A native `<progress>` is deliberately untouched — it already exposes all of this, and an explicit role risks overriding the implicit one. (b) The TRANSITIONS are announced through the polite region `bindForm` already stands up: `uploadStarted` at the selection kickoff — deliberately NOT gated on the indicator being present, since opt-in-by-presence is right for a visual and wrong for an announcement — and `uploadComplete` in the success branch only. Per-tick progress is NEVER announced: `aria-live="polite"` coalesces but does not throttle, so one announcement per `onprogress` event would bury every other message on the page. There is deliberately NO generic `uploadError` key, because the error path announces the server's own message and a generic second write in the same beat would clobber it (the region is latest-wins — the same reasoning that keeps `releaseSubmitA11y` silent). (c) The upload error container is written via `innerHTML` while `display:none` and revealed only by a fade-in — exactly where a `role="alert"` on it is unreliable — so the error routes through that same region, announcing `$error.textContent` (the RENDERED text: a message can carry markup, and the url-action checker substitutes `<br>`). Note the container being consumer-owned is NOT the discriminator: the progress indicator is equally consumer-supplied and gina already writes attributes into both; the hidden-then-revealed shape is what rules out `alert`. (d) The generated reset control was `<a href="#">Reset</a>` — announced as a link, not activatable with Space, and identical across every staged file. It now carries `role="button"` plus an `aria-label` of `<visible label> <filename>`, the visible label kept as a PREFIX so the accessible name still contains it (WCAG 2.5.3 Label in Name) and reusing the consumer's own `data-gina-form-upload-reset-label` so it is translated wherever that already is. The role is stamped ONLY on an anchor (strict `/^a$/i`, unlike the loose `/a/i` guarding `href` a few lines above, which also matches TEXTAREA/CANVAS/LABEL), so a consumer supplying their own `<button>` keeps its implicit role. A `role="button"` that cannot be operated by Space would be worse than no role at all, so the binder adds a `keydown` handler mapping Space to the removal — anchors only, since a native button already fires click on Space and would otherwise run the removal twice. (e) That control is REMOVED from the DOM while holding focus (`$resetLink.remove()`, which its own comment requires be last so the click listener dies with the node). The finding described this as a `display:none`; both happen, and the removal is the decisive one — a fix aimed only at the hide would not have worked. Focus now moves to the file input BEFORE the removal, guarded on the control actually holding focus (a programmatic reset must not steal focus from elsewhere) and CONFIRMED afterwards rather than assumed, since `typeof focus == 'function'` is true for every HTMLElement and `focus()` is a silent no-op on one that cannot take it. The removal is then announced (`fileRemoved`, default `'%s removed'`) using a FUNCTION replacer — never a string — because a file name may contain `$` and a string replacement would expand `$&`/`$1` patterns inside it. All three new strings live in `A11Y_LABELS`, so `gina.config.a11y` overrides them. **Maintainer gotcha worth the line:** `test/core/validator-upload-reset-delete.test.js`'s `fnSlice` takes a FIXED 12000-char window from its declaration anchor, and this fix grew `onUploadResetOrDelete` by ~2.6k chars — pushing the `#R8` strip and the callback dispatch outside it and reddening four pins whose code was present and correctly ordered the whole time. Widened to 16000 (the function ends ~14.2k past its anchor), but it is still a fixed window and will bite again; the durable fix is to brace-walk to the real function end, as the sibling `validator-upload-progress.test.js` already does. **Not verified against assistive technology** — source-derived plus a served-bytes check, like the rest of this arc. **#B1039 (0.7.8) — the re-validation a clean `query` verdict starts does not ask that query again.** The `query` arm leaves its field in that nested pass's input, and #B230 keeps a `_case_` driver there whatever its rules, so a field whose only rule is `query`, or a `query` field driving a `_case_` block, asked again and its clean verdict started the same pass. On a value the verdict cache answers by microtask and the tab froze (0.6.7 to 0.7.7; at page load for a field last or alone in its rule set); on an empty value, never cached, requests streamed (0.6.5 to 0.7.7). The nested pass now carries `cb.judgedQueries`, a copy per level that only grows along a chain, and the arm skips a field in it. Do not take the field out of the input instead: a driver's entry IS its case value, it would re-seed from `$allFields[name].value`, a radio group's first radio whichever is checked, and the submit control opens on an invalid form (measured, three shapes). Locked by `test/e2e/validator-query-only-b1039.spec.js` + `test/core/validator-query-judged-b1039.test.js`. **#B295 (2026-08-06) — an async `query` rule left the form's validity state STALE once it settled.** `onasyncCompleted` derives its verdict from `d.getErrors(field)`, which `form-validator.js` scopes to a SINGLE field, so its `isFormValid` means "this field passed", never "the form is valid" — and the entire update block sits behind `if (!isFormValid && …)`. A form that had just become valid therefore received NO update: `updateSubmitTriggerState` was never called, so the bind-time not-ready mark (then `aria-disabled="true"`; the `data-gina-form-submit-gated` marker since #B312) survived on a valid form and `$forms[id].errors` kept listing the field. Cosmetic until #B246 made the click gate read that marker — then the first click after the query settled was silently eaten, and only the second went through (`revealValidationState`'s re-sync self-heals it). Fixed by handing the verdict to the fresh whole-form pass the same function ALREADY runs for the not-last-field case (`needsGlobalReValidation`), whose unconditional `updateSubmitTriggerState($currentForm, gResult.isValid())` settles the marker while its `handleErrorsDisplay` empty-errors branch clears the stale record; measured to add NO extra round-trip, because the query rule's already-registered-listener guard short-circuits the re-run. **The measurement that CHOSE the fix, and the reason the two cheaper shapes are wrong:** with a second required field left invalid, that fresh pass reports its error while BOTH the field-scoped `cb._errors` AND the in-pass `d.getErrors()` report none — so un-gating the existing call, or letting `handleErrorsDisplay`'s empty-errors branch auto-enable via its own `updateSubmitTriggerState(..., true)`, would each have ENABLED submit on an invalid form and re-opened #B246's hole. Both were rejected on that arm, not on reading. Covered by `test/e2e/validator-async-query-revalidation.spec.js` (4 arms, red-first: 01+02 RED on the pre-fix dist, 03 "another field invalid ⇒ still blocked" and 04 "no query rule ⇒ sends" GREEN throughout); arm 01 deliberately waits on the QUERY settling rather than polling the trigger's not-ready marker, because polling the guard is exactly what let the pre-existing FACE e2e stay green through #B293. Browser-bundled ⇒ consumer pickup is restart AND re-bake. **#B294 (2026-08-06) — a submit trigger whose DOM NODE is REPLACED after binding (the AJAX / popin re-render shape) was PERMANENTLY and SILENTLY dead.** Submit binding is **two-stage and only the first stage is delegated**: the native click proxy is registered on the FORM (`:8090`, "Form-level proxies: capture bubbled events from in-tree controls") and survives any re-render, but the listener that does the work is attached to the trigger NODE by `bindSubmitEl` (`:8231`). `gina.events` is a **name → id-STRING** registry (`utils/events.js:42`), so the `submit.<id>` key outlives the node: after a `cloneNode(true)`+`replaceChild` the `:8037` dispatch gate still passes, `cancelEvent` suppresses the native submit, and `triggerEvent` fires at a node with no listener — so the form does not even fall back to a normal submit. Nothing self-heals (`bindForm` latches `binded` at `:8580` behind `:585`, cleared only by `unbindForm`; there is no `MutationObserver` and no `isConnected` check in the bind/dispatch path). **Pre-existing, NOT a 0.6.4 regression** — measured identically on published 0.6.3. Fixed by marking the bound node with a **JS expando** (`__ginaSubmitBoundFor`) and re-binding the live node at the dispatch gate when the marker is absent — measured: `cloneNode(true)` copies `data-*` attributes but NOT expandos, which is exactly why the inherited `dataset.ginaFormSubmitTriggerFor` is useless as a fresh-node test and was a red herring in the original filing. **The rejected alternative is worth recording:** delegating the custom `submit.<id>` event to the form also fixes it (measured), but was measured to RETAIN the `gina.events` key past `unbind` (`registryKeyDeleted:false` vs stock `true`), which would force an edit inside `unbindForm`'s removal loop — six guard variants all keyed on `gina.events[name] == element.id`. Covered by `test/e2e/validator-submit-trigger-rebind.spec.js` (4 arms, red-first: 01 single replacement and 03 double replacement RED pre-fix; 02 untouched-sends and 04 replaced-but-invalid-still-refuses GREEN throughout, so re-binding provably does not bypass validation). **Diagnostic reflex for any "it stopped working after we re-rendered" report: the question is not whether the click listener survived — it did, it is on the form — but whether the node carrying the stage-2 listener is still the node in the document.** Browser-bundled ⇒ restart AND re-bake. **The submit proxy's gesture gate reads the LIVE trigger (#B308, 0.6.5).** The per-form `submit` proxy enforced its disabled gate on a DOMParser copy of the form's innerHTML, testing only native `.disabled` on the copy — blind to the gate's own marker (then `aria-disabled`, `data-gina-form-submit-gated` since #B312, written by `updateSubmitTriggerState`) while SIGHTED on a native `disabled` written mid-dispatch by a double-submit guard (the exact attribute #B293 ruled must not count on a real control — so wrapped-label + double-submit guard was a dead submit, the #B293 signature alive on the submit path). A gated trigger's trusted gesture therefore ran the full collect → validate cycle and SENT whenever the values validated. Now an `e.isTrusted` submit on a form whose REGISTERED trigger is `isTriggerDisabled()` is cancelled and answered with the same display-only `revealValidationState()` as the #B246 click path (errors rendered, first invalid field focused, stale marker re-synced); programmatic `$forms[id].submit()` arrives untrusted (triggerEvent CustomEvent) and deliberately keeps the fresh-validate path — a programmatic submit is not operating the control, the fresh pass is the honest gate there, and cancelling on a cached marker would break fill-then-submit flows. Two gesture shapes reach this gate (probe-measured, Chromium): a wrapped-label click (`<button type="submit"><span>` — the span has no `.type`, so the click proxy never fires and the gesture surfaces as a native submit event), and Enter in a form with NO native submit button (e.g. an `<a data-gina-form-submit="true">` trigger — implicit submission fires a DIRECT trusted submit; with a native button present, Enter instead synthesizes a click on the default button that the #B246 CLICK guard already refuses while the marker stands, so that shape never needed this gate). Covered by `test/e2e/validator-submit-proxy-disabled-gate.spec.js` (5 arms, red-first BOTH directions via the committed `B308_PREFIX_BUNDLE` route-swap hook: label-click and A-tag-Enter RED pre-fix on an EVENT discriminator — the pre-fix cycle fires `validate.<id>` from the no-`on('submit')` branch, while the post-fix reveal is display-only and fires nothing; POSTs cannot discriminate, since an invalid form never sends on either side). Scene lesson for e2e authors: stale-marker scenes are racy BY CONSTRUCTION — a page-level `.value =` write on a bound field is heard SYNCHRONOUSLY (the value property is instrumented and the silent live validation repairs the marker inside the write), and a delayed global silent pass can heal a protocol-level fill's stale marker mid-arm — so pin gate behaviour on a genuinely-invalid form and discriminate on event emission. Browser-bundled ⇒ restart AND re-bake. **The anchor in-flight lock owns `aria-disabled` alone; the settle releases remove it unconditionally (#B309 → #B312, 0.6.5).** On an `<a data-gina-form-submit="true">` trigger send()'s in-flight lock and the not-ready gate historically SHARED `aria-disabled` with opposite lifecycles — the settle releases (the `loadend` fail-safe + the readyState-4 twin) removed it unconditionally, so a mid-flight gate re-mark was silently erased at settle (#B309), and the reveal's valid-form heal erased the LOCK mid-flight the same way (#B313). #B312's single-writer split dissolves the class structurally: the gate writes only `data-gina-form-submit-gated` + the class, the lock is the sole framework `aria-disabled` writer on anchors (buttons lock via native `disabled`), both settle releases are back to the plain unconditional `removeAttribute` (the interim #B309 verdict-stamp replay retired unreleased, its 18-test file with it), and the reveal's show branch never touches aria — so authored `aria-disabled` survives every framework pass (enforced by the gates, never auto-cleared: consumers relying on the old auto-clear-on-valid must migrate) and #B313 is closed by construction. Scene fact that shaped the design: live-check is DELIBERATELY quiet during a real in-flight submit (the #B192 valid branch holds the submit latch until settle), so keystrokes cannot re-mark mid-flight — the reachable mid-flight writer was the #B246/#B308 reveal itself. Covered by `test/core/validator-submit-gated-marker.test.js` (17 — block-scoped single-writer negatives immune to right-extension, authored-aria + lock survival behaviour, the shipped `isTriggerDisabled` EXTRACTED and EXECUTED, terminator-anchored release-shape pins, dist-fidelity pins validated red-first across the rebuild). Browser-bundled ⇒ restart AND re-bake. **isRequired's emptiness is anchored at both ends, and trim strips both sides (#B245, 0.6.5).** The emptiness conjunct was `!/^\s+/.test(value)` — leading-anchor only — so ANY leading-whitespace-padded value read as empty (" x" rejected, "x " accepted), and under the documented isRequired-first ordering a paired `trim` healed `local.data` AFTER the error was recorded: a rejected field carried the trimmed non-empty value in the same result. Now `/^\s+$/`: whitespace-ONLY is empty, padded values pass, all-whitespace and the empty string still fail. Same fix: `trim`'s replace gained its missing `g` flag (first-match-only rewriting left the trailing run whenever a leading run matched — " x " → "x "). The validation-rules reference is corrected (it had documented the leading-space rejection as intended while prescribing the isRequired-then-trim pairing that could not work under it). Covered by `test/core/validator-required-whitespace-trim.test.js` (block-scoped comment-stripped source pins + the heal matrix on the REAL plugin over the server auto path + dist-fidelity counts red-first across the rebuild). Browser-bundled ⇒ restart AND re-bake. #B345 (issue #59, shipped in 0.6.7): the #SCS1e paren/`return` strip used to run BEFORE the regex-vs-comparison branch split, so a parenthesized `is` regex literal compiled from MANGLED text — groups destroyed and anchors rebound (`/^(a|b)$/` behaved as `/^a|b$/`: substring-permissive for middle alternatives), quantified groups requantified (`(#TAG)?` → literal `#TA` + optional `G`), and a literal `return` inside a pattern deleted — all silent, since the stripped text still compiled as a valid regex (the `Invalid regex literal` throw structurally cannot catch it). The strip now lives inside the binary-comparison branch only (grammar lock + authored-paren tolerance unchanged — `("a") === ("a")` still strips to a valid comparison); a regex literal compiles exactly as authored, that branch never evaluating the condition as JS. Behavior change (changelog ACTION REQUIRED): paren-carrying `is` patterns now match as authored, i.e. stricter; and the paren-wrapped-regex edge `(/foo/)` now fails closed in the comparison branch instead of being unwrapped into the regex branch. Locked by `test/lib/validator-is-regex-parens.test.js` (14 — red-first source ORDER pins, the reported reproduction, anchors/quantifier/`return` arms, comparison-branch controls, gina.js + wrap-immune gina.min.js order pins). **The Safari `autocomplete="off"` workaround (#B1055, #B1063, #B1064; up to 0.7.7 a keydown interception, removed):** on a real-Safari UA (#B135 gate) a live-check `<input>` with that value (`handleAutoComplete`) stays `readonly` until it has focus, because Safari's AutoFill ignores the attribute but skips a readonly control when it fills a form; every key stays native. gina writes `readonly="gina"` and focus lifts only that value, so a `readonly` the page wrote, in its markup or from a script at any time, stays; a clone of a bound field copies the attribute and still binds. A field that already has focus when it binds (`autofocus`, a `reBind()` during typing) takes the mark on blur (#B1067), and unbinding (`destroy()`, `unbind()`) lifts gina's mark, which left the field dead before (#B1068). The removed interception cancelled each key and rebuilt the value by hand: `email` and `number`, which have no Selection API, typed backwards and posted that way (`123` sent `321`, an uncaught `InvalidStateError` per key), Tab trapped or skipped, Enter did nothing, `maxlength` was ignored, an authored `readonly` was lifted, `input` and `beforeinput` never fired, and a `query` rule sent one request per key; and on Safari 27 it did not stop the browser's list anyway (read by eye, control firing). The caret tracking #B389–#B392 fixed in it went with it. `change.<id>` still fires on focusout, so a required field left empty shows its error on blur, on this shape on Safari only. A driver's `fill()` needs `focus()` first on such a field. Browser-bundled ⇒ pickup is a re-bake. Tests: `test/core/validator-autocomplete-readonly-b1055.test.js` (source pins, the real handler and gate bytes on a fake element, dist pins) + the webkit-only e2e `test/e2e/validator-autocomplete-readonly-b1055.spec.js` (runs in the on-demand cross-engine job). **#B200 (shipped in 0.6.12): a NON-STRING field value no longer aborts the whole validation pass.** `isEmail` and `isJsonWebToken` opened with a TRUTHY-only coercion (`(this.value) ? this.value.toLowerCase() : this.value`), so a truthy non-string — `123` / `true` / `[]` from a JSON body, or a checkbox boolean on the client — reached `.toLowerCase()` and threw; `trim` was WIDER still, its type guard present but COMMENTED OUT and no truthy guard either, so EVERY non-string threw, a falsy `0` included. In all three the rule driver's catch RE-THROWS (`[ ginaFormValidator ] could not evaluate …`), so one bad field kills every remaining one: server-side the request goes unvalidated, client-side the boot-time binding loop dies and later forms silently lose validation AND CSRF injection. Fixed by type-guarding each site against a precedent already in the file — the #B87 `query` coercion for the two rules, isFloat's identical guarded `.replace()` for `trim`. **Measured, and the load-bearing check: the guard does NOT open a #B199-style silent bypass** — a non-string passes through untouched and the rule's own regex then rejects it, so `isEmail`/`isJsonWebToken` record a normal rule-keyed error (`isValid === false`), while `trim`, being a transform, leaves it untransformed (the #B245 both-ends strip on real strings is unchanged). **Reusable rule: type-guard BEFORE a string coercion, never truthy-guard** — a truthy check admits every non-string except the falsy ones (the authn.md §4 lesson, and the same split that sent falsy values to #B199 and truthy ones here). Deliberately NOT fixed in that pass: `isDate` (its throw is a purpose-built catch — an error-contract design call, #B397). `toFloat`/`format` — plus the same-family `set` — were later fixed by #B398 (context-safe rules; `test/core/validator-context-safe-rules.test.js`): `toFloat` reads the live DOM value only when one is reachable and otherwise uses the submitted `this.value` (server-side that IS the raw value, so the rule is fully functional in both contexts; the missing comma that leaked `isFloatingWithCommas` as an implicit global is fixed with it); `set` assigns the value everywhere and guards its DOM write (`isGFFCtx && target`); `format` always worked in BOTH contexts after `isDate` — the filed "dateFormat prototype extension absent server-side" mechanism was REFUTED by measurement (helpers/index installs `Date.prototype.format` unconditionally, server included) — and a non-Date value now throws a NAMED authoring error (`apply isDate(mask) before format(mask)`) instead of the opaque `val.format is not a function` (`toFloat`/`format` were first misread as this same class by a probe whose STRING CONTROL also threw, which is what exposed them). Browser-bundled ⇒ pickup is bundle restart AND re-bake. Tests: `test/core/validator-nonstring-value-guards.test.js` (comment-stripped source pins red-first vs the pre-fix blob, behavioural arms asserting the VERDICT not merely the absence of a throw, wrap-agnostic dist pins red-first vs the pre-fix artifact, plus untouched-rule controls incl. one labelled INVARIANT because it cannot go red). **The form-level keydown proxy defers the native-cancel decision to the namespaced handler (#B444, gh issue #67):** `addListener(gina, $el, 'keydown.<id>', fn)` registers a CUSTOM event type a native keydown can never fire; the form-level `keydownProxyHandler` bridges the two by re-dispatching - and it used to `cancelEvent()` the NATIVE keydown unconditionally BEFORE that dispatch, so on real-Safari UAs (where the autocomplete interception, removed by #B1055, registered exactly such a handler) EVERY modifier chord on a live-checked autocomplete-suppressed field was dead - paste, select-all, copy, cut, undo - with NO paste/beforeinput event observable anywhere (preventDefault on a native keydown suppresses the browser editing command itself), while the interception handler's own chord bail sat one layer too low to help. The proxy now dispatches FIRST and cancels the native keydown only when the handler prevented the synthetic event; `triggerEvent` returns the dispatched event to make that decision readable, undefined on the element-less path - treated fail-open to native. The keyup proxy is untouched (no `keyup.<id>` registrar exists). Measured live on WebKit: chords restored. Tests: `test/core/validator-keydown-proxy.test.js` (extract-and-execute on both changed functions) + `test/e2e/validator-autocomplete-paste.spec.js` (webkit project, cross-engine job). **#FIN4 (`isIban` / `isBic`, 0.6.x):** IBAN and BIC join the built-in rule set. `isIban` validates ISO 13616 in three ordered checks - shape (`^[A-Z]{2}[0-9]{2}[A-Z0-9]{1,30}$`), official per-country length via the constructor-scope `_ibanLengths` registry (87 countries; unknown country codes deliberately pass on shape + checksum so a registry gap never hard-fails a well-formed IBAN), and the ISO 7064 MOD 97-10 checksum folded modulo 97 in <=7-digit chunks of plain Number math (no BigInt in bundled source - build-chain constraint). Tolerant read: validation runs on an uppercased copy with spaces/hyphens stripped; the stored value and the DOM are NEVER mutated (unlike `isEmail`'s lowercase write-back). The type guard folds into `isValid` (`typeof(candidate) == 'string' && rgx.test(...)`) so a toString-spoofing object records an invalid instead of throwing into the rule driver (#B200 posture, tightened). `isBic` validates the ISO 9362 8/11-char shape case-insensitively by regex - no case mutation. Both follow Shape A (`this.valid = isValid && !errors['isRequired']`), the strict #B199 empty bypass, and register English defaults in `_defaultErrorLabels` ('A valid IBAN is required' / 'A valid BIC is required'), culture-localisable like every built-in label. Behavioral + pin coverage: `test/lib/validator-isiban-isbic.test.js` (real-engine; fixtures verified against an independent BigInt oracle). **Autofill signal (#B478, 0.6.27):** the live check re-runs only on the proxied native `change`/`keyup`/`focusin`/`focusout`, and a browser or password-manager fill produces NONE of them - on Chrome not even at fill time, and the filled VALUE stays withheld from script (`.value` reads `''` while `:-webkit-autofill` matches) until the first trusted gesture, which then releases it and fires a keydown/input/change/keyup burst per field (measured, Chrome 152 - which is also why a "gated" trigger always submitted on the first click). So a form filled without keystrokes kept its bind-time gated look on a visibly complete form, and an autofilled INVALID value showed no error. Fix: the default stylesheet (`src/vendor/gina/autofill/sass/autofill.scss`, FUNCTIONAL so deliberately outside `@layer gina`; its keyframe carries a declaration because csso strips an EMPTY `@keyframes` block) gives every `:autofill` / `:-webkit-autofill` control a 1ms keyframe named `gina-autofill-start`; the validator's form-level `animationstart` proxy (`autofillProxyHandler`, also on reassociated controls) dispatches the field's own `change.<id>` live check when the value is readable, and calls `revalidateSilently()` when the browser withholds it. `excludeWithheldAutofill()` narrows the five LIVE-CHECK collectors (bind-time, live global, select global, reveal, silent) so a withheld field neither gates nor renders a false "required" error; the SUBMIT collectors stay strict, so `isValid()` still refuses to post a withheld (empty) credential. A consumer rule setting `animation-name` on those pseudo-classes replaces the hook - keep `gina-autofill-start`. Pins: `test/core/validator-autofill-livecheck.test.js` (extract-and-execute, dist + stylesheet contract) and `test/e2e/validator-autofill.spec.js` (the served keyframe applied through a harness class - real autofill is invisible to automation and to fresh CI profiles). **Honest label for a withheld autofill at submit (#B341, 0.6.27):** the submit collectors are strict by design, so a control the browser autofilled but still withholds fails `isRequired` at click time; that verdict is right, but the plain required label named a problem the user could not see. `isRequired` now consults the plugin's single withheld predicate (exported as `gina.validator.isAutofillValueWithheld`) and, when true, composes the message from the new built-in key `isRequiredAutofill` (default `Filled in by your browser: click the field to confirm it`) - the errors key stays `isRequired`, the verdict and the gate are untouched - and marks the control `data-gina-form-autofill-withheld="true"` until its next adjudication (a CSS/JS hook and the locale-agnostic test signal). `_labelAliasFill` copies an app-supplied `isRequired` onto `isRequiredAutofill`, so a localized catalog keeps its own wording until it translates the new key: never key a test on the English text. Pins: `test/core/validator-autofill-honest-label.test.js` (the rule, `replace()` and the alias fill executed from the shipped engine bytes; red-first through `GINA_FORM_VALIDATOR`) + `test/e2e/validator-autofill-honest-label.spec.js` (chromium + webkit; the plain label read off the page first, the honest render asserted to differ and to carry the marker). **Same-name pairs with a hidden twin (#B510, 0.6.29):** the painter walks `$form.elements` in document order and, on the per-field path, exits on the first control whose name matches — and a BARE `type="hidden"` control (no `form-item-wrapper`) can never be painted (every paint gate skips it). It used to consume the error anyway (box class set, no message, no `aria-invalid`, walk stopped), so the recommended disabled-control shape — a visible control plus a hidden twin carrying `"exclude": false` — lost its server-side field error whenever the hidden twin came first; on a shared box the pre-marked class blocked the visible twin's first-error branch even without the exit. A bare hidden control is now skipped when another control of the same name can be painted (`hasPaintableTwin`); a lone bare hidden keeps the former behaviour, a wrapped hidden is still painted after its wrapper. Browser-bundled: pickup is a bundle restart AND a re-bake. Tests: `test/e2e/validator-hidden-first-paint.spec.js` (real bytes, seven shapes) + `test/core/validator-hidden-first-paint.test.js`. **Binding scope (#B549, 2026-09-17):** the boot scan binds ONLY opted-in forms — a `data-gina-form-*` attribute, an existing id naming a registered rule (`-` read as `.`), or a virtual `gina-upload-*` id; any other `<form>` is left untouched (no minted id, no `$forms` entry, no submit proxy) even on a rules-bearing page, matching the forms guide. Explicit `validateFormById()` / `getFormById()` stay ungated opt-ins. Before the fix the scan's `else` arm bound every form after minting it a generated id, so declaring ONE rule file turned every plain login/signup form on the site into an always-XHR submit — and on isaac HTTP/2 that XHR-answered `req.login()` then lost its session cookie (#B550). **Staged-upload failure paths (gh#83, #B724/#B725/#B727/#B728/#B731, 0.7.2):** (a) #B727 — `onUpload` writes a staging error into the `-error` element as `textContent` inside a created `<p>`, never `innerHTML`: a non-2xx non-JSON body is kept verbatim as `result.message`, so a proxy/WAF HTML page or a reflected filename used to be parsed as live markup (the sink dated from 0.1.1). (b) #B724 — a status-0 settle reports `{status:408, transportError:true, reason, error: a11yLabel('transportError')}`; the text is 'Transport failure: the request did not complete' (a proxy 413 mid-send over HTTP/2 and a navigation abort both DID reach the server), overridable through `gina.config.a11y.transportError`; `reason` is `'unload'` while a `pagehide` is in effect, else `'transport'` — #B728 resets that flag on `pageshow`, because a back-forward-cache restore keeps the page's JS state. (c) #B725 — both payload collectors (`getFormValidationInfos` and the submit proxy's inline loop) skip a `type=file` control carrying `data-gina-form-upload-action`, so its `.value` (`C:\fakepath\<name>`) never rides the payload. ⚠️ CORRECTED by #B1058 (0.7.9): the skip left `fields[name]` undefined, so from 0.7.2 to 0.7.8 NO rule ran on a staged input (`isRequired` let the form go with no file, where 0.7.1 refused it); the old « it stays in `$fields` for rule evaluation » held for `$fields` only, which the rules never read for it. Since 0.7.9, when `rules[name]` is defined, both collectors give it `getStagedUploadValue($input)`: the names of `customFiles` (the last successful staging's files, or the saved entries an edit form shows) and of `pendingFiles` (a selection still staging), joined with `', '`, `''` when none. `forEachField`'s terminal block then excludes the field INLINE, walking the CONTROLS (`for (var stagedName in $fields)`, #B1099, 0.7.10: it walked `fields`, and the scan loop's check of a field a matching `_case_` condition names deletes it from `fields`, so a staged input with a top-level rule that such a condition also named had its value posted beside its hidden fields), once every rule of the pass has run and before the errors are read (`exclude(true)`, so `toData()` never carries it; `isRequired(false)` splices a name back out of `local.excluded`, so never as an injected rule key; inline because eight suites lift `forEachField` into `new Function` and a helper call there threw in 51 of their tests). `resyncStagedUploadGate($input)` (→ `revalidateSilently`) re-derives the form's gate at the selection (after the pending write), as `onUpload`'s last statement and after a reset or delete, only for an input with a rule: the live check never binds a `file` input, so this is the only gate writer for one (without it a live-checked form's trigger stayed not ready after a staging). A staged input without a rule is collected as before, with no value; a top-level rule key written `/pattern/flags` that matches its name (`[` and `]` read literally) is a rule of its own: `bindForm` runs `checkForRuleAlias` on every owned `<input>`, a staged one included, which gives a name without a rule the first matching RegExp key's rule before any pass, so the collectors give the input its files' names and the rule judges them. Limits: a `_case_` condition's rule on a staged input is not applied with one case key, and with two or more keys a non-last driver's condition judges the input's own `.value` (#B1095, LOW, open); the plugin's server pass (`gina.plugins.Validator(rules, data, formId)`) sees the files as the nested `<prefix>[i][…]` array (`isRequired` refuses `[]`) but checks no key absent from the data, and gina writes none of its file fields for an input with no file (a field the page declares at an index is the page's). Tests: `validator-upload-staged-b1057.test.js` §05–08 (source, `gina.js` and `gina.min.js` arms), `validator-staged-case-exclusion-b1099.test.js` (the exclusion walks the controls) and `validator-staged-regexp-key-b1099.test.js` (the alias step judges a staged input; #B1099's exclusion on that path, with a literal or a RegExp key in the condition) + e2e `validator-upload-staged-b1057.spec.js` C1–C9. ⚠️ The default error render runs ALONGSIDE a declared `data-gina-form-upload-on-error` callback (element first, then `error.<vid>` and the callback), so a callback cannot suppress it. (d) #B731 — the error element is OPTIONAL: without it the message is announced through the form's live region (`announceA11yError`, when non-empty), a dev-mode `[FormValidator] upload … no error element` warning names the missing id, and `error.<vid>` and the callback still run; `onUpload` used to `throw new Error(errMsg)` there, with `errMsg` undefined outside the rendering branch, BEFORE either dispatch, so the callback never ran, for an HTTP error and a status-0 failure alike. The slot id is read ONCE, from the file input (`data-gina-form-upload-error`, default `<input id>-error`): it was recomputed for every `<input>` of the real form and kept the LAST one's, so a custom slot was honoured only when the file input was the form's last input. Residual: the bind-time `checkUploadUrlActions` still looks its errors up only at `<id>-error`. Pin: e2e `validator-upload-error-slot-b731.spec.js` (5 arms, red-first on the pre-fix dist). **A reset, a script's write and a shared field id reach the live check by distinct paths (#B1037, #B1036, #B1035, 0.7.8).** A form reset runs no live check: `resetFields` holds the listeners off with `$form.isBeingReseted` while it writes (down in a `finally`), skips a control removed from the page and reads an empty select without throwing, clears the display and `errors`, and ends with one pass marked `cb.isSilentPass`, which only re-reads the gate (it takes the #B348 rescue of a clean verdict on a `query` field not last, ignores the answer to another value, and leaves a request's trigger lock; a master checkbox's timer re-reads the gate once its group is applied; with live check off `.resetFields()` runs no pass); `$form.resetCount` tells a pass already on its way, so the live listeners drop it, the `query` waiter in `validate` neither stores nor paints a verdict that outlived the reset, and a submit it refuses is released with nothing painted (one it accepts still sends). A pass that outlives its FORM stops the same way (#B1069): `processEvent` (the keyup debounce, the deferred radio/checkbox pass) and the `query` waiter return when the field has no form or the form has no record — `destroy()` dropped it, or the field left the form — where reading the record threw an uncaught TypeError; a pass whose record exists runs as before, a `destroy()` then bind included (pins: e2e `validator-destroy-pending-check-b1069.spec.js`, red-first through `GINA_B1069_PREFIX_BUNDLE`; unit `validator-destroy-pending-check-b1069.test.js`). On a `reset` event `text` and `hidden` inputs still end on their `defaultValue`; `.resetFields()` alone ends on the value at bind. Since 0.7.9 a reset also restores a form-associated custom element (a `-` in its tag name) through its own `formResetCallback`, which the native reset gina cancels would have run: one without it keeps its value, as a native reset leaves it, and a callback that throws is rethrown on a timer while the others still run (#B1041); as natively, the callbacks run once every other control is restored, so a callback reading a sibling sees its restored value, and a component no longer among the form's `elements` (moved into another form since the bind) is left alone (#B1087). A submit waiting for a staged upload (#B726) is dropped at the top of `resetFields` and its busy state released unless a request of the form's own is in flight, so the upload's success replays nothing (#B1043). A live-checked select's change no longer writes the page's `window.once` (#B1038: an undeclared `once = false;` in `updateSelect`'s whole-form callback). Pins: e2e `validator-reset-face-b1041.spec.js`, `validator-reset-face-order-b1087.spec.js`, `validator-reset-upload-wait-b1043.spec.js`, `validator-select-global-once-b1038.spec.js`, each red-first through its `GINA_B10xx_PREFIX_BUNDLE`; unit `test/lib/loading-state.test.js` §06 (h). A script's `el.value = …` re-checks the form and updates the gate and the store, and paints nothing new (`ginaFormIsScriptWrite`, read synchronously into `isQuietWrite`; both its passes are silent; a radio stays out, `updateRadio` writing a boolean pair's value on the user's own pick), unless the field already shows a message, which changes or clears; a real `change` dispatched after the write paints. A `textarea` and the `tel`/`url`/`search`/`time`/`datetime-local`/`month`/`week` inputs have no value setter, so a write there re-checks nothing. `gina.events['registered.<id>']` and `change.<id>` are global and keyed by the id, so of two controls that share an id only the first is live-checked: that stays (duplicate ids are invalid HTML), the bind warns once per form and id, and a reset works on the form's own controls. Pins: e2e `validator-form-reset-b1037.spec.js`, `validator-shared-field-id-b1036.spec.js`, `validator-script-write-b1035.spec.js`, each red-first on the pre-fix dist with its `GINA_B10xx_PREFIX_BUNDLE`.
960
960
 
961
961
  210. **Multipart upload config is ENFORCED — groups, destination, limits, text-field capture + caps, terminal states (consolidates former #187/#188/#228/#230's server half; #B49/#B50/#B51/#B92-adjacent/#B93/#B97).** Every uploaded file must map to a CONFIGURED upload group: the resolved group (no/empty → the default `untagged`) must exist in `settings.json upload.groups` — as one of its OWN keys (#B1089, 0.7.9: a `group` that only resolves through `Object.prototype`, such as `__proto__`, `constructor`, `hasOwnProperty` or `toString`, is rejected 400 like any unknown name; up to 0.7.8 the gate was a bare `typeof` read, so such a part passed it and the rules read on it, `allowedExtensions`, `isMultipleAllowed` and `path`, read `undefined` and were skipped: any extension, several files in a single-file group, the default directory — a bypass around a restricted `untagged` group, with no account) — or the request is rejected 400 BEFORE the temp file is created, and `untagged` obeys its own config like any named group (pre-#B50 the checks ran only for defined non-`untagged` groups — an allow-list bypass; the shipped `untagged` default is `allowedExtensions: '*'` + `isMultipleAllowed: true`, so configure `untagged` restrictively or a client can route around a named group's allow-list). Destination + limits honoured: files stream to `uploadDir || tmpPath || os.tmpdir()` with a per-group `path` override and mkdir-if-missing before `createWriteStream` (the mkdir itself crash-guarded → 500, #B145); `maxFields` caps the per-request file COUNT (400 past the cap; 0/unset disables); `maxFieldsSize` parses its unit suffix (B/KB/MB/GB; bare number = MB) as the whole-body cap (431). **The staged on-disk FILENAME is server-generated and opaque, never the client's (#B419, 0.6.16):** `crypto.randomBytes(16).toString('hex') + '.part'`, minted once per part and used at BOTH path-construction sites — the write stream AND `req.files[].path`, which are built independently and must never diverge. Pre-fix the destination was `<fileUploadDir>/<client basename>` with NO per-part component, so two parts sharing a name — within ONE request or across concurrent requests — opened two write streams on ONE path with independent file offsets and INTERLEAVED their bytes into a single hybrid matching neither source, while the framework answered `storeErr:false` + 200 (measured live pre-fix: 12 concurrent same-named uploads → 0/12 clean, one hybrid file; one request with two same-named parts → one 500000-byte file of {B:417353,A:82647}; post-fix 12/12 clean, each byte-exact). The parse precedes routing and all middleware, so an UNAUTHENTICATED POST to ANY url reaches it — an unrouted one answers 404 to the client and still writes the file. A CSPRNG rather than the `Math.random()` used by `movefiles` (V8's is xorshift128+, so staging paths would be predictable, and a group `path` is operator-configurable into a served root); a RANDOM name rather than `filename + <suffix>` (keeps attacker-controlled bytes off the filesystem — RTL-override display spoofing, control chars, reserved device names — and cannot overflow NAME_MAX=255 into an ENAMETOOLONG 500 for a long-but-legal client filename); no interpretable extension, so a misconfigured static-serve of the staging dir cannot hand back an executable type. This is the multer ("a random name that doesn't include any file extension") and formidable (`newFilename` hexoid) convention. `req.files[].originalFilename` still carries the client's name and is what `store()` publishes the file under (`controller.js:4061`) and what a storage driver receives as `originalName`, so the documented "keeping each file's original name" contract is UNCHANGED — only `req.files[].path`'s BASENAME differs, and that field is documented as the temporary file's path. Server-side ⇒ pickup is a bundle restart, no re-bake. **Staged-part lifecycle + orphan reclaim (#B469):** a staged part has exactly TWO reclaim paths — the `movefiles()` unlink when `self.store()` publishes it, and the per-upload `autoTmpCleanupTimeout` deletion timer (`false`/0/empty disables it — the shipped default, and removing staged files is then the operator's own job). The timer is IN-PROCESS: a restart strands every part it was holding, and a part that never reaches `store()` (a request failing AFTER the multipart parse — the parse precedes routing, so auth/validation/quota failures have already staged; or an app consuming the staged file without `store()`) then has NO reclaim path at all. So an ARMED timer also arms a boot-time sweep at server init: each configured landing dir (the resolved global + every group `path`, deduped) is swept NON-recursively for `<32 lowercase hex>.part` REGULAR files (lstat, symlinks never followed; a client-named orphan predating the opaque staged naming is indistinguishable from an application file and is left alone — ⛔ that name gate is LOAD-BEARING, never widen it: `_sweepDirs` includes every group `path`, and a group `path` is ALSO the PERMANENT destination, so on a deployment whose group path is a permanent publicly-served storage root the pattern is the only discriminator protecting real user files; the mtime gate cannot help there, since permanent files are old by definition) older than timeout + 1h (since 0.7.6, #B472; it was max(timeout, 1h), which for a timeout of an hour or more acted at the owner's own moment by the sweeping node's clock) — the hour keeps a SIBLING live process's in-flight part on a shared staging dir safe, since its mtime stays fresh while chunks land, and absorbs up to an hour of clock skew or attribute caching between nodes sharing the dir; ENOENT at any step is not an error (a sibling bundle sweeping the same dir, or the app unlinking its own part). The sweep REPORTS at `info` only when it removed something or hit errors (`upload orphan sweep: removed N staged part(s) across M staging dir(s)`) and at `debug` when it found nothing — so at the default `info` level a silent boot means no staged part was older than the gate, NOT that the sweep did not run; an operator expecting the line after a restart that had nothing left to reclaim (the boot that did the reclaiming having gone with its logs) will otherwise read a healthy no-op as a missing line. Disabled timer = NO sweep — the documented operator-owns-cleanup contract is unchanged. An application MAY unlink `req.files[].path` itself: `movefiles()` tolerates a vanished source (ENOENT) by design, and the armed timer already requires that tolerance. Rule: a group `path` is the PARSE-TIME LANDING (staging) directory, never where published files live — `store(targetDir)` or the group's storage `driver` owns final placement, and one key must never carry both meanings. **Multipart TEXT fields are captured** — a real busboy `'field'` listener (busboy silently SKIPS all non-file parts when none is registered) exposes them on `req.body` + `req[method]` (POST/PUT/PATCH only), values VERBATIM (no url-decode, no `"true"/"false"/"on"/"null"` coercion — the JSON body contract, deliberately: otherwise the same client `send(fd)` call would change value TYPES with file presence), bracket-notation names nested through the urlencoded path's own layer, duplicate plain names last-wins; caps `upload.maxTextFields` (default 1000) + `upload.maxTextFieldSize` (default 1MB, unit-aware, explicit 0 = no limit) answer 400 on breach instead of busboy's silent skip/truncation. **A multipart request with no successfully-parsed file part reaches a TERMINAL state:** fields-only → the request resumes; malformed/empty → 400 via `busboy.on('error')` with a double-response guard (busboy terminates in exactly `finish` XOR `error`; pre-#B93/#B97 both were unauthenticated pre-routing DoS holes — an eternal hang, and an uncaughtException → SIGTERM bundle kill). Rules: a per-group restriction is only a control if the UNCONFIGURED/default case is denied or constrained, never waved through; a documented config key is only real if a code path reads it — grep the consumer before assuming a setting works; any stream/parser whose SUCCESS path drives a request's continuation must ALSO handle its error/empty terminals. Since #STO1 slice 1 a group may also carry driver: '<name>', routing its self.store() step through settings.storage (entry #300; the parse/staging path above is unchanged). Server-side only. Tests: `test/core/upload-groups.test.js` + `upload-config.test.js` + `multipart-nonfile-terminal.test.js` + `multipart-field-capture.test.js` + `upload-concurrent-staging.test.js` + `upload-orphan-sweep.test.js` (+ the client `send(FormData)` half: `validator-send-formdata-multipart-fields.test.js`). **Server-path integrity + terminal-state hardening (former #263/#267/#268/#270 — #B103/#B142/#B143/#B144/#B145/#B223, 0.5.22-0.5.24):** a multipart body stays RAW end-to-end — `request.isMultipart` is computed ONCE at the request prologue and gates the request-stream `setEncoding` (a multipart stream reaches busboy as raw Buffers, its documented input; the decode remains for the text-body branches), write-pipeline chunks pass through VERBATIM, and `req.files[].size` counts BYTES, never a decoded string's length (#B103 — pure-ASCII surviving both old decode layers is why text uploads always worked while every real binary corrupted on every native multipart client: a PNG's 0x89 magic landed as 0xFD). The per-file `size` is finalized in the liner Transform's `_flush` (#B142 — the source-'end' record ran one pipe hop UPSTREAM of the byte counter with 16-object high-water marks still queued, under-counting ~25% on a 1.5MB file while md5 stayed perfect: the bytes were intact, only the number lied; `_flush` runs after the last `_transform` and strictly before the write stream can emit 'finish', both interleavings measured exact), and BOTH write-stream terminal listeners arm AT STREAM CREATION in the 'file' handler (#B143 — arming inside `busboy.on('finish')` lost the race for any early-finishing small file: Node never replays 'finish' for a late listener, so a throttled two-file upload hung deterministically, ~1 in 13 unthrottled; unauthenticated, both engines). Resume fires on `busboyDone && pending === 0`, whichever event lands last (the zero-pending branch still covers the fields-only #B93 terminal), and a mid-stream write error (missing dir, disk full) gets a guarded 500 instead of the historical unhandled-'error' uncaughtException SIGTERM. Downstream, `Controller.store()`'s mover streams each file to a temp sibling and publishes with an ATOMIC rename (a reader never observes a partial file; a pre-existing destination is replaced only on success), propagates the REAL filesystem Error (previously masked as `No file to upload`), and never settles the callback twice (#B223). Since #B227 the SAME semantics govern the general-purpose byte-writer in `helpers/path.js` behind `_().cp()` / `PathObject.mv()` (which CLI copy/build/rename paths ride): temp sibling in the destination's own directory + atomic rename (a pre-existing destination is no longer unlinked BEFORE the copy — its content survives a failed copy), a source-stream error listener (was an unhandled `error` event → process kill), a settled latch (a destination-side failure previously settled twice, the second time as a success, forking `browseCopy`'s directory recursion), and a real `Error` instead of the former plain string (`Error on Path.cp(...): Not found ...`) — so caller `err.stack` prints stop logging `undefined` (on Bun too, which reports such an error without a stack: the helper gives it one, #B654), and a failed copy's temp sibling is removed only once its stream has closed, before the callback — its creation can finish after the failure is reported (#B649); `Controller.store()`'s mover does not have this reap yet — its failure path still checks for the temp sibling and settles at once (#B657, open, code-read). Every `mv()`, `rm()`, `mkdir()` and folder `cp()` settles exactly once, whatever happens to its paths meanwhile (#B1045, #B1047, #B1048): a path another operation takes counts as done, any other failure reaches the callback (`mv()` with no callback logs it), a folder copy finishes what it can and reports its first failed file, so `mv()` keeps its source, and a target that already is the source is a no-op, as is a file moved to the folder it already sits in, while a rename that only changes the case renames (#B1046). A folder onto a folder that holds it, or into itself, is refused before anything is written, with an `Error` coded `EINVAL` (#B1050; `cp()` with an `excluded` list may still copy into itself). The destination mkdir is crash-guarded (#B145): a group whose custom `path` has a read-only/EACCES/EROFS parent answers a guarded 500 naming group + path — a server CONFIG problem is 500 (the #B50 unconfigured-group 400 stays upstream and unchanged), and pre-fix `fs.mkdirSync` threw SYNCHRONOUSLY inside the parser callback → uncaughtException → SIGTERM, an unauthenticated single-request bundle kill (the multipart parse precedes routing and all middleware, both engines). A per-group `simulateWriteError: true` flag (#B144) lets a consumer deterministically fire the guarded-500 write-error path OUTSIDE production scope only (`!NODE_SCOPE_IS_PRODUCTION`): the 'file' handler creates the REAL write stream, arms the REAL terminal listeners, then synthetically `destroy()`s it — the exact terminal semantics of a real ENOSPC/EIO (an errored stream never emits 'finish', so the request stays terminal at the 500), N destroyed parts collapsing to exactly ONE 500 via throwError's `!res.headersSent` guard; a boot warn scans `upload.groups` for the flag in both scopes (production: "IGNORED — remove before shipping"; else "PROBE active"); nothing ships active. The `group="…"` tag rides a Content-Disposition PARAMETER that `curl -F` / browser FormData cannot emit (the `@rhinostone/busboy` fork parses it into `info.dispositionParams.group`), so a faithful probe HAND-BUILDS the multipart body. **The staged upload client layer (`data-gina-form-upload-*`, lives in the validator plugin — browser-bundled ⇒ consumers RE-BAKE at pickup; former #269/#271/#272/#274 — #R8 slices 1-2, #B146/#B147/#B148/#B149):** the staging POST body is assembled as a `Blob` with each File object embedded RAW (#B148 — the historical `FileReader`/`ab2str` DOMString concatenation UTF-8-inflated every byte >= 0x80 on the wire, ×1.49 measured, a PNG's 0x89 arriving as 0xC2 0x89; the corruption only STARTED at 0.5.22 because the pre-#B103 server's two since-removed decode layers EXACTLY reversed the inflation — two wrongs cancelling — so the #B103 server fix is what exposed the client defect). Multipart FRAMING is byte-identical (same boundary delimiters, same `name=`/`group=`/`filename=` disposition-parameter set, values percent-escaped for CR/LF/double-quote per RFC 7578 §5.1.1); a fixed client must pair with a server >= 0.5.22 (an older server's decode layers would corrupt the now-raw bytes — the #B103 corruption in reverse); files corrupted by the defect are LOSSLESSLY recoverable (the stored bytes are exactly the UTF-8 encoding of the originals: decode utf8 → re-encode latin1). **`send()` reads nothing from the event being dispatched (#B758, 0.7.3):** a staged file's `group=` comes from the file input its virtual upload form stages for (`uploadProperties.uploadTriggerId` → that input's `data-gina-form-upload-group`, `untagged` when unset). It was read from the implicit global `event.currentTarget`, right only inside the input's own change dispatch (picker, dropzone), so a direct `$forms[<virtual id>].send(formData)` outside a dispatch threw (reported as a staging error, while the request still went out with no boundary and no group) and inside an unrelated dispatch took that element's group, silently; a no-data `send()` now sends an empty body instead of reading `event.detail.data` and throwing after `isSending` was claimed. e2e `validator-upload-send-b758.spec.js` (5 arms, red-first). **Upload progress (#R8 slice 1):** `send()` assigns `xhr.upload.onprogress` FRESH on every send (the module-scoped XHR was reused across sends — a stale handler replays the previous send's closure with the wrong id), dispatching the REGISTERED event `uploadProgress.<uploadFormId>` (the events-array registration is required — `on()` validates names against the plugin registry) with `{ status: 100, progress: <int 0-100 | null when lengthComputable is false>, loaded, total, lengthComputable, files: [names] }` — a per-REQUEST aggregate (ONE staging XHR carries every file of a selection; per-file wire progress is not separable). Consumer surfaces: `data-gina-form-upload-on-progress` (bare window identifier, the -on-success convention) + a declarative indicator `data-gina-form-upload-progress="<elId>"` defaulting to `<fieldId>-progress`, opt-in by element presence. The updater feature-detects the target: a native `<progress>` tracks value=loaded/max=total (indeterminate = the value attribute REMOVED for the native animation; error = value 0, NEVER indeterminate — that animation would read as still working); any other element gets percent textContent + `data-gina-upload-progress`/`data-gina-upload-progress-state` styling hooks (preparing|uploading|indeterminate|processing|complete|error) with NO hardcoded wording (i18n-neutral — label via CSS on the state attribute). Lifecycle: `preparing` at selection (covers the FileReader/assembly phase), `uploading` per frame, `processing` at `xhr.upload.onloadend` (the browser finished SENDING — advances the state attribute ONLY, leaving value/percent as the last frame left them so a determinate bar stays visually full), `complete`/`error` finalized in onUpload (one chokepoint covers success and every error/timeout path), reset/delete strips the indicator. The response-side download channel `progress.<id>` is byte-untouched (it also serves attachment downloads). **Drag-and-drop (#R8 slice 2):** a file input carrying `data-gina-form-upload-dropzone="<elementId>"` gets drag listeners bound on the named element at form-bind time; dropped files are assigned to the input (`input.files = dataTransfer.files`) and the input's `change` is re-fired synthetically, so the ENTIRE staging pipeline — group tagging, virtual form, staging POST, previews, hidden metadata fields, reset/delete, upload progress — runs with zero duplicated logic (the change handler reads only `currentTarget`, so a synthetic dispatch is indistinguishable from a trusted one on this path). Contract: EXPLICIT-id-only (deliberately NO `<fieldId>-dropzone` default — auto-binding a coincidentally-named element would attach drag semantics to markup that may carry its own drop handling; absent attribute = inert, missing element = console.warn + inert); the zone is stamped `data-gina-upload-dropzone` (value = owner input id — the first-wins guard: one zone serves one input) and `data-gina-upload-dropzone-state` (`idle` → `over` on a file-drag hover, DEPTH-COUNTED so child-boundary crossings never flicker → `dropped` → back to `idle` at the same onUpload chokepoint that finalizes progress, and at reset/delete) — pure CSS hooks, no hardcoded wording. Only FILE drags react (`dataTransfer.types` must carry `Files`; text/link drags fall through untouched, never preventDefault'd); a multi-file drop on a non-`multiple` input keeps the FIRST file only (console.warn) — configured groups still enforce `isMultipleAllowed` server-side; a bare file input already accepts native browser drops through the same change handler — the attribute exists to delegate a larger/styled element. **Action/preview/bind fixes (#B146/#B147/#B149):** `checkUploadUrlActions`'s default-route fallback writes the attribute ACTUALLY being checked (`setAttribute(action, …)` — it used to hardcode the staging attribute and silently repoint a staging POST at the resolved reset/delete default route, compounding to a SILENT failure when `toUrl()`'s absolute origin tripped a CORS preflight → XHR status-0 → the commented-out status-0 branch); the preview-container guard uses the typeof-null pattern (`&& previewContainer` — `getElementById` returns element|null and `typeof null === 'object'`, so a preview-element MISS used to TypeError the success handler at `.id`); an upload-only input binds QUIETLY — `-delete-action` deliberately has no framework default (it removes an already-saved file, an app-specific endpoint), so a no-default absent action is a single `console.debug` + early return (a WITH-default action that genuinely fails to resolve still errors; the delete requirement stays enforced lazily at `onUploadResetOrDelete`). **A saved file's delete link goes with the entry a selection replaces (#B150, 0.7.6):** the staging success removes the delete links of the input's entries that carry a `deleteLinkId` (the bind-time entries the selection replaces, still the input's `customFiles` until that success, #B960) right after it records `stagedFiles` — the container reset of the success path took a link placed INSIDE the preview container but not one placed after it (the shape the uploads guide documents), which stayed on the page bound to an entry the input no longer held, so a click sent no request, removed nothing and logged the zero-match `console.warn` (that warning stays; since #B959, 0.7.6, a `change` that carries no file returns before it writes anything, so an emptied selection leaves the links of the files already shown live). Tests: `validator-upload-replaced-delete-link-b150.test.js` and `validator-upload-cancel-b959.test.js` (pins + dist fidelity) and `test/e2e/validator-upload-zero-removal-b150.spec.js` (the real bundle, arms F1–F5; `B150_PREFIX_BUNDLE` for the red-first run). **A selection takes the input over only when its staging SUCCEEDS (#B960, #B961, 0.7.6):** the `change` listener keeps the selection as `pendingFiles` and writes nothing else; on a failure `onUpload` drops it, empties the input's `value` (#B1059, 0.7.9: the input used to keep naming the failed file, and Chromium answers a re-pick of the file an input already holds with `cancel`, not `change`, so that file could not be staged again; a staging that a newer selection superseded settles on its abort, #B729, and never reaches this drop) and changes nothing more (the previews, the reset and delete links, the input's `customFiles` and the form's hidden fields stay as they were), and on a success it empties the preview container, records `stagedFiles`, removes the replaced entries' delete links, sets `customFiles` from `pendingFiles` and builds the hidden fields before the per-file fill, then (#B1057, 0.7.9) runs `removeUploadEntryFields` for each index from the new selection's length up to the count the input held before the take-over (read before `customFiles` is replaced): a smaller selection used to leave the replaced indices' fields in the form (three staged, then one: the save posted all three; an edit form posted the saved files the selection did not reach); locked fields stay, the others are stashed and come back with a later, larger selection, and no delete request goes out for a replaced saved file. Tests for both: `validator-upload-staged-b1057.test.js` §01–04 + e2e `validator-upload-staged-b1057.spec.js` A1–A4, B1–B6. Before, the listener wrote `customFiles` and built the fields at the selection while every settle emptied the container: a failed staging took the previews (and any link inside the container) off the page, left a link outside it bound to the failed file (a silent no-op) and posted the failed selection's fields empty; during the flight a delete sent nothing (the #B150 warning) and a reset took the new file's fields out of the form, so the save posted no file. The selection that creates the virtual upload form still binds the reset triggers the page holds (`data-gina-form-upload-reset-trigger`). Tests: `validator-upload-commit-at-success-b960.test.js` (pins + dist fidelity) and e2e `validator-upload-failed-staging-b960.spec.js` (controls C0/C1, F1–F6, G1; the staging route answers from a per-arm plan in request order, since a WebKit route handler reads no multipart body; `B960_PREFIX_BUNDLE` for the red-first run). **The reset/delete trigger binding warns only for a control the page must provide (#B292, 0.7.6):** `bindUploadResetOrDeleteTrigger` binds `<input id>-<index>-<reset|delete>-trigger` (or, when no element has that id, the id declared through `data-gina-form-upload-<reset|delete>-trigger`) and leaves a control already bound as it is; its « did not find `upload <reset|delete> trigger` » `console.warn` now fires only for a missing delete link or a declared id that matches no element. Before, it also fired for a reset control missing under its default id, which the staging success creates (every upload input warned at its first selection, twice with no preview container), and, on `$forms[id].reBind()` of an edit form, for a saved file's delete link that was present and already bound. Since 0.7.8 a re-bind (`reBind()`, `.bind()`, a bind after `destroy()`) also leaves an input's staged files alone while their reset controls `<input id>-<index>-reset-trigger` are on the page (#B990, `hasLiveStagedFiles`): it used to read the staged previews as saved files, so an image warned for a delete link the page never had, and a file shown without an image lost its entry, its reset then removing nothing (beside an image on a `multiple` input, removing the image instead) while the save still posted it; a container the page has replaced (a saved file shown after a save) is read again as before (tests `validator-upload-rebind-b990.test.js`, e2e `validator-upload-rebind-b990.spec.js`). Since 0.7.8 a name the staging answer does not give is never sent as « undefined » (#B1027): the preview node records a file's or a preview's `originalFilename` only when the answer carries one, so a `preview` without one (the guide's example shape) is left out of the reset's removal request and its `payload.files`, and a file the answer left unnamed is named by the browser file's name (test `validator-upload-unnamed-b1027.test.js`). Tests: `validator-upload-trigger-warning-b292.test.js` (pins, the function run from the source with a fake document, dist fidelity) and e2e `validator-upload-trigger-warning-b292.spec.js` (arms 01–09, controls 03/04/05/09; `B292_PREFIX_BUNDLE` for the red-first run). **The answer's `name` fills its field like every other key (#B962, 0.7.6):** the success fill skipped `name` whenever its field held a value, so an edit form that declares `<prefix>[i][name]` posted the saved file's name beside the new file's location and original filename, and a second staging on the same input posted the first staged file's name; a key the answer does not carry still leaves its field as it is (the uploads guide's documented staging answer has no `name`). Tests: `validator-upload-staged-name-b962.test.js` (the real fill loop on jsdom, comment-stripped source pins, dist fidelity) and e2e `validator-upload-staged-name-b962.spec.js` (controls C1–C3, N1–N2; `B962_PREFIX_BUNDLE` for the red-first run). **Generated hidden fields — the `preview` slot (#B459, 2026-09-08):** the client writes one hidden input per `mandatoryFields` entry (`name`, `group`, `originalFilename`, `ext`, `encoding`, `size`, `height`, `width`, `location`, `mime`, `preview`) into the real form, auto-creating any the form did not declare — and `preview` was auto-created like the others although its value is an OBJECT (`{location, uri, tmpUri, width, height}`), so a form declaring no `[preview][...]` sub-fields got a flat `<prefix>[i][preview]` input, the fill loop's shared assignment string-coerced the staging response's preview object into it, and the real form's submit posted the literal `[object Object]` — a GARBAGE-VALUED field, not an absent one, so a data audit keyed on the field's absence reads the opposite of the truth (key on the value). The trigger is a CONJUNCTION — an undeclared form AND a response carrying a `preview` key; with no key the skip clause fires and the flat input was removed, which is why the documented response shape (no `preview`) never showed it. Since #B459 the auto-create loop seeds that slot with an EMPTY sub-field map instead of an input — so the fill loop still visits the key (the nested thumbnail is rendered from inside it) and posts nothing for it, the documented field set — and the shared assignment never targets the preview slot. Declaring `<prefix>[i][preview][location|uri|width|height]` hidden inputs is the opt-in for persisting the preview: the name parser is last-bracket-only, nesting is decided by a separate `/\[preview\]/i` test on the full name, so declared sub-fields fill from the response's nested object and post as a real nested structure — unchanged by the fix. A deliberately declared FLAT `[preview]` input is filed under the map (`preview.preview`), never as the slot itself, so the coercion path had exactly one entrance. Server code that keyed on the PRESENCE of a `preview` field for an undeclared form must key on its value: garbage before, absent now. **#B791 (0.7.4) finished #B459 for EDIT forms:** #B459 fixed only the UNDECLARED case; a form DECLARING `[preview][*]` sub-fields still kept the REPLACED file's values when the replacement's staging response carried no (or a partial) `preview`, because the fill loop's skip branch removed the slot by `getElementById(.id)` — a no-op on the `.id`-less sub-field map. The skip branch now detects the slot by SHAPE (an element has a `tagName`, the map does not) and CLEARS every declared sub-field the response omits (the documented 'left empty' contract), with a matching pre-pass for a partial preview; flat `height`/`width` removal is unchanged. Browser-bundled ⇒ pickup is restart AND re-bake. Tests: `validator-upload-preview-clear-b791.test.js` (4: red arm + full/partial/flat controls, the extracted fill loop on jsdom) + `validator-upload-preview-slot.test.js` (11: source pins, the auto-create loop extracted from the shipped bytes and executed on jsdom forms, dist fidelity — 9/11 red-first through the `GINA_VALIDATOR_MAIN`/`GINA_PLUGIN_DIST` seams) + e2e `validator-upload-preview-fields.spec.js` (arm 02 red on the pre-fix bundle through its `B459_PREFIX_BUNDLE` route lever, both thumbnails pinned as the constraint). **Reset and delete act on the input's FILES, and the fields come back (#B858-#B862, 0.7.4):** the hidden `<prefix>[i][…]` fields are built for EVERY selection (since #B960 by its staging success, see above), not only when the input's virtual upload form is created — a reset removed them, so the next selection was staged and previewed but the save posted no file, and a larger re-selection got no fields for its new indices. A reset walks the input's staged files by index (the staging answer is kept on the input as `stagedFiles`), a delete walks the stored entries the bind-time scan recorded, and ONE removal request names every removed file (a reset is `POST {files}`; a delete with one name and no `-delete-method` is a body-less `DELETE`, else `POST {files}`); then each file's reset/delete link, preview node(s) and `<prefix>[i]…` fields go (`data-gina-form-upload-is-locked` fields stay). So a staged file with no `<img>` (a non-image without `preview`), an `<img>` inside a `<ul>` container's `<li>`, every file of a multi-file input (whose reset threw `InvalidStateError` setting the input's value to the files left) and the fields of a custom `data-gina-form-upload-prefix` (#B862: they were removed by the input's `name`) are all reached. A file node is an `<img>` child of the preview container or of its `<li>`, or ANY element carrying `data-upload-original-filename` — the opt-in for a stored file an edit form shows without an image (`<a data-upload-original-filename="cv.pdf" href="…">`, the attribute naming the file; an `<img>` without it is named by its `src` basename, as before). The removed fields — declared `[preview][*]` inputs included — are kept on the input and put back IN PLACE, emptied, by the next successful staging (at the selection before #B960) (an input the page re-added under the same name wins), so a replacement without a preview posts the declared preview sub-fields EMPTY (#B791's contract). #B861: the reset link id is `<input id>-<index>-reset-trigger` whatever the preview container's id (it was derived from the container's id, so a custom `data-gina-form-upload-preview` made the container itself the link and nothing was bound), the reset resolves the container the input names, and an input with no preview container no longer throws before its fields are filled. Any one reset or delete control still removes ALL of the input's files. Browser-bundled ⇒ RE-BAKE. Tests: `validator-upload-reset-reselect-b858.test.js` (22: source pins, the six helpers extracted from the shipped bytes and run on jsdom forms, dist pins; all red on the pre-fix bytes through `B858_VALIDATOR_SRC`/`B858_PLUGIN_DIST`) + e2e `validator-upload-reset-reselect-b858.spec.js` (18 arms; through `B858_PREFIX_BUNDLE` the four controls pass and the 14 others fail, on the pre-fix and on the published 0.7.3 bundle). Tests: `upload-binary-integrity.test.js` / `upload-size-accuracy.test.js` (11) / `multipart-multifile-resume.test.js` (15) / `upload-write-error-probe.test.js` / `upload-config.test.js §07` / `validator-upload-progress.test.js` (46) / `validator-upload-binary-wire.test.js` / `validator-upload-action-guard.test.js` — all red-first-validated with control-gated extractions of the shipped bytes. **The store() fluent form is restored (#B420, 0.6.16):** `self.store(target).onComplete(cb)` returns its `{onComplete}` handle synchronously as documented -- an accidental `async` on the declaration had wrapped the handle in a Promise on every stable from v0.6.0 to v0.6.15, so the fluent form (the upload guide entry-point example) threw `TypeError` while the 3-arg callback form worked throughout; the body was await-free, nothing anywhere awaits `store()`, and dropping the keyword is the whole fix (types now declare the fluent return shape). **Per-call since #B475 (2026-09-05):** the fluent handle used to register `self.on('uploaded', cb)` and never remove it, so a second `store()` on the same controller — sequential or overlapping — re-invoked every earlier `onComplete` callback with the later result; it now delivers through the callback path (`start(target, files, cb)`), one delivery per call, with the same arguments and the same synchronous timing on the empty-upload and released-response paths. The `'uploaded'` event no longer fires from `store()` at all: since #B475 the fluent form delivers through the callback, and since #B480 the fluent guard mints the handle for ANY non-function `cb` — `null` included, mirroring `query()`'s `typeof(callback) != 'function'` guard — so `store(target, files, null)` returns the handle instead of starting an upload whose outcome was emitted to nobody; `onComplete()` throws a `TypeError` synchronously when given a non-function (fail-fast at the caller rather than an uncaughtException inside an fs callback), and the seven unreachable `else emit('uploaded')` arms are removed together with the undocumented event (nothing in-tree ever listened to it, and it was never a `@fires`). **`query()`'s fluent `onComplete()` carries the same registration guard since #B485 (0.6.28)** — it minted a deliverer for any argument, so `.onComplete(null)` / `.onComplete('oops')` registered silently and the `TypeError` fired at settle INSIDE the delivery wrapper's own try/catch, surfacing as a misleading « Controller Query Exception while catching back » 500 that blamed the application callback (measured on a real instance — not the uncaughtException first assumed); now a `TypeError` naming `Controller::query` at the caller's line, the call-argument minting guard (`typeof(callback) != 'function'`) unchanged, so `query(options, data, null)` still returns the handle. The other 22 unguarded `onComplete` registration sites (connector `.then` shims, emitter-`once` helpers) are censused under #B491 — query()'s was the only one whose throw was swallowed. Test: `test/core/controller-store-null-callback.test.js` (9: source pins censused on a comment-stripped copy with raw-text controls, plus behavioural arms on a real instance, all red-first validated). **What a reset asks the server to remove (documented 2026-10-14):** a staged-file reset sends, by default, a `POST` of `{ files: [...] }` to the reset action (`data-gina-form-upload-reset-method` overrides the method; a `GET` or `DELETE` is sent with no body), naming each staged file by the `originalFilename` the staging answer returned, then its preview's `originalFilename`. A staging action that stores with `self.store()` finds the files under those names (`store()` publishes under the original name); one that stores them under other names, a generated one for instance, must map each `originalFilename` back to the stored file, or the staged file stays in its temporary directory after the reset. **A multipart upload that will not reach its action stops (#B1062, #B1061, #B1056, 0.7.8; #B1086, 0.7.9):** when its parse fails (answered 400), when its client goes away, when it sends more bytes than `maxFieldsSize` (answered 431 whatever its framing; on HTTP/1.1 the connection then closes, so a client still writing may read the close instead of the answer; on HTTP/2 the answer goes out whole, then the stream is closed with RST_STREAM(NO_ERROR) while the session keeps serving its other streams, and so do the 400 of a failed parse, the 413 past `server.maxBodySize` and, on Bun 1.2 / 1.3, the 431 sent before the body is read (#B1071, 0.7.9); before, the stream stayed open: one more stream window on Node.js and Bun 1.4, then a stall, and on Bun 1.2 / 1.3 everything the client sent, held in memory; on Bun, a request answered before its body is read (a `/_gina/*` control endpoint's refusal, the cross-origin write guard, the maintenance gate, a static file answered to a request that carries a body) has that body discarded and its stream closed with RST_STREAM(NO_ERROR) once the answer has gone out, and these stops discard what a client that never reads its answer (a zero receive window) keeps sending, so the bundle no longer holds it: Bun 1.2 / 1.3 held it without bound, Bun 1.4 held the client at the stream window (#B1076, 0.7.9; `core/server.isaac.early-answer.js`, armed only on Bun for an HTTP/2 request whose body may still come; Node.js and HTTP/1.1 unchanged)), or when gina refuses it while it parses (#B1086, 0.7.9: the 400s past `maxFields`, `maxTextFieldSize` and `maxTextFields`, for an unconfigured group, a disallowed extension and a second file in a single-file group, and the 500s of an upload directory that cannot be created, a write error and a multipart listener that throws; one helper, `stopRefusedMultipart()`, runs after each of these answers: it aborts the upload, pauses the request and, over HTTP/2, closes the stream with RST_STREAM(NO_ERROR) once the answer has gone out, so a client that never reads the answer (a zero receive window) is held at the stream window on Node.js and has what it sends discarded on Bun, where the #B1076 discard resumes the stream on purpose; the pause is load-bearing for the write stream's 500, which answers after the parser has stopped taking input: there Node.js's `unpipe()` runs the pipe's pending drain handler and resumes a request that still has a 'data' listener (the #B1056 byte counter, which drops every chunk once the upload is aborted), so without it such a client could push without limit; before, a refused file part was never read, so the parse waited on it while the client kept sending: Bun 1.2 / 1.3 held all of it in memory, Node.js and Bun 1.4 held the client at the stream window with the stream left open, and once the client finished, the parts staged before a refused file part or after a refused text field stayed on disk (Node.js, Bun 1.4); HTTP/1.1 answers are unchanged, the connection closing after them as before; tests `test/core/multipart-refusal-stop-b1086.test.js`, `test/integration/container-boot-h2-upload-refusal-b1086.test.js`), the request stops feeding the parser, each write stream closes and every file it staged is removed, finished parts included, and a write stream the stop destroys with its write in flight no longer answers a 500 over the HTML custom error page still being rendered for that stop (#B1075, 0.7.9); the normal end of an upload, where the request has ended and the parser has not, is not taken for one. Server-side ⇒ pickup is a bundle restart, no re-bake.
962
962
 
963
963
  211. **Request-body parsing contract — verbatim JSON, `req.rawBody`, and crash-safe decodes (consolidates former #162/#163/#164; #B28/#B30/#B64/#B588–#B592).** `application/json` bodies (POST/PUT/PATCH) parse VERBATIM first — `JSON.parse(request.body)`, with a `decodeURIComponent` fallback ONLY when that throws — so the client's exact types and string contents survive (no double-decode, no `"true"/"false"/"on"/"null"` coercion, no bracket-key expansion; error disposition unchanged — POST/PATCH 500 only when both attempts fail, PUT warns). **Urlencoded and unlabelled bodies follow the standard form algorithm (#B588/#B589/#B592, 0.6.33).** The POST/PUT/PATCH site hands the body over VERBATIM (only the content-type-gated `+`→space and a leading-`?` strip run there) and `formatDataFromString` splits on `&`, splits each pair at its FIRST `=`, then percent-decodes the name and the value exactly ONCE. Before, the body was decoded as a WHOLE — at the site and again in the helper — BEFORE that split, so an encoded `&`/`=` inside ONE value OR name became a separator that could ADD or OVERRIDE any other field (`role=user&bio=hi%26role%3Dadmin` → `role=admin`; a NAME carrying `%26role%3Dadmin` did the same), a raw `=` cut a value short (`a=b=c` → `b`), and a value was decoded up to four times (`100%2525` → `100%`). Now: a value leaning `{`/`[` is parsed as JSON when it parses — JSON carries its own types, so a quoted `"true"` INSIDE it stays a string (it was coerced) — and kept verbatim when it does not (it was dropped); a JSON value under a bracket key nests like any other value; bare `true`/`false`/`on`/`null` stay strings (they always did); raw quotes are kept (`Turn it "on"` no longer becomes `Turn it true`); a value-less segment is dropped and a repeated key keeps the last value (unchanged). The `"true"`/`"false"`/`"on"`/`"null"` casting is a DOCUMENT feature: it runs only when the whole input is a `{`/`[`-leading document or an object (stringified first — the browser validator's contract). A `[`-leading document gives an ARRAY (#B936/#B594, 0.7.5): an element that is an object is parsed like a document of its own, into its own object (bracket keys nest, the three prototype names dropped), and any other element is kept as it is; before, `parseCollection` handed every element the root array as its accumulator, so every slot held the array itself — a circular value, and a 500 from any route that rendered it (`inheritedData=[1]` as a GET's only parameter, a `[`-leading body not labelled `application/json`). A document is NEVER percent-decoded (#B589): the GET/HEAD re-parse used to decode the whole serialized query, so a value whose TEXT held `%22`/`%0A`/`%5C` made the document invalid and dropped EVERY query parameter (`req.get = {}`, and a `validator::` requirement copying that data answered 404); a fully `%7B`/`%5B`-encoded document is still decoded once. Isaac's query parser now decodes the NAME once as well (`+`→space first, as express's `qs` always did), so an HTML-form `user%5Bname%5D` still nests without the round-trip's accidental decode. A top-level `__proto__`/`constructor`/`prototype` name is dropped on both paths (#B592 — a JSON-valued `__proto__` swapped the PROTOTYPE of the parsed object); on DELETE, isaac's own query parser drops the three names too and `req.delete` is a plain copy holding the query's own keys (`copyOwnQueryKeys` in `core/server.js`; #B848, fixed in 0.7.4: the DELETE branch handed `request.query` over by reference, so a JSON-valued `__proto__` field re-pointed the prototype of `req.delete` on every DELETE to a path after the first — the routing loop copies the bag on a cold route only — and an injected `count`/`hasOwnProperty`/`toString` made the documented calls throw); a route declaring a DTO re-parses its validated payload through this helper, so a top-level `prototype` key in its JSON body is now dropped too, while a plain `application/json` body is parsed as-is and keeps it. Parse failures log metadata only, never the input and never `err.message` (a `JSON.parse` message can quote the input — V8 and JavaScriptCore both do): the helper's `[365]` line logs the input's length, its leading character and `err.name`, and isaac's not-JSON warn the parameter's name, the value's length and `err.name` (#B590). The helper ships in the browser bundle, so pickup is a restart AND a re-bake. Suites: `test/lib/request-parsing-b588.test.js`, `test/lib/request-parsing-logs-b590.test.js`, `test/integration/container-boot-request-parsing.test.js` (a real boot, red-first against the pre-fix tree). **XML bodies pass through VERBATIM (#FIN1).** `application/xml`, `text/xml` and the `application/*+xml` suffix family fork off the legacy path on POST/PUT/PATCH before any decode: `request.body` stays the exact document (the same string `rawBody` carries) and the method slot is left unset — the routing loop normalises it to `{}` further down, so a controller still reads an object from `req.post`. The framework never PARSES XML, so it takes on no XML-parser surface and no XXE exposure; consumers bring their own library. Pre-#FIN1 such a body was silently DESTROYED rather than rejected: the bracket-notation data helper splits on `&` then on `=` and keeps only the first pair, so an XML declaration alone collapsed a whole document to a single bogus key which — having a key — then REPLACED `request.body` at the shared tail, while the `"true"`/`"on"` coercion separately rewrote quoted attribute values. The matched set is the convergent one — ASP.NET Core registers ApplicationXml/TextXml/ApplicationAnyXmlSyntax (`application/*+xml`), Spring's `MimeType.includes()` documents `application/*+xml` as including `application/soap+xml`, and type-is matches structured suffixes generically — with the wildcard scoped to `application/` in all three, so `image/svg+xml` is deliberately NOT matched and RFC 7303's non-document types (`application/xml-dtd` §9.5, both `xml-external-parsed-entity` §9.3/§9.4) are excluded. RFC 7303 §9.6.1 registers the suffix but RFC 6838 §4.2.8 makes it a naming convention that does NOT mandate generic processing, so this set is convergent implementation practice, not a normative requirement. ONE flag computed at the request prologue feeds all three branches (the #B103 single-site lesson, after those same three sites drifted); each arm seeds `obj = {}` because the shared POST/PATCH tail reads `typeof(obj) == 'object' && ownCount(obj)` and `typeof null === 'object'`. Both engines share the chokepoint; server-side only, no dist rebuild. **#B546 (0.6.31) — that tail, and every other own-property count over a CLIENT-KEYED container, goes through a module-local `ownCount()` rather than `<container>.count()`.** gina installs `count()` on `Object.prototype`, so the shorthand is an ordinary property lookup that an OWN field of that name SHADOWS, and a request carrying a top-level `count` made the framework call a string: a 500 on the guarded body branches, and an uncaughtException that EXITED the bundle process on the UNGUARDED query ones — unauthenticated, one request, on ANY url including one matching no route, because this parse precedes routing (driven live both ways: every shape reproduced before the fix and answers cleanly after). `ownCount()` is that same helper reached as `Object.prototype.count.call()`, which no own property can shadow, plus an explicit null/undefined branch that PRESERVES the throw the `obj = {}` seeding above depends on — the bare `.call(null)` would bind `this` to the global object and return ITS key count (measured 23) instead of throwing. **#B837 (0.7.4) — the helper's own key test was shadowable too:** it counted with `this.hasOwnProperty(key)` inside a `try` whose `catch` returned the count so far, so a field named `hasOwnProperty` (an own key that is not a function) made every count over that container read 0 — GET and HEAD left `req.get` empty, DELETE left `req.delete` empty, POST and PATCH left `req.body` the raw string, all with no error — and an object with no prototype read 0 through `.call`. Both installed copies (`utils/prototypes.js`, which a bundle process runs, and `helpers/prototypes.js`, which the browser bundle carries) now test each key with `Object.prototype.hasOwnProperty.call(this, key)`, as do `functionCount()`, which threw on both shapes, and the validator's `is` rule, whose field scan answered « could not evaluate » when the data held such a field; pickup is a restart and a re-bake. Nested keys and near-misses (`counter`) were never affected. The framework's own server-to-server client (`self.query()`) sends raw `JSON.stringify(data)` for JSON bodies (RFC5987 value-encoding is for header values, not request bodies), and the inter-bundle HTTP/2 proxy no longer copies the INCOMING request's Content-Type onto the outbound JSON body it serialized itself — a urlencoded label re-routed raw JSON through the receiving parser's urlencoded branch and corrupted string values (the only incoming-CT→outbound copy framework-wide; kept for non-JSON bodies). `request.rawBody` snapshots the exact unparsed body (reference assignment, always-on, non-multipart only, `''` for empty) immediately BEFORE parsing mutates `request.body` — inbound-webhook HMAC verification needs the raw bytes, which middleware cannot recover after the stream drains; both engines share this single `core/server.js` pipeline. Malformed percent-escapes (`%`, `%zz`, truncated `%E0%A`) in a URL or query no longer kill the bundle (#B30 — an unauthenticated single-request DoS: any unguarded `decodeURIComponent` OR `decodeURI` on the request path threw `URIError` → uncaughtException → SIGTERM): redundant SECOND decodes on the GET/HEAD branches were DROPPED (the engine query parser decodes once, guarded — and since #B589 the data helper never percent-decodes the serialized query document at all), and every genuine first decode of attacker-controllable input routes through `safeDecodeURIComponent`/`safeDecodeURI` (try/decode/fallback-to-raw) — including the ERROR paths, where a malformed-% URL to a missing asset previously crashed FROM the error handler, turning a would-be 404 into a bundle kill. Sweep rule: `decodeURIComponent` and `decodeURI` are the same throwing family — sweep BOTH; fix the throw sites, never widen the uncaughtException net. Sibling #B64 (0.5.7): the two static-file resolvers confine the resolved filename to the matched mapping target (`path.resolve` both sides + separator-aware containment), so `../` / `%2F` / `%2e%2e` cannot escape to sibling files — an escape 404s exactly like a missing file. Second site, same guard (#B179, Security/CWE-22): the dev-mode Inspector SPA handler (`/_gina/inspector/*`) built its filename the same way — request target minus the prefix, joined onto the asset root, passed through the `_()` path helper — and `_()` calls `Path.normalize`, which **RESOLVES** `..` rather than rejecting it, so a literal `../` read any absolute path the bundle process could reach (verified live: 200 on `/etc/passwd`; encoded `%2e%2e` unaffected, since this handler never decodes — and decoding was deliberately not added). Node does not normalise the request-target (only clients do), so a raw HTTP client reaches it where a browser cannot. Unlike the static resolvers, this handler is **DUPLICATED per engine** (server.js + server.isaac.js) and `confineToBase` is scoped inside server.js's `Server()` closure — unreachable from isaac, which therefore declares an engine-local twin, pinned against drift by a test asserting both extracted copies agree. **Rule: any handler joining request-derived segments onto a base MUST confine the RESOLVED path; path normalisation is not a traversal defence, it is the mechanism that makes the escape land.** Corollary for endpoint families: check the SIBLING handlers' gating too — the Inspector endpoint carries no IP allowlist while its `/_gina/*` neighbours (`info`, `cache/stats`, `cache/clear`) all gate on `lib.admin.isClientAllowed`. **GET/HEAD query serialization no longer destroys escapes (#B407, consumer-reported):** both branches round-trip `request.query` through JSON.stringify + a re-parse, and the former textual nested-JSON unwrap ended with a blanket backslash strip over the WHOLE serialized document — so `%0A` in a value became the letter `n`, a backslash vanished, and a double quote OR a JSON-ARRAY value produced invalid JSON that silently dropped EVERY query param on the request (`parseBody` logs `[365]` and returns undefined). Both sites now serialize via `serializeQueryForReparse` (a shared inner helper in `processRequestData`): each own STRING value leaning `{`/`[` is unwrapped by PARSING it (kept verbatim when it does not parse — previously that shape also dropped the whole query), then a clean stringify with no post-processing; the whole-value `"true"/"false"/"on"/"null"` coercion is unchanged and, with escapes intact, can no longer match an escaped occurrence embedded inside a longer value. Intended behaviours preserved byte-for-byte (nested-object unwrap — now also correct for nested content carrying escapes, which the textual unwrap corrupted as well — coercion, plain values); array-valued and unparsable-`{`-leading params are delivered instead of killing the query. **PROTOTYPE-POLLUTION GUARD (#B446).** Every parse path that nests a bracket-notation key routes through `parseLocalObj` in `helpers/data` (aliased `nestBracketNotationKey`, and reached from `formatDataFromString`), which assigned `obj[key[k]]` from a CLIENT-SUPPLIED field name with no key filtering: `__proto__[x]=y`, `constructor[prototype][x]=y` and the percent-encoded `%5F%5Fproto%5F%5F[x]=y` each wrote to `Object.prototype` process-wide while the parsed body still read `{}` — i.e. SILENTLY. Reachable from the GET query string, urlencoded bodies, `inheritedData`, and multipart text-field names. ✅ **CONFIRMED LIVE over real HTTP on the DEFAULT `isaac` engine** (daemonless throwaway bundle, pre-fix worktree vs fixed tree, same fixture): a single unauthenticated `GET /?__proto__[polluted]=OWNED` — no body, no interaction — returned `polluted:"OWNED"` with `hasOwn:false` (the prototype-pollution signature, not an own property) and `arrayToo:"OWNED"`, and **the NEXT, innocent request inherited it at the same pid**, proving cross-request persistence. All three vectors reproduced; the fixed tree answered clean on all three with benign bracket nesting still HTTP 200. ⚠️ Isaac does NOT reference these functions at all — its own query parser is flat (`request.query[a[0]] = a[1]`); the attack survives because `server.js` re-serialises isaac's flat query (`serializeQueryForReparse`) and re-parses it through `formatDataFromString`, which restores the bracket branch. ⚠️ Instrument trap that nearly produced a FALSE NEGATIVE: `curl` treats `[...]` as a URL glob range, so every bracket request fails inside curl and never reaches the server — use `curl -g`. A second, independent source: PUT merges `JSON.parse` output as the merge SOURCE, and `JSON.parse` produces an OWN `__proto__` key, so an own-property check alone does NOT stop it — see #321. Measured gadgets before the fix: outbound-request options fully controllable (host/hostname/port/method/auth, `rejectUnauthorized` forced false, `protocol` feeding a dynamic transport require), `SAFE_HTTP_METHODS[m] === true` classifying POST as safe, and `req.routing.csrfExempt` reading true — the last two ONLY via the JSON source, since the string source yields `"true"` and is correctly rejected by the strict compare. ⚠️ The `csrfExempt` one is UNRESOLVED, not confirmed on a live route: what was measured is that a routing object LACKING an own `csrfExempt` reads the polluted value, but `core/server.js:7674` builds routes as `csrfExempt: routing[name].csrfExempt || false`, creating an OWN key that shadows the prototype — while `lib/routing/src/main.js:220` sets it only when already defined, so a route built there can lack it. Which construction path a live `req.routing` takes was NOT determined. Both sources now reject `__proto__` / `constructor` / `prototype` path segments and DROP the field rather than throwing (a throw on the parse path would turn one bad field into a 500). The guard is kept INLINE in `parseLocalObj`, not a closure helper, because `test/core/validator-send-formdata-nesting.test.js` extracts that function's source text and evals it standalone to pin client/server parity — a helper call is a ReferenceError there. `helpers/data` and the validator copy are both browser-bundled, so pickup is a bundle restart AND a re-bake. **#B591 (0.6.33):** `parseLocalObj` also carried a dead `obj = []` rebind for a numeric NON-LAST segment under a non-array container — the parent never saw it and the child slot it seeded was `null` — so `0[a]=1` threw a TypeError, and from the unguarded GET/HEAD `inheritedData` parse that EXITED the bundle (one unauthenticated request; measured exit 143). The rebind is gone in both copies: such a segment now creates a plain `{}` slot (`0[a]=1` → `{"0":{"a":"1"}}`), and no previously non-throwing result changed (every path through the rebind threw). **#B792 (0.7.4):** a SECOND null source survived #B591 — a JSON value (`a=[null]`, `a={"x":null}`) plants `null` in a slot a later bracket path then descends into, throwing the same way from the same unguarded GET/HEAD `inheritedData` site (one unauthenticated request → exit 143; rated HIGH, CVSS 7.5, GHSA to file at the cut). Both copies now replace a `null` slot with a fresh container (last-write-wins), like a string slot; a number or a boolean slot still ignores the nested field. Suites: `test/lib/bracket-nesting-b591.test.js` + `test/lib/bracket-nesting-null-slot-b792.test.js`. Regression suite: `test/lib/prototype-pollution-b446.test.js` (attack arms each paired with a benign control, pre/post A/B validated on extracted HEAD source). **#B596 (0.7.5):** a parent whose segments mix indexes and names nests to ONE object keyed by both, whatever the order: `a[0]=x&a[b]=y` and `a[b]=y&a[0]=x` both give `{"a":{"0":"x","b":"y"}}`, and a parent whose segments are all indexes stays an array. Before, a name reaching a level that already held an array was read as index 0 (`~~'b'`): a fresh `{}` replaced the first element and the name became an array property that JSON drops, so `items[0][id]=a0&items[1][id]=a1&items[selected]=a1` arrived as `{"items":[{},{"id":"a1"}]}`, silently, on every path (urlencoded and multipart bodies, the GET query, the browser submit, `send(FormData)`). Both copies now copy the array into an object (`Object.assign`) before descending, in one block kept byte-identical (pinned); `lib/multipart` `flatten()` round-trips such a parent. Suite: `test/lib/bracket-nesting-mixed-b596.test.js` + e2e `test/e2e/validator-mixed-bracket-keys-b596.spec.js`; pickup = restart AND re-bake. **#B793 (0.7.4):** the one call that runs this parse, `processRequestData()` in the request's `'end'` listener (core/server.js), now sits in a `try`. An exception thrown while the request data is parsed (the GET, HEAD and DELETE branches and the PUT tail hold no try of their own), or on the synchronous hand-off that follows it, is answered through the server-side `throwError()` as a 500 `Could not evaluate <METHOD> request data.` (JSON for an XHR/API request, the bundle's error page for an HTML one) with the incident ref and its pairing line, instead of reaching `uncaughtException` and ending the bundle; a `multipart/form-data` request never runs that call (Busboy's listeners build its fields) and is not covered by it. This is a net under the parse, not a second way to handle bad input: the rule above stands (fix the throw site), and each catch is logged at error level so that it is. Test: `test/integration/container-boot-parse-throw-b793.test.js` drives it on a booted bundle with test doubles over `formatDataFromString` and `Object.prototype.count`, since no known input throws there. **#B843 (0.7.4):** the multipart branch's own Busboy listeners (`'field'`, `'file'`, `'finish'`) never run that call, so #B793's guard does not cover them; they are now guarded separately by overriding `busboy.on` IN PLACE — the registration lines stay verbatim, so the #B92-adjacent / #B143 source pins (which `indexOf`/regex `busboy.on('field', function onMultipartField` etc.) still hold. A throw inside one answers the same 500 `Could not evaluate <METHOD> request data.` on EVERY supported Node version (driven for all three listeners on Node 22, 24, 25 and 26; on Express 5 and outside the local scope, where the wire and the error page carry the first line only, on Node 25); before, it reached `uncaughtException` and EXITED the bundle on Node 22 (engines floor `>= 22`), and on Node 24+ the outcome depended on the listener — `'field'`: the stream machinery forwarded it to busboy's `'error'` → `onBusboyError`, a MISLEADING 400 `Malformed multipart/form-data request` (the body is not malformed; a framework function threw), bundle alive; `'file'` (raised where the write stream is created): that 400, then the bundle EXITED; `'finish'`: no answer and the bundle EXITED. A genuinely malformed body still answers 400 via `onBusboyError`; the per-listener catch SWALLOWS (no rethrow), so on Node 24+ nothing is forwarded and `onBusboyError` cannot double-answer. Test: `test/integration/container-boot-multipart-throw-b843.test.js` (the `'field'` listener via the `nestBracketNotationKey` double; red-first on the pre-fix tree, green on Node 22/24/26). **#B844 (0.7.4):** the callbacks NESTED in a file part, which the `'file'` listener only registers, ran outside that wrap and now run under it: `writeStreams[index].on('error')`, `writeStreams[index].on('finish')`, the close callback it hands to `this.close(` (`onUploaded` — the hand-off of a request that carries a file runs from it, so the SAME hand-off exception was answered 500 without a file and ended the bundle with one), `file.on('end')` and the `autoTmpCleanupTimeout` timer's callback. Each is wrapped where it is registered (`guardMultipartListener(function …)`; the registration text is kept for the #B143 pins), and an exception raised in one is answered 500 `Could not evaluate <METHOD> request data.` when nothing has answered or taken the request yet, else logged with its stack (`[ busboy ] [ onListenerThrow ] not answered: …` — after the `'error'` handler's own 500, or in the timer); before, each ended the bundle on Node 22, 24, 25 and 26 (measured with test doubles that raise inside the framework's own statements; no real input is known). The guard's message line goes through `escapeLogControlChars` (an engine exception message quotes a property name as written, line feed included), and `delete busboy.on` before `request.pipe(busboy)` removes the override, so that pipe()'s own `'finish'` hook is not wrapped (a wrapped listener is not removed by unpipe). NOT wrapped: the line Transform's `_transform` / `_flush`. Tests: `test/integration/container-boot-multipart-nested-throw-b844.test.js` (the `'file'` and end-of-body listeners and the five callbacks, on a booted bundle) and `test/core/multipart-nested-guard-b844.test.js` (source pins, the guard run with stubs). Server-side only; restart the bundle, no re-bake.
964
964
 
965
- 212. **Structured (JSON) logging — `GINA_LOG_FORMAT=json` + per-request `requestId`/`durationMs` (consolidates former #152/#155; #M12a/#M12b).** The logger resolves its render format ONCE at init into `opt.format` (precedence `GINA_LOG_FORMAT=json|text` > `GINA_LOG_STDOUT` truthy ⇒ json > `text` default) BEFORE containers are cloned; a JSON line is `{ts, level, bundle, message, group, msg}` — `bundle`/`message` canonical, `group`/`msg` retained as additive back-compat aliases — and the raw `console.log` path honours the format too (otherwise JSON mode would interleave plain lines and break a collector); the `text` default keeps container logs byte-identical. Per-request `requestId` + `durationMs` ride JSON logs via a NARROW `AsyncLocalStorage` (`process.gina._reqALS`, parked on `process.gina` so it survives dev require-cache busting), gated on JSON logging ONLY (text renders no id field, so the ALS would be pure overhead — the text path stays byte-identical/zero-cost): the id resolver honours a SANITISED inbound `X-Request-Id` (`/^[\w.\-]{1,128}$/`, regenerate-on-violation kills log forging) else `crypto.randomUUID()`; the `.run({requestId, startMs})` wrap sits at `handle()` — NOT the request-entry handler — because the `request.on('end')` boundary between them loses async context while `handle()`'s awaits preserve it (the original body became `_handleDispatch`; `handle` is a thin wrapper); HTTP/2 gets per-stream scoping free via Node's per-stream compat `'request'` event, NOT `session.on('stream')`; the JSON-assembly sites read `getStore()` and add `requestId` + per-line `durationMs`, gracefully absent for CLI/boot/off-request logs. `.run()`, never `enterWith()` (enterWith bleeds sideways across siblings). **MS1 (2026-07-24, 0.5.25):** the same id is now PROPAGATED beyond the process — every `self.query()` outbound path (the file-download proxy + both the HTTP/1 and HTTP/2 inter-bundle clients) forwards it as `x-request-id` (sourced from the resolved `req._ginaReqId`, never a raw inbound header; a caller-set value always wins), and `server.js onRequest` ECHOES `X-Request-Id` back on every response — ungated / independent of `GINA_LOG_FORMAT` (the id is always-on even when the JSON-log field isn't) and guarded against an already-sent response — so one logical request stays correlatable as it fans out across bundles and a caller/LB/APM reads the id off the wire. `controller.js`/`server.js` are server-side → no dist rebuild; restart to apply. Tests: `test/core/request-id-propagation.test.js`. **The contextless `require('gina')` boundary + MQ-speaker transport resilience (moved here from the DTO entry that surfaced it; #B276/#B277 0.6.4, #B318 0.6.5, #B323 fixed post-0.6.5 — shipped 0.6.6 with the reconnect).** Importing gina outside a spawned bundle child has ALWAYS been an intended boundary (`index.mjs`'s own docblock states it; both published entries throw alike), but two defects sat on top of it. **(1) The throw was uncatchable and could HANG the process.** The logger is a load-time singleton whose default flows are `['default','mq']`, so `speaker.js` opens a TCP socket BEFORE the boot reaches its throw — and that socket kept the event loop alive (listener-CONTINGENT, measured both ways: nothing bound to the MQ port ⇒ ECONNREFUSED ⇒ exit 0, so the bug is invisible on a quiet machine and hangs with no output on one running bundles or in CI). Fixed by `client.unref()`: a logging transport must never be why a process stays alive. ⚠️ #B318: a THIRD state exists beyond connected/REFUSED — an UNREACHABLE host, where `unref()` covers the socket HANDLE but not the pending `TCPConnectWrap` REQUEST, which holds the loop by itself for the OS connect timeout (~75s on macOS); fixed with an unref'd connect deadline (2s default, `opt.mqConnectTimeout`) that `destroy(err)`s only while `client.connecting`. ⚠️ **That safety claim — "only while connecting" — is MEASURED FALSE and shipped a HIGH regression for one release (#B323):** `client.connecting` does NOT flip when the kernel completes the connect; it flips when the POLL phase runs `afterConnect` — and a timer fires in the TIMERS phase, which precedes poll. On any boot that blocks the event loop past the deadline (a bundle mount off a network filesystem — every Kubernetes-class start) the loop resumes, runs the OVERDUE deadline first, reads `connecting === true` on a connection the kernel established seconds ago, and destroys it; the bundle then logged NOWHERE for the rest of its life (the speaker dialled exactly once, ever). Measured both directions: a kernel-completed dial reads `connecting` TRUE at the timers phase and FALSE at the check phase; a black-holed one reads TRUE at both. The fix defers the verdict one phase — `setImmediate` INSIDE the deadline, so the read happens in the CHECK phase, after poll — a completed connect survives while a genuinely pending one still dies on schedule (#B318's no-hang contract intact). **Generalisable: a state flag written by an event-loop callback cannot be read from an EARLIER phase and treated as current** — `connecting`, `destroyed`, `readyState` and every `pending*` counter share the property, and a blocked loop is precisely what makes the stale read reachable; a timers-phase guard over I/O state wants a `setImmediate` (or the event itself), never a direct read. **The speaker also RECONNECTS (0.6.6):** `startMQSpeaker` returns a stable `{write}` transport FACADE (`mq/index.js` captures the return ONCE for the life of the process — without the indirection a replaced socket is unreachable); each dial builds its OWN `clientOptions` (the listener mints a fresh `sessionId` per connection and the handshake only fires while `clientOptions.sessionId` is unset — a shared object would make every reconnect skip its acknowledgement); `close` on the CURRENT socket (a `current !== client` guard keeps a superseded one from stacking a second connection) arms a capped unref'd backoff (`min(500 * 2^n, 30000)`, reset on connect). Unref'd is load-bearing BOTH ways: a short-lived CLI still exits while a long-lived bundle keeps retrying and HEALS if a listener appears later. The caller callback settles ONCE, the warn fires once per OUTAGE (not per retry), and frames are DROPPED while down — an unbounded queue behind an outage of unknown length is a memory leak, and the `default`/stdout flow carries the same lines regardless. ⚠️ The socket still CONNECTS — `unref` changes only whether it votes on process lifetime (consumer-verified against a live listener: the connected line still logs; "unref'd" is not "suppressed"). ⚠️ The workaround `GINA_LOG_STDOUT=true` does splice `mq` out of the flows but ALSO flips log format to JSON (measured) — a container logging-mode flag pressed into service as a don't-open-a-socket switch. **(2) The boundary's error now names the boundary** — the old message named an internal call (`setPath("gina.home", path): path cannot be empty`) because `getEnvVar` reads `process.gina` ONLY and is empty outside the CLI; it now routes the reader to `SuperController.createTestInstance()`, the supported way to exercise controller code without booting. ⛔ **Do NOT "fix" the boundary by extending the `getEnvVar → process.env` ladder to `gna.js`, nor by skipping the empty `setPath`** — REFUTED BY MEASUREMENT: satisfying that call merely defers the failure 8 lines to a bare-global `ReferenceError` (strictly less legible), and that `setPath` is the SOLE registration site for `gina.home` repo-wide (the SQLite connector and session store read it). Failing fast at the first detectable point is correct. Diagnostic instrument for the hang class: `process._getActiveRequests()` reports `TCPConnectWrap` while `_getActiveHandles()` shows only the unref'd Socket. Tests: `test/lib/logger-mq-speaker-resilience.test.js` (§01 deferral-ordering + reconnect-shape pins; §02 a child that blocks 3s right after the dial and must still deliver — red-first: pre-fix it lost the frame while the connection was ESTABLISHED, the defect's own signature; §03 a listener destroyed and rebound must be heard again; §04 the no-listener child still exits promptly) + `logger-mq-speaker-unref.test.js` (comment-stripped source pin — subtracting the fix left a bare existence pin GREEN against the commented-out line — + a behavioural arm with its own must-be-killed control). **Log redaction (#B433, 0.6.19):** every message is redacted BEFORE it is rendered and dispatched — inside the logger's `emit()`, the single pre-render point all 46 URL-bearing framework sites pass through (both engines, every render delegate, the CSRF filter; all levelled, none `console.log`), plus the raw `console.log` path — so stdout, the MQ speaker/`gina tail`, the file transport and the Inspector taps all receive the same masked line and a JSON line cannot be corrupted (the marker lands inside the message string). Configured per bundle in `settings.json > log.redact` `{enabled, defaults, secrets, patterns}`, ON by default: `defaults` = JWT · URL userinfo password · `Bearer`/`Basic` · named credential query keys (`token`, `access_token`, `api_key`, `secret`, `password`, `signature`, `otp`, …, key kept / value masked) · api-key headers — measured 0 false positives on 433k real log lines, ~1 µs per line, linear patterns; `secrets` = every value the secrets resolver substituted for a `${secret:KEY}` placeholder (settings, connectors, routing — one resolve point) masked verbatim, values < 8 chars skipped with a boot warn; `patterns` = consumer rules (regex source string → `[REDACTED]`, or `{pattern, flags, replacement, name}` with `$1` kept), `g` always enforced. Deliberately NOT a default: a bare long-hex path segment (a sha256 content-address key from storage and an opaque 64-hex credential are the same regex class — the consumer adds `(?<![0-9a-f])[0-9a-f]{64}(?![0-9a-f])` — anchored on the class, not `\b`, which never fires against a prefixed `key_<hex>` segment). Fail-closed: an unknown key, a non-boolean flag, an invalid or empty-matching pattern refuses the boot (a dropped rule is a leak). Installed by `core/config.js::loadBundleConfig` right after the bundle's `secrets.resolve()` — the earliest resolved point, so connector-init lines are already covered — via `console.setRedaction(block, {group, secrets: lib.secrets.getResolvedValues(conf)})`; state lives on the logger's persisted context (survives `refreshCore()`), keyed by bundle, UNION across bundles (one bundle enabling is enough in a merged process; a per-route `logUrl:false` flag was rejected by measurement — it cannot reach the second URL copy inside the #ERRREF error stack). The 404 ref line carries the URL twice in ONE record (prefix + the error's own message); both copies are masked. Restart to apply, no re-bake (server-side only). A per-route or per-site flag is NOT the extension point; the logger seam is. Error rendering (#B434, 0.6.19): an `Error` passed as a log argument renders via `util.inspect` — message, stack, own props, `[cause]` chain — at BOTH stdout writers (the levelled `write()`/`parse()` walk and the raw `console.log` `JSON.stringify` path each saw only ENUMERABLE own props, so a bare Error rendered `{}`), top-level and nested alike, realm-safe (`util.types.isNativeError` beside `instanceof`), and the rendered message still crosses the redaction seam (content is built in `write()`, redacted in `emit()`). Non-Error arguments render byte-identically to before. **Line-break safety in the text format (#B830, 0.7.4):** the levelled writer's string branch no longer rewrites a WRITTEN backslash + r/n/t into a control character — only a REAL CR/LF/TAB is handled (CR→LF, TAB kept), so a written `\n` stays literal text and cannot forge a log line (CWE-117); legitimate multi-line arguments (an Error, an err.stack string) are unchanged. `parse()` writes a logged object's keys and string values — a nested array, an array of pairs and a Buffer inside an array included — with their control characters as visible escapes through a module-private `escapeLogControlChars`: `\n`/`\r`/`\t`, else `\uXXXX`, over C0, DEL, C1 (U+007F–U+009F) and the line separators U+2028/U+2029. Framework sites that put a request value into a log or error message escape it AT THE SITE: the multipart upload field/group/extension messages, the static content-type lines, the POST/PUT/PATCH body-parse warns (the escaped `err.message`, not `err.stack`), the validator `isDate` and condition warns, the lib/routing placeholder warn, the render-swig template-name lines, the isaac engine.io message lines, the controller redirect notice and the « Ignoring message » lines. An isaac query string with no `=` that is not JSON is reported by its length and the error's name at warn (it used to print a stack quoting it). The error-DETAIL lines — the #ERRREF pairing lines of core/server.js, the core/controller/controller.js twin (3 sites), helpers/context.js `throwError` and lib/lane `ctx.error()`, plus the late-error lines — go through `escapeLogDetailKeepFrames`: every line's control characters are escaped and a REAL line feed is kept only before a line shaped like a stack frame (whitespace, `at`, whitespace, any text) or starting with `caused by:`, so an injected break becomes the visible `\n` while real stacks stay multi-line. ⛔ Do not replace it with a per-error message-boundary escape: the pairing line logs a client-passed stack WHOLE (#B670) and the controller's `errorObject.stack` is often a synthetic call-site — measured, that shape broke 51 tests. Accepted residual: a value crafted to look like a frame line still renders as one; a real line feed in a plain string argument still starts a new line; an Error logged by application code keeps its message as it is. **The redaction reads a message twice** (`redact.apply()`): the escapes are written BEFORE `emit()` redacts, and a visible escape ends in a word character where whitespace stood, so `\b`, a lookbehind and `\s` stopped matching and a multi-line secret was no longer found verbatim. A message holding a visible escape is therefore matched as written, then decoded (`decodeView()`: each escape read as the character it stands for, with an offset map); a span found decoded is masked in the text as written, a kept group (`$1`, `$&`, `$<name>`) is copied as written so no control character is written back, and the secret spans of the two readings are merged. The decoded reading only ADDS masks: the escapers leave the backslash alone, so a credential that itself holds a written backslash + n/r/t must still be found as written (a decoded-only reading printed it — measured). A message with no visible escape takes one `replace` per rule, as before. **#B834 — the decoded reading also reads the two quote escapes the object writers add to a string value** (backslash + double quote from the levelled writer and from `JSON.stringify` on the raw `console.log` path, backslash + single quote from the levelled writer): a resolved secret holding a quote, logged inside an object or through `console.log` (an object or an array), matched neither reading and printed in full; it is now masked, and the reading still only adds masks. **#B838 — the secret values are searched on every escape layer, whichever renderer wrote them.** Three more writers alter a value before `emit()` redacts: `JSON.stringify` (an object, an array or a key through `console.log`, or a JSON string the caller built) and `util.inspect` (an `Error`, on both paths) escape the BACKSLASH ITSELF — which the logger's object writer does not — and write control characters and lone surrogates in their own forms (`\b`, `\f`, `\u00XX`, `\xNN`, `\udXXX`); `util.inspect` also lays a value's line breaks out (a long string, over about 72 characters, is split after each line feed into separately quoted pieces joined by a quote, ` +` and a new line; a nested Error's message is indented after each line feed); and the levelled string path writes a carriage return as a line feed. A secret holding a backslash, a control character, a lone surrogate or a line break then matched neither reading and printed in full. `apply()` now reads the secret values (NOT the pattern rules, which keep their two readings) on the message as written, on its decoded reading, and on up to three layers of backslash escaping read back from each (`decodeEscapes()`: one scan, any `\xHH` / `\uHHHH`, an unknown escape left as written). Three, because the logger itself stacks two — an Error inside an object logged through `console.log` is inspected, then stringified — and a string the caller serialised adds one. A layer's offset map is built only when a secret is found on it, and a line that holds only the object writer's simple escapes is searched exactly as before. On the secret side `compileState()` tolerates LAYOUT only: a carriage return matches CR or LF, and a line feed may be followed by any run of whitespace, quotes and `+`; a value holding no line break compiles to the same literal source as before. ⛔ The two grammars stay separate: the object writer leaves the backslash alone, so a backslash before an escaped line feed is written `\\n` there, which `decodeView()` reads as a backslash and a line feed and `decodeEscapes()` as a written `\n`. Not masked, by rule: a value that is not written as its own characters (a Buffer's bytes, base64, URL-encoding, another serialiser's escapes); a value under more than three layers of escaping; and a secret that sits inside a longer string of more than 10,000 characters held by an `Error`, which `util.inspect` cuts (the head of a secret that IS the cut string is masked). Tests: `test/lib/logger-redact-renderers-b838.test.js` — every C0 and C1 character, lone surrogates, quote and backslash combinations and long multi-line values, in 54 value positions through the real logger, pinned as one exact table. Text-format behaviour changes: a written backslash + n/r/t is written as-is (pass a real line feed for a multi-line message); a multi-line string inside a logged object prints on one line (pass the Error itself to keep a multi-line stack); an error line writes a break that no stack frame follows as a visible `\n` (a 404 logs `Page not found: \n/path` on one line). JSON format: still one line per message; its `message` value follows the same changes. The two escapers are private per module — nine copies of the first (logger, server.js, server.isaac.js, controller.js, controller.render-swig.js, helpers/context.js where the pair sits inside `throwError`, lib/lane, lib/routing, form-validator.js), six of the second — compared byte for byte and over a code-point fuzz by `test/lib/log-escape-parity-b830.test.js`, which also keeps `decodeView()` in step with the escaped set. lib/routing and form-validator.js are browser-bundled, so the pickup is restart AND re-bake. Tests: `test/lib/logger-line-break-b830.test.js`, `test/lib/logger-redact-readings-b830.test.js`, `test/core/log-line-break-sites-b830.test.js` (one extract-and-run arm per site). **The `file` log sink — an IN-PROCESS transport, and the three defects that made it unusable (#B523/#B526–#B531, 0.6.30).** The opt-in `file` container connected to the MQ, received every line and wrote NOTHING: `setup()` was driven from `processProperties.bundles`, which `lib/logger/src/helper.js:125` fills only when `process.argv` matches `bundle:(start|stop|restart)` — while `core/gna.js:294` splices `process.argv` down to `[node, appPath]` in every bundle process loaded through the CLI, so that list is structurally always empty and no filename was ever assigned. Fixing the filename exposed what the dead sink had been hiding, measured on a live daemon topology: **(a)** the container dialled the MQ port at construction and ran `process.exit(0)` from its socket error handler, and in the daemon that dial happens BEFORE the daemon's own listener binds — so `gina start` died before "Framework ready" 3/3 whenever the flow was enabled, and a daemonless bundle exited with status 0 one second after boot; **(b)** the listener FORWARDS every speaker's line to every `writeToFile` session, so every process carrying the flow wrote EVERY bundle's lines into one shared per-host file (measured twice-over with two bundles) and built a full `Config` for a bundle it is not, which crashed `gina bundle:start` 3/3; **(c)** N processes appending to one file each kept their own rotation state and size counter, so rotation raced and lost lines silently. **The sink is therefore no longer MQ-coupled: it listens on the `logger#file` event `emit()` already raises for every flow, exactly like `containers/default`, and writes only the lines ITS OWN process logged.** No socket, no daemon dependency (it works under `gina-container` and in a container), no foreign `Config`, one writer per file. The file is named after the LOG GROUP — `<logdir>/<bundle>@<project>.log` — which is what makes "one writer" true; a group without `@` (the CLI's and the daemon's own `gina` lines) is not filed, matching the guard the old `write()` already applied. Records are written WITHOUT ANSI escapes, and `GINA_LOG_FORMAT=json` is honoured with the same line shape the stdout container writes. Rotation is configured under `rotate` in `~/.gina/user/extensions/logger/file/config.json` — the machine-level surface that also ENABLES the container (it reaches the container because `loadContainers()` merges `flowsOptions[flow]` over the logger options with override:true). Keys: `enabled` (default true), `when` (`daily`|null), `size` (default `10MB`), `count` (default 5), `maxAge` (e.g. `30d`, off). Mechanism is rename-then-reopen, never copy-then-truncate: the retired vendored rotator (MIT/Capriza, undeclared in either manifest so invisible to Socket and Dependabot, and unreachable — its `require` path resolved to a directory that does not exist) copied then truncated, losing every line appended during the copy window. ⚠️ The descriptor is opened SYNCHRONOUSLY and the stream wrapped over it: `createWriteStream(path)` opens asynchronously, so a burst of lines logged within one tick reaches a size trigger while the file does not exist on disk yet and the cascade's `renameSync` throws — measured with 60 lines in one tick. A size or age without an explicit unit is REFUSED, never guessed, and any invalid value disables rotation with a message naming key, value and consequence — reported THROUGH THE FLOWS (`process.emit('logger#'+flow, …)`, one payload per flow, which is what `emit()` itself does), never through raw `process.stdout.write`: under a daemon `lib/cmd/bundle/start.js` consumes the child's stdout and relays nothing after start, so the old raw-stdout refusal reached NOBODY (measured 0 in the daemon log, 0 at a tail client, 0 in the file, 0 in the CLI output). Logging continues either way. Two bounds stated honestly: bytes still queued when the process exits can be lost (`end()` is asynchronous, and making every write synchronous would let a full disk block the request loop), and a stream that stops draining past a 4 MB buffer drops lines with one warning per outage — the same posture the MQ speaker documents. ⚠️ **Generalisable trap that cost this arc most of its time: the repo-root `utils/prototypes.js` installs `Object.prototype.count` + `functionCount` and `Array.prototype.clone` + `inArray` ON REQUIRE, unguarded — so `typeof(anyObject.count)` is `'function'` for EVERY object including `{}`.** A `typeof(user.<key>) != 'undefined'` guard over a user-config object therefore hands the inherited METHOD back as the configured value — here `~~(function)` is 0 and rotation disabled itself reporting "count is undefined" on a valid default. ⛔ Do NOT cite or patch `helpers/prototypes.js:169`: it declares the same names, but its guard `typeof(Object.count) == 'undefined'` reads the INHERITED method once `utils/` has run (`Object` inherits through `Function.prototype`), so every declaration there is skipped — the trap defeats its own guard and that line is dead code. The properties are `enumerable: false`, so `Object.keys()` reports `[]` and `JSON.stringify` drops them, which is exactly why every probe read the key as ABSENT rather than as a function. ⚠️ An isolated repro is the CHEAPEST way to see this, not an impossible one — `node -e "require('./utils/prototypes.js'); console.log(typeof({}).count)"` prints `function` in a plain process with no framework and no invocation (control: without the require it prints `undefined`). What DOES false-negative is requiring the OTHER file: `helpers/prototypes.js` exports a constructor that must be CALLED, so a bare require of it installs nothing and reports every key absent — inside the framework tree too, which is why that probe reads like a legitimate in-context measurement. Pair any such probe with a known-positive control. ⚠️ **The same collision has a SECOND, REQUEST-FACING direction — #B546 (0.6.31):** the trap above is the framework READING a config key that the helper makes look present; the mirror is the framework CALLING `<container>.count()` on a container whose keys the CLIENT chooses (parsed body, query bag, route params, `req.files`, `self.query()` data, a routing rule's validator data, and `| length` on BOTH template engines). There an own field named `count` shadows the helper and the framework calls a string — see #211 for the impact and the `ownCount()` remedy, applied at 27 sites across `core/server.js`, `core/controller/controller.js` and the validator engine. Counts over FRAMEWORK-built objects (response headers, the routing table, config) deliberately keep the shorthand, and the helper itself stays on `Object.prototype` for application code. Use `Object.prototype.hasOwnProperty.call(obj, key)` for any own-key test over config in this framework, never `typeof` — the guard is name-independent, so it is right for all four names and any added later. The logger's object walk had the same shadowable count (#B832, 0.7.4): it now counts keys with `Object.keys` (until #B837 the `ownCount()` `.call` form read 0 on a null-prototype object or one with an own `hasOwnProperty` key, which dropped the commas), and a null-prototype object (`querystring.parse()`), an array element `{"toString": "x"}` or a Symbol no longer makes a log call throw in the caller. A String receiver is a third trap (#B846, 0.7.8): `count()` runs `JSON.parse(this)` first and, on text that is not JSON, returns `undefined` (the `utils/` copy) or 0 (the browser copy), so both `length` filters read a string's own `.length` (a primitive, a String object, a nunjucks SafeString) before they call it. Count a string with `.length`, never with `count()`. **#B524 (0.6.30) — `gina-container` applies the container preset ITSELF.** Unless `GINA_LOG_STDOUT` is already set, the launcher writes `process.env.GINA_LOG_STDOUT = 'true'` ABOVE its `utils/helper` require — that require initialises the launcher's OWN logger, and an unconfigured container was measured running TWO redialling speakers (launcher + bundle), each warning `ECONNREFUSED 127.0.0.1:8125` once and then dialling every ≤30 s for the life of the container — and the bundle inherits it through the spawn; `image:build` images inherit it for free, their entrypoint being `gina-init && exec gina-container`; since 0.7.5 `gina-init` applies the same preset to its own process (#B892), which had dialled `127.0.0.1:8125` once at every container start. It MUST be a raw `process.env` write (`setEnvVar()` populates `process.gina`, which the logger never reads). Explicit values win both ways, measured on isolated boots: `GINA_LOG_FORMAT=text` ⇒ coloured text with the dial still skipped; `GINA_LOG_STDOUT=false` ⇒ the pre-0.6.30 behaviour byte-for-byte. ⚠️ LAUNCHER topology only: a bundle started through a framework daemon (`gina start` → `bundle:start`) is untouched — there the MQ transport is what `gina tail` reads, and the daemon DISCARDS the bundle's own stdout after startup (`bundle/start.js` `if (isStarting) return;`), so the relay is the only path a runtime line has to an operator. **#B691 (0.7.1) — the one exception, during the boot itself:** the MQ listener keeps NO backlog (`listener.js` `report()` forwards each frame to the tails attached at that instant) and `gina tail` cannot ask for earlier frames, so a tail attached after the boot — the ordinary `bundle:start`-then-`tail` order, and a container init script that tails after starting — saw none of a bundle's boot-time lines, including the 0.7.0 `autoescape` and unanchored-`requirements` warnings. The startup watchdog now passes the bundle's warn-and-above boot lines on to the `bundle:start` client (so also to `bundle:restart`, which prints its start step): `warn`/`warning`, `error`/`err`, `crit` and `alert` (the logger renders the name the caller used, and recommends `warning`/`err`); `emerg` keeps its `aborted :(` path. The filter is `lib/cmd/bundle/inc/boot-lines.js`: it buffers by line across chunks, reads the level from the ANSI-stripped `[date] [level ][group]` header or from a JSON line's `level`, keeps a multi-line entry whole until its colour block closes (`format()` wraps the whole message in one), and caps a line and an entry at 64 KB. It runs after the `isStarting` guard and before the EADDRINUSE/emerg/started checks, so a warning comes before `started V(-.o)V`, which then sits on its own line; with no such line the output is byte-identical. A tail attached first still gets the lines, so they show twice there (accepted). Runtime lines stay the tail's. Pickup = a DAEMON restart (`framework:init` requires a command module once), not a `bundle:restart`. Tests: `test/lib/bundle-start-boot-lines.test.js`. That topology's JSON answer is the OTHER half of #B524: **`gina tail` renders one JSON object per line when its OWN logger's resolved format is `json`** (`GINA_LOG_FORMAT=json` on the tail process — the pod's environment reaches it; `lib/cmd/framework/tail.js` reads `console.getOptions().format`, the logger's single precedence rule, and routes BOTH render sites — the delayed-message replay and the live stream — through one `renderLine(pl)`; same `{ts, level, bundle, message, group, msg}` shape, NO `requestId`/`durationMs` because the relay payload is `{group, level, content}` only). Measured on a daemon-free relay scene (a real `MQListener` on an isolated port + a `gina-container` bundle booted with `GINA_LOG_STDOUT=false` so it speaks + `bin/cli tail`): format unset ⇒ 5 ANSI lines, 0 JSON; `json` ⇒ 5 JSON objects, 0 escapes, the tail's own connect lines included. ⛔ `GINA_LOG_STDOUT=true` is NOT the daemon topology's switch — it never reaches a daemon-spawned bundle's logger (#B532: `bin/cli:336` `filterArgs()` MOVES every `GINA_*` key out of `process.env` before `bundle/start.js:404` spawns with no `env:`, and the child's logger initialises at `gna.js:183` BEFORE the ctx mirror at `:276` restores them — so the tutorial's `GINA_LOG_FORMAT=json gina bundle:start` cannot reach the bundle either, and a daemon-topology JSON line can never carry `requestId` until that is fixed), and if it did reach the bundle it would silence the relay the tail reads.
965
+ 212. **Structured (JSON) logging — `GINA_LOG_FORMAT=json` + per-request `requestId`/`durationMs` (consolidates former #152/#155; #M12a/#M12b).** The logger resolves its render format ONCE at init into `opt.format` (precedence `GINA_LOG_FORMAT=json|text` > `GINA_LOG_STDOUT` truthy ⇒ json > `text` default) BEFORE containers are cloned; a JSON line is `{ts, level, bundle, message, group, msg}` — `bundle`/`message` canonical, `group`/`msg` retained as additive back-compat aliases — and the raw `console.log` path honours the format too (otherwise JSON mode would interleave plain lines and break a collector); the `text` default keeps container logs byte-identical. Per-request `requestId` + `durationMs` ride JSON logs via a NARROW `AsyncLocalStorage` (`process.gina._reqALS`, parked on `process.gina` so it survives dev require-cache busting), gated on JSON logging ONLY (text renders no id field, so the ALS would be pure overhead — the text path stays byte-identical/zero-cost): the id resolver honours a SANITISED inbound `X-Request-Id` (`/^[\w.\-]{1,128}$/`, regenerate-on-violation kills log forging) else `crypto.randomUUID()`; the `.run({requestId, startMs})` wrap sits at `handle()` — NOT the request-entry handler — because the `request.on('end')` boundary between them loses async context while `handle()`'s awaits preserve it (the original body became `_handleDispatch`; `handle` is a thin wrapper); HTTP/2 gets per-stream scoping free via Node's per-stream compat `'request'` event, NOT `session.on('stream')`; the JSON-assembly sites read `getStore()` and add `requestId` + per-line `durationMs`, gracefully absent for CLI/boot/off-request logs. `.run()`, never `enterWith()` (enterWith bleeds sideways across siblings). **MS1 (2026-07-24, 0.5.25):** the same id is now PROPAGATED beyond the process — every `self.query()` outbound path (the file-download proxy + both the HTTP/1 and HTTP/2 inter-bundle clients) forwards it as `x-request-id` (sourced from the resolved `req._ginaReqId`, never a raw inbound header; a caller-set value always wins), and `server.js onRequest` ECHOES `X-Request-Id` back on every response — ungated / independent of `GINA_LOG_FORMAT` (the id is always-on even when the JSON-log field isn't) and guarded against an already-sent response — so one logical request stays correlatable as it fans out across bundles and a caller/LB/APM reads the id off the wire. `controller.js`/`server.js` are server-side → no dist rebuild; restart to apply. Tests: `test/core/request-id-propagation.test.js`. **The contextless `require('gina')` boundary + MQ-speaker transport resilience (moved here from the DTO entry that surfaced it; #B276/#B277 0.6.4, #B318 0.6.5, #B323 fixed post-0.6.5 — shipped 0.6.6 with the reconnect).** Importing gina outside a spawned bundle child has ALWAYS been an intended boundary (`index.mjs`'s own docblock states it; both published entries throw alike), but two defects sat on top of it. **(1) The throw was uncatchable and could HANG the process.** The logger is a load-time singleton whose default flows are `['default','mq']`, so `speaker.js` opens a TCP socket BEFORE the boot reaches its throw — and that socket kept the event loop alive (listener-CONTINGENT, measured both ways: nothing bound to the MQ port ⇒ ECONNREFUSED ⇒ exit 0, so the bug is invisible on a quiet machine and hangs with no output on one running bundles or in CI). Fixed by `client.unref()`: a logging transport must never be why a process stays alive. ⚠️ #B318: a THIRD state exists beyond connected/REFUSED — an UNREACHABLE host, where `unref()` covers the socket HANDLE but not the pending `TCPConnectWrap` REQUEST, which holds the loop by itself for the OS connect timeout (~75s on macOS); fixed with an unref'd connect deadline (2s default, `opt.mqConnectTimeout`) that `destroy(err)`s only while `client.connecting`. ⚠️ **That safety claim — "only while connecting" — is MEASURED FALSE and shipped a HIGH regression for one release (#B323):** `client.connecting` does NOT flip when the kernel completes the connect; it flips when the POLL phase runs `afterConnect` — and a timer fires in the TIMERS phase, which precedes poll. On any boot that blocks the event loop past the deadline (a bundle mount off a network filesystem — every Kubernetes-class start) the loop resumes, runs the OVERDUE deadline first, reads `connecting === true` on a connection the kernel established seconds ago, and destroys it; the bundle then logged NOWHERE for the rest of its life (the speaker dialled exactly once, ever). Measured both directions: a kernel-completed dial reads `connecting` TRUE at the timers phase and FALSE at the check phase; a black-holed one reads TRUE at both. The fix defers the verdict one phase — `setImmediate` INSIDE the deadline, so the read happens in the CHECK phase, after poll — a completed connect survives while a genuinely pending one still dies on schedule (#B318's no-hang contract intact). **Generalisable: a state flag written by an event-loop callback cannot be read from an EARLIER phase and treated as current** — `connecting`, `destroyed`, `readyState` and every `pending*` counter share the property, and a blocked loop is precisely what makes the stale read reachable; a timers-phase guard over I/O state wants a `setImmediate` (or the event itself), never a direct read. **The speaker also RECONNECTS (0.6.6):** `startMQSpeaker` returns a stable `{write}` transport FACADE (`mq/index.js` captures the return ONCE for the life of the process — without the indirection a replaced socket is unreachable); each dial builds its OWN `clientOptions` (the listener mints a fresh `sessionId` per connection and the handshake only fires while `clientOptions.sessionId` is unset — a shared object would make every reconnect skip its acknowledgement); `close` on the CURRENT socket (a `current !== client` guard keeps a superseded one from stacking a second connection) arms a capped unref'd backoff (`min(500 * 2^n, 30000)`, reset on connect). Unref'd is load-bearing BOTH ways: a short-lived CLI still exits while a long-lived bundle keeps retrying and HEALS if a listener appears later. The caller callback settles ONCE, the warn fires once per OUTAGE (not per retry), and frames are DROPPED while down — an unbounded queue behind an outage of unknown length is a memory leak, and the `default`/stdout flow carries the same lines regardless. ⚠️ The socket still CONNECTS — `unref` changes only whether it votes on process lifetime (consumer-verified against a live listener: the connected line still logs; "unref'd" is not "suppressed"). ⚠️ The workaround `GINA_LOG_STDOUT=true` does splice `mq` out of the flows but ALSO flips log format to JSON (measured) — a container logging-mode flag pressed into service as a don't-open-a-socket switch. **(2) The boundary's error now names the boundary** — the old message named an internal call (`setPath("gina.home", path): path cannot be empty`) because `getEnvVar` reads `process.gina` ONLY and is empty outside the CLI; it now routes the reader to `SuperController.createTestInstance()`, the supported way to exercise controller code without booting. ⛔ **Do NOT "fix" the boundary by extending the `getEnvVar → process.env` ladder to `gna.js`, nor by skipping the empty `setPath`** — REFUTED BY MEASUREMENT: satisfying that call merely defers the failure 8 lines to a bare-global `ReferenceError` (strictly less legible), and that `setPath` is the SOLE registration site for `gina.home` repo-wide (the SQLite connector and session store read it). Failing fast at the first detectable point is correct. Diagnostic instrument for the hang class: `process._getActiveRequests()` reports `TCPConnectWrap` while `_getActiveHandles()` shows only the unref'd Socket. Tests: `test/lib/logger-mq-speaker-resilience.test.js` (§01 deferral-ordering + reconnect-shape pins; §02 a child that blocks 3s right after the dial and must still deliver — red-first: pre-fix it lost the frame while the connection was ESTABLISHED, the defect's own signature; §03 a listener destroyed and rebound must be heard again; §04 the no-listener child still exits promptly) + `logger-mq-speaker-unref.test.js` (comment-stripped source pin — subtracting the fix left a bare existence pin GREEN against the commented-out line — + a behavioural arm with its own must-be-killed control). **Log redaction (#B433, 0.6.19):** every message is redacted BEFORE it is rendered and dispatched — inside the logger's `emit()`, the single pre-render point all 46 URL-bearing framework sites pass through (both engines, every render delegate, the CSRF filter; all levelled, none `console.log`), plus the raw `console.log` path — so stdout, the MQ speaker/`gina tail`, the file transport and the Inspector taps all receive the same masked line and a JSON line cannot be corrupted (the marker lands inside the message string). Configured per bundle in `settings.json > log.redact` `{enabled, defaults, secrets, patterns}`, ON by default: `defaults` = JWT · URL userinfo password · `Bearer`/`Basic` · named credential query keys (`token`, `access_token`, `api_key`, `secret`, `password`, `signature`, `otp`, …, key kept / value masked) · api-key headers — measured 0 false positives on 433k real log lines, ~1 µs per line, linear patterns; `secrets` = every value the secrets resolver substituted for a `${secret:KEY}` placeholder (settings, connectors, routing — one resolve point) masked verbatim, values < 8 chars skipped with a boot warn; `patterns` = consumer rules (regex source string → `[REDACTED]`, or `{pattern, flags, replacement, name}` with `$1` kept), `g` always enforced. Deliberately NOT a default: a bare long-hex path segment (a sha256 content-address key from storage and an opaque 64-hex credential are the same regex class — the consumer adds `(?<![0-9a-f])[0-9a-f]{64}(?![0-9a-f])` — anchored on the class, not `\b`, which never fires against a prefixed `key_<hex>` segment). Fail-closed: an unknown key, a non-boolean flag, an invalid or empty-matching pattern refuses the boot (a dropped rule is a leak). Installed by `core/config.js::loadBundleConfig` right after the bundle's `secrets.resolve()` — the earliest resolved point, so connector-init lines are already covered — via `console.setRedaction(block, {group, secrets: lib.secrets.getResolvedValues(conf)})`; state lives on the logger's persisted context (survives `refreshCore()`), keyed by bundle, UNION across bundles (one bundle enabling is enough in a merged process; a per-route `logUrl:false` flag was rejected by measurement — it cannot reach the second URL copy inside the #ERRREF error stack). The 404 ref line carries the URL twice in ONE record (prefix + the error's own message); both copies are masked. Restart to apply, no re-bake (server-side only). A per-route or per-site flag is NOT the extension point; the logger seam is. Error rendering (#B434, 0.6.19): an `Error` passed as a log argument renders via `util.inspect` — message, stack, own props, `[cause]` chain — at BOTH stdout writers (the levelled `write()`/`parse()` walk and the raw `console.log` `JSON.stringify` path each saw only ENUMERABLE own props, so a bare Error rendered `{}`), top-level and nested alike, realm-safe (`util.types.isNativeError` beside `instanceof`), and the rendered message still crosses the redaction seam (content is built in `write()`, redacted in `emit()`). Non-Error arguments render byte-identically to before. **Line-break safety in the text format (#B830, 0.7.4):** the levelled writer's string branch no longer rewrites a WRITTEN backslash + r/n/t into a control character — only a REAL CR/LF/TAB is handled (CR→LF, TAB kept), so a written `\n` stays literal text and cannot forge a log line (CWE-117); legitimate multi-line arguments (an Error, an err.stack string) are unchanged. `parse()` writes a logged object's keys and string values — a nested array, an array of pairs and a Buffer inside an array included — with their control characters as visible escapes through a module-private `escapeLogControlChars`: `\n`/`\r`/`\t`, else `\uXXXX`, over C0, DEL, C1 (U+007F–U+009F) and the line separators U+2028/U+2029. Framework sites that put a request value into a log or error message escape it AT THE SITE: the multipart upload field/group/extension messages, the static content-type lines, the POST/PUT/PATCH body-parse warns (the escaped `err.message`, not `err.stack`), the validator `isDate` and condition warns, the lib/routing placeholder warn, the render-swig template-name lines, the isaac engine.io message lines, the controller redirect notice and the « Ignoring message » lines. An isaac query string with no `=` that is not JSON is reported by its length and the error's name at warn (it used to print a stack quoting it). The error-DETAIL lines — the #ERRREF pairing lines of core/server.js, the core/controller/controller.js twin (3 sites), helpers/context.js `throwError` and lib/lane `ctx.error()`, plus the late-error lines — go through `escapeLogDetailKeepFrames`: every line's control characters are escaped and a REAL line feed is kept only before a line shaped like a stack frame (whitespace, `at`, whitespace, any text) or starting with `caused by:`, so an injected break becomes the visible `\n` while real stacks stay multi-line. ⛔ Do not replace it with a per-error message-boundary escape: the pairing line logs a client-passed stack WHOLE (#B670) and the controller's `errorObject.stack` is often a synthetic call-site — measured, that shape broke 51 tests. Accepted residual: a value crafted to look like a frame line still renders as one; a real line feed in a plain string argument still starts a new line; an Error logged by application code keeps its message as it is. **The redaction reads a message twice** (`redact.apply()`): the escapes are written BEFORE `emit()` redacts, and a visible escape ends in a word character where whitespace stood, so `\b`, a lookbehind and `\s` stopped matching and a multi-line secret was no longer found verbatim. A message holding a visible escape is therefore matched as written, then decoded (`decodeView()`: each escape read as the character it stands for, with an offset map); a span found decoded is masked in the text as written, a kept group (`$1`, `$&`, `$<name>`) is copied as written so no control character is written back, and the secret spans of the two readings are merged. The decoded reading only ADDS masks: the escapers leave the backslash alone, so a credential that itself holds a written backslash + n/r/t must still be found as written (a decoded-only reading printed it — measured). A message with no visible escape takes one `replace` per rule, as before. **#B834 — the decoded reading also reads the two quote escapes the object writers add to a string value** (backslash + double quote from the levelled writer and from `JSON.stringify` on the raw `console.log` path, backslash + single quote from the levelled writer): a resolved secret holding a quote, logged inside an object or through `console.log` (an object or an array), matched neither reading and printed in full; it is now masked, and the reading still only adds masks. **#B838 — the secret values are searched on every escape layer, whichever renderer wrote them.** Three more writers alter a value before `emit()` redacts: `JSON.stringify` (an object, an array or a key through `console.log`, or a JSON string the caller built) and `util.inspect` (an `Error`, on both paths) escape the BACKSLASH ITSELF — which the logger's object writer does not — and write control characters and lone surrogates in their own forms (`\b`, `\f`, `\u00XX`, `\xNN`, `\udXXX`); `util.inspect` also lays a value's line breaks out (a long string, over about 72 characters, is split after each line feed into separately quoted pieces joined by a quote, ` +` and a new line; a nested Error's message is indented after each line feed); and the levelled string path writes a carriage return as a line feed. A secret holding a backslash, a control character, a lone surrogate or a line break then matched neither reading and printed in full. `apply()` now reads the secret values (NOT the pattern rules, which keep their two readings) on the message as written, on its decoded reading, and on up to three layers of backslash escaping read back from each (`decodeEscapes()`: one scan, any `\xHH` / `\uHHHH`, an unknown escape left as written). Three, because the logger itself stacks two — an Error inside an object logged through `console.log` is inspected, then stringified — and a string the caller serialised adds one. A layer's offset map is built only when a secret is found on it, and a line that holds only the object writer's simple escapes is searched exactly as before. On the secret side `compileState()` tolerates LAYOUT only: a carriage return matches CR or LF, and a line feed may be followed by any run of whitespace, quotes and `+`; a value holding no line break compiles to the same literal source as before. ⛔ The two grammars stay separate: the object writer leaves the backslash alone, so a backslash before an escaped line feed is written `\\n` there, which `decodeView()` reads as a backslash and a line feed and `decodeEscapes()` as a written `\n`. Not masked, by rule: a value that is not written as its own characters (a Buffer's bytes, base64, URL-encoding, another serialiser's escapes); a value under more than three layers of escaping; and a secret that sits inside a longer string of more than 10,000 characters held by an `Error`, which `util.inspect` cuts (the head of a secret that IS the cut string is masked). Tests: `test/lib/logger-redact-renderers-b838.test.js` — every C0 and C1 character, lone surrogates, quote and backslash combinations and long multi-line values, in 54 value positions through the real logger, pinned as one exact table. Text-format behaviour changes: a written backslash + n/r/t is written as-is (pass a real line feed for a multi-line message); a multi-line string inside a logged object prints on one line (pass the Error itself to keep a multi-line stack); an error line writes a break that no stack frame follows as a visible `\n` (a 404 logs `Page not found: \n/path` on one line). JSON format: still one line per message; its `message` value follows the same changes. The two escapers are private per module — nine copies of the first (logger, server.js, server.isaac.js, controller.js, controller.render-swig.js, helpers/context.js where the pair sits inside `throwError`, lib/lane, lib/routing, form-validator.js), six of the second — compared byte for byte and over a code-point fuzz by `test/lib/log-escape-parity-b830.test.js`, which also keeps `decodeView()` in step with the escaped set. lib/routing and form-validator.js are browser-bundled, so the pickup is restart AND re-bake. Tests: `test/lib/logger-line-break-b830.test.js`, `test/lib/logger-redact-readings-b830.test.js`, `test/core/log-line-break-sites-b830.test.js` (one extract-and-run arm per site). **The `file` log sink — an IN-PROCESS transport, and the three defects that made it unusable (#B523/#B526–#B531, 0.6.30).** The opt-in `file` container connected to the MQ, received every line and wrote NOTHING: `setup()` was driven from `processProperties.bundles`, which `lib/logger/src/helper.js:125` fills only when `process.argv` matches `bundle:(start|stop|restart)` — while `core/gna.js:294` splices `process.argv` down to `[node, appPath]` in every bundle process loaded through the CLI, so that list is structurally always empty and no filename was ever assigned. Fixing the filename exposed what the dead sink had been hiding, measured on a live daemon topology: **(a)** the container dialled the MQ port at construction and ran `process.exit(0)` from its socket error handler, and in the daemon that dial happens BEFORE the daemon's own listener binds — so `gina start` died before "Framework ready" 3/3 whenever the flow was enabled, and a daemonless bundle exited with status 0 one second after boot; **(b)** the listener FORWARDS every speaker's line to every `writeToFile` session, so every process carrying the flow wrote EVERY bundle's lines into one shared per-host file (measured twice-over with two bundles) and built a full `Config` for a bundle it is not, which crashed `gina bundle:start` 3/3; **(c)** N processes appending to one file each kept their own rotation state and size counter, so rotation raced and lost lines silently. **The sink is therefore no longer MQ-coupled: it listens on the `logger#file` event `emit()` already raises for every flow, exactly like `containers/default`, and writes only the lines ITS OWN process logged.** No socket, no daemon dependency (it works under `gina-container` and in a container), no foreign `Config`, one writer per file. The file is named after the LOG GROUP — `<logdir>/<bundle>@<project>.log` — which is what makes "one writer" true; a group without `@` (the CLI's and the daemon's own `gina` lines) is not filed, matching the guard the old `write()` already applied. Records are written WITHOUT ANSI escapes, and `GINA_LOG_FORMAT=json` is honoured with the same line shape the stdout container writes. Rotation is configured under `rotate` in `~/.gina/user/extensions/logger/file/config.json` — the machine-level surface that also ENABLES the container (it reaches the container because `loadContainers()` merges `flowsOptions[flow]` over the logger options with override:true). Keys: `enabled` (default true), `when` (`daily`|null), `size` (default `10MB`), `count` (default 5), `maxAge` (e.g. `30d`, off). Mechanism is rename-then-reopen, never copy-then-truncate: the retired vendored rotator (MIT/Capriza, undeclared in either manifest so invisible to Socket and Dependabot, and unreachable — its `require` path resolved to a directory that does not exist) copied then truncated, losing every line appended during the copy window. ⚠️ The descriptor is opened SYNCHRONOUSLY and the stream wrapped over it: `createWriteStream(path)` opens asynchronously, so a burst of lines logged within one tick reaches a size trigger while the file does not exist on disk yet and the cascade's `renameSync` throws — measured with 60 lines in one tick. A size or age without an explicit unit is REFUSED, never guessed, and any invalid value disables rotation with a message naming key, value and consequence — reported THROUGH THE FLOWS (`process.emit('logger#'+flow, …)`, one payload per flow, which is what `emit()` itself does), never through raw `process.stdout.write`: under a daemon `lib/cmd/bundle/start.js` consumes the child's stdout and relays nothing after start, so the old raw-stdout refusal reached NOBODY (measured 0 in the daemon log, 0 at a tail client, 0 in the file, 0 in the CLI output). Logging continues either way. Two bounds stated honestly: bytes still queued when the process exits can be lost (`end()` is asynchronous, and making every write synchronous would let a full disk block the request loop), and a stream that stops draining past a 4 MB buffer drops lines with one warning per outage — the same posture the MQ speaker documents. ⚠️ **Generalisable trap that cost this arc most of its time: the repo-root `utils/prototypes.js` installs `Object.prototype.count` + `functionCount` and `Array.prototype.clone` + `inArray` ON REQUIRE, unguarded — so `typeof(anyObject.count)` is `'function'` for EVERY object including `{}`.** A `typeof(user.<key>) != 'undefined'` guard over a user-config object therefore hands the inherited METHOD back as the configured value — here `~~(function)` is 0 and rotation disabled itself reporting "count is undefined" on a valid default. ⛔ Do NOT cite or patch `helpers/prototypes.js:169`: it declares the same names, but its guard `typeof(Object.count) == 'undefined'` reads the INHERITED method once `utils/` has run (`Object` inherits through `Function.prototype`), so every declaration there is skipped — the trap defeats its own guard and that line is dead code. The properties are `enumerable: false`, so `Object.keys()` reports `[]` and `JSON.stringify` drops them, which is exactly why every probe read the key as ABSENT rather than as a function. ⚠️ An isolated repro is the CHEAPEST way to see this, not an impossible one — `node -e "require('./utils/prototypes.js'); console.log(typeof({}).count)"` prints `function` in a plain process with no framework and no invocation (control: without the require it prints `undefined`). What DOES false-negative is requiring the OTHER file: `helpers/prototypes.js` exports a constructor that must be CALLED, so a bare require of it installs nothing and reports every key absent — inside the framework tree too, which is why that probe reads like a legitimate in-context measurement. Pair any such probe with a known-positive control. ⚠️ **The same collision has a SECOND, REQUEST-FACING direction — #B546 (0.6.31):** the trap above is the framework READING a config key that the helper makes look present; the mirror is the framework CALLING `<container>.count()` on a container whose keys the CLIENT chooses (parsed body, query bag, route params, `req.files`, `self.query()` data, a routing rule's validator data, and `| length` on BOTH template engines). There an own field named `count` shadows the helper and the framework calls a string — see #211 for the impact and the `ownCount()` remedy, applied at 27 sites across `core/server.js`, `core/controller/controller.js` and the validator engine. Counts over FRAMEWORK-built objects (response headers, the routing table, config) deliberately keep the shorthand, and the helper itself stays on `Object.prototype` for application code. Use `Object.prototype.hasOwnProperty.call(obj, key)` for any own-key test over config in this framework, never `typeof` — the guard is name-independent, so it is right for all four names and any added later. The logger's object walk had the same shadowable count (#B832, 0.7.4): it now counts keys with `Object.keys` (until #B837 the `ownCount()` `.call` form read 0 on a null-prototype object or one with an own `hasOwnProperty` key, which dropped the commas), and a null-prototype object (`querystring.parse()`), an array element `{"toString": "x"}` or a Symbol no longer makes a log call throw in the caller. A String receiver is a third trap (#B846, 0.7.8): `count()` runs `JSON.parse(this)` first and, on text that is not JSON, returns `undefined` (the `utils/` copy) or 0 (the browser copy), so both `length` filters read a string's own `.length` (a primitive, a String object, a nunjucks SafeString) before they call it. Count a string with `.length`, never with `count()`. **#B524 (0.6.30) — `gina-container` applies the container preset ITSELF.** Unless `GINA_LOG_STDOUT` is already set, the launcher writes `process.env.GINA_LOG_STDOUT = 'true'` ABOVE its `utils/helper` require — that require initialises the launcher's OWN logger, and an unconfigured container was measured running TWO redialling speakers (launcher + bundle), each warning `ECONNREFUSED 127.0.0.1:8125` once and then dialling every ≤30 s for the life of the container — and the bundle inherits it through the spawn; `image:build` images inherit it for free, their entrypoint being `gina-init && exec gina-container`; since 0.7.5 `gina-init` applies the same preset to its own process (#B892), which had dialled `127.0.0.1:8125` once at every container start. It MUST be a raw `process.env` write (`setEnvVar()` populates `process.gina`, which the logger never reads). Explicit values win both ways, measured on isolated boots: `GINA_LOG_FORMAT=text` ⇒ coloured text with the dial still skipped; `GINA_LOG_STDOUT=false` ⇒ the pre-0.6.30 behaviour byte-for-byte. ⚠️ LAUNCHER topology only: a bundle started through a framework daemon (`gina start` → `bundle:start`) is untouched — there the MQ transport is what `gina tail` reads, and the daemon DISCARDS the bundle's own stdout after startup (`bundle/start.js` `if (isStarting) return;`), so the relay is the only path a runtime line has to an operator. **#B691 (0.7.1) — the one exception, during the boot itself:** the MQ listener keeps NO backlog (`listener.js` `report()` forwards each frame to the tails attached at that instant) and `gina tail` cannot ask for earlier frames, so a tail attached after the boot — the ordinary `bundle:start`-then-`tail` order, and a container init script that tails after starting — saw none of a bundle's boot-time lines, including the 0.7.0 `autoescape` and unanchored-`requirements` warnings. The startup watchdog now passes the bundle's warn-and-above boot lines on to the `bundle:start` client (so also to `bundle:restart`, which prints its start step): `warn`/`warning`, `error`/`err`, `crit` and `alert` (the logger renders the name the caller used, and recommends `warning`/`err`); `emerg` keeps its `aborted :(` path. The filter is `lib/cmd/bundle/inc/boot-lines.js`: it buffers by line across chunks, reads the level from the ANSI-stripped `[date] [level ][group]` header or from a JSON line's `level`, keeps a multi-line entry whole until its colour block closes (`format()` wraps the whole message in one), and caps a line and an entry at 64 KB. It runs after the `isStarting` guard and before the EADDRINUSE/emerg/started checks, so a warning comes before `started V(-.o)V`, which then sits on its own line; with no such line the output is byte-identical. A tail attached first still gets the lines, so they show twice there (accepted). Runtime lines stay the tail's. Pickup = a DAEMON restart (`framework:init` requires a command module once), not a `bundle:restart`. Tests: `test/lib/bundle-start-boot-lines.test.js`. That topology's JSON answer is the OTHER half of #B524: **`gina tail` renders one JSON object per line when its OWN logger's resolved format is `json`** (`GINA_LOG_FORMAT=json` on the tail process — the pod's environment reaches it; `lib/cmd/framework/tail.js` reads `console.getOptions().format`, the logger's single precedence rule, and routes BOTH render sites — the delayed-message replay and the live stream — through one `renderLine(pl)`; same `{ts, level, bundle, message, group, msg}` shape, NO `requestId`/`durationMs` because the relay payload is `{group, level, content}` only). Measured on a daemon-free relay scene (a real `MQListener` on an isolated port + a `gina-container` bundle booted with `GINA_LOG_STDOUT=false` so it speaks + `bin/cli tail`): format unset ⇒ 5 ANSI lines, 0 JSON; `json` ⇒ 5 JSON objects, 0 escapes, the tail's own connect lines included. ⛔ `GINA_LOG_STDOUT=true` is NOT the daemon topology's switch — it never reaches a daemon-spawned bundle's logger (#B532: `bin/cli:336` `filterArgs()` MOVES every `GINA_*` key out of `process.env` before `bundle/start.js:404` spawns with no `env:`, and the child's logger initialises at `gna.js:183` BEFORE the ctx mirror at `:276` restores them — so the tutorial's `GINA_LOG_FORMAT=json gina bundle:start` cannot reach the bundle either, and a daemon-topology JSON line can never carry `requestId` until that is fixed), and if it did reach the bundle it would silence the relay the tail reads. **Request-entry line (0.7.10, opt-in):** `settings.json > server.logRequestStart: true` (only the boolean, read once at boot) makes each application request write `METHOD [>] /path [ req <id> ]` at info as the first step of `core/server.js`'s non-static branch, BEFORE the body is read: `handle()`, which opens the `_reqALS` store, runs only after the body parse and merge, and a request that blocks there (a slow body merge, a synchronous action or render) would leave no line. Both engines reach that branch; the health route, the other `/_gina/*` endpoints, static files and maintenance answers are given before it and write no line, nor does a page the isaac in-memory render cache serves. The path holds no query string there on either engine and goes through the #B830 control-character escape; the id is the request's correlation id (a sanitised inbound `X-Request-Id`, else the generated UUID the answer echoes). In JSON mode the log call runs inside a `_reqALS.run({ requestId, startMs })` scoped to that one synchronous call, so the line carries `requestId`/`durationMs`; text mode enters no store. Like every logger message it ends with a space.
966
966
 
967
- 213. **Client-plugin discipline — CSP-safe listeners, native-dialog parity, preload coalescing (consolidates former #149/#159/#200).** (1) Client-bundle plugins must NOT inject inline event-handler attributes (`setAttribute('onclick', …)`, `el.onX = …`) — they trip CSP `script-src-attr` under nonce-based policies; suppress defaults with `addEventListener('click', e => e.preventDefault())`, and keep it `preventDefault`-ONLY (no stopPropagation) when the element participates in event delegation other handlers depend on — a `preventDefault`-only listener still sets `event.defaultPrevented` exactly as the inline handler did. (2) Dialog popins open as native modals (`$el.showModal()`) in EVERY env — the dev-only non-modal downgrade + manual overlay are gone for dialog mode (native `::backdrop`); a consumer that PRE-OPENS the dialog (skeleton loading) must also use `showModal()` or it is born non-modal with nothing positioning it; the opt-in `preOpen`/`loadingShell` skeleton is idempotent via `hasAttribute('open')` — NOT getAttribute truthiness, because `showModal()` sets `open` to the EMPTY string — and since #B574 (2026-09-20) `popinOpen`'s own re-entry guard reads the same `hasAttribute('open')`: it read getAttribute truthiness, never skipped a shell-opened dialog, and on the new trigger's default MODELESS resolution called `show()` on the still-modal shell, which throws `InvalidStateError` and left `isOpen` false on a visibly open popin; a native UA close (Escape, `<form method="dialog">`) fires the element's `close` event WITHOUT the plugin's own close path, so a once-per-element `close` listener (the event is `close`, not `cancel` — `cancel` is Escape-only) routes it through the plugin close, keeping open-state/listeners/toolbar consistent — a UA-closed shared popin otherwise re-opens "one render behind" (#B58); and since gh#76 §8 (2026-09-20) the `preOpen` loading shell is an explicit STATE — `$popin.isLoading` is true from the moment the shell shows until the real open (`isOpen` stays false, so the two `!isOpen ⇒ popinOpen` consumers still run it), backed by a per-popin load sequence and the in-flight transport (`_loadSeq` / `_loadXhr`): `close()` / `destroy()` on a loading popin cancel the load (`closeLoadingShell` — sequence bump, `abort()`, teardown by the shell's OWN state because the class-keyed teardown never matches a dialog shell, trigger release, `close.<id>`; the aborted transport's readyState-4 handler runs its release block and then drops on the sequence check, so a cancel fires no `error`), the native `close` sync is bound at SHELL time through `bindNativeCloseSync` (guard `isOpen || isLoading`) so an Escape during the load routes through the plugin instead of re-opening when the content lands (driven on the pre-fix bundle: Escape closed the dialog, the landing re-opened it), `loadContent()` on a loading popin injects into the DIALOG element (`target` still names the container until popinOpen re-points it) and completes the open through popinOpen, and a non-2xx load fires `error.<id>` FIRST, then closes the shell if nothing loaded content into it; a popin without `preOpen` never enters the state, and `getActivePopin()` stays open-only; and #B579 (2026-09-20): the declarative trigger's `loaded.<id>` listener applies a NON-STRING detail as nothing — `popinLoadContent`'s redirect branch fires `loaded.<id>` with the POPIN OBJECT as detail (the legacy listener only binds on it), so a `load()` landing on an already-OPEN `data-gina-dialog` popin wrote the new body and then wiped it, leaving the dialog empty with no error (driven on the published bundle; every version since 0.4.6). (3) A popin/dialog click fired TWO identical GETs because the hover/`focusin` preload — `focusin` is part of the click gesture — was never reused: an in-flight preload registry lets the click-time consume ADOPT the in-flight fetch (waiter woken with the body, caller's own load on failure) instead of fetching again, and the legacy click path consumes preloads at all now (#B54); only the initial GET is ever preloaded. The consume path bypassing the full load tail (redirect/JSON handling) was ASSUMED acceptable — but a hover/focus-WARMED trigger whose GET returns a redirect/JSON response (`application/json` `{isXhrRedirect,location}`) had that raw JSON blind-injected as the popin body via `applyContent` (`$el.innerHTML`), the `_self` tunnel never firing — IDENTICAL symptom to the #B77 `_self` timer race but a DIFFERENT mechanism (the consume path, regression `2c61c494` v0.5.5), so #B77 fixed only the UNWARMED click-time path and the WARMED path persisted until #B80 (2026-07-06, `37e6829c`): `preloadFetch`'s `onreadystatechange` now caches a 2xx response ONLY when its Content-Type is NOT `application/json` (mirrors `popinLoad`'s own `isJsonContent` detection), firing the in-flight waiters with `null` (→ `consumePreload`'s `onMiss` = the click-time `doLoad`) and leaving the cache empty (→ a ready consume returns false → `doLoad`), so a JSON-returning trigger falls through to the click-time `popinLoad`'s full redirect/JSON tail exactly as a non-preloaded click (one extra GET on click — the hover-warm GET is not reused; measured 2 GETs). Only a genuine HTML fragment is preloaded+injected. Browser-bundled → prod dist rebuilt; VERIFIED in a real browser (a warmed legacy `data-gina-popin-url` redirect trigger now shows the tunnel target, not the raw JSON; the decline path positively exercised via resource-timing) — jsdom is falsely green. That residual — the GET itself still fired on hover for side-effecting triggers, authenticated (same-origin cookies) and CSRF-token-less (GET) — is CLOSED by the #B91 per-trigger opt-out (2026-07-10): `data-gina-dialog-preload="false"` on the trigger (honored on legacy `data-gina-popin-url` triggers too — the gate reads the attribute off the closest-matched intent target; case-INSENSITIVE `/^false$/i` on purpose, so a templated "False" cannot fail open and fire the GET anyway — deliberately safer than data-gina-dialog-modal's case-sensitive parse) suppresses BOTH the hover warm and the focusin-on-click warm at the shared intent handler; the opted-out click loads normally at click time (undefined cache slot → consume returns false → the caller's click-time load; exactly one GET per click). Default stays preload-ON: GET is presumed safe to fire early per HTTP semantics — a side-effecting trigger declares itself (the hover-prefetch ecosystem's convention, live-verified). (4) A proxied/tunnelled redirect JSON response (`isXhrRedirect`+`location`, default `_self`) used to `$popin.load()` then arm a blind `setTimeout(50, () => !$popin.isOpen && $popin.open())`; a follow-up load slower than 50 ms opened the popin against a not-yet-injected (skeleton/empty) target → intermittent unhandled-deref crash. Removed as vestigial (v0.1.0, 2021) — the already-armed `loaded.<id>` listener opens CONTENT-FIRST (injects the body via popinBind/handleLoadedBody, THEN popinOpen), so the load alone suffices; the `_self` branch's `return;` still guards the `window.open` fall-through (non-`_self` targets only) (#B77). Event contract: `open.<id>` = a fresh open, `loaded.<id>` = reload/redirect content injected — a consumer needing "content ready on every load" must listen to BOTH. A structurally identical blind timer lived in the SIBLING validator `Validator::Popin now redirecting` path (`core/plugins/lib/validator/src/main.js`), removed by #B79 (2026-07-10): the validator DISCARDED popinLoad's return, and that return IS the `{open}` handle whose `open()` arms the content-first `loaded.<id>` listener — so the timer was papering over a race the discarded handle created (an XHR faster than 50 ms fired `loaded` into the void and the body was lost, a slower one opened an empty popin first). It now captures the handle and calls `open()` inside the same not-open gate, guarding the `undefined` popinLoad returns when the request cannot start (CORS unsupported) so a failed load never blind-opens an empty popin; and the cross-popin branch resets `isRedirecting` before closing the ORIGINAL popin, because `popinClose` early-bails on a redirecting popin — that close was a silent no-op, leaving the original open behind the new one (browser-verified: pre-fix stays open, post-fix closes). MEASURED CORRECTION: the timer was NOT load-bearing for the different-popin branch as long assumed — that branch threw first, because the published `gina.popin` WAS re-assembled with a target-wins merge on every `new Popin()`, so its `getPopinByName`/`getPopinById` stayed bound to the FIRST instance's registry and resolved ONLY the boot popin, while `$popins` + `getActivePopin` saw every popin and `gina.popin.activePopinId` never updated (so `getActivePopin()` returned null once nothing was open) — and popins registered AFTER an instance's publish (click-time in-page dialog registrations) never reached the published registry at all, with destroyed popins lingering in it. FIXED as #B90 (2026-07-10): ONE module-scoped registry (`_sharedPopins`) aliased by every instance's `$popins`; a publish-ONCE `gina.popin = instance` (the published object IS the first instance, LIVE — re-publishing was both the freeze defect and, with a shared registry, a self-merge recursion hazard: gina's merge deep-recurses plain objects and `$popin.eventData` can hold the $popin itself); and a `setActivePopinId` write-through helper at all 7 write sites keeping the published `activePopinId` truthful no matter which instance opens or closes a popin. Browser-verified both ways on the built bundle (pre-fix: accessors blind + the validator cross-popin redirect 422-throws `not found`; fixed: accessors resolve every instance's popins and a form submit redirecting into a DIFFERENT popin works end-to-end — the original closes, the target loads content-first, `activePopinId` follows). Generalises: an accessor published through a target-wins `merge()` silently keeps the first instance's closure — publish a live instance once and share module-scoped state instead of re-merging per construction; and never infer a code path is reachable from the fact that it exists. (5) EAGER content warm — `data-gina-dialog-preload="eager"` (case-insensitive) opts a trigger into a one-shot idle warm-all pass: after `window` load, on requestIdleCallback (setTimeout fallback), serialized one GET at a time, routed through the SAME shared per-trigger gate as the hover warm (`warmTrigger`: disabled skip → the `"false"` opt-out → URL-cache dedup → in-flight reserve + fetch) so the two warm paths cannot drift and whichever fires second is a no-op; skipped entirely under Save-Data; triggers injected after the pass keep the delegated hover warm; staleness matches the shipped no-TTL hover semantics — the opt-in accepts the wider warm→open window. (6) #B139 (2026-07-20, 0.5.22): the content cache no longer outlives the open it warmed — measured pre-fix it was a ONE-GENERATION-LAGGING store (every open after the first paid ~1 GET yet rendered the PREVIOUS open's fetch: the leftover entry — the #B54 in-flight adoption's repopulated body, or the around-open re-warm — blocked the fresh warm's dedup; NO invalidation path existed, close/unbind/destroy never touched the cache; reproduced back to 0.5.4, so it predates #B54 and the eager pass). Fix: close clears the popin's content-URL slot (stamped at consumePreload both branches + popinLoad) AND re-sweeps the same slot ~120ms later, because the close-time a11y focus-return and pointer re-hover fire TRUSTED synthetic intents that re-warm the slot with close-era content within 1ms of the close (measured; a raced sweep is benign by construction — at most one extra fetch, never staleness, since an adopted in-flight body still reaches its open through the waiter chain). AND `preload="false"` triggers now skip the cache READ at open on both open paths — `false` is the hard always-refetch spelling for volatile popins (its GET always happens at open, never from a same-URL sibling's warm); no new annotation vocabulary. Warmed-never-opened entries keep the page-lifetime eager semantics above; default triggers pay at most one extra idempotent GET per close (the swept synthetic warm). Content preload deliberately does NOT ride 103 Early Hints: popin responses vary on `X-Requested-With` (a non-XHR GET of a fragment layout gets the iframe-wrap variant and misses the scripts append), and a browser `Link rel=preload` fetch never carries that header — wrong-variant bytes or a double GET, with no success branch; `self.setEarlyHints()` remains the right tool for a popin's STATIC subassets (the CSS/JS it injects via getScript/getStyle). (7) #A11Y8 (2026-08-05, 0.6.4): the background-`inert` loop in `applyNonModalShims` skipped `instance.target` — the shared `.gina-popins` container — and since every popin lives INSIDE that container, and `popinOpen` never closes the popin it supersedes (it only overwrites `activePopinId`), opening a second NON-MODAL dialog left the first one fully keyboard-reachable behind it: a user could tab out of the dialog on screen and into a stale one. Non-modal is the FRAMEWORK DEFAULT for `data-gina-dialog` (`resolveModal` falls through to `return false` at step 5; only a legacy `data-gina-popin-name` trigger is unconditionally modal), so this was the ordinary path, not an exotic one — note item (2)'s "native modals in EVERY env" predates the non-modal branch and now describes LEGACY triggers only. Fix: descend into the container instead of skipping it, and inert sibling `dialog[open]` ONLY — a `<dialog>` without `open` is already `display:none` per the UA stylesheet, so it is unreachable without help (measured in Chrome with controls firing both directions; the modal path was never affected, native `showModal()` handles the top layer itself). Teardown needed NO change: `removeNonModalShims` sweeps `[data-gina-popin-inert]` document-wide, so dialogs nested in the container restore without it knowing they exist. The `getAttribute('inert') == null` guard means gina only marks what it set, so a consumer-set `inert` is never stamped and never stripped. All seven are browser-bundled — prod dist rebuild required; verify (2), (3), (4) and (5) with a REAL preemptive-open / preload / redirect-tunnel consumer — a minimal smoke page is falsely green; (7) needs TWO popins open at once, the only scene in which it differs at all. (8) **A trigger gate must not trust the native `disabled` ATTRIBUTE on an element the browser already enforces (#B296, 0.6.5).** The three DISPATCH-time gates (`openFromTrigger`, the `bindOpen` document proxy, the per-`$element` listener) now require `!('disabled' in $el)` before the attribute counts, mirroring the validator's `isTriggerDisabled` (#B293) so the two subsystems agree on what "disabled" means. Rationale, measured: a natively-disabled `<button>` delivers **0 clicks to JS**, so the attribute arm could only ever fire on a `disabled` written DURING the dispatch — the shape of every consumer double-submit guard — which ate the open and then cleared the attribute, leaving nothing marked and a normal-looking control; on an `<a>`/custom element/span the browser enforces nothing, so the arm is KEPT (`'disabled' in $el` → `button:true · input:true · anchor:false · custom-element:false · span:false`). It also cannot weaken gina's OWN re-entry guard: `armPopinTrigger` arms `<a>` with `aria-disabled` (untouched arm) and every other tag with native `disabled` — enforced by the browser for real controls, and still enforced by this gate for `<span>`-likes, which is exactly the branch the `in` test preserves. **Two gates are deliberately NOT changed:** the hover/focus `warmTrigger` preload gate (removing it there would start PRELOADING a `<button disabled>` nobody can click — if it ever changes it wants the IDL property `$el.disabled === true`, not the ignore treatment) and the bind-time `$link` skip (structurally unreachable by a mid-dispatch write, and it carries a different one-arm predicate). **Reachability is unequal and the difference is load-bearing:** at `openFromTrigger` gina's proxy is DELEGATED so a button-bound guard always wins the race (plain #B293 shape reproduces); at the per-`$element` listener gina binds to the NODE, so only a CAPTURE-phase or earlier-registered guard can poison it (measured both ways — a target-phase guard bound after gina's does NOT reproduce); the legacy document-proxy site is traced-not-exercised. Test `test/e2e/popin-trigger-native-disabled.spec.js` — a replica cannot catch this, it is an ordering interaction between a consumer listener and a delegated proxy. ⚠️ **Scene trap for anyone writing a popin close-button test:** the close element must carry NO `id` — gina assigns `popin.close.<n>` only to an id-less one and the dispatch gate matches on that prefix, so a consumer id makes EVERY arm read "did not close", subtract control included (that is its own defect, #B299). (9) **A teardown loop must never splice the array it is walking (#B265, 0.6.5).** `popinUnbind`'s validator-form teardown spliced `$popin['$forms']` inside a `for` bounded by a length captured BEFORE the loop, so each splice shifted the array left under an incrementing cursor and the read index skipped one every time — the originally ODD-indexed forms were never destroyed and were left behind in the very array the loop exists to empty. Because the popin's `innerHTML = ''` runs BEFORE the loop, their surviving validator entries pointed at already-detached nodes, and `validateFormById`'s "return existing when available" early return then handed the stale entry back on the next open, so the form and its submit trigger came up silently inert — the same end symptom as #B294 by a completely different route. Fix: snapshot with `.slice()`, clear once with `.length = 0`, iterate the snapshot. **Two things worth carrying beyond this bug.** First, `destroy()` is not free: it fires `destroy.<formId>` (validator `main.js:4241`) and `'destroy'` IS on the plugin's public registrable-event list, so making a skipped form destroy properly starts firing consumer `on('destroy')` callbacks that never fired before — a teardown fix is a behaviour change, not merely a leak fix. Second, per-form teardown is now wrapped: `destroy()` → `unbindForm` → `getFormById(vFormId)` THROWS for a form holding a `data-gina-form-virtual` file input once its virtual form is unresolvable, which is precisely the detached state every form is in at that point — and before the guard, one such throw silently abandoned every LATER form in the loop. **Reachability is much narrower than it looks and must not be overstated:** the loop is gated on a validator — since #B756 (0.7.2) the one the POPIN was registered with (`$popin.options.validator`, falling back to the closure's `$validatorInstance`); before, the closure alone, a PER-INSTANCE value assigned only from `options.validator`. Gina's own boot does `new Popin({name:'gina-dialog-boot'})` with no validator, and the delegated `data-gina-dialog` listener is installed once by that boot instance (module guard `_ginaDialogDelegated`), so **the declarative dialog path can never reach this code** — it needs a popin constructed with a validator (`new Popin({name, validator})`, the legacy popin API). #B756 was the closure gate's own defect: `gina.popin` IS that validator-less boot instance, so the documented `gina.popin.close(name)` skipped a validator-registered popin's teardown and the reopened form came up unbound (`validateFormById`'s early return again — a third route to the #B265 symptom), while the popin's own `close()` and its close button run the registering instance and always tore down. A client navigation took the same route: gina/nav's fragment swap closes the active popin through `gina.popin.close(name)` (`closeActivePopin`), so a validator popin still open when a navigation swapped the page skipped the teardown too (measured on pre-0.7.2 bundles). Since #B762 (0.7.3) that close runs BEFORE the swap moves focus to the region and applies its scroll decision: run after them, closing the popin returned focus to its trigger and scrolled the page back down to it, modal and non-modal popins alike (an open popin inerts the page outside it, so the region could not take focus); e2e `nav-popin-close-focus-b762.spec.js`. Pins: arm 04 of e2e `validator-upload-popin-reopen-b733.spec.js`, and e2e `validator-upload-popin-reopen-nav-b756.spec.js` for the navigation. That is also why the test is a replica + source pins (`test/core/popin-forms-teardown.test.js`) rather than an e2e arm: an e2e scene on the declarative path would be VOID, every arm reading "nothing destroyed" for a reason unrelated to the defect. (10) **Never re-derive an element's ROLE from its id when the call path already proves it (#B299 + #B301, 0.6.5).** `register()`'s close branch gated on `/^popin\.close\./.test(event.target.id)` — a prefix gina mints at bind time — and that single line carried TWO silent defects: gina assigns the prefixed id **only to an id-less element** (`:1560`), so a consumer-supplied id is taken verbatim and matches nothing (**#B299**); and `event.target` is whatever was actually CLICKED, so an icon nested inside the button matches nothing either (**#B301** — the ordinary `<button class="gina-popin-close"><svg/></button>`, and by far the wider case). Both are invisible: `cancelEvent` runs at the top of the listener, so the button also swallows its own default — no error, no navigation, nothing. Fix: read **`event.currentTarget`** (the element `register()` bound — a `.gina-popin-close` by construction, since that function has ONE call site fed only from `querySelectorAll('.gina-popin-close')`) and treat a `popin.click.*` id as the sole exception, which preserves the dual-role element (a trigger that is ALSO a close button — reachable because `bindOpen` scans `document`, not just the host page). ⚠️ **What must NOT be "fixed" instead: rewriting the element's id.** The `$close` teardown sweep removes this listener via `gina.events[eId] == eId` — the degenerate name===id entry that `events.js:42` produces — so decoupling the event name from the id leaks the listener; and overwriting a consumer id would break their selectors, `aria-labelledby` and test hooks. Contrast `bindOpen:1195-1203`, which takes the OPPOSITE policy and does clobber a consumer id on trigger elements. Measured with controls firing both directions on the real bundle (id-less closes / consumer-id does not / nested click does not / patched all close), test `test/e2e/popin-close-dispatch.spec.js`. The dual-role branch reads `event.currentTarget` for its dispatch as well (**#B995**, 0.7.7): it read the event name from `event.target.id` and dispatched on the clicked node, so a click on markup added inside the element after `bindOpen` stamped it (markup with no `proxyClick` listener of its own; markup present then has one) matched nothing and did nothing. The shape is reached only when `popinBind` binds the close button BEFORE `bindOpen` rewrites its id (an in-page dialog opened, then an AJAX popin registered whose legacy trigger sits inside it): in the other order `popinBind` skips it (`gina.events[evt] == id`), and a late node dies in the document proxy instead, which still reads `event.target.id` (#B1009, open, LOW). Tests `test/core/popin-dual-trigger-nested-b995.test.js`, e2e `test/e2e/popin-dual-trigger-nested-b995.spec.js`. (11) **gina's own in-flight arm must be honoured by the path that dispatches it — a legacy trigger re-fired during its own load (#B298, 0.6.5).** `armPopinTrigger` marks an `<a>` trigger `aria-disabled="true"` for the duration of its popin's load (every other tag gets the native `disabled`, which the browser enforces). But the ONLY dispatch route for a pure-legacy `data-gina-popin-name` trigger is the `bindOpen` document click proxy, whose predicate tests the native attribute ALONE — and an `<a>` never carries it here — so a second click during the load reached the open handler and issued a SECOND XHR. `bindDelegatedOpen` returns early for a trigger carrying neither `data-gina-dialog` nor `data-gina-dialog-src`, so `openFromTrigger`'s own `aria-disabled` arm never covered this population. Fix: gate at the top of the legacy per-element open handler, predicate copied VERBATIM from `openFromTrigger` (native arm included, so #B296's `!('disabled' in $el)` rule still holds). **Gating THERE rather than in the proxy is load-bearing, and was MEASURED rather than reasoned:** a trigger's direct children each get their own listener from `proxyClick`, which fires the custom event DIRECTLY and never passes the proxy predicate at all — a proxy-level gate still let the child-click route fire twice, while the handler-level gate stops both (both routes converge there, and `currentTarget` is the element `bindOpen` bound, so child markup cannot dodge it). ⚠️ **Reachability is narrower than it looks, and the scene is easy to get wrong:** a real click HOVERS first, which warms the preload (`warmTrigger` reads `data-gina-popin-url` too), and the click then ADOPTS that in-flight fetch instead of calling `popinLoad` — so nothing is ever armed and the question goes unasked (a probe without the opt-out reads 1 request for a reason unrelated to the gate, its own counter-can-read-2 control failing). The defect needs the documented `data-gina-dialog-preload="false"` opt-out (#B91) — i.e. exactly the triggers whose GET has server-side effects, which is why it is not cosmetic. Whether a no-hover activation (touch, some keyboard paths) is a second reachable population is UNMEASURED. Test `test/e2e/popin-legacy-trigger-aria-disabled.spec.js` (4 arms, red-first; the two fix arms failed 2-vs-1 on the pre-fix dist while their scene/armed/click assertions passed, so the red is attributable to the defect). (12) **A click adopting a still-in-flight hover/focus preload is a genuine wait — it now arms the trigger exactly like the cold click-time XHR (#B285, 0.6.5).** Both consume branches previously armed NOTHING (only a preOpen popin got its skeleton), so with warm-on-intent preloading the COMMON open path showed no busy affordance at all. `consumePreload` gained a guarded 4th param `onSettled`, fired synchronously after the ready (cached) apply and at the TOP of the adopted waiter — success AND failure, release-before-apply, the cold readyState-4 order. The CALLERS own the affordance (arm on adopted-wait only via a settled-flag; release via `releasePopinTrigger`, armPopinTrigger's mirror), keeping `consumePreload` loading-state-agnostic — load-bearing for the extract-and-execute test harness, which injects neither `document` nor `loadingState` and calls with ≤3 args (the guard makes the 4th a no-op), and the right factoring anyway (it reports that it settled; callers decide who cares). The ready branch's SYNCHRONOUS settle is equally load-bearing: without it a caller cannot distinguish ready from in-flight and would arm forever — an instant cached open never flashes a busy state. Double-click protection during the wait comes free from EXISTING mechanisms (the entry gates refuse an armed trigger; the browser suppresses a disabled `<button>`), and the failed-adoption leg releases before the click-time fallback re-arms through popinLoad's own path. Playwright note: an armed `<a>` reads [disabled] in the accessibility tree, so Playwright's own actionability check refuses to click it — a second-click scene needs `force: true` (a real pointer is NOT blocked on aria-disabled). e2e `test/e2e/popin-preload-loading-state.spec.js` (5 arms, red-first: 4 red on the pre-fix dist, ready-branch no-arm control green on both). (13) **A free variable inside a `try` turned every successful JSON load into a fabricated server error (#B315, 0.6.6).** `popinLoad`'s readyState-4 2xx branch dispatched `success.<id>` on `$forms[0]` — but the module's sole `var $forms` is declared in `popinBind`, a SIBLING function under `Popin`, so reading it threw `ReferenceError` straight into that same handler's `catch`, which fabricates `{status: 422, error}` and fires `error.<id>`. `success` therefore never reached a subscriber at all. ⚠️ **The observable is worse than a stack trace, and that is the part worth carrying:** the catch overwrites `result.error` with `JSON.parse(xhr.responseText)` whenever the response is `application/json`, and the throwing line is reachable ONLY for JSON (a non-JSON body returns early at the `loaded.` trigger just above it) — so the consumer received a **422 whose payload was the SUCCESSFUL response body**, reading as a server-side failure that never happened. Fix: dispatch on `$el`, matching the two sibling triggers in the same handler (`loaded.`, `error.`) — `popinLoad` is the CONTENT loader, so a JSON response need not involve a form at all; the `$forms[0]` target was copy-paste from a validator context, whose commented-out `handleXhrResponse` line still sits directly above it. Reproduced BEFORE fixing (a replica of the readyState-4 2xx branch with two firing controls: non-JSON → `loaded`, `location` → early return); tests `test/core/popin.test.js §34` (4 — scope pin, single-declaration-plus-position pin, dispatch-target pin, dist-fidelity pin; both source pins validated RED against the pre-fix source, the dist pin RED before the rebuild). ⚠️ **The registry's other two events still never fire (#B315b):** `progress`'s entire `xhr.onprogress` block including its `triggerEvent` is commented out (dead by construction, with its `ontimeout` sibling), and `click` has ZERO `triggerEvent` sites anywhere — the `popin.click.*` identifiers are per-element DOM event names in a different namespace. Both still register cleanly through `on()`, so the surface advertises three events and delivered none; their disposition is a DESIGN question (implement, or drop them from the registry so the surface stops lying) and was deliberately NOT folded into this fix, which was an unambiguous defect. **The popin `::backdrop` rule is scoped to gina's own dialogs (#B329, fixed 2026-08-24).** The sheet shipped `dialog::backdrop` (dark overlay + blur) UNSCOPED, painting gina's backdrop on EVERY consumer `<dialog>` on the page; now `dialog.gina-popin-container::backdrop`, matching the reduced-motion rules that were already scoped. Both dialog-creation sites set the container class on the `<dialog>` element itself, so gina's own popins keep their backdrop. Consumer-visible: a page relying on the free backdrop for its own dialogs styles them itself now, and a popin dialog element supplied by the page's own markup (the adopt-by-id path) needs `gina-popin-container` to keep gina's backdrop. Pins: `popin-backdrop-scope.test.js` (source + compiled twin + `gina.min.css`, present/absent controls). Browser-bundled ⇒ consumers restart AND re-bake. **A form's or a link's `text/html` XHR answer is routed by the popin the SUBMITTING element is inside, never by "the active popin" (gh#76 + #B571, 2026-09-20).** The validator captures `gina.popin.getPopinContaining($form)` into the per-send closure at submit (the same capture stamps the `X-Gina-Popin-Id`/`-Name` request headers, so `self.isPopinContext()` is true only for a contained form) — and since #B572 (2026-09-22) the STAGED-UPLOAD path makes the same capture once per file selection (`$ownerPopin = getPopinContaining($el.form || $el)`, `$el.form` being the consumer's real form), so the virtual `gina-upload-*` form, its preview lookups, its `uploadProperties.isPopinContext` flag and its staging request belong to the popin the REAL form is inside, or to `document.body`. It was the LAST surviving `isPopinContext()` (« some popin is open ») gate: a PAGE form's file chosen while an unrelated popin was open had its virtual form appended inside that popin — staging 200, all ten hidden metadata fields EMPTY, the save posted without the file, the staging request claiming that popin's id, zero errors — reachable through the file-picker race (the OS picker is application-modal and ignores `inert`, which blocks only the click path) and through script-assigned `input.files`; a form INSIDE the popin was always fine and still is (measured 10/10 both ways). Dev-mode notice `[FormValidator][popin] the staged upload of `#<input>` (form `#<form>`) is placed with its own form …`, from `warnIfOldRulePlacedUpload`, the twin of `warnIfOldRuleRouted`; the popin branch's `$target` DOMParser copy is deliberately untouched (measured working when chosen by containment). Pins: `test/core/validator-upload-popin-containment.test.js` (block-scoped absence pin + the helper driven in a lifted scope with every free identifier supplied), e2e `validator-upload-popin-containment.spec.js` (page form + open popin, the picker race, and the inside-the-popin control, red-first through `B572_PREFIX_BUNDLE`). **A popin close + reopen re-stages, and same-named staged inputs in two forms stay apart (#B733/#B732, 0.7.2):** the file-input change handler reuses a virtual `gina-upload-*` record's element only while it `isConnected`; a detached record is `destroy()`ed (its listeners and their registry entries go with it), deleted from `$forms`, and a new virtual form is built — it used to fall back to `getFormById()`, which returns the validator RECORD, and use that record as the element, so after a popin close (the content is wiped, nothing destroys the virtual form) every selection threw `setAttribute is not a function` and staged nothing. The virtual id of a bracket-less name ends with `-<form id>` (`gina-upload-doc-<formId>`; a bracketed name already carried the form id, once per `]`, and is unchanged) — `gina-upload-doc` was shared by every form, so the second form's upload filled the FIRST form's hidden fields and left its own empty; a listener or selector matching a bracket-less virtual id literally must read the input's `data-gina-form-virtual` instead. Same-named staged inputs inside ONE form still share a virtual form (their hidden-field names collide too). Pins: e2e `validator-upload-popin-reopen-b733.spec.js` (4 arms, incl. #B756's `gina.popin.close(name)`) and `validator-upload-same-name-b732.spec.js` (2 arms), red-first on the pre-fix dist. For a submit, the validator honours its capture at settle only while that popin is still open AND its element still contains the form (a close + reopen in flight detaches the form ⇒ legacy payload); anything else — a page form while a popin is open OR loading — is the legacy handler-only `{contentType, content, status}` payload, with a dev-mode `[FormValidator][popin]` notice naming the popin the old rule would have targeted (it REPLACED an open popin's content, or raised a false `422` `Popin x is not open !` on a loading one — the loading window is reachable through a preload-opted-out trigger, never a hovered default one, whose click adopts the warm). The popin branch now also emits the `.hform` (validator) / `.hlink` (`utils/events.js`, whose `.hform` half is dead — no caller passes `$form`) companions with the parsed xhr-data, so declared callbacks run for forms inside popins (#B571). `getActivePopin()` returns OPEN popins only — the `activePopinId` one when open, else the first open — never a registered-but-not-open one (§8(a)); `popinLoadContent` honours `this` when called as a method (both internal sites use `.call($popin, …)`, the manager-level call keeps the active fallback); the redirect branch resolves `sendCtx.popin || (result.popin ? getActivePopin() : null)` — a plain `location` redirect from a page form falls through to the page redirect (measured pre-fix: it loaded INTO the open popin AND navigated, two fetches), a name-less `{popin:{close}}` with nothing open is a no-op. `getPopinContaining` walks the registry with `getElementById(id).contains(el)` (innermost wins; the element id is the popin id on every flavour; 0.2 µs worst case) — a non-modal popin still inerts the page, so a page form can only be submitted by script while one is open, which is what the request-side arms of `test/e2e/validator-popin-form-target.spec.js` do. Companion `test/e2e/popin-preopen-modeless.spec.js` pins #B574 (`popinOpen` guard `hasAttribute('open')`). Browser-bundled ⇒ consumers restart AND re-bake. **#B575 (0.6.32) — the two hidden transport inputs are DEV-ONLY, and both popin branches now parse tolerantly.** `spliceXhrInputs` runs only under `_isDev` (`NODE_ENV_IS_DEV === 'true'`), so outside dev mode a `renderWithoutLayout` answer carries NO `gina-without-layout-xhr-data`/`-view`; both branches dereferenced `.value` on the absent element, the `TypeError` was caught INSIDE the try and surfaced as a false `422` error callback AFTER a successful server write, and the popin was never loaded. One shared `parseXhrHtmlAnswer()` now returns `{doc, data, view}` with `data`/`view` `null` when absent and the two inputs STRIPPED from the parsed document (they are consumed transport — left in, a swap into a region inside a `<form>` would resubmit them and repeated swaps would duplicate their ids). ⚠️ The parsed data is delivered VERBATIM when present — injecting a `status` key would change the payload every contained form already receives (the slice-1 contract `validator-popin-form-target.spec.js §05` pins) — and the payload is `{status}` only when the inputs are absent; `validator-form-target.test.js §06` pins that absence SCOPED to the popin branch, since `result.status = xhr.status` is legitimate elsewhere (the legacy payload builders in `utils/events.js`). (14) **`data-gina-dialog-target` is ONE selector applied on BOTH sides, with THREE fallbacks — all announced in dev mode since #B580 (2026-09-22).** `applyContent($el, html, $popin, partialTarget)` reads the slot with `$el.querySelector(partialTarget)` and the incoming region with `parsed.querySelector(partialTarget)` over a `new DOMParser()` document, then assigns `$slot.innerHTML = $incoming.innerHTML` — the SLOT ELEMENT survives, which is what preserves chrome and its bindings. The three misses are all fail-soft (a popin open is a retryable read, unlike a submit): a selector the ENGINE REFUSES ⇒ full replace — pre-#B580 this threw an uncaught `SyntaxError` out of the `loaded.<id>` handler / preload-consume tail, so the dialog silently kept its previous content (MEASURED on the real bundle: `Failed to execute 'querySelector' on 'Element': '#slot >' is not a valid selector.`); no match in the OPEN DIALOG ⇒ full replace; no match in the ANSWER ⇒ the whole `parsed.body` into the slot — the SECOND fallback, which the published guide did not mention and nothing pinned. `warnPartialTarget()` emits one `console.warn` per event naming the popin, the selector and which fallback ran, gated on `gina.config.envIsDev`. ⚠️ Testing surface: the e2e harness (`test/e2e/runtime-server.js` serves `envIsDev:'false'`) can assert only the FALLBACK — the NOTICE belongs to `popin.test.js §22`, which drives the REAL brace-walk-extracted function, because the §21 replica omits `$popin` and mirrors the pre-fix body; keep `applyContent`'s signature and first `if ( !partialTarget )` branch byte-shaped or the regex pins at `popin.test.js:1121-1130` and `popin-reload-open.test.js:61` go red. ⚠️ The attribute is the dialog-scoped sibling of `data-gina-form-select`, NOT of `data-gina-form-target`: one selector, both sides, nothing resolved relative to an element, so the `this`/`closest x`/`find x`/`next x` grammar does not apply — all four are valid CSS, so writing one takes the silent fallback instead of reporting a mistake. ⚠️ The "legacy triggers get a full replace" rule covers PURE legacy only: `bindDelegatedOpen` returns early ONLY for a trigger carrying NEITHER `data-gina-dialog` NOR `data-gina-dialog-src`, so a MIXED trigger (legacy attributes + `-src`) routes through `openFromTrigger` and DOES get the partial swap. (4) **Listener ledger discipline — `reBind()` never stacks, `destroy()` detaches (#B585, 2026-10-07).** `bindForm` records every listener it attaches on the record (`$form.boundListeners`: the form-level proxies, `validate.<id>`/`reset.<id>`, the native `submit` proxy, the live-check / autocomplete / select / file / checkbox / radio handlers and the submit trigger's own listener — `addListener` returns the callback, so each existing call is wrapped in a push and keeps its text) and `unbindForm` detaches exactly those by reference, releases the registry keys the binding wrote, clears the `registered.<id>` live-check flags and releases the submit trigger's marks (`data-gina-form-submit-trigger-for`, the `__ginaSubmitBoundFor` expando) with the record's `submitTrigger` claim, so the next bind — a `reBind()`, or a fresh same-id record after `destroy()` — claims and binds the trigger as a first bind does. Before it, `unbindForm` detached NOTHING: its nine form-level `removeListener` calls passed the validator RECORD (no `removeEventListener`), and `utils/events.js removeListener` with no 4th argument detaches nothing anyway — `gina.events` is a NAME → element-id registry that holds no callback, so deleting a key never detaches a handler, and the 4th parameter is a COMPLETION callback (handed to `removeEventListener`, then invoked): never pass a DOM handler as it. `on()` records the wrapper it attaches on the handle (`consumerListeners`); a `.on()` handler and the declarative `data-gina-form-event-on-*` hooks survive a `reBind()` (their keys stay, so the form-level submit proxy still routes a NATIVE submit — `requestSubmit()`, Enter in a form without a submit button, a wrapped-label click; a click on the trigger ends in `validate.<id>` directly — to `.on('submit')`, and a re-registration is dropped by the add-once guard rather than stacked); `destroy()` fires `destroy.<id>` then removes them — only while the form is still in the document: the popin teardown destroy()s a form AFTER its content was replaced (`popinLoadContent` writes the new innerHTML before `popinUnbind`) or cleared, and the validator's popin branch then dispatches `success.<id>` on that old, detached form after `loadContent()`, so a detached form keeps its `.on()` handlers (they die with the element) while its keys are released for the same-id successor — the first cut drained them and five e2e arms lost their declared success callback. The one `window` listener each live-checked field registered through the browser's own `addEventListener` with gina's 4-argument shape is gone. Consumer-visible: the Safari N-characters-per-keystroke symptom after repeated re-binds (#B135's interception stacked one keydown per re-bind) and a belt restoring a form's `gina.events` keys after `reBind()` are both retired; a consumer that destroy()s a form and binds it again gets a clean record that claims its submit trigger (pre-fix the stale listeners of the destroyed binding answered the click). Pins: `test/core/validator-unbind-ledger-b585.test.js` (structure + executed arms + dist fidelity) and e2e `validator-rebind-listeners-b585.spec.js` (a live-listener ledger over `EventTarget.prototype.add/removeEventListener`, keyed by element id — an old and a new element sharing an id count together; `GINA_B585_PREFIX_BUNDLE=<pre-fix gina.min.js>` runs it as the subtract arm). **A re-bind keeps the rule set a form names with `data-gina-form-rule` (#B879, 0.7.5).** A bind given no rule — `reBind()`, `.bind()`, `getFormById()` on an unbound form — resolved the rule set by the form's id alone, while the first bind is handed the attribute's rule by its caller (the boot scan, `initForm`, `validateFormById`), so a form whose id names no rule set was re-bound with `{}`: no field live-checked, no bind-time silent validation, and the trigger kept its gated mark and refused the first click on a valid form. Before #B585 the first bind's listeners outlived the re-bind (and a consumer belt restoring the form's `gina.events` keys revived them), which hid the defect; the detach exposed it. `bindForm` now reads `data-gina-form-rule` before the id when no rule is given, adopting it only when it names a known rule set. Pins: `test/core/validator-rebind-rule-b879.test.js` (structure, the step extracted and executed, dist fidelity) and e2e `validator-rebind-rule-b879.spec.js` (types with `keyboard.type` and reads the gate after the re-bind; `GINA_B879_PREFIX_BUNDLE=<pre-fix gina.min.js>` runs the subtract arm). Browser-bundled ⇒ pickup is restart AND re-bake. **Live-check coverage, `reBind(id, rules)` and a bare `unbind()` (#B884, #B886, #B880 + #B802, #B881, #B922, 0.7.5).** `addLiveForInput` wired a control only when it had a rule of its own, so a field that only a `_case_<driver>` condition gives rules (`{ ref: { isRequired: true }, _case_kind: { conditions: [{ case: 'b', rules: { extra: { isRequired: true } } }] } }`) got no live listener: once the case applied (the live merge writes `extra`'s rule into the store), typing into it never re-ran the whole-form pass, so the trigger kept its gated mark and a click sent nothing. A field that a `_case_` condition's `rules` names by EXACT key — or, since #B921, matches by a RegExp key read as the expansion reads it, the driver aside — is now wired at bind (`isCaseConditionTarget`, consulted at both of `addLiveForInput`'s gates: the no-rule return and the listener branch); until the case applies its field pass finds no rule and stage 2 re-checks the form; that field pass leaves the submit trigger to stage 2 (#B922: it read valid, so `handleErrorsDisplay`'s no-error branch marked the form ready, and the show branch's `disabled = false` undid a native `disabled` a page script had just set on that field's `change`, before stage 2 gated the form; `handleErrorsDisplay` now takes `isSubmitTriggerLeftToFormPass`, which `processEvent`'s valid branch passes as `isCaseTarget`, every other caller unchanged), and the listener is ledgered like any other, so `unbind`, `reBind` and `destroy` detach it. The input-type allowlist also left out `tel`, `url`, `search`, `time`, `datetime-local`, `month` and `week`, so a rule-bound field of those types got no live listener either; they are admitted now (`range` and `color` stay out, unmeasured). `forEachField` iterated `for (rule in errors[field])` with no declaration, writing a GLOBAL `rule` on the first validation that found an error, and `reBindForm` tested `typeof(rule)` (that global) instead of its `rules` parameter, so `reBind(id, rules)` honoured `rules` only after some error on the page: now `for (let rule …)` and `typeof(rules)`, and a page variable named `rule` is no longer overwritten. `unbindForm` had no `this.target` fallback, so `$forms[id].unbind()` threw « could not unbind form `undefined` » and left the form bound; it now unbinds the handle's form (and its non-element branch no longer reads an undeclared `err`). Pins: `test/core/validator-client-cluster-b884.test.js` and e2e `validator-client-cluster-b884.spec.js` (`GINA_B884_PREFIX_BUNDLE=<pre-fix gina.min.js>` runs the subtract arms); #B922: `test/core/validator-case-target-trigger-b922.test.js` and e2e `validator-case-target-trigger-b922.spec.js` (`GINA_B922_PREFIX_BUNDLE=<pre-fix gina.min.js>`); a harness that lifts `addLiveForInput` out of its closure must now hand it `isCaseConditionTarget` too (`validator-radio-livecheck-dispatch.test.js` passes the real extracted helper). Browser-bundled ⇒ pickup is restart AND re-bake. (15) **A popin's document click proxy claims a trigger only when its instance id is followed by `-` (#B876).** Each `new Popin()` registers a document click listener whose predicate is the cached `_rePopinClick`. Instance ids are `'gina-popins-' + _nextId()` (`gina-popins-gp-1`, `gina-popins-gp-14`, … from one shared counter, which triggers also draw from, so a page reaches colliding ids easily) and every engine-built click trigger id is `popin.click.gina-popin-<instance.id>-<_nextId()>-<name>`. Built without the delimiter, the regex of `gina-popins-gp-1` also matched the triggers of `gina-popins-gp-14`: one click fired two proxies, the popin loaded twice and the second load replaced the bound form, which then submitted natively. Fixed by `instance.id + '-'` in the regex. Pin: `test/core/popin-click-prefix-collision-b876.test.js` (drives the real construction sliced from the source and both dist files, with ids built the way the source builds them; seams `B876_POPIN_SRC` / `B876_PLUGIN_DIST` — a published npm package ships only `dist/`, so take `popin/main.js` from the matching git tag). Browser-bundled ⇒ pickup is a re-bake.
967
+ 213. **Client-plugin discipline — CSP-safe listeners, native-dialog parity, preload coalescing (consolidates former #149/#159/#200).** (1) Client-bundle plugins must NOT inject inline event-handler attributes (`setAttribute('onclick', …)`, `el.onX = …`) — they trip CSP `script-src-attr` under nonce-based policies; suppress defaults with `addEventListener('click', e => e.preventDefault())`, and keep it `preventDefault`-ONLY (no stopPropagation) when the element participates in event delegation other handlers depend on — a `preventDefault`-only listener still sets `event.defaultPrevented` exactly as the inline handler did. (2) Dialog popins open as native modals (`$el.showModal()`) in EVERY env — the dev-only non-modal downgrade + manual overlay are gone for dialog mode (native `::backdrop`); a consumer that PRE-OPENS the dialog (skeleton loading) must also use `showModal()` or it is born non-modal with nothing positioning it; the opt-in `preOpen`/`loadingShell` skeleton is idempotent via `hasAttribute('open')` — NOT getAttribute truthiness, because `showModal()` sets `open` to the EMPTY string — and since #B574 (2026-09-20) `popinOpen`'s own re-entry guard reads the same `hasAttribute('open')`: it read getAttribute truthiness, never skipped a shell-opened dialog, and on the new trigger's default MODELESS resolution called `show()` on the still-modal shell, which throws `InvalidStateError` and left `isOpen` false on a visibly open popin; a native UA close (Escape, `<form method="dialog">`) fires the element's `close` event WITHOUT the plugin's own close path, so a once-per-element `close` listener (the event is `close`, not `cancel` — `cancel` is Escape-only) routes it through the plugin close, keeping open-state/listeners/toolbar consistent — a UA-closed shared popin otherwise re-opens "one render behind" (#B58); and since gh#76 §8 (2026-09-20) the `preOpen` loading shell is an explicit STATE — `$popin.isLoading` is true from the moment the shell shows until the real open (`isOpen` stays false, so the two `!isOpen ⇒ popinOpen` consumers still run it), backed by a per-popin load sequence and the in-flight transport (`_loadSeq` / `_loadXhr`): `close()` / `destroy()` on a loading popin cancel the load (`closeLoadingShell` — sequence bump, `abort()`, teardown by the shell's OWN state because the class-keyed teardown never matches a dialog shell, trigger release, `close.<id>`; the aborted transport's readyState-4 handler runs its release block and then drops on the sequence check, so a cancel fires no `error`), the native `close` sync is bound at SHELL time through `bindNativeCloseSync` (guard `isOpen || isLoading`) so an Escape during the load routes through the plugin instead of re-opening when the content lands (driven on the pre-fix bundle: Escape closed the dialog, the landing re-opened it), `loadContent()` on a loading popin injects into the DIALOG element (`target` still names the container until popinOpen re-points it) and completes the open through popinOpen, and a non-2xx load fires `error.<id>` FIRST, then closes the shell if nothing loaded content into it; a popin without `preOpen` never enters the state, and `getActivePopin()` stays open-only; and #B579 (2026-09-20): the declarative trigger's `loaded.<id>` listener applies a NON-STRING detail as nothing — `popinLoadContent`'s redirect branch fires `loaded.<id>` with the POPIN OBJECT as detail (the legacy listener only binds on it), so a `load()` landing on an already-OPEN `data-gina-dialog` popin wrote the new body and then wiped it, leaving the dialog empty with no error (driven on the published bundle; every version since 0.4.6). (3) A popin/dialog click fired TWO identical GETs because the hover/`focusin` preload — `focusin` is part of the click gesture — was never reused: an in-flight preload registry lets the click-time consume ADOPT the in-flight fetch (waiter woken with the body, caller's own load on failure) instead of fetching again, and the legacy click path consumes preloads at all now (#B54); only the initial GET is ever preloaded. The consume path bypassing the full load tail (redirect/JSON handling) was ASSUMED acceptable — but a hover/focus-WARMED trigger whose GET returns a redirect/JSON response (`application/json` `{isXhrRedirect,location}`) had that raw JSON blind-injected as the popin body via `applyContent` (`$el.innerHTML`), the `_self` tunnel never firing — IDENTICAL symptom to the #B77 `_self` timer race but a DIFFERENT mechanism (the consume path, regression `2c61c494` v0.5.5), so #B77 fixed only the UNWARMED click-time path and the WARMED path persisted until #B80 (2026-07-06, `37e6829c`): `preloadFetch`'s `onreadystatechange` now caches a 2xx response ONLY when its Content-Type is NOT `application/json` (mirrors `popinLoad`'s own `isJsonContent` detection), firing the in-flight waiters with `null` (→ `consumePreload`'s `onMiss` = the click-time `doLoad`) and leaving the cache empty (→ a ready consume returns false → `doLoad`), so a JSON-returning trigger falls through to the click-time `popinLoad`'s full redirect/JSON tail exactly as a non-preloaded click (one extra GET on click — the hover-warm GET is not reused; measured 2 GETs). Only a genuine HTML fragment is preloaded+injected. Browser-bundled → prod dist rebuilt; VERIFIED in a real browser (a warmed legacy `data-gina-popin-url` redirect trigger now shows the tunnel target, not the raw JSON; the decline path positively exercised via resource-timing) — jsdom is falsely green. That residual — the GET itself still fired on hover for side-effecting triggers, authenticated (same-origin cookies) and CSRF-token-less (GET) — is CLOSED by the #B91 per-trigger opt-out (2026-07-10): `data-gina-dialog-preload="false"` on the trigger (honored on legacy `data-gina-popin-url` triggers too — the gate reads the attribute off the closest-matched intent target; case-INSENSITIVE `/^false$/i` on purpose, so a templated "False" cannot fail open and fire the GET anyway — deliberately safer than data-gina-dialog-modal's case-sensitive parse) suppresses BOTH the hover warm and the focusin-on-click warm at the shared intent handler; the opted-out click loads normally at click time (undefined cache slot → consume returns false → the caller's click-time load; exactly one GET per click). Default stays preload-ON: GET is presumed safe to fire early per HTTP semantics — a side-effecting trigger declares itself (the hover-prefetch ecosystem's convention, live-verified). (4) A proxied/tunnelled redirect JSON response (`isXhrRedirect`+`location`, default `_self`) used to `$popin.load()` then arm a blind `setTimeout(50, () => !$popin.isOpen && $popin.open())`; a follow-up load slower than 50 ms opened the popin against a not-yet-injected (skeleton/empty) target → intermittent unhandled-deref crash. Removed as vestigial (v0.1.0, 2021) — the already-armed `loaded.<id>` listener opens CONTENT-FIRST (injects the body via popinBind/handleLoadedBody, THEN popinOpen), so the load alone suffices; the `_self` branch's `return;` still guards the `window.open` fall-through (non-`_self` targets only) (#B77). Event contract: `open.<id>` = a fresh open, `loaded.<id>` = reload/redirect content injected — a consumer needing "content ready on every load" must listen to BOTH. A structurally identical blind timer lived in the SIBLING validator `Validator::Popin now redirecting` path (`core/plugins/lib/validator/src/main.js`), removed by #B79 (2026-07-10): the validator DISCARDED popinLoad's return, and that return IS the `{open}` handle whose `open()` arms the content-first `loaded.<id>` listener — so the timer was papering over a race the discarded handle created (an XHR faster than 50 ms fired `loaded` into the void and the body was lost, a slower one opened an empty popin first). It now captures the handle and calls `open()` inside the same not-open gate, guarding the `undefined` popinLoad returns when the request cannot start (CORS unsupported) so a failed load never blind-opens an empty popin; and the cross-popin branch resets `isRedirecting` before closing the ORIGINAL popin, because `popinClose` early-bails on a redirecting popin — that close was a silent no-op, leaving the original open behind the new one (browser-verified: pre-fix stays open, post-fix closes). MEASURED CORRECTION: the timer was NOT load-bearing for the different-popin branch as long assumed — that branch threw first, because the published `gina.popin` WAS re-assembled with a target-wins merge on every `new Popin()`, so its `getPopinByName`/`getPopinById` stayed bound to the FIRST instance's registry and resolved ONLY the boot popin, while `$popins` + `getActivePopin` saw every popin and `gina.popin.activePopinId` never updated (so `getActivePopin()` returned null once nothing was open) — and popins registered AFTER an instance's publish (click-time in-page dialog registrations) never reached the published registry at all, with destroyed popins lingering in it. FIXED as #B90 (2026-07-10): ONE module-scoped registry (`_sharedPopins`) aliased by every instance's `$popins`; a publish-ONCE `gina.popin = instance` (the published object IS the first instance, LIVE — re-publishing was both the freeze defect and, with a shared registry, a self-merge recursion hazard: gina's merge deep-recurses plain objects and `$popin.eventData` can hold the $popin itself); and a `setActivePopinId` write-through helper at all 7 write sites keeping the published `activePopinId` truthful no matter which instance opens or closes a popin. Browser-verified both ways on the built bundle (pre-fix: accessors blind + the validator cross-popin redirect 422-throws `not found`; fixed: accessors resolve every instance's popins and a form submit redirecting into a DIFFERENT popin works end-to-end — the original closes, the target loads content-first, `activePopinId` follows). Generalises: an accessor published through a target-wins `merge()` silently keeps the first instance's closure — publish a live instance once and share module-scoped state instead of re-merging per construction; and never infer a code path is reachable from the fact that it exists. (5) EAGER content warm — `data-gina-dialog-preload="eager"` (case-insensitive) opts a trigger into a one-shot idle warm-all pass: after `window` load, on requestIdleCallback (setTimeout fallback), serialized one GET at a time, routed through the SAME shared per-trigger gate as the hover warm (`warmTrigger`: disabled skip → the `"false"` opt-out → URL-cache dedup → in-flight reserve + fetch) so the two warm paths cannot drift and whichever fires second is a no-op; skipped entirely under Save-Data; triggers injected after the pass keep the delegated hover warm; staleness matches the shipped no-TTL hover semantics — the opt-in accepts the wider warm→open window. (6) #B139 (2026-07-20, 0.5.22): the content cache no longer outlives the open it warmed — measured pre-fix it was a ONE-GENERATION-LAGGING store (every open after the first paid ~1 GET yet rendered the PREVIOUS open's fetch: the leftover entry — the #B54 in-flight adoption's repopulated body, or the around-open re-warm — blocked the fresh warm's dedup; NO invalidation path existed, close/unbind/destroy never touched the cache; reproduced back to 0.5.4, so it predates #B54 and the eager pass). Fix: close clears the popin's content-URL slot (stamped at consumePreload both branches + popinLoad) AND re-sweeps the same slot ~120ms later, because the close-time a11y focus-return and pointer re-hover fire TRUSTED synthetic intents that re-warm the slot with close-era content within 1ms of the close (measured; a raced sweep is benign by construction — at most one extra fetch, never staleness, since an adopted in-flight body still reaches its open through the waiter chain). AND `preload="false"` triggers now skip the cache READ at open on both open paths — `false` is the hard always-refetch spelling for volatile popins (its GET always happens at open, never from a same-URL sibling's warm); no new annotation vocabulary. Warmed-never-opened entries keep the page-lifetime eager semantics above; default triggers pay at most one extra idempotent GET per close (the swept synthetic warm). Content preload deliberately does NOT ride 103 Early Hints: popin responses vary on `X-Requested-With` (a non-XHR GET of a fragment layout gets the iframe-wrap variant and misses the scripts append), and a browser `Link rel=preload` fetch never carries that header — wrong-variant bytes or a double GET, with no success branch; `self.setEarlyHints()` remains the right tool for a popin's STATIC subassets (the CSS/JS it injects via getScript/getStyle). (7) #A11Y8 (2026-08-05, 0.6.4): the background-`inert` loop in `applyNonModalShims` skipped `instance.target` — the shared `.gina-popins` container — and since every popin lives INSIDE that container, and `popinOpen` never closes the popin it supersedes (it only overwrites `activePopinId`), opening a second NON-MODAL dialog left the first one fully keyboard-reachable behind it: a user could tab out of the dialog on screen and into a stale one. Non-modal is the FRAMEWORK DEFAULT for `data-gina-dialog` (`resolveModal` falls through to `return false` at step 5; only a legacy `data-gina-popin-name` trigger is unconditionally modal), so this was the ordinary path, not an exotic one — note item (2)'s "native modals in EVERY env" predates the non-modal branch and now describes LEGACY triggers only. Fix: descend into the container instead of skipping it, and inert sibling `dialog[open]` ONLY — a `<dialog>` without `open` is already `display:none` per the UA stylesheet, so it is unreachable without help (measured in Chrome with controls firing both directions; the modal path was never affected, native `showModal()` handles the top layer itself). Teardown needed NO change: `removeNonModalShims` sweeps `[data-gina-popin-inert]` document-wide, so dialogs nested in the container restore without it knowing they exist. The `getAttribute('inert') == null` guard means gina only marks what it set, so a consumer-set `inert` is never stamped and never stripped. All seven are browser-bundled — prod dist rebuild required; verify (2), (3), (4) and (5) with a REAL preemptive-open / preload / redirect-tunnel consumer — a minimal smoke page is falsely green; (7) needs TWO popins open at once, the only scene in which it differs at all. (8) **A trigger gate must not trust the native `disabled` ATTRIBUTE on an element the browser already enforces (#B296, 0.6.5).** The three DISPATCH-time gates (`openFromTrigger`, the `bindOpen` document proxy, the per-`$element` listener) now require `!('disabled' in $el)` before the attribute counts, mirroring the validator's `isTriggerDisabled` (#B293) so the two subsystems agree on what "disabled" means. Rationale, measured: a natively-disabled `<button>` delivers **0 clicks to JS**, so the attribute arm could only ever fire on a `disabled` written DURING the dispatch — the shape of every consumer double-submit guard — which ate the open and then cleared the attribute, leaving nothing marked and a normal-looking control; on an `<a>`/custom element/span the browser enforces nothing, so the arm is KEPT (`'disabled' in $el` → `button:true · input:true · anchor:false · custom-element:false · span:false`). It also cannot weaken gina's OWN re-entry guard: `armPopinTrigger` arms `<a>` with `aria-disabled` (untouched arm) and every other tag with native `disabled` — enforced by the browser for real controls, and still enforced by this gate for `<span>`-likes, which is exactly the branch the `in` test preserves. **Two gates are deliberately NOT changed:** the hover/focus `warmTrigger` preload gate (removing it there would start PRELOADING a `<button disabled>` nobody can click — if it ever changes it wants the IDL property `$el.disabled === true`, not the ignore treatment) and the bind-time `$link` skip (structurally unreachable by a mid-dispatch write, and it carries a different one-arm predicate). **Reachability is unequal and the difference is load-bearing:** at `openFromTrigger` gina's proxy is DELEGATED so a button-bound guard always wins the race (plain #B293 shape reproduces); at the per-`$element` listener gina binds to the NODE, so only a CAPTURE-phase or earlier-registered guard can poison it (measured both ways — a target-phase guard bound after gina's does NOT reproduce); the legacy document-proxy site is traced-not-exercised. Test `test/e2e/popin-trigger-native-disabled.spec.js` — a replica cannot catch this, it is an ordering interaction between a consumer listener and a delegated proxy. ⚠️ **Scene trap for anyone writing a popin close-button test:** the close element must carry NO `id` — gina assigns `popin.close.<n>` only to an id-less one and the dispatch gate matches on that prefix, so a consumer id makes EVERY arm read "did not close", subtract control included (that is its own defect, #B299). (9) **A teardown loop must never splice the array it is walking (#B265, 0.6.5).** `popinUnbind`'s validator-form teardown spliced `$popin['$forms']` inside a `for` bounded by a length captured BEFORE the loop, so each splice shifted the array left under an incrementing cursor and the read index skipped one every time — the originally ODD-indexed forms were never destroyed and were left behind in the very array the loop exists to empty. Because the popin's `innerHTML = ''` runs BEFORE the loop, their surviving validator entries pointed at already-detached nodes, and `validateFormById`'s "return existing when available" early return then handed the stale entry back on the next open, so the form and its submit trigger came up silently inert — the same end symptom as #B294 by a completely different route. Fix: snapshot with `.slice()`, clear once with `.length = 0`, iterate the snapshot. **Two things worth carrying beyond this bug.** First, `destroy()` is not free: it fires `destroy.<formId>` (validator `main.js:4241`) and `'destroy'` IS on the plugin's public registrable-event list, so making a skipped form destroy properly starts firing consumer `on('destroy')` callbacks that never fired before — a teardown fix is a behaviour change, not merely a leak fix. Second, per-form teardown is now wrapped: `destroy()` → `unbindForm` → `getFormById(vFormId)` THROWS for a form holding a `data-gina-form-virtual` file input once its virtual form is unresolvable, which is precisely the detached state every form is in at that point — and before the guard, one such throw silently abandoned every LATER form in the loop. **Reachability is much narrower than it looks and must not be overstated:** the loop is gated on a validator — since #B756 (0.7.2) the one the POPIN was registered with (`$popin.options.validator`, falling back to the closure's `$validatorInstance`); before, the closure alone, a PER-INSTANCE value assigned only from `options.validator`. Gina's own boot does `new Popin({name:'gina-dialog-boot'})` with no validator, and the delegated `data-gina-dialog` listener is installed once by that boot instance (module guard `_ginaDialogDelegated`), so **the declarative dialog path can never reach this code** — it needs a popin constructed with a validator (`new Popin({name, validator})`, the legacy popin API). #B756 was the closure gate's own defect: `gina.popin` IS that validator-less boot instance, so the documented `gina.popin.close(name)` skipped a validator-registered popin's teardown and the reopened form came up unbound (`validateFormById`'s early return again — a third route to the #B265 symptom), while the popin's own `close()` and its close button run the registering instance and always tore down. A client navigation took the same route: gina/nav's fragment swap closes the active popin through `gina.popin.close(name)` (`closeActivePopin`), so a validator popin still open when a navigation swapped the page skipped the teardown too (measured on pre-0.7.2 bundles). Since #B762 (0.7.3) that close runs BEFORE the swap moves focus to the region and applies its scroll decision: run after them, closing the popin returned focus to its trigger and scrolled the page back down to it, modal and non-modal popins alike (an open popin inerts the page outside it, so the region could not take focus); e2e `nav-popin-close-focus-b762.spec.js`. Pins: arm 04 of e2e `validator-upload-popin-reopen-b733.spec.js`, and e2e `validator-upload-popin-reopen-nav-b756.spec.js` for the navigation. That is also why the test is a replica + source pins (`test/core/popin-forms-teardown.test.js`) rather than an e2e arm: an e2e scene on the declarative path would be VOID, every arm reading "nothing destroyed" for a reason unrelated to the defect. (10) **Never re-derive an element's ROLE from its id when the call path already proves it (#B299 + #B301, 0.6.5).** `register()`'s close branch gated on `/^popin\.close\./.test(event.target.id)` — a prefix gina mints at bind time — and that single line carried TWO silent defects: gina assigns the prefixed id **only to an id-less element** (`:1560`), so a consumer-supplied id is taken verbatim and matches nothing (**#B299**); and `event.target` is whatever was actually CLICKED, so an icon nested inside the button matches nothing either (**#B301** — the ordinary `<button class="gina-popin-close"><svg/></button>`, and by far the wider case). Both are invisible: `cancelEvent` runs at the top of the listener, so the button also swallows its own default — no error, no navigation, nothing. Fix: read **`event.currentTarget`** (the element `register()` bound — a `.gina-popin-close` by construction, since that function has ONE call site fed only from `querySelectorAll('.gina-popin-close')`) and treat a `popin.click.*` id as the sole exception, which preserves the dual-role element (a trigger that is ALSO a close button — reachable because `bindOpen` scans `document`, not just the host page). ⚠️ **What must NOT be "fixed" instead: rewriting the element's id.** The `$close` teardown sweep removes this listener via `gina.events[eId] == eId` — the degenerate name===id entry that `events.js:42` produces — so decoupling the event name from the id leaks the listener; and overwriting a consumer id would break their selectors, `aria-labelledby` and test hooks. Contrast `bindOpen:1195-1203`, which takes the OPPOSITE policy and does clobber a consumer id on trigger elements. Measured with controls firing both directions on the real bundle (id-less closes / consumer-id does not / nested click does not / patched all close), test `test/e2e/popin-close-dispatch.spec.js`. The dual-role branch reads `event.currentTarget` for its dispatch as well (**#B995**, 0.7.7): it read the event name from `event.target.id` and dispatched on the clicked node, so a click on markup added inside the element after `bindOpen` stamped it (markup with no `proxyClick` listener of its own; markup present then has one) matched nothing and did nothing. The shape is reached only when `popinBind` binds the close button BEFORE `bindOpen` rewrites its id (an in-page dialog opened, then an AJAX popin registered whose legacy trigger sits inside it): in the other order `popinBind` skips it (`gina.events[evt] == id`), and a late node dies in the document proxy instead, which still reads `event.target.id` (#B1009, open, LOW). Tests `test/core/popin-dual-trigger-nested-b995.test.js`, e2e `test/e2e/popin-dual-trigger-nested-b995.spec.js`. (11) **gina's own in-flight arm must be honoured by the path that dispatches it — a legacy trigger re-fired during its own load (#B298, 0.6.5).** `armPopinTrigger` marks an `<a>` trigger `aria-disabled="true"` for the duration of its popin's load (every other tag gets the native `disabled`, which the browser enforces). But the ONLY dispatch route for a pure-legacy `data-gina-popin-name` trigger is the `bindOpen` document click proxy, whose predicate tests the native attribute ALONE — and an `<a>` never carries it here — so a second click during the load reached the open handler and issued a SECOND XHR. `bindDelegatedOpen` returns early for a trigger carrying neither `data-gina-dialog` nor `data-gina-dialog-src`, so `openFromTrigger`'s own `aria-disabled` arm never covered this population. Fix: gate at the top of the legacy per-element open handler, predicate copied VERBATIM from `openFromTrigger` (native arm included, so #B296's `!('disabled' in $el)` rule still holds). **Gating THERE rather than in the proxy is load-bearing, and was MEASURED rather than reasoned:** a trigger's direct children each get their own listener from `proxyClick`, which fires the custom event DIRECTLY and never passes the proxy predicate at all — a proxy-level gate still let the child-click route fire twice, while the handler-level gate stops both (both routes converge there, and `currentTarget` is the element `bindOpen` bound, so child markup cannot dodge it). ⚠️ **Reachability is narrower than it looks, and the scene is easy to get wrong:** a real click HOVERS first, which warms the preload (`warmTrigger` reads `data-gina-popin-url` too), and the click then ADOPTS that in-flight fetch instead of calling `popinLoad` — so nothing is ever armed and the question goes unasked (a probe without the opt-out reads 1 request for a reason unrelated to the gate, its own counter-can-read-2 control failing). The defect needs the documented `data-gina-dialog-preload="false"` opt-out (#B91) — i.e. exactly the triggers whose GET has server-side effects, which is why it is not cosmetic. Whether a no-hover activation (touch, some keyboard paths) is a second reachable population is UNMEASURED. Test `test/e2e/popin-legacy-trigger-aria-disabled.spec.js` (4 arms, red-first; the two fix arms failed 2-vs-1 on the pre-fix dist while their scene/armed/click assertions passed, so the red is attributable to the defect). (12) **A click adopting a still-in-flight hover/focus preload is a genuine wait — it now arms the trigger exactly like the cold click-time XHR (#B285, 0.6.5).** Both consume branches previously armed NOTHING (only a preOpen popin got its skeleton), so with warm-on-intent preloading the COMMON open path showed no busy affordance at all. `consumePreload` gained a guarded 4th param `onSettled`, fired synchronously after the ready (cached) apply and at the TOP of the adopted waiter — success AND failure, release-before-apply, the cold readyState-4 order. The CALLERS own the affordance (arm on adopted-wait only via a settled-flag; release via `releasePopinTrigger`, armPopinTrigger's mirror), keeping `consumePreload` loading-state-agnostic — load-bearing for the extract-and-execute test harness, which injects neither `document` nor `loadingState` and calls with ≤3 args (the guard makes the 4th a no-op), and the right factoring anyway (it reports that it settled; callers decide who cares). The ready branch's SYNCHRONOUS settle is equally load-bearing: without it a caller cannot distinguish ready from in-flight and would arm forever — an instant cached open never flashes a busy state. Double-click protection during the wait comes free from EXISTING mechanisms (the entry gates refuse an armed trigger; the browser suppresses a disabled `<button>`), and the failed-adoption leg releases before the click-time fallback re-arms through popinLoad's own path. Playwright note: an armed `<a>` reads [disabled] in the accessibility tree, so Playwright's own actionability check refuses to click it — a second-click scene needs `force: true` (a real pointer is NOT blocked on aria-disabled). e2e `test/e2e/popin-preload-loading-state.spec.js` (5 arms, red-first: 4 red on the pre-fix dist, ready-branch no-arm control green on both). (13) **A free variable inside a `try` turned every successful JSON load into a fabricated server error (#B315, 0.6.6).** `popinLoad`'s readyState-4 2xx branch dispatched `success.<id>` on `$forms[0]` — but the module's sole `var $forms` is declared in `popinBind`, a SIBLING function under `Popin`, so reading it threw `ReferenceError` straight into that same handler's `catch`, which fabricates `{status: 422, error}` and fires `error.<id>`. `success` therefore never reached a subscriber at all. ⚠️ **The observable is worse than a stack trace, and that is the part worth carrying:** the catch overwrites `result.error` with `JSON.parse(xhr.responseText)` whenever the response is `application/json`, and the throwing line is reachable ONLY for JSON (a non-JSON body returns early at the `loaded.` trigger just above it) — so the consumer received a **422 whose payload was the SUCCESSFUL response body**, reading as a server-side failure that never happened. Fix: dispatch on `$el`, matching the two sibling triggers in the same handler (`loaded.`, `error.`) — `popinLoad` is the CONTENT loader, so a JSON response need not involve a form at all; the `$forms[0]` target was copy-paste from a validator context, whose commented-out `handleXhrResponse` line still sits directly above it. Reproduced BEFORE fixing (a replica of the readyState-4 2xx branch with two firing controls: non-JSON → `loaded`, `location` → early return); tests `test/core/popin.test.js §34` (4 — scope pin, single-declaration-plus-position pin, dispatch-target pin, dist-fidelity pin; both source pins validated RED against the pre-fix source, the dist pin RED before the rebuild). ⚠️ **The registry's other two events still never fire (#B315b):** `progress`'s entire `xhr.onprogress` block including its `triggerEvent` is commented out (dead by construction, with its `ontimeout` sibling), and `click` has ZERO `triggerEvent` sites anywhere — the `popin.click.*` identifiers are per-element DOM event names in a different namespace. Both still register cleanly through `on()`, so the surface advertises three events and delivered none; their disposition is a DESIGN question (implement, or drop them from the registry so the surface stops lying) and was deliberately NOT folded into this fix, which was an unambiguous defect. **The popin `::backdrop` rule is scoped to gina's own dialogs (#B329, fixed 2026-08-24).** The sheet shipped `dialog::backdrop` (dark overlay + blur) UNSCOPED, painting gina's backdrop on EVERY consumer `<dialog>` on the page; now `dialog.gina-popin-container::backdrop`, matching the reduced-motion rules that were already scoped. Both dialog-creation sites set the container class on the `<dialog>` element itself, so gina's own popins keep their backdrop. Consumer-visible: a page relying on the free backdrop for its own dialogs styles them itself now, and a popin dialog element supplied by the page's own markup (the adopt-by-id path) needs `gina-popin-container` to keep gina's backdrop. Pins: `popin-backdrop-scope.test.js` (source + compiled twin + `gina.min.css`, present/absent controls). Browser-bundled ⇒ consumers restart AND re-bake. **A form's or a link's `text/html` XHR answer is routed by the popin the SUBMITTING element is inside, never by "the active popin" (gh#76 + #B571, 2026-09-20).** The validator captures `gina.popin.getPopinContaining($form)` into the per-send closure at submit (the same capture stamps the `X-Gina-Popin-Id`/`-Name` request headers, so `self.isPopinContext()` is true only for a contained form) — and since #B572 (2026-09-22) the STAGED-UPLOAD path makes the same capture once per file selection (`$ownerPopin = getPopinContaining($el.form || $el)`, `$el.form` being the consumer's real form), so the virtual `gina-upload-*` form, its preview lookups, its `uploadProperties.isPopinContext` flag and its staging request belong to the popin the REAL form is inside, or to `document.body`. It was the LAST surviving `isPopinContext()` (« some popin is open ») gate: a PAGE form's file chosen while an unrelated popin was open had its virtual form appended inside that popin — staging 200, all ten hidden metadata fields EMPTY, the save posted without the file, the staging request claiming that popin's id, zero errors — reachable through the file-picker race (the OS picker is application-modal and ignores `inert`, which blocks only the click path) and through script-assigned `input.files`; a form INSIDE the popin was always fine and still is (measured 10/10 both ways). Dev-mode notice `[FormValidator][popin] the staged upload of `#<input>` (form `#<form>`) is placed with its own form …`, from `warnIfOldRulePlacedUpload`, the twin of `warnIfOldRuleRouted`; the popin branch's `$target` DOMParser copy is deliberately untouched (measured working when chosen by containment). Pins: `test/core/validator-upload-popin-containment.test.js` (block-scoped absence pin + the helper driven in a lifted scope with every free identifier supplied), e2e `validator-upload-popin-containment.spec.js` (page form + open popin, the picker race, and the inside-the-popin control, red-first through `B572_PREFIX_BUNDLE`). **A popin close + reopen re-stages, and same-named staged inputs in two forms stay apart (#B733/#B732, 0.7.2):** the file-input change handler reuses a virtual `gina-upload-*` record's element only while it `isConnected`; a detached record is `destroy()`ed (its listeners and their registry entries go with it), deleted from `$forms`, and a new virtual form is built — it used to fall back to `getFormById()`, which returns the validator RECORD, and use that record as the element, so after a popin close (the content is wiped, nothing destroys the virtual form) every selection threw `setAttribute is not a function` and staged nothing. The virtual id of a bracket-less name ends with `-<form id>` (`gina-upload-doc-<formId>`; a bracketed name already carried the form id, once per `]`, and is unchanged) — `gina-upload-doc` was shared by every form, so the second form's upload filled the FIRST form's hidden fields and left its own empty; a listener or selector matching a bracket-less virtual id literally must read the input's `data-gina-form-virtual` instead. Same-named staged inputs inside ONE form still share a virtual form (their hidden-field names collide too). Pins: e2e `validator-upload-popin-reopen-b733.spec.js` (4 arms, incl. #B756's `gina.popin.close(name)`) and `validator-upload-same-name-b732.spec.js` (2 arms), red-first on the pre-fix dist. For a submit, the validator honours its capture at settle only while that popin is still open AND its element still contains the form (a close + reopen in flight detaches the form ⇒ legacy payload); anything else — a page form while a popin is open OR loading — is the legacy handler-only `{contentType, content, status}` payload, with a dev-mode `[FormValidator][popin]` notice naming the popin the old rule would have targeted (it REPLACED an open popin's content, or raised a false `422` `Popin x is not open !` on a loading one — the loading window is reachable through a preload-opted-out trigger, never a hovered default one, whose click adopts the warm). The popin branch now also emits the `.hform` (validator) / `.hlink` (`utils/events.js`, whose `.hform` half is dead — no caller passes `$form`) companions with the parsed xhr-data, so declared callbacks run for forms inside popins (#B571). `getActivePopin()` returns OPEN popins only — the `activePopinId` one when open, else the first open — never a registered-but-not-open one (§8(a)); `popinLoadContent` honours `this` when called as a method (both internal sites use `.call($popin, …)`, the manager-level call keeps the active fallback); the redirect branch resolves `sendCtx.popin || (result.popin ? getActivePopin() : null)` — a plain `location` redirect from a page form falls through to the page redirect (measured pre-fix: it loaded INTO the open popin AND navigated, two fetches), a name-less `{popin:{close}}` with nothing open is a no-op. `getPopinContaining` walks the registry with `getElementById(id).contains(el)` (innermost wins; the element id is the popin id on every flavour; 0.2 µs worst case) — a non-modal popin still inerts the page, so a page form can only be submitted by script while one is open, which is what the request-side arms of `test/e2e/validator-popin-form-target.spec.js` do. Companion `test/e2e/popin-preopen-modeless.spec.js` pins #B574 (`popinOpen` guard `hasAttribute('open')`). Browser-bundled ⇒ consumers restart AND re-bake. **#B575 (0.6.32) — the two hidden transport inputs are DEV-ONLY, and both popin branches now parse tolerantly.** `spliceXhrInputs` runs only under `_isDev` (`NODE_ENV_IS_DEV === 'true'`), so outside dev mode a `renderWithoutLayout` answer carries NO `gina-without-layout-xhr-data`/`-view`; both branches dereferenced `.value` on the absent element, the `TypeError` was caught INSIDE the try and surfaced as a false `422` error callback AFTER a successful server write, and the popin was never loaded. One shared `parseXhrHtmlAnswer()` now returns `{doc, data, view}` with `data`/`view` `null` when absent and the two inputs STRIPPED from the parsed document (they are consumed transport — left in, a swap into a region inside a `<form>` would resubmit them and repeated swaps would duplicate their ids). ⚠️ The parsed data is delivered VERBATIM when present — injecting a `status` key would change the payload every contained form already receives (the slice-1 contract `validator-popin-form-target.spec.js §05` pins) — and the payload is `{status}` only when the inputs are absent; `validator-form-target.test.js §06` pins that absence SCOPED to the popin branch, since `result.status = xhr.status` is legitimate elsewhere (the legacy payload builders in `utils/events.js`). (14) **`data-gina-dialog-target` is ONE selector applied on BOTH sides, with THREE fallbacks — all announced in dev mode since #B580 (2026-09-22).** `applyContent($el, html, $popin, partialTarget)` reads the slot with `$el.querySelector(partialTarget)` and the incoming region with `parsed.querySelector(partialTarget)` over a `new DOMParser()` document, then assigns `$slot.innerHTML = $incoming.innerHTML` — the SLOT ELEMENT survives, which is what preserves chrome and its bindings. The three misses are all fail-soft (a popin open is a retryable read, unlike a submit): a selector the ENGINE REFUSES ⇒ full replace — pre-#B580 this threw an uncaught `SyntaxError` out of the `loaded.<id>` handler / preload-consume tail, so the dialog silently kept its previous content (MEASURED on the real bundle: `Failed to execute 'querySelector' on 'Element': '#slot >' is not a valid selector.`); no match in the OPEN DIALOG ⇒ full replace; no match in the ANSWER ⇒ the whole `parsed.body` into the slot — the SECOND fallback, which the published guide did not mention and nothing pinned. `warnPartialTarget()` emits one `console.warn` per event naming the popin, the selector and which fallback ran, gated on `gina.config.envIsDev`. ⚠️ Testing surface: the e2e harness (`test/e2e/runtime-server.js` serves `envIsDev:'false'`) can assert only the FALLBACK — the NOTICE belongs to `popin.test.js §22`, which drives the REAL brace-walk-extracted function, because the §21 replica omits `$popin` and mirrors the pre-fix body; keep `applyContent`'s signature and first `if ( !partialTarget )` branch byte-shaped or the regex pins at `popin.test.js:1121-1130` and `popin-reload-open.test.js:61` go red. ⚠️ The attribute is the dialog-scoped sibling of `data-gina-form-select`, NOT of `data-gina-form-target`: one selector, both sides, nothing resolved relative to an element, so the `this`/`closest x`/`find x`/`next x` grammar does not apply — all four are valid CSS, so writing one takes the silent fallback instead of reporting a mistake. ⚠️ The "legacy triggers get a full replace" rule covers PURE legacy only: `bindDelegatedOpen` returns early ONLY for a trigger carrying NEITHER `data-gina-dialog` NOR `data-gina-dialog-src`, so a MIXED trigger (legacy attributes + `-src`) routes through `openFromTrigger` and DOES get the partial swap. (4) **Listener ledger discipline — `reBind()` never stacks, `destroy()` detaches (#B585, 2026-10-07).** `bindForm` records every listener it attaches on the record (`$form.boundListeners`: the form-level proxies, `validate.<id>`/`reset.<id>`, the native `submit` proxy, the live-check / autocomplete / select / file / checkbox / radio handlers and the submit trigger's own listener — `addListener` returns the callback, so each existing call is wrapped in a push and keeps its text) and `unbindForm` detaches exactly those by reference, releases the registry keys the binding wrote, clears the `registered.<id>` live-check flags and releases the submit trigger's marks (`data-gina-form-submit-trigger-for`, the `__ginaSubmitBoundFor` expando) with the record's `submitTrigger` claim, so the next bind — a `reBind()`, or a fresh same-id record after `destroy()` — claims and binds the trigger as a first bind does. Before it, `unbindForm` detached NOTHING: its nine form-level `removeListener` calls passed the validator RECORD (no `removeEventListener`), and `utils/events.js removeListener` with no 4th argument detaches nothing anyway — `gina.events` is a NAME → element-id registry that holds no callback, so deleting a key never detaches a handler, and the 4th parameter is a COMPLETION callback (handed to `removeEventListener`, then invoked): never pass a DOM handler as it. `on()` records the wrapper it attaches on the handle (`consumerListeners`); a `.on()` handler and the declarative `data-gina-form-event-on-*` hooks survive a `reBind()` (their keys stay, so the form-level submit proxy still routes a NATIVE submit — `requestSubmit()`, Enter in a form without a submit button, a wrapped-label click; a click on the trigger ends in `validate.<id>` directly — to `.on('submit')`, and a re-registration is dropped by the add-once guard rather than stacked); `destroy()` fires `destroy.<id>` then removes them — only while the form is still in the document: the popin teardown destroy()s a form AFTER its content was replaced (`popinLoadContent` writes the new innerHTML before `popinUnbind`) or cleared, and the validator's popin branch then dispatches `success.<id>` on that old, detached form after `loadContent()`, so a detached form keeps its `.on()` handlers (they die with the element) while its keys are released for the same-id successor — the first cut drained them and five e2e arms lost their declared success callback. The one `window` listener each live-checked field registered through the browser's own `addEventListener` with gina's 4-argument shape is gone. Consumer-visible: the Safari N-characters-per-keystroke symptom after repeated re-binds (#B135's interception stacked one keydown per re-bind) and a belt restoring a form's `gina.events` keys after `reBind()` are both retired; a consumer that destroy()s a form and binds it again gets a clean record that claims its submit trigger (pre-fix the stale listeners of the destroyed binding answered the click). Pins: `test/core/validator-unbind-ledger-b585.test.js` (structure + executed arms + dist fidelity) and e2e `validator-rebind-listeners-b585.spec.js` (a live-listener ledger over `EventTarget.prototype.add/removeEventListener`, keyed by element id — an old and a new element sharing an id count together; `GINA_B585_PREFIX_BUNDLE=<pre-fix gina.min.js>` runs it as the subtract arm). **A re-bind keeps the rule set a form names with `data-gina-form-rule` (#B879, 0.7.5).** A bind given no rule — `reBind()`, `.bind()`, `getFormById()` on an unbound form — resolved the rule set by the form's id alone, while the first bind is handed the attribute's rule by its caller (the boot scan, `initForm`, `validateFormById`), so a form whose id names no rule set was re-bound with `{}`: no field live-checked, no bind-time silent validation, and the trigger kept its gated mark and refused the first click on a valid form. Before #B585 the first bind's listeners outlived the re-bind (and a consumer belt restoring the form's `gina.events` keys revived them), which hid the defect; the detach exposed it. `bindForm` now reads `data-gina-form-rule` before the id when no rule is given, adopting it only when it names a known rule set. Pins: `test/core/validator-rebind-rule-b879.test.js` (structure, the step extracted and executed, dist fidelity) and e2e `validator-rebind-rule-b879.spec.js` (types with `keyboard.type` and reads the gate after the re-bind; `GINA_B879_PREFIX_BUNDLE=<pre-fix gina.min.js>` runs the subtract arm). Browser-bundled ⇒ pickup is restart AND re-bake. **Live-check coverage, `reBind(id, rules)` and a bare `unbind()` (#B884, #B886, #B880 + #B802, #B881, #B922, 0.7.5).** `addLiveForInput` wired a control only when it had a rule of its own, so a field that only a `_case_<driver>` condition gives rules (`{ ref: { isRequired: true }, _case_kind: { conditions: [{ case: 'b', rules: { extra: { isRequired: true } } }] } }`) got no live listener: once the case applied (the pass gives `extra` the condition's rule, in its own copy of the rules since #B885), typing into it never re-ran the whole-form pass, so the trigger kept its gated mark and a click sent nothing. A field that a `_case_` condition's `rules` names by EXACT key — or, since #B921, matches by a RegExp key read as the expansion reads it, the driver aside — is now wired at bind (`isCaseConditionTarget`, consulted at both of `addLiveForInput`'s gates: the no-rule return and the listener branch); until the case applies its field pass finds no rule and stage 2 re-checks the form; that field pass leaves the submit trigger to stage 2 (#B922: it read valid, so `handleErrorsDisplay`'s no-error branch marked the form ready, and the show branch's `disabled = false` undid a native `disabled` a page script had just set on that field's `change`, before stage 2 gated the form; `handleErrorsDisplay` now takes `isSubmitTriggerLeftToFormPass`, which `processEvent`'s valid branch passes as `isCaseTarget`, every other caller unchanged), and the listener is ledgered like any other, so `unbind`, `reBind` and `destroy` detach it. The input-type allowlist also left out `tel`, `url`, `search`, `time`, `datetime-local`, `month` and `week`, so a rule-bound field of those types got no live listener either; they are admitted now (`range` and `color` stay out, unmeasured). `forEachField` iterated `for (rule in errors[field])` with no declaration, writing a GLOBAL `rule` on the first validation that found an error, and `reBindForm` tested `typeof(rule)` (that global) instead of its `rules` parameter, so `reBind(id, rules)` honoured `rules` only after some error on the page: now `for (let rule …)` and `typeof(rules)`, and a page variable named `rule` is no longer overwritten. `unbindForm` had no `this.target` fallback, so `$forms[id].unbind()` threw « could not unbind form `undefined` » and left the form bound; it now unbinds the handle's form (and its non-element branch no longer reads an undeclared `err`). Pins: `test/core/validator-client-cluster-b884.test.js` and e2e `validator-client-cluster-b884.spec.js` (`GINA_B884_PREFIX_BUNDLE=<pre-fix gina.min.js>` runs the subtract arms); #B922: `test/core/validator-case-target-trigger-b922.test.js` and e2e `validator-case-target-trigger-b922.spec.js` (`GINA_B922_PREFIX_BUNDLE=<pre-fix gina.min.js>`); a harness that lifts `addLiveForInput` out of its closure must now hand it `isCaseConditionTarget` too (`validator-radio-livecheck-dispatch.test.js` passes the real extracted helper). Browser-bundled ⇒ pickup is restart AND re-bake. (15) **A popin's document click proxy claims a trigger only when its instance id is followed by `-` (#B876).** Each `new Popin()` registers a document click listener whose predicate is the cached `_rePopinClick`. Instance ids are `'gina-popins-' + _nextId()` (`gina-popins-gp-1`, `gina-popins-gp-14`, … from one shared counter, which triggers also draw from, so a page reaches colliding ids easily) and every engine-built click trigger id is `popin.click.gina-popin-<instance.id>-<_nextId()>-<name>`. Built without the delimiter, the regex of `gina-popins-gp-1` also matched the triggers of `gina-popins-gp-14`: one click fired two proxies, the popin loaded twice and the second load replaced the bound form, which then submitted natively. Fixed by `instance.id + '-'` in the regex. Pin: `test/core/popin-click-prefix-collision-b876.test.js` (drives the real construction sliced from the source and both dist files, with ids built the way the source builds them; seams `B876_POPIN_SRC` / `B876_PLUGIN_DIST` — a published npm package ships only `dist/`, so take `popin/main.js` from the matching git tag). Browser-bundled ⇒ pickup is a re-bake.
968
968
 
969
969
  214. **Per-request routing-clone correctness — narrow the defensive clone, and propagate mutations onto returned clones (consolidates former #194/#195; #B52-residual, 2026-06-18).** The router's per-request `options.conf = JSON.clone(conf)` — a multi-MB deep clone of the ENTIRE bundle config per matched request, held for the request's whole query+render window — was narrowed to: shallow-copy the top level + `conf.content`, deep-clone ONLY `conf.content.routing`, the one subtree actually MUTATED per request (audited: every other per-request write is a whole-subtree REASSIGNMENT a shallow copy isolates, and plugins/connectors/models read config via their own clones, never through the request's) — removing a dev/high-load heap high-water-mark proportional to config size (measured 163→62 MB peak under 150 concurrent slow requests, drains on idle). **Narrowed again — the routing deep clone is retired too (#P40 S3b, 2026-09-09):** the only per-request write on that subtree is a whole-property REPLACEMENT on the MATCHED rule (`options.conf.content.routing[options.rule].param = params.param`), and `params.middleware` — the array `processMiddlewares` splices — is already the request's own copy from the matcher; so `this.route` now shallow-copies the routing map and shallow-copies the matched rule only, every other rule staying shared by reference (the deep clone cost ~5 µs at 8 routes and ~290 µs at 380 on the dev host, on every matched request, for a map nothing else mutates). Pinned by `test/core/router-per-rule-copy.test.js` (source pins with a comment-strip control + a behavioural compiled from the shipped source whose shared-rule arm discriminates against the deep clone) and the realigned `test/core/router.test.js §11`. Rule: copy only what a per-request write actually touches, at the granularity of the write — a whole-property replacement needs a shallow copy of its parent, never a deep clone of the tree — and share the immutable remainder by reference; but audit EVERY per-request writer first, or a missed mutate-into-a-shared-subtree reintroduces cross-request contamination. Sibling: `getRouteByUrl` (server-side redirect/relative-route resolution AND browser-bundled) aliased the shared route config's `param` by REFERENCE while the matcher rewrites `param.{path,namespace,file,title}` in place for `:placeholder` routes — request A's substitution contaminated request B (server) and repeat navigations (client). The fix is TWO coordinated edits, not just "clone the alias": clone `param` per request AND propagate the substituted param onto the returned route object — the function returns a fresh clone of the SINGLETON, so cloning alone returns the un-substituted `:placeholder` and regresses even the first request. Rule: when a matcher both aliases a shared config object and returns a re-clone of that object, isolating the alias is insufficient — propagate the per-request mutations onto the returned clone. The sibling is browser-bundled → prod dist rebuild. **The substitution itself is a FUNCTION replacer (#B688, 2026-10-06).** `fitsWithRequirements` (the request path) and `checkRouteParams` (`getRoute()` and the matched request) write the placeholder value into `param.{path,title,namespace}`; a string replacement (`.replace(regex, value)`) expanded `$`-patterns found in the value — a request to `/user/$%60` turned `"title": "User :id"` into `User User ` — and dropped the `/` its `(:v/|:v$)` regex consumes (`/users/:id/edit` → `/users/42edit`). Use the shared `replacement` helper (it restores the `/`) or `function () { return value; }`, as `param.file` and the url always did. **Third member of the same family — do not COPY a key the source does not have (#B423, 2026-08-26).** The `setOptions` per-request loop that refreshes each cloned rule's `host`/`hostname` from `envConf.routing[r]` copied both unconditionally, for EVERY rule. But `config.js`'s host/hostname defaulting deliberately EXCLUDES `param.control === "redirect"` rules (`… && !/^redirect$/.test(routing[rule].param.control)`), so those keys are **ABSENT** there — and `target.k = source.k` on an absent `source.k` CREATES an own property valued `undefined`. The write lands on `envConf._routingCloned`, which is cached for the PROCESS LIFETIME, so the poisoning is permanent: every later no-arg `getConfig()` → `JSON.clone(local.options.conf)` then hit `source[key] === undefined` and emitted the clone's `"should not be left \`undefined\`. Assigning to \`null\`"` warn — one `host` + one `hostname` per redirect rule per clone, forever (a consumer measured it as ~76% of that log line's volume, drowning the genuine warns it exists to surface). Fixed by existence-guarding both copies (`typeof(source.k) != 'undefined'`), so absent stays absent. **Two gates bound the surface, both measured:** the whole block sits inside `if ( typeof(local.options.template) != 'undefined' && … )` — TEMPLATE/view routes ONLY, so an API-only bundle never reproduced it — and the copy loop is `_isRoutingUpdateNeeded`-gated. **Rule: in a refresh-the-clone loop, an assignment is not free — copying an absent key MANUFACTURES an `undefined` the clone utility is right to complain about. Guard the copy, never the warn** (silencing `JSON.clone`'s warn would hide a signal the framework deliberately emits), and never "fix" it upstream by giving redirect rules a host — that exclusion is intentional. Server-side only (controller.js is not browser-bundled — verified by dist token grep with a firing control) ⇒ restart, no re-bake. Tests: `test/core/controller-routing-host-copy.test.js` (source pins on the guard + the upstream exclusion, plus a real-`JSON.clone` behavioral whose SUBTRACT arm runs the pre-fix unguarded shape and asserts it both creates the keys and fires exactly one warn per key per rule). **Fourth member — never hand a request its methods by WRITING them onto a cached class or module export (#B807, 2026-10-07).** The router gave each route middleware the request's 17 controller methods (`renderJSON`, `redirect`, `throwError`, `render`, `query`, `getConfig`, …) by assigning them onto `Middleware.prototype`, and gave `controllers/setup.js` its 15 members by assigning them onto the cached export (the nunjucks delegate wrote `engine` + `throwError` onto the same export). Outside dev the module stays in the require cache, shared by every request (the router evicts a middleware per request only when `isCacheless`), and a method is looked up when it is CALLED — so a middleware calling `self.renderJSON()` after an await answered whichever request had passed through the same file last, and its own request was never answered; a bundle-local middleware with a shared twin escaped (`lib/inherits` mints a fresh class per call), and so did every dev stack. Fixed: the instance is built with `Reflect.construct(Middleware, [], PerRequestMiddleware)` on a per-request layer (`Object.create(Middleware.prototype)` carrying the 17 methods), so the methods are reachable in the constructor body and stay bound to their request; `setup.js` runs on `Object.create(Setup)` at both call sites; nothing is written onto the class or the export. Cost measured on node v25: ≈ +1.7 µs per middleware dispatch (a fresh prototype per request makes V8 build new hidden classes; ≈ +0.2 µs on Bun). What app code can observe: in a middleware constructor `new.target` is the per-request constructor and `Object.getPrototypeOf(this)` is the layer, not the class; in `setup.js` `this` is an object inheriting from the export, so a member read through the exported function by name, or state kept on `this` across runs, no longer works. Rule: per-request values go on a per-request object — never on a shared object a later read resolves through — and a reproduction of such a defect must keep the module cached (a dev arm is the control, never the test). Pinned by `test/core/router-middleware-per-request-b807.test.js` (the real `processMiddlewares`, setup-wrapper and `registerUserFilters` bytes; two interleaved dispatches with serialized, dev and twin controls; comment-stripped source pins).
970
970
 
@@ -1011,7 +1011,7 @@ Dev-mode query instrumentation captures every database query tied to the current
1011
1011
  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.
1012
1012
 
1013
1013
 
1014
- 258. **CSP useNonce × server cache (#B130, shipped 0.5.21) — the bootstrap-script nonce is render-time, and cache hits re-mint; and since #B464 (0.6.27) the compiled template carries NO per-request data at all.** 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.
1014
+ 258. **CSP useNonce × server cache (#B130, shipped 0.5.21) — the bootstrap-script nonce is render-time, and cache hits re-mint; and since #B464 (0.6.27) the compiled template carries NO per-request data at all.** 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.
1015
1015
 
1016
1016
  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.
1017
1017
 
@@ -1069,7 +1069,7 @@ Dev-mode query instrumentation captures every database query tied to the current
1069
1069
  298. **Render/request-path deep-clone & id-mint reduction (#P39 slice 1, 0.6.2; slice 3 = #P40, the `getConfig()` copy-on-write view, below) — the filter-factory options travel by REFERENCE, locale lookups are memoized, `conf.locales` is a lazy per-request accessor, and `lib/uuid` right-sizes its entropy batch.** The CPU-profiling baseline convicted per-request copy/id overhead as ~60% of render-arm CPU, 98.7% of the clone time in three caller-attributed paths; all three are gone. (1) `controller.render-swig.js` / `controller.render-nunjucks.js` hand `local.options` to the filter factory UN-cloned, and `lib/swig-filters` / `lib/nunjucks-filters` `getInstance()` stashes that wrapper by reference — the singleton's `_options` has no writer beyond the stash itself (every filter only reads it; the `getUrl`/`getWebroot` merge fills a fresh `{}` target), the request path already shares `conf.routing`/`conf.reverseRouting`/`conf.forms` by reference, and `req`/`res` always passed by reference anyway (the cloner bails on non-plain constructors) — so reference-passing adds no new mutation-visibility class and the stash-then-await interleave window is byte-identical to the cloned era. Anything that MUTATES what it reads from the filter context must clone its own copy first (the pre-existing contract; `getRoute()` already does). (2) `setOptions` no longer builds two Collections per request over the boot-static region sets (each was a deep copy of ~500 nested records plus one 16-char id minted per record ≈ 750 webcrypto calls, paid by EVERY request in a views-bearing bundle, render or not): a module-level per-culture memo answers the language → region-set and country → row lookups; `conf.locale` is a per-request deep copy of the ONE resolved row (isolating the `.date` write and template mutations); `conf.locales` is a LAZY self-replacing accessor — the request's own deep copy materializes on first read (sole framework reader: `self.getLocales()`), so the common request pays nothing while whole-conf clones and serializers materialize it transparently, and assignment writes through. (3) `lib/uuid` sizes its `getRandomValues` batch to the REQUESTED id length (the fixed 7-byte batch was sized for the 4-char default, so `uuid(16)` — the form `lib/collection` mints per item — needed ~3 webcrypto calls; now 1; each call pays a full randomFillSync regardless of byte count, so call count is the cost). (4) The cloner's dead per-recursion `Object.keys` allocation is removed. Measured A/B on the profiling harness (fresh runs both sides, same knobs): render wall 32,186 → 7,268 ms for 3000 requests = 4.4× throughput (10.7 → 2.4 ms/render), deep-clone share 50.31% → 1.81%, GC 2,522 → 137 ms, randomFillSync out of the top-15 frames on both arms, upload-arm clone floor 253 → 11 ms — the pre-stated ≈2× ceiling was beaten because allocation-pressure knock-on (GC, locality) fell with the clones. `lib/uuid` is AMD-bundled, so the browser bundle changed: consumer pickup = restart AND per-bundle re-bake. `Collection`'s own eager per-item `_uuid` minting is UNCHANGED (its only consumers are collection-internal; `toRaw()` strips). **Slice 3 — `getConfig()` no longer deep-clones (#P40, 0.6.x): both forms return a per-call COPY-ON-WRITE VIEW (`lib/conf-view`, registered as `lib.confView`).** Reads pass through to the shared conf at no copy cost, a write lands in the view's private overlay (never in the live conf, never visible to another call), and the first enumeration of a node (`Object.keys` / `JSON.stringify` / `for…in` / spread / `JSON.clone`) materialises that subtree once into a plain private copy; identity is stable, and two paths to one shared object give one view node, so `conf.settings === conf.content.settings` is PRESERVED where the clone silently split it; non-plain values pass through by reference exactly as the cloner did; a frozen child is copied once into the overlay, a frozen root yields a plain deep copy; an accessor runs against its own object (the lazy `locales` getter keeps working). Measured on the profiling harness — a route behind a middleware pair whose constructors each read `this.getConfig()`, the shape a consumer production profile convicted — 14,719 → 1,884 ms for 3,000 requests, deep-clone share 72.9 % → 3.1 % (the bare form cloned a 445 KB resolved conf on a minimal scaffold, megabytes on a large bundle; middleware construction itself was ACQUITTED by a `json-mw-noconf` split arm). Three things a clone allowed do not work on an UN-enumerated node: `structuredClone(view)` throws `DataCloneError`; `Object.freeze` / `seal` throw `TypeError` (enumerate the parent first — the node is then a plain copy); `console.log` / `util.inspect` render the shared values rather than the overlay (property reads and `JSON.stringify` are truthful). One divergence, bounded by the proxy invariants: a non-configurable own property of the shared tree refuses delete / redefine, and a write when it is also non-writable (an array's `length` takes writes; no conf node carries such a property). Opt-out per bundle: `settings.json > controller.getConfig.mode: "clone"` (read per call) restores the historical deep clone — the two `JSON.clone(...)` literals stay in the clone branch. Rule for a caller: a view is yours to read, mutate and serialise; enumerate before you freeze; opt into `clone` only for `structuredClone`. Server-side only ⇒ restart, no re-bake. Tests: `test/lib/conf-view.test.js` (30 arms on the shipped module incl. a subtract control) + `test/core/controller-getconfig-view.test.js` (comment-stripped pins incl. the extraction-boundary control; arms compiled from the source with the real lib; a real instance through the registry; red-first 12 red / 12 green against the pre-#P40 bytes). Remaining clone sites (hot route-matching-loop clones, `getRoute`-per-`getUrl` filter call, `getParams` per-call clone, cssColl/jsColl construction, async-delegate store clones) stay measure-gated for a future profile. **Phase-2 per-request trims (0.7.1; measured on the json profile scene at 281–556 µs busy per request depending on host load — read the paired deltas, never absolutes):** (F) `helpers/context.js` binds `lib/merge` once at module scope — `setContext()` and the global `getConfig()` resolved it with a relative `require` on EVERY call (3 µs and one `Module._resolveFilename` each, two calls per routed request; Node's relative-resolve cache never short-circuits the shape, because a production boot loads the module through `lib/logger` first and a cache hit never primes the helpers-directory pair). (G) `core/router.js` probes a bundle's `controllers/setup.js` once per bundle in production — `resolveSetupFile()`, memoized by bundle name; dev keeps the per-request probe its eviction depends on — where the per-request probe cost an `accessSync` throw plus an `lstatSync` throw whenever the file was absent. (H) `core/server.isaac.js` looks the output cache up only while `server.cache.enable` is on (every writer already refused to store while it is off, and `server.js`'s engine-agnostic read gated on the same flag): the production-unconditional lookup cost two `existsSync()` per GET and could serve an entry left on disk by an earlier run that had the cache enabled. (#B703) `helpers/path.js` keeps no path registry: `helpers/index.js` calls `PathHelper()` WITHOUT `new`, so in that sloppy-mode constructor `this.paths = []` was `global.paths`, which every `_()` extended with each distinct normalized path for the process lifetime (two per distinct URL through the output cache's file paths, query string included) and which every `_()` and every PathObject `toString()` scanned with `indexOf` (103 µs per unseen path at ~52k entries, measured); nothing read it. `toString()` and `toUnixStyle()` return the value exactly as before; `toWin32Style()` now converts on every call, where the registry returned a value it had not recorded — one whose trailing separator `mkdir()`/`rm()`/`isValidPath()` stripped — with forward slashes. Trap: a helper invoked without `new` writes its `this.<field>` onto the global object, so read the call site before treating a `this.` field as per-instance state. (E) The three per-request Config resolutions — `resolveRouteConfig` (`core/router.js`), `hasViews` and `loadBundleConfiguration` (`core/server.js`) — read `Config.instance` once `Config.initialized` is set: each `new Config().getInstance()` built a throwaway instance only to hand back the singleton's envConf (or the singleton) and re-set Env/Scope/Host on it to the values they already held (getInstance() runs once at boot). The old calls stay as the fallback — a worker's context-merged instance leaves `Config.initialized` unset, and #B542's refusal after an aborted init still surfaces — and `hasViews` consults its per-bundle memo before resolving anything. (B) `setOptions`' page.environment block — which runs on EVERY routed request of a bundle with views, JSON routes included — computes three per-process values once (and, since #TPL3 / 0.7.6, sets `page.environment.packageVersion`: the `version` of `<conf.projectPath>/package.json`, read once per project path into the module-level `_packageVersionByProject` — `''` recorded when the path, the file or a string `version` is missing, so the field is then unset and the file is read once either way; a dev re-require of `controller.js` reads it again; distinct from the config token `${projectVersion}`, which is `manifest.version`): the encoded `page.environment.forms` export is memoized in a module-scope WeakMap keyed by the forms catalog object (the catalog is loaded once per bundle and the framework never writes it — the validator and `getFormsRules()` work on clones, `getConfig()` hands out copy-on-write views; re-encoding it cost ~5 µs per KB, measured 587 µs per request on a 118 KB catalog vs 0.008 µs for the hit), the `memory allocated` heap-limit label is computed on the first render (it cost a `require('v8')` + getHeapStatistics() per request), and one `isoDateTime` stamp feeds both `page.environment.date.now` and the locale's `date.now`. The forms lookup sits behind a `typeof` guard so the block still runs when a harness compiles it on its own; `page.forms` holds the catalog by reference, so render data that deep-fills it no longer reaches later requests' export. (D1) `set()` — the dotted-path render-data setter, ~60 calls per routed request of a bundle with views — tests for a dot with `name.indexOf('.') !== -1` and splits with `name.split('.')` instead of `/\./.test()` and `split(/\./g)`: the same answers for every string (`split` ignores the `g` flag), −4.8 µs per request measured in the profile scene; `test/core/controller-set-path.test.js`'s differential against the frozen pre-#P39 `set()` keeps certifying the behaviour. (A) `lib/inherits`' composed constructor copies nothing onto the instance: no own `prototype` property (it was enumerable — visible to `Object.keys()` / `JSON.stringify()`), no `this.prototype.name = this.name` stamp onto a SHARED prototype per `new` (in a nested chain it wrote the child's name onto the PARENT's prototype), and no `for…in` own-copy of the parent prototype's falsy members (EventEmitter re-sets its three as own anyway); `if (this)`, the `name` default, `b.apply` then `cache.apply` are kept, so a call without `new` (the validator's is-alias) still works. Measured censuses: 0 readers of an instance's own `prototype` and 0 falsy prototype data props in the framework or a large consumer; entity names still resolve because every connector stamps the COMPOSED class's prototype after `inherits()`. Browser-bundled: prod dist rebuild, consumer pickup = restart AND re-bake. −13 µs per request at the design scale. (C2) A bundle's resolved env configuration stays in V8 fast mode: `%HasFastProperties` probes along `loadBundleConfig` found TWO dictionary triggers — `merge(files, conf[bundle][env])` (the env keys poured into the non-empty `files` target by keyed stores) and, masked until that one is undone, `delete conf[bundle][env].tmpSettingFileContent` (a delete of a non-last property). Only the final shape matters at request time, so the delete is a rebuild without the key (object rest) that re-points `files` and `conf[bundle][env]` together — they are one object from the merge until `files = whisper(…)`, and only named stores follow — BEFORE `secrets.resolve()`, which keys its resolved-paths WeakMap by this very object. The router's per-request `Object.assign({}, conf)` fell from ~20 to ~0.2 µs in the profile scene. Rule: a keyed store past ~17 keys into a non-empty object, or a `delete` of a non-last key, puts an object in dictionary mode for good — rebuild it once (spread / rest) after the last structural change, never per request.
1070
1070
  299. **lib/math checkSum helpers - dispatch & serialization contract**: `checkSumSync(filenameOrData, algorithm, encoding)` (defaults md5/hex) accepts a string, object, or array; objects/arrays are serialized first - a plain object becomes sorted `key:value` pairs joined with commas (function properties skipped), an array becomes the JSON of a sorted copy (order-insensitive; the input array is never mutated). A string ending in an extension shape (a dot + 1-10 alphanumerics) is PROBED as a filename, and the file branch is taken only when the path resolves to an existing regular file (stat-gated): a stat miss (no such entry, name too long, not-a-directory path, NUL-carrying string) or an exists-but-directory entry falls through to hashing the input as DATA, so serialized records ending in `.com`/`.net`/`.pdf` return checksums instead of throwing ENOENT/ENAMETOOLONG (#B209; until 0.6.2 they threw, with the caller's data named as a path in the error), while an EXISTING unreadable file (EACCES) still throws. Until 0.6.2 every ARRAY input also collapsed to the checksum of the empty string - all arrays collided at one constant hash - and sort() reordered the caller's array in place (#B208, fixed alongside; previously stored array checksums were the degenerate constant and change by construction). The wide probe shape is #B210 (fixed alongside): before it only dot+3-lowercase tails fired, so paths like `file.js`, `file.json`, or `FILE.TXT` hashed as PATH STRINGS - stored sums for such paths change on upgrade (they never tracked content); an extension-LESS path (`Makefile`, `LICENSE`) still hashes as a data string, never read from disk - pass file content (or an extension-bearing path) when you mean the file. The async sibling `checkSum(filename, algorithm, encoding, isCheckingFromData, cb)` routes to the file branch on ANY dot in the input unless `isCheckingFromData` is true. `operate(expression)` evaluates arithmetic strings via a shunting-yard parser (`+ - * / %`, parentheses, decimals, unary sign) and throws on any non-arithmetic character - no eval / new Function (#SCS1).
1071
1071
  300. **Pluggable object storage (`lib/storage`, #STO1)** — an **adapter** (where bytes live) crossed with a **strategy** (how keys are laid out), behind one callback-shaped contract: `put(stream, meta, cb)` -> `{key, size, contentType}` / `get(key, cb)` -> stream / `stat(key, cb)` -> meta|null / `release(key, cb)` / `resolve(key, cb)` -> `{kind:'path'|'inline'}` / `capabilities`. Slice 0 ships the `local` adapter + `sharded` strategy (`YYYY/MM/DD/<ulid><ext>`); the cas slice adds the `cas` strategy (its own block below) and the stream slice the `stream` strategy (**its own entry #302** — large sequential media + resumable uploads); `getRange(key, start, end, cb)` is present on ALL THREE local strategies with `capabilities.ranges` true — `end` is INCLUSIVE (matching the HTTP header and `createReadStream`), an over-long `end` CLAMPS, and only a `start` at/beyond the object size errors (the caller's 416); it answers from either tier, and under `cas` a released blob stays invisible to it. The serving half now ships too — `self.serveFromStorage(driverName, key, opts)` (its own entry) answers 206/416/304 with `Accept-Ranges`/`Content-Range` on both engines, gated on `capabilities.ranges`, so the flag is finally consumed by the framework itself. The `s3` adapter SHIPPED (its own entry #304): `capabilities.offload` has its first `true` and its first framework consumer (`serveFromStorage`'s presigned-307 path) in the same release, so consumers must BRANCH on `capabilities` rather than assume — every capability flag has now flipped at least once. **Keys are OPAQUE**: store what `put()` returns, never parse or compose one, which is what lets a later strategy change the layout without breaking stored references. Config is `settings.json > storage` = `{default, drivers:{<name>:{adapter, strategy, root, maxObjectSize, store}}}` — drivers NEST under their own key (the `upload.groups` shape) so a driver may legitimately be called `default`. Reached as `gina.storage()` (the `default` driver) or `gina.storage('<name>')`; the accessor is assigned UNCONDITIONALLY so an unconfigured bundle gets a named `[storage] not configured` error instead of `gina.storage is not a function`. **Metadata rides a connector seam** — `lib/storage-store.js` is the 5th member of the `job-store`/`audit-store`/`render-cache-store`/`session-store` dispatcher family (connectors.json entry name -> `.connector` -> `core/connectors/<c>/lib/storage-store.js`, throw-on-unresolvable = boot abort, and the dispatcher passes the DRIVER NAME through so two drivers may share one connectors entry); the default is an embedded SQLite file at `<root>/.meta.db`, documented **single-process-per-driver-root** (SQLite locking on a shared network FS is the known-broken case the seam exists for). **`couchbase` is the first connector store** (`core/connectors/couchbase/lib/storage-store.js`, SDK major 3|4 from the PROJECT's node_modules) and is the supported answer for a shared root — several bundles or replicas on one driver root: one JSON doc per row keyed `<prefix><driver>:<key>`, with `d`+`k` as the sargable discriminators every N1QL query filters on. Per-key atomicity is Couchbase's own CAS — every refcount verb is a `get` -> `mutateIn(...,{cas})` loop (bounded retries, then a coded `GINA_STORAGE_CAS_CONTENTION` error), and `removeIfZero` is a CAS-guarded `remove` whose mismatch IS the resurrection signal. **That atomic claim IS the multi-process sweep coordination** — concurrent sweepers are safe because exactly one claim per blob wins, so NO election layer ships (one would also make `storage:gc` report `collected:0` on a non-holder); the seam's residual is unchanged and is put-vs-sweep, never sweeper-vs-sweeper. The inline payload rides as **base64 inside the JSON doc, never a binary document body** — a binary value cannot be parsed, indexed or queried by Couchbase, which would make `listZeroRefs`/`stats` impossible, and refcount+payload must sit under ONE CAS (cost: +33%, so an `inlineThreshold` above ~14MB overflows the 20MB doc ceiling). `acquireRef` REFUSES to adopt an existing non-refcounted row (a `sharded` row or the `.driver` stamp) instead of silently stamping a count onto it. Two secondary indexes (`gina_storage_refs (d,refs,zeroAt)` / `gina_storage_keys (d,k)`) are probed via `system:indexes` and created when missing — a refusal is non-fatal but LOGS THE EXACT DDL, because an unindexed query ERRORS rather than merely running slow and the sweep's bare call would swallow it forever. ⚠️ **A statement alias that is a N1QL RESERVED WORD is refused outright by the server, so the whole verb fails to PARSE** — `stats` shipped aliasing `AS inline` and `INLINE` is reserved (measured on BOTH the 7.6 and current reserved-word references, so this was never version-specific), fixed by backticking that one alias (#B356); the other four aliases are not reserved and stay bare. **The class is INVISIBLE to this store's own suite by construction** — the tests drive a fake SDK that pattern-matches statement SHAPES and never parses N1QL, so no amount of coverage there can see a reserved word — which is why the guard is a LEXICAL pin over the captured statements carrying its own can-fail control (it must flag the pre-fix statement and clear the backticked one). Real-cluster verification against a four-node **8.0.2** deployment (the store was designed against 7.x, so this is the first 8.0 datapoint): the `system:indexes` probe and both index shapes work, the durability map matches the SDK's members, a stale-CAS `mutateIn` raises `CasMismatchError`, 32 concurrent `acquireRef` calls across 4 processes on one key yield ONE blob at refs 32, and concurrent sweepers claim exactly once over 5/5 trials with the winner varying — confirming the no-election-layer decision. ⚠️ One operational consequence of `listZeroRefs` being a GSI query: a just-zeroed blob can be invisible to the sweep briefly, so a test that zeroes and immediately sweeps may legitimately see nothing (the grace window covers it; the next pass collects). Optional `durability` (majority|majorityAndPersistToActive|persistToMajority) rides every mutation; default is the SDK's own level, the same honesty class as the embedded store's WAL `synchronous=NORMAL`. **Security, all boot-enforced or per-call**: a driver `root` inside ANY bundle's web-served tree is a boot FATAL — and the check reads `publicPath` **plus every `content.statics` target**, because a statics mapping can point anywhere on disk, so checking `publicPath` alone leaves a hole; the metadata DB living inside the root is safe only BECAUSE of that fatal. Per-call key handling runs three guards **in a load-bearing ORDER**: confinement FIRST (a lib-local `confineToBase` copy — the engine copies are closure-private), THEN canonical-form, THEN reserved dot-segments. Reversing the first two silently shadows the security boundary: `..` starts with a dot, so a reserved-check-first ordering answers every traversal attempt with "reserved", `confineToBase` is never reached, and a traversal test passes for the wrong reason — measured and fixed during the build. Non-canonical keys (`a/../b`) are refused because they would address one file under two metadata keys; `.tmp` / `.meta.db` are refused because they are reachable without leaving the root. **Write path** = the #B223 discipline generalised: stream to `<root>/.tmp/` then publish by `rename(2)` (atomic — a reader never sees a partial; same root ⇒ same FS ⇒ no EXDEV), error listeners armed AT STREAM CREATION on BOTH streams (#B143 — `.pipe()` returns the destination, so one chained listener covers only one, and an unlistened `'error'` takes the bundle down), a settled latch (`close` also follows `error`), the REAL error propagated (never a fabricated one), size measured from the PUBLISHED file (not an in-flight counter), and a metadata-write failure rolls the object back so a caller that got no key is never left with unreferenceable bytes. Durability is BY STRATEGY since the cas slice: `sharded` writes are NOT fsynced (disclosed in the module JSDoc the way `lib/audit` discloses its own tail), while `cas` publishes fsync by DEFAULT — the temp file HARD before the rename (a failure fails the put), the parent directory BEST-EFFORT after it (platforms that cannot fsync a directory — Windows, some network mounts — skip that half silently; macOS honours fsync as the platform defines it, F_FULLFSYNC being native-addon territory gina does not ship). The first fsync anywhere in gina — dir-fd fsync measured working on darwin under both runtimes before shipping. **Size tiering (the tiering slice)**: objects strictly UNDER a driver's `inlineThreshold` (unit-suffixed string, default `"64KB"`, `"0B"` = off per driver) are stored INLINE — one metadata-store transaction carrying the payload as a binary-safe `data` Buffer on the row, no temp file, no directories, no filesystem at all — while at-or-above objects take the file path; the crossing is decided mid-stream by buffering the head (memory bound: threshold + one chunk per in-flight put) and spilling byte-order-exact into the temp+rename path the moment the running total reaches the threshold. The key shape is IDENTICAL in both tiers (keys stay opaque); `resolve()` answers `{kind:'inline'}` (bytes via `get()`, which serves the row as a stream), `stat()` strips the payload, `release()` needs no special casing, and `capabilities.inline` is true iff the threshold is active. Reads are payload-presence-driven, NOT threshold-driven, so changing the threshold is retroactively safe — existing objects stay readable on either side, and the embedded store migrates a pre-tiering database in place (additive `data BLOB` column, idempotent). 64KB is the MEASURED knee, not folklore (2026-08-13 bench on the shipped stack, sequential puts: inline 10.8-12.9x faster at 1KB, 8-8.5x at 4KB, 5.7-6.6x at 16KB, 2.7-3.3x at 64KB, destabilizing above — on APFS/NVMe, the case MOST favourable to the file path, so slower/network filesystems widen the win). Inline durability is the same class as the un-fsynced rename path (WAL + synchronous=NORMAL: a crash can lose the last committed transaction, never a torn row). Two operational facts stated rather than implied: the metadata store becomes PAYLOAD-BEARING (losing it loses sub-threshold objects, not just their metadata — file-backed bytes survive an index loss; any root-level backup still carries `<root>/.meta.db`), and sub-threshold objects are not individually visible on disk (the `sharded` SSH-browsability rationale holds only at-or-above the threshold). A connector-backed store inherits payload rows, so binary-safe round-trip is part of the SEAM contract, not implementation detail. Direct factory callers get tiering OFF when the key is absent — defaults resolve in `start()`, the `maxObjectSize` pattern, which is what keeps the adapter's low-level tests pinned to the file path. **The `cas` strategy (the cas slice): the key IS the content address** — `blobs/<algo>/<aa>/<bb>/<hex>`, extension-less BY CONSTRUCTION (an extension would derive from the untrusted `originalName`, so identical bytes under different names would mint different keys and silently break dedup; `contentType` lives in the metadata row) — so two puts of identical bytes return the SAME key with refs=2 and `deduplicated:true` on the second result, metadata first-write-wins. `release()` DECREMENTS and never deletes bytes; a blob reaching 0 refs is stamped and reads as ABSENT through get/stat/resolve/findByDigest (the grace window is GC detail, not a caller-visible afterlife), while a re-upload inside the window resurrects it for free. The GC sweep (per-driver unref'd setInterval — the lib/job precedent, `lib/cron` stays dormant; `sweepInterval` default '15m', '0s' = off; `sweepGrace` default '1h'; both REASONED defaults, not benchmarks — they gate reclaim latency only) collects blobs at 0 past grace in a load-bearing ORDER: claim the row FIRST (`removeIfZero` — a guarded delete a concurrent `acquireRef` resurrection always beats), unlink the file SECOND. The inverse order can LOSE BYTES under a racing dedup-hit put (it would discard its temp against a row whose file just vanished); this order's crash window merely orphans an UNREFERENCED file — invisible to every verb, harmless, `storage:verify` territory (the CLI/maintenance slice below) — and a dedup hit whose blob file is missing (exactly that residue) HEALS by renaming its own temp in. In-process the sweep-vs-put race cannot interleave AT ALL (the embedded store is synchronous, so acquire→check→publish and claim→unlink each run in one uninterruptible JS turn); the multi-process residual belongs to future connector stores and is documented on the seam contract. `findByDigest(algo, hex, cb)` -> key|null is the ONLY sanctioned digest→key door (keys stay opaque even though cas keys LOOK parseable) and is a DEDUP ORACLE — "someone already uploaded this exact file" is an information leak across users — so it ships as a driver verb ONLY, no HTTP endpoint: a consumer exposing one owns auth and per-driver scoping. Algorithm agility: `hash` (default 'sha256') is per-driver config validated at boot against THIS runtime's `crypto.getHashes()` — an unavailable name is FATAL, and the capability is runtime-scoped (measured: sha256/sha512 on both supported runtimes, blake2b512 Node-only) — and since the algo is a path segment, a hash CHANGE is additive (the old namespace stays addressable and findByDigest-able under its own algo, dedup does not span namespaces, the boot notes the change once and restamps) while a STRATEGY change on populated storage is a re-key migration, which is why `start()` now stamps every driver root (a reserved `.driver` row whose stamp rides the store's binary-safe `data` slot) and warns EVERY boot on mismatch without restamping — surfaced through the new `opt.warn` hook (a callback, not a logger import; `start()`'s boolean return is unchanged). The refcount machinery is four OPTIONAL seam verbs (`acquireRef`/`releaseRef`/`listZeroRefs`/`removeIfZero`) the embedded store implements atomically-by-synchrony from plain UPDATE/SELECT/INSERT — deliberately NO `RETURNING`, which sits outside the Bun sqlite adapter's measured surface — plus additive idempotent `refs`/`zero_at` migrations; a cas driver REFUSES to build over a store lacking the verbs (boot fatal), and `refs` appears on get()/stat() output only for refcounted rows (the `data` pattern, so non-cas rows keep their exact shape — `set()` must never touch a refcounted row, REPLACE would reset the count). Config keys are PER-STRATEGY (`STRATEGY_KEYS`: `hash`/`fsync`/`sweepInterval`/`sweepGrace` are consumed by cas and ignored-with-a-warning under sharded; durations parse via `parseDuration`, unit-required exactly like the size keys — '15m' means minutes here and megabytes there, which is why neither parser guesses). The sharded write path, key shape and durability are byte-for-byte unchanged, and size tiering applies under cas exactly as under sharded — an inline cas blob is a refcounted row carrying `data`, dedup included, collected by row-deletion alone. `maxObjectSize` requires an EXPLICIT unit (`"50MB"`); a bare number warns and falls back to the default, deliberately stricter than `settings.upload` where a bare number means MB for back-compat — `upload` already reads a bare number as a count (`maxFields`) in one key and as MB (`maxFieldsSize`) in another, so there is no house meaning to inherit and guessing would be the bug. **Framework independence is the structural contract**: `lib/storage` imports no gina core, no `lib` registry, and no injected globals (`getContext`/`getConfig`/`_()`), so the web-served roots are INJECTED into `validateConfig` rather than read; `lib/sqlite-driver` is the ONE sanctioned import and an exact-count test pins it so a second exception cannot arrive as drift. `validateConfig(block, {servedRoots})` is pure and enable-agnostic (the `lib/render-cache` shape): it lints unconditionally and returns `{fatal, warnings, driverCount}` — the CALLER owns aborting, and the three semantics often misattributed to the validator (lint-always / build-only-when-enabled / fatal-downgrades-to-warn) all live in the boot block, not in it. Boot wiring sits in `gna.js` inside `server.on('started')`, i.e. **POST-listen**, so a storage fatal exits on an already-bound port exactly as the #RC4 and #AI6 blocks do; a pre-listen refusal would mean moving the lint into `core/server.js` `init()` where the audit trail does it. **Slice 1 binds the upload path (the #B224 resolution vehicle): a settings.json upload.groups.<name>.driver key routes that group's self.store() step through the named driver.** store() partitions per file on the RESOLVED group (req.files[].group — which since #B140, same arc, carries untagged instead of undefined for untagged parts; caller-synthesized lists normalize the same way): files in driver-less groups keep the historical move path byte-for-byte (same entry shapes — no new fields, same false success sentinel, same abort-on-first-error), while routed files stream from their parse-time staging path into driver.put() sequentially (abort on first failure, NO rollback of already-published objects, ENOENT-tolerant post-publish source unlink — the mover's exact semantics) and their result entries carry {file, group, driver, key, size, type, encoding} with NO filename: key is the opaque reference, size is the layer's own measurement of the published bytes, reads go through gina.storage(driver). target may be null ONLY when every file routes (a move-path file with no target errors naming the file + group; the target dir is only created when a move-path file exists). Boot lint: gna.js collects every bundle's group→driver bindings as NEUTRAL {owner, driver, path} tuples into validateConfig's context.groupBindings — a binding naming an undefined driver (or ANY binding when no storage/drivers block exists) is FATAL; path BESIDE driver is LEGAL (for a routed group path is only the parse-time staging dir — the multipart landing behavior is unchanged) but a path INSIDE the driver's root warns (staging into the store tree strands files no key references). Parse-time enforcement (#B50 gate, allowedExtensions, isMultipleAllowed, maxFields) is untouched; a routed file additionally meets the driver's maxObjectSize at put() time. Riding the same arc, #B224 resolved as retire+declare: the scaffold template's inert advertised keys (filePrefix/subFolder/per-group maxFieldsSize — and the inert block-level encoding, which busboy ignores in favor of its hardcoded utf8 param decoder) are retired, the three false per-group-redefinability comments corrected, and schema/settings.json now declares the REAL upload key set at both levels (additionalProperties stays true at BOTH — apps legitimately carry their own group keys, e.g. app-side composition). **The CLI/maintenance slice: `storage:stats` / `storage:gc` / `storage:verify` + the always-on admin-gated `/_gina/storage/{stats,gc,verify}` endpoint family.** The spine: who touches the store depends on who OWNS it (the embedded store is single-process-per-root), so each command sends its own request to the bundle's assigned ports (the cache:stats candidates walk — advance on ECONNREFUSED): a RESPONSE means RUNNING and the owning process did the work via the endpoint (engine-agnostic `server.js onRequest()` ONLY — the isaac listener falls through via its cb, the `/_gina/agent` precedent; `app.json admin.allowFrom` gate, ^-anchored patterns per the release-watch lesson, NO dev gate; stats/verify GET, gc POST — a gc pass is a mutation; the handlers read `?driver=`/`?dryRun=` from `request.originalUrl`, because isaac strips the query from `request.url` before its cb hands the request to `server.js` — until 0.7.1 a RUNNING isaac bundle ignored both, so `storage:gc --dry-run` ran a REAL collection and `--driver=` scoped nothing (#B710); the URL tests stay on `request.url`); every-port-ECONNREFUSED means DOWN and the CLI resolves the bundle's raw `settings.storage` (requireJSON — scaffolded configs carry comments) and builds the REAL driver through the boot's own exported seams (`_resolveDriverConf`/`_FACTORIES`/`_createEmbeddedMetaStore`, `sweepInterval:0`; a missing root is reported, never mkdir'd — a stats read must not mutate); a TIMEOUT or any other socket error opens NOTHING (the bundle may be alive and owning the store). Connector-backed stores have no offline path — named-and-skipped ("nothing local to open; start the bundle and re-run"). New module/driver surface: `lib.storage.list()` (built driver names, `[]` before start — the enumeration door, so callers need no isStarted() pre-check); `stats(cb)` on BOTH strategies → `{name, strategy, root, capabilities, store}` with `store` = the metadata store's OPTIONAL `stats()` aggregate `{objects, refcounted, zeroRefPending, inline, bytes}` (reserved dot-key rows excluded — the `.driver` stamp must not read as an object) or `null` = "store reports no stats"; cas `sweepNow([{dryRun}], cb)` — `_sweepOnce` PROMOTED to a documented door, the underscore alias kept for the test seam — → `{collected|collectable, drained}` where `drained` answers "anything older-than-grace left?" so gc DRAINS by looping the batch-capped pass (hard-bounded at 1000 passes) instead of guessing the cap, and dryRun lists without claiming a row; cas `verify([{fix}], cb)` — the files↔rows scan, BOTH directions age-gated past `sweepGrace` (a young file may be in-flight work; a young row sits inside put()'s acquire→rename window, where a row legitimately precedes its file): `file-without-row` (the sweep's crash residue — FIXABLE, `fix` unlinks; OFFLINE-ONLY: the CLI refuses `--fix` while the bundle runs and the endpoint never parses a fix flag, making the refusal structural) vs `row-without-file` at refs>=1 (LOSS EVIDENCE — reported, NEVER auto-fixed: deleting the row would destroy the signal; zero-ref rows are skipped — the sweep's claim + ENOENT-tolerant unlink self-heals them, so reporting would flap); the findings LIST is capped at 1000 with exact counts + a truncation flag (a silent cap would read as "that was all of them"); the rows direction rides the second OPTIONAL seam verb `listKeys(afterKey, limit, cb)` (key-ordered cursor pages, dot-keys excluded) — a store lacking it degrades verify to files-only (`rowsChecked:false`). `sharded` has no sweep and no verify in v1 — named-and-skipped, never an error; gc/verify against a root shared by several bundles are idempotent (same result from whichever bundle). CLI grammar is the cache family's: `<bundle> @<project>` or all-bundles, `--driver=`, `--format=json` (fs.writeSync flush-before-exit), `--dry-run` (gc), `--fix` (verify); `storage:` joined bin/cli's `allowedOffline` (the hard gate — a topic dir alone is unreachable, the dispatch itself is pure `lib/cmd/<topic>/<action>.js` convention). ⚠️ **The metadata store NEVER invokes a caller's callback from inside its own `try` (#B565).** Seven methods (`set`, `remove`, `acquireRef`, `releaseRef`, `listZeroRefs`, `removeIfZero`, `listKeys`) used to, and the consequence was twofold: the store's `catch` SWALLOWED an error the application threw, then re-invoked the SAME callback with that error dressed as a store error. Any caller that latches on first settle — `local-cas` `verify()` does — read the re-entry as a no-op and never completed, so the operation HUNG rather than reporting; the caller saw neither a result nor an exception. `get()` always had the correct shape and is the template: the `try` wraps ONLY the SQLite statement, the callback runs after it on every path, and a genuine store error still arrives as `fn(err)`. Pinned by `test/lib/storage-meta-store-callback-isolation.test.js` (17 arms: every method must let an application throw escape AND must invoke the callback exactly once). Same family as the #B473/#B475/#B429 settle-discipline rule — a completion handle settles on a per-call channel, and a library must never convert a caller's exception into its own error.
1072
- 301. **FormValidator — submit pipeline, async `query` rule, loading state & error rendering (consolidates former #257/#261/#264/#296/#297; the engine/binding/a11y parent is #209).** **Rules & binding (former #257 — #B127/#B128/#B129 0.5.20, #B138 0.5.22):** numbered `is` aliases (`is0`, `is1`, … — multiple `is` conditions per field) INSTALL and enforce on client AND server (anchored `/^is\d+$/`) with a DISTINCT error key per alias on both sides (previously the per-rule typecheck `continue`d on exactly the undefined state the lazy installer required — silently skipping every `is<N>` key — and the shared server key let a later PASSING alias erase an earlier FAILING alias's error, a silent bypass). ⚠️ Enforcement-tightening: `is<N>` rules that silently skipped START ENFORCING at pickup — sweep rule JSONs for `is<N>` keys before upgrading. The `is` grammar remains ONE binary comparison (`=== !== == != < > <= >=`), no `&&` compounds. #B138: the shared `_currentValidatorAlias` handshake slot re-arms immediately before EVERY delegation (it was armed once at install while `is()` consumes-with-delete — any re-application against the same instance collapsed every numbered rule onto the bare key `is`, last-declared-wins, its message rendered twice). Injected forms (`validateFormById`) resolve their declared rule ATTRIBUTE-FIRST (`data-gina-form-rule`; the id-derived name stays the fallback) — pre-fix a form injected after boot bound `{}` rules. Live-check gate precedence: an AUTHOR-set `data-gina-form-live-check-enabled` always wins; the gate decides only when the attribute is absent (rules bound → true). The cross-field `_case_` scan coerces the CASE VALUE (declare boolean cases as JSON booleans; the strings "true"/"false" coerce consistently), and a MATCHING case application replaces that field's rule set in the bound form's rules store PERSISTENTLY for the page. There are NO standalone `maxLength`/`minLength` engine rules — length constraints are `isString`/`isNumber`/`isInteger` parameters; unknown rule keys are silently skipped. **Safari autocomplete gate + stale-error clear (former #261 — #B135/#B136):** the Safari `autocomplete="off"` workaround (entry 209; its keydown interception, with the #B134 chord bail, was removed by #B1055, so every key is native) (a) gates on REAL Safari only (`/safari/i && !/chrom(e|ium)/i` — every Chromium UA carries the Safari token; WebKit-on-iOS browsers stay matched by design); and (b) the live-check whole-form pass, when it turns VALID, clears every previously-errored field's rendered error in BOTH copies instead of leaving a stale blocking paragraph beside the re-enabled trigger (the pass still never renders NEW errors on untouched fields). **The async `query` rule (former #264 — #B87 0.5.22; the #B332-#B346 cluster, 0.6.7):** the result path is BLANKET-guarded — a throw while processing the response (a detached target's null `.form` after a popin closed mid-flight, a malformed JSON body, a boolean value hitting `.toLowerCase()`) routes to `releaseQueryWaiter` (warn + release with field state as-is — FAIL-OPEN by design: the verdict is unknown and the server re-validates on submit); `xhr.onload`'s catch and the wrapped `onerror` route to the same release; the release helper is itself try-guarded and names the field. A submit can never complete while the verdict is on the wire, and ONE production POST per click at most: `getOwnedElements` dedups by node identity (an id-less submit trigger used to enter twice and stack TWO listeners — one click ran two full validate() passes, #B333), the async-arm guard is PASS-LOCAL (`armedAsyncFields` — waiters stack per pass and self-detach on first fire; the second pass used to find the first pass's waiter, zero ITS OWN counter and complete on the sync-only verdict ~200ms before the query answered, #B332), the wire dedups via a `ginaFormValidatorQueryPending` dataset marker, and every `validated.<formId>` listener consumes only its own pass's dispatch and detaches (stale listeners used to replay the submit once per leftover, #B334). #B337: the completion payload is the no-arg `d.getErrors()` — the WHOLE pass's verdict (field-scoped payloads meant other invalid fields were adjudicated but never rendered on the submit path, and the inverse scene dispatched an EMPTY error set — refusing the submit with no rendered reason). Engine contract worth knowing: `queryFromFrontend` SKIPS the wire when `self.isValid()` is already false, so whether a query fires on an invalid form depends on FIELD ORDER — the settle/skip completion payload must carry the full verdict either way. #B338: both formerly-synchronous releases (cached verdict, wire skip) defer via `queueMicrotask` so every release takes the post-pass shape a real settle has (they used to fire mid-field-loop, composing a completion missing every field declared after the query field and CLEARING their rendered errors on a re-click). #B342: a latched form's async completion dispatches UNCONDITIONALLY — the waiter's clean path used to dispatch only when the query field happened to be LAST in the rule set, so a clean submit with the query declared earlier starved the callback, no POST ever left, and the `isSubmitting` latch stranded the form until reload (masked pre-arc by the very #B332 double-pass the arc removed). #B346 closed the LAST silent door, one step UPSTREAM — the trigger gate: with live-check on, `updateSubmitTriggerState` gates the trigger whenever the form is not-yet-valid, but while a query is ON THE WIRE the form has NO verdict, and the gate misclassified verdict-pending as invalid — a click inside the round-trip window died silently (consumer-measured 0/6 inside vs 6/6 after; the window scales with query LATENCY, not typing speed). The refusal is narrowed by `isAwaitingQueryVerdictOnly`: the framework's gated mark must be the ONLY refusal arm (an authored `aria-disabled` or non-IDL `disabled` still refuses), an owned field carries the in-flight marker (checked in-form AND on `form="<id>"` reassociated controls, CSS.escape-guarded), and no SETTLED field holds a committed error (the pending field's own provisional `query` entry — staged by the same-value fast path — does not count; counting it refused every window the narrowing exists to recognize, measured). Consulted at the click proxy, the trusted-submit proxy (wrapped-label `<button type="submit"><span>` shapes; Enter with a default button is spec-synthesized into a click on it) and the loading arm; the shared fresh-validate path LATCHES `isSubmitting` when proceeding under a pending verdict (an un-latched async pass STARVES — this was also silently starving programmatic `submit()`) and releases the latch before any consumer `submit.<id>` dispatch, so a stopping custom handler cannot strand the form. **Send lifecycle (former #296 — #B175/#B176 0.6.1, #B192 0.6.3):** every `send()` builds its own LOCAL XHR (the module-scope reuse re-`open()`ed a completed instance, synchronously replaying the PREVIOUS submit's `onreadystatechange` at readyState 1 — submitting form B after form A stranded A's trigger natively-disabled with no release path) and registers a `loadend` release — success, error, timeout and abort alike — removing `disabled`/`aria-disabled` + `data-gina-form-loading` and clearing `$form.isSending`/`$form.sent`; `$form.isSending` genuinely spans send→settled; the timeout path REMOVES `data-gina-form-loading` (never writes the truthy string "false"). #B192: a REJECTED submit releases the `isSubmitting` latch (the only clear was the XHR settle, which a rejected submit never reaches — one invalid attempt latched the flag for the page's life, swallowing every later keystroke; the flag lives on the `$forms[id]` OBJECT so it even survived a full unbind/rebind). Diagnostic: read `gina.validator.$forms['<id>'].isSubmitting` — truthy IS the latched state (exactly what the live-check gate tests); the other discriminator is the live-check request count after a keystroke (0 latched, 1 healthy). ⚠️ **Do NOT use `isValidating` for this** — consumer-A/B-measured NON-discriminating (2026-08-01): it inits null and is set by EVERY validation cycle, so on any form that live-checked before the submit it reads `false` in BOTH the latched and healthy states. #B176: the live-check opt-out is honored consistently — the two gates that evaluated the rules-count boolean INSIDE `/^(true)$/i.test(…)` (an explicit `"false"` short-circuited to the count and matched) now test the attribute alone; the three `registerForLiveChecking` sites always did. Standing caution: `setOptions()` is a MODULE-wide default setter, not per-call. **Loading state (`data-gina-loading` + `lib/loading-state`, 0.6.4-0.6.5):** the FORM-scoped `data-gina-form-loading` says "a request is in flight"; the TRIGGER-scoped `data-gina-loading` marks the submit-like element the user actually operated — `"true"` while its action runs, `"false"` at ANY terminal outcome. Five release paths, two reaching no XHR at all: a submit REJECTED by validation, `send()`'s rate-limit early return, plus `loadend`, readyState 4, and never-arming when the disabled-trigger gate turns the click away. ⚠️ **The `"false"` value CONSTRAINS READERS: the attribute stays PRESENT when released — match on the VALUE, `[data-gina-loading="true"]`, never a bare `[data-gina-loading]`** (which matches a released trigger and pins the loading style on permanently); framework code uses the primitive's `isArmed()` (`=== "true"`). Arming happens at TWO sites because one is not enough: the click proxy (after the disabled-trigger gate, climbing from `event.target` to the owning button — a click on `<button type="submit"><span>Save</span></button>` targets the inner node) and the native submit proxy (where Enter, `form.submit()`, `$validator.submit()` and that same wrapped-label click actually surface). The attribute NAME is configurable — `gina.setOptions({ loadingAttribute: 'data-loading' })` (#B305: `setOptions()` used to write an orphan object nothing read — inert for every key since it shipped; it now merges into the exposed `gina.config` in place; on builds predating the fix use direct assignment `gina.config.loadingAttribute = …`), read LAZILY on every call; deliberately NO auto-detection (a DOM probe reads nothing at rest, a stylesheet probe races late sheets and throws cross-origin, and writing both names stacks spinners). The logic lives in the stateless `lib/loading-state` primitive (aliased into the browser bundle in BOTH build configs, required from `core.js`, intentionally NOT in the `lib/index.js` registry). `resolveTrigger` takes an optional third argument — a PREDICATE saying what counts as a trigger (default: submit-like controls only): the WALK belongs to the primitive, the notion of a trigger to each caller; a predicate that throws is deliberately not caught. ⚠️ Neither popin nor link passes one — both resolve by id/`closest()`, never from a raw click target. **The LINK plugin carries the same one-XHR-per-request repair (0.6.4):** each link request builds its own transport carrying a sequence taken BEFORE the supersede-abort (an `open()` on a busy object implicitly ABORTS it, an aborted request reaches readyState 4 with status 0, and `handleXhr` has no status-0 branch — the first click's completion fired NOTHING); link arms `data-gina-loading` on the anchor inside `linkRequest` (every entry funnels through it) and releases from a `loadend` listener — which fires for success, error, abort and status-0 alike; only an indefinite hang escapes it. The arm is GATED on `xhr.addEventListener` existing (the CORS branch can swap in a legacy `XDomainRequest` — never arm what cannot be released), and the release is deliberately NOT sequence-guarded (the sequence drops a stale RESPONSE; a superseded request must still RELEASE its trigger). Measured, not assumed: `abort()` fires `abort` + `loadend` SYNCHRONOUSLY, so the superseded request releases before the newer click arms. ⚠️ Still open and deliberately so: a genuine network failure remains silent and a hanging link request has no deadline (`xhr.timeout` never set) — both held back as consumer-visible changes for their own release note. **POPIN arms its trigger too (0.6.4):** `armPopinTrigger()` at both arm sites; releases at readyState 4, in `popinClose`, and in `popinUnbind` — the LAST is load-bearing because routing transitions reach `popinUnbind` WITHOUT `popinClose`. ⚠️ `data-gina-popin-loading` (the CONTAINER — "this popin is filling") and `data-gina-loading` (the TRIGGER — "this control is busy") are NOT the same signal; a rename between them is a regression. The formerly-open preload gap is CLOSED (#B285, 0.6.5): a popin opened from an in-flight preload arms via the adopted-preload arm. Maintainer cautions: `popin.test.js:778` pins `showLoadingShell($popin, $el);` at >= 2 LITERAL occurrences (absorbing the arm block into a helper reds it — grep it with `-F`, `$` and `(` are PCRE metacharacters), and `popin.test.js`'s `driveConsume` extract-and-executes the consumePreload bytes with only 7 injected symbols. **Default CSS + the `@layer gina` override contract (0.6.4-0.6.7):** `[data-gina-loading="true"]` gets a `progress` cursor + an opacity pulse gated on `prefers-reduced-motion: no-preference` (a static dim under `reduce` — a traded signal, not none). Two omissions are deliberate: NO pseudo-element spinner (stacks with a consumer's, forces `position: relative`) and NO `pointer-events: none` (suppresses the second click link deliberately supersedes). Default LOOKS (loading + the `data-gina-form-submit-gated` not-ready look) ship inside `@layer gina`, so ANY un-layered project rule overrides them regardless of specificity or load order — load-bearing because gina's stylesheet-injection order relative to project CSS is author-dependent; projects organising their own CSS in layers order themselves with `@layer gina, app;`; NEVER add `!important` inside the layer (important INVERTS layer priority). Functional rules (popin structure, scroll-lock) deliberately stay UN-layered so a generic project reset cannot break the mechanism. Browsers without `@layer` drop the block (attributes still written, project CSS still applies); `animation: none` drops just the motion; renaming via `loadingAttribute` opts out of the stylesheet entirely (keyed on the default name — the gated attribute is NOT renameable). ⚠️ Build gotcha, general to any new gina stylesheet: the CSS phase concatenates ONLY the compiled file whose basename matches its own directory (`foo/sass/bar.scss` compiles but never reaches `gina.min.css`); `inspector` is skipped entirely (served separately). **Labels & rendering (former #297 — #B178 family, 0.6.1):** the key an app can OBSERVE in a field's `errors` object is not always the key the label catalog is consulted under — four rule families write a generic key while consulting a specific label key (the float NaN branch renders `errorLabels['toFloatNAN']` into `errors['toFloat']`; the Length families render `Min`/`Max` label variants into the generic `is<X>Length` keys) — so an ALIAS FILL applies to every app-supplied label layer (server catalog node, client whisper, per-culture registrations, `setErrorLabels()`): a supplied generic fills the specific keys the app did not supply; a supplied specific still wins; English defaults untouched. Numbered `is` aliases with no rule-supplied text fall back to the shared `is` label (translate catalog key `is` once to cover every alias); the user-validator setup loop fills only when the app supplied none (it used to reset every user-defined validator's label to English, clobbering catalog translations). Render-side: the aria-live announcement joins per-message texts with a sentence separator (raw `textContent` concatenated with NO separator — a screen reader received one run-on string), and two rules resolving to byte-identical text render ONCE (the dev inspector still records every error key). All browser-bundled — consumers RE-BAKE at pickup; apps that translated only observable keys will see those messages switch from English to their language. **Transport-layer settle — a submit that never reaches the server now reports (#B447).** An XHR settling at `readyState` 4 with `status` 0 — network down, connection refused, DNS gone, the server process restarting — used to emit NOTHING: the success arm tests `/^2/.test(xhr.status)`, the error arm was `else if (xhr.status != 0)` which EXCLUDES 0, the arm that would have caught 0 sat fully commented out, and there was no trailing `else` — so both `error.<id>` and `error.<id>.hform` were unreachable for exactly the failure `data-gina-form-event-on-submit-error` most needs to cover. The `loadend` fail-safe still released the submit trigger, so the form spun, re-enabled, and said nothing. Both events now fire with `{ status: 408, transportError: true, error: <text> }`: 408 keeps `status >= 400` handlers working, and `transportError` is what distinguishes this from a genuine timeout (which emits a bare 408). The result stashes to `$form.eventData.error`, matching the three sibling arms in the same readyState chain and the key the readers actually consult — NOT the `on*` keys `ontimeout`/`onprogress` write, which are measured write-only (0 readers each) and are never cleared by the pre-validation `delete`. ⚠️ `xhr.timeout` is still never assigned, so the two `ontimeout` handlers remain dead code (#B448, LOW, on-demand — closing it means inventing a client-side timeout config surface that does not exist today); a real network timeout lands on THIS arm instead, which is why #B448 is NOT a coverage hole. Browser-bundled ⇒ consumers RE-BAKE at pickup. Tests: `validator-transport-error.spec.js` (arm 01 is a POSITIVE CONTROL — a 500 MUST fire the error event, without which arm 02's silence proves nothing; the `error.<id>.hform` channel is deliberately NOT asserted, because declaring the attribute flips `listenToXhrEvents` on and would change the shared fixture's scene) + `validator-autocomplete-interception.test.js` / `validator-livecheck-stale-error-clear.test.js` (extracted-real-bytes + red-first dist pins — Closure De-Morgans the chord bail, so minified pins target property-name shapes, never var names) + the #B332-cluster e2e matrix (incl. the field-order arm: a clean form whose query field is NOT last must send exactly once, after the settle). **The server-answered shape (#B1083, 0.7.9):** every error payload that follows an answer carries `transportError: false` and `contentType` (the answer's `Content-Type` as the browser reads it, `null` when there is none): the normal path builds `result = { status, transportError: false, contentType }` and `merge(body, result)` keeps a JSON body's own keys. Before, a server error carried no `transportError` key at all although the forms guide's table says `false`, so `=== false` never matched, and a reverse proxy's 502 HTML page arrived whole in `message` with the same `{ message, status }` keys as an application-written message (the success path already hands HTML over as `{ contentType, content, status }`). An answer sent as an attachment (the download/blob branch) now keeps a body that is not JSON in `message` (it was dropped: `{ status }` only), and the 2xx path's catch (a JSON body that does not parse, reported as `422`) carries both keys. `message` is unchanged (additive). ⚠️ Instrument trap: the #B447 hform fixture records `!!d.transportError`, so its arm 01 cannot see a missing key; `validator-error-payload-b1083.spec.js` reads the RAW payload (`in` checks) and, for an answer with no `Content-Type`, compares with a plain XHR's own `getResponseHeader` reading (Chromium `null`; WebKit under a Playwright fulfil `text/plain`). Browser-bundled ⇒ consumers RE-BAKE at pickup. **Server-side twin — the `query` rule must not mutate the shared `app.proxy` conf (#B522, 0.6.30):** `queryFromBackend` bound its request options straight to `getConfig(<bundle>, 'app').proxy[<target>]` — the GLOBAL two-argument `getConfig` returns the bundle conf BY REFERENCE (`resolveBundlesConf` hands back `conf.bundlesConfiguration.conf` / `conf.envConf` with no clone) — then wrote `opt.method` and `opt.path = route.url` into it, while `controller.query()` added `requestTimeout` from the calling route's `queryTimeout` BEFORE its own `merge(JSON.clone(options), …)`. All three persisted on `content.app.proxy[<target>]` for the process lifetime. ⚠️ `path` and `requestTimeout` are DOCUMENTED `proxyTarget` properties (`schema/app.json`), so the shared node carried a clobbered `path` and a stale `requestTimeout`, not merely stray keys. ⚠️ Be precise about WHICH key does harm: the clobbered `path` is OBSERVABLE to every reader of that conf but has NO framework CONSUMER — `checkBundleStatus` overwrites `opt.path` with its own `route.url` one line after reading the object, `downloadFromURL`'s protocol-upgrade loop never reads `path`, and nothing prepends a configured `proxyTarget.path` (`controller.query()` uses `options.path` AS the request path). The key that IS consumed is `requestTimeout`: once a stale value sits on the shared target the guard `typeof options.requestTimeout === 'undefined'` cannot fire, so a later route's declared `queryTimeout` is silently ignored — MEASURED, a 9s route governed by a polluted 1s (Δ8994 ms against an unpolluted control) — and on HTTP/2 the timeout EVICTS AND DESTROYS the pooled session for that authority (measured shared: two requests reuse one client object) before re-issuing up to 3×, so one route's live-check degrades traffic that never touched the bug. Fixed by cloning at the single mutating bind (`JSON.clone(...)`, a real recursive deep clone, not `JSON.parse(JSON.stringify(...))`); an `app.proxy` census found THREE write sites but only ONE onto the SHARED object. The other two — `controller.js:3757-3758` (`opt.method`/`opt.path` in `checkBundleStatus`) and `:3871-3873` (`bundleObj.host`/`.hostname`/`.port`, inside `downloadFromURL`'s protocol-upgrade loop) — cites re-measured on HEAD 2026-09-10, the former `:3694-3695`/`:3808-3810` having drifted — write just as freely and are safe for ONE reason: they go through the CONTROLLER's `getConfig`, whose copy-on-write view (or the `controller.getConfig.mode: 'clone'` opt-out) captures the write in a per-call overlay. ⚠️ **That is the rule to carry away: whether a write to a conf object is safe depends on WHICH `getConfig` produced it — the global two-argument one returns the live node by reference, the controller's returns a view or a clone — never on how the write looks.** ⚠️ And the view is ONE-DIRECTIONAL: it stops writes reaching the shared tree but does NOT sanitise reads, so before this fix the `checkBundleStatus` reader observed the clobbered `path` even through its view (`lib/conf-view/src/main.js:228-230` returns a non-plain value straight off the shared target; `materialize` at `:176-188` copies FROM it, so `Object.keys` / `JSON.stringify` / `JSON.clone` of a view all fold stray keys in). The read-only sibling one line above the fix was itself dead code and is REMOVED (#B536, 0.6.30) — a second by-reference grab of the shared bundle `app` conf that fed nothing; verified by the identifier reading 0 in the source with firing controls, and the verbatim r.js bundle no longer carries it. The FRONTEND twin never touches proxy conf and is unaffected. ⚠️ Pickup = restart AND RE-BAKE even though the changed branch is server-only: the file is browser-bundled (`build.json` aliases `lib/form-validator`), so `gina.min.js` moves — measured by identity, with `gina.min.css` byte-identical as the firing control. Test: `validator-proxy-conf-clone-b522.test.js` drives the REAL shipped module exactly as the router does, through the sanctioned `setContext('__mock__', { config })` hook, and its §02 arm is a CAN-FAIL instrument check — the stub server must actually receive the route url, without which the pollution assertions could pass vacuously by never reaching the write site at all. A pre-existing false-positive warning on that path is FIXED at its producer (#B537, 0.6.30): `getRoute()` resolves a req-less caller's proxied classification from the `isProxyHost` context latch, whose only boot-time writer runs when the proxy configuration resolved a record for the running scope and env — a bundle whose `proxy.json` carries no such record boots with it unset, the fallback read returned `undefined`, and the server-side `JSON.clone` flagged the non-boolean key on every clone. The fallback now coerces with `|| false`, the idiom five sibling readers of the same latch already use. No consumer distinguishes `undefined` from `false` — every read is truthiness-only, and the `getUrl` filters overwrite the flag before reading it — so the change is invisible except for the warning; on the request path the value was already a strict boolean from the request store, so the `undefined` reaches only a req-less caller, and the framework has no req-less `getRoute()` caller of its own (application code only). Pinned by `routing-isproxyhost-boolean-b537.test.js`: real-module drives, a frozen pre-fix copy compiled in-memory as the subtract control, and a can-fail warn-capture arm. Pickup: restart; `gina.min.js` changes (identity-measured, `gina.min.css` byte-identical) but the client branch never produced the value and the client clone never warned, so the re-bake is byte parity. **The rule's data on the wire (0.7.5, #B951, #B950):** in the browser a GET (the default), HEAD or DELETE rule sends its data in the url's query string, each key once, an object value as its JSON text (`encodeRFC5987ValueChars`, the server's encoding), joined with `&` to a query string the rule's url already holds, a key that url already holds keeping the url's value, and no body; the data used to reach `xhr.send()` only, which the XHR standard drops for GET and HEAD and which a gina receiver ignores for DELETE (it fills `req.delete` from the query string only), so such a rule sent none of it (measured in Chromium). POST, PUT and PATCH keep the JSON body. Server side, `queryFromBackend` treats a rule aimed at the bundle in context (`getContext('bundle')`) or at the Config instance's (`config.bundle`, undefined under `gina-container`) as same-bundle, so no app.json `proxy` entry for itself is needed, and that branch sets the bare `host` beside `hostname` (`scheme://host`): an HTTP/1.1 call connects to `host` and looked `http://localhost` up as a host name (ENOTFOUND); HTTP/2 connects to `hostname` and never reads `host`. **#gh76 slice 2 — the submit pipeline owns the `text/html` answer contract (0.6.32).** A form places its own answer with three attributes resolved AT SUBMIT from the form (never from the page state at settle): `data-gina-form-target` (hx-target grammar — `this` | `closest <sel>` (ancestor-OR-self) | `find <sel>` | a document-scoped CSS selector; `next`/`previous` RESERVED and refused so adding them later stays additive), `data-gina-form-swap` (nine htmx strategies, `innerHTML` default) and `data-gina-form-select` (ALL matches, document order). A declared target WINS over the popin the form is in (#213); absent, the popin path is unchanged. Refusal is FAIL-LOUD and happens BEFORE `xhr.open` — unresolvable target, invalid selector, reserved/unknown form, unknown strategy ⇒ `error.<id>` (+ `.hform`) with `{status:422, reason:'targetError', attribute, value, transportError:false}`, `isSending`/`sent` cleared, the trigger released, NO request sent — deliberately the inverse of `data-gina-dialog-target`'s fallback to a full replace (silent in production, announced in dev mode since #B580), because a submit has already changed server state. ⚠️ That refusal is a FOURTH loading-state terminal path and is OWNERSHIP-GATED (`ownedByEarlierSend`, read BEFORE `send()` claims `isSending`): with `withRateLimit:false` a second attempt can be refused while the first still runs, and both the release and `isSending` belong to that first request — `armSubmitLoading` is first-wins, so the refused attempt armed nothing of its own (the #B247 rule; `loading-state.test.js §06` counts the sites AND pins the guard — it caught this releasing unconditionally). Success payload = the legacy `{contentType, content, status}` PLUS `target`/`swap`/`swapped`/`data`/`view`; `swapped:false` is not an error (`swap:'none'`, a `select` matching nothing, or a target detached in flight). Events `beforeswap` (cancelable via `preventDefault()`, `detail.content` re-read after dispatch so a listener may rewrite it — needs the `on()` wrapper's name-scoped `cancelEvent` exception for `beforeswap.` only) and `afterswap` (after the region is bound; declarative hook `data-gina-form-event-on-swap`). The swapped region is bound through the SHARED `bindRegion()` policy (utils/dom, #213). ⚠️ The validator declared its OWN module-local `bindRegion` for the forms half: `var` HOISTS over the whole file, so it shadowed the shared global and `applySwap` silently bound forms while never re-creating a swapped region's `<script src>` — the local is `bindFormsInRegion`, the PUBLISHED `gina.validator.bindRegion` name unchanged, and `region-binding.test.js §02` now pins the ABSENCE of a local `bindRegion`. A swap replacing the submitting form (`outerHTML`/`delete`) keeps its listeners through the success events, then binds the same-id replacement (`deferFormId`). Pinned by `validator-form-target.test.js` (27) + `validator-form-target.spec.js` (18 e2e arms). Browser-bundled ⇒ restart AND re-bake. **#gh76 slice 3 — out-of-band swaps (0.6.32).** Any element of the answer carrying `data-gina-swap-oob` is swapped into the PAGE element with the same `id`, independently of where the answer itself goes (htmx's `hx-swap-oob`). `true`/empty ⇒ `outerHTML` (the element ITSELF, attribute stripped on landing); a strategy name ⇒ the element's CONTENT with the wrapper dropped (`innerHTML` would otherwise nest a duplicate id); `<strategy>:<selector>` RESERVED. Every candidate is REMOVED from the answer whether or not it swapped — the main fragment is always clean — and the whole pass is STRING-GATED on `result.content.indexOf('data-gina-swap-oob') > -1`, so an answer without the attribute takes byte-identical paths (the gate is pinned at exactly 3 occurrences). Reached from all THREE html paths: `applySwap` (BEFORE `select` narrows, so an element outside the selection still lands; where both address the same element the main swap wins), the popin branch, and the legacy target-less tail — so an answer carrying nothing else still updates the page, htmx's `hx-swap="none"` rule. The payload gains `oob` (one entry per element, `{id, strategy, swapped}` plus `reason` for `noId`/`noTarget`/`reserved`/`unknownStrategy`/`cancelled`) and `remainder` (the answer minus them — what a handler should insert, since `content` stays RAW and would land them twice); both are ABSENT below the gate, so `'oob' in payload` means "the answer carried the attribute". Events fire PER ELEMENT: `oobbeforeswap.<id>` (cancelable, `detail.content` rewritable) and `oobafterswap.<id>` (+ its `.hform` companion when armed). ⚠️ `oobbeforeswap` has NO `.hform` twin, mirroring `beforeswap`: a cancel is a DECISION while the declared-callback channel carries notifications — and the `on()` wrapper's cancelEvent exception had to widen from `/^beforeswap\./` to `/^(oob)?beforeswap\./` or the cancel never reaches a `.on()` listener at all. Three traps worth carrying. (1) An author-supplied `<template>` is honoured (htmx parity), and one EMPTIED of its oob elements is REMOVED with them — otherwise an oob-only answer leaves `<template></template>`, whose non-empty remainder makes the popin path call `loadContent` and BLANK the open dialog; measured, `loadContent('')` throws nothing, keeps `isOpen`, fires `open`+`loaded`, and leaves a blank dialog whose form is UNBOUND, which is exactly why the empty-remainder skip exists. (2) `textContent` takes the REMAINDER, not the raw answer, or the consumed transport renders as visible text. (3) A nested oob inside ANOTHER oob is not processed on its own — it travels with its ancestor and its attribute is stripped there (htmx's `allowNestedOobSwaps:false` parity), while one merely nested in a NON-oob wrapper is processed and removed from it. An oob swap that replaces or removes the SUBMITTING form defers its binding (`deferFormId`) and reports `rebindSelf`, finalized by the shared tail — the popin branch RETURNS before that tail, so it finalizes itself, and the main swap's flag became `sendCtx.rebindSelf || detachesForm` so it can no longer clear a flag an oob swap already set. The same two test files now carry 50 unit arms + 26 e2e arms. Browser-bundled ⇒ restart AND re-bake. **#gh76 §6 — the server's last word (0.6.32):** three RESPONSE headers, read at settle inside the `text/html` branch (a JSON answer never reaches the read), after the answer is known to be HTML and BEFORE the target fork and `beforeswap` (htmx's order — a listener keeps the final say): `X-Gina-Retarget` (the `data-gina-form-target` grammar through the same `resolveSwapTarget`; it CREATES a target where none was declared, replaces a declared one, and `sendCtx.targetAttr` names the header — a declaration made by the server, so it wins over the popin exactly as an attribute does), `X-Gina-Reswap` (one of `SWAP_STRATEGIES`) and `X-Gina-Reselect` (a selector). The invalid-value rule is ASYMMETRIC, each half a rule that already existed: a Retarget that cannot be resolved DROPS the target — no swap, not into the declared target and not into the popin (the server plainly meant somewhere else) — and the success payload is the swap shape with `swapped: false`, `reason: 'retargetError'` and `target: null`, never an error callback (the false-422 shape slice 1 removed); a Reswap/Reselect that fails validation is IGNORED and the declared value kept (htmx degrades an invalid `HX-Reswap` the same way), as is either one without any target (`reason: 'noTarget'`). The report — `sendCtx.overrides`, one `{ value, applied, reason }` entry per header — rides the payload (`overrides`, present only when a header was sent), the `beforeswap` detail, and the legacy target-less payload; the popin path's parsed data stays VERBATIM (the slice-1 contract), so an ignored override there is a dev-mode console notice only. SAME-ORIGIN ONLY: the three headers are honoured only from a response whose origin is the page's own (`xhr.responseURL` — the URL after redirects — against `location.origin`); a cross-origin Retarget is refused like an unresolvable one (no swap, `reason: 'crossOrigin'`), a cross-origin Reswap/Reselect is ignored and the declared value kept, and a missing or unparseable `responseURL` or an opaque origin on either side reads as not-same-origin (fail-closed) — htmx needs no such read because `selfRequestsOnly` refuses the cross-origin REQUEST, while a form here posts to its raw `action`, so the gate lives at the read, and `Access-Control-Expose-Headers` buys nothing for these three; no controller helper — `self.getResponseObject().setHeader()` is the documented way. `applyResponseOverrides(xhr, sendCtx, $target, id)` is extractable (unit seam), pinned to exactly ONE call site inside the html branch. **Request coordination (#gh76 §7, UNRELEASED):** the DEFAULT is DERIVED and needs NO attribute — `deriveSync($form)` reads `data-gina-form-target` + `data-gina-form-swap` and returns `{strategy:'replace', derived:true, key, swap}` ONLY when the swap is in `REPLACING_SWAPS` (`innerHTML`/`outerHTML`/`textContent`/`delete`) AND the target RESOLVES; an insertion, `none`, no target, an unresolvable target, or a swap the pre-flight would refuse, all return `null` (no coordination at all, today's behaviour). The swap is read with `.trim()` only — CASE-SENSITIVE, matching the pre-flight's `SWAP_STRATEGIES.indexOf` — so a value heading for a refusal can never abort a running request on the way. `data-gina-form-sync` is the OVERRIDE (`drop`|`replace`|`queue`, no modifiers); `abort`, `queue <mod>` and `<selector>:<strategy>` are REFUSED with a message naming the reason AND the alternative (deliberate non-adoptions, not gaps: `abort` is htmx's disposable-GET idiom and a form submit is a validated POST with side effects; the `queue` modifiers exist in htmx because its trigger spec has `queue:` modifiers of its own; `<selector>:<strategy>` names a key that is already known). ⚠️ A SUPERSEDE IS NOT A ROLLBACK: the aborted request was already in flight, so it may have REACHED the server and its writes stand — a consumer must never read `abort`/`superseded` as 'not saved' and RESUBMIT (a duplicate write, on a feature whose premise is that a submit is a POST with side effects); the outcome of a superseded submit is the server's to report, never the event's. ⚠️ ORDERING IS LOAD-BEARING TWICE OVER: the derivation runs AFTER the module-wide `withRateLimit` gate (so one form's own re-submits keep the one-at-a-time rule and the derived default only ever coordinates DIFFERENT forms — zero blast radius on a single form), and the whole decision runs BEFORE `instance.$forms[id].isSending = true`, because `xhr.abort()` settles the aborted handler SYNCHRONOUSLY — claiming first lets that settle clear the flag this send just took (#B332 class). Same reason the handler-top `$form.isSubmitting = false` is guarded on `!sendCtx.superseded`. Keyed on the RESOLVED SWAP TARGET (`resolveSyncKey` for the explicit path; the derived path carries its own `syncParsed.key`) — a form key would not see the case the issue is about, two DIFFERENT forms answering into one region. Registry = a module `WeakMap<Element,{xhr,ctx,queue}>` (a swapped-away target is a new element, so its entry is collected — correct); NO seq counter, the per-send XHR object (#B175) IS the identity a late settle is checked against; NO `abortable` flag — the ARRIVING submit's strategy decides and nothing is carried on the entry. A SUPERSEDED request runs its RELEASE arms (trigger, loading state, a11y) then RETURNS before the status dispatch, emitting `abort.<id>` `{status:0, reason:'superseded', sync, derived}` — it must never reach the #B447 transport arm, which reads readyState-4/status-0 as a 408 the server never sent; there is deliberately NO `.hform` twin (nothing went wrong). `derived` is ON THE PAYLOAD because the default needs no attribute, so a page may find nothing in its own markup that asked for the abort. `replace` re-arms `armSubmitLoading` after the abort released it (first-arm-wins, stash just cleared). Exactly ONE turn-away exists (`drop`), so `disarmSubmitLoading` counts 6 in the file (1 JSDoc + 5 sites, pinned in `test/lib/loading-state.test.js`) — `queue` WAITS and keeps its loading state (pending, not abandoned; the replay's first-arm-wins carries it to the real settle), `replace` proceeds. An UNREADABLE sync value decides nothing and its refusal is DEFERRED to the pre-flight: from the top of send() the declared callbacks are not bound yet (`listenToXhrEvents` runs later), so a refusal there reaches nobody — measured, it silently delivered no error; a DERIVED result never carries an error by construction. `data-gina-form-disabled-elt` = a comma list in the target grammar, resolved after every refusal and before `xhr.open`, refcounted in a second WeakMap, marked `data-gina-disabled-by`, released at the `loadend` fail-safe (the one chokepoint covering error/abort/timeout) PLUS the binary branch's error exit, which never reaches the wire; an element the PAGE disabled is skipped and never counted. Both refusals reuse `refuseSend`, so `reason` stays `'targetError'` and `attribute` discriminates. The slot is claimed on the line AFTER each of the three `xhr.send()` sites — claiming earlier wedges a key forever on the one path that opens an XHR and never sends it. `parseSync`/`deriveSync`/`decideSync`/`queueSyncSend`/`shiftSyncQueue`/`resolveDisabledElts` are extractable (unit seam). ⚠️ Instrument: `input.disabled` reflects only the element's OWN attribute — a control disabled by a `<fieldset>` ancestor is observable through `:disabled`, not `.disabled`. ⚠️ Instrument: Closure renames `deriveSync`/`REPLACING_SWAPS` out of the MINIFIED bundle, so the discriminating content probe between a pre-reframe and a reframed `gina.min.js` is `abortable` (9 → 0); the readable names survive only in the unminified `dist/.../gina.js`. ⚠️ #B247's ownership rule had to be RE-DERIVED for a target key and the gap was found by a cold read, then DRIVEN: the module-wide gate may return without releasing because it only ever fires on the form that already owns the request, whose settle releases it — but a TARGET key turns away a DIFFERENT form, whose armed `data-gina-loading` nothing else would ever clear (measured: stranded `true` on the real bundle). ⚠️ **A template writing `data-gina-form-sync` must write the WHOLE attribute conditionally, never an empty one.** The gate handing a form its own overlap decision is `syncAttr === null` (`core/plugins/lib/validator/src/main.js:3174`), so a present-but-empty `data-gina-form-sync=""` is NOT absent: it passes the gate, reaches `parseSync('')` → `{error:'empty value'}` (`:913`) and REFUSES the submit before anything is sent — the same fail-loud path an unknown strategy takes. Swig-safe shape: `{% if page.view.params and page.view.params.sync %} data-gina-form-sync="{{ page.view.params.sync }}"{% endif %}`, and the `page.view.params and` half is LOAD-BEARING because `page.view.params` is set only `if (ownCount(parameters) > 0)` (`core/controller/controller.js:1432`) — i.e. it is ABSENT on a route reached with no parameters, so testing `page.view.params.sync` alone throws there. **Staged-upload wait (#B726, 0.7.2):** a submit made while one of its form's staged uploads is on the wire WAITS, then sends once. Both doors call `holdSubmitForStagedUploads` before collecting — door A (a click on the bound trigger) just before `getFormValidationInfos` and before the latch; door B (the native submit proxy: a click inside the button, Enter in a form with no submit button, `<input type=submit>`, `requestSubmit()`, `$forms[id].submit()`) only AFTER `cancelEvent(e)`, or the browser posts the form itself. The in-flight signal is the virtual `gina-upload-*` record's `sent` (set after `xhr.send`, cleared at readyState 4 and `loadend`), reached through the input's `data-gina-form-virtual` — NOT `isSending`, which is claimed before `xhr.open` and stays true for good when a staging send throws before leaving (measured: an unparsable upload action makes `xhr.open` throw). One wait per form (`stagedUploadWait`): the busy state the gesture armed is kept and `uploadPending` ('Waiting for the upload to finish…', overridable) is announced once; a second gesture while waiting is a no-op, and one made when nothing is in flight any more drops a stale wait. `onUpload` calls `noteStagedUploadSettled` before anything in it can throw, and the decision runs in a microtask after the whole settle (`resolveStagedUploadWait`): an upload still in flight keeps it waiting; any failure, or the form leaving the page, cancels it and releases the busy state only when the form has no request of its own in flight (the sixth `disarmSubmitLoading` site, pinned by `test/lib/loading-state.test.js` §06 (f)); otherwise the submit is replayed THROUGH ITS OWN DOOR (door A re-dispatches `submit.<triggerId>`, door B `triggerEvent(form, 'submit')`), which collects the now-filled fields again — never route a click through door B: the two collectors differ deliberately and a consumer `on('submit')` is consulted only there. **A newer selection supersedes the staging request (#B729, 0.7.2):** the virtual form carries `data-gina-form-sync="replace"`, so the module rate-limit gate (`isSending || sent`) yields — a declared sync attribute owns its overlap decision — and a file chosen while the input's previous staging request is still on the wire aborts that request through the gh#76 coordination path and is sent; the superseded request settles through `abort.<vid>` only (`reason: 'superseded'`, no error, no on-error callback), and a submit already waiting keeps waiting, for the NEW request, and sends its metadata. Before, the gate returned silently — no event, no log — after the change handler had already reset the indicator and announced the upload, and the first request then filled the hidden fields with the REPLACED file's metadata while the input showed the new one. Pin: e2e `validator-upload-reselect-b729.spec.js` (3 arms). Not held: a direct `send(data)` (the caller's payload) and an upload started after a submit already passed the door check (#B740). `unbindForm` drops a pending wait, and so does a form reset, which also releases the busy state unless a request of the form's own is in flight (#B1043, 0.7.9; the eighth `disarmSubmitLoading` site, `loading-state.test.js` §06 (h)). No timeout is set on a staging request, so an upload that never answers keeps the submit waiting.
1072
+ 301. **FormValidator — submit pipeline, async `query` rule, loading state & error rendering (consolidates former #257/#261/#264/#296/#297; the engine/binding/a11y parent is #209).** **Rules & binding (former #257 — #B127/#B128/#B129 0.5.20, #B138 0.5.22):** numbered `is` aliases (`is0`, `is1`, … — multiple `is` conditions per field) INSTALL and enforce on client AND server (anchored `/^is\d+$/`) with a DISTINCT error key per alias on both sides (previously the per-rule typecheck `continue`d on exactly the undefined state the lazy installer required — silently skipping every `is<N>` key — and the shared server key let a later PASSING alias erase an earlier FAILING alias's error, a silent bypass). ⚠️ Enforcement-tightening: `is<N>` rules that silently skipped START ENFORCING at pickup — sweep rule JSONs for `is<N>` keys before upgrading. The `is` grammar remains ONE binary comparison (`=== !== == != < > <= >=`), no `&&` compounds. #B138: the shared `_currentValidatorAlias` handshake slot re-arms immediately before EVERY delegation (it was armed once at install while `is()` consumes-with-delete — any re-application against the same instance collapsed every numbered rule onto the bare key `is`, last-declared-wins, its message rendered twice). Injected forms (`validateFormById`) resolve their declared rule ATTRIBUTE-FIRST (`data-gina-form-rule`; the id-derived name stays the fallback) — pre-fix a form injected after boot bound `{}` rules. Live-check gate precedence: an AUTHOR-set `data-gina-form-live-check-enabled` always wins; the gate decides only when the attribute is absent (rules bound → true). The cross-field `_case_` scan coerces the CASE VALUE (declare boolean cases as JSON booleans; the strings "true"/"false" coerce consistently), and a MATCHING case application replaces that field's rule set for that pass only: since #B885 (0.7.5) every pass works on its own copy of the rules, so nothing persists into the bound form's store. There are NO standalone `maxLength`/`minLength` engine rules — length constraints are `isString`/`isNumber`/`isInteger` parameters; unknown rule keys are silently skipped. **Safari autocomplete gate + stale-error clear (former #261 — #B135/#B136):** the Safari `autocomplete="off"` workaround (entry 209; its keydown interception, with the #B134 chord bail, was removed by #B1055, so every key is native) (a) gates on REAL Safari only (`/safari/i && !/chrom(e|ium)/i` — every Chromium UA carries the Safari token; WebKit-on-iOS browsers stay matched by design); and (b) the live-check whole-form pass, when it turns VALID, clears every previously-errored field's rendered error in BOTH copies instead of leaving a stale blocking paragraph beside the re-enabled trigger (the pass still never renders NEW errors on untouched fields). **The async `query` rule (former #264 — #B87 0.5.22; the #B332-#B346 cluster, 0.6.7):** the result path is BLANKET-guarded — a throw while processing the response (a detached target's null `.form` after a popin closed mid-flight, a malformed JSON body, a boolean value hitting `.toLowerCase()`) routes to `releaseQueryWaiter` (warn + release with field state as-is — FAIL-OPEN by design: the verdict is unknown and the server re-validates on submit); `xhr.onload`'s catch and the wrapped `onerror` route to the same release; the release helper is itself try-guarded and names the field. A submit can never complete while the verdict is on the wire, and ONE production POST per click at most: `getOwnedElements` dedups by node identity (an id-less submit trigger used to enter twice and stack TWO listeners — one click ran two full validate() passes, #B333), the async-arm guard is PASS-LOCAL (`armedAsyncFields` — waiters stack per pass and self-detach on first fire; the second pass used to find the first pass's waiter, zero ITS OWN counter and complete on the sync-only verdict ~200ms before the query answered, #B332), the wire dedups via a `ginaFormValidatorQueryPending` dataset marker, and every `validated.<formId>` listener consumes only its own pass's dispatch and detaches (stale listeners used to replay the submit once per leftover, #B334). #B337: the completion payload is the no-arg `d.getErrors()` — the WHOLE pass's verdict (field-scoped payloads meant other invalid fields were adjudicated but never rendered on the submit path, and the inverse scene dispatched an EMPTY error set — refusing the submit with no rendered reason). Engine contract worth knowing: `queryFromFrontend` SKIPS the wire when `self.isValid()` is already false, so whether a query fires on an invalid form depends on FIELD ORDER — the settle/skip completion payload must carry the full verdict either way. #B338: both formerly-synchronous releases (cached verdict, wire skip) defer via `queueMicrotask` so every release takes the post-pass shape a real settle has (they used to fire mid-field-loop, composing a completion missing every field declared after the query field and CLEARING their rendered errors on a re-click). #B342: a latched form's async completion dispatches UNCONDITIONALLY — the waiter's clean path used to dispatch only when the query field happened to be LAST in the rule set, so a clean submit with the query declared earlier starved the callback, no POST ever left, and the `isSubmitting` latch stranded the form until reload (masked pre-arc by the very #B332 double-pass the arc removed). #B346 closed the LAST silent door, one step UPSTREAM — the trigger gate: with live-check on, `updateSubmitTriggerState` gates the trigger whenever the form is not-yet-valid, but while a query is ON THE WIRE the form has NO verdict, and the gate misclassified verdict-pending as invalid — a click inside the round-trip window died silently (consumer-measured 0/6 inside vs 6/6 after; the window scales with query LATENCY, not typing speed). The refusal is narrowed by `isAwaitingQueryVerdictOnly`: the framework's gated mark must be the ONLY refusal arm (an authored `aria-disabled` or non-IDL `disabled` still refuses), an owned field carries the in-flight marker (checked in-form AND on `form="<id>"` reassociated controls, CSS.escape-guarded), and no SETTLED field holds a committed error (the pending field's own provisional `query` entry — staged by the same-value fast path — does not count; counting it refused every window the narrowing exists to recognize, measured). Consulted at the click proxy, the trusted-submit proxy (wrapped-label `<button type="submit"><span>` shapes; Enter with a default button is spec-synthesized into a click on it) and the loading arm; the shared fresh-validate path LATCHES `isSubmitting` when proceeding under a pending verdict (an un-latched async pass STARVES — this was also silently starving programmatic `submit()`) and releases the latch before any consumer `submit.<id>` dispatch, so a stopping custom handler cannot strand the form. **Send lifecycle (former #296 — #B175/#B176 0.6.1, #B192 0.6.3):** every `send()` builds its own LOCAL XHR (the module-scope reuse re-`open()`ed a completed instance, synchronously replaying the PREVIOUS submit's `onreadystatechange` at readyState 1 — submitting form B after form A stranded A's trigger natively-disabled with no release path) and registers a `loadend` release — success, error, timeout and abort alike — removing `disabled`/`aria-disabled` + `data-gina-form-loading` and clearing `$form.isSending`/`$form.sent`; `$form.isSending` genuinely spans send→settled; the timeout path REMOVES `data-gina-form-loading` (never writes the truthy string "false"). #B192: a REJECTED submit releases the `isSubmitting` latch (the only clear was the XHR settle, which a rejected submit never reaches — one invalid attempt latched the flag for the page's life, swallowing every later keystroke; the flag lives on the `$forms[id]` OBJECT so it even survived a full unbind/rebind). Diagnostic: read `gina.validator.$forms['<id>'].isSubmitting` — truthy IS the latched state (exactly what the live-check gate tests); the other discriminator is the live-check request count after a keystroke (0 latched, 1 healthy). ⚠️ **Do NOT use `isValidating` for this** — consumer-A/B-measured NON-discriminating (2026-08-01): it inits null and is set by EVERY validation cycle, so on any form that live-checked before the submit it reads `false` in BOTH the latched and healthy states. #B176: the live-check opt-out is honored consistently — the two gates that evaluated the rules-count boolean INSIDE `/^(true)$/i.test(…)` (an explicit `"false"` short-circuited to the count and matched) now test the attribute alone; the three `registerForLiveChecking` sites always did. Standing caution: `setOptions()` is a MODULE-wide default setter, not per-call. **Loading state (`data-gina-loading` + `lib/loading-state`, 0.6.4-0.6.5):** the FORM-scoped `data-gina-form-loading` says "a request is in flight"; the TRIGGER-scoped `data-gina-loading` marks the submit-like element the user actually operated — `"true"` while its action runs, `"false"` at ANY terminal outcome. Five release paths, two reaching no XHR at all: a submit REJECTED by validation, `send()`'s rate-limit early return, plus `loadend`, readyState 4, and never-arming when the disabled-trigger gate turns the click away. ⚠️ **The `"false"` value CONSTRAINS READERS: the attribute stays PRESENT when released — match on the VALUE, `[data-gina-loading="true"]`, never a bare `[data-gina-loading]`** (which matches a released trigger and pins the loading style on permanently); framework code uses the primitive's `isArmed()` (`=== "true"`). Arming happens at TWO sites because one is not enough: the click proxy (after the disabled-trigger gate, climbing from `event.target` to the owning button — a click on `<button type="submit"><span>Save</span></button>` targets the inner node) and the native submit proxy (where Enter, `form.submit()`, `$validator.submit()` and that same wrapped-label click actually surface). The attribute NAME is configurable — `gina.setOptions({ loadingAttribute: 'data-loading' })` (#B305: `setOptions()` used to write an orphan object nothing read — inert for every key since it shipped; it now merges into the exposed `gina.config` in place; on builds predating the fix use direct assignment `gina.config.loadingAttribute = …`), read LAZILY on every call; deliberately NO auto-detection (a DOM probe reads nothing at rest, a stylesheet probe races late sheets and throws cross-origin, and writing both names stacks spinners). The logic lives in the stateless `lib/loading-state` primitive (aliased into the browser bundle in BOTH build configs, required from `core.js`, intentionally NOT in the `lib/index.js` registry). `resolveTrigger` takes an optional third argument — a PREDICATE saying what counts as a trigger (default: submit-like controls only): the WALK belongs to the primitive, the notion of a trigger to each caller; a predicate that throws is deliberately not caught. ⚠️ Neither popin nor link passes one — both resolve by id/`closest()`, never from a raw click target. **The LINK plugin carries the same one-XHR-per-request repair (0.6.4):** each link request builds its own transport carrying a sequence taken BEFORE the supersede-abort (an `open()` on a busy object implicitly ABORTS it, an aborted request reaches readyState 4 with status 0, and `handleXhr` has no status-0 branch — the first click's completion fired NOTHING); link arms `data-gina-loading` on the anchor inside `linkRequest` (every entry funnels through it) and releases from a `loadend` listener — which fires for success, error, abort and status-0 alike; only an indefinite hang escapes it. The arm is GATED on `xhr.addEventListener` existing (the CORS branch can swap in a legacy `XDomainRequest` — never arm what cannot be released), and the release is deliberately NOT sequence-guarded (the sequence drops a stale RESPONSE; a superseded request must still RELEASE its trigger). Measured, not assumed: `abort()` fires `abort` + `loadend` SYNCHRONOUSLY, so the superseded request releases before the newer click arms. ⚠️ Still open and deliberately so: a genuine network failure remains silent and a hanging link request has no deadline (`xhr.timeout` never set) — both held back as consumer-visible changes for their own release note. **POPIN arms its trigger too (0.6.4):** `armPopinTrigger()` at both arm sites; releases at readyState 4, in `popinClose`, and in `popinUnbind` — the LAST is load-bearing because routing transitions reach `popinUnbind` WITHOUT `popinClose`. ⚠️ `data-gina-popin-loading` (the CONTAINER — "this popin is filling") and `data-gina-loading` (the TRIGGER — "this control is busy") are NOT the same signal; a rename between them is a regression. The formerly-open preload gap is CLOSED (#B285, 0.6.5): a popin opened from an in-flight preload arms via the adopted-preload arm. Maintainer cautions: `popin.test.js:778` pins `showLoadingShell($popin, $el);` at >= 2 LITERAL occurrences (absorbing the arm block into a helper reds it — grep it with `-F`, `$` and `(` are PCRE metacharacters), and `popin.test.js`'s `driveConsume` extract-and-executes the consumePreload bytes with only 7 injected symbols. **Default CSS + the `@layer gina` override contract (0.6.4-0.6.7):** `[data-gina-loading="true"]` gets a `progress` cursor + an opacity pulse gated on `prefers-reduced-motion: no-preference` (a static dim under `reduce` — a traded signal, not none). Two omissions are deliberate: NO pseudo-element spinner (stacks with a consumer's, forces `position: relative`) and NO `pointer-events: none` (suppresses the second click link deliberately supersedes). Default LOOKS (loading + the `data-gina-form-submit-gated` not-ready look) ship inside `@layer gina`, so ANY un-layered project rule overrides them regardless of specificity or load order — load-bearing because gina's stylesheet-injection order relative to project CSS is author-dependent; projects organising their own CSS in layers order themselves with `@layer gina, app;`; NEVER add `!important` inside the layer (important INVERTS layer priority). Functional rules (popin structure, scroll-lock) deliberately stay UN-layered so a generic project reset cannot break the mechanism. Browsers without `@layer` drop the block (attributes still written, project CSS still applies); `animation: none` drops just the motion; renaming via `loadingAttribute` opts out of the stylesheet entirely (keyed on the default name — the gated attribute is NOT renameable). ⚠️ Build gotcha, general to any new gina stylesheet: the CSS phase concatenates ONLY the compiled file whose basename matches its own directory (`foo/sass/bar.scss` compiles but never reaches `gina.min.css`); `inspector` is skipped entirely (served separately). **Labels & rendering (former #297 — #B178 family, 0.6.1):** the key an app can OBSERVE in a field's `errors` object is not always the key the label catalog is consulted under — four rule families write a generic key while consulting a specific label key (the float NaN branch renders `errorLabels['toFloatNAN']` into `errors['toFloat']`; the Length families render `Min`/`Max` label variants into the generic `is<X>Length` keys) — so an ALIAS FILL applies to every app-supplied label layer (server catalog node, client whisper, per-culture registrations, `setErrorLabels()`): a supplied generic fills the specific keys the app did not supply; a supplied specific still wins; English defaults untouched. Numbered `is` aliases with no rule-supplied text fall back to the shared `is` label (translate catalog key `is` once to cover every alias); the user-validator setup loop fills only when the app supplied none (it used to reset every user-defined validator's label to English, clobbering catalog translations). Render-side: the aria-live announcement joins per-message texts with a sentence separator (raw `textContent` concatenated with NO separator — a screen reader received one run-on string), and two rules resolving to byte-identical text render ONCE (the dev inspector still records every error key). All browser-bundled — consumers RE-BAKE at pickup; apps that translated only observable keys will see those messages switch from English to their language. **Transport-layer settle — a submit that never reaches the server now reports (#B447).** An XHR settling at `readyState` 4 with `status` 0 — network down, connection refused, DNS gone, the server process restarting — used to emit NOTHING: the success arm tests `/^2/.test(xhr.status)`, the error arm was `else if (xhr.status != 0)` which EXCLUDES 0, the arm that would have caught 0 sat fully commented out, and there was no trailing `else` — so both `error.<id>` and `error.<id>.hform` were unreachable for exactly the failure `data-gina-form-event-on-submit-error` most needs to cover. The `loadend` fail-safe still released the submit trigger, so the form spun, re-enabled, and said nothing. Both events now fire with `{ status: 408, transportError: true, error: <text> }`: 408 keeps `status >= 400` handlers working, and `transportError` is what distinguishes this from a genuine timeout (which emits a bare 408). The result stashes to `$form.eventData.error`, matching the three sibling arms in the same readyState chain and the key the readers actually consult — NOT the `on*` keys `ontimeout`/`onprogress` write, which are measured write-only (0 readers each) and are never cleared by the pre-validation `delete`. ⚠️ `xhr.timeout` is still never assigned, so the two `ontimeout` handlers remain dead code (#B448, LOW, on-demand — closing it means inventing a client-side timeout config surface that does not exist today); a real network timeout lands on THIS arm instead, which is why #B448 is NOT a coverage hole. Browser-bundled ⇒ consumers RE-BAKE at pickup. Tests: `validator-transport-error.spec.js` (arm 01 is a POSITIVE CONTROL — a 500 MUST fire the error event, without which arm 02's silence proves nothing; the `error.<id>.hform` channel is deliberately NOT asserted, because declaring the attribute flips `listenToXhrEvents` on and would change the shared fixture's scene) + `validator-autocomplete-interception.test.js` / `validator-livecheck-stale-error-clear.test.js` (extracted-real-bytes + red-first dist pins — Closure De-Morgans the chord bail, so minified pins target property-name shapes, never var names) + the #B332-cluster e2e matrix (incl. the field-order arm: a clean form whose query field is NOT last must send exactly once, after the settle). **The server-answered shape (#B1083, 0.7.9):** every error payload that follows an answer carries `transportError: false` and `contentType` (the answer's `Content-Type` as the browser reads it, `null` when there is none): the normal path builds `result = { status, transportError: false, contentType }` and `merge(body, result)` keeps a JSON body's own keys. Before, a server error carried no `transportError` key at all although the forms guide's table says `false`, so `=== false` never matched, and a reverse proxy's 502 HTML page arrived whole in `message` with the same `{ message, status }` keys as an application-written message (the success path already hands HTML over as `{ contentType, content, status }`). An answer sent as an attachment (the download/blob branch) now keeps a body that is not JSON in `message` (it was dropped: `{ status }` only), and the 2xx path's catch (a JSON body that does not parse, reported as `422`) carries both keys. `message` is unchanged (additive). ⚠️ Instrument trap: the #B447 hform fixture records `!!d.transportError`, so its arm 01 cannot see a missing key; `validator-error-payload-b1083.spec.js` reads the RAW payload (`in` checks) and, for an answer with no `Content-Type`, compares with a plain XHR's own `getResponseHeader` reading (Chromium `null`; WebKit under a Playwright fulfil `text/plain`). Browser-bundled ⇒ consumers RE-BAKE at pickup. **Server-side twin — the `query` rule must not mutate the shared `app.proxy` conf (#B522, 0.6.30):** `queryFromBackend` bound its request options straight to `getConfig(<bundle>, 'app').proxy[<target>]` — the GLOBAL two-argument `getConfig` returns the bundle conf BY REFERENCE (`resolveBundlesConf` hands back `conf.bundlesConfiguration.conf` / `conf.envConf` with no clone) — then wrote `opt.method` and `opt.path = route.url` into it, while `controller.query()` added `requestTimeout` from the calling route's `queryTimeout` BEFORE its own `merge(JSON.clone(options), …)`. All three persisted on `content.app.proxy[<target>]` for the process lifetime. ⚠️ `path` and `requestTimeout` are DOCUMENTED `proxyTarget` properties (`schema/app.json`), so the shared node carried a clobbered `path` and a stale `requestTimeout`, not merely stray keys. ⚠️ Be precise about WHICH key does harm: the clobbered `path` is OBSERVABLE to every reader of that conf but has NO framework CONSUMER — `checkBundleStatus` overwrites `opt.path` with its own `route.url` one line after reading the object, `downloadFromURL`'s protocol-upgrade loop never reads `path`, and nothing prepends a configured `proxyTarget.path` (`controller.query()` uses `options.path` AS the request path). The key that IS consumed is `requestTimeout`: once a stale value sits on the shared target the guard `typeof options.requestTimeout === 'undefined'` cannot fire, so a later route's declared `queryTimeout` is silently ignored — MEASURED, a 9s route governed by a polluted 1s (Δ8994 ms against an unpolluted control) — and on HTTP/2 the timeout EVICTS AND DESTROYS the pooled session for that authority (measured shared: two requests reuse one client object) before re-issuing up to 3×, so one route's live-check degrades traffic that never touched the bug. Fixed by cloning at the single mutating bind (`JSON.clone(...)`, a real recursive deep clone, not `JSON.parse(JSON.stringify(...))`); an `app.proxy` census found THREE write sites but only ONE onto the SHARED object. The other two — `controller.js:3757-3758` (`opt.method`/`opt.path` in `checkBundleStatus`) and `:3871-3873` (`bundleObj.host`/`.hostname`/`.port`, inside `downloadFromURL`'s protocol-upgrade loop) — cites re-measured on HEAD 2026-09-10, the former `:3694-3695`/`:3808-3810` having drifted — write just as freely and are safe for ONE reason: they go through the CONTROLLER's `getConfig`, whose copy-on-write view (or the `controller.getConfig.mode: 'clone'` opt-out) captures the write in a per-call overlay. ⚠️ **That is the rule to carry away: whether a write to a conf object is safe depends on WHICH `getConfig` produced it — the global two-argument one returns the live node by reference, the controller's returns a view or a clone — never on how the write looks.** ⚠️ And the view is ONE-DIRECTIONAL: it stops writes reaching the shared tree but does NOT sanitise reads, so before this fix the `checkBundleStatus` reader observed the clobbered `path` even through its view (`lib/conf-view/src/main.js:228-230` returns a non-plain value straight off the shared target; `materialize` at `:176-188` copies FROM it, so `Object.keys` / `JSON.stringify` / `JSON.clone` of a view all fold stray keys in). The read-only sibling one line above the fix was itself dead code and is REMOVED (#B536, 0.6.30) — a second by-reference grab of the shared bundle `app` conf that fed nothing; verified by the identifier reading 0 in the source with firing controls, and the verbatim r.js bundle no longer carries it. The FRONTEND twin never touches proxy conf and is unaffected. ⚠️ Pickup = restart AND RE-BAKE even though the changed branch is server-only: the file is browser-bundled (`build.json` aliases `lib/form-validator`), so `gina.min.js` moves — measured by identity, with `gina.min.css` byte-identical as the firing control. Test: `validator-proxy-conf-clone-b522.test.js` drives the REAL shipped module exactly as the router does, through the sanctioned `setContext('__mock__', { config })` hook, and its §02 arm is a CAN-FAIL instrument check — the stub server must actually receive the route url, without which the pollution assertions could pass vacuously by never reaching the write site at all. A pre-existing false-positive warning on that path is FIXED at its producer (#B537, 0.6.30): `getRoute()` resolves a req-less caller's proxied classification from the `isProxyHost` context latch, whose only boot-time writer runs when the proxy configuration resolved a record for the running scope and env — a bundle whose `proxy.json` carries no such record boots with it unset, the fallback read returned `undefined`, and the server-side `JSON.clone` flagged the non-boolean key on every clone. The fallback now coerces with `|| false`, the idiom five sibling readers of the same latch already use. No consumer distinguishes `undefined` from `false` — every read is truthiness-only, and the `getUrl` filters overwrite the flag before reading it — so the change is invisible except for the warning; on the request path the value was already a strict boolean from the request store, so the `undefined` reaches only a req-less caller, and the framework has no req-less `getRoute()` caller of its own (application code only). Pinned by `routing-isproxyhost-boolean-b537.test.js`: real-module drives, a frozen pre-fix copy compiled in-memory as the subtract control, and a can-fail warn-capture arm. Pickup: restart; `gina.min.js` changes (identity-measured, `gina.min.css` byte-identical) but the client branch never produced the value and the client clone never warned, so the re-bake is byte parity. **The rule's data on the wire (0.7.5, #B951, #B950):** in the browser a GET (the default), HEAD or DELETE rule sends its data in the url's query string, each key once, an object value as its JSON text (`encodeRFC5987ValueChars`, the server's encoding), joined with `&` to a query string the rule's url already holds, a key that url already holds keeping the url's value, and no body; the data used to reach `xhr.send()` only, which the XHR standard drops for GET and HEAD and which a gina receiver ignores for DELETE (it fills `req.delete` from the query string only), so such a rule sent none of it (measured in Chromium). POST, PUT and PATCH keep the JSON body. Server side, `queryFromBackend` treats a rule aimed at the bundle in context (`getContext('bundle')`) or at the Config instance's (`config.bundle`, undefined under `gina-container`) as same-bundle, so no app.json `proxy` entry for itself is needed, and that branch sets the bare `host` beside `hostname` (`scheme://host`): an HTTP/1.1 call connects to `host` and looked `http://localhost` up as a host name (ENOTFOUND); HTTP/2 connects to `hostname` and never reads `host`. **#gh76 slice 2 — the submit pipeline owns the `text/html` answer contract (0.6.32).** A form places its own answer with three attributes resolved AT SUBMIT from the form (never from the page state at settle): `data-gina-form-target` (hx-target grammar — `this` | `closest <sel>` (ancestor-OR-self) | `find <sel>` | a document-scoped CSS selector; `next`/`previous` RESERVED and refused so adding them later stays additive), `data-gina-form-swap` (nine htmx strategies, `innerHTML` default) and `data-gina-form-select` (ALL matches, document order). A declared target WINS over the popin the form is in (#213); absent, the popin path is unchanged. Refusal is FAIL-LOUD and happens BEFORE `xhr.open` — unresolvable target, invalid selector, reserved/unknown form, unknown strategy ⇒ `error.<id>` (+ `.hform`) with `{status:422, reason:'targetError', attribute, value, transportError:false}`, `isSending`/`sent` cleared, the trigger released, NO request sent — deliberately the inverse of `data-gina-dialog-target`'s fallback to a full replace (silent in production, announced in dev mode since #B580), because a submit has already changed server state. ⚠️ That refusal is a FOURTH loading-state terminal path and is OWNERSHIP-GATED (`ownedByEarlierSend`, read BEFORE `send()` claims `isSending`): with `withRateLimit:false` a second attempt can be refused while the first still runs, and both the release and `isSending` belong to that first request — `armSubmitLoading` is first-wins, so the refused attempt armed nothing of its own (the #B247 rule; `loading-state.test.js §06` counts the sites AND pins the guard — it caught this releasing unconditionally). Success payload = the legacy `{contentType, content, status}` PLUS `target`/`swap`/`swapped`/`data`/`view`; `swapped:false` is not an error (`swap:'none'`, a `select` matching nothing, or a target detached in flight). Events `beforeswap` (cancelable via `preventDefault()`, `detail.content` re-read after dispatch so a listener may rewrite it — needs the `on()` wrapper's name-scoped `cancelEvent` exception for `beforeswap.` only) and `afterswap` (after the region is bound; declarative hook `data-gina-form-event-on-swap`). The swapped region is bound through the SHARED `bindRegion()` policy (utils/dom, #213). ⚠️ The validator declared its OWN module-local `bindRegion` for the forms half: `var` HOISTS over the whole file, so it shadowed the shared global and `applySwap` silently bound forms while never re-creating a swapped region's `<script src>` — the local is `bindFormsInRegion`, the PUBLISHED `gina.validator.bindRegion` name unchanged, and `region-binding.test.js §02` now pins the ABSENCE of a local `bindRegion`. A swap replacing the submitting form (`outerHTML`/`delete`) keeps its listeners through the success events, then binds the same-id replacement (`deferFormId`). Pinned by `validator-form-target.test.js` (27) + `validator-form-target.spec.js` (18 e2e arms). Browser-bundled ⇒ restart AND re-bake. **#gh76 slice 3 — out-of-band swaps (0.6.32).** Any element of the answer carrying `data-gina-swap-oob` is swapped into the PAGE element with the same `id`, independently of where the answer itself goes (htmx's `hx-swap-oob`). `true`/empty ⇒ `outerHTML` (the element ITSELF, attribute stripped on landing); a strategy name ⇒ the element's CONTENT with the wrapper dropped (`innerHTML` would otherwise nest a duplicate id); `<strategy>:<selector>` RESERVED. Every candidate is REMOVED from the answer whether or not it swapped — the main fragment is always clean — and the whole pass is STRING-GATED on `result.content.indexOf('data-gina-swap-oob') > -1`, so an answer without the attribute takes byte-identical paths (the gate is pinned at exactly 3 occurrences). Reached from all THREE html paths: `applySwap` (BEFORE `select` narrows, so an element outside the selection still lands; where both address the same element the main swap wins), the popin branch, and the legacy target-less tail — so an answer carrying nothing else still updates the page, htmx's `hx-swap="none"` rule. The payload gains `oob` (one entry per element, `{id, strategy, swapped}` plus `reason` for `noId`/`noTarget`/`reserved`/`unknownStrategy`/`cancelled`) and `remainder` (the answer minus them — what a handler should insert, since `content` stays RAW and would land them twice); both are ABSENT below the gate, so `'oob' in payload` means "the answer carried the attribute". Events fire PER ELEMENT: `oobbeforeswap.<id>` (cancelable, `detail.content` rewritable) and `oobafterswap.<id>` (+ its `.hform` companion when armed). ⚠️ `oobbeforeswap` has NO `.hform` twin, mirroring `beforeswap`: a cancel is a DECISION while the declared-callback channel carries notifications — and the `on()` wrapper's cancelEvent exception had to widen from `/^beforeswap\./` to `/^(oob)?beforeswap\./` or the cancel never reaches a `.on()` listener at all. Three traps worth carrying. (1) An author-supplied `<template>` is honoured (htmx parity), and one EMPTIED of its oob elements is REMOVED with them — otherwise an oob-only answer leaves `<template></template>`, whose non-empty remainder makes the popin path call `loadContent` and BLANK the open dialog; measured, `loadContent('')` throws nothing, keeps `isOpen`, fires `open`+`loaded`, and leaves a blank dialog whose form is UNBOUND, which is exactly why the empty-remainder skip exists. (2) `textContent` takes the REMAINDER, not the raw answer, or the consumed transport renders as visible text. (3) A nested oob inside ANOTHER oob is not processed on its own — it travels with its ancestor and its attribute is stripped there (htmx's `allowNestedOobSwaps:false` parity), while one merely nested in a NON-oob wrapper is processed and removed from it. An oob swap that replaces or removes the SUBMITTING form defers its binding (`deferFormId`) and reports `rebindSelf`, finalized by the shared tail — the popin branch RETURNS before that tail, so it finalizes itself, and the main swap's flag became `sendCtx.rebindSelf || detachesForm` so it can no longer clear a flag an oob swap already set. The same two test files now carry 50 unit arms + 26 e2e arms. Browser-bundled ⇒ restart AND re-bake. **#gh76 §6 — the server's last word (0.6.32):** three RESPONSE headers, read at settle inside the `text/html` branch (a JSON answer never reaches the read), after the answer is known to be HTML and BEFORE the target fork and `beforeswap` (htmx's order — a listener keeps the final say): `X-Gina-Retarget` (the `data-gina-form-target` grammar through the same `resolveSwapTarget`; it CREATES a target where none was declared, replaces a declared one, and `sendCtx.targetAttr` names the header — a declaration made by the server, so it wins over the popin exactly as an attribute does), `X-Gina-Reswap` (one of `SWAP_STRATEGIES`) and `X-Gina-Reselect` (a selector). The invalid-value rule is ASYMMETRIC, each half a rule that already existed: a Retarget that cannot be resolved DROPS the target — no swap, not into the declared target and not into the popin (the server plainly meant somewhere else) — and the success payload is the swap shape with `swapped: false`, `reason: 'retargetError'` and `target: null`, never an error callback (the false-422 shape slice 1 removed); a Reswap/Reselect that fails validation is IGNORED and the declared value kept (htmx degrades an invalid `HX-Reswap` the same way), as is either one without any target (`reason: 'noTarget'`). The report — `sendCtx.overrides`, one `{ value, applied, reason }` entry per header — rides the payload (`overrides`, present only when a header was sent), the `beforeswap` detail, and the legacy target-less payload; the popin path's parsed data stays VERBATIM (the slice-1 contract), so an ignored override there is a dev-mode console notice only. SAME-ORIGIN ONLY: the three headers are honoured only from a response whose origin is the page's own (`xhr.responseURL` — the URL after redirects — against `location.origin`); a cross-origin Retarget is refused like an unresolvable one (no swap, `reason: 'crossOrigin'`), a cross-origin Reswap/Reselect is ignored and the declared value kept, and a missing or unparseable `responseURL` or an opaque origin on either side reads as not-same-origin (fail-closed) — htmx needs no such read because `selfRequestsOnly` refuses the cross-origin REQUEST, while a form here posts to its raw `action`, so the gate lives at the read, and `Access-Control-Expose-Headers` buys nothing for these three; no controller helper — `self.getResponseObject().setHeader()` is the documented way. `applyResponseOverrides(xhr, sendCtx, $target, id)` is extractable (unit seam), pinned to exactly ONE call site inside the html branch. **Request coordination (#gh76 §7, UNRELEASED):** the DEFAULT is DERIVED and needs NO attribute — `deriveSync($form)` reads `data-gina-form-target` + `data-gina-form-swap` and returns `{strategy:'replace', derived:true, key, swap}` ONLY when the swap is in `REPLACING_SWAPS` (`innerHTML`/`outerHTML`/`textContent`/`delete`) AND the target RESOLVES; an insertion, `none`, no target, an unresolvable target, or a swap the pre-flight would refuse, all return `null` (no coordination at all, today's behaviour). The swap is read with `.trim()` only — CASE-SENSITIVE, matching the pre-flight's `SWAP_STRATEGIES.indexOf` — so a value heading for a refusal can never abort a running request on the way. `data-gina-form-sync` is the OVERRIDE (`drop`|`replace`|`queue`, no modifiers); `abort`, `queue <mod>` and `<selector>:<strategy>` are REFUSED with a message naming the reason AND the alternative (deliberate non-adoptions, not gaps: `abort` is htmx's disposable-GET idiom and a form submit is a validated POST with side effects; the `queue` modifiers exist in htmx because its trigger spec has `queue:` modifiers of its own; `<selector>:<strategy>` names a key that is already known). ⚠️ A SUPERSEDE IS NOT A ROLLBACK: the aborted request was already in flight, so it may have REACHED the server and its writes stand — a consumer must never read `abort`/`superseded` as 'not saved' and RESUBMIT (a duplicate write, on a feature whose premise is that a submit is a POST with side effects); the outcome of a superseded submit is the server's to report, never the event's. ⚠️ ORDERING IS LOAD-BEARING TWICE OVER: the derivation runs AFTER the module-wide `withRateLimit` gate (so one form's own re-submits keep the one-at-a-time rule and the derived default only ever coordinates DIFFERENT forms — zero blast radius on a single form), and the whole decision runs BEFORE `instance.$forms[id].isSending = true`, because `xhr.abort()` settles the aborted handler SYNCHRONOUSLY — claiming first lets that settle clear the flag this send just took (#B332 class). Same reason the handler-top `$form.isSubmitting = false` is guarded on `!sendCtx.superseded`. Keyed on the RESOLVED SWAP TARGET (`resolveSyncKey` for the explicit path; the derived path carries its own `syncParsed.key`) — a form key would not see the case the issue is about, two DIFFERENT forms answering into one region. Registry = a module `WeakMap<Element,{xhr,ctx,queue}>` (a swapped-away target is a new element, so its entry is collected — correct); NO seq counter, the per-send XHR object (#B175) IS the identity a late settle is checked against; NO `abortable` flag — the ARRIVING submit's strategy decides and nothing is carried on the entry. A SUPERSEDED request runs its RELEASE arms (trigger, loading state, a11y) then RETURNS before the status dispatch, emitting `abort.<id>` `{status:0, reason:'superseded', sync, derived}` — it must never reach the #B447 transport arm, which reads readyState-4/status-0 as a 408 the server never sent; there is deliberately NO `.hform` twin (nothing went wrong). `derived` is ON THE PAYLOAD because the default needs no attribute, so a page may find nothing in its own markup that asked for the abort. `replace` re-arms `armSubmitLoading` after the abort released it (first-arm-wins, stash just cleared). Exactly ONE turn-away exists (`drop`), so `disarmSubmitLoading` counts 6 in the file (1 JSDoc + 5 sites, pinned in `test/lib/loading-state.test.js`) — `queue` WAITS and keeps its loading state (pending, not abandoned; the replay's first-arm-wins carries it to the real settle), `replace` proceeds. An UNREADABLE sync value decides nothing and its refusal is DEFERRED to the pre-flight: from the top of send() the declared callbacks are not bound yet (`listenToXhrEvents` runs later), so a refusal there reaches nobody — measured, it silently delivered no error; a DERIVED result never carries an error by construction. `data-gina-form-disabled-elt` = a comma list in the target grammar, resolved after every refusal and before `xhr.open`, refcounted in a second WeakMap, marked `data-gina-disabled-by`, released at the `loadend` fail-safe (the one chokepoint covering error/abort/timeout) PLUS the binary branch's error exit, which never reaches the wire; an element the PAGE disabled is skipped and never counted. Both refusals reuse `refuseSend`, so `reason` stays `'targetError'` and `attribute` discriminates. The slot is claimed on the line AFTER each of the three `xhr.send()` sites — claiming earlier wedges a key forever on the one path that opens an XHR and never sends it. `parseSync`/`deriveSync`/`decideSync`/`queueSyncSend`/`shiftSyncQueue`/`resolveDisabledElts` are extractable (unit seam). ⚠️ Instrument: `input.disabled` reflects only the element's OWN attribute — a control disabled by a `<fieldset>` ancestor is observable through `:disabled`, not `.disabled`. ⚠️ Instrument: Closure renames `deriveSync`/`REPLACING_SWAPS` out of the MINIFIED bundle, so the discriminating content probe between a pre-reframe and a reframed `gina.min.js` is `abortable` (9 → 0); the readable names survive only in the unminified `dist/.../gina.js`. ⚠️ #B247's ownership rule had to be RE-DERIVED for a target key and the gap was found by a cold read, then DRIVEN: the module-wide gate may return without releasing because it only ever fires on the form that already owns the request, whose settle releases it — but a TARGET key turns away a DIFFERENT form, whose armed `data-gina-loading` nothing else would ever clear (measured: stranded `true` on the real bundle). ⚠️ **A template writing `data-gina-form-sync` must write the WHOLE attribute conditionally, never an empty one.** The gate handing a form its own overlap decision is `syncAttr === null` (`core/plugins/lib/validator/src/main.js:3174`), so a present-but-empty `data-gina-form-sync=""` is NOT absent: it passes the gate, reaches `parseSync('')` → `{error:'empty value'}` (`:913`) and REFUSES the submit before anything is sent — the same fail-loud path an unknown strategy takes. Swig-safe shape: `{% if page.view.params and page.view.params.sync %} data-gina-form-sync="{{ page.view.params.sync }}"{% endif %}`, and the `page.view.params and` half is LOAD-BEARING because `page.view.params` is set only `if (ownCount(parameters) > 0)` (`core/controller/controller.js:1432`) — i.e. it is ABSENT on a route reached with no parameters, so testing `page.view.params.sync` alone throws there. **Staged-upload wait (#B726, 0.7.2):** a submit made while one of its form's staged uploads is on the wire WAITS, then sends once. Both doors call `holdSubmitForStagedUploads` before collecting — door A (a click on the bound trigger) just before `getFormValidationInfos` and before the latch; door B (the native submit proxy: a click inside the button, Enter in a form with no submit button, `<input type=submit>`, `requestSubmit()`, `$forms[id].submit()`) only AFTER `cancelEvent(e)`, or the browser posts the form itself. The in-flight signal is the virtual `gina-upload-*` record's `sent` (set after `xhr.send`, cleared at readyState 4 and `loadend`), reached through the input's `data-gina-form-virtual` — NOT `isSending`, which is claimed before `xhr.open` and stays true for good when a staging send throws before leaving (measured: an unparsable upload action makes `xhr.open` throw). One wait per form (`stagedUploadWait`): the busy state the gesture armed is kept and `uploadPending` ('Waiting for the upload to finish…', overridable) is announced once; a second gesture while waiting is a no-op, and one made when nothing is in flight any more drops a stale wait. `onUpload` calls `noteStagedUploadSettled` before anything in it can throw, and the decision runs in a microtask after the whole settle (`resolveStagedUploadWait`): an upload still in flight keeps it waiting; any failure, or the form leaving the page, cancels it and releases the busy state only when the form has no request of its own in flight (the sixth `disarmSubmitLoading` site, pinned by `test/lib/loading-state.test.js` §06 (f)); otherwise the submit is replayed THROUGH ITS OWN DOOR (door A re-dispatches `submit.<triggerId>`, door B `triggerEvent(form, 'submit')`), which collects the now-filled fields again — never route a click through door B: the two collectors differ deliberately and a consumer `on('submit')` is consulted only there. **A newer selection supersedes the staging request (#B729, 0.7.2):** the virtual form carries `data-gina-form-sync="replace"`, so the module rate-limit gate (`isSending || sent`) yields — a declared sync attribute owns its overlap decision — and a file chosen while the input's previous staging request is still on the wire aborts that request through the gh#76 coordination path and is sent; the superseded request settles through `abort.<vid>` only (`reason: 'superseded'`, no error, no on-error callback), and a submit already waiting keeps waiting, for the NEW request, and sends its metadata. Before, the gate returned silently — no event, no log — after the change handler had already reset the indicator and announced the upload, and the first request then filled the hidden fields with the REPLACED file's metadata while the input showed the new one. Pin: e2e `validator-upload-reselect-b729.spec.js` (3 arms). Not held: a direct `send(data)` (the caller's payload) and an upload started after a submit already passed the door check (#B740). `unbindForm` drops a pending wait, and so does a form reset, which also releases the busy state unless a request of the form's own is in flight (#B1043, 0.7.9; the eighth `disarmSubmitLoading` site, `loading-state.test.js` §06 (h)). No timeout is set on a staging request, so an upload that never answers keeps the submit waiting.
1073
1073
  302. **The `stream` storage strategy (`lib/storage/src/local-stream`, #STO1) — large sequential media with RESUMABLE uploads.** Keys name an ASSET, not a file: `assets/<ulid>/original<ext>` — `original` is the reserved base-rendition name and the per-asset directory reserves the namespace future renditions land in (no rendition API in this release). Keys stay OPAQUE; never parse the directory back out. What per-asset colocation buys is OPERATIONAL grouping (one `rm -rf` per asset, one `rsync` of a subtree), NOT physical locality — a directory does not place extents, the allocator does — and gina neither prevents nor CAN prevent fragmentation: Node exposes no `fallocate` binding, native addons are not shipped, and `ftruncate` yields a fully SPARSE file (measured: a 256MB truncate reserves 0 blocks, and truncating past the free space succeeds, so it delivers neither anti-fragmentation nor an early ENOSPC). Contiguity is a filesystem/volume concern (XFS extent hints and the like); `chunkSize` (default `'8MB'`, `parseSize`) is the write stream's `highWaterMark` and nothing more. **Five capability-gated verbs beyond the shared contract** (`capabilities.resumable` true — branch on the flag, never probe): `createUpload(meta, cb)` -> `{uploadId, chunkSize, expectedSize}` / `writeSegment(uploadId, offset, stream, cb)` -> `{offset, length, received}` / `statUpload(uploadId, cb)` -> `{expectedSize, contentType, originalName, createdAt, received[], missing[], complete}` / `finalize(uploadId, cb)` -> `{key, size, contentType}` (put()'s shape) / `abortUpload(uploadId, cb)` -> `{aborted}`, idempotent. `statUpload` is NOT optional — resume is impossible unless a client can learn what landed; it is the resumable twin of `stat()`, and being computed from the session's own files it stays accurate across a process restart with no in-memory session table. **`expectedSize` is REQUIRED at create**: without a declared total finalise cannot verify coverage and `statUpload` cannot say what is MISSING (only what arrived), so a caller who does not know the size uses `put()` — the same exclusion tus takes without its defer-length extension, and strictly more useful than S3 multipart's `ListParts`, which can never name a missing part because it never learns the total. The declared size also permits an early `maxObjectSize` refusal before any byte moves, **advisory only**: it is client-supplied, so the running byte counter in `writeSegment` (which refuses a segment running past the declared end) is the real enforcement. **The KEY is minted at `createUpload` and persisted in the manifest**, never invented at finalise — minting it late means a row write that fails after the bytes are published leaves them at an address nobody holds, an unreachable orphan PLUS a session that can never finalise again. **The filesystem IS the manifest**, and the seam gains ZERO new verbs: a session is `<root>/.uploads/<uploadId>/` holding `data` (assembled IN PLACE via positional writes, `flags:'r+'` + `start`, so segments may arrive out of order and no assembly pass runs at finalise — measured, a segment-per-file layout costs ~1.9 s/GB of extra concat I/O where this costs ~4ms), `meta.json` (written ONCE through temp+rename) and one zero-byte `<offset>-<length>.ok` marker per DURABLE range. `.uploads` is a dot segment, structurally uncollidable with any caller key (the key guards reject dot segments), like `.tmp` and the `.driver` stamp. The argument for that home is FATE-SHARING, not seam economy: `fsync(data)` happens-before the marker is created, which is only enforceable while both live on the same medium — a store-backed manifest (SQLite WAL, redis, couchbase) can survive a crash the bytes did not, and a manifest claiming a range the bytes lost passes coverage and publishes ZEROS. **Coverage is an INTERVAL UNION, and that is the whole safety argument.** A hole in a sparse file reads back as ZEROS rather than erroring (measured), so an unverified finalise publishes a plausible, silently corrupt object; and SUMMING marker lengths is not enough — markers `0-800` and `400-1200` sum to exactly a declared 1600 while `1200-1600` is uncovered. So finalise sorts the markers, merges overlapping AND adjacent spans, and requires exactly one span equal to `[0, expectedSize)`. A gap is a REAL error and the session is PRESERVED so the client can complete it, never a silent publish; the message names the first gap. A segment that ends early is not an error — its marker records the RECEIVED length only, so the union stays exact and re-sends may overlap freely (re-sending a covered range is idempotent). Two further finalise guards: a data file SHORTER than the declared size under a full marker set refuses the publish (marker/bytes desync — the one shape that would still publish zeros), and one LONGER is truncated back (unreachable through the API, so it means tampering). **`finalize` is IDEMPOTENT with a heal path**: if the final path already exists it skips assembly, (re)writes the row and cleans the session — so a finalise that published the bytes and then failed on the row is completed by simply retrying it. Bytes are published BEFORE the row deliberately (the inverse manufactures rows-without-files, which cas's verify classifies as loss evidence and never auto-fixes); the residue here is the benign kind — `get()` falls through to the file path when no row exists. **Durability: `fsync` defaults TRUE, and only the DATA fsync is load-bearing** — per segment the order is positional write -> `fsync(data)` -> create marker, so a surviving marker implies durable bytes; the marker's own durability is deliberately NOT guaranteed, since a lost marker beside present bytes costs a re-send, which is the safe direction. Measured: a process SIGKILLed after an un-fsynced write still yields the full bytes to a later reader (the page cache carries them), so markers stay honest across PROCESS death without fsync — only power loss or a kernel panic opens the window. The cost is a RANGE, not one flattering figure: ~12ms per 8MB segment is ~2% of network-paced ingest at 100 Mbps, ~19% at 1 Gbps, and fsync-DOMINANT at 10 Gbps, so a LAN-ingest consumer sets `fsync:false` and accepts the documented window. The parent-directory flush is best-effort (Windows and some network mounts cannot), and macOS honours fsync as the platform defines it — the `F_FULLFSYNC` caveat cas already documents. **Abandoned sessions get their OWN age-gated sweep** on two triggers — at driver BUILD (what reclaims whatever a crashed process left behind) and on an unref'd `setInterval` — because sessions legitimately live for DAYS where a crashed put()'s temp is dead immediately. A REFUSED put() (over `maxObjectSize`, or a source that errors) does not rely on that sweep at all: its cleanup waits for the write stream's `'close'` and the CALLBACK WAITS WITH IT, so a caller told the put failed can never observe residue (#B358). Do not "simplify" that back to a synchronous `existsSync`-gated unlink — `fs.createWriteStream()` opens ASYNCHRONOUSLY, so a refusal raised from the `'data'` handler runs while the `open(2)` is still in the threadpool: `existsSync` reads false, the unlink is skipped, and the worker thread creates the file a tick later, with NO event-loop turn in between for a synchronous check to catch it (measured ~30% orphan rate before the fix). **ALL THREE local strategies carry this fix** — `sharded` and `cas` build their write stream lazily inside `spill()`, so their window opens on the OTHER arm (a source error arriving just after the spill, rather than a `maxObjectSize` refusal), which is exactly how a first pass that measured only the refusal arm wrongly concluded they were immune. Fault-injecting the single false `existsSync` answer orphans a real temp on both. Two arms reach this handler — the `'data'` refusal and `stream.on('error')` — and a measurement covering one licenses no claim about the other. `sessionTtl` default `'24h'`, `sessionSweepInterval` default `'1h'`, both `parseDuration` (unit required); `'0s'` disables the interval only, and a ZERO ttl snaps back to the default rather than meaning "off", since it would reclaim in-flight uploads. Liveness is `mtime(data)`, NOT the session directory's — `data` advances on every segment write while a directory mtime only moves when entries are added or removed — with a dir-mtime fallback so a session whose data was renamed away by a half-finished finalise stays reclaimable. The same pass reclaims `<root>/.tmp` orphans from crashed `put()`s at the same cutoff (sharded has that gap and no such sweep). **No tiering, no hashing, by design**: `inlineThreshold` and `hash` are NOT in `STRATEGY_KEYS.stream`, so setting either warns as an ignored key rather than silently doing nothing, and `capabilities` reads `{offload:false, ranges:true, dedup:false, resumable:true, inline:false}`. `release()` unlinks the object and then rmdirs the asset directory, which succeeds only while it is empty — a future rendition beside `original` correctly keeps it. **Not in this release, each still deferred or capability-gated**: a rendition API; async post-hoc checksums; an `s3` adapter; and any `storage:gc`/`storage:verify`/stats extension for stream — those stay cas-only, so a stream driver has NO `sweepNow`/`verify` and is named-and-skipped by the maintenance surface rather than erroring. Multi-process is DOCUMENTED, not enforced: parallel segment writes are safe when ranges are DISJOINT (measured — two uncoordinated processes interleaving 1MB stripes into one shared file produced byte-exact output on a POSIX-coherent local filesystem), but relaxed-coherence network mounts are UNMEASURED, so route one session's segments to one process there. Shipping `stream` also EMPTIED `DEFERRED_STRATEGIES` — the list and its boot branch stay (cheap, and the next designed-before-implemented name inherits a working message) but are now exercised by nothing, which is recorded rather than hidden.
1074
1074
  303. HTTP Range serving for stored objects — `self.serveFromStorage(driverName, key[, opts])` is the read-side companion of `self.store()`'s driver routing and the consumer `capabilities.ranges` was waiting for: a controller action serves a stored object with the whole HTTP protocol dance owned by the framework, identically on both engines (headers and status ride the response object, bytes ride `renderStream`'s two arms — no `/_gina` endpoint involved). The flow is `stat()`-gated: an unknown or released key answers 404 through `throwError` (cas hides zero-ref rows from `stat`, so a released blob 404s by construction; on `stream` a finalize-heal residue whose metadata row write failed is readable at the driver but 404s here until the idempotent finalize heals the row), and a missing/unconfigured DRIVER is an app config error — 500, never 404. Validators are minted from the layer's own invariants: `ETag: "<key>"` is deliberately STRONG because storage keys are immutable (every strategy publishes via temp+rename, cas is content-addressed, and no in-place mutation API exists), plus `Last-Modified` from the publish time; `If-None-Match` is weak-compared against that ETag (a `W/`-prefixed echo matches) and answers 304 with no driver read. Range evaluation is GET-only and capability-gated (`driver.capabilities.ranges` false ⇒ the header is ignored and no `Accept-Ranges` is advertised — the forward seam for offloading adapters): a single `bytes=a-b`/`a-`/`-n` that is satisfiable answers 206 with `Content-Range: bytes a-b/<size>` and an exact `Content-Length`; an unsatisfiable one (start at or past the size, a `-0` suffix, any range against an empty object) answers 416 with `Content-Range: bytes */<size>` and an empty body; multi-range lists, foreign units, syntactic garbage and `a-b` with a>b are IGNORED into the full 200, which RFC 9110 sanctions; `If-Range` honours the Range only on an exact validator match, so anything unevaluable degrades fail-safe to the full body rather than risking a corrupted client-side assembly. Trust model, fail-closed: the stored contentType is UPLOADER-supplied verbatim, so without `opts.contentType` the active-content types (html/xml/svg/javascript/ecmascript) downgrade to `application/octet-stream` — nosniff cannot stop a DECLARED `text/html` from rendering — and every facade response carries `X-Content-Type-Options: nosniff`; an explicit `opts.contentType` is the app's informed choice and serves verbatim. Caching defaults to `Cache-Control: private, max-age=31536000, immutable` (correct because a key's bytes can never change; `private` keeps shared caches out of the application's authorization), with `opts.cacheControl` winning verbatim; `opts.download`/`opts.filename` emit an RFC 6266 attachment disposition with control characters stripped from the uploader-supplied name (header-injection guard — Node's setHeader would otherwise THROW on a CR/LF-bearing stored originalName, inside an async callback); a name above U+00FF goes out as a Latin-1 `filename` fallback plus RFC 8187 `filename*` (#B1073 — sent raw, it threw there on HTTP/1.1 and the `uncaughtException` EXITED the bundle), and every driver callback (stat, get, getRange, resolve) runs through a guard, so any header Node refuses answers 500 through `throwError`, with the ETag and caching headers removed, instead of exiting the process. HEAD answers headers-only with full-size accounting and no driver read. Headers are applied only in the driver-success callback, so a read error routes through `throwError` with no Range headers leaked; a post-stat race (cas grace expiry mid-download, a vanished file) maps the read verbs' `STORAGE_NO_OBJECT` code to 404 and anything else to 500 — the machine codes (`STORAGE_NO_OBJECT`/`STORAGE_RANGE_UNSATISFIABLE`/`STORAGE_INVALID_RANGE`, minted by `util.codedError` with message wording byte-unchanged) shipped for exactly this discrimination. The enablers landed in the same release on `renderStream`: non-SSE Buffer chunks pass through byte-exact (the historical unconditional utf8 decode substituted U+FFFD into binary payloads, which made the delegate unusable for byte serving; valid-UTF-8 re-encodes identically and SSE keeps its decode), HEAD parity (headers-only, the iterable never consumed, a destroyable source destroy()ed), caller-set headers surviving the delegate defaults (the h2 frame literal used to beat the pending merge and the h1 setHeader clobbered — a serving caller's Cache-Control/Content-Range now ride), and the post-end `headersSent` bookkeeping guarded (getter-only on both real response classes under the file's strict mode — the swallowed throw had killed the Inspector Flow stream-write/total timeline entries on every streamed request). Deliberately NOT here: multipart/byteranges (multi-range ⇒ full 200), Range on statics (the pure `_parseRangeHeader(header, size)` helper is reusable when that arc comes), and Range on non-GET methods. Offload serving SHIPPED with the s3 adapter (#304): `capabilities.offload` ⇒ GET/HEAD answer 307 to a presigned URL after the local 304 check, and the provider serves Range natively. Tests: `test/core/serve-from-storage.test.js` (parser matrix + fail-closed contentType matrix as extract-and-execute of the shipped bytes; the protocol arms driven end-to-end on REAL drivers across sharded/cas/stream with byte-exact 200/206 assertions) + `test/core/render-stream.test.js` §13-§16 + `test/lib/storage-error-codes.test.js`.
1075
1075
  304. **s3 storage adapter (#STO1 — the layer's last step)** — the second ADAPTER: `adapter:'s3'` + `bucket` (+ optional `region`/`endpoint` (https:// prepended when scheme-less; region defaults `us-east-1` ONLY beside a custom endpoint — real AWS keeps the SDK's own chain, whose missing-region message beats a mis-signed default)/`prefix` (trailing `/` normalised; the OPAQUE key EXCLUDES it, so re-pointing `prefix` orphans stored objects exactly as re-pointing a local `root` does)/`forcePathStyle` (MinIO)/`presignExpiry` ('15m')/`sweepGrace` ('1h')/`maxObjectSize`/static credentials). Dispatch became adapter × strategy by COMPOSITION — `ADAPTER_FACTORIES = {local: FACTORIES, s3: {sharded}}` — so the flat `_FACTORIES` stays the local row (the `storage:*` CLI dispatches through it offline and source-pins it; all three CLI verbs name s3 drivers remote and SKIP them BEFORE any build, ahead of the store skip so a warn-ignored `store` key cannot mislead the reason). s3 runs `sharded` ONLY — key naming; the provider owns placement — and refuses `cas`/`stream` at boot naming why (S3 ETags are not content digests; multipart is the provider's own resumable); `strategy` may be omitted (defaults sharded). STORELESS: `store=null`, no embedded `.meta.db`, no `.driver` stamp — one PutObject atomically carries bytes + ContentType (verbatim) + `x-amz-meta-gina-name` = encodeURIComponent(originalName) capped ~1KB (URI-encoded OURSELVES — AWS's RFC 2047 handling of non-ASCII metadata values is AWS-specific, plain ASCII round-trips on every compatible; AWS-doc-measured: user metadata 2KB total, keys lowercased, IMMUTABLE after upload, matching the layer's immutable keys). `stat()` = HeadObject (strongly consistent per AWS docs; ⚠️ a missing key answers 404 only WITH `s3:ListBucket`, else 403 — the guide ships the minimal policy: GetObject/PutObject/DeleteObject/ListBucket/ListBucketMultipartUploads/AbortMultipartUpload, bucket/prefix-scoped). `release()` = DeleteObject (idempotent acknowledgement — S3 reports no prior existence, so `existed:true` is DOCUMENTED as ack-only). `put()` streams through lib-storage's `Upload` (unknown length ⇒ multipart under the hood) behind a counting transform enforcing `maxObjectSize` MID-STREAM (breach ⇒ best-effort `Upload.abort()` + the REAL cap error; reported size = the meter's count — the bytes the provider acknowledged). The crashed-put analog is an INCOMPLETE MULTIPART UPLOAD (bills storage until aborted, no expiry — AWS-doc-measured): a build-time age-gated sweep (ListMultipartUploads → AbortMultipartUpload past `sweepGrace`, one bounded page per boot, best-effort never-throw — the sharded temp-orphan shape) reclaims them; a bucket `AbortIncompleteMultipartUpload` lifecycle rule stays recommended defense-in-depth. `resolve(key[, opts], fn)` answers the reserved `{kind:'url', url, expiresAt}` — a presigned GetObject; presigning is LOCAL SigV4 computation, so existence is deliberately NOT verified (the serving facade is stat-gated; a direct caller's URL to a vanished object answers the provider's own 404 — documented, not hidden). The NEW optional middle `opts` ({contentType, download, filename, cacheControl}) rides the SIGNED `response-content-type`/`-content-disposition`/`-cache-control` overrides (signed-request-only per AWS — a presigned URL qualifies) and landed on the CONTRACT for all strategies: locals accept and IGNORE it (zero prior resolve() callers, measured), so one facade call site serves every driver. `capabilities` = `{offload:true` (the layer's FIRST true — and its first reader ships beside it), `ranges:true` (get/getRange are REAL GetObject(+Range) proxies: provider InvalidRange/416 → STORAGE_RANGE_UNSATISFIABLE, NoSuchKey/NotFound → STORAGE_NO_OBJECT, anything else RAW-forwarded — the typed class is the signal), `dedup:false, resumable:false, inline:false}`. `serveFromStorage()` offload path: after the stat gate AND the local If-None-Match 304 (key ETag — no presign spent), GET/HEAD → **307** (method-preserving — HEAD stays HEAD) + Location + `Cache-Control: private, no-store` on the REDIRECT (it must never outlive its signature) while the PAYLOAD's policy (default `private, max-age=31536000, immutable`; `opts.cacheControl` wins) rides `response-cache-control`; the facade runs its fail-closed contentType DOWNGRADE BEFORE presigning and hands resolve() the SAFE type — the stored-XSS guard holds when the provider serves the bytes; `opts.offload:false` forces the in-process proxy path; an offload-claiming driver whose resolve answers no url is a LOUD 500 (driver contract violation), never a silent degrade; non-GET/HEAD methods always proxy. SDK = 3 PROJECT-side packages (`@aws-sdk/client-s3` + `@aws-sdk/lib-storage` + `@aws-sdk/s3-request-presigner`; v3 required — a module without S3Client is refused by name) resolved LAZILY through `start()`'s injected `requireProjectModule` (built in gna.js from `getPath('project')` — lib/storage is framework-independent, test-enforced, and cannot reach the globals; tests inject a fake SDK via the factory's 4th `deps` arg); a missing SDK on a CONFIGURED driver is boot-FATAL with the npm hint (the no-safe-degraded-mode rationale). `${secret:KEY}` works for the static credential pair TODAY (the whole-tree config walk); omit both credentials and the SDK default provider chain runs (env / shared config / IMDS / IRSA — the container-native path, first-class). S3-compat honesty: strong read-after-write consistency (HEAD + LIST included) and the metadata semantics are AWS-DOCUMENTED behaviour; a compatible provider owns its own — stated in the guide, and the adapter uses only the core compat surface (Put/Get/Head/Delete/ListObjectsV2/ListMultipartUploads/Abort + SigV4 presigning). Tests: `test/lib/storage-s3.test.js` (REAL adapter + fake SDK that THROWS on unimplemented commands, 60) + `test/core/serve-from-storage-offload.test.js` (17 — incl. the signed-downgrade security pin and 304-before-presign).