<feed xmlns='http://www.w3.org/2005/Atom'>
<title>fparkan/crates/fparkan-runtime/src/laboratory.rs, branch trunk</title>
<subtitle>Utilities and tools for the game "Parkan: Iron Strategy".
</subtitle>
<id>https://git.popov.link/fparkan/atom?h=trunk</id>
<link rel='self' href='https://git.popov.link/fparkan/atom?h=trunk'/>
<link rel='alternate' type='text/html' href='https://git.popov.link/fparkan/'/>
<updated>2026-11-25T19:08:00+00:00</updated>
<entry>
<title>fix(research): advance laboratory Control energy budgets</title>
<updated>2026-11-25T19:08:00+00:00</updated>
<author>
<name>Valentin Popov</name>
<email>valentin@popov.link</email>
</author>
<published>2026-11-25T19:08:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.popov.link/fparkan/commit/?id=9e5a8867d1a12a66772e6e97c3a0213f9636d56c'/>
<id>urn:sha1:9e5a8867d1a12a66772e6e97c3a0213f9636d56c</id>
<content type='text'>
Paid laboratory work read a work-device coefficient that never received a
Control budget update. Run the recovered resource clock and budget for
laboratories as well as factories, so energy work follows the actual device
allocation. Generalize the state and report counters to control_resource_*.

A licensed outage regression drains the lab reserve and removes external
power: energy work stays fixed while task time advances, then resumes when
the original generation is restored. Stock research for both AI clans,
player free research and paid factory production still pass.

The original laboratory task reaches its class-3 Control owner, whose native
budget runs on the same quarter-second resource path as the factory. Verified
this in the running stock mission through Behavior 0x2f76e and Control 0x2d340.
Workspace fmt/check/tests and release build pass. All 29 stock missions run
900 seconds without script or resource-budget stops. A stock mission-28
window completes paid technologies and starts subsequent projects. Control
initial phase, RNG seed, other owners and global ordering remain approximate.
</content>
</entry>
<entry>
<title>fix(research): update laboratories on the native Behavior timer</title>
<updated>2026-11-25T14:57:03+00:00</updated>
<author>
<name>Valentin Popov</name>
<email>valentin@popov.link</email>
</author>
<published>2026-11-25T14:57:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.popov.link/fparkan/commit/?id=f0e3a84cf5c0d7a0edd890c303299306c513ba8b'/>
<id>urn:sha1:f0e3a84cf5c0d7a0edd890c303299306c513ba8b</id>
<content type='text'>
Active laboratory work now uses the owner task timer instead of consuming
and clearing its ore buffer on every host frame. The native 1/1 timer waits
for a clock strictly beyond its deadline, draws one Behavior RNG value, and
reschedules 64..127 ms from the observed clock. Resource distributors reuse
the same deadline arithmetic with their existing 3/1 parameters.

Behavior.dll 0x4c550 calls verify deadlines, equality, late calls and RNG
state. The original laboratory was sampled through 20 bounded debugger
hits; its caller uses the owner +0x930 timer initialized at 0x398f. A second
native task fixture uses the original ore getter/setter and confirms that
the buffer really is cleared, ruling out the host callback interpretation.

Workspace fmt/check/tests, the licensed stock research chain, all 29
missions at 900 seconds and a live Vulkan window check pass. The active-only
clock still reports script_lab_clock_approx: idle owner phases and full
native event/RNG ordering remain open. Factory selection 69 and query 65
still need Control prototype metadata. This does not close G7.
</content>
</entry>
<entry>
<title>fix(ai): refresh research projects before laboratory orders</title>
<updated>2026-11-25T14:31:38+00:00</updated>
<author>
<name>Valentin Popov</name>
<email>valentin@popov.link</email>
</author>
<published>2026-11-25T14:31:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.popov.link/fparkan/commit/?id=cd67d44101faf180e2f2891e897d0215689fd706'/>
<id>urn:sha1:cd67d44101faf180e2f2891e897d0215689fd706</id>
<content type='text'>
AI laboratories now move beyond their first DAT project. Handler 41 refreshes
the clan catalog from its current technology table before dispatching the
selected project, including when the eventual laboratory order is rejected.

The original ai.dll wrapper at 0xd4a3 calls the chooser at 0xd524 before
0x11100. A native wrapper fixture observes the catalog scan-state transition
for a completed candidate. The stock Single.02 regression keeps each active
request queued and checks that both clans learn later projects and publish
the free descendants to construction and production.

Workspace fmt/check/tests, the licensed stock regression, all 29 stock
missions at 900 seconds and the Vulkan window check pass. Factory selection
parameter 69, candidate metadata query 65 and matching window/report AI
chronology remain open. This does not close G7.
</content>
</entry>
<entry>
<title>feat(research): unlock dependent and zero-cost technologies</title>
<updated>2026-11-25T14:21:40+00:00</updated>
<author>
<name>Valentin Popov</name>
<email>valentin@popov.link</email>
</author>
<published>2026-11-25T14:21:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.popov.link/fparkan/commit/?id=a09bc5526cb8f5a38099c5c0bc2b6bb4b47ddfda'/>
<id>urn:sha1:a09bc5526cb8f5a38099c5c0bc2b6bb4b47ddfda</id>
<content type='text'>
Apply MisLoad's enabled/available/learned flag transitions after laboratory
completion. Scan every enabled unavailable row against all prerequisites,
then follow Behavior's ordered zero-cost child completion. Publish learned
descendants to construction and production and replace the unlock stub with
per-clan availability counters.

Direct calls to original MisLoad.dll 0x2c10 and Behavior.dll 0x23aa0 confirm
flag preservation, disabled prerequisites, positive/negative cost exclusion,
and free child recursion. Licensed table checks cover the stock first AI
project and a project with two automatic child technologies. The first stock
AI project opens no additional rows in either implementation.

Workspace fmt/check/tests, licensed laboratory regression, 29 stock missions
at 900 seconds and a stock Vulkan window check pass. This removes the
completion coverage gap needed by the next research-policy task; it does not
establish full project chaining or live AI chronology. Handlers 65/69 remain
explicit stubs.
</content>
</entry>
<entry>
<title>feat(ai): execute laboratory research from clan scripts</title>
<updated>2026-11-25T14:06:07+00:00</updated>
<author>
<name>Valentin Popov</name>
<email>valentin@popov.link</email>
</author>
<published>2026-11-25T14:06:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.popov.link/fparkan/commit/?id=bef4fbab7701a51945ed93357babe12b416bb9a8'/>
<id>urn:sha1:bef4fbab7701a51945ed93357babe12b416bb9a8</id>
<content type='text'>
Clan laboratories accept the selected DAT project, request power and ore,
accumulate native research progress, and publish learned technologies to
construction and production. Research requests wait for the live laboratory;
newly built objects are no longer mistaken for destroyed targets.

Behavior.dll task 0x2f730 was called with paid and free work under x87 0x007f.
The stock Single.02 regression checks both completed technologies and keeps
the request pending while the laboratory is busy. Workspace fmt/check/tests,
the 29-mission 900-second corpus, and the Vulkan window check pass.

Dependent availability and free child propagation remain explicit
script_research_unlock_stub counters; candidate properties 65 and policy 69
remain open. This does not close G7 or establish live AI chronology parity.
</content>
</entry>
</feed>
