Skip to content

Type scene import plan source resolution#326

Merged
esnya merged 10 commits into
mainfrom
codex/type-scene-import-resolution-plan
Jun 3, 2026
Merged

Type scene import plan source resolution#326
esnya merged 10 commits into
mainfrom
codex/type-scene-import-resolution-plan

Conversation

@esnya
Copy link
Copy Markdown
Owner

@esnya esnya commented Jun 1, 2026

Summary

  • make scene import plans accept only resolved local import requests instead of parallel normalized/resolved raw requests
  • remove scene-plan runtime request consistency checks and the duplicate resolved source path field
  • pass a concrete live-send connection request instead of retaining the whole normalized import request downstream

Verification

  • dotnet restore PlateauResoniteLink.sln --locked-mode --disable-build-servers
  • dotnet format whitespace . --folder --verify-no-changes
  • dotnet build PlateauResoniteLink.sln --configuration Release --no-restore --disable-build-servers -m:1 -p:UseSharedCompilation=false
  • dotnet test PlateauResoniteLink.sln --configuration Release --no-restore --verbosity normal -m:1 --disable-build-servers -p:UseSharedCompilation=false
  • canonical scene dump for plateau-13213-higashimurayama-shi-2020 mesh 53395325 dem,bldg grid geotiff; no diff from baseline

@esnya esnya force-pushed the codex/type-scene-import-resolution-plan branch from 80fe333 to 9bbad5a Compare June 1, 2026 14:49
@esnya esnya requested a review from Copilot June 1, 2026 17:34
Copy link
Copy Markdown
Owner Author

esnya commented Jun 1, 2026

これはマージ可能です。scene plan が resolved local request だけを受け、raw/normalized request や duplicate source path を下流に持ち込まない形なら価値があります。

条件は、non-local / unresolved source の失敗を plan 作成前に閉じ、plan 内で再検証しないことです。

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR tightens typing around scene import plan source resolution by making SceneImportExecutionPlan operate on a single resolved-local request shape, removing redundant fields and runtime consistency checks, and narrowing downstream live-send connection inputs to only what’s required (dataset/mesh).

Changes:

  • Refactored SceneImportExecutionPlan creation to accept ResolvedLocalPlateauImportRequest and to embed the resolved request into ImportedSceneMetadata.
  • Removed ResolvedSourcePath from SceneImportRequest and updated call sites/tests accordingly.
  • Replaced downstream usage of a full normalized import request with a LiveSendConnectionRequest (dataset + mesh code).

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/PlateauResoniteLink.Tests/UseCases/SceneImportExecutionPlanTests.cs Updates plan tests to validate the new resolved-local plan creation path.
tests/PlateauResoniteLink.Tests/UseCases/PlateauImportServiceTests.cs Adjusts assertions to reflect removal of NormalizedRequest/ResolvedSourcePath data flow.
tests/PlateauResoniteLink.Tests/Targets/ResoniteLiveSceneImportTargetTestSupport.cs Updates test plan factory helpers to build ResolvedLocalPlateauImportRequest and use new plan API.
tests/PlateauResoniteLink.Tests/Targets/ResoniteLiveSceneImportTargetLifecycleTests.cs Switches lifecycle tests to use updated plan creation helper instead of old plan constructor args.
src/PlateauResoniteLink/Targets/Resonite/ResoniteLiveSendStartRequestFactory.cs Constructs LiveSendConnectionRequest directly from request metadata rather than passing full normalized import request.
src/PlateauResoniteLink/Targets/Resonite/ResoniteLiveSendRunStarter.cs Updates LiveSendRunStartRequest to store LiveSendConnectionRequest and validates it.
src/PlateauResoniteLink/Targets/Resonite/ResoniteLiveSendConnectionInitializer.cs Uses the typed ConnectionRequest when connecting the session.
src/PlateauResoniteLink/Application/Importing/SceneImportRequest.cs Removes ResolvedSourcePath from the scene import request record.
src/PlateauResoniteLink/Application/Importing/SceneImportExecutionPlan.cs Simplifies plan to carry only SceneImportRequest and provides Create that takes a resolved-local request.
src/PlateauResoniteLink/Application/Importing/PlateauImportService.cs Creates plans from ResolvedLocalPlateauImportRequest and removes now-unneeded normalized/resolved parallel requests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4fdd70f042

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/PlateauResoniteLink/Application/Importing/SceneImportExecutionPlan.cs Outdated
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

CityGmlSource = cityGmlSource,
DemTextureSource = demTextureSource,

P2 Badge Reject rebinding local import sources

When a custom IPlateauDatasetSourceResolver or direct caller passes a ValidatedPlateauImportRequest whose CityGML/DEM source is already local, these assignments silently replace that validated local path with whatever cityGmlSource/demTextureSource was supplied. The previous execution-plan consistency check only allowed equal local sources, so a resolver bug can now import from an unrelated local archive/ortho file while retaining the dataset, mesh code, and options of the user's original request; keep the local-source equality check before overwriting, while still allowing the expected remote-to-local materialization case.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@esnya esnya force-pushed the codex/type-resolved-local-import-request branch from 58d89e3 to 80270fe Compare June 1, 2026 18:06
@esnya esnya force-pushed the codex/type-scene-import-resolution-plan branch 2 times, most recently from 6ac5a5d to 1aeacbc Compare June 1, 2026 18:31
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1aeacbc027

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@esnya
Copy link
Copy Markdown
Owner Author

esnya commented Jun 1, 2026

レビュー結論: 受け入れ不可です。

ResolvedLocalPlateauImportRequest.Create(...) が元の ValidatedPlateauImportRequest と対応しない resolved source を受け入れ、ToImportRequest() で上書き後の source を露出できます。resolver / direct caller 境界で別 dataset/path を混入できるため、scene metadata 側の比較だけでは防げません。resolved sources を受け入れる入口で元 request との対応を検証してください。

@esnya
Copy link
Copy Markdown
Owner Author

esnya commented Jun 1, 2026

レビュー対応しました。

ResolvedLocalPlateauImportRequest.Create で、元 request が local source を指定していた場合は resolved local source が同一 path であることを factory 境界で検証するようにしました。DemTextureSource も、未指定なら resolved source を受け付けず、local 指定なら同一 path だけを受け付けます。remote 指定だけが local cache/download path への解決を許す形です。

確認:

  • dotnet test tests\PlateauResoniteLink.Tests\PlateauResoniteLink.Tests.csproj --configuration Release --no-restore --filter "FullyQualifiedName~ResolvedLocalPlateauImportRequestTests|FullyQualifiedName~SceneImportExecutionPlanTests" -m:1 --disable-build-servers -p:UseSharedCompilation=false
  • dotnet restore PlateauResoniteLink.sln --locked-mode --disable-build-servers
  • dotnet format whitespace . --folder --verify-no-changes
  • dotnet build PlateauResoniteLink.sln --configuration Release --no-restore --disable-build-servers -m:1 -p:UseSharedCompilation=false
  • dotnet test PlateauResoniteLink.sln --configuration Release --no-restore --verbosity normal -m:1 --disable-build-servers -p:UseSharedCompilation=false (991 passed)
  • Fake Live Sink canonical dump diff: no diff; temporary dump deleted

補足: 検証中に C: の空き不足で一度 build が失敗したため、repo worktree 配下の生成物 artifacts のみ削除してから直列で再実行しました。runtime baseline / source archive には触れていません。

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ec73c7ce7c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@esnya
Copy link
Copy Markdown
Owner Author

esnya commented Jun 1, 2026

追加レビュー対応しました。

remote request の場合も、resolved local source が URI から RemoteDatasetResourceLayout で計算される cache path と一致することを ResolvedLocalPlateauImportRequest.Create で検証するようにしました。CityGML は source-archive-*、DEM texture は source-ortho-* の prefix で照合します。CkanPlateauDatasetSourceResolver は同じ prefix 定数と workRoot を factory に渡すため、resolver 外から別 archive を差し込む経路も閉じています。

確認:

  • dotnet test tests\PlateauResoniteLink.Tests\PlateauResoniteLink.Tests.csproj --configuration Release --no-restore --filter "FullyQualifiedName~ResolvedLocalPlateauImportRequestTests|FullyQualifiedName~CkanPlateauDatasetSourceResolverTests|FullyQualifiedName~CkanPlateauDatasetSourceResolverCacheTests" -m:1 --disable-build-servers -p:UseSharedCompilation=false (32 passed)
  • dotnet test tests\PlateauResoniteLink.Tests\PlateauResoniteLink.Tests.csproj --configuration Release --no-restore --filter "FullyQualifiedName~SceneImportExecutionPlanTests.CreateCarriesResolvedLocalRequest|FullyQualifiedName~ResoniteLiveSceneImportTargetLifecycleTests.ExecuteAsync_DelegatesNormalizedRequestsToInjectedSession|FullyQualifiedName~ResolvedLocalPlateauImportRequestTests" -m:1 --disable-build-servers -p:UseSharedCompilation=false (10 passed)
  • dotnet restore PlateauResoniteLink.sln --locked-mode --disable-build-servers
  • dotnet format whitespace . --folder --verify-no-changes
  • dotnet build PlateauResoniteLink.sln --configuration Release --no-restore --disable-build-servers -m:1 -p:UseSharedCompilation=false
  • dotnet test PlateauResoniteLink.sln --configuration Release --no-restore --verbosity normal -m:1 --disable-build-servers -p:UseSharedCompilation=false (994 passed)
  • Fake Live Sink canonical dump diff: no diff; temporary dump deleted

@esnya
Copy link
Copy Markdown
Owner Author

esnya commented Jun 2, 2026

#325 の更新を取り込んで conflict を解消しました。

解消内容:

  • Type resolved local import requests #325 側の ValidatedPlateauImportRequest terrain grid 不変条件を保持。
  • Type scene import plan source resolution #326 側の ResolvedLocalPlateauImportRequest.Create(request, workRoot, resolvedCityGml, resolvedDem) に一本化。
  • local source は同一 path のみ、remote source は RemoteDatasetResourceLayout 由来の cache path のみ受け付ける境界検証を維持。
  • scene plan は resolved local request を受け取る契約のまま、source 対応検証を plan 内に戻さない形にしました。

検証:

  • dotnet restore PlateauResoniteLink.sln --locked-mode --disable-build-servers
  • dotnet format whitespace . --folder --verify-no-changes
  • dotnet build PlateauResoniteLink.sln --configuration Release --no-restore --disable-build-servers -m:1 -p:UseSharedCompilation=false
  • dotnet test PlateauResoniteLink.sln --configuration Release --no-restore --verbosity normal -m:1 --disable-build-servers -p:UseSharedCompilation=false (996 passed)
  • Fake Live Sink canonical dump for plateau-13213-higashimurayama-shi-2020 / 53395325 / dem,bldg / grid matched the existing semantic baseline with git diff --no-index.

@esnya
Copy link
Copy Markdown
Owner Author

esnya commented Jun 2, 2026

ここにマージされたPRは受け入れ可能だが、このPR自体がレビューできなくなった。分離。

Base automatically changed from codex/type-resolved-local-import-request to main June 2, 2026 09:25
@esnya esnya force-pushed the codex/type-scene-import-resolution-plan branch 2 times, most recently from 1f7cb0c to c4fd4b2 Compare June 2, 2026 18:24
@esnya
Copy link
Copy Markdown
Owner Author

esnya commented Jun 2, 2026

restack しました。\n\n- #326 から live-send run contract と dynamic terrain projection result の commits を外し、scene import source resolution / resolved local request 境界に絞りました。\n- 最上位 #356 の tree は restack 前と同一で、runtime 内容は変えていません。\n- 検証: restore / format whitespace verify / Release build / Release test (1038 passed)。

@esnya esnya force-pushed the codex/type-scene-import-resolution-plan branch from c4fd4b2 to 54a4c78 Compare June 2, 2026 22:26
@esnya esnya merged commit c35dbf9 into main Jun 3, 2026
4 checks passed
@esnya esnya deleted the codex/type-scene-import-resolution-plan branch June 3, 2026 06:29
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.

2 participants