Repository navigation
nav: close three material audit follow-ups (CUDA guard, startup-crash regression, gate doc) - #459
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.cuis geometry-only (reads α/β/γ, never samples the material stack or applieslam_soft/lam_hard), butdrive_step_cudavalidated only the input width — so a v2 risk/lam.cvcnavnet 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_stepthrows on a risk net,drive_step_materialaccepts it.3. Witness-gate "bypass" → not a bug; comment + contract test
material_config::gate_enabled=falseis fail-open (every agent active, soft force ungated at fulllam_soft) — the documentedlam_soft_eff = lam_soft * gatewith the gate pinned to 1; the corewitness_gatekernels are fail-closed. Only a maintainer-misread risk. Clarifying comments atmaterial.h+ thesim_world.cppelse-branch, plusNavMaterialSimWorld.GateDisabledIsFailOpenso 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).