ReviewOS

stacks/the-settlers-iii-remake

[S3-038] Implement territory and pioneer expansion

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

S3-038: Implement territory and pioneer expansion

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

Apply verified ownership and pioneer rules. Validate border placement and movement. Handle isolated land 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

  • Apply verified ownership and pioneer rules.
  • Validate border placement and movement.
  • Handle isolated land 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

  • Expand across constrained terrain.
  • Verify neighboring player ownership conflicts.
  • 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.
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: territory and pioneers (still open)

Military buildings claim unowned land when completed; pioneers equipped with a shovel walk anywhere and claim unowned tiles bordering their owner's land; civilians stay inside their territory; placement requires owned footprint, protected and door tiles. Radii, pioneer timing and capture consequences are unverified, so the issue stays open.

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

Progress in 6dfe659: the large guard tower (5 planks, 5 stone; 3 infantry and 3 bowmen per the reference) claims and holds land like the small tower and castle, and can be captured. The lookout tower (2 planks, 4 stone) extends sight without claiming land, which the tests check. Tower territory radii and sight remain placeholders (buildings.vision, U), so this stays open for verified ownership rules.

8 days ago

Additional direct browser execution evidence: in the fresh economy playthrough, one ordinary carrier equipped a shovel and was sent to the visible western frontier. The chronicle recorded new land claims and the border expanded. A grain farm was then placed in the western clearing, completed and supplied the actual bread chain. No land or goods were injected.

ed19489 also fixes keyboard placement beyond the former 13-tile search cap. In the expanded settlement the control selected a legal farther residence site and ordinary construction completed it, with population rising from 38 to 44. Control receipt.

This confirms the implemented pioneer and building controls in a real browser. Original expansion rates/ranges, capture consequences and complete native acceptance are not established; issue 40 remains open.

Final main CI is successful on exact source ed194896a7128a0f2a4027bde69f558ddd2cbdfb. Independently downloaded the original diagnostics artifact 12596993813 (16,026 bytes), matched GitHub SHA-256 e5d9e7a04ae43f7e33693b52dedb12fac3a258fdc7af4def978433aa15928dad, verified every ZIP CRC, and confirmed all 313 successful browser steps with zero recorded console errors, failed requests or collection errors.

8 days ago

The new specialist-routing policy in 6583568 also prevents automatic pioneer duties from stopping on unreachable border tiles. A public-command regression places a water tile at the frontier, skips it through normal movement checks and claims adjacent land without conservation errors. The receipt records this and the preserved legacy profile behavior. This supports one territory-navigation case; it does not establish original claim radii, timing or all territory-loss rules.

Exact main CI 40193838620 passed. Local acceptance passed 262 unit tests and 22,612 assertions, lint, app/tools/STX types, production build and all 332 browser steps. Downloaded original diagnostics artifact 12599132458 matches GitHub SHA-256 7bd49fa9eca20e6c0b56ddbebf0464725b2bd5cc8991369677f74166fc253fe5, 17,625 bytes, all ZIP CRCs and all 332 browser steps with no recorded console, request or collection errors. The archive contains no media rasters.

This is engineering recovery evidence, not an original Gold executable observation. The issue remains open for its remaining acceptance criteria.

6 days ago

#225 is complete: original player-colored territory posts now follow the pinned reference's current-sight, land-boundary, signed-anchor and background-depth presentation. CI passed 430 unit tests and the full 18-suite browser gate. Independent original-pixel, palette, elevation, occlusion and fog/restore checks are retained in the linked receipt.

This advances presentation only. The original Gold ownership radii and pioneer behavior in this issue still require edition-specific evidence.

Sign in to comment on this issue.