Skip to content

fix: apply FullGas review answers (POST-FULLGAS-FIXES)#22

Merged
davidp57 merged 10 commits into
developfrom
fix/post-fullgas-corrections
Jul 12, 2026
Merged

fix: apply FullGas review answers (POST-FULLGAS-FIXES)#22
davidp57 merged 10 commits into
developfrom
fix/post-fullgas-corrections

Conversation

@davidp57

@davidp57 davidp57 commented Jul 12, 2026

Copy link
Copy Markdown
Member

Context

Applies FullGas's answers to our dev/fullgas-report.md findings. One real product
regression, several stale tests rewritten against the current design, a mission-content
gap, and a doc note. Lot POST-FULLGAS-FIXES — see .backlog/POST-FULLGAS-FIXES/PRD.md.

Tickets

  • 01 F-Q regression (src) — restored Feature Q whole-vehicle spawn in
    refreshRequestEquipmentSection (dropped by fork commit 0a15814, restored from b1ddfe4).
    Live: fq_vehicle_whole_transport 9/9 (was 1/9).
  • 02 U-108 — ProbeLifeCheck run-once guard; ProbeOffMap C3 rewritten (option C: verify the
    probe's own ghost by name, robust to init-created ghosts). Both 4/4 live.
  • 03 U-108 WarnAndSkip — rewritten to the current heliport registry design. 8/8 live.
  • 04 F-117/F-118 recon — FullGas fixes (reconF10Menu gate; scan stays active) + made
    self-sufficient (spawn a ground observer instead of needing a BLUE player). 3/3, 5/5 live.
  • 05 fr_ai_zones (src) — pickMaxStock conditional + G3 WARN on invalid troopStock format
    (i18n EN/FR/ES/KO); 7 checks rewritten to the {[templateName]=N} table model. 150/150 live
    (was 126/145).
  • 06 coord_farp — hardcoded anchor coords in both FARP spawn scenarios (static absent from
    the mission). Both PASS live.
  • 07 README — deferred (full rewrite later, David's call).

Also: documented mission reload (Shift+R) as the way to load src/ changes in the
integration-testing skill (injecting the 1.2 MB CTLD.lua times out; dofile-over-live freezes DCS).

🤖 Generated with Claude Code

Summary by Sourcery

Apply FullGas review follow-ups across CTLD core, tests, and integration tooling.

Bug Fixes:

  • Restore Feature Q whole-vehicle spawn support in Request Equipment for eligible transports.
  • Fix heliport off-map probing tests by adding run-once guards and verifying the specific ghost airbase created.
  • Correct recon F-117/F-118 behavior so RECON stays active with no targets and respects the reconF10Menu flag.
  • Clarify AI zone troopStock handling, treating non-table or empty troopStock as invalid and emitting appropriate warnings.
  • Stabilize FARP spawn scenarios by hardcoding test anchor coordinates instead of relying on missing mission statics.

Enhancements:

  • Refine heliport probe WARN-and-skip behavior and logging to differentiate stock vs probeSkip heliports.
  • Align AI zone configuration and tests with the redesigned per-template troop stock model and pickup semantics.
  • Improve recon tests by using dedicated ground observers and updated expectations for scan lifecycle and messaging.
  • Document mission reload workflow for loading rebuilt CTLD.lua in integration tests to avoid timeouts and freezes.
  • Add internal backlog tickets and PRD notes documenting the POST-FULLGAS-FIXES lot and applied decisions.

Tests:

  • Update multiple DCS no-player scenarios to match current CTLD design for heliport probing, recon, AI zones, and FARP spawns, including new guards and assertions.

davidp57 and others added 8 commits July 12, 2026 19:58
Commit 0a15814 (DCS-cargo fix) dropped the loadableList computation in
refreshRequestEquipmentSection and hardcoded spawnAsVehicle=false, silently
disabling whole-vehicle spawn from the Request Equipment menu. Restored the
Feature Q logic verbatim from the b1ddfe4 reference: build loadableList from
caps.loadableVehiclesRED/BLUE when canTransportWholeVehicle, and set
spawnAsVehicle per item when its type is in that list.

Regression confirmed by FullGas. Validated live against Test_CTLDNEXT_01:
scenario_fq_vehicle_whole_transport PASS 9/9 (was 1/9). CTLD.lua rebuilt.

Opens lot POST-FULLGAS-FIXES (applies FullGas's review answers).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…et 06)

The coord_farp-1 static is absent from the VEAF test mission. Instead of editing
the .miz binary, anchor both FARP spawn scenarios to David's provided map coords
(x=-356482, z=616908, ~6.4 m) with default BLUE/USA. Validated live:
METAL-FARP-SPAWN PASS, CS-FARP-SPAWN PASS.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- WarnAndSkip (ticket 03): rewritten against the current design — asserts
  Farp_FG_Petit_Helipad (probeSkip=true) is excluded, the 3 stock heliports
  appear as probeType=HELIPORT, and an INFO "skipped" is logged. PASS 8/8.
- ProbeLifeCheck (ticket 02 part): run-once guard. PASS 4/4.

ProbeOffMap (ticket 02) NOT included: its C3 count-diff still fails because
CTLD init pre-creates ghost airbases (7 present), so the test's name collides —
FullGas's "run 1 before=0" assumption doesn't hold here. Needs a deeper fix.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…er (ticket 04)

- Apply FullGas's corrections: F-117 gates on reconF10Menu (not reconEnabled)
  and asserts the "reconF10Menu" keyword; F-118 inverts U-04/U-05 to the current
  design — scan() has no early-return, so _activeScans stays SET with zero targets
  after an all-layers-OFF scan (old marks cleaned). The agent had kept the stale
  == nil assertions; corrected to ~= nil + zero-targets.
- Make both self-sufficient: scan() takes a unit (not a live client), so spawn a
  throwaway ground observer resolvable via Unit.getByName instead of requiring a
  BLUE player. Stays tier auto. Observer destroyed + config restored on teardown.

Validated live: F-117 PASS 3/3, F-118 PASS 5/5.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… pre-creates ghosts)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… ticket 02 done

C3 no longer counts before/after ghost airbases (which collided with the ghosts
CTLD init pre-creates at load, failing on the first run). It now captures the idx
the valid SINGLE_HELIPAD probe used and asserts that specific ghost
(CTLD_MVP_H<idx>) exists by name — robust to pre-existing ghosts. Run-once guard
kept (protects C1 across re-runs). Validated live: PASS 4/4.

Ticket 02 complete; ProbeOffMap un-flagged from FullGas (resolved here).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ket 05)

- _loadAIZonesFromConfig: pickMaxStock = entry.isPickup and 0 or nil, so dropoff-only
  zones keep nil (hasPickup() stays false) while pickup zones use 0 (unlimited guard;
  real per-template stock lives in _aiTroopStock).
- G3 validation: warn when troopStock is nil OR not a {[name]=N} table OR empty (catches
  legacy scalars 0/-1/10). New message "troopStock nil/invalid — use a {[templateName]=N}
  table" (i18n EN/FR/ES/KO updated). Decision (David): -1 legacy scalar → WARN.
- scenario_fr_ai_zones: rewrite the 7 affected checks to the new model (troopStock as a
  named-template table; pickMaxStock=0 for pickup; new G3 message). PASS 150/150 live
  (was 126/145). CTLD.lua rebuilt.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…rc changes

Document that a src/ change is picked up by reloading the mission (Shift+R),
NOT by injecting the 1.2 MB CTLD.lua via exec_lua (times out, HTTP 504) nor by
dofile-ing it over a live mission (re-runs init → freezes the DCS Lua thread).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@sourcery-ai

sourcery-ai Bot commented Jul 12, 2026

Copy link
Copy Markdown

Reviewer's Guide

Applies FullGas’s post-review corrections: fixes a Feature Q whole-vehicle spawn regression, aligns U-108 heliport probe behavior and tests with current design (including run-once guards and new ghost verification), updates recon F-117/F-118 tests to the latest recon API semantics, retools AI zone troop stock handling and warnings, hardcodes FARP spawn anchors, documents safe integration testing workflow, and adds PRD/ticket backlog docs for this fix lot.

File-Level Changes

Change Details Files
Restore Feature Q whole-vehicle spawn from Request Equipment by reintroducing loadable vehicle list handling for capable transports.
  • Precompute loadable whole-vehicle types per transport in CTLDCrateManager:refreshRequestEquipmentSection based on coalition and capability.
  • Use the precomputed list to decide when Request Equipment entries should spawn a whole vehicle instead of crates.
  • Regenerate CTLD.lua from src with updated crate logic and bump build metadata.
src/CTLD_crate.lua
CTLD.lua
Refine AI zone troop stock semantics and validation, with new pickMaxStock rules and stricter troopStock format checks plus updated i18n.
  • Set pickMaxStock to 0 only for pickup zones and nil for dropoff-only zones so hasPickup() reflects config accurately.
  • Treat troopStock as invalid when nil, non-table, or empty, emitting a G3 warning and disabling troop pickup.
  • Update AIZ warning messages in EN/FR/ES/KO i18n to describe the new nil/invalid troopStock guidance using {[templateName]=N} tables.
  • Adjust fr_ai_zones scenarios to use table-based troopStock, expect pickMaxStock=0, assert _aiTroopStock contents, and update legacy-scalar expectations and report strings.
src/CTLD_zone.lua
src/CTLD_i18n_en.lua
src/CTLD_i18n_fr.lua
src/CTLD_i18n_es.lua
src/CTLD_i18n_ko.lua
CTLD.lua
tests/dcs/noPlayer/scenario_fr_ai_zones.lua
Align U-108 heliport probing tests with the current mod validator behavior, adding run-once guards and safer ghost verification.
  • Add run-once guards to ProbeOffMap and ProbeLifeCheck scenarios to avoid accumulating non-destroyable ghost airbases across runs.
  • Change ProbeOffMap C3 to verify the specific ghost created by the valid probe (CTLD_MVP_H) by name instead of relying on before/after airbase count diffs.
  • Rewrite the WarnAndSkip scenario to assert probeSkip heliports are excluded, stock heliports are collected, INFO "skipped" logs are emitted, and no WARNs are raised; capture INFO and WARN logs separately with safe string formatting.
  • Update test verdict messages to reflect probe/skip behavior and include counts of INFO/WARN logs.
tests/dcs/noPlayer/U-108_modValidatorHeliportProbeOffMap.lua
tests/dcs/noPlayer/U-108_modValidatorHeliportProbeLifeCheck.lua
tests/dcs/noPlayer/U-108_modValidatorHeliportWarnAndSkip.lua
Update recon F-117/F-118 tests to match the redesigned recon API and make them self-sufficient via ground observer spawns.
  • Switch F-117 to use reconF10Menu config and assert that disabled messages mention reconF10Menu instead of reconEnabled; ensure no disabled message when the flag is true and altitude guard is bypassed.
  • Refactor both recon tests to spawn disposable ground observer units via ctld.utils.dynAdd instead of requiring a live BLUE player, including cleanup of spawned groups.
  • Adjust F-118 to reflect that scan() no longer early-returns when all layers are disabled, instead keeping _activeScans set with zero targets while removing previous marks; update assertions accordingly and ensure cleanup of scan state.
  • Restore original config values and trigger hooks after tests to avoid contaminating other scenarios.
tests/dcs/noPlayer/F-117_reconDisabledScanShowsExplicitMessageNotSilent.lua
tests/dcs/noPlayer/F-118_reconToggleOFFMarksRemovedImmediatelyEvenWhenNoLay.lua
Make FARP spawn scenarios independent of a missing coord_farp-1 static by hardcoding anchor coordinates and coalition/country.
  • Replace lookup of StaticObject 'coord_farp-1' with hardcoded map coordinates and BLUE/USA metadata in metal and countryside FARP spawn scenarios.
  • Update logging and failure paths accordingly so tests no longer fail purely due to missing mission statics.
tests/dcs/noPlayer/scenario_farp_metal_spawn.lua
tests/dcs/noPlayer/scenario_farp_countryside_spawn.lua
Document and track the POST-FULLGAS-FIXES lot, including decisions and testing workflow constraints.
  • Add a PRD for the POST-FULLGAS-FIXES lot describing tickets, scope, and non-goals.
  • Create per-ticket backlog entries for FQ regression, U-108 run-once/warn-and-skip, recon F-117/F-118, fr_ai_zones, coord_farp mission content, and README docs.
  • Extend dev/fullgas-report.md with a "Round 2" section explaining the ProbeOffMap option C decision and notes about Unit.getDescByName vs ghost probes.
  • Update the integration-testing skill guide to require mission reload (Shift+R) when src/ changes, warn against injecting CTLD.lua via exec_lua or dofile over live missions, and clarify the injection loop.
.backlog/POST-FULLGAS-FIXES/PRD.md
.backlog/POST-FULLGAS-FIXES/tickets/01-fq-regression.md
.backlog/POST-FULLGAS-FIXES/tickets/02-u108-runonce.md
.backlog/POST-FULLGAS-FIXES/tickets/03-u108-warnandskip.md
.backlog/POST-FULLGAS-FIXES/tickets/04-recon-f117-f118.md
.backlog/POST-FULLGAS-FIXES/tickets/05-fr-ai-zones.md
.backlog/POST-FULLGAS-FIXES/tickets/06-coord-farp-miz.md
.backlog/POST-FULLGAS-FIXES/tickets/07-readme-doc.md
dev/fullgas-report.md
.claude/skills/integration-testing/SKILL.md

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

…dation)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@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.

Hey - I've found 2 issues, and left some high level feedback:

  • In refreshRequestEquipmentSection, consider replacing the hard-coded playerObj.coalition == 1 check with coalition.side.RED (or the appropriate constant) to avoid relying on magic numeric coalition IDs.
  • The hardcoded observer/FARP coordinates (x = -356482, y = 6.4, z = 616908) now appear in multiple scenarios; consider centralizing them in a shared helper or constant to keep these tests aligned if the location ever needs to change.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `refreshRequestEquipmentSection`, consider replacing the hard-coded `playerObj.coalition == 1` check with `coalition.side.RED` (or the appropriate constant) to avoid relying on magic numeric coalition IDs.
- The hardcoded observer/FARP coordinates (`x = -356482, y = 6.4, z = 616908`) now appear in multiple scenarios; consider centralizing them in a shared helper or constant to keep these tests aligned if the location ever needs to change.

## Individual Comments

### Comment 1
<location path="src/CTLD_crate.lua" line_range="2762-2764" />
<code_context>
                 if sideOk and (not _crateIsJTAC(sc) or jtacOk) then
-                    -- Request Equipment always spawns crates, never a whole vehicle.
-                    -- Feature Q whole-vehicle spawn is handled by the dedicated "Load Vehicle" menu.
+                    -- Feature Q: detect if this item should spawn a whole vehicle WAITING
                     local spawnAsVehicle = false
+                    if loadableList then
</code_context>
<issue_to_address>
**nitpick (typo):** The word 'WAITING' in this comment looks like a leftover artifact and could be removed for clarity.

The trailing 'WAITING' reads like a copy/paste artifact and makes the comment harder to parse. Consider removing it or replacing it with a more explicit phrase if there’s a pending TODO here.

```suggestion
                if sideOk and (not _crateIsJTAC(sc) or jtacOk) then
                    -- Feature Q: detect if this item should spawn a whole vehicle
                    local spawnAsVehicle = false
```
</issue_to_address>

### Comment 2
<location path=".backlog/POST-FULLGAS-FIXES/tickets/04-recon-f117-f118.md" line_range="6" />
<code_context>
+Status: ✅ done
+Type: AFK
+
+F-117/F-118 recon reconF10Menu + scan-stays-active rewrite
+
+## Blocked by
</code_context>
<issue_to_address>
**issue (typo):** Potential duplicated word "recon" in ticket description

"F-117/F-118 recon reconF10Menu + scan-stays-active rewrite" appears to include an unintended duplicate "recon". Please adjust the wording (for example, by removing one "recon" or separating it with punctuation) to make the description clearer.

```suggestion
F-117/F-118 recon F10Menu + scan-stays-active rewrite
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread src/CTLD_crate.lua
Comment thread .backlog/POST-FULLGAS-FIXES/tickets/04-recon-f117-f118.md Outdated
…ion.side.RED

- Remove the leftover "WAITING" word from the Feature Q comment.
- Replace magic `playerObj.coalition == 1` with `coalition.side.RED` (iso-behaviour,
  RED == 1) in refreshRequestEquipmentSection.
- Fix duplicated "recon" in ticket 04 description.

CTLD.lua rebuilt. No behaviour change (comment + constant only).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@davidp57 davidp57 merged commit dfab012 into develop Jul 12, 2026
5 checks passed
@davidp57 davidp57 deleted the fix/post-fullgas-corrections branch July 12, 2026 19:25
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.

1 participant