Skip to content

Read the remaining growable Platform values open (APT-832) - #33

Open
reoring wants to merge 3 commits into
mainfrom
fix/apt-832-open-remaining-values
Open

reoring wants to merge 3 commits into
mainfrom
fix/apt-832-open-remaining-values

Conversation

@reoring

@reoring reoring commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

朝の 5 行(森さん向け)

  1. 何が変わるか: Platform が新しい値(状態、種類、道具など)を返しても、Builder Console の下書き・作成計画・作業環境の読み取りが、丸ごと失敗しなくなる。分かる部分を表示し、その値に頼る書き込みは出さない。
  2. 届いたときに見える変化・止まるもの: いまの Platform に対しては、見える変化は無い見込み。新しい値が来たとき: 下書きに「対応していない」の印と説明が出て、作成・名前の変更・結び付けが出なくなる。止める検査が「準備完了」でないときは、サーバーが可と言っても、作成を止める。作業環境とターンの読み取りの失敗が、画面に出るようになる。
  3. 決めてほしい点と推奨: (a) マージするか → 推奨: マージ(squash だけ。最初の commit は単独では型検査が通らない)。(b) 止める検査が warning の状態のとき、Console は作成を止める(いまの Platform は出さない組み合わせ)→ 推奨: このまま。(c) 計画を書き戻すとき、知らない欄が落ちる件(main からある。APT-1075)→ 推奨: 別に直す。
  4. 独立レビュー: 1 回目「変更が要る」→ 直して、2 回目「マージしてよい。後続の指摘つき」(reviews/builder-console-33-review.md)。最後の commit(0d70791。条件 1 行)は、再レビューを通していない。確かめていないこと: ブラウザのテスト、実環境。足りていないテストが 2 つ。
  5. 戻し方: revert(Console の Web だけ。保存データと API は変えていない)。戻しは効く。

What (APT-832)

An inventory of every response contract (module2 lane) found enumerated fields still read closed: one new value from Platform made the whole response a contract violation. This reads the Platform-owned ones open and makes each consumer handle unknown.

  • Draft read. Phase, kind, saved share scope, step tool and job statuses are open values. The source is an open union where Excel is the known variant. Only a build failure's lines are kept; the event log is not kept; an approved snapshot keeps its handoff and whether it asks for an address.
  • Creation plan (supportedIfKnown). Held whole only when every value is known. It is "unsupported" only when every problem is an addition a newer Platform could make: a string outside a closed enum or literal, an unknown discriminator tag, or an extra field in a strict object. A string sent for a non-string literal (publish.enabled:"yes") is classified as such an addition, and refinements are not evaluated once another issue exists. Anything else broken fails the read. The overview (summary, markdown, handoff tasks) is validated strictly. An unsupported plan is shown but never written back, renamed, bound or created from; its handoff tasks can still be run (ids and user text only).
  • Unknown draft kind. Kept off the creation session: no automatic write fires (plan default, bind, implementation start, resume run, publish repair, alignment) and a stored prepare request is dropped. Listed with an "unsupported" pill, shown read-only, can be discarded.
  • Unknown saved audience or source kind. They do not make the draft unsupported and do not close the plan-default write (its body is the creation plan only). The audience is never rewritten: the legacy session and the Excel hand-off both withhold preferences, and the Excel page tells the user. An unknown source kind closes Excel-flow writes; the build page otherwise treats the draft as non-Excel.
  • Plan validation. Gates are read with open id and state; the answer's resolvedBranch and source-repository details are no longer read. Creation stops when the server says not valid, or when a blocking gate's state is not ready (an unknown state included, whatever the verdict). A non-blocking gate never stops creation.
  • Workspace. Scope, sandbox runtime and source-volume state are open. A failed read shows a notice and keeps the last read; 404 (expired or deleted) is the existing "no workspace" state.
  • Console. Turn-read failures are shown and the last turns kept. The waiting-reason lookup uses Object.hasOwn. Console-owned closed fields stay closed (server ships with the web app).

Not addressed

  • A plan with a new field at a non-strict level is still read with that field dropped, and two writes send the plan back without it (default address, rename). Follow-up.
  • One draft with a broken known structure still fails the draft list (design: no per-item dropping; the last good list is kept).
  • No test yet for: the workspace 404 case, the request body of a handoff run from an unsupported plan, the workspace notice component. The legacy page's retry button is not hidden for an unsupported plan (it sends nothing, but dismisses the failure notice).
  • A blocking gate in state warning stops creation; today's Platform never emits that combination.

Checks (run on the committed tree, head 0d70791)

typecheck, typecheck:e2e, bun test src (1910 pass, 0 fail), check:response-boundaries (0 violations), check:console-schema. No browser story spec was run. The first commit of this PR (5ad5810) does not typecheck on its own; squash-merge only.

A draft, a creation plan, a plan validation or a workspace carrying a value
this build does not know no longer fails the whole read. Known parts are
shown; writes that depend on the unknown part are not offered; a plan with
an unknown value is never written back. A blocking gate with an unknown
state is still not treated as passed. Workspace and turn read failures are
surfaced and keep the last good data.
@reoring
reoring marked this pull request as draft November 14, 2026 17:43
@reoring

reoring commented Nov 14, 2026

Copy link
Copy Markdown
Contributor Author

Do not merge: head 5ad5810 is an inconsistent snapshot (a symbol is used without its import, so typecheck fails) and an independent review found further required changes. A corrected head follows.

…le (APT-832)

Review fixes: an unknown draft kind fires no automatic write; a blocking
gate whose state is not ready stops creation whatever the verdict, a
non-blocking gate never does; retry-prepare is not offered for an
unsupported plan; the Excel hand-off no longer overwrites an unknown saved
audience; a workspace that is gone (404) is not reported as a read failure.
Also completes the previous commit, which lacked an import.
… kind (APT-832)

The PATCH carries only the known creation plan, so closing it for those two
values protected nothing and left creation unable to start without a notice.
A clean-preparation retry is also withheld while creation could not start
again (unknown phase or job state).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant