ReviewOS

stacks/the-settlers-iii-remake

[S3-046] Complete working-area and production controls

#48
Closed chris opened this 9 days ago ·
9 days ago

S3-046: Complete working-area and production controls

Parent and ownership

Parent epic: https://github.com/stacksjs/the-settlers-iii-remake/issues/8 Source owner: stacksjs/the-settlers-iii-remake. Master roadmap: https://github.com/stacksjs/the-settlers-iii-remake/issues/4.

Problem and observable result

Change actual worker destinations. Pause without losing active jobs. Respect resource exhaustion and full entrances.

The current application is a browser prototype. Passing the Riverlands campaign does not establish original-game or native parity. This issue is complete only when its stated behavior has retained evidence.

Evidence and interfaces

Production consumes physically delivered inputs and staffed work. Bounded output inventories create backpressure. Controls change production and carrier decisions rather than settlement totals directly.

Pin the inspected revisions and fixture hashes in the implementation evidence. Original-game observations govern rules and timing. JSettlers is implementation evidence, not an authoritative balance specification. Unknown values remain explicitly unverified.

Acceptance criteria

  • Change actual worker destinations.
  • Pause without losing active jobs.
  • Respect resource exhaustion and full entrances.
  • The visible result agrees with the underlying simulation or platform state, including failure paths.
  • Tests exercise the maintained public interface and retain reproducible fixtures or execution receipts.

Test matrix

  • Move a work area during a job.
  • Resume production after output backpressure.
  • Exercise invalid input, cancellation or interruption, and repeated execution where this interface permits them.
  • Verify determinism/conservation for simulation changes and resource ownership/disposal for platform changes.
  • Run owning-repository lint, relevant type checks and tests. Capture actual native output for native capability claims.

Scope constraints

Implement this behavior as a complete verifiable slice. Do not silently expand into adjacent tickets or substitute simplified gameplay. Keep the shared TypeScript simulation, shared stx signals, and ts-css conventions. Native gameplay and HUD must not depend on a WebView. HomeOS reuse must not introduce a kernel dependency into the game. Existing unrelated edits and authored guidance must be preserved.

Blocked by

Upstream release and adoption

Application behavior belongs here. If a reproduction identifies a framework defect, repair and release its owning source first, update Stacks where affected, then install the verified packages here.

No node_modules edits, copied runtimes, generated-source string patches, fabricated globals, successful no-op implementations, or skipped release gates. Push tested conventional commits as Chris to the owning origin/main without coauthor trailers or force pushes.

Completion evidence

  • Implementation commits and relevant upstream issue links.
  • Exact checks and results, fixture hashes, and screenshots/native execution evidence where applicable.
  • Published package versions, downstream lockfile identity, and release receipts when affected.
  • Remaining limitations stated explicitly. Partial work does not close this issue.
9 days ago

Completed: working-area and production controls

  • work-area moves where harvesting workers look, bounded by the workflow radius; the trip in progress finishes and the next trip goes to the new area.
  • Suspension pauses production without losing the active cycle or inputs; suspended sites withdraw deliveries not yet picked up.
  • Exhausted areas report no-resources, full doorsteps report output-full, and production resumes when either clears.

Tests: a work area moved during a trip; suspension of sites and production; doorstep backpressure and recovery; exhaustion of stone and fish.

Evidence base for this update (all on main, authored as Chris):

  • 3ca4847 deterministic session, rules profile, routing, goods, carriers, construction, production, territory, visibility, saves and replays
  • da2a104 reference building geometry and the delivery livelock fix
  • b2efc1f the browser game on the engine, expanded original-media import
  • 7b1cc36 worlds from decoded original maps
  • a495e7a, 0a3ff46, 0e7889e, e5c1a53, f3b71ce, ed1dc8f controls, missions, render scene, save migration, checkpoints, audit and statistics

Checks: ./buddy lint (0 problems), bun run typecheck (app, tools, stx), ./buddy test --unit (106 tests, 0 failures), bun run assets:verify, bun run content:verify, and the production browser scenario. CI passed on 0e7889e and 9e2ba7c (which contains f3b71ce), including the production Chrome check.

Rule values are the roman-engineering 0.2.0 profile (resources/game/engine/rules.ts). Every value names its evidence class: manual candidates (M) from the pinned manual, reference-remake geometry (E), or placeholders (U) that name their owning issue. qualificationGaps() lists them and the profile cannot qualify a release. Adopting observed original values remains with S3-002/S3-007; nothing here is an original-executable observation.

9 days ago

Reopening for a confirmed browser acceptance gap: the real browser built and staffed a woodcutter, but the building inspector has no control to issue the existing work-area command. The retained reproduction fails at step8 when selecting Set working area. Engine command tests alone did not establish player access to this behavior.

Implementation is in progress in the owning game source: inspector control, keyboard/map targeting and preview through the existing command. Move, cancellation, range rejection and save/load browser acceptance will be retained before main publication. No rule values or original-game observations are being invented.

9 days ago

Browser working-area controls are now on main at https://github.com/stacksjs/the-settlers-iii-remake/commit/bc94c55dd80d232ba3b213842bbad54b27756f8a , authored and committed as Chris without coauthors and integrated by a normal fast-forward push.

The building inspector now displays the actual work-area center/radius and provides Set working area. Map targeting uses the existing work-area command; keyboard players get map focus, arrow/Enter input, area preview and Escape cancellation. Refused distant targets preserve the existing area.

Acceptance: the real browser builds and staffs a woodcutter, moves its area one tile, cancels a change, refuses a distant change, saves/loads and reinspects the building through keyboard input, and pauses/resumes its work. All36 steps pass with zero console/network errors. The existing engine tests still prove active trips finish before retargeting, suspension preserves work, and exhaustion/backpressure and recovery behave as previously documented.

Local full suite:242 pass,0 fail,22,471 assertions, with the original budgets. Three earlier wall-clock timeouts remain recorded; those27 affected tests passed unchanged in isolation and the complete unchanged suite subsequently passed. Lint and app/tools/stx/Buddy types passed, as did the production build.

Exact source CI is green: https://github.com/stacksjs/the-settlers-iii-remake/actions/runs/40166881750 . Main CI is green: https://github.com/stacksjs/the-settlers-iii-remake/actions/runs/40168507478 . The original source CI artifact12588489347 was independently downloaded and verified: SHA25668419c324de5b9912835e806d473bcc819d1b0cc33e6eb311c5935a035ced06b and ZIP CRC passed. Its actual report retains the36 successful steps and unchanged coordinates after cancellation, rejection and restore.

Receipt: https://github.com/stacksjs/the-settlers-iii-remake/blob/bc94c55dd80d232ba3b213842bbad54b27756f8a/docs/roadmap/receipts/browser-working-area-2026-10-24.json . Original numeric qualification remains S3-002/S3-007, as in the previous completion evidence. This closes the reproduced browser access gap, not the Gold Edition release gate. Native and touch acceptance remain separate.

Sign in to comment on this issue.