ibex 0.2.0 → 0.3.0

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 (437) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +95 -272
  3. data/docs/architecture.md +187 -35
  4. data/docs/bison-import.md +103 -0
  5. data/docs/comparison-policy.md +127 -0
  6. data/docs/configuration-model.md +59 -0
  7. data/docs/configuration-report.md +28 -0
  8. data/docs/conflict-explanation-reviews/v1/records/README.md +28 -0
  9. data/docs/conflict-explanation-study.md +62 -0
  10. data/docs/construction-profiling.md +157 -0
  11. data/docs/cst-migration.md +3 -4
  12. data/docs/cst.md +24 -0
  13. data/docs/decisions/0000-template.md +24 -0
  14. data/docs/decisions/0001-separate-ir-pipeline.md +34 -0
  15. data/docs/decisions/0002-opaque-user-code-boundary.md +32 -0
  16. data/docs/decisions/0003-self-hosted-grammar-frontend.md +32 -0
  17. data/docs/decisions/0004-shared-semantic-and-lossless-source-model.md +33 -0
  18. data/docs/decisions/0005-contained-grammar-composition.md +34 -0
  19. data/docs/decisions/0006-bounded-structural-grammar-lowering.md +32 -0
  20. data/docs/decisions/0007-shared-parser-construction-pipeline.md +33 -0
  21. data/docs/decisions/0008-versioned-runtime-package-boundary.md +36 -0
  22. data/docs/decisions/0009-isolated-parser-sessions.md +34 -0
  23. data/docs/decisions/0010-committed-runtime-observation.md +34 -0
  24. data/docs/decisions/0011-versioned-semantic-action-boundary.md +37 -0
  25. data/docs/decisions/0012-bounded-nonexecuting-analysis.md +37 -0
  26. data/docs/decisions/0013-transactional-generation-publication.md +37 -0
  27. data/docs/decisions/0014-versioned-generated-lexer.md +35 -0
  28. data/docs/decisions/0015-worker-isolated-browser-analysis.md +32 -0
  29. data/docs/decisions/0016-red-green-concrete-syntax.md +34 -0
  30. data/docs/decisions/0017-persistent-syntax-artifacts.md +35 -0
  31. data/docs/decisions/0018-conservative-incremental-syntax-reuse.md +38 -0
  32. data/docs/decisions/0019-runtime-syntax-session-boundary.md +51 -0
  33. data/docs/decisions/0020-grammar-ir-parser-contract.md +65 -0
  34. data/docs/decisions/0021-data-only-parser-table-sidecar.md +50 -0
  35. data/docs/decisions/0022-manifest-bound-verification-report.md +77 -0
  36. data/docs/decisions/0023-syntax-only-repair-results.md +48 -0
  37. data/docs/decisions/0024-direct-ielr-construction.md +42 -0
  38. data/docs/decisions/README.md +74 -0
  39. data/docs/declarative-configuration.md +262 -0
  40. data/docs/development.md +179 -2
  41. data/docs/direct-ielr-decision.md +120 -0
  42. data/docs/direct-multi-entry-decision.md +82 -0
  43. data/docs/editor-setup.md +2 -1
  44. data/docs/error-ux-review-rubric-v1.md +117 -0
  45. data/docs/error-ux-reviews/v1/records/README.md +22 -0
  46. data/docs/error-ux-round2-review-status-v1.json +27 -0
  47. data/docs/error-ux-round2-reviews/v1/records/README.md +30 -0
  48. data/docs/error-ux-round2-v1.json +1581 -0
  49. data/docs/error-ux-round2.md +111 -0
  50. data/docs/error-ux.md +54 -0
  51. data/docs/getting-started.md +80 -0
  52. data/docs/grammar-reference.md +184 -13
  53. data/docs/ielr-design.md +43 -0
  54. data/docs/ielr.md +92 -0
  55. data/docs/ja/bison-import.md +51 -0
  56. data/docs/ja/stable-api.md +53 -0
  57. data/docs/lexer-construction-profile.md +109 -0
  58. data/docs/lexer-migration.md +5 -0
  59. data/docs/maturity.md +128 -0
  60. data/docs/project-site-strategy.md +54 -0
  61. data/docs/racc-migration-evidence.md +45 -0
  62. data/docs/racc-migration.md +11 -0
  63. data/docs/release-readiness.md +126 -68
  64. data/docs/repair-semantics.md +123 -0
  65. data/docs/runtime-abi-evolution.md +307 -0
  66. data/docs/stability.md +144 -34
  67. data/docs/status.md +43 -0
  68. data/docs/syntax-sessions.md +183 -0
  69. data/docs/table-artifact.md +125 -0
  70. data/docs/test-interactions.md +219 -0
  71. data/docs/verification-report.md +137 -0
  72. data/docs/verifier-trust-boundary.md +199 -0
  73. data/docs/workloads.md +132 -0
  74. data/lib/ibex/analysis/digraph.rb +128 -0
  75. data/lib/ibex/analysis.rb +1 -0
  76. data/lib/ibex/bison_import/importer.rb +516 -0
  77. data/lib/ibex/bison_import/tokenizer.rb +260 -0
  78. data/lib/ibex/bison_import.rb +200 -0
  79. data/lib/ibex/bounded_subprocess.rb +171 -0
  80. data/lib/ibex/cli/ambiguity.rb +14 -5
  81. data/lib/ibex/cli/analysis.rb +134 -0
  82. data/lib/ibex/cli/bison_import.rb +121 -0
  83. data/lib/ibex/cli/config.rb +128 -0
  84. data/lib/ibex/cli/diagnostics.rb +31 -11
  85. data/lib/ibex/cli/documentation.rb +11 -8
  86. data/lib/ibex/cli/equiv.rb +169 -0
  87. data/lib/ibex/cli/error_messages.rb +11 -4
  88. data/lib/ibex/cli/explain.rb +14 -5
  89. data/lib/ibex/cli/fix.rb +203 -0
  90. data/lib/ibex/cli/formatting.rb +11 -10
  91. data/lib/ibex/cli/fuzz.rb +200 -0
  92. data/lib/ibex/cli/fuzz_regressions.rb +145 -0
  93. data/lib/ibex/cli/generation_artifacts.rb +53 -2
  94. data/lib/ibex/cli/generation_error_messages.rb +1 -1
  95. data/lib/ibex/cli/grammar_tests.rb +32 -14
  96. data/lib/ibex/cli/ir_tools.rb +5 -61
  97. data/lib/ibex/cli/outputs.rb +60 -33
  98. data/lib/ibex/cli/reduce.rb +202 -0
  99. data/lib/ibex/cli/reduce_reporting.rb +71 -0
  100. data/lib/ibex/cli/samples.rb +49 -23
  101. data/lib/ibex/cli/verify.rb +116 -0
  102. data/lib/ibex/cli/watch.rb +6 -5
  103. data/lib/ibex/cli.rb +357 -56
  104. data/lib/ibex/codegen/action_locations.rb +1 -1
  105. data/lib/ibex/codegen/action_method_source.rb +5 -6
  106. data/lib/ibex/codegen/action_source.rb +3 -2
  107. data/lib/ibex/codegen/ambiguity.rb +5 -4
  108. data/lib/ibex/codegen/explain.rb +123 -55
  109. data/lib/ibex/codegen/generated_action_abi.rb +10 -5
  110. data/lib/ibex/codegen/rbs.rb +15 -7
  111. data/lib/ibex/codegen/report.rb +25 -13
  112. data/lib/ibex/codegen/ruby.rb +28 -64
  113. data/lib/ibex/codegen/ruby_actions.rb +9 -6
  114. data/lib/ibex/codegen/ruby_syntax.rb +15 -9
  115. data/lib/ibex/configuration/analysis_grammar.rb +35 -0
  116. data/lib/ibex/configuration/explanation.rb +421 -0
  117. data/lib/ibex/configuration/inspector.rb +232 -0
  118. data/lib/ibex/configuration.rb +580 -0
  119. data/lib/ibex/coverage/collector.rb +21 -11
  120. data/lib/ibex/coverage/event_stream.rb +13 -7
  121. data/lib/ibex/coverage/report.rb +26 -18
  122. data/lib/ibex/coverage/runtime_event_validator.rb +30 -21
  123. data/lib/ibex/delta_reducer.rb +99 -0
  124. data/lib/ibex/diff.rb +140 -0
  125. data/lib/ibex/equiv/machine.rb +135 -0
  126. data/lib/ibex/equiv.rb +373 -0
  127. data/lib/ibex/fix.rb +557 -0
  128. data/lib/ibex/frontend/ast.rb +22 -2
  129. data/lib/ibex/frontend/bootstrap_parser.rb +6 -13
  130. data/lib/ibex/frontend/diagnostic.rb +1 -1
  131. data/lib/ibex/frontend/formatter.rb +72 -26
  132. data/lib/ibex/frontend/generated_parser.rb +147 -117
  133. data/lib/ibex/frontend/generated_parser_base.rb +7 -3
  134. data/lib/ibex/frontend/generated_parser_includes.rb +1 -11
  135. data/lib/ibex/frontend/generation.rb +1 -1
  136. data/lib/ibex/frontend/parser/declarations.rb +17 -2
  137. data/lib/ibex/frontend/parser_configuration_support.rb +56 -0
  138. data/lib/ibex/frontend/regenerator.rb +1 -0
  139. data/lib/ibex/frontend/resolution.rb +2 -1
  140. data/lib/ibex/frontend/resolver.rb +1 -1
  141. data/lib/ibex/frontend/rule_documentation.rb +2 -1
  142. data/lib/ibex/frontend/source_cursor.rb +2 -2
  143. data/lib/ibex/frontend/source_span.rb +9 -1
  144. data/lib/ibex/frontend/token_adapter/declaration_state.rb +38 -6
  145. data/lib/ibex/frontend/token_adapter.rb +10 -0
  146. data/lib/ibex/frontend.rb +1 -0
  147. data/lib/ibex/fuzz.rb +219 -0
  148. data/lib/ibex/generation_input.rb +1 -1
  149. data/lib/ibex/generation_manifest.rb +36 -25
  150. data/lib/ibex/generation_transaction.rb +1 -1
  151. data/lib/ibex/generation_transaction_recovery.rb +4 -4
  152. data/lib/ibex/generation_transaction_validation.rb +2 -2
  153. data/lib/ibex/grammar_tests.rb +1 -1
  154. data/lib/ibex/ir/automaton_ir.rb +61 -19
  155. data/lib/ibex/ir/grammar_ir.rb +76 -45
  156. data/lib/ibex/ir/lexer_ir.rb +5 -5
  157. data/lib/ibex/ir/parser_contract.rb +135 -0
  158. data/lib/ibex/ir/serialize.rb +203 -76
  159. data/lib/ibex/ir/validator/automaton.rb +64 -34
  160. data/lib/ibex/ir/validator/base.rb +51 -33
  161. data/lib/ibex/ir/validator/grammar.rb +113 -83
  162. data/lib/ibex/ir/validator/lexer.rb +2 -2
  163. data/lib/ibex/ir/validator.rb +2 -1
  164. data/lib/ibex/ir.rb +16 -3
  165. data/lib/ibex/lalr/build_metrics.rb +50 -2
  166. data/lib/ibex/lalr/builder.rb +191 -56
  167. data/lib/ibex/lalr/conflict_search.rb +15 -4
  168. data/lib/ibex/lalr/counterexample.rb +19 -14
  169. data/lib/ibex/lalr/direct_lookaheads.rb +110 -57
  170. data/lib/ibex/lalr/goto_follows.rb +229 -0
  171. data/lib/ibex/lalr/ielr/annotator.rb +214 -0
  172. data/lib/ibex/lalr/ielr/bits.rb +28 -0
  173. data/lib/ibex/lalr/ielr/inadequacy.rb +47 -0
  174. data/lib/ibex/lalr/ielr/item_lookaheads.rb +78 -0
  175. data/lib/ibex/lalr/ielr/pipeline.rb +75 -0
  176. data/lib/ibex/lalr/ielr/split_stability.rb +78 -0
  177. data/lib/ibex/lalr/ielr/split_state.rb +20 -0
  178. data/lib/ibex/lalr/ielr/state_splitter.rb +258 -0
  179. data/lib/ibex/lalr/ielr_partition.rb +22 -8
  180. data/lib/ibex/lalr/inadequacy_report.rb +50 -0
  181. data/lib/ibex/lalr/lookahead_propagation.rb +111 -0
  182. data/lib/ibex/lalr/lr0_collection.rb +121 -0
  183. data/lib/ibex/lalr/unreachable_states.rb +80 -0
  184. data/lib/ibex/lalr.rb +52 -1
  185. data/lib/ibex/location.rb +3 -3
  186. data/lib/ibex/lsp/document_handlers.rb +9 -7
  187. data/lib/ibex/lsp/initialization_handlers.rb +9 -7
  188. data/lib/ibex/lsp/navigation_handlers.rb +25 -11
  189. data/lib/ibex/lsp/parser_configuration_assistance.rb +149 -0
  190. data/lib/ibex/lsp/position_codec.rb +6 -2
  191. data/lib/ibex/lsp/request_handlers.rb +3 -2
  192. data/lib/ibex/lsp/request_support.rb +14 -7
  193. data/lib/ibex/lsp/server.rb +13 -11
  194. data/lib/ibex/lsp/symbol_index.rb +13 -13
  195. data/lib/ibex/lsp/symbol_index_builder.rb +30 -20
  196. data/lib/ibex/lsp/symbol_occurrence.rb +8 -2
  197. data/lib/ibex/lsp/transport.rb +13 -3
  198. data/lib/ibex/lsp/workspace.rb +5 -4
  199. data/lib/ibex/lsp/workspace_analyzer.rb +1 -1
  200. data/lib/ibex/lsp.rb +1 -0
  201. data/lib/ibex/messages/en.yml +28 -0
  202. data/lib/ibex/messages/ja.yml +28 -0
  203. data/lib/ibex/messages.rb +68 -0
  204. data/lib/ibex/metrics.rb +175 -0
  205. data/lib/ibex/normalize/declarations.rb +2 -0
  206. data/lib/ibex/normalize/diagnostics.rb +63 -38
  207. data/lib/ibex/normalize/expander.rb +5 -4
  208. data/lib/ibex/normalize/expression.rb +8 -6
  209. data/lib/ibex/normalize/grammar_builder.rb +26 -0
  210. data/lib/ibex/normalize/inline_expansion.rb +100 -49
  211. data/lib/ibex/normalize/lexer.rb +3 -3
  212. data/lib/ibex/normalize/parameter_ebnf_lowering.rb +11 -10
  213. data/lib/ibex/normalize/parameter_lowering.rb +40 -23
  214. data/lib/ibex/normalize/parameters.rb +31 -4
  215. data/lib/ibex/normalize/parser_configuration.rb +70 -0
  216. data/lib/ibex/normalize.rb +10 -20
  217. data/lib/ibex/racc_migration/report.rb +6 -3
  218. data/lib/ibex/rake_task.rb +1 -1
  219. data/lib/ibex/samples.rb +43 -13
  220. data/lib/ibex/table_artifact/builder.rb +266 -0
  221. data/lib/ibex/table_artifact/cst_projection.rb +70 -0
  222. data/lib/ibex/table_artifact/document.rb +39 -0
  223. data/lib/ibex/table_artifact/executor.rb +187 -0
  224. data/lib/ibex/table_artifact/serializer.rb +57 -0
  225. data/lib/ibex/table_artifact/validator/metadata.rb +179 -0
  226. data/lib/ibex/table_artifact/validator/support.rb +86 -0
  227. data/lib/ibex/table_artifact/validator/tables.rb +238 -0
  228. data/lib/ibex/table_artifact/validator.rb +253 -0
  229. data/lib/ibex/table_artifact.rb +88 -0
  230. data/lib/ibex/table_simulation/result.rb +6 -2
  231. data/lib/ibex/table_simulation/step.rb +3 -1
  232. data/lib/ibex/tables.rb +14 -0
  233. data/lib/ibex/verifiable_generation_bundle.rb +86 -0
  234. data/lib/ibex/verification_report/builder.rb +159 -0
  235. data/lib/ibex/verification_report/canonical_ir.rb +123 -0
  236. data/lib/ibex/verification_report/logical_path.rb +68 -0
  237. data/lib/ibex/verification_report/validator.rb +329 -0
  238. data/lib/ibex/verification_report.rb +69 -0
  239. data/lib/ibex/verify/action_correspondence.rb +138 -0
  240. data/lib/ibex/verify/language_witness.rb +295 -0
  241. data/lib/ibex/verify/reference_collection.rb +190 -0
  242. data/lib/ibex/verify/result.rb +73 -0
  243. data/lib/ibex/verify/verifier.rb +598 -0
  244. data/lib/ibex/verify.rb +15 -0
  245. data/lib/ibex/version.rb +1 -1
  246. data/lib/ibex/watch/runner.rb +10 -1
  247. data/lib/ibex/watch/source_snapshot.rb +13 -8
  248. data/lib/ibex.rb +10 -0
  249. data/schema/{automaton-ir-v1.schema.json → automaton-ir-definitions.schema.json} +6 -6
  250. data/schema/{automaton-ir-v2.schema.json → automaton-ir.schema.json} +14 -7
  251. data/schema/bison-import-v1.schema.json +106 -0
  252. data/schema/conflict-explanation-review-v1.schema.json +196 -0
  253. data/schema/conflict-explanation-study-v1.schema.json +528 -0
  254. data/schema/construction-profile-v1.schema.json +779 -0
  255. data/schema/diff-v1.schema.json +41 -0
  256. data/schema/direct-ielr-decision-v1.schema.json +200 -0
  257. data/schema/equiv-v1.schema.json +64 -0
  258. data/schema/error-ux-review-v1.schema.json +609 -0
  259. data/schema/error-ux-round2-review-v1.schema.json +191 -0
  260. data/schema/error-ux-round2-v1.schema.json +519 -0
  261. data/schema/explain-v1.schema.json +63 -1
  262. data/schema/fix-v1.schema.json +64 -0
  263. data/schema/fix-v2.schema.json +66 -0
  264. data/schema/fix-v3.schema.json +101 -0
  265. data/schema/fuzz-regression-v1.schema.json +79 -0
  266. data/schema/fuzz-v1.schema.json +114 -0
  267. data/schema/{grammar-ir-v2.schema.json → grammar-ir-extensions.schema.json} +20 -65
  268. data/schema/{grammar-ir-v1.schema.json → grammar-ir-foundation.schema.json} +3 -3
  269. data/schema/grammar-ir.schema.json +271 -0
  270. data/schema/ielr-benchmark-v1.schema.json +85 -0
  271. data/schema/lexer-profile-v1.schema.json +491 -0
  272. data/schema/metrics-v1.schema.json +60 -0
  273. data/schema/reduce-v1.schema.json +22 -0
  274. data/schema/reduce-v2.schema.json +63 -0
  275. data/schema/table-artifact-v1.schema.json +377 -0
  276. data/schema/verification-report-v1.schema.json +222 -0
  277. data/schema/verify-v1.schema.json +42 -0
  278. data/sig/ibex/analysis/digraph.rbs +19 -0
  279. data/sig/ibex/bison_import/importer.rbs +140 -0
  280. data/sig/ibex/bison_import/tokenizer.rbs +91 -0
  281. data/sig/ibex/bison_import.rbs +95 -0
  282. data/sig/ibex/bounded_subprocess.rbs +76 -0
  283. data/sig/ibex/cli/ambiguity.rbs +6 -0
  284. data/sig/ibex/cli/analysis.rbs +43 -0
  285. data/sig/ibex/cli/bison_import.rbs +32 -0
  286. data/sig/ibex/cli/config.rbs +35 -0
  287. data/sig/ibex/cli/diagnostics.rbs +16 -3
  288. data/sig/ibex/cli/documentation.rbs +5 -1
  289. data/sig/ibex/cli/equiv.rbs +49 -0
  290. data/sig/ibex/cli/error_messages.rbs +6 -0
  291. data/sig/ibex/cli/explain.rbs +6 -0
  292. data/sig/ibex/cli/fix.rbs +53 -0
  293. data/sig/ibex/cli/formatting.rbs +5 -1
  294. data/sig/ibex/cli/fuzz.rbs +47 -0
  295. data/sig/ibex/cli/fuzz_regressions.rbs +40 -0
  296. data/sig/ibex/cli/generation_artifacts.rbs +21 -2
  297. data/sig/ibex/cli/generation_error_messages.rbs +2 -2
  298. data/sig/ibex/cli/grammar_tests.rbs +15 -3
  299. data/sig/ibex/cli/ir_tools.rbs +7 -19
  300. data/sig/ibex/cli/outputs.rbs +9 -3
  301. data/sig/ibex/cli/reduce.rbs +60 -0
  302. data/sig/ibex/cli/reduce_reporting.rbs +27 -0
  303. data/sig/ibex/cli/samples.rbs +8 -0
  304. data/sig/ibex/cli/verify.rbs +28 -0
  305. data/sig/ibex/cli/watch.rbs +2 -2
  306. data/sig/ibex/cli.rbs +79 -5
  307. data/sig/ibex/codegen/action_method_source.rbs +4 -4
  308. data/sig/ibex/codegen/explain.rbs +45 -25
  309. data/sig/ibex/codegen/generated_action_abi.rbs +14 -10
  310. data/sig/ibex/codegen/rbs.rbs +12 -10
  311. data/sig/ibex/codegen/report.rbs +12 -12
  312. data/sig/ibex/codegen/ruby.rbs +18 -15
  313. data/sig/ibex/codegen/ruby_actions.rbs +6 -6
  314. data/sig/ibex/codegen/ruby_syntax.rbs +10 -8
  315. data/sig/ibex/configuration/analysis_grammar.rbs +13 -0
  316. data/sig/ibex/configuration/explanation.rbs +195 -0
  317. data/sig/ibex/configuration/inspector.rbs +53 -0
  318. data/sig/ibex/configuration.rbs +242 -0
  319. data/sig/ibex/coverage/collector.rbs +16 -14
  320. data/sig/ibex/coverage/event_stream.rbs +12 -10
  321. data/sig/ibex/coverage/report.rbs +20 -18
  322. data/sig/ibex/coverage/runtime_event_validator.rbs +38 -36
  323. data/sig/ibex/delta_reducer.rbs +38 -0
  324. data/sig/ibex/diff.rbs +47 -0
  325. data/sig/ibex/equiv/machine.rbs +54 -0
  326. data/sig/ibex/equiv.rbs +129 -0
  327. data/sig/ibex/fix.rbs +138 -0
  328. data/sig/ibex/frontend/ast.rbs +33 -7
  329. data/sig/ibex/frontend/bootstrap_parser.rbs +2 -0
  330. data/sig/ibex/frontend/diagnostic.rbs +2 -2
  331. data/sig/ibex/frontend/formatter.rbs +38 -30
  332. data/sig/ibex/frontend/generated_parser.rbs +87 -77
  333. data/sig/ibex/frontend/generated_parser_base.rbs +4 -2
  334. data/sig/ibex/frontend/parser/declarations.rbs +3 -0
  335. data/sig/ibex/frontend/parser_configuration_support.rbs +27 -0
  336. data/sig/ibex/frontend/resolution.rbs +3 -2
  337. data/sig/ibex/frontend/source_cursor.rbs +2 -2
  338. data/sig/ibex/frontend/source_span.rbs +5 -2
  339. data/sig/ibex/frontend/token_adapter/declaration_state.rbs +13 -1
  340. data/sig/ibex/frontend/token_adapter.rbs +6 -0
  341. data/sig/ibex/fuzz.rbs +71 -0
  342. data/sig/ibex/generation_input.rbs +2 -2
  343. data/sig/ibex/generation_manifest.rbs +35 -32
  344. data/sig/ibex/generation_transaction_recovery.rbs +2 -2
  345. data/sig/ibex/generation_transaction_validation.rbs +2 -2
  346. data/sig/ibex/grammar_tests.rbs +2 -2
  347. data/sig/ibex/ir/automaton_ir.rbs +30 -11
  348. data/sig/ibex/ir/grammar_ir.rbs +41 -27
  349. data/sig/ibex/ir/lexer_ir.rbs +8 -8
  350. data/sig/ibex/ir/parser_contract.rbs +69 -0
  351. data/sig/ibex/ir/serialize.rbs +63 -28
  352. data/sig/ibex/ir/validator/automaton.rbs +47 -44
  353. data/sig/ibex/ir/validator/base.rbs +35 -31
  354. data/sig/ibex/ir/validator/grammar.rbs +78 -67
  355. data/sig/ibex/ir/validator/lexer.rbs +4 -4
  356. data/sig/ibex/ir.rbs +9 -3
  357. data/sig/ibex/lalr/build_metrics.rbs +42 -2
  358. data/sig/ibex/lalr/builder.rbs +75 -24
  359. data/sig/ibex/lalr/conflict_search.rbs +5 -2
  360. data/sig/ibex/lalr/counterexample.rbs +17 -14
  361. data/sig/ibex/lalr/direct_lookaheads.rbs +35 -28
  362. data/sig/ibex/lalr/goto_follows.rbs +89 -0
  363. data/sig/ibex/lalr/ielr/annotator.rbs +67 -0
  364. data/sig/ibex/lalr/ielr/bits.rbs +14 -0
  365. data/sig/ibex/lalr/ielr/inadequacy.rbs +24 -0
  366. data/sig/ibex/lalr/ielr/item_lookaheads.rbs +35 -0
  367. data/sig/ibex/lalr/ielr/pipeline.rbs +17 -0
  368. data/sig/ibex/lalr/ielr/split_stability.rbs +27 -0
  369. data/sig/ibex/lalr/ielr/split_state.rbs +14 -0
  370. data/sig/ibex/lalr/ielr/state_splitter.rbs +76 -0
  371. data/sig/ibex/lalr/ielr_partition.rbs +17 -5
  372. data/sig/ibex/lalr/inadequacy_report.rbs +21 -0
  373. data/sig/ibex/lalr/lookahead_propagation.rbs +38 -0
  374. data/sig/ibex/lalr/lr0_collection.rbs +50 -0
  375. data/sig/ibex/lalr/unreachable_states.rbs +25 -0
  376. data/sig/ibex/lalr.rbs +11 -1
  377. data/sig/ibex/location.rbs +6 -6
  378. data/sig/ibex/lsp/document_handlers.rbs +8 -8
  379. data/sig/ibex/lsp/initialization_handlers.rbs +12 -12
  380. data/sig/ibex/lsp/navigation_handlers.rbs +15 -12
  381. data/sig/ibex/lsp/parser_configuration_assistance.rbs +49 -0
  382. data/sig/ibex/lsp/position_codec.rbs +8 -4
  383. data/sig/ibex/lsp/request_handlers.rbs +4 -4
  384. data/sig/ibex/lsp/request_support.rbs +8 -8
  385. data/sig/ibex/lsp/server.rbs +16 -16
  386. data/sig/ibex/lsp/symbol_index.rbs +20 -21
  387. data/sig/ibex/lsp/symbol_index_builder.rbs +9 -8
  388. data/sig/ibex/lsp/symbol_occurrence.rbs +11 -5
  389. data/sig/ibex/lsp/transport.rbs +18 -6
  390. data/sig/ibex/lsp/workspace.rbs +3 -2
  391. data/sig/ibex/lsp/workspace_analyzer.rbs +1 -1
  392. data/sig/ibex/messages.rbs +26 -0
  393. data/sig/ibex/metrics.rbs +50 -0
  394. data/sig/ibex/normalize/diagnostics.rbs +4 -4
  395. data/sig/ibex/normalize/expander.rbs +2 -2
  396. data/sig/ibex/normalize/expression.rbs +10 -8
  397. data/sig/ibex/normalize/grammar_builder.rbs +11 -0
  398. data/sig/ibex/normalize/inline_expansion.rbs +59 -50
  399. data/sig/ibex/normalize/lexer.rbs +4 -4
  400. data/sig/ibex/normalize/parameter_ebnf_lowering.rbs +15 -14
  401. data/sig/ibex/normalize/parameter_lowering.rbs +18 -18
  402. data/sig/ibex/normalize/parameters.rbs +13 -8
  403. data/sig/ibex/normalize/parser_configuration.rbs +23 -0
  404. data/sig/ibex/normalize.rbs +11 -5
  405. data/sig/ibex/racc_migration/report.rbs +8 -6
  406. data/sig/ibex/rake_task.rbs +1 -1
  407. data/sig/ibex/samples.rbs +13 -4
  408. data/sig/ibex/table_artifact/builder.rbs +93 -0
  409. data/sig/ibex/table_artifact/cst_projection.rbs +20 -0
  410. data/sig/ibex/table_artifact/document.rbs +27 -0
  411. data/sig/ibex/table_artifact/executor.rbs +66 -0
  412. data/sig/ibex/table_artifact/serializer.rbs +25 -0
  413. data/sig/ibex/table_artifact/validator/metadata.rbs +52 -0
  414. data/sig/ibex/table_artifact/validator/support.rbs +46 -0
  415. data/sig/ibex/table_artifact/validator/tables.rbs +63 -0
  416. data/sig/ibex/table_artifact/validator.rbs +66 -0
  417. data/sig/ibex/table_artifact.rbs +32 -0
  418. data/sig/ibex/table_simulation/result.rbs +8 -4
  419. data/sig/ibex/table_simulation/step.rbs +4 -2
  420. data/sig/ibex/tables.rbs +10 -9
  421. data/sig/ibex/verifiable_generation_bundle.rbs +24 -0
  422. data/sig/ibex/verification_report/builder.rbs +53 -0
  423. data/sig/ibex/verification_report/canonical_ir.rbs +41 -0
  424. data/sig/ibex/verification_report/logical_path.rbs +34 -0
  425. data/sig/ibex/verification_report/validator.rbs +114 -0
  426. data/sig/ibex/verification_report.rbs +44 -0
  427. data/sig/ibex/verify/action_correspondence.rbs +50 -0
  428. data/sig/ibex/verify/language_witness.rbs +112 -0
  429. data/sig/ibex/verify/reference_collection.rbs +63 -0
  430. data/sig/ibex/verify/result.rbs +52 -0
  431. data/sig/ibex/verify/verifier.rbs +170 -0
  432. data/sig/ibex/verify.rbs +6 -0
  433. data/sig/ibex/watch/runner.rbs +12 -2
  434. data/sig/ibex/watch/source_snapshot.rbs +13 -9
  435. metadata +232 -12
  436. data/lib/ibex/ir/migration.rb +0 -120
  437. data/sig/ibex/ir/migration.rbs +0 -34
data/docs/development.md CHANGED
@@ -1,3 +1,8 @@
1
+ ---
2
+ title: Development and quality checks
3
+ description: Contributor workflow, reproducibility checks, and quality gates for Ibex.
4
+ ---
5
+
1
6
  # Development and quality checks
2
7
 
3
8
  This document describes contributor workflow and repository quality gates.
@@ -20,6 +25,11 @@ Additional repository checks are:
20
25
  bundle exec rake frontend:check
21
26
  bundle exec rake grammar:test
22
27
  bundle exec rake quality:error_ux
28
+ bundle exec rake quality:error_ux_round2
29
+ bundle exec rake quality:workloads
30
+ bundle exec rake quality:direct_ielr_decision
31
+ bundle exec rake quality:maturity
32
+ bundle exec rake quality:runtime_abi
23
33
  npm ci
24
34
  npm run test:site
25
35
  actionlint
@@ -33,6 +43,172 @@ The matrix uses the intentionally unlocked `gemfiles/compat.Gemfile` so each
33
43
  supported Ruby resolves compatible test dependencies. Contributors use the
34
44
  root `Gemfile` and its committed lockfile for every development tool.
35
45
 
46
+ Feature development may proceed while a release decision is `HOLD`. Before
47
+ merging the first user-visible change for a feature, check the active-track
48
+ limits in [`stability.md`](stability.md#feature-development-budget) and update
49
+ that inventory in the same pull request.
50
+
51
+ For the active declarative parser-construction track, change the canonical
52
+ frontend grammar and shadow grammar together, run `bundle exec rake
53
+ frontend:generate`, and review the generated parser diff. Then run
54
+ `frontend:check`, the parser-configuration frontend/LSP/IR/CLI tests,
55
+ `test:no_exec`, and `test:zero_cost`. A source `parser` declaration must promote
56
+ normalization to the current Grammar IR without changing parser-table format v6;
57
+ declaration-free inputs must retain their existing current-format golden bytes.
58
+
59
+ ## Stage A safety net
60
+
61
+ The pre-v1 safety suite keeps independent property tests and adds reviewable
62
+ cross-feature orchestration:
63
+
64
+ ```sh
65
+ bundle exec rake test:matrix
66
+ bundle exec rake test:matrix:full
67
+ bundle exec rake test:zero_cost
68
+ bundle exec rake test:reproducible
69
+ bundle exec rake test:compat
70
+ bundle exec rake test:ir_schema
71
+ bundle exec rake test:no_exec
72
+ bundle exec rake test:adversarial
73
+ bundle exec rake gallery:build
74
+ bundle exec rake gallery:conflicts
75
+ bundle exec rake fuzz:short
76
+ bundle exec rake fuzz:direct
77
+ bundle exec rake fuzz:injection
78
+ bundle exec rake verify
79
+ bundle exec rake verify:injection
80
+ bundle exec rake verify:strict
81
+ bundle exec rake equiv:regression
82
+ bundle exec rake analysis:test
83
+ bundle exec rake fix:test
84
+ bundle exec rake i18n:coverage
85
+ bundle exec rake deps:zero
86
+ bundle exec rake network:zero
87
+ ```
88
+
89
+ `test/matrix.yml` declares the algorithm, table, CST, semantic-location, and
90
+ entry axes. Pull requests run twelve representative combinations; the
91
+ scheduled workflow runs all 96. `test/golden/generated/` contains reviewable
92
+ feature-off generated bytes and `test/golden/digests.yml` detects an
93
+ unreviewed change. Use `bundle exec rake golden:update` only when the generated
94
+ source change is intentional and review the normal version-control diff.
95
+
96
+ `test:no_exec` is a representative static-path regression for sentence
97
+ generation and internal differential fuzzing. Its fixture contains parser
98
+ actions, generated lexer actions, and all user-code sections and fails if those
99
+ commands execute any of them. Command-level tests retain responsibility for the
100
+ other static entries in the [execution trust matrix](../README.md#execution-trust-matrix).
101
+ `test/runtime/cst_incremental_test.rb` covers the generated syntax-only side
102
+ with independent sentinels: lexer actions execute while parser production
103
+ actions do not. These guarantees do not make a generated parser a sandbox;
104
+ test generated files only when their embedded Ruby is trusted.
105
+
106
+ The committed `gallery/` grammars are self-authored and separately licensed.
107
+ Their valid/invalid corpora run through all algorithms and table formats, and
108
+ their state/conflict metrics are fixed. The short fuzzer derives 100
109
+ fixed-seed sentences per grammar and applies one-token insert/delete/replace
110
+ mutations; scheduled CI raises this to 100,000. All searches have token,
111
+ depth, expansion, action, stack, or subprocess-trial bounds. Timing and memory
112
+ remain observations, not pass/fail thresholds.
113
+
114
+ `quality:workloads` validates the [public workload registry](workloads.md),
115
+ including exact source and license-evidence identities, measured versus
116
+ not-measured states, benchmark eligibility, and cross-manifest consistency.
117
+ It recomputes repository-owned grammar counts without downloading external
118
+ source. Synthetic gallery evidence remains distinct from public and production
119
+ workloads.
120
+
121
+ `quality:error_ux_round2` regenerates the fixed H003 multi-shape diagnostic
122
+ and repair capture in memory, validates its closed schema and required case
123
+ coverage, and compares it byte-for-byte with the committed evidence. It also
124
+ keeps the completed repository capture separate from the still-HOLD external
125
+ subjective gate, validates the digest-bound independent-review registry and
126
+ reviewer/disagreement inventory, and binds the unchanged R001 normative
127
+ snapshot.
128
+
129
+ `quality:maturity` validates the exact 18 Preview and two Experimental records
130
+ in the [maturity audit](maturity.md), including activation, evidence gaps,
131
+ external-use classification, issue-audit freshness, decisions, source digests,
132
+ feature budgets, release blockers, and the synchronized public summary.
133
+ This is an audit-integrity gate, not a promise that every Preview implementation
134
+ or historical evidence capture remains runtime-compatible before v1.0.
135
+
136
+ `quality:runtime_abi` is contract-only: it cross-checks the published [runtime ABI evolution
137
+ policy](runtime-abi-evolution.md) and [test-interaction
138
+ policy](test-interactions.md) against implementation constants, schemas, the
139
+ 96-case matrix, scheduled gates, and golden inputs, and ignores ambient GitHub
140
+ event variables. The minimal `runtime-abi-assessment` CI job runs only checkout,
141
+ Ruby setup, and the `quality:runtime_abi_pr` entry, which explicitly receives the
142
+ pull-request event and requires the template's structured assessment when a
143
+ declared runtime-facing path changes. Free-form prose is not parsed as an
144
+ assessment; reviewers still decide whether the selected boundary and evidence
145
+ are correct.
146
+
147
+ When `ibex fuzz` finds a differential failure it automatically performs
148
+ trial-bounded reduction and atomically saves a versioned fixture under
149
+ `test/fuzz/regressions/`. Reproduce the fixed-seed fixture, add a focused test,
150
+ and only then commit it; incomplete reduction is explicitly recorded and must
151
+ not be called minimal. External comparisons require an explicit
152
+ `--against-runtime` description so their runtime configuration is not omitted
153
+ from the report or saved fixture. Per-sentence time and output limits prevent a
154
+ stuck external target from hanging the fuzz run, and child process groups are
155
+ cleaned up so a checker cannot leave descendants behind. `--against=COMMAND`
156
+ is nevertheless an explicit unsafe opt-in: it executes that program with the
157
+ developer's host permissions and is not a sandbox.
158
+
159
+ `rake verify` covers every gallery grammar, construction algorithm, and plain
160
+ or compact table representation with the default independent checks.
161
+ `verify:injection` requires all twenty structurally valid Automaton IR
162
+ mutations to be detected. Scheduled and manually dispatched CI additionally
163
+ runs `verify:strict`, whose completeness checks have higher construction cost.
164
+ `equiv:regression` fixes ten equivalent and ten non-equivalent grammar pairs,
165
+ concrete shortest witnesses, tree mappings, and exit status 2 for exhausted
166
+ product-state budgets.
167
+ `analysis:test` validates the closed JSON contracts and added/removed/changed
168
+ classification for `diff`, plus deterministic recursion and table counts for
169
+ `metrics`.
170
+ `fix:test` proves that emitted repairs eliminate their target without adding
171
+ another conflict, pass the independent verifier, and find no language or
172
+ mapped-tree difference within their reported bounds. It also replays the
173
+ committed twenty-conflict measurement.
174
+ The fuzz and reducer CLIs default to their versioned JSON reports and also
175
+ exercise `--format=text` so automation and terminal use share the same result
176
+ and exit-status contracts. Reducer subprocesses additionally have explicit
177
+ time, output, input, and trial budgets; budget exhaustion is not accepted as a
178
+ reproduced failure. `reduce --command=COMMAND` executes arbitrary checker code;
179
+ those budgets do not sandbox its filesystem, network, process, or other side
180
+ effects.
181
+ `i18n:coverage` requires exact message-ID and interpolation parity across every
182
+ built-in language catalog, and exercises option, environment, fallback, text,
183
+ and JSON paths.
184
+
185
+ ## Release basis
186
+
187
+ Before selecting a release revision, run:
188
+
189
+ ```sh
190
+ bundle exec rake release:reproducible
191
+ ```
192
+
193
+ The gate normalizes the RBS declarations named in
194
+ `tool/quality/stable-api-v1.yml` and requires zero differences from the
195
+ v0.2.0 baseline. Comments and blank lines do not affect the fingerprint. The
196
+ lock covers the Stable runtime, batch CST, current IR, and table surfaces;
197
+ Preview- and Experimental-only signature files are not promoted by appearing
198
+ elsewhere in the generated RBS tree.
199
+
200
+ The same task builds `ibex-runtime` and `ibex` twice in separate temporary
201
+ directories with different locale, timezone, and frozen-string settings. It
202
+ requires byte-identical `.gem` files, rejects unsafe or development-only
203
+ package paths, and prints the SHA-256 digest for each artifact. It never
204
+ publishes a package and leaves no release artifact in the repository.
205
+
206
+ Artifact signing is deliberately not simulated with a repository-local key.
207
+ The release remains blocked until the outcome gates in
208
+ [`release-readiness.md`](release-readiness.md) pass. When that happens, the
209
+ release environment must provide a protected external signing identity and
210
+ bind its signature or provenance attestation to the printed artifact digest.
211
+
36
212
  ## Browser site and API documentation
37
213
 
38
214
  Install the locked browser dependencies and build the same self-hosted site
@@ -82,7 +258,7 @@ ruby -e '
82
258
  sources = Dir.glob("lib/**/*.rb").sort
83
259
  exec("bundle", "exec", "rbs-inline", "--opt-out", "--base=lib", "--output=sig", *sources)
84
260
  '
85
- bundle exec rbs -r digest -r json -r optparse -r tempfile -r timeout -r tmpdir -r uri -I sig validate
261
+ bundle exec rbs -r digest -r fileutils -r json -r optparse -r tempfile -r timeout -r tmpdir -r uri -I sig validate
86
262
  bundle exec steep check
87
263
  bundle exec ruby tool/type_stats.rb --write
88
264
  ```
@@ -113,7 +289,8 @@ tool's Ruby floor does not change the library's Ruby floor.
113
289
  Performance observations are not ordinary CI timing thresholds. Follow the
114
290
  [benchmark guide](../benchmark/README.md) for workload identities, formal
115
291
  comparison commands, environment matching, artifact validation, and
116
- append-only result history.
292
+ append-only result history. Use stable workload and problem IDs from the
293
+ [workload registry](workloads.md) when proposing or prioritizing improvements.
117
294
 
118
295
  The development bundle includes the exact-version external-grammar profiler:
119
296
 
@@ -0,0 +1,120 @@
1
+ # Direct IELR decision dossier
2
+
3
+ I001 is **NO-GO** for release promotion. An experimental direct IELR
4
+ implementation may exist behind an explicit opt-in, but it is not authorized as
5
+ the default or as a release-readiness claim; I002 remains
6
+ blocked. This decision is a feature gate, not a claim that direct IELR has no
7
+ future value.
8
+
9
+ The final decision date is 2026-08-11. Revision
10
+ `d77aeeaf7eb47ad3b7cc70e7ba64f070194164ff` is the repository evidence snapshot
11
+ reviewed immediately before this dossier was published; it is not a claim that
12
+ the dossier itself existed in that revision. The machine record marks the
13
+ decision `final_no_go`, its basis `repository_evidence`, and its review state
14
+ `validated`. It asserts no signer, consent, or personal decision attribution.
15
+
16
+ The closed machine record is
17
+ [`direct-ielr-decision-v1.json`](../tool/quality/evidence/direct-ielr-decision-v1.json),
18
+ validated by
19
+ [`direct-ielr-decision-v1.schema.json`](../schema/direct-ielr-decision-v1.schema.json).
20
+ Run its evidence and policy gate with:
21
+
22
+ ```sh
23
+ bundle exec ruby -Ilib -r./tool/quality/direct_ielr_decision \
24
+ -e 'Ibex::Quality::DirectIELRDecision.new.verify!'
25
+ ```
26
+
27
+ ## Decision rules
28
+
29
+ A GO requires every GO condition. The current record satisfies none of them.
30
+
31
+ | GO condition | Status | Current evidence |
32
+ | --- | --- | --- |
33
+ | At least two representative real grammars show practical canonical-state or item cost. | Not satisfied | H005 has one measured real grammar. |
34
+ | IELR is required by those representative grammars. | Not satisfied | There are zero real IELR-required workloads and zero semantically reviewed conflict removals. |
35
+ | An algorithm and specification owner exists. | Not satisfied | No accepted owner is recorded. |
36
+ | A noncanonical verification plan exists. | Not satisfied | No accepted scale-independent plan exists; the current verified workflow requires full canonical LR(1). |
37
+ | The maintenance budget is accepted. | Not satisfied | No accepted ongoing implementation, verification, review, and maintenance budget is recorded. |
38
+
39
+ A single NO-GO condition is sufficient. All five conditions remain explicit so
40
+ that later reviews cannot silently narrow the policy.
41
+
42
+ | NO-GO condition | Status | Current evidence |
43
+ | --- | --- | --- |
44
+ | No real workload requires IELR. | Satisfied | No measured real workload currently requires IELR. |
45
+ | Canonical LR(1) completes within the current project budget. | Satisfied for the measured scope | The one measured real grammar completes without observed exhaustion. This is not a general scale bound. |
46
+ | LR(1) or a grammar rewrite is simpler. | Not assessable | There is no concrete real conflict case on which to compare alternatives. |
47
+ | The verifier would still enumerate the full canonical collection. | Satisfied | Default and strict `ielr1` verification both enumerate full canonical LR(1). |
48
+ | The benefit is only state-count vanity. | Satisfied | No semantic conflict-removal benefit is established. Structural counts alone do not justify a second construction algorithm. |
49
+
50
+ The decision is therefore NO-GO on more than one independent ground. In
51
+ particular, promoting a direct builder now would leave the dominant
52
+ canonical-collection cost in the verified workflow.
53
+
54
+ ## Bound observations and verification gaps
55
+
56
+ H005 records one measured real workload, `ibex-frontend`: 227 LR(0) states and
57
+ 633 LR(0) items, 456 canonical states and 10,482 canonical items, and 227 final
58
+ IELR states. It has no unresolved conflict requiring IELR. The three registered
59
+ public-real workloads were not run, so there are zero verified public
60
+ checkouts in this capture.
61
+
62
+ The canonical scale problem is unresolved. Completion of the one measured real
63
+ grammar does not establish an upper bound for other grammars. Conversely, the
64
+ current default and strict verifier both build full canonical LR(1), so direct
65
+ construction alone cannot remove that cost from a verified build.
66
+
67
+ V001's supported IELR check establishes membership in a canonical-core union
68
+ and, in strict mode, union coverage. It does not verify IELR adequacy, conflict
69
+ preservation, why a state was split, or split witnesses. The dossier records
70
+ all three relevant assurances as `not_verified`.
71
+
72
+ ## Reconsideration gate
73
+
74
+ Reconsideration requires all of the following new evidence:
75
+
76
+ 1. At least two verified representative real grammars.
77
+ 2. Material canonical state/item cost or observed bounded exhaustion on those grammars.
78
+ 3. Semantically reviewed, meaningful conflicts that IELR removes on those grammars.
79
+ 4. A bounded verification plan that does not make full canonical LR(1) enumeration mandatory.
80
+ 5. An identified owner who accepts the algorithm and specification.
81
+ 6. An accepted implementation, verification, review, and maintenance budget.
82
+
83
+ State-count reduction without a real semantic or operational need does not
84
+ reopen the gate.
85
+
86
+ ## Legal and implementation provenance
87
+
88
+ Any future direct IELR design must be independently derived from papers and
89
+ specifications. GPL implementation source, including GNU Bison implementation
90
+ source, must not be inspected as a design input or translated. No GPL
91
+ implementation source was used or translated for this decision. This rule does
92
+ not replace project license review if the gate is reconsidered.
93
+
94
+ ## Evidence identity
95
+
96
+ The machine dossier binds the H005 human report, H005 machine evidence and
97
+ schema, the V001 trust-boundary report, and the current reference-collection
98
+ and verifier implementations by path and SHA-256 at the reviewed revision. It
99
+ also binds:
100
+
101
+ - H005 capture base revision
102
+ `b5933ae49297422546113577072efce59878009f`;
103
+ - H005 bound-path digest
104
+ `27b5abf3e1ec20b9b904e46c9f7283ebb6b9a710bb3f0d05a6cad067d9627ac3`;
105
+ - H005 implementation digest
106
+ `6c62c6c1ca7f9ad078405019502d1e7bed8364d1786a4f45755480d372122aac`;
107
+ - V001 revision `c7e5cad89ccd00591f3127fdb76a789bbeb202ab`.
108
+
109
+ The quality gate verifies the schema, exact GO/NO-GO inventory, follow-on
110
+ block, H005 thresholds and measurements, V001 boundary statements, legal
111
+ lineage, revision ancestry, every current and reviewed-revision source digest,
112
+ and the aggregate source-list digest. A changed source requires an explicit new
113
+ decision record rather than silently inheriting this decision. In particular,
114
+ the final H005 recapture must be followed by a dossier refresh, even if its
115
+ high-level NO-GO result is unchanged.
116
+
117
+ Exact reviewed history is part of the evidence contract. A shallow checkout
118
+ that omits the decision or V001 revision fails closed with an unavailable
119
+ revision error. Jobs running this gate must fetch complete history; they must
120
+ not silently weaken source verification to accommodate a depth-one checkout.
@@ -0,0 +1,82 @@
1
+ # Direct multi-entry construction decision
2
+
3
+ M001 is **MORE DATA**. Production direct shared multi-entry construction,
4
+ public experiments, and default-path changes are not authorized. This is not a
5
+ NO-GO claim: the current evidence is insufficient to make the feature a GO.
6
+
7
+ Evidence acquisition before GO may include a bounded design proof or
8
+ reachability analysis, an independent semantic oracle, and an adversarial
9
+ synthetic conflicting fixture or prototype. These activities must remain
10
+ bounded evidence work; they do not authorize a production implementation or a
11
+ public experiment.
12
+
13
+ The machine authority remains H005's closed
14
+ [`construction-profile-v1.json`](../tool/profile/evidence/construction-profile-v1.json),
15
+ validated by
16
+ [`construction-profile-v1.schema.json`](../schema/construction-profile-v1.schema.json).
17
+ Its `direct-multi-entry` decision is `MORE DATA`. M001 adds no second decision
18
+ record or competing schema.
19
+
20
+ ## GO conditions
21
+
22
+ The first three M001 conditions require verified real-workload evidence. The
23
+ conflict-attribution condition may instead be established with adversarial
24
+ synthetic conflicting fixtures checked by an independent semantic oracle. None
25
+ is currently satisfied.
26
+
27
+ | GO condition | Status | Current evidence |
28
+ | --- | --- | --- |
29
+ | Actual verified grammars with multiple entries exist. | Not satisfied | H005 records zero real multi-entry workloads. Its decision threshold requires at least two representative real multi-entry grammars. |
30
+ | Canonical fallback cost is material. | Not satisfied | No verified real multi-entry run records canonical fallback exhaustion or at least twofold structural overhead. Host timing is an observation, not a decision gate. |
31
+ | Shared construction has a clear benefit over isolation. | Not satisfied | The synthetic matrix shows no structural advantage for shared LALR construction over isolation. This does not establish a benefit on a verified real workload. |
32
+ | Shared-entry conflict attribution can be preserved. | Not satisfied | The synthetic matrix has zero conflicts and exercises no direct construction mechanism, so it supplies no attribution evidence. |
33
+
34
+ The `matrix-multi-entry` fixture remains diagnostic coverage, not a GO
35
+ threshold. It has two entries and exercises shared and isolated construction,
36
+ but it is a `repository_synthetic` workload. It cannot satisfy any of the first
37
+ three real-workload GO conditions or prove conflict attribution. Its elapsed
38
+ measurements have `release_gate: false`.
39
+
40
+ ## Exact evidence required for reconsideration
41
+
42
+ Reconsideration requires a fresh H005 capture at a fresh exact revision under
43
+ the existing source-digest, environment, and measurement-policy provenance
44
+ contract, recording:
45
+
46
+ 1. At least two verified real grammars with exact identity, revision, grammar
47
+ digest, entry count, and entry names, plus completed comparable shared and
48
+ isolated runs.
49
+ 2. Material canonical fallback cost on those grammars: observed canonical
50
+ fallback exhaustion or at least twofold structural overhead on verified real
51
+ inputs.
52
+ 3. A clear shared-over-isolated benefit from comparable structural evidence;
53
+ host timing alone is insufficient.
54
+ 4. Adversarial synthetic conflicting fixtures and an independent semantic
55
+ oracle showing that a direct mechanism preserves per-entry attribution.
56
+ 5. An identified owner who accepts the semantic specification and ongoing
57
+ implementation, verification, review, and maintenance budget.
58
+
59
+ The closed H005 decision must then change to `GO`. Adding a real workload or a
60
+ faster synthetic observation without satisfying the other conditions does not
61
+ authorize follow-on work.
62
+
63
+ ## Independence and follow-on boundary
64
+
65
+ M001 is independent of the direct IELR decision. Direct IELR remains NO-GO,
66
+ and neither decision supplies evidence for the other. A future multi-entry GO
67
+ may share code with direct IELR only where independently specified invariants
68
+ genuinely coincide; it must not inherit an algorithm or verification plan by
69
+ coupling the two tracks.
70
+
71
+ Until a recorded GO, no production adequacy specification, production direct
72
+ constructor, public experiment, or default-path change analogous to I002-I006
73
+ is authorized. The bounded proof, reachability analysis, oracle, and adversarial
74
+ synthetic prototype described above are permitted only to acquire the four GO
75
+ conditions. Existing shared multi-entry construction and the default generation
76
+ path remain unchanged.
77
+
78
+ Run the focused policy test with:
79
+
80
+ ```sh
81
+ bundle exec ruby -Itest test/quality/direct_multi_entry_decision_test.rb
82
+ ```
data/docs/editor-setup.md CHANGED
@@ -22,4 +22,5 @@ query/fragment URI components, and ambiguous encoded separators are rejected. Op
22
22
  closing first clears the buffer diagnostics and then restores the disk snapshot.
23
23
 
24
24
  For a generic editor configuration, use command `ibex`, arguments `lsp --stdio`, language id `ibex`, and file pattern `*.y`.
25
- Ibex never executes semantic actions or `header`, `inner`, or `footer` code while serving editor requests.
25
+ Ibex never executes parser actions, generated lexer actions, or `header`, `inner`, or `footer` code while serving editor
26
+ requests.
@@ -0,0 +1,117 @@
1
+ # Independent error UX review rubric v1
2
+
3
+ This rubric defines the independent human review required by release gate R001.
4
+ It applies only to the ten observations in
5
+ [`json-errors-v1.json`](../test/fixtures/error_ux/json-errors-v1.json). The
6
+ observations and the maintainer's repair assessment remain normative historical
7
+ evidence; an independent record is a separate artifact and never silently
8
+ rewrites them.
9
+
10
+ The machine-readable record contract is
11
+ [`error-ux-review-v1.schema.json`](../schema/error-ux-review-v1.schema.json).
12
+ The current gate state and immutable kit identity are published in
13
+ [`error-ux-review-status-v1.json`](error-ux-review-status-v1.json).
14
+
15
+ ## Reviewer qualification
16
+
17
+ The reviewer must provide their canonical GitHub login, display name,
18
+ affiliation, and relevant conflicts of interest. They must compare that login,
19
+ case-insensitively, with the complete maintainer roster embedded in the kit;
20
+ the v1 roster includes `ydah`. A rostered maintainer cannot satisfy the gate.
21
+ An `@login`, profile URL, display-name alias, or maintainer-selected substitute
22
+ is not an identity. The review must be the reviewer's own assessment. A
23
+ maintainer may answer reproduction questions but must not choose labels or
24
+ rewrite rationales.
25
+
26
+ The reviewer evaluates only what the fixed evidence exposes. The Racc column is
27
+ the public `on_error` callback without an application-specific message layer.
28
+ The repair column is Ibex's selected opt-in bounded repair, not a claim about
29
+ Racc recovery. Ten cases cannot establish a general error-experience ordering.
30
+
31
+ ## Fixed labels
32
+
33
+ Choose exactly one diagnostic label for every case:
34
+
35
+ - `useful`: the diagnostic identifies the relevant location and gives enough
36
+ concrete information to guide the next correction.
37
+ - `not_useful`: the diagnostic is materially misleading, points at the wrong
38
+ place, or does not provide actionable information for this input.
39
+ - `unclear`: the reviewer cannot decide from the fixed observation or the
40
+ diagnostic has important helpful and unhelpful aspects.
41
+
42
+ Choose exactly one repair label for every case:
43
+
44
+ - `useful`: applying the displayed plan is a reasonable correction for this
45
+ malformed input and does not introduce an unexpected semantic direction.
46
+ - `not_useful`: the plan completes parsing but is not a reasonable likely
47
+ correction for this input.
48
+ - `unsafe`: applying the plan could conceal or introduce a materially different
49
+ meaning, or the fixed evidence is insufficient to rule that out.
50
+ - `unclear`: the reviewer cannot choose another label from the fixed evidence.
51
+
52
+ `unsafe` is deliberately repair-only. Do not translate these labels to a
53
+ numeric score. Each diagnostic and repair label requires its own non-empty
54
+ rationale.
55
+
56
+ ## Review procedure
57
+
58
+ 1. Check out the exact repository revision to be reviewed with no local source
59
+ changes. Run `bundle exec ruby tool/error_ux_snapshot.rb`; it must report a
60
+ byte-for-byte match.
61
+ 2. Run `bundle exec ruby tool/error_ux_review.rb template review.json`. The
62
+ generated draft records the exact repository, snapshot, grammar, Ruby, Racc,
63
+ command, and host identities observed by the tool.
64
+ 3. Inspect cases `EUX-01` through `EUX-10` in that order. Assign both labels and
65
+ replace every rationale placeholder. Do not add, remove, reorder, or omit a
66
+ case or a failure row.
67
+ 4. Compare the independent repair judgment with the maintainer's `useful` and
68
+ `assessment` fields in the normative snapshot. Record every disagreement,
69
+ including disagreement with a diagnostic observation. A disagreement is
70
+ retained in the review record; it is not resolved by editing the snapshot.
71
+ 5. Set a stable record ID, canonical reviewer GitHub login, display name,
72
+ affiliation, ISO 8601 review date, and conflict disclosure. Confirm the
73
+ exact reviewed maintainer roster. Set all four structured consent fields—
74
+ storage of identity, labels, and rationales, plus republication of the
75
+ review—to `true`. Set `record_state` to `published` only after the assessment
76
+ is final.
77
+ 6. Publish that final payload JSON unchanged in a reviewer-controlled GitHub
78
+ repository. The payload deliberately contains no URL or publication
79
+ metadata, so its bytes can be committed without a self-referential commit
80
+ hash. Send the canonical
81
+ `https://github.com/<owner>/<repo>/blob/<40-hex-sha>/<nonempty-path>` URL to
82
+ the maintainers. Branches, tags, commit-only URLs, issue or pull-request
83
+ comments, releases, query strings, fragments, encoded traversal, and
84
+ abbreviated revisions are not accepted.
85
+ 7. Maintainers fetch the immutable blob and copy its bytes without any
86
+ normalization into `docs/error-ux-reviews/v1/records/`. The separate status
87
+ entry records its local path and SHA-256, canonical blob URL, derived raw URL
88
+ and source identity, publisher login, and an import-vetting attestation. The
89
+ release gate fetches those bytes again without redirects and uses GitHub's
90
+ primary commit API to require that the source repository owner, publication
91
+ author, status publisher, and reviewer's canonical login match
92
+ case-insensitively. Network, authentication, redirect, byte, digest, or
93
+ account-metadata uncertainty fails closed. Maintainers may reject a malformed
94
+ record but must not rewrite labels, rationales, or disagreement statements.
95
+
96
+ The generated file is intentionally a `draft`. A draft, a self-review, an
97
+ unpublished or locally reconstructed payload, a mutable or noncanonical link,
98
+ missing structured consent, placeholder text, or an incomplete assessment
99
+ cannot satisfy R001.
100
+
101
+ The import-vetting attestation records who manually checked the source bytes and
102
+ GitHub account metadata. The owner/author/login agreement establishes only
103
+ control of the named GitHub namespace plus the account metadata returned by
104
+ GitHub. It is not a cryptographic identity proof, a signature proof, proof of
105
+ human independence or coercion resistance, or proof that an affiliation or
106
+ conflict disclosure is true. Immutable source bytes, namespace/account
107
+ agreement, maintainer-roster exclusion, and the manual check are recorded; the
108
+ remaining human claims stay explicit limitations.
109
+
110
+ ## Interpretation
111
+
112
+ R001 passes when at least one independently authored, published record validates
113
+ against the closed schema, reproduces the immutable ten-case evidence, and is
114
+ listed without alteration in the public status registry. Additional independent
115
+ records are retained even when they disagree with each other or with the
116
+ maintainer assessment. Passing R001 completes this narrow external review gate;
117
+ it does not prove general diagnostic or repair superiority.
@@ -0,0 +1,22 @@
1
+ # Independent error UX review records v1
2
+
3
+ Published third-party payload JSON records belong in this directory and are
4
+ registered by path, SHA-256, immutable blob/raw identity, source-owner and
5
+ publisher logins, and manual import-vetting fields in
6
+ [`error-ux-review-status-v1.json`](../../../error-ux-review-status-v1.json).
7
+ The directory intentionally contains no JSON while R001 is on HOLD.
8
+
9
+ Import the exact bytes fetched from the reviewer's full-SHA GitHub blob. Do not
10
+ normalize line endings, formatting, wording, labels, rationales, or disagreement
11
+ notes. Publication metadata is stored only in the separate status registry so
12
+ the payload has no self-referential URL. The quality tasks reject unregistered
13
+ files, drafts, rostered-maintainer reviews, mutable or noncanonical publication
14
+ links, incomplete structured consent, placeholders, identity drift, and
15
+ incomplete case sets.
16
+
17
+ The source owner, commit API author, publisher, and reviewer logins must agree
18
+ case-insensitively. That check records control of the named GitHub namespace and
19
+ GitHub account metadata; it is not a cryptographic identity proof or signature.
20
+
21
+ See the [v1 rubric](../../../error-ux-review-rubric-v1.md) for the independent
22
+ review and publication workflow.
@@ -0,0 +1,27 @@
1
+ {
2
+ "schema_version": 1,
3
+ "gate_id": "H003-external-subjective-review",
4
+ "status": "HOLD",
5
+ "reason": "awaiting-at-least-two-independent-reviews",
6
+ "evidence": {
7
+ "path": "docs/error-ux-round2-v1.json",
8
+ "sha256": "6b0620a64bed0aec85b8cec58ce7ccc71703d2d28a5a3895373d333b60b300b6"
9
+ },
10
+ "allowed_labels": [
11
+ "useful",
12
+ "misleading",
13
+ "unsafe",
14
+ "unclear"
15
+ ],
16
+ "required_case_ids": [
17
+ "H003-DELIMITER-01",
18
+ "H003-STATEMENT-01",
19
+ "H003-STATEFUL-01",
20
+ "H003-EOF-01",
21
+ "H003-MULTI-01",
22
+ "H003-UNKNOWN-01",
23
+ "H003-LEXER-01"
24
+ ],
25
+ "records": [],
26
+ "disagreements": []
27
+ }
@@ -0,0 +1,30 @@
1
+ # H003 independent review records
2
+
3
+ Review the byte-bound machine evidence in
4
+ [`error-ux-round2-v1.json`](../../../error-ux-round2-v1.json). The repository
5
+ capture is complete, but it is not an external judgment. Do not copy a
6
+ repository-authored risk statement into a review without independently
7
+ assessing the diagnostic, caret, proposed edit, fresh-reparse result, and
8
+ semantic-value risk.
9
+
10
+ An accepted record must match the `review_record` definition in
11
+ [`error-ux-round2-review-v1.schema.json`](../../../../schema/error-ux-round2-review-v1.schema.json)
12
+ and is published in the `records` array of the
13
+ [`H003 status registry`](../../../error-ux-round2-review-status-v1.json).
14
+ It must identify an external reviewer, attest independence and publication
15
+ consent, bind the exact evidence SHA-256, and include exactly one assessment
16
+ for each of the seven required case IDs. Each assessment needs one of
17
+ `useful`, `misleading`, `unsafe`, or `unclear`, a rationale, and a separate
18
+ semantic-value risk assessment.
19
+
20
+ The registry stays `HOLD` until at least two normalized-distinct external
21
+ reviewers have complete records. Reviewer names are compared after Unicode
22
+ NFKC normalization, full case folding, trimming, and whitespace collapse. If
23
+ their labels differ for any case, retain
24
+ every reviewer pair and its two labels in `disagreements`; do not collapse
25
+ them into a majority label. The quality gate verifies that disagreement
26
+ inventory against the records.
27
+
28
+ This directory intentionally contains no example or placeholder record.
29
+ Adding reviewer-looking data without a real external review would fabricate
30
+ evidence.