docs(headless): record K4 resource envelope

This commit is contained in:
Erik 2026-07-27 11:21:44 +02:00
parent 776482da82
commit b2ab0956f2
7 changed files with 208 additions and 97 deletions

View file

@ -1,6 +1,6 @@
# acdream — strategic roadmap
**Status:** Living document. Updated 2026-07-27. **M3 landed; M4 is active.** M3's retail casting/UI, R6 locomotion/collision/projectile/teleport/radar rebaseline, deterministic fresh-login/portal world lifecycle, and final two-client portal observer flow are user-gated. All eight slices of the behavior-preserving ownership campaign in [`docs/architecture/code-structure.md`](../architecture/code-structure.md), their automated closeout, and the user's connected visual matrix are complete. Modern Runtime J3 canonical entity/object lifetime and J4 gameplay-state ownership are closed at `89e6b207`; J5.1 canonical selection/combat/target-mode ownership is closed at `b298f99f`, J5.2 interaction transactions at `f5f7b417`, J5.3 combat/magic intent at `20df9d15`, J5.4 local movement/outbound cadence at `aa3f4a60`, J5.5 per-session physics/remote simulation at `7e6033d0`, J5.6 projectile simulation at `2aee3356`, and J5.7 combined simulation closeout at `cdee7a4b`. J6.1 world-environment ownership is closed at `902076c0`; J6.2 canonical reveal generation and typed destination readiness is closed at `a6860d55` plus `acb845d8`; J6.3 exact F751/Position destination correlation is closed at `6a063a27`; J6.4 exact graphical-host acknowledgement and owner cleanup is closed at `18d17d8b`. J7's one graphical `GameRuntime` root is closed at `ce41efb9`, including the user's 2026-07-27 exact post-cutover visual acceptance. J8 closed Slice J at `a9a822f2` with one shared graphical/no-window root and generation-reset transaction. Slice K Linux headless/multi-session work is active; K0's tested no-presentation Windows/Linux boundary closed at `aada8a37`, K1's real portable single-session host closed at `f8cb840f`, and K2's deterministic scheduler plus complete shared bot command/event path closed at `7e8acb74` plus `38e83640`. K3 closed at `3f340125` after the shared-content/collision/isolation checkpoint, visible-terminal Windows and native Linux production runs, four-stop portal route, external-teleport handling, and user-accepted retail-observer movement. K4 resource and stability work is active; `cb512fd0` adds process-level CPU/memory/GC/descriptor/ownership/scheduler telemetry and corrects both pre-connect deadline arming and the Linux sub-millisecond scheduler busy loop. Issue #225's lifestone/particle alpha comparison remains a separate rendering visual gate.
**Status:** Living document. Updated 2026-07-27. **M3 landed; M4 is active.** M3's retail casting/UI, R6 locomotion/collision/projectile/teleport/radar rebaseline, deterministic fresh-login/portal world lifecycle, and final two-client portal observer flow are user-gated. All eight slices of the behavior-preserving ownership campaign in [`docs/architecture/code-structure.md`](../architecture/code-structure.md), their automated closeout, and the user's connected visual matrix are complete. Modern Runtime J3 canonical entity/object lifetime and J4 gameplay-state ownership are closed at `89e6b207`; J5.1 canonical selection/combat/target-mode ownership is closed at `b298f99f`, J5.2 interaction transactions at `f5f7b417`, J5.3 combat/magic intent at `20df9d15`, J5.4 local movement/outbound cadence at `aa3f4a60`, J5.5 per-session physics/remote simulation at `7e6033d0`, J5.6 projectile simulation at `2aee3356`, and J5.7 combined simulation closeout at `cdee7a4b`. J6.1 world-environment ownership is closed at `902076c0`; J6.2 canonical reveal generation and typed destination readiness is closed at `a6860d55` plus `acb845d8`; J6.3 exact F751/Position destination correlation is closed at `6a063a27`; J6.4 exact graphical-host acknowledgement and owner cleanup is closed at `18d17d8b`. J7's one graphical `GameRuntime` root is closed at `ce41efb9`, including the user's 2026-07-27 exact post-cutover visual acceptance. J8 closed Slice J at `a9a822f2` with one shared graphical/no-window root and generation-reset transaction. Slice K Linux headless/multi-session work is active; K0's tested no-presentation Windows/Linux boundary closed at `aada8a37`, K1's real portable single-session host closed at `f8cb840f`, and K2's deterministic scheduler plus complete shared bot command/event path closed at `7e8acb74` plus `38e83640`. K3 closed at `3f340125` after the shared-content/collision/isolation checkpoint, visible-terminal Windows and native Linux production runs, four-stop portal route, external-teleport handling, and user-accepted retail-observer movement. K4 is implemented through `776482da`: resource telemetry/wait correction, 1/5/10/30-root isolation and two-hour simulated endurance, death/randomized cancellation, and a committed diagnostic-only resource/ownership envelope all pass. The exact `776482da` two-account Rynthid soak is active; graceful terminal convergence is the final Slice-K gate. Issue #225's lifestone/particle alpha comparison remains a separate rendering visual gate.
**Purpose:** One source of truth for where the project is and where it's going. Every observed defect or missing feature has a named phase that owns it; when something looks wrong in-game, look here to find the phase that'll address it. Implementation details live in per-phase specs under `docs/superpowers/specs/`, not in this file.
---
@ -1808,12 +1808,14 @@ port in any phase — no separate listing here.
> event parity closed at `7e8acb74` plus `38e83640`; K3 closed at
> `3f340125` after the shared-content/collision/isolation checkpoint, visible
> Windows and native Linux production runs, exact portal routing, graceful
> teardown, and user-accepted retail-observer movement. K4 is active;
> `cb512fd0` adds one process-level resource/ownership sampling deadline,
> exact scheduler lateness/wakeup accounting, terminal convergence reporting,
> post-connect deadline rebasing, and the Linux sub-millisecond busy-wait
> correction. Windows/native-Ubuntu Headless tests pass 56/56 and the complete
> Release suite passes 8,773 / 5 skips.
> teardown, and user-accepted retail-observer movement. K4 is implemented
> through `776482da`: one process-level resource/ownership sampler, exact
> scheduler lateness/wakeup accounting, deadline/wait correction, 1/5/10/30
> root isolation and two-hour simulated endurance, death/randomized
> cancellation, and a committed numeric envelope. Windows/native-Ubuntu
> Headless tests pass 67/67 and the complete Release suite passes 8,784 / 5
> skips. The exact two-account connected soak is active; graceful terminal
> convergence remains.
> The historical exact cutover
> rollback remains
> `git revert ef1d263337997bb030eadb7b8e71d73dc659907a`. Slice H is complete:
@ -1860,9 +1862,11 @@ hitch and follows.
> no-window Linux host and approximately 30-session target from
> [`2026-07-26-modern-runtime-slice-k.md`](2026-07-26-modern-runtime-slice-k.md);
> Slice L executes the graphical Linux/platform work. K0-K3 are complete and
> K4 is active. Its telemetry/CPU checkpoint is `cb512fd0`; exact fixed-binary
> connected baselines and automated 5/10/30-root endurance gates remain. The
> historical LH rows below remain the stable outcome map.
> K4 is implemented through `776482da`. Its automated 1/5/10/30-root
> isolation, two-hour simulated endurance, death/cancellation, and committed
> resource-envelope gates pass; the exact two-account connected process is
> running inside the envelope and only its graceful terminal convergence
> remains. The historical LH rows below remain the stable outcome map.
The governing architectural rule is that a game session must not be a hidden
`GameWindow`. Authentication, networking, world state, movement, inventory,

View file

@ -303,16 +303,17 @@ residency is `0/0/0` at every stable checkpoint and teardown converges. Slice I
Direct launch, four-stop portal routing, external `teleallto`, retail-client
observer movement, graceful logout, and the corrected normal-position versus
ForcePosition routing pass. Final gates report 412 Runtime, 47 Headless,
3,722 App / 3 skips, and 8,764 complete Release tests / 5 skips. K4
1/5/10/30-session resource-ceiling and stress work is active. Its
`cb512fd0` telemetry checkpoint adds one process-level sampling deadline,
structured CPU/memory/GC/thread/descriptor/socket/ownership/content/
scheduler metrics, exact terminal convergence, post-connect deadline
rebasing, and the Linux sub-millisecond busy-wait correction without adding
per-session workers or timers. Windows and native Ubuntu Headless tests pass
56/56 and the complete Release suite passes 8,773 tests / 5 skips. The
exact-fixed-binary one/two-account baseline and automated 5/10/30-root
endurance gates remain.
3,722 App / 3 skips, and 8,764 complete Release tests / 5 skips. K4 is
implemented through `776482da`: process-level resource telemetry and the
deadline/wait correction (`cb512fd0`), 1/5/10/30-root content/isolation/
portal/reconnect plus two-hour simulated endurance (`97c174fb`), death and
randomized cancellation (`bd236ce5`), and committed diagnostic-only
per-process/per-session ceilings with exact running/terminal ownership
checks (`776482da`). Windows and native Ubuntu Headless tests pass 67/67 and
the complete Release suite passes 8,784 tests / 5 skips. The exact
`776482da` two-account Rynthid soak is active with zero faults and every
sampled resource dimension inside its ceiling; graceful terminal
convergence remains the final Slice-K closeout gate.
Slice-I closeout evidence is
[`../research/2026-07-25-slice-i7-closeout.md`](../research/2026-07-25-slice-i7-closeout.md).
Slice-J2 closeout evidence is

View file

@ -1,6 +1,7 @@
# Modern runtime Slice K — Linux headless and multi-session host
**Status:** K0K3 COMPLETE; K4 ACTIVE 2026-07-27
**Status:** K0K3 COMPLETE; K4 IMPLEMENTED, CONNECTED TERMINAL GATE ACTIVE
2026-07-27
**Parent:** `2026-07-24-modern-runtime-architecture.md`, Slice K
**Authorization:** the user approved Slices FL on 2026-07-24
**Purpose:** run efficient automated clients on Linux without a display, GPU,
@ -341,16 +342,37 @@ disposes only after the final host acknowledgement.
### K4 — 30-session stress and closeout
K4 telemetry checkpoint `cb512fd0` is complete. One process-level
absolute-deadline sampler now reports CPU, private/resident/managed memory,
GC, threads, handles, Linux descriptors/sockets, session/ownership debt,
K4 implementation is complete through `776482da`. One process-level
absolute-deadline sampler reports CPU, private/resident/managed memory, GC,
threads, handles, Linux descriptors/sockets, session/ownership debt,
shared-content leases, scheduler wakeups, and deadline lateness without adding
per-session workers or timers. The first native Linux two-account run exposed
and corrected both pre-connect deadline arming and a sub-millisecond
`Task.Delay` busy loop. Windows and native Ubuntu Headless tests pass 56/56;
the complete Release suite passes 8,773 tests / 5 skips. The user requested
that the active two-client observer process remain running, so the exact fixed-
binary connected baseline and numeric ceilings remain next. Evidence:
`Task.Delay` busy loop.
The automated 1/5/10/30-root gate opens one exact process-content owner,
isolates equal GUIDs, portal/reconnect generations, mutable Runtime/physics
state, and policy faults, and converges every root and content lease. Its
30-root workload advances 480,000 frames per root (two simulated hours),
14.4 million turns total, with recurring movement, use, combat, casting, chat,
portal, death, and reconnect. Five additional 30-root runs cancel at
randomized connect/entry/activity/portal/reconnect/teardown edges.
The committed `k4-linux-30-session` envelope is diagnostic-only. It scales
private/resident memory, managed live/heap memory, CPU, handles, descriptors,
and sockets by configured session count while bounding threads, scheduler
wakeups/catch-ups, and deadline lateness process-wide. It names every
violation and requires exact Runtime/content convergence in the final
`disposed` sample; it never changes simulation, networking, scheduling, or
teardown.
Windows and native Ubuntu Headless tests pass 67/67; the complete Release
suite passes 8,784 tests / 5 skips. The exact `776482da` native Linux process
has both available accounts in-world at Rynthid, zero faults/reconnect debt,
bounded wakeups and CPU, and every sampled dimension inside the committed
ceiling. The user requested that it remain running for observation; its
graceful `disposed` sample is the sole remaining K4/Slice-K closeout gate.
Evidence:
`docs/research/2026-07-27-slice-k4-resource-telemetry-checkpoint.md`.
- Measure a 1-session warm baseline, then 5, 10, and 30 sessions.
@ -443,3 +465,12 @@ git revert b6547ff38c375328417855200f41c8af6436f246
git revert 9569dadb578b299b24e30aec85eee86ec0c2b3fb
git revert 12b500d38362e8aae0a23a4f9712b86367006f76
```
K4 rollback, newest first:
```text
git revert 776482da8225d88a7c6128022d137d26f9266a87
git revert bd236ce553718cfb1248703f4a2b17b35733b11c
git revert 97c174fbb2d72fb94e2fe07448bb257989ed8941
git revert cb512fd0916fbf49285c9b64df1630c5a69a0d20
```

View file

@ -1,13 +1,13 @@
# Slice K4 resource telemetry checkpoint
**Date:** 2026-07-27
**Status:** Instrumentation and CPU-wakeup correction complete; fixed-binary
connected baselines remain active
**Production commit:** `cb512fd0`
**Status:** Implementation and automated gates complete; exact connected
terminal gate active
**Production commits:** `cb512fd0`, `97c174fb`, `bd236ce5`, `776482da`
## Outcome
The Linux headless process now emits one structured resource sample at
The Linux headless process emits one structured resource sample at
startup, every 30 seconds, before scheduler stop, and after terminal disposal.
Sampling is driven by the existing process scheduler's absolute deadline. It
does not add a worker, timer, or callback per session.
@ -36,7 +36,8 @@ One native Linux process connected the two locally available accounts:
- `testaccount2` / `+Horan`
Both entered Rynthid and maintained independent Runtime roots and movement.
The user asked that this process stay running for the retail-observer gate.
The user asked that the current exact `776482da` process stay running for the
retail-observer gate.
The first process sample after both world entries reported:
@ -55,12 +56,20 @@ The first process sample after both world entries reported:
The roughly 29.9 GB mapped-package value is address space, not resident or
private memory. The mmap remains shared and demand-paged.
After movement and additional portal/density activity, the latest recorded
sample before this checkpoint reported 305,393,664 private bytes, 332,742,656
working-set bytes, 139,609,360 managed live bytes, 418 entities, 16 threads,
117 handles, and the same three socket descriptors. Entity count changed from
187 to 418 during that interval, so the memory delta is not treated as a
same-workload per-session ceiling.
The earlier fixed scheduler artifact ran for roughly 16 minutes and plateaued
near 311.8 MiB private / 303.8 MiB resident while entity count rose to roughly
600. Its steady combined two-bot CPU was 2.33.2% of one core, scheduler mean
lateness was about 3.3 ms, and it retained 1517 threads, 115 handles, 116
Linux descriptors, and three sockets. It recorded no session fault or
reconnect debt. That process ended without a terminal sample, so it is soak
evidence rather than the closeout teardown gate.
The current exact `776482da` process entered Rynthid with both accounts and
reported four consecutive passing samples in its first 90 seconds. After
initial hydration, combined CPU was 2.52.9% of one core, waits were
8996/second, turns were 133/second, continuing catch-ups were zero, mean
lateness was about 3.1 ms, and maximum lateness was 145.1 ms. It had zero
faulted or reconnecting sessions and exactly two Runtime/content leases.
## Scheduler finding and correction
@ -86,30 +95,77 @@ its high wait counter belongs to the pre-correction artifact. The committed
correction is protected by deterministic rebase/lateness tests and a real
system-timer test that fails if the scheduler busy-loops between turns.
## Automated gates
## Committed resource envelope
- Windows Headless Release: 56 passed.
- Native Ubuntu Headless Release: 56 passed.
- Complete Windows Release suite: 8,773 passed / 5 skipped.
`776482da` commits the `k4-linux-30-session` numeric profile. For `N`
configured sessions, the principal ceilings are:
| Dimension | Ceiling |
|---|---:|
| private bytes | 224 MiB shared + 64 MiB/session |
| working set | 224 MiB shared + 64 MiB/session |
| managed live bytes | 64 MiB shared + 48 MiB/session |
| managed heap | 64 MiB shared + 48 MiB/session |
| CPU | 2% of one core shared + 3%/session |
| threads | 48 process-wide |
| handles | 128 shared + 3/session |
| Linux descriptors | 128 shared + 3/session |
| sockets | 1 shared + 2/session |
| scheduler waits | 250/second process-wide |
| scheduler catch-ups | 1/second process-wide |
| mean/max lateness | 10/750 ms |
The evaluator fails closed on non-finite metrics, reports named violations,
requires exact running lease/session accounting, and requires all Runtime
roots plus shared content to converge in the `disposed` sample. It is
observational only.
## Automated endurance and adversarial gates
- Content sharing and same-GUID/portal/reconnect isolation run at 1, 5, 10,
and 30 roots.
- The 30-root workload advances 480,000 frames per root: two simulated hours
and 14.4 million stable-order scheduler turns.
- Every root performs recurring movement, use, combat, spell, chat, portal,
death, and reconnect activity.
- Whole-process allocation stays below 384 KiB/second and retained growth
stays below 16 MiB in the deterministic endurance fixture.
- Five 30-root process runs inject randomized cancellation across lifecycle
edges and converge every Runtime root and shared-content lease.
- The resource evaluator covers a passing recorded Rynthid sample, every
individually named resource/ownership debt, terminal success/failure, and
non-finite metrics.
- Windows Headless Release: 67 passed.
- Native Ubuntu Headless Release: 67 passed.
- Runtime Release: 412 passed.
- App Release: 3,722 passed / 3 skipped.
- Complete Windows Release suite: 8,784 passed / 5 skipped.
- Windows and native Ubuntu Release builds complete.
- Diagnostics assert two configured sessions, no password text, and exact
two-runtime terminal convergence.
- Diagnostics assert no credential text and exact 1/5/10/30-root terminal
convergence.
## Remaining K4 gate
The next connected restart must use exact binary `cb512fd0` or a documented
descendant and prove the wait counter remains cadence-bounded, initial
catch-up remains zero, CPU falls accordingly, and terminal resource samples
converge. Available credentials support a two-account connected scale gate.
The 5/10/30-session isolation and endurance dimensions therefore remain
automated in-process gates unless additional local ACE accounts are
provisioned.
The exact `776482da` two-account process is running under the committed
envelope. After the observer window it must receive graceful cancellation and
emit a final `disposed` sample with:
Numeric ceilings are not yet committed: they will be derived only from the
fixed binary under matched 1- and 2-session workloads.
- two converged Runtime roots;
- zero in-world/reconnecting/faulted sessions;
- zero entities, inventory objects, and host leases;
- zero shared-content leases with content disposed/converged;
- `withinCeilings=true`.
Only then does Slice K close. Available credentials support two simultaneous
connected accounts; 5/10/30-session scale and two-hour duration are therefore
proved by the deterministic in-process production-owner fixtures.
## Rollback
```text
git revert cb512fd0
git revert 776482da8225d88a7c6128022d137d26f9266a87
git revert bd236ce553718cfb1248703f4a2b17b35733b11c
git revert 97c174fbb2d72fb94e2fe07448bb257989ed8941
git revert cb512fd0916fbf49285c9b64df1630c5a69a0d20
```