Skip to content

feat(v1.21): complete Full-Spectrum Blackout scenario - #7

Merged
Sekai6 merged 4 commits into
mainfrom
feature/v1.21-full-spectrum-blackout
Aug 5, 2026
Merged

feat(v1.21): complete Full-Spectrum Blackout scenario#7
Sekai6 merged 4 commits into
mainfrom
feature/v1.21-full-spectrum-blackout

Conversation

@Artistkisa

@Artistkisa Artistkisa commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

Completes the v1.21 Full-Spectrum Blackout: Polar Night Link Loss scenario and the reusable scenario infrastructure behind it.

This is a 15–18 minute Norwegian Sea / Barents Sea joint engagement set around 1988. Extreme solar activity progressively degrades long-range communications and navigation, forcing both sides to continue with local sensors, last valid orders, lost-comms doctrine, and incomplete tactical pictures.

What changed

  • Expanded the JSON + TypeScript scenario platform with validation, normalization, compilation, migration, import/export preview, deterministic seeding, user copies, objectives, sessions, and a legacy scenario adapter.
  • Completed the polar-night blackout order of battle: Long Beach, CG-57, E-2C, F-14 CAP, A-6E strike aircraft, Project 1164, Tu-126, six Tu-16K bombers, and four MiG-29 escorts.
  • Added seeded red-force deployment inside an intelligence uncertainty region instead of exposing fixed enemy truth in the briefing.
  • Added spatial space-weather effects, geomagnetic disturbance zones, intermittent communications windows, gradual Link 11 / Soviet C2 degradation, queued report delivery, and progressive track fusion during recovery.
  • Preserved platform-local OODA and weapon authority. CG-57 SAM engagements continue through organic sensing, engagement assignment, fire-control channels, magazine accounting, physical MK 41 cells, launch animation, and fly-out.
  • Added mission objectives, three-level scenario guidance, clickable focus actions, inactivity observation suggestions, a theater briefing map, intelligence dossier, scenario import preview, and an upgraded tactical radar panel.
  • Added AAR and Tacview observability for space-weather phases, lost-comms doctrine, information sources, autonomous decisions, missile link loss, track conflicts, communication windows, and recovery.
  • Added conflict-track fusion throttling so the larger bomber formation does not flood AAR with repeated updates.
  • Added polar-twilight environment presets, weather front and snow effects, aurora intensity control, night subject fill, and quality-parity checks so graphics settings do not alter simulation mechanics.
  • Added the authored dynamic score Silent Meridian plus the five-minute original theme Across the Silent Band, including generation scripts, manifests, audio QA, and first-visit score enable/volume fixes.

Local verification

Passed locally, strictly serial with one Chromium renderer:

  • Production TypeScript/Vite build
  • Documentation links: 73 documents / 189 local links
  • Scenario schema, runtime, objectives, guidance, import preview, and legacy compatibility
  • Guidance UI, dossier, theater map, tactical radar, default dynamic-score loading, and short app smoke
  • Space-weather timeline and spatial propagation behavior
  • Blackout phases, lost-comms autonomy, decision/AAR audit, communication windows, and quality parity
  • F-14/Phoenix CAP interception
  • Tu-16K/KSR-5 strike-corridor release
  • CG-57 physical MK 41 engagements against aircraft and incoming missiles
  • Track-conflict fusion/throttling
  • Full-duration run through T+1080 and recovery
  • Theme and dynamic-layer audio QA

GitHub CI is intentionally limited to build, documentation/whitespace checks, and a short application load/frame smoke. The full 18-minute combat-mechanism suite remains a local validation workload.

Notes

  • This PR does not merge or publish v1.21 by itself.
  • Built-in scenarios remain read-only; imported/copied scenarios are data-only and cannot execute code or load external resources.

Summary by Sourcery

Complete a new data-driven scenario system and integrate the v1.21 Full-Spectrum Blackout scenario into the NTU Intercept runtime, including space-weather-driven communications, lost-comms doctrines, guidance UI, and dynamic score audio.

New Features:

  • Introduce a JSON-based scenario platform with validation, compilation, sessions, objectives, guidance, import/export, and a legacy sandbox adapter.
  • Add the v1.21 Full-Spectrum Blackout data-driven scenario, including blue and red orders of battle, threat waves, routes, and space-weather timeline.
  • Implement an in-app scenario selector with sandbox/custom mode, built-in/user scenarios, and scenario import/export preview.
  • Add a scenario guidance runtime and rich UI with briefing, dossier, cues, focus actions, and runtime HUD integration.
  • Introduce dynamic score and theme-track runtimes, including original Silent Meridian layers and Across the Silent Band theme with QA tooling.

Bug Fixes:

  • Prevent previously applied space-weather snapshots from leaking between scenario runs in the air combat system.
  • Ensure air radar and ECM behavior respects local weather factors and lost-comms doctrine, avoiding incorrect detection or guidance states.
  • Avoid Link 11 network-track flooding and stale conflicts by adding deferred queues, throttled fusion, and proper clearing on disconnect.
  • Fix AEW and Soviet C2 networks to respect space-weather propagation, including delay, quality, and drop behavior.
  • Align ECM usage and seeker behavior with target ECM state instead of always assuming jamming is active.

Enhancements:

  • Extend air combat runtime to support scenario routes, launch zones, initial loadouts, radar/ECM states, and lost-comms autonomy.
  • Improve fleet scene integration with scenario-driven routes, local weather-aware sensors, space-weather-aware Link 11, and conflict-track fusion AAR throttling.
  • Enhance high-quality environment and ocean rendering with lighting presets, polar twilight support, weather fronts, aurora control, and night subject fill lighting.
  • Expand AAR and Tacview export to include decision audits, space-weather telemetry, missile midcourse link states, and fleet/air decision context.
  • Refine Soviet C2 diagnostics and logging by centralizing observability and integrating space-weather-aware propagation.

Build:

  • Add multiple verification scripts for scenario system, space-weather, lost-comms, blackout runtime, conflict fusion, theme audio QA, and related visual/air validations.
  • Bump application version to v1.21.0 and update README with v1.21 scenario-platform documentation.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @Artistkisa, your pull request is larger than the review limit of 150000 diff characters

@sourcery-ai

sourcery-ai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Reviewer's Guide

Implements the v1.21 Full-Spectrum Blackout scenario and reusable scenario system, adding data-driven scenarios with import/export, space-weather and lost-comms runtimes, richer radar and guidance UI, dynamic score and theme audio, and extensive AAR/Tacview observability for the blackout engagement.

File-Level Changes

Change Details Files
Add data-driven scenario system with compilation, validation, import/export, and runtime control of forces, objectives, guidance, and space weather.
  • Introduce ScenarioDocument schema, validator, normalizer, migration stubs, and catalog of built-in scenarios including the Full-Spectrum Blackout JSON scenario.
  • Add ScenarioCompiler to produce naval forces, surface-platform spawns, air spawns, routes, initial states, and a retimed space-weather timeline from JSON.
  • Implement ScenarioRuntime, ScenarioObjectiveRuntime, ScenarioSession, and guidance runtime/UI wiring to drive objectives, guidance cues, and deterministic seeding for scenarios.
src/scenario-system/types.ts
src/scenario-system/validator.ts
src/scenario-system/normalizer.ts
src/scenario-system/migration.ts
src/scenario-system/compiler.ts
src/scenario-system/runtime.ts
src/scenario-system/objective-runtime.ts
src/scenario-system/session.ts
src/scenario-system/catalog.ts
src/scenario-system/reference-catalogs.ts
src/scenario-system/import-export.ts
src/scenarios/full-spectrum-blackout/scenario.json
src/scenarios/legacy-adapters/default-surface-defense.ts
scripts/verify-scenario-system.mjs
scripts/verify-scenario-runtime.mjs
scripts/verify-scenario-import-preview.mjs
scripts/verify-scenario-seeded-deployment.mjs
docs/zh/SCENARIO_SYSTEM.md
Extend main sandbox UI to load scenarios, manage scenario sessions, guidance, objectives, and dynamic score/theme audio while keeping legacy sandbox paths working.
  • Add scenario selector, import/copy/export controls, and a modal import preview with validation summary and user scenario options.
  • Wire ScenarioRuntime, ScenarioGuidanceRuntime/UI, ScenarioSession, LostCommsRuntime, ObjectiveRuntime, and DynamicScoreRuntime/ThemeTrackRuntime into main.ts, including propagation zones, local weather hooks, validation time-scale/offsets, and scenario-aware fleet/air combat setup.
  • Update ship and enemy-platform maneuver logic to follow scenario routes and waypoints, and ensure scenario-specific behavior is disabled when sandbox-custom is selected.
src/main.ts
src/style.css
index.html
Implement space-weather timeline, spatial propagation effects, and channel-specific propagation for Link 11/16, AEW, Soviet GCI/Maritime/Fleet networks.
  • Add SpaceWeatherPreset catalog, timeline runtime, propagation-effects evaluator, spatial-effects and weather-front runtime with local weather factors.
  • Feed space-weather snapshots into AirCombatSystem and FleetSceneIntegration, and expose diagnostics to canvas dataset and AAR/Tacview.
  • Hook propagation snapshots/zones into Link11/16, AEW command, Soviet GCI/Maritime/Fleet command networks to adjust quality, delay, success, and reasons, plus deterministic behavior.
src/space-weather/types.ts
src/space-weather/catalog.ts
src/space-weather/timeline-runtime.ts
src/space-weather/propagation-effects.ts
src/space-weather/spatial-effects.ts
src/environment/weather-front-runtime.ts
src/air/aew/command-network.ts
src/datalink/link16-network.ts
src/datalink/link11-network.ts
src/fleet/link11-runtime.ts
src/soviet-c2/gci-network.ts
src/soviet-c2/maritime-targeting.ts
src/soviet-c2/fleet-command.ts
src/fleet/scene-integration.ts
src/fleet/force-picture.ts
scripts/verify-space-weather.mjs
scripts/verify-spatial-weather.mjs
scripts/verify-c2-space-weather.mjs
scripts/verify-weather-front.mjs
scripts/capture-blackout-weather-review.mjs
Add lost-comms doctrines and runtime, integrating with air formations and fleet ships for autonomous behavior under link-quality degradation.
  • Introduce LostCommsDoctrine catalog and runtime with hysteresis and behavior codes, and register scenario forces with doctrines based on scenario JSON.
  • Drive AirCombatSystem formations and FleetSceneIntegration ship comms state from LostCommsRuntime updates, including doctrine behaviors and AAR/logging.
  • Expose lost-comms state to diagnostics and Tacview, including doctrine names and comms state fields on fleet members and aircraft.
src/lost-comms/types.ts
src/lost-comms/doctrine-catalog.ts
src/lost-comms/runtime.ts
src/air/runtime.ts
src/air/types.ts
src/fleet/scene-integration.ts
src/fleet/observability.ts
src/combat-types.ts
src/aar/acmi-exporter.ts
scripts/verify-lost-comms.mjs
Enhance air combat, formations, sensors, missiles, and Soviet C2 observability to support scenario-driven routes, launch zones, and blackout behavior.
  • Extend AirCombatSystem spawns with scenarioRoute, launch zones, initial loadouts/speeds/radar/ECM, and lost-comms behaviors; adjust thrust and formation logic to allow preplanned routes and autonomous raid behaviors.
  • Add weather-aware air radar factors via localWeatherAt, radarActive/ECM flags, and propagate space-weather snapshots into link networks; track missile midcourse link loss/restoration and seeker/ECM behavior with new diagnostics.
  • Factor Soviet GCI/Maritime/Fleet/Salvo diagnostics into a reusable writer and augment AAR decision audits for both air and surface platforms, including missile link-loss series.
src/air/runtime.ts
src/air/formation.ts
src/air/ooda.ts
src/air/sensors.ts
src/air/catalog.ts
src/air/aew/catalog.ts
src/air/ship-bridge.ts
src/air/observability-diagnostics.ts
src/air/types.ts
src/soviet-c2/gci-network.ts
src/soviet-c2/maritime-targeting.ts
src/soviet-c2/fleet-command.ts
src/datalink/types.ts
src/aar/acmi-exporter.ts
src/aar/datalink-recorder.ts
src/aar/fleet-recorder.ts
scripts/verify-air-formation-damage.mjs
scripts/verify-air-asm-ecm.mjs
scripts/verify-acmi-export.mjs
Add AAR and Tacview observability for decisions, space weather, lost-comms, and fleet link behavior to support blackout analysis.
  • Extend AarSnapshot and ACMI exporter with decision audits, space-weather frames, missile midcourse diagnostics, and platform track/comms/doctrine fields.
  • Capture air and surface decision audits in main.ts, including track sources, weapon authority, and lost-comms doctrines for use in post-mission analysis.
  • Record and expose space-weather/lost-comms/track-conflict/fleet Link-11 events into canvas dataset for UI and verification scripts.
src/combat-types.ts
src/aar/acmi-exporter.ts
src/main.ts
scripts/verify-datalink-aar.mjs
scripts/verify-blackout-aar-decisions.mjs
Introduce polar-twilight visual environment, arctic coast backdrop, aurora control, and night subject fill that are driven by scenario environment.
  • Add LightingEnvironmentPreset definitions for afternoon and polar-twilight, apply them to sun/ambient/fog/ocean/webgpu volumetrics, and surface diagnostics for time-of-day and sun altitude.
  • Add Arctic coast backdrop geometry and camera-local night subject fill light, toggled by scenario environment and updated in the render loop.
  • Make aurora runtime respond to scenario-controlled space-weather intensity, and ensure aurora/ocean/sky react consistently across quality modes without changing mechanics.
src/visual/environment-presets.ts
src/visual/high-quality-environment.ts
src/visual/ocean.ts
src/visual/aurora-runtime.ts
src/visual/aurora-environment.ts
src/visual/arctic-coast-backdrop.ts
src/visual/night-subject-fill.ts
src/visual/scenario-environment.ts
src/main.ts
scripts/verify-blackout-ultra-visual.mjs
scripts/verify-blackout-quality-parity.mjs
Implement upgraded tactical radar panel and linked ship adapter for organic/network track visualization and controls.
  • Replace legacy radar canvas drawing with TacticalRadarDisplay, showing organic vs datalink vs weapon-quality tracks, heading-up/north-up modes, and range controls.
  • Add tactical-radar-ship-adapter to derive TacticalRadarFrame from fleet picture and owner ship, including friendlies and scan bearing.
  • Update CSS and HTML to support expanded radar UI, legend, and status text, while preserving small-screen fallbacks.
src/visual/tactical-radar.ts
src/visual/tactical-radar-ship-adapter.ts
src/main.ts
src/style.css
index.html
Add scenario guidance UI (briefing, cues, dossier, phase HUD) wired to guidance runtime and dynamic score/theme audio.
  • Implement ScenarioGuidanceUi with briefing layout, theater map, mission cards, intelligence dossier, cues, phase HUD, and runtime mode/score controls.
  • Wire guidance UI into ScenarioGuidanceRuntime and DynamicScoreRuntime/ThemeTrackRuntime, including pause locking, regenerated seeds, and focus actions.
  • Add verification for guidance behavior, deterministic cue firing, and UI interactions including regenerate and dossier flows.
  • files
src/visual/scenario-guidance-ui.ts
src/scenario-system/guidance-runtime.ts
src/audio/dynamic-score-runtime.ts
src/audio/theme-track-runtime.ts
src/main.ts
src/style.css
scripts/verify-scenario-guidance.mjs
scripts/verify-scenario-guidance-ui.mjs
Add dynamic score Silent Meridian and original theme Across the Silent Band with generation tooling and verification.
  • Add pre-rendered Silent Meridian layer manifest and generation script; integrate DynamicScoreRuntime with scenarios and guidance UI.
  • Add Across the Silent Band full theme WAV/manifest generation script and QA verifier enforcing structure, contrast, and theme returns.
  • Ensure audio QA scripts validate duration, loudness, spectral balance, blackout climax contrast, and theme motif recurrence.
public/audio/silent-meridian/manifest.json
public/audio/silent-meridian/theme-manifest.json
public/audio/silent-meridian/across-the-silent-band.wav (generated)
scripts/generate-silent-meridian-audio.mjs
scripts/generate-across-the-silent-band.mjs
scripts/verify-theme-audio.mjs
src/audio/dynamic-score-runtime.ts
src/audio/theme-track-runtime.ts
src/main.ts
Update build, verification, and documentation for v1.21 Full-Spectrum Blackout branch.
  • Bump application version to v1.21.0 and surface it in the HUD.
  • Add multiple verify scripts for scenario system, blackout runtime, phases, spatial weather, track conflict fusion, full-duration run, and ultra visual parity.
  • Document v1.21 scenario platform and blackout scenario in README and dedicated scenario documentation.
package.json
index.html
README.md
scripts/verify-blackout-scenario-runtime.mjs
scripts/verify-blackout-cap-intercept.mjs
scripts/verify-blackout-phases.mjs
scripts/verify-blackout-spatial-runtime.mjs
scripts/verify-blackout-track-conflict-throttle.mjs
scripts/verify-blackout-full-duration.mjs
scripts/verify-blackout-ultra-visual.mjs
scripts/verify-blackout-quality-parity.mjs
scripts/verify-track-conflict-fusion.mjs
scripts/verify-scenario-runtime.mjs
scripts/verify-weather-front.mjs

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@kisara-ghost-review-checks

kisara-ghost-review-checks Bot commented Aug 5, 2026

Copy link
Copy Markdown

👻 GHOST Review

🔍 PR Summary

修复验证脚本在射击等待超时时未正确标记失败的问题,现在超时也会导致测试退出码变为非零,避免误报通过。


由 GHOST Review 自动生成

@kisara-ghost-review-checks

kisara-ghost-review-checks Bot commented Aug 5, 2026

Copy link
Copy Markdown

👻 GHOST Review

风险等级:low

关键变更

  • 为 platform-defense-visual 验证脚本加入 shotWaitTimedOut 检测

🧭 Review Guide

  1. 该变更为单行修复,逻辑简单,可直接接受
  2. 审查者可确认该脚本在其他类似验证中是否需要相同的超时处理

由 GHOST Review 自动生成

@kisara-ghost-review-checks

kisara-ghost-review-checks Bot commented Aug 5, 2026

Copy link
Copy Markdown

👻 GHOST Review

🔍 PR Summary

修复验证脚本在射击等待超时时未正确标记失败的问题,现在超时也会导致测试退出码变为非零,避免误报通过。

🗺️ 变更关系图

flowchart TD
    A["验证脚本启动"] --> B["页面加载并配置场景参数"]
    B --> C["点击 Start 并切换至 2X 速度"]
    C --> D["waitForFunction 等待首次点防御射击"]
    D -->|成功| E["shotWaitTimedOut = false"]
    D -->|超时 40s| F["shotWaitTimedOut = true"]
    E --> G["读取 canvas dataset 状态"]
    F --> G
    G --> H{失败条件聚合判断}
    H -- shotWaitTimedOut 为 true --> I["process.exitCode = 1"]
    H -- errors 非空 --> I
    H -- mounts 不等于 6 --> I
    H -- shots 小于 1 --> I
    H -- engagementsRemaining 不等于 6 减 shots --> I
    H -- 扇区覆盖检查失败 --> I
    H -- 全部通过 --> J["exitCode = 0 验证成功"]
Loading

由 GHOST Review 自动生成

@kisara-ghost-review-checks

Copy link
Copy Markdown

👻 GHOST Review 已准备好

💡 使用技巧与互动命令

与行内审查评论继续对话

直接回复 GHOST 的行内评论,并使用以下命令:

  • @ghost-review explain — 解释原审查问题的原因、触发条件和影响
  • @ghost-review why — 说明为什么值得修复,或纠正原评论误报
  • @ghost-review fix — 给出最小修复;可安全定位时提供 Suggested Change
  • @ghost-review alternative — 比较替代实现的复杂度、风险和适用条件
  • @ghost-review discuss — 用自然语言继续讨论代码边界与方案取舍

也可以带着 GHOST mention 直接提出自然语言问题,例如:

@ghost-review 混合场景下这个方案合理吗?

上述只读互动对外部贡献者开放;普通致谢和未 mention 的讨论不会触发模型。

PR 级协作者命令

以下命令仅限 OWNER、MEMBER 或 COLLABORATOR:

  • @ghost-review review — 重新进行完整代码审查
  • @ghost-review conflict — 重新检测冲突、深度分析,并在安全校验通过时展示建议解决代码(不写仓库)
  • @ghost-review fix-conflicts — 在安全边界内创建冲突修复分支和 Draft PR
  • @ghost-review summary — 生成或更新 PR 摘要
  • @ghost-review guide — 生成或更新 Review Guide
  • @ghost-review diagram — 生成或更新变更关系图
  • @ghost-review security — 进行安全专项审查
  • @ghost-review title — 建议 Conventional Commits 风格标题
  • @ghost-review resolve — 解决 GHOST 创建的 Review Threads
  • @ghost-review dismiss — 折叠 GHOST 的 Summary、Guide、Diagram 和帮助组件
  • @ghost-review clean — 清理旧组件和生命周期状态,然后重新审查
  • @ghost-review scan — 启动默认分支整仓安全扫描

在 GHOST 行内评论下还可使用:

  • @ghost-review issue — 把该行内问题转换成 GitHub Issue

帮助与自定义

  • @ghost-review help — 任何 PR 参与者都可以更新本指南
  • 仓库可通过 .ghost-review.yml 调整语言、严重度阈值、Summary、Guide、Diagram、自定义规则和自动标题。
  • 自动发布帮助:review.show_help: true
  • 可用 mention 别名:@kisara-ghost-review-checks, @kisara-ghost-review

GHOST Review · 回复 @ghost-review help 可再次查看本指南

@Sekai6 Sekai6 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great music

@Sekai6
Sekai6 merged commit 9069500 into main Aug 5, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants