19 KiB
phase, plan, subsystem, tags, requires, provides, affects, tech-stack, key-files, key-decisions, patterns-established, requirements-completed, requirements-acceptance, coverage, actuals, plan_head_before, plan_head_after, duration, started, completed, status
| phase | plan | subsystem | tags | requires | provides | affects | tech-stack | key-files | key-decisions | patterns-established | requirements-completed | requirements-acceptance | coverage | actuals | plan_head_before | plan_head_after | duration | started | completed | status | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 01-reproducible-fidelity-baseline | 04 | testing |
|
|
|
|
|
|
|
|
|
OPEN: assigned observation contribution only. Shared requirements remain Pending; actual original-DxWnd/native Linux/native Windows comparison acceptance remains 0/120. |
|
|
e815534895 |
ea4dc9b5df |
16 min | 2026-11-13T04:04:37Z | 2026-11-13 | complete |
Phase 01 Plan 04: Passive Port Observation Summary
Bounded JSONL observations preserve requested input, the real accepted-input gate, control changes and retained scene identity without changing player ownership or movement.
Performance
- Two tasks, five production/test files, four measured task commits. Started 04:04:37 UTC; final production verification/commit completed about 04:20 UTC, 2026-11-13.
- Final focused verification: 23 managed checks, 7 Python process/interoperability tests in 19.126 seconds. The tracer passed 10 managed/four process checks and repeated its automated gate before expansion.
- Protected projects: Movement 28, Director 23, Checkpoint 4, BodyOwnership 3 actual passing groups. Existing projects without aggregate totals were additionally captured and counted from their executed PASS lines in
artifacts/fidelity/verification/01-04-protected.jsonand per-project logs. - Debug build and isolated self-contained Linux x64 Release publish succeed. The existing NU1900 warning concerns unavailable NuGet vulnerability metadata; no package was added or installed. All 539 original hashes match.
Accomplishments
FidelityObservationis allocated once beside the outer presentation lifetime and passed throughRun. A uniquelaunch_id/clock_id, one Stopwatch and increasing sequence survive actual continuations. Simulation ticks remain explicitly separate and can reset at scene entry. Fresh observer instances get independent launch clocks even if a caller mistakenly repeats its declared session ID.- The ordinary application input seam records the constructed
PlayerInputand the actualplayerBinding.Stepreturn, or the existing direct simulation path. It copies post-step root, Euler, velocity, grounded/mode, retained-order flag and controller/body/effect counters. No recovered gameplay algorithm, orientation/reset policy, callback getter, actor admission or solver changed. Disabled observation allocates no observer or additional asset lookup; snapshots execute only through the optional observer path. - SDL events are labeled raw before routing; only applicable keyboard/mouse union fields are copied. Requested input, returned gate and post-step control owner remain distinct. Script activity/control snapshots surround existing director calls. Explicit skip methods include startup/fixture, debug menu and actual SDL key paths; a playing-to-stopped boundary during the normal director step is identified as
natural_director_step, without elapsed-time guesses. - Scene composition records its actual entry path and retained-player/RETURN facts. Published continuations record departure source/destination and RETURN status; each following entry links the actual
departure_sequence. The real existing fixture emits LV1B → VR04 → LV1B, retains one session/category/clock, and records two paired departures. This proves observer wiring through ordinary composition using fixture-owned setup; it is not ordinary-route acceptance. - Output failure disables recording, retains an incomplete summary/stderr diagnostic and permits the existing game calls to continue. The managed failure regression compares 120 actual
LabSimulationsteps with failed observation versus off, including exact root/Euler/velocity and controller/body/effect counts. On/off headless and native SDL fixtures additionally preserve the existing locked body/fire/energy, first-neutral/300-idle assertions and held-input restoration.
Task Commits
- Task 01-04-01 RED:
773c228— specify passive port input observation. - Task 01-04-01 GREEN:
72523ee— observe accepted input with bounded passive output. - Task 01-04-02 RED:
6bccd47— require retained session and dialogue observation. - Task 01-04-02 GREEN:
ea4dc9b— preserve observer identity through control and scene changes.
Normal hooks ran, scoped staging preserved tools.yaml, and no tracked files were deleted. Main commits use the authorized configuration; the integrating primary owns push and root continuity reports.
Files and Interfaces
src/GamePort/Application/FidelityObservation.cs: optionalFromArguments/Create,RecordInput,RecordControl,RecordTransition,RecordSceneEntry,RecordRawEvent,RecordState,CompleteandDispose. It holds copied diagnostic values and output ownership only.src/GamePort/Program.cs: optional CLI flags, one outer observer and post-owner/input/control/continuation seams. Skip and director-step wrappers preserve the original call and surrounding order. Existing helper-internal fixture steps remain outside this trace.- Standalone
tests/GamePort.FidelityObservationTestslinks focused observer plus existing assets/game sources, uses net10.0 and adds no packages. Its 23 Linux checks cover disabled operation, IDs/clocks, requested/rejected/accepted neutral input, ownership/ticks, bounds, write/flush/disposal failure, duplicate/unsafe output, real simulation parity and retained/fresh sequencing. Two symlink checks are Linux-specific; this run is not native Windows validation. tests/test_fidelity_observation.py: seven actual-port subprocess checks, hashed receipt interoperability, rejected fixture promotion/missing output, retained composition, explicit skip semantics and exact four-image/state equivalence. It builds current source before launching the actual DLL; if generated fixture resources are absent, it uses the existing local preparation command because the consolidated script runs Python before its own extraction step.
Example diagnostic invocation, with a new output directory:
source scripts/env.sh
dotnet run -- --fidelity-output artifacts/fidelity/new-session \
--fidelity-session unique-launch-session --fidelity-case fresh-natural-ordinary
IDs accept 1–128 safe alphanumeric/dot/underscore/hyphen characters. The output directory is caller-selected and need not live in a checkout: standalone package checkpoint results and local transfer folders work. Known original/source asset roots and Git metadata cannot overlap output in either direction. Protected asset aliases are resolved; output symlink ancestry and existing directories/files are rejected. A cooperative exclusive sibling reservation and CreateNew owned files prevent session reuse. Hostile concurrent filesystem replacement is outside this cooperative local model.
events.jsonl schema 1 fields are session_id, case_id, evidence_kind, unique launch_id, clock_id, increasing sequence, elapsed_seconds, separate simulation_tick, name, scene, method and immutable data. Names include input_step, player_state, raw_sdl_event, control_observation, dialogue_start, dialogue_end, dialogue_skip, scene_departure and scene_entry. Dialogue markers describe observed director script activity and explicit action paths, not inferred per-utterance audio timing. accepted_input copies the request only when the existing gate returned true; it does not assert that each input field dispatched an action. Independent body/fire work can continue when that gate is false.
observation-summary.json records UTC start/end, elapsed/clock identities, count/bytes, limits, completion/failure and overhead scope. It begins incomplete, remains incomplete after abort/error/bounds/disposal without completion, and is atomically updated after successful flush. A write failure never asks gameplay to retry, reset or step. If even the summary cannot be written, stderr explicitly reports that failure; a reserved prior incomplete summary is never promoted.
The writer uses a 64 Ki-character StreamWriter buffer, no growing record queue, at most 250000 records / 512 MiB, and normalized UTF-8 LF output. These bounds can truncate long diagnostic sessions explicitly. observer_seconds measures serialization/write attempts only; caller snapshots, control comparisons, final flush and summary work are excluded, and this limitation is in provenance. No trace is represented as a clean, zero-overhead audiovisual run.
These are observer records, not shared receipt objects. The later collector must identify actual artifacts and map actual media clocks with uncertainty. Tests build an explicitly bounded port_fixture receipt from the trace interval, hash the actual trace, and validate it through the existing schema-1 receipt contract without changing that shared module. They do not invent a video/audio clock or promote native acceptance.
Native Linux Evidence and Limits
Final evidence: artifacts/fidelity/verification/01-04-native-1794543576213164551/comparison.json, on/off port.log, eight retained PPM files and the actual observation directory. Both native SDL/Vulkan runs use a private Xvfb X11 display on NVIDIA GeForce GTX 1070, enabled validation, 32 frames and zero Vulkan validation errors. The existing injected Carl control fixture is muted; both runs exit 0. All four corresponding readbacks are byte-identical:
| Readback | SHA-256 |
|---|---|
| locked-start | f0d76654f1196534da20b7cf9a39c5e58931acb7f0aa22d349e87dad6ce176a2 |
| locked-fall | f0819d2dd9a43ff17b339be2bb3b487c3a94c4683e951015f38cd9b4f7c12e38 |
| returned | 642e15ad552c1c5819f41faf7b1bcbb9106462a26b6786753dd2f87f90cf4229 |
| final | e0e71f3c7f187149fc1b5b9d8c7fb7ff694f5ae3f27275a20948543a4f55fdfa |
The final observed run records 88 records / 65308 bytes, 1.6721105 session seconds and 0.0365354 measured serialization/write seconds. Whole process durations are 1.5783 seconds off and 1.8555 seconds on; a single ordered pair is not an overhead benchmark. Actual Debug DLL SHA-256 is 778a1827d22c5359216c546b1841cea20fffca6a4bece2266a58057c8d24a348, 776704 bytes. The report retains the actual pre-commit source identity: HEAD 6bccd47, dirty true, diff SHA-256 83eac9c22938f1f8d01200027e2fa3aefbe4ba123a9c58dc7bb6a7d9ce5ac33d, plus unrelated preserved tools.yaml identity. Task GREEN commits that tested source; no clean-runtime claim is inferred from the later commit.
Exact state assertions and readbacks preserve the existing TSK first-story ordering correction, grounded neutral return, heading and legitimate source landing behavior. The fixture's deliberate preparatory calls remain fixture setup, not a newly invented reset. Full original playback, physical input/audio, ordinary full-route play, native Windows and broader platform compatibility remain unverified by this plan. Actual matrix acceptance remains OPEN 0/120. Plan 01-06 owns native full-route capture; Windows/original collection and review remain later work.
TDD Gate Compliance
- Task 1:
artifacts/fidelity/tdd/01-04-01-red.jsoncontains the actual complete unittest report. The real port help succeeded but the named target failed its intended missing--fidelity-outputassertion. Classifier result:RED_EVIDENCE_OK; semantic inspection confirms a planned behavior assertion rather than build/import/setup failure. The tracer's exact focused checks were repeated before expansion. - Task 2:
artifacts/fidelity/tdd/01-04-02-red.jsoncontains the actual complete report. The existing real RETURN fixture succeeded, then the named target failed[] != ['LV1B', 'VR04', 'LV1B']because scene-entry observations were absent. Classifier result:RED_EVIDENCE_OK; semantic inspection confirms the intended sequencing assertion executed. Final 23 managed/seven process checks pass. - Both RED commits precede their GREEN by ancestry. No separate refactor was required. No skipped/todo tests or unrun planned automated checks remain.
Deviations from Plan
No architectural or gameplay scope change. Two bounded correctness adjustments remain within the planned application/test boundary:
- [Rule 2 — protected output] Resolve source asset aliases and protect the checkout's known authoritative sibling even when
--assetspoints to a generated copy. Otherwise lexical overlap alone could miss the original boundary. Managed source/output alias negatives pass;ea4dc9b. - [Rule 3 — fixture preconditions] Process tests build the current actual port and prepare missing generated resources through the existing extractor. The consolidated script schedules Python before its normal preparation/build steps; assuming prior generated files would make a clean test environment fail. No shared script or extractor was modified;
ea4dc9b.
Threat/Test Coverage
| Threat | Controls and actual verification |
|---|---|
| T-01-10 | New exclusive contained output, protected resolved asset/Git boundaries, symlink/reuse negatives, immutable values only; exact 120-step failed-writer parity and headless/native four-readback equivalence |
| T-01-11 | Fixed buffering, record/byte caps, incomplete initial/failure summaries, flush/disposal failure handling; managed bounds and exception regressions |
| T-01-12 | Distinct raw/requested/gate/post-step owner fields, actual director action methods, unique launch clock, ordered retained entries/departures, persistent fixture classification; process and shared-validator negatives |
| T-01-SC | Existing .NET framework/runtime, Python stdlib and already-installed native tools only; no added packages, services or downloads |
The new filesystem surface is exactly the plan's runtime-observation/local-output boundary; no additional network/auth/gameplay trust surface was introduced. Stub scan found only intentional optional/absent fields and test-only empty receipt identities, not unfinished implementation or UI mock data.
Issues Encountered
The sandboxed first native-display attempt reported no video device. Authorized local-test escalation with explicit X11 on private Xvfb succeeded; both attempts remain in ignored diagnostics. A second -o passed to scripts/build-linux.sh was rejected by the .NET CLI, so the equivalent publish invocation used an isolated output to preserve existing dist/ packages:
source scripts/env.sh
dotnet publish GamePort.csproj -c Release -r linux-x64 --self-contained true \
--no-restore -o artifacts/fidelity/verification/01-04-linux-publish
python3 tools/recon/inventory.py ../Original --verify docs/original-manifest.json
Both commands pass on final code. Existing packaged runtime outputs were not replaced. NU1900 remains a pre-existing offline audit warning, not an observer failure. No new original-binary investigation, REA claim, Wine result or native Windows execution occurred.
User Setup Required
None for these local checks. The later combined original/native recording and human audiovisual review session remains open; this plan creates no premature hands-on request.
Next Phase Readiness
Plans 01-05/01-06 can launch the optional observer into a new checkpoint result directory and consume its honest trace/summary while binding actual package/artifact/media provenance separately. The primary owns root progress/tasks/decisions/compatibility integration, broader wave checks and push. Shared EVID-02/EVID-04 remain Pending until all owning plans and actual acceptance conditions close.
Self-Check: PASSED
All created files exist; all four task commits are ancestors of HEAD and evaluation-scope resolves them on this branch. Exact counted observer commands, positive protected groups, Debug/isolated Linux publish, final native state/four-readback equality and 539 original hashes pass. Native JSONL byte count matches the summary's actual file size. No tracked deletions, skipped tests, implementation stubs or unexplained generated untracked files were introduced; unrelated tools.yaml is preserved.