Skip to content

fix: --export-rvf no longer silently produces a placeholder model#920

Merged
ruvnet merged 1 commit into
mainfrom
fix/export-rvf-placeholder-guard
Jun 3, 2026
Merged

fix: --export-rvf no longer silently produces a placeholder model#920
ruvnet merged 1 commit into
mainfrom
fix/export-rvf-placeholder-guard

Conversation

@ruvnet
Copy link
Copy Markdown
Owner

@ruvnet ruvnet commented Jun 2, 2026

The bug (honesty-critical)

main() checks handlers in order: --benchmark, then --export-rvf, then --pretrain, then --train. The --export-rvf branch wrote placeholder sine-wave weights ((i as f32 * 0.001).sin()) and returned.

So the workflow documented in the user guide:

--train --dataset /data --epochs 100 --export-rvf /output/model.rvf

…hit the --export-rvf short-circuit before --train, wrote a placeholder model, and never trained — while printing RVF container exported successfully. A user following the docs gets a non-functional model that looks real. For a project that explicitly fights "is it fake?" claims, silently shipping a fake model is the wrong default.

Fix

  • New export_emits_placeholder_demo(export_set, train, pretrain) guard: emit the placeholder container-format demo only when --export-rvf is used standalone. With --train/--pretrain, fall through so the real training pipeline runs and exports calibrated weights.
  • Standalone path now prints a clear WARNING that it's a container-format demo with placeholder weights — not a trained model — pointing at --train / a pretrained encoder (Pre-trained model from HuggingFace cannot be loaded: incompatible RVF format #894).
  • Docs: --export-rvf flagged as a placeholder demo in the flag table; the Docker training example switched to --save-rvf (consistent with the from-source example just above it).

Tests

3 unit tests (export_rvf_mode_tests): standalone → demo; +train/+pretrain → no short-circuit; no flag → never.

Verification

cargo build -p wifi-densepose-sensing-server --no-default-features clean; full crate unit suite 429 + 117 passed, 0 failed.

Related: #894 (no real trained-weights→loadable-RVF path is the deeper gap; this stops the placeholder masquerade).

🤖 Generated with claude-flow

The --export-rvf handler ran *before* the --train/--pretrain handlers and
unconditionally wrote placeholder sine-wave weights, then returned. So the
documented `--train --dataset … --export-rvf <path>` workflow
(user-guide.md) short-circuited to a PLACEHOLDER model and never trained —
printing "exported successfully" for a non-functional model. Given the
project's anti-"is it fake" stance, silently emitting a fake model is the
wrong default.

Fix:
- Only emit the placeholder container-format demo when --export-rvf is used
  *standalone* (new `export_emits_placeholder_demo` guard). With
  --train/--pretrain, fall through so the real training pipeline runs and
  exports calibrated weights.
- The standalone path now prints a clear WARNING that it writes a
  container-format demo with placeholder weights — not a trained model —
  pointing to --train / a pretrained encoder (#894).
- Docs: flag --export-rvf as a placeholder demo in the flag table, and fix
  the Docker training example to use --save-rvf (consistent with the
  from-source example) instead of the placeholder --export-rvf.

3 unit tests for the guard. Full crate unit suite: 429 + 117 passed, 0 failed.

Co-Authored-By: claude-flow <ruv@ruv.net>
@ruvnet ruvnet merged commit 0cfd255 into main Jun 3, 2026
28 of 29 checks passed
@ruvnet ruvnet deleted the fix/export-rvf-placeholder-guard branch June 3, 2026 06:55
ruvnet added a commit that referenced this pull request Jun 3, 2026
Per the CLAUDE.md pre-merge checklist (item 5, "Add entry under
[Unreleased]"), several recently-merged PRs landed without CHANGELOG
entries. Backfilling the user/operator-facing ones — most importantly the
MAT triage safety fix:

- #926 (Security/safety): survivor with a heartbeat never triaged Deceased
- #918: per-node HA devices report each node's own presence/motion
- #919: actionable --model load diagnostic (refs #894)
- #920: --export-rvf no longer silently produces a placeholder model
- #929 (Security): bearer scheme matched case-insensitively (RFC 6750)

CI-internal fixes (#925 rust-cache, #930 SAST) are intentionally omitted —
they don't change product behavior. Docs-only.
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