Skip to content

nav: close three material audit follow-ups (CUDA guard, startup-crash regression, gate doc) - #459

Merged
transfix merged 2 commits into
masterfrom
fix/nav-audit-followups
Sep 28, 2026
Merged

transfix merged 2 commits into
masterfrom
fix/nav-audit-followups

Conversation

@transfix

@transfix transfix commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

Three small nav audit gaps flagged during the material/two-head work, investigated and closed. No behavior change on any existing path.

1. CUDA drive silently drops the two-head learned λ heads → hard-fail guard

drive.cu is geometry-only (reads α/β/γ, never samples the material stack or applies lam_soft/lam_hard), but drive_step_cuda validated only the input width — so a v2 risk/lam .cvcnav net passed and ran on the GPU as a plain geometry drive, silently dropping the learned reroute. Full GPU material parity is a substantial feature (device material sampler + two-head sigmoid + force terms) tracked separately; this adds a hard-fail guard so a v2 net can't silently degrade. Test (CUDA lane): DriveStepCudaRefusesRiskLamNet.

2. Downstream startup crash → library-invariant regression test

A downstream app fixed a startup crash (risk net routed to the non-material drive, no material stack), but the fix shipped with no coverage and that app isn't in this repo's CI. Pin the invariant at the library level: NavMaterialDeploy.RiskNetRejectedByPlainDriveAcceptedByMaterialDrive — drive_step throws on a risk net, drive_step_material accepts it.

3. Witness-gate "bypass" → not a bug; comment + contract test

material_config::gate_enabled=false is fail-open (every agent active, soft force ungated at full lam_soft) — the documented lam_soft_eff = lam_soft * gate with the gate pinned to 1; the core witness_gate kernels are fail-closed. Only a maintainer-misread risk. Clarifying comments at material.h + the sim_world.cpp else-branch, plus NavMaterialSimWorld.GateDisabledIsFailOpen so a future tidy can't flip it to 0.

Verified locally: nav_material_deploy_test 14/14, nav_material_test 29/29 (CUDA guard test builds under CVC_ENABLE_CUDA).

…ession, gate doc)

Three small nav audit gaps, investigated + closed:

1. CUDA drive silently drops the two-head learned lam heads. drive.cu is
   geometry-only (reads alpha/beta/gamma, never samples the material stack or
   applies lam_soft/lam_hard), yet drive_step_cuda validated only the INPUT
   width — so a v2 risk/lam .cvcnav net passed and ran on the GPU as a plain
   geometry drive, silently dropping the learned reroute (and d_mlp softplus-
   scales every column, so it would mis-read col3/col4 even if used). Full GPU
   material parity is a substantial feature (device material sampler + two-head
   sigmoid + force terms) tracked separately; for now add a hard-fail GUARD:
   drive_step_cuda throws on has_risk()/has_lam()/lam_sigmoid() rather than
   mislead. Test (CUDA lane): DriveStepCudaRefusesRiskLamNet.

2. cvcdbg #141 ("attach material stack to the STARTUP world under --grip")
   shipped with no regression coverage; the demo binary is not in CI. The crash
   was a risk net routed to the NON-material drive (which rejects it) with no
   material stack attached. Pin the underlying library invariant:
   NavMaterialDeploy.RiskNetRejectedByPlainDriveAcceptedByMaterialDrive —
   drive_step throws on a risk net, drive_step_material accepts it.

3. The material witness-gate "bypass" is NOT a bug: material_config.gate_enabled
   =false is fail-OPEN (every agent active, soft force applied ungated at full
   lam_soft), the documented lam_soft_eff = lam_soft * gate with the gate factor
   pinned to 1 — the core witness_gate kernels are fail-CLOSED. Only a maintainer
   misread risk. Add clarifying comments at material.h (the flag) and the
   sim_world.cpp else-branch, plus a contract test
   NavMaterialSimWorld.GateDisabledIsFailOpen so a future tidy can't flip it to 0.

Host tests pass locally (nav_material_deploy_test 14/14, nav_material_test 29/29);
the CUDA guard test builds only under CVC_ENABLE_CUDA. No behavior change on any
existing path — guard rejects only nets the GPU could not drive correctly anyway.
@transfix
transfix merged commit 8c1cfd8 into master Sep 28, 2026
13 checks passed
@transfix
transfix deleted the fix/nav-audit-followups branch September 28, 2026 17:59
@transfix transfix changed the title nav: close three material/DBG audit follow-ups (CUDA guard, #141 regression, gate doc) nav: close three material audit follow-ups (CUDA guard, startup-crash regression, gate doc) Oct 2, 2026
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