LemmaScript icon indicating copy to clipboard operation
LemmaScript copied to clipboard

Batch mode silently drops --time-limit and --extra-flags

Open DivyamTalwar opened this issue 2 months ago • 2 comments

@namin

Summary

A source-backed CLI behavior needs a contract decision before implementation: batch invocations parse --time-limit=<seconds> and --extra-flags=<string>, but the batch dispatch path does not receive either value.

Evidence

At the current main baseline (299e6b057a5dfc7f255d3e06d998573918e6e429), tools/src/lsc.ts parses both flags and forwards them to runFile for an explicit source path. With no source path, it calls runBatch(cmd, backend, slow, configPath); each batch entry then uses only the timeout and flags from LemmaScript-files.txt. The parsed CLI values are therefore silently discarded in batch mode.

This is a static call-path finding; a fake-verifier argv-spy regression is still needed before a fix PR.

Contract question

Which behavior should be normative?

  1. Explicit CLI values override per-entry manifest values.
  2. CLI values provide defaults while manifest values remain authoritative.
  3. These flags are intentionally unsupported in batch mode and should be rejected clearly.

The existing --slow rule for entries above 60 seconds should be defined against the chosen effective timeout, and ordinary batch runs without these flags must remain unchanged.

Proposed acceptance criteria

  • Exact downstream verifier argv is covered for manifest-only, CLI-only, and both-source cases.
  • Invalid timeout input and unsupported commands remain clear errors.
  • Precedence and repeated-flag behavior are documented.
  • No verifier timing or proof correctness claims are inferred from an argv-only test.

No implementation PR is opened yet because choosing a precedence rule would otherwise be an unreviewed interface change.

DivyamTalwar avatar Sep 17 '26 03:09 DivyamTalwar

Hmm, I am not sure. I think if no time is provided, then clearly the reading from LemmaScript-files.txt should win. If something is provided, then perhaps, it should override the txt file. WDYT?

namin avatar Sep 17 '26 04:09 namin

Thanks so much for reporting all the issues, and for the fixes. I am happy if you want to contribute a fix here as well. Do you agree about how this should be handled (see previous comment)? I am open to suggestions.

namin avatar Sep 17 '26 23:09 namin