`%optimize` and `%configure` have no machine-readable form (`-json`)

オープン
#2,342 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
55/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
go

調査の方向性

Start with internal/frontend/repl/optimize.go and repl.SolveReport in check.go, then trace how %check -json is parsed and emitted in the CLI and REPL. Define and document a stable solver-report JSON shape for %optimize and %configure, with tests for normal, unsat, and unknown results and unchanged text output. Done means consumers can read reports as JSON while existing text output and exit codes remain unchanged.

索引モデルが issue の本文から書いたものです。

説明

Disclaimer, this issue was detected and written by an AI

Summary

%optimize returns a structured []SolveReport in Go but only prose through
the REPL/CLI; %configure has no structured form at all. Tools that want the
optima (a trade-study UI, a results comparison) must scrape terminal text, or
cannot offer the verb.

%check already has a JSON form (-json, one JSON document), so the shape to
follow exists.

Current state

  • internal/frontend/repl/optimize.go:16 — OptimizeSolve returns
    []SolveReport; repl.SolveReport (check.go:58) has no json: tags.
  • No -json arm for %optimize/%configure; -json selects check-report JSON.
  • The service/CLI RPCs are unaffected; this is an output-contract issue.

Proposal

Define and document a JSON document for solver reports, mirroring -check -json:
one JSON object per command run, with subject, status (sat/unsat/
unknown), solver, values (name/value/unit), and lines for the human
explanation. Add -json (or %optimize -json/%configure -json) on the CLI and
REPL; when the flag is set, write only that document and no prose. Give the struct
tags and a stable schema; keep existing text output unchanged without the flag.

Tests

  • A solver demo: %optimize -json emits one object per report with the stable
    fields; %optimize without the flag is byte-identical to today.
  • %configure -json covers the same shape (or a documented subset).
  • An unsat/unknown case carries status and the explanation, not an empty object.

Acceptance

  • The JSON shape is documented (wire-contract or CLI reference) and tagged.
  • -json changes only the output form; exit codes and text mode unchanged.
  • A consumer can read optima without parsing prose.
主要言語
Go
スター
59
フォーク
20
平均マージ
10時間 23分
マージ済み PR(30日)
897

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Open-MBEE/OpenSysML のほかの issue

Open-MBEE/OpenSysML の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。