Support authored navigation refinement areas in shared tiled baking
User approved implementation of the code-configured refinement plan and4336 configuration, confirmed visual acceptance, and subsequently authorized committing and pushing the work. Published to the existing PR branch; deployment remains unauthorized. Follow investigation tsk_4fye4t4gbv. Current clean branch feature/rebuild-world-navmesh-baking at132a78e8c. Use host dotnet and read-only /mnt/games/PRK-NEW/client for future validation; user handles graphical checks. Intended outcome Define named, code-configured static-playfield areas that require finer navmesh resolution. Generator and client preview resolve the same immutable recipe and use the existing WorldTileBaker/WorldGeometryLoader pipeline. Keep64-world-unit tiles, common origin/vertical grid, native ownership and serialized tile compatibility. Refinement changes horizontal resolution only, not agent shape, slope rules, collision roles or gameplay. Default bakes remain uniform when no areas match. Proposed configuration and ownership User explicitly prefers code configuration, not JSON. Use typed immutable C# recipe/area records and a shared code catalog in PRK.Common/PRK.WorldNavigation/Configuration (proposed PlayfieldBakeRecipes.cs), compiled into the shared library. No new JSON format, schema version, embedded configuration file, configuration-file override or duplicated loaders. The catalog maps static asset playfield IDs to a base profile and named XZ rectangles with cell size. Keep per-playfield declarations together and separate from generic baking logic; no mesh-ID branches or PF-specific behavior inside the baker. Share validation/resolution between generator and client preview. Region bounds are world units, expanded to intersecting existing tiles; whole vertical columns are refined. Overlap chooses finest requested size, independent of ordering. V1 has no height-specific resolution, automatic portal detection or visual editor. Generated ACG layouts retain the mission profile and do not inherit template-world static areas accidentally. Important prerequisites and scope separation Fine areas alone do not solve4336 under the old profile. Configure an explicitly named pedestrian base recipe for4336 using measured radius0.4/slope60, retaining height2/climb0.8 and defaultcell0.32. Keep other playfields' established defaults and larger-agent requirements unchanged until separately validated; no global profile rewrite hidden in region support. Regions specify only finecell0.08. The investigation's two necessary tile footprints are X256..320/Z256..320 and X256..320/Z384..448; author bounds around the measured entrances with intended two-tile coverage verified by tests, not hardcoded tile IDs or mesh-ID branches in C#. Baker integration Resolve and freeze a deterministic per-tile resolution plan before scheduling work. Extend WorldTileBaker through an immutable recipe/plan while retaining the uniform-profile entry point for existing callers. Bake each tile once at its selected resolution, use that resolution's voxel agent conversions and native border calculation while selecting all required overlap geometry. Keep world tile dimensions and Y origin fixed across coarse/fine neighbors. Assemble raw tiles first, then run one global reachability pass. Preserve cancellation, transactional artifact publication, bounded selected geometry, native raster/concurrency budgets and deterministic output. Invalid or excessive recipes refuse explicitly; no silent fallback to coarse or omission of required areas. Tooling and provenance Preserve the generator's existing --profile feature without adding a new JSON-based refinement interface. Document how an explicit base-profile override combines with code-defined areas; validate the resulting immutable recipe and refuse incompatible combinations. Client preview and generator must select the same recipe for the same static asset ID. Include the resolved recipe/refinement plan in manifest fingerprint/equality so config changes invalidate --reuse; do not rely on record/list reference equality. Diagnostics identify recipe, regions and refined/total tile counts. Static server runtime still consumes compatible baked tiles; it need not load authoring config. Separate verified path limitation The complete4336 network exceeds the default48-polygon corridor buffer. Include an independently reviewable bounded retry on actual buffer-too-small status, up to the existing512 ceiling, retaining failures for unreachable routes and never accepting partial paths. Merely selecting96 as a new magic default is not sufficient. This is separate from refinement geometry but required for full route acceptance. Acceptance and validation Synthetic tapered doorway + sloped approach reproduces baseline failure and passes with the authored two-tile plan. Mixed-resolution seams work both directions, including negative/nonzero origins, tile borders and overlapping area resolution; unchanged recipes preserve uniform behavior. Invalid/non-finite/inverted/out-of-budget config refuses; changed refinement invalidates cached artifacts. Real4336 control: neither entrance works coarse; refining either alone opens only that entrance; refining both restores all13 corridor legs, both lower levels and the complete outside-to-outside route after serialization/reload. Verify required path buffer retry behavior separately. Generator and client preview share resolved plan; affected warning-gated builds/tests, native ownership tests and other real worlds remain green. The user explicitly declined a benchmark during implementation; no benchmark was run or new time/memory guarantee claimed. User performs final graphical alignment and zoning check. Implemented milestone (committed and pushed) - Added WorldRefinementArea and immutable WorldBakeRecipe with bounded, validated named XZ rectangles, deterministic finest-wins overlap selection, half-open bounds and a canonical binary recipe fingerprint. No refinement JSON or configuration file loader. Fingerprinting uses no reflection-based JSON, preserving Native AOT compatibility. - Shared Configuration/PlayfieldBakeRecipes.cs configures4336 pedestrian radius0.4/slope60 with two0.08-cell entrance areas and0.32-cell default, retaining2m height/.8m climb and existing profiles elsewhere. CLI custom base-profile overrides retain and validate code-defined areas; generated missions remain uniform and separate. - WorldTileBaker resolves effective tile profiles before scheduling, bakes each tile once, keeps common tile/Y grids and resolution-specific geometry borders, and performs global reachability after assembly. Existing uniform overload remains. Client preview and generator use the same resolver and report recipe/areas/refined counts. Manifest v2 includes recipe fingerprint and verified refined counts so changed refinements invalidate reuse. - Separate managed query change keeps48 initial corridor/straight capacities and doubles only on native buffer-too-small, to512 by default. Explicit maximumPath/maximumStraightPath remain hard ceilings. Unreachable, partial and over-budget routes still fail with no returned partial points. Verified outcomes - WorldNavigation suite13 passed/no skips with the full read-only install, including synthetic tapered door, mixed-resolution seams in both directions, overlap/order determinism, unchanged uniform bytes, refused invalid areas, and all four real4336 controls. Both areas restore all13 corridor legs and full outside-to-outside route after codec reload; explicit48 ceiling fails, default bounded retry succeeds. - Native navigation suite131 passed,1 expected external-capture skip; added real native long/winding corridor tests exercise independent polygon/straight-buffer growth, explicit ceilings, hard512 failure and disconnected-route refusal. Allocation/lifetime suite stays green. - Generator5 tests passed/no skips, including refinement-aware reuse. Deliberately removed recipe fingerprint comparison: changed-refinement test failed; restored comparison and all tests passed. Deliberately ignored refinement selection: tapered-door test failed; restored selection and suite passed. Long-route test failed against old48-only behavior before retry implementation. - Focused client/world/ACG/collision suite155 passed/no skips using PRK_INSTALL_ROOT=/mnt/games/PRK-NEW/client. Previous missing-twk failures do not recur with the full install. Client/test and generator builds pass warning gates; the initial fresh native OpenAL build had one existing upstream C++ range-loop warning. Production-mode Linux x64 Native AOT client publish passed, output/tmp/prk-refinement-client-publish. Host SDK reports arch-x64; publish used NativeHostRuntimeIdentifier=linux-x64 for the same Linux x64 target. ASP.NET runtime absent from system SDK was supplied via a temporary host runtime root combining installed .NET10.0.13 Core with the existing repo-local ASP.NET10.0.11; no Docker, dependency suppression or system changes. - Actual CLI generation then --reuse succeeded with196 tiles/126132 triangles, recipe penumbra-corridors-pedestrian, refined2/196, both area names. Output/tmp/prk-refinement-generated only. git diff --check passes. No client GUI launched, repository commits/push, production import/replacement or deployment. Final acceptance The user confirmed the implemented refinement looks correct in their graphical client, satisfying the remaining user-run visual acceptance gate. Implementation and automated verification are complete; no additional benchmarking planned. No assistant-run graphical/GPU test or Windows/macOS verification is claimed. User authorized publication. Committed query-buffer retries separately as d21408064 (fix: Retry exhausted navigation path buffers within bounds) and code-configured refinement as b1a6461db (feature: Support code-configured navmesh refinement areas). Pushed both plus the preceding visualizer commit132a78e8c to origin/feature/rebuild-world-navmesh-baking, updating existing PR2570. Working tree clean and synchronized with origin. No deployment, production navmesh replacement or import performed.
Checklist
4 of 4 complete- Extend the existing tiled baker to resolve one resolution per tile, preserve mixed-resolution seams and run reachability globally; include the resolved plan in artifact reuse validation.
- Define a shared, bounded, versioned static-playfield recipe catalog with named XZ refinement areas, deterministic overlap rules and explicit configuration precedence.
- Use the same recipe in generator and client preview, configure measured pedestrian settings and the two 4336 entrances, and verify coarse/single-area/both-area controls.
- Confirm the implemented refinement overlay visually in4336 with user-run client verification; automated query capacity, regression and build checks have passed. Benchmarking omitted at the user's request.
- Area
- Project Rubi-Ka
- Project
- engines
- Kind
- Feature
- Task ID
tsk_nfdzwyu57j- Updated