Repository navigation
Closed
Labels
direction:ADirection A: suite triage to 0.5.0Direction A: suite triage to 0.5.0kind:suiteLua 5.3 official test suite workLua 5.3 official test suite work
Milestone
Description
Problem
pm.lua is fully deferred (:all). Plan A9 in .agents/plans/ carved this work into sub-plans (A9a executor, A9b pattern); both unmerged. The pattern engine in lib/lua/vm/stdlib/pattern.ex is missing several features that pm.lua exercises directly.
Known gaps
Off the top of the existing plan notes and the file's contents:
%f[set]— frontier pattern (matches an empty string at the transition between chars not insetand chars inset).%b{}— balanced match (e.g.%b()matches a balanced parenthesis pair).- Position capture
()— empty parenthesised group captures the current position (1-based index), not a substring. - Backreferences
%1..%9in pattern bodies (referencing earlier captures). - Anchor edge cases around
^and$inside character classes and with multi-byte UTF-8 input. string.gsubwith a function/table replacement that returnsfalse/nil(keep original match).
Suggested approach
This is large enough to keep split across sub-PRs:
- Triage: run
pm.lualine-by-line, list which assertions fail and why. Reuse.agents/skills/triage-suite-failure/. - Tackle position capture first (smallest, mechanical, used widely in other patterns).
- Then balanced match, frontier, and backreferences in that order.
- Each feature lands with its own regression tests under
test/lua/vm/stdlib/pattern_test.exs.
Acceptance per sub-PR
- A new specific feature passes its unit tests.
pm.luaadvances to the next failure point. Track progress by replacing:allwith narrowing ranges intest/lua53_skips.exs.
Risk
- Pattern semantics interact (frontier inside a captured group, etc.). Each addition needs to be tested in combination with existing features, not just in isolation.
Metadata
Metadata
Assignees
Labels
direction:ADirection A: suite triage to 0.5.0Direction A: suite triage to 0.5.0kind:suiteLua 5.3 official test suite workLua 5.3 official test suite work
Activity