diff --git a/README.md b/README.md index d73c00c..0fb7901 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,9 @@ See [master deployment and Zombies readiness](docs/zombies-readiness.md) for required GitHub checks, local evidence and real-client qualification blockers. +The current [mission matrix](docs/zombies-mission.md), +[client investigation](docs/zombies-client-investigation.md) and independent +[mode-switch review](docs/zombies-mode-review.md) track outstanding delivery work. ```bash ./scripts/deploy-homolog.sh promod diff --git a/docs/zombies-client-investigation.md b/docs/zombies-client-investigation.md new file mode 100644 index 0000000..4d4af8d --- /dev/null +++ b/docs/zombies-client-investigation.md @@ -0,0 +1,110 @@ +# Zombies client investigation — 2026-10-26 + +The mission remains open. No reliable-command correction or successful graphical +gameplay is established by the results below. No homolog or production deployment +was performed. RCON activation remains disabled; see the independent +[mode-switch review](zombies-mode-review.md) and [requirements matrix](zombies-mission.md). + +## Payload and transport baseline + +Measured the original prepared server payload against the previously installed +client payload. All four SHA-256 hashes match the original locked assets: + +| File | Bytes | +| --- | ---: | +| `mod.ff` | 12,033,844 | +| `btd_weapons.iwd` | 307,567 | +| `btd_music.iwd` | 17,789,555 | +| `btd_images.iwd` | 3,070,864 | +| Total | 33,201,830 | + +Canonical shared configuration enables downloads and disables HTTP redirects +(`sv_allowDownload=1`, `sv_wwwDownload=0`). This is configuration evidence, not a +capture of the transport used in the reported remote incident. The music package +accounts for more than half the payload. Neither fact establishes a causal link +between download duration and reliable-command cycling. Actual elapsed clean-client +transfer time and throughput remain unmeasured. + +Private audit: `.state/zombies-payload-audit.json`. Previously installed matching +client assets do not prove that a clean download works. Original files were not +modified, decompiled or published. + +## Fresh local behavioral baseline + +| Check | Result | Qualification limit | +| --- | --- | --- | +| Workspace operations | 22 Python tests plus complete shell deployment mocks passed | Exact-image promotion, mode identity, mount retention and ordinary rollback are mocked; no live transition or crash recovery proof. | +| BTD disposable native process | 53/53 checks passed, including 15 supported maps, restart, canonical precedence, purity and eight headers | Startup and administrative behavior; no zombie combat or graphical connection proof. | +| Promod disposable native process | 53/53 checks passed, including 21 maps, admission, Ready Up, voting, rotation and restart | Uses test-only plugin/synthetic fixtures; no graphical match proof. | +| Native `change_mode` preflight harness | One test passed | Mock command context; no authenticated host bridge or live transition. | +| Native reliable-command/download characterization | Seven scenarios passed independently | Unchanged production functions and real engine types/message writers; transport/FS/gamestate-send are fixtures and ACKs are assigned directly. No ACK-parser, client CGame, throughput or P0 reproduction claim. | + +Private native logs/results are under `.state/zombies-mission-qualification/`. +The executed engine binary SHA-256 is +`7246c1b8d26bcd509160eaf12627e6299072af1655af16005710272b6a0df8e3`. +The sibling engine checkout is feature revision +`57f65e5fb38762c5a6b0d647107c16dc0cdc87b4`, and the configuration checkout is +`a7a13e822074fcb789b4df78cd961199a3995d47` at inspection. These baseline tests do **not** certify a final +protected-master-derived image. Preparation manifests carry different historical +binary hashes; the hash above identifies the binary actually executed. + +A subsequent isolated fetch resolved configuration master to +`8fc7c3d16e52e76750e8f3604847b8e01abd18b9`. All five runtime CFGs under `shared/`, +`modes/promod/` and `modes/zombies/` are byte-identical to the tested catalog. +Per-file hashes are recorded privately in +`.state/zombies-mission-qualification/config-master-comparison.json`. This closes +catalog-byte provenance only; it does not qualify the engine or final image. + +No coverage percentage was measured. Critical paths still uncovered include +clean-client download/reconnect, reliable-command retention through loading, +real combat/waves/multiplayer/completion, authenticated switching, actual +cross-mode rollback and crash recovery. + +The new native characterization uses fresh engine master +`cb0f0f489d3323de968ea426ea19ba7862c50db8`. It covers retransmission until ACK, +preservation of sent commands during compaction, bounded overflow without ACK, +recovery-message tail preservation, download/command-ring isolation, download +backpressure/shared budget and post-download gamestate-refresh invocation. +Independent review found no critical or high findings. No protocol buffer, +validation rule or runtime behavior was changed. These are characterization tests, +not a regression test for the reported client failure, whose reproduction remains +outstanding. + +## Real-client reproduction suspended by operator + +Steam AppId 7940 and Proton Experimental are available on the Arch Linux host. +Created an isolated game/profile/Proton prefix and disposable loopback Zombies +server on port 28979 under `.state/client-p0/`; the existing user profile and +running services are not test targets. Installed CoD4x patches identify client +21.1, with a 21.2 update notice; no update was applied. This version difference is +an observation, not a compatibility diagnosis. + +The isolated client initialized but exited before a verified connection attempt; +the reliable-command error was not reproduced. Startup UI/rendering and input +targeting remain unresolved. A black window capture or a live Proton process is +insufficient connection evidence. The operator subsequently instructed the agents +to stop opening CoD4 MP and continue other work. No further graphical launches or +inputs are authorized by this investigation. Preserve the baseline and obtain +real reproduction evidence before any protocol correction. + +## Public client source findings + +Read-only inspection of official public client revision +`17182c7bf04b859dea5c0db4acdb0b83c28d6dd2` establishes that: + +- The [parser](https://github.com/callofduty4x/CoD4x_Client_pub/blob/17182c7bf04b859dea5c0db4acdb0b83c28d6dd2/src/cl_main.c#L7235) + advances the received command sequence and stores commands in a 128-slot ring. +- The [outbound acknowledgement](https://github.com/callofduty4x/CoD4x_Client_pub/blob/17182c7bf04b859dea5c0db4acdb0b83c28d6dd2/src/cl_main.c#L4285) + reports that parsed sequence; the CGame execution loop maintains a separate sequence. +- The [reported error check](https://github.com/callofduty4x/CoD4x_Client_pub/blob/17182c7bf04b859dea5c0db4acdb0b83c28d6dd2/src/cl_main.c#L9124) + fires when the requested command is at least 128 behind the parsed sequence. + The error alone therefore does not establish packet loss. +- The [gamestate parser](https://github.com/callofduty4x/CoD4x_Client_pub/blob/17182c7bf04b859dea5c0db4acdb0b83c28d6dd2/src/cl_main.c#L8289) + sets a received baseline. An existing commented execution-sequence bypass warns + of mod compatibility breakage; it is not an acceptable demonstrated correction. + +This revision identifies itself as client 21.8, whereas the isolated installed +client reported 21.1; no 21.1 tag was available in this checkout. Do not equate +their implementations. The evidence supports testing execution lag during loading, +but establishes neither the incident's trigger nor compatibility of a proposed fix. +No client binary or protected vendor asset was decompiled. diff --git a/docs/zombies-mission.md b/docs/zombies-mission.md new file mode 100644 index 0000000..3bd71bb --- /dev/null +++ b/docs/zombies-mission.md @@ -0,0 +1,84 @@ +# Zombies delivery decisions and acceptance evidence + +Reconciled 2026-10-26. This document tracks the current operator mission; older +readiness reports remain historical test evidence. A test result from a previous +artifact does not qualify a new artifact or prove graphical client gameplay. + +## Source and ownership + +Protected `master` is authoritative in all three repositories. Work uses focused +branches, Conventional Commits, required GitHub checks and independent review. +The operator alone authorizes merge, homolog deployment, production deployment, +credential access and destructive operations. No production or Bard changes are +authorized by the mission. + +| Repository | Ownership | Reconciled evidence | +| --- | --- | --- | +| `ghptc/cod4x-server` | Native engine/protocol, original-asset preparation, engine integration tests | [#16](https://github.com/ghptc/cod4x-server/pull/16), [#18](https://github.com/ghptc/cod4x-server/pull/18) | +| `ghptc/cod4-config-server` | Canonical shared/mode CFG contract, supported rotation and policy | [#8](https://github.com/ghptc/cod4-config-server/pull/8), [#9](https://github.com/ghptc/cod4-config-server/pull/9) | +| `ghptc/ec2-workspace` | Local exact-source build, deployment transaction, artifact approval, adaptation, health and rollback | [#9](https://github.com/ghptc/ec2-workspace/pull/9), [#12](https://github.com/ghptc/ec2-workspace/pull/12) | + +GitHub PR inspection confirms workspace #12, engine #18 and configuration #9 +merged on 2026-10-26 at 20:32:56Z, 20:32:23Z and 20:32:33Z respectively. Their +reported merge commits are `e827fe75a82254fbb11eaa977709df4a4d246705`, +`cb0f0f489d3323de968ea426ea19ba7862c50db8` and +`382f7e5b6430fc01483b37dbd25325f8c88faeb3`. These record merge events; fetch +current masters before implementation/building. The earlier unmerged wording and source +tips in [zombies-readiness.md](zombies-readiness.md) predate those events. +Repository issue searches returned no issues; the linked PRs carry the available +implementation history. Retrieved discussions for workspace #12, engine #16 and +configuration #8 contained no comments, so no separate accepted review suggestion +is inferred from those discussions. + +## Decision log + +| ID | Status | Decision and source | +| --- | --- | --- | +| D01 | Operator requirement | Preserve master-based deployment, mandatory CI, homolog approval, exact-image production promotion and rollback. No automatic merges or deployments. Current mission and workspace #12. | +| D02 | Rejected architecture | GitHub Releases, dedicated runners, VMs and new deployment infrastructure are excluded. Release architecture/migration documents and `docs/releases/retired/` are historical proposals, never active requirements. Current mission and workspace #12. | +| D03 | Implemented, gameplay unqualified | Preserve original BTD Alpha 001 fastfile, three IWDs and notices with locked integrity checks; no decompilation, replacement AI or Promod/Bot Warfare transformations. Engine #16, workspace #9/#12. | +| D04 | Implemented | Apply canonical shared defaults, private CFGs, then canonical mode rules and native rotation; mode owns purity, gametype, rotation and AI policy. Configuration #9 and workspace #8/#12. | +| D05 | Qualification boundary | Startup, getstatus, loaded maps, synthetic admission and CS_ACTIVE do not establish zombie combat or clean-client compatibility. Current mission and readiness evidence. | +| D06 | Activation disabled pending proof | RCON mode preflight is not a host transition. Existing single-live-homolog approval and per-checkout lock cannot silently become a multi-artifact, host-wide authorization mechanism. README switching design and workspace #9. | +| D07 | Required future behavior | Allow only authenticated, elevated requests for prequalified `promod`/`zombies` exact images; reuse the existing transaction and return pending until health succeeds. No shell input, Docker privileges, runtime build/download or early success. Current mission. | +| D08 | P0 investigation constraint | Reproduce the reliable-command error using the real Arch Steam/Proton client before changing protocol behavior; measure slow downloads separately and establish causality. Buffer enlargement and validation weakening without evidence are excluded. Current mission. | + +The bounded host Unix socket in the README is a **proposal**, not an adopted +transport requirement. Host identity, authenticated ingress, crash recovery, +multi-mode qualification and actual cross-mode rollback still require design and +behavioral proof. Preserve the original single-image approval semantics until a +reviewed extension proves the requested guarantees. + +## Traceable requirements matrix + +Status below is the recovered baseline, not a claim that this mission has passed. +Prior results and artifact identities are in [zombies-readiness.md](zombies-readiness.md). + +| ID / priority | Acceptance criterion | Required evidence | Baseline / owner | +| --- | --- | --- | --- | +| C01 / P0 | Reproduce actual `CL_CGameNeedsServerCommand` failure | Clean Arch Steam/Proton client version, server/artifact IDs, client/server logs, command sequence/ack trace and reproduction steps | Operator reports failure; reproduction pending. Engine + quality. | +| C02 / P0 | Diagnose download duration and relation to command loss | Exact requested files/bytes, transport, redirect behavior, elapsed duration and throughput; compare long download and cached reconnect | Payload measured: 33,201,830 bytes; canonical HTTP disabled. Real transfer/timing and causality pending. Engine + quality. | +| C03 / P0 | Smallest verified correction, clean client connects | Behavioral regression reproduces old failure, passes correction; real clean client downloads, loads assets and joins | Pending. Engine + reviewer. | +| G01 / P1 | Original assets and supported maps remain intact | Locked original bytes, eight headers, original notices, 15 supported maps with correct `war`/purity | Fresh 53/53 native baseline checks and matching payload hashes; final image and gameplay unqualified. Gameplay + quality. | +| G02 / P1 | Human can survive, shoot/kill zombies and receive damage | Real-client session with timestamped observations/video/log evidence tied to exact artifact | Unqualified. Gameplay + quality. | +| G03 / P1 | Waves, weapons/ammunition, pickups, respawn, multiplayer, completion and transitions work | Real-client acceptance record for each behavior, including multiple clients and supported-map transitions | Unqualified. Gameplay + quality. | +| T01 / all | Meaningful unit/native/config/container/protocol tests | Executed behavioral regression results; actual measured coverage and explicit uncovered critical paths | Prior engine/config/operations suites exist; no coverage percentage established. Quality. | +| T02 / all | Preserve Promod | Fresh artifact regression for admission, Ready Up, voting, rotation, purity and restart; real-client limits disclosed | Fresh 53/53 native baseline checks over 21 maps; final master-derived image and graphical match not established. Quality. | +| S01 / P2 | Strict allowlist, elevated authenticated ingress and isolation | Tests deny untrusted/GSC/system/unauthorized/malformed requests; no arbitrary shell, Docker socket, credentials or builds in game container | Preflight only; activation disabled. Deployment + engine + reviewer. | +| S02 / P2 | Safe transition and truthful reporting | Host lock, durable operation state, pending ID, disconnect/reconnect, exact image/mount/rootfs validation and target health before active status | Not implemented/qualified. Deployment + quality. | +| S03 / P2 | Rollback/recovery and qualification | Failed health restores exact previous qualified artifact/config and verifies health; interrupted transition recovers; concurrent requests serialize | Ordinary mock rollback exists; actual cross-mode/crash recovery unqualified. Deployment + quality. | +| D01 / delivery | Exact master homolog command and successful homolog Zombies | `./scripts/deploy-homolog.sh zombies`, separately authorized rollout, health and real-client gameplay tied to exact image | Prepare-only command previously passed; live mission homolog not established. Deployment. | +| R01 / delivery | Independent review and mandatory CI | Reviewer distinct from implementer, resolved critical findings, required checks on final PR heads, operator merge approval | Existing required checks documented; new changes require fresh review/CI. Reviewer + all. | +| R02 / delivery | Final report | PRs/commits, exact artifacts, test logs/evidence, uncovered paths and remaining risks without fabricated gameplay | Pending. Context architect. | + +Supported BTD map IDs: `mp_convoy`, `mp_bloc`, `mp_bog`, `mp_broadcast`, +`mp_countdown`, `mp_crash`, `mp_creek`, `mp_crossfire`, `mp_farm`, `mp_overgrown`, +`mp_pipeline`, `mp_showdown`, `mp_strike`, `mp_vacant`, `mp_cargoship`. Original +author exclusions for District and Killhouse remain authoritative. + +Known regressions retained as context: stale string-latch restoration (engine +`33e62e1`), stale private mode CFG precedence (workspace #8), read-only updater +startup stall (workspace #7 and engine #11), persistent home-path rejection +(workspace #5), reused stale Promod overlay causing Ready Up failure, and short +vote cooldown bounds (engine #15). Do not conflate these corrected historical +defects with the unproven reliable-command root cause. diff --git a/docs/zombies-mode-review.md b/docs/zombies-mode-review.md new file mode 100644 index 0000000..bc80f77 --- /dev/null +++ b/docs/zombies-mode-review.md @@ -0,0 +1,59 @@ +# Independent review: mode-switch activation boundary + +Reviewed 2026-10-26 against the current operator mission. Reviewer authored no +engine/configuration/deployment implementation. This assessment covers existing +source, not approval of a future switch implementation or certification of live +services. No deployment, credential access or service mutation was performed. + +Source references below are pinned to workspace +`e827fe75a82254fbb11eaa977709df4a4d246705` at +`/home/gabriel/Projects/ec2-workspace` and engine +`57f65e5fb38762c5a6b0d647107c16dc0cdc87b4` at +`/home/gabriel/Projects/cod4x-server`. The inspected implementation files had no +working-tree changes. These are inspected source identities, not a claim that +the sibling engine feature checkout is the current protected master. Line +references apply to these exact sources. + +The current engine `change_mode` command is safely inert. In +`cod4x-server/src/sv_cmds.c:2378–2417`, status reads only `fs_game`; every valid +requested identifier returns `unavailable` and `Runtime unchanged`. It invokes no +IPC, shell, filesystem writer or deployment action. Registration at line 2428 and +the handler's own power check at line 2386 require power 100. Input validation +bounds identifiers to 32 lowercase alphanumeric/hyphen characters beginning with +a letter. No exploitable critical finding was identified in this nonmutating +handler. Activation must remain disabled. + +## Blockers before activation + +| Finding | Evidence | Required resolution | +| --- | --- | --- | +| Critical: power 100 alone does not prove authenticated ingress | Engine `src/cmd.c:1389–1394` resets the default identity to power 100, `System/Rcon`; UDP RCON calls the generic executor at `src/sv_main.c:1544`. GSC `execex` invokes that executor at `src/scr_vm_functions.c:1640`; `exec` queues console text at line 1659. | A nonforgeable authenticated-origin scope, independent of numeric power, must guard submission and be cleared/restored on all exits. Exercise unauthenticated, insufficient-power, system and GSC paths behaviorally. | +| Critical: existing approval cannot authorize a two-mode round trip | Workspace `scripts/common.sh:318–324` reads one `.state/approved` record and rejects another mode; lines 154–156 additionally require that exact image currently running in homolog. Homolog approval overwrites that single record at lines 182–186. | A reviewed qualification extension is needed for both immutable artifacts. Preserve the present production authorization rule until that extension is approved and tested; do not copy/rename approvals to bypass it. | +| Critical: direct reuse of interactive deployment entrypoint violates request constraints | `scripts/common.sh:336–341` fetches/builds for homolog; line 170 saves/loads images; lines 164 and 183 prompt interactively. `scripts/game-mode.sh:8` delegates directly to `deploy`. | Reuse validated transaction operations through a host-owned, fixed-environment path restricted to already-local qualified exact images. No fetch, build, download, image transfer or general shell API on RCON requests. | +| Critical: serialization and crash recovery do not cover a host controller | Lock at `scripts/common.sh:334–335` is rooted in one checkout. Rollback JSON at line 168 and immediate rollback at lines 173–180 have no durable phase journal/recovery protocol. | Host-wide locking; durable restricted operation records before mutation; interrupted-operation recovery; deny further activation when recovery fails. Test across callers/process restart. | +| High: current health is narrower than switch acceptance | `scripts/common.sh:84–103` checks running/healthy state, UDP status, filesystem mode, gametype and purity; line 171 checks image identity. It does not certify retained mounts, actual read-only root, map readiness or real gameplay. | Verify runtime isolation and target readiness for each transition; prequalify combat separately. Report pending until verified, and verify exact prior image/configuration health on rollback. | +| Critical qualification gate: target gameplay and reconnect lack evidence | Existing readiness report explicitly excludes clean-client pure/download compatibility, zombie combat/waves and real cross-mode rollback. | Complete P0/P1 real-client evidence and transition/reconnect/rollback tests before activation. A catalog entry or successful getstatus is insufficient. | + +The deployment system can support further local engineering and isolated tests, +but **cannot safely activate automatic switching with its current single-live- +homolog approval semantics**. A bounded host Unix socket remains a proposal; +this review does not prescribe new deployment infrastructure or grant approval +to install a host controller. Preserve Promod production and keep the current +unavailable response until the blockers are resolved. + +## Test and evidence limits + +Executed the existing production-handler harness via +`python3 -m unittest discover -s ../cod4x-server/tests -p test_change_mode.py`: +one test passed, covering elevated permission, status, malformed input and +unavailable targets. Its initial sandbox execution was blocked with `SIGSYS`; +the approved run outside the sandbox passed. This is a native 32-bit handler +test with mocked command context, not proof of ingress authentication, a running +host bridge, container transition or gameplay. No coverage percentage is claimed. + +Documentation reconciliation checked PR merge metadata against GitHub and source +ownership against code. Historical readiness test results were not rerun for +this review. Live master protection/rulesets were **not reverified** here; the +readiness report's required-check tables describe its earlier audit. The mission +matrix is context tracking authored by this reviewer and is not presented as an +independent approval of that document. diff --git a/docs/zombies-readiness.md b/docs/zombies-readiness.md index aba7ed4..12f1efd 100644 --- a/docs/zombies-readiness.md +++ b/docs/zombies-readiness.md @@ -1,15 +1,18 @@ # Master deployment and Zombies readiness — 2026-10-26 -The restoration is proposed in [workspace PR #12](https://github.com/ghptc/ec2-workspace/pull/12), +The restoration was delivered in [workspace PR #12](https://github.com/ghptc/ec2-workspace/pull/12), [engine PR #18](https://github.com/ghptc/cod4x-server/pull/18), and [configuration PR #9](https://github.com/ghptc/cod4-config-server/pull/9). -They require owner review and manual merge. Nothing was deployed or merged. -Production, homolog, Bard, EC2, existing private mounts and approval/rollback -records were not changed. +GitHub inspection during the subsequent mission confirms all three merged on +2026-10-26 at 20:32Z. The test evidence below describes the earlier preparation +task, which performed no deployment or merge and changed no production, homolog, +Bard, EC2, existing private mounts or approval/rollback records. See the current +[mission decisions and acceptance matrix](zombies-mission.md); these historical +tests do not qualify the reported real-client connection failure or gameplay. ## Source reconciliation and deployment -Fetched protected master in all three repositories: +Protected masters inspected during the earlier preparation task: | Repository | Master inspected | | --- | --- | @@ -32,7 +35,7 @@ explicitly `none`; its asset-lock provenance is the original BTD dependency lock The unused release source, workflow and tests were moved byte-for-byte into `docs/releases/retired/`, preserving evidence. Version arguments are rejected. The manual workspace release-publication workflow was also disabled on GitHub -while the archival PR awaits review. No releases, Apps, self-hosted runners, +before the archival PR merged. No releases, Apps, self-hosted runners, registries, VMs or additional runtime infrastructure were created. ## Required CI and effective protection @@ -63,7 +66,8 @@ The required hosted checks passed: The final hosted engine job uses the existing linked native harness runners and installs multilib/native NASM without a redundant foreign-architecture index. -Check each PR's latest head before merging; documentation follow-ups rerun CI. +These are historical check results; verify required checks on each new PR's final +head before merging. ## Actual local evidence @@ -104,8 +108,8 @@ are rejected by the original mod; synthetic admission does not complete real client asset/message acknowledgments. No workaround changes the original mod. The original wave AI is preserved, but its combat behavior is not certified. -Before supervised deployment: review and manually merge the three follow-up PRs -with their required checks green; fetch workspace master; supply authorized local +The three follow-up PRs have merged. Before supervised deployment, fetch current +protected masters and supply authorized local BTD inputs and headers and the existing pinned builder/runtime images. Retain the existing runtime's private mount/argv contract; conflicting capacity, unsupported startup maps/commands or artifact-shadowing mounts fail closed and require review,