You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue #1069: pred path --all used to OOM/hang because Big-O rendering fully expanded composed overhead expressions. A stopgap now caps expansion, but the CLI's failure path (problemreductions-cli/src/commands/graph.rs:349) falls back to printing the raw unreduced expression disguised as O(...), and path_all builds the text rendering unconditionally even in --json mode (both named in #1069). With big_o_normal_form now backed by the growth domain (#1078), every polynomial/linear-exponential path has a real answer, so the fallback and the wasted rendering can go — and #1069 can close with regression tests that pin the fix.
Full design (shared overview for this batch): docs/design/symbolic-growth-domain.md, sections M2/M4 and Quality requirements.
Objective
Delete the O(<raw expr>) fallback and the unconditional text rendering in JSON mode; add the regression, budget, and determinism tests that make #1069's failure mode structurally impossible to reintroduce. Closes #1069.
Interface (Input → Output)
pred path <S> <T> --all [--max-paths N] (text): every listed path shows either a genuinely normalized O(...) per size field or an explicit annotation (e.g. not normalized: <reason>) — never a multi-hundred-character raw expression.
pred path ... --all --json: emits JSON without constructing the text rendering.
New tests: (1) a regression test that reconstructs pred path --all OOMs/hangs: big_o_normal_form exponentially expands composed overhead expressions #1069's exploding path (KSatisfiability → Satisfiability → KSatisfiability → DecisionMinimumVertexCover → HamiltonianCircuit → QuadraticAssignment → ILP → QUBO) via compose_path_overhead and asserts big_o_normal_form returns a genuine normal form; (2) a whole-graph budget test rendering Big-O for all paths returned by find_paths_up_to on representative hot pairs; (3) a golden-file determinism test for pred path KSat QUBO --all text output.
Technical recommendations (non-binding)
Build the exploding path in the regression test by name (compose the edges via the graph API) rather than hard-coding the 2113-char expression, so the test tracks inventory changes.
time pred path KSat QUBO --all (a release or debug build — state which in the test) completes in < 1 s and its output contains no line longer than 200 characters — which proves no raw-expression fallback remains.
cargo test issue_1069 runs the three new tests green.
Behavioral JSON check: pred path KSat QUBO --all --json | python3 -m json.tool > /dev/null exits 0, and the JSON contains a Big-O entry for every path element.
Negative control: the golden determinism test, when fed an output with two terms deliberately swapped (fixture included in the test), fails — proving the byte-exact comparison has teeth. Additionally, grep -n 'format!("O({})"' problemreductions-cli/src/commands/graph.rs returns nothing and the behavioral checks above still pass — proving the fallback was removed, not relocated.
Background
Issue #1069:
pred path --allused to OOM/hang because Big-O rendering fully expanded composed overhead expressions. A stopgap now caps expansion, but the CLI's failure path (problemreductions-cli/src/commands/graph.rs:349) falls back to printing the raw unreduced expression disguised asO(...), andpath_allbuilds the text rendering unconditionally even in--jsonmode (both named in #1069). Withbig_o_normal_formnow backed by the growth domain (#1078), every polynomial/linear-exponential path has a real answer, so the fallback and the wasted rendering can go — and #1069 can close with regression tests that pin the fix.Full design (shared overview for this batch):
docs/design/symbolic-growth-domain.md, sections M2/M4 and Quality requirements.Objective
Delete the
O(<raw expr>)fallback and the unconditional text rendering in JSON mode; add the regression, budget, and determinism tests that make #1069's failure mode structurally impossible to reintroduce. Closes #1069.Interface (Input → Output)
pred path <S> <T> --all [--max-paths N](text): every listed path shows either a genuinely normalizedO(...)per size field or an explicit annotation (e.g.not normalized: <reason>) — never a multi-hundred-character raw expression.pred path ... --all --json: emits JSON without constructing the text rendering.compose_path_overheadand assertsbig_o_normal_formreturns a genuine normal form; (2) a whole-graph budget test rendering Big-O for all paths returned byfind_paths_up_toon representative hot pairs; (3) a golden-file determinism test forpred path KSat QUBO --alltext output.Technical recommendations (non-binding)
Verification
time pred path KSat QUBO --all(a release or debug build — state which in the test) completes in < 1 s and its output contains no line longer than 200 characters — which proves no raw-expression fallback remains.cargo test issue_1069runs the three new tests green.pred path KSat QUBO --all --json | python3 -m json.tool > /dev/nullexits 0, and the JSON contains a Big-O entry for every path element.Negative control: the golden determinism test, when fed an output with two terms deliberately swapped (fixture included in the test), fails — proving the byte-exact comparison has teeth. Additionally,
grep -n 'format!("O({})"' problemreductions-cli/src/commands/graph.rsreturns nothing and the behavioral checks above still pass — proving the fallback was removed, not relocated.Dependencies
Depends on #1078. Milestone: Symbolic Growth Domain & Pareto Search. Closes #1069.