Commit f1e440f
committed
Add spec-level hint gate, actionable hints, and concise runner output
Driven by analysis of /tmp/liquid-spec-results.jsonl (6.2M run lines, 8523 specs):
find specs that consistently fail at low complexity without actionable guidance.
Hints + complexity (#1, #2):
- Add specific spec-level hints to 19 consistently-failing specs: the
to_liquid-in-conditions/lookups cluster (VariableTest#test_*_calls_to_liquid_value_*,
19 specs at c=220, ~89% fail), the nil-comparison quirk
(StatementsTest#test_zero_lq_or_equal_one_involving_nil, c=140, 89% fail), and the
nested {% liquid %} spec (LiquidTagTest#test_nested_liquid_tag, c=130, 50% fail).
- Raise ForTagTest#test_iterate_with_each_when_no_limit from c=70 to c=200: it uses
instantiate:LoaderDrop (drop iteration) and was misplaced in the near-beginner band.
Spec-quality gate (#3):
- New test_specs_through_220_have_spec_level_hints: requires a spec-LEVEL hint
(spec.hint, not suite/file effective_hint) for c<=220, with a frozen per-spec
baseline (test/spec_hint_baseline.txt). Bidirectional: fails on new no-hint specs
(regressions) AND stale baseline entries (hints added or specs removed), so the
grandfather list shrinks instead of accreting dead weight. Threshold stays at 220
per the stated policy; generated/bulk specs are exempted exactly, not by file.
- scripts/generate_spec_hint_baseline.rb regenerates the baseline.
Filter-matrix hints (#4):
- docs/filter_matrix_quirks.md: category-level guide for the 716 c=160 generated
filter specs (date rendering, float formatting, type coercion, nil/empty, drops).
- tasks/helpers.rb#format_and_write_specs accepts metadata: and writes the
_metadata wrapper, so rake generate:standard_filters preserves the file-level
hint instead of erasing it. standard_filters.yml metadata hint now references
the doc and lists the five failure categories.
Runner output (user request):
- Default plain-mode output is now a single summary line then the lowest-complexity
failures: "Complexity bar cleared: NN, NNNN passes, NNN failures. Next best specs
to work on:" + N failure rows (default 5, --max-failures). Each failure row shows
[c=N] complexity. Preamble, per-suite progress, and skipped-suite output are
verbose-only (-v); --json is unchanged. --add-specs output also gated to verbose.
- Updated test/runner_diagnostics_test.rb: new test_plain_output_starts_with_...
asserts stdout starts with the summary and omits preamble; prioritized test
asserts no "Prioritized Specs" before the header.1 parent 5a0e72b commit f1e440f
11 files changed
Lines changed: 1909 additions & 52 deletions
File tree
- docs
- lib/liquid/spec/cli
- scripts
- specs/liquid_ruby
- tasks
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
41 | 57 | | |
42 | 58 | | |
43 | 59 | | |
| |||
51 | 67 | | |
52 | 68 | | |
53 | 69 | | |
54 | | - | |
55 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
56 | 79 | | |
57 | 80 | | |
58 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
291 | 291 | | |
292 | 292 | | |
293 | 293 | | |
294 | | - | |
| 294 | + | |
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
306 | | - | |
| 306 | + | |
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
| |||
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
331 | | - | |
| 331 | + | |
332 | 332 | | |
333 | 333 | | |
334 | | - | |
335 | 334 | | |
336 | 335 | | |
337 | 336 | | |
| |||
361 | 360 | | |
362 | 361 | | |
363 | 362 | | |
364 | | - | |
| 363 | + | |
365 | 364 | | |
366 | 365 | | |
367 | 366 | | |
| |||
387 | 386 | | |
388 | 387 | | |
389 | 388 | | |
390 | | - | |
| 389 | + | |
391 | 390 | | |
392 | 391 | | |
393 | 392 | | |
394 | | - | |
395 | 393 | | |
396 | 394 | | |
397 | 395 | | |
| |||
446 | 444 | | |
447 | 445 | | |
448 | 446 | | |
449 | | - | |
| 447 | + | |
450 | 448 | | |
451 | 449 | | |
452 | 450 | | |
453 | 451 | | |
454 | 452 | | |
455 | 453 | | |
456 | | - | |
457 | 454 | | |
458 | 455 | | |
459 | 456 | | |
| |||
465 | 462 | | |
466 | 463 | | |
467 | 464 | | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
| 465 | + | |
483 | 466 | | |
484 | 467 | | |
485 | 468 | | |
| |||
515 | 498 | | |
516 | 499 | | |
517 | 500 | | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
525 | 512 | | |
526 | 513 | | |
527 | 514 | | |
| |||
1417 | 1404 | | |
1418 | 1405 | | |
1419 | 1406 | | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
1420 | 1420 | | |
1421 | 1421 | | |
1422 | 1422 | | |
1423 | | - | |
1424 | | - | |
1425 | | - | |
1426 | | - | |
1427 | 1423 | | |
1428 | 1424 | | |
1429 | 1425 | | |
| |||
1438 | 1434 | | |
1439 | 1435 | | |
1440 | 1436 | | |
1441 | | - | |
1442 | | - | |
| 1437 | + | |
| 1438 | + | |
1443 | 1439 | | |
1444 | 1440 | | |
1445 | 1441 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
0 commit comments