[Phase 1.1] Clean Out Template Junk Crates & Scaffold chaotic_core + chaotic_ingestor #2

Closed
opened 2026-11-17 06:12:06 +00:00 by john4064 · 1 comment
Owner

Goal

Remove unused template crates (crates/game-protocol, crates/game-backend) and legacy MOBA backend/deploy wiring, and scaffold crates/chaotic_core + crates/chaotic_ingestor cleanly.

Acceptance Criteria

  • Delete crates/game-protocol, crates/game-backend, deploy/Dockerfile.backend, and .forgejo/workflows/db_migration.yml (rebuilding backend/DB clean in Phase 3).
  • Update Cargo.toml, scripts/quality_gate.sh, scripts/ci_detect_targets.sh, scripts/docs_gen.py, scripts/bug_hunter.py, deploy/docker-compose.yml, and .forgejo/workflows/ci.yml so no stale game-protocol / game-backend references remain.
  • Create crates/chaotic_core as 100% pure Rust (#![forbid(unsafe_code)], zero Bevy rendering/windowing/socket dependencies).
  • Create crates/chaotic_ingestor CLI crate depending on chaotic_core.
  • All local gates (./scripts/quality_gate.sh --offline, ./scripts/security_gate.sh, ./scripts/docs_gen.sh --check) pass.
## Goal Remove unused template crates (`crates/game-protocol`, `crates/game-backend`) and legacy MOBA backend/deploy wiring, and scaffold `crates/chaotic_core` + `crates/chaotic_ingestor` cleanly. ## Acceptance Criteria - [x] Delete `crates/game-protocol`, `crates/game-backend`, `deploy/Dockerfile.backend`, and `.forgejo/workflows/db_migration.yml` (rebuilding backend/DB clean in Phase 3). - [x] Update `Cargo.toml`, `scripts/quality_gate.sh`, `scripts/ci_detect_targets.sh`, `scripts/docs_gen.py`, `scripts/bug_hunter.py`, `deploy/docker-compose.yml`, and `.forgejo/workflows/ci.yml` so no stale `game-protocol` / `game-backend` references remain. - [x] Create `crates/chaotic_core` as 100% pure Rust (`#![forbid(unsafe_code)]`, zero Bevy rendering/windowing/socket dependencies). - [x] Create `crates/chaotic_ingestor` CLI crate depending on `chaotic_core`. - [x] All local gates (`./scripts/quality_gate.sh --offline`, `./scripts/security_gate.sh`, `./scripts/docs_gen.sh --check`) pass.
Author
Owner

Completed [Phase 1.1] Clean Out Template Junk Crates & Scaffold chaotic_core + chaotic_ingestor.

Summary of Changes

  • Removed obsolete template crates & legacy backend wiring:
    • Deleted crates/game-protocol/, crates/game-backend/, deploy/Dockerfile.backend, and .forgejo/workflows/db_migration.yml.
  • Scaffolded Pure-Rust Core & CLI Ingestor:
    • Created crates/chaotic_core (#! [forbid(unsafe_code)], serde derive only, zero Bevy/render/winit/UI/network dependencies) with CHAOTIC_CORE_VERSION and foundational CardSet, Tribe, Discipline, and Element enums + unit tests.
    • Created crates/chaotic_ingestor (#![forbid(unsafe_code)], depends on chaotic_core, serde, serde_json) CLI skeleton supporting --help and --verify-all <PATH> + unit tests.
    • Updated root Cargo.toml workspace members and [dependencies].
  • Reconciled CI, Gates, Scripts & Docs:
    • Updated scripts/quality_gate.sh (--backend), scripts/ci_detect_targets.sh (+ self-tests), scripts/docs_gen.py, .forgejo/workflows/ci.yml, deploy/docker-compose.yml, GETTING_STARTED.md, and ARCHITECTURE_PLAN.md.
    • Regenerated CycloneDX SBOM (deploy/moba-sbom.cdx.json) and generated docs (docs/generated/*).

Verification Results

  • cargo fmt --all -> exit 0
  • cargo test --workspace --offline -> exit 0 (chaotic_core: 3 passed; chaotic_ingestor: 3 passed; game-client: 2 passed, 1 nightly soak ignored)
  • cargo run --offline -p chaotic_ingestor -- --help & --verify-all crates/chaotic_core -> exit 0
  • python3 scripts/generate_sbom.py -> exit 0 (471 components)
  • ./scripts/docs_gen.sh & ./scripts/docs_gen.sh --check -> exit 0
  • ./scripts/ci_detect_targets.sh --self-test -> exit 0 (all cases passed)
  • ./scripts/quality_gate.sh --backend --offline -> exit 0
  • ./scripts/quality_gate.sh --offline -> exit 0
  • ./scripts/security_gate.sh -> exit 0 (0 leaks, 12 scripts shellcheck OK, 1 Dockerfile hadolint OK, 6 workflows actionlint OK, cargo-deny OK, security_audit.py 0 critical issues)
Completed **[Phase 1.1] Clean Out Template Junk Crates & Scaffold `chaotic_core` + `chaotic_ingestor`**. ### Summary of Changes - **Removed obsolete template crates & legacy backend wiring:** - Deleted `crates/game-protocol/`, `crates/game-backend/`, `deploy/Dockerfile.backend`, and `.forgejo/workflows/db_migration.yml`. - **Scaffolded Pure-Rust Core & CLI Ingestor:** - Created `crates/chaotic_core` (`#! [forbid(unsafe_code)]`, `serde` derive only, zero Bevy/render/winit/UI/network dependencies) with `CHAOTIC_CORE_VERSION` and foundational `CardSet`, `Tribe`, `Discipline`, and `Element` enums + unit tests. - Created `crates/chaotic_ingestor` (`#![forbid(unsafe_code)]`, depends on `chaotic_core`, `serde`, `serde_json`) CLI skeleton supporting `--help` and `--verify-all <PATH>` + unit tests. - Updated root `Cargo.toml` workspace members and `[dependencies]`. - **Reconciled CI, Gates, Scripts & Docs:** - Updated `scripts/quality_gate.sh` (`--backend`), `scripts/ci_detect_targets.sh` (+ self-tests), `scripts/docs_gen.py`, `.forgejo/workflows/ci.yml`, `deploy/docker-compose.yml`, `GETTING_STARTED.md`, and `ARCHITECTURE_PLAN.md`. - Regenerated CycloneDX SBOM (`deploy/moba-sbom.cdx.json`) and generated docs (`docs/generated/*`). ### Verification Results - `cargo fmt --all` -> exit 0 - `cargo test --workspace --offline` -> exit 0 (`chaotic_core`: 3 passed; `chaotic_ingestor`: 3 passed; `game-client`: 2 passed, 1 nightly soak ignored) - `cargo run --offline -p chaotic_ingestor -- --help` & `--verify-all crates/chaotic_core` -> exit 0 - `python3 scripts/generate_sbom.py` -> exit 0 (471 components) - `./scripts/docs_gen.sh` & `./scripts/docs_gen.sh --check` -> exit 0 - `./scripts/ci_detect_targets.sh --self-test` -> exit 0 (all cases passed) - `./scripts/quality_gate.sh --backend --offline` -> exit 0 - `./scripts/quality_gate.sh --offline` -> exit 0 - `./scripts/security_gate.sh` -> exit 0 (0 leaks, 12 scripts shellcheck OK, 1 Dockerfile hadolint OK, 6 workflows actionlint OK, cargo-deny OK, security_audit.py 0 critical issues)
Sign in to join this conversation.
No description provided.