Repository navigation
SubmitEvent のパーツの定義の式の評価を definy に移す - #820
Merged
Merged
Conversation
definy.resolve-commit-contents が core.define-part / define-type の呼び出しをその場で読み, それ以外は参照する外のパーツの式を読んで (read_part_definitions) core.eval-value で繰り返し評価する。 ホストは CAS の読み出しと式の形の確認, 評価した値を core.part-content にすること (decode_part_contents) だけをする。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DHYnFucyxfsRjkYz6vxBmT
narumincho
pushed a commit
that referenced
this pull request
Oct 31, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DHYnFuvh5Z5LF4CG83yA5M
narumincho
pushed a commit
that referenced
this pull request
Oct 31, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DHYnFwMAWA7r41rEUQS1b5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by ナルミンチョ · project thread
サーバー処理の definy 移行の続き (#816 の次)。
SubmitEventで受け取ったコミットのパーツの中身を求める処理 (定義の式の評価) を、ホストの TypeScript (commitContents) から service.wasm の中の definy に移した。変更
definy.resolve-commit-contents: コミットのパーツの中身を求め、definy.check-commit-inputに渡すcore.define-part/core.define-typeの呼び出しで引数がリテラルのものは評価器を使わずに読む (definy.immediate-part-content。説明・可視性・none/some(quote(e).expression)のリテラルを型の付いた値に読む)quoteの外の参照をたどって外のパーツの式を読み (definy.collect-evaluation-parts→ 新しい要求read_part_definitions)、core.eval-valueで評価するcore.value) は新しい要求decode_part_contentsでホストにcore.part-contentにしてもらう。求まるものがある間繰り返し (definy.evaluate-pending-definitions)、評価器で求めたパーツは定義の式も型検査するread_commit_check_inputが返すものをdefiny.commit-check-sourceにした (パーツは評価前の定義の式)。ホストは CAS の定義の式がcore.expressionの形かだけを確かめるそのまま残したもの
commitContents。結果をキャッシュしている)core.valueを型の付いたcore.expressionにする関数が definy にまだ無いので、その変換はdecode_part_contentsとしてホストが行う挙動の違い
SubmitEvent全体がinternalになるunitになるので、値の形の確認か定義の式の型検査で見つかる)確認
npm run lint/npm run check/npm test(586 件) 通過。worker/service_io.test.tsにその場で読む場合と評価器を使う場合のテストを足したnpx playwright test(E2E 41 件) 通過Generated by Claude Code