ReviewOS

stacks/the-settlers-iii-remake

[S3-033] Implement construction suspension and demolition

#35
Open chris opened this 8 days ago ·
8 days ago

S3-033: Implement construction suspension and demolition

Parent and ownership

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

Problem and observable result

Pause and resume actual work. Apply verified cancellation and refund behavior. Release workers and reservations consistently.

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

Ordered commands advance an integer-tick world. Goods have locations and reservations, people have identities and jobs, and a player view renders only actual simulation state.

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

  • Pause and resume actual work.
  • Apply verified cancellation and refund behavior.
  • Release workers and reservations consistently.
  • 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

  • Demolish sites in each construction phase.
  • Assert no duplicated refunds or stranded jobs.
  • 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.
3 days ago

Interface step landed in 0c2f535: Tear down now opens a named confirmation (focus contained, Escape/backdrop/cancel restore focus, stale targets refuse) before the command runs; real production-browser regression tests/browser/demolition-dialog.ts passes at 1280x720, 812x375 and 320x568. Closes #226. The remaining acceptance (verified cancellation and refund rules for unfinished sites) still needs original-game observation evidence, so this issue stays open.

18 hours ago

Implemented and pushed in db1029e as Chris, without coauthors. Engineering profile 0.16.0 fixes both reachable specialist dispatch and suspended construction programs; frozen 0.15.0 retains digest f9f2adad01804a09836577c6732a1b79e9c79ea7c02327a40b00a076117bd912 and its previous save/replay behavior.

Validation: all 482 unit tests / 85,739 assertions passed, lint has zero errors or warnings, app/tools/STX types pass, frozen installation is unchanged, all asset/content checks pass, and the final production build passes. Real Chrome passed 58 campaign steps, 19 construction/production/accounting/save steps and 26 home/demo/registration steps. Campaign and production diagnostics contain no console, request or collection errors.

The retained source and execution receipt records failing reproductions, source hashes, rules identities and check results. Hosted CI will have its own run evidence.

The linked narrow defects are #230 and #231. Original Gold numeric behavior and parent-issue fidelity criteria remain unverified; this does not complete #35 or #40.

17 hours ago

Exact-source CI 41387680636 passed on db1029ed444d0dbc35be01f003aae83eff43f540, including all 482 unit tests and the complete 22-suite production browser matrix. The same source successfully deployed in production run 41387712090, with the public smoke gate passing and rollback skipped.

Downloaded original diagnostic artifact 13116529620 and independently verified GitHub SHA-256 dc8db14580ae704ff59c1da278575af34a985f82fec0051d40162a1f462d6a98, all 45,955 archive bytes and every ZIP CRC. Read back all 22 diagnostic suites, including nested multi-viewport reports: all 1015 browser steps succeeded, all recorded process exits were zero, and no available console-error, failed-request or collection-error arrays contained entries. Original-media rasters were not included in the artifact.

This completes the narrow engineering corrections #230 and #231. Parent #35/#40 and complete native/Gold qualification remain open.

8 days ago

Progress: suspension and demolition (still open)

Implemented and tested: suspension pauses construction and production without losing work, and withdraws unpicked deliveries; demolition in every phase (levelling, delivering, building, active) releases workers, jobs and reservations, puts stored and delivered goods on the ground, and recovers half of the construction materials, recorded as recovered in the ledger without duplication (tests/unit/engine-economy.test.ts).

Open because the half refund is a manual candidate, and the refund for unfinished sites and the treatment of in-flight goods are engineering choices awaiting observation (S3-002).

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.

8 days ago

Additional browser execution evidence is retained in the fresh production/recruitment playthrough receipt. Native clicks and keys demolished a coal mine with no deposit, allowing its buffered food to reach a working iron mine. Later demolition refunds from completed workshops supplied the stone for a replacement barracks, which received the produced sword and recruited a persistent swordsman. No state injection or extra resources were used.

This is direct browser evidence for normal demolition recovery and subsequent carrier use in the current engineering profile. The half refund remains a manual candidate; this playthrough is not an original-executable observation and does not settle unfinished-site or in-flight original-game rules. Issue 35 stays open.

Sign in to comment on this issue.