Skip to content

Batch 35 · R1a run lifetime implementation

Checkpoint update, 2026-10-26: implementation committed separately as 59ca1d6e at the owner's request. Documentation/evidence is kept in a separate commit; no push. The validation account below records the pre-commit work. Follow the per-batch commit workflow.

2026-10-26. First runtime implementation after documentation checkpoint dd0a666b, on dev-0.9.0-bootloader. Scope follows the reviewed R1a slice. No existing C# script, scene/prefab/SO, package or project setting is changed in the final candidate. No commit or push was made. Implementation and this documentation/evidence update are separate file groups for the owner's separate-commit rule.

Implemented boundary

RunContext supplies a unique immutable RunId and cancellation token. IRunParticipant specifies prepare/activate/release. RunLifetime copies and validates ordered participants, awaits real preparation, admits activation once, cancels before joining, releases entered participants in reverse order and retains explicit failures. Duplicate/re-entrant preparation and stop requests share owned tasks. Stop during activation prevents later activations. New work is rejected after stop; retry uses a new instance/identity.

Cancellation closes admission immediately but does not declare pending work safely released. A participant ignoring cancellation remains visible through PendingParticipantId until it completes. Cancellation callbacks can complete work inline; cleanup waits until cancellation dispatch returns. Partial preparation/activation failures and multiple release/cancellation-callback errors remain observable. Public lifecycle operations reject calls from a foreign thread. Lifecycle phases do not replace gameplay pause/reward/death state.

The runtime core uses ordinary C# without Unity scene objects, static game services, save/network calls, GameEvents or Time mutations. Existing production code/assets have no reference to the new classes. This is a verified foundation awaiting integration, not a gameplay fix, working shared scene, player/input/AbilityHolder rebuild or completed F0.

Executed verification

Matching Unity 6000.2.8f1 Editor, direct -batchmode -nographics invocation of TinyChaos.EditorTools.RunLifecycleChecks.RunBatch35, no -quit; runner owns exit and a 60-second post-entry watchdog. No Play Mode, gameplay MonoBehaviours, scene load, player build or external gameplay-service call. Authoritative process/session completed with exit 0; summary 9 passed / 0 failed.

Group Actual result
L01 PASS: invalid lists/IDs/duplicate instances rejected without participant calls; caller list mutation cannot replace copied participants; same context throughout.
L02 PASS: first/last held tasks delay readiness and later preparation; explicit activation and reverse release order verified.
L03 PASS: duplicate and re-entrant prepare/start/stop share ownership; stopping inside prepare or activation prevents subsequent work/Running.
L04 PASS: stop before preparation and at each of three preparation boundaries; immediate token cancellation, deferred release, late completion safety, cooperative inline cancellation and shared stop.
L05 PASS: synchronous throw, faulted task, null prepare task, partial activation throw and foreign/unrequested cancellation preserve failure and roll back entered participants.
L06 PASS: repeated/re-entrant joins stay pending during owned work/release; multiple release failures and a throwing cancellation callback remain visible without skipping cleanup.
L07 PASS: a non-cooperative pending task keeps StopAsync pending with the correct owner; later completion cannot start the next participant or reach Ready.
L08 PASS: three distinct lifetime identities; old late completion/activation cannot change another lifetime's phase, token or effect log.
L09 PASS: runtime assembly separation, imported script identity and absence of Unity scene-object inheritance; all public lifecycle commands reject a worker-thread caller without changing state. External source/asset/hash isolation checks also pass.

Raw local Editor log: /tmp/tinychaos-batch35-editor.log; redirected process output: /tmp/tinychaos-batch35-stdout.log. They remain private temporary diagnostics, not commit artifacts. These paths are local evidence, not a portable test result archive. The retained checks reproduce the scenarios in a future invocation.

Compilation emitted existing-category warnings: CS8785 from AttributeBasedFieldGenerator (two emitted occurrences) and CS0252 in the unchanged StabilizationChecks.cs reference comparison (three emitted occurrences, with duplicated/shortened log text). No compiler error or failed check was observed. This is not a warning-free build or IL2CPP/player verification; no unrelated generator/test cleanup was attempted.

Preservation and source manifest

Before edits/Editor launch, captured raw bytes/hashes for 2,819 project source/data/settings/package files and 8,160 files in the inspected Unity/profile roots. Backups: /tmp/tinychaos-batch35-preserve-838ee18f60/; private manifests also stay outside Git. All 2,819 preexisting project files and 608 gameplay pins match afterward. Existing audio deletions, generated Linux metadata and repository HEAD are preserved.

Unity inserted only the Linux toolchain dependency into manifest/lock; after exit both generated versions were archived and the exact pre-run bytes restored. Engine preferences changed three keys; the generated version was retained privately and original bytes restored. The captured normal Tiny Chaos profile contains one existing file, unchanged. No game save/config writes or new profile files were observed. Five other existing external engine bookkeeping files changed (UPM/licensing/audit logs, metrics database, license file); they were retained as engine state. Do not claim the entire Unity profile tree was unchanged.

Four new C# files and five Editor-generated metadata files are the exact implementation addition set. All new metadata GUIDs are unique across Assets; no existing GUID is replaced. Trailing spaces in the new metadata's empty fields were trimmed after import, with parsed YAML/GUID equality checked; existing metadata was not reformatted. The initial 227-script inventory keeps its original metrics; four explicitly batch-35-reviewed rows bring path coverage to 231 scripts, without refreshing or upgrading the old review-depth claims.

Added implementation path Kind SHA-256
Assets/Script/External/Editor/RunLifecycleChecks.cs Editor checks 4f4c01d9857517be6c700d4fb3bf0d469e5cd3524291f977d6f3a27b28d6467b
Assets/Script/External/Editor/RunLifecycleChecks.cs.meta metadata f885fc5424eb33d0c24b990ed38d1a0bf6f3b39c30f88fa867400cd74576b807
Assets/Script/Game/GameSystem/Run.meta metadata 9b4e8ef41846854bcc57ab4b2397a913c7e9318bf49465a4560280e06d2fd142
Assets/Script/Game/GameSystem/Run/IRunParticipant.cs runtime source b33012346f784f62f532643c3d94041d7625c206949797abce3bdf39da171a3b
Assets/Script/Game/GameSystem/Run/IRunParticipant.cs.meta metadata 0403a344b41ad393ff786e865ab76ab5af1872577630244bd02e9dfa6b4e7eaa
Assets/Script/Game/GameSystem/Run/RunContext.cs runtime source 8c4a02c4d4835eb2b84907e659917c183ce34cf972f51702aa95dead8a7fbb89
Assets/Script/Game/GameSystem/Run/RunContext.cs.meta metadata 9a507bd506d3cf46f2e6fc2ffbbee9a3ce5e2177ce717a280d6b069803b97eac
Assets/Script/Game/GameSystem/Run/RunLifetime.cs runtime source 5bbadac71ca13675e528e904468e085dc548589f635e0484e9f50d8e4ddcdf6d
Assets/Script/Game/GameSystem/Run/RunLifetime.cs.meta metadata 66d55ac5773bfb237bdf9588f569c07c0981a56edaf590805c38d706bdebf0c6

Static verification also passes: all 608 prior gameplay pins, exact nine-file source/meta manifest and original project bytes; unique GUIDs; 231-script path coverage with all 227 original inventory rows preserved; all 27 later follow-ups still open; 53 issue IDs routed once; 657 local documentation links and whitespace. Temporary isolated Git-index reviews verify separate implementation (9 files) and documentation/evidence groups without staging anything in the real index or advancing HEAD.

Next and commit boundary

R1a is complete for this slice. F0 remains incomplete. R1b is the next bounded batch: review its exact scene/host/binding/Editor-entry manifest, then integrate the same lifetime owner into the shared gameplay scene and an isolated development launch. Verify missing-binding rejection, repeated direct load/cancel/reload and production dependency isolation. Keep production build settings, catalogs, normal profiles and online submissions out of the development composition. Real player/roster/Input System work follows at R2; no dummy player or second gameplay loop.

Keep the nine implementation files above separate from documentation, inventory, gate/status and result updates when committing. The planning checkpoint is dd0a666b; this implementation is now committed as 59ca1d6e, with evidence separate. Dedicated GAME-01 work, Tutorial completion and unrelated features remain deferred. No full-game stability, existing gameplay fix, controller/save migration or release readiness is claimed.