Repository navigation
chantier: audit remediation — confirmed findings #142
Description
An end-to-end audit of the six crates (71,627 lines) produced 180 findings across 15 subsystem auditors. Each finding cites an exact file:line, a minimal verbatim snippet, and a concrete trigger scenario; most carry a reproduction.
Findings rated Critical/High/Medium were then put through independent adversarial verifiers — one reading the code for a guard that would invalidate the claim, one attempting the reproduction, one checking the repository's own documented intent — all briefed to refute by default.
Scope of this chantier
In scope — the 98 findings that survived verification. Every item below is backed by a verifier majority and, in most cases, a reproduction.
Out of scope, deliberately:
- 75 findings that no verifier challenged (the verification wave was cut short). They are credible leads, not established facts. Acting on them risks "fixing" correct code — 4 findings were refuted outright, so the false-positive rate is not zero. The Architecture, Code quality, Security and Concurrency domains have no verified finding at all and are therefore untouched here.
- Supply-chain analysis (dependencies, CVEs, CI/CD, crates.io publication), excluded from the audit brief.
The dominant failure mode
Not crashes — silent divergence. rustmotion validate, which CLAUDE.md makes mandatory before delivery, answers "Valid scenario" on captions that run off the device, on CJK text rendered as empty boxes, on a world view whose positions it computes 860px away from what gets painted, on padding: {"horizontal":100} that evaluates to zero, and on five scenarios that panic or hang the renderer. A wrong video produced without any error is worse than a crash.
A second, related motif: the skill rules — the contract a generating LLM reads — prescribe knobs the engine ignores (amplitude on float_3d, delay/duration on pulse/float/shake/spin, loop on keyframe effects, style.wrap, margin-left).
Workstreams
Each lands as its own PR into chantier/audit-remediation, which merges to main as a single final PR.
- Encoding — ffmpeg argument order, diagnosability, remaining findings (11)
- Geometry validation — leaks and false negatives in the overflow guard (11)
- Text & fonts — measure/paint divergence, glyph fallback (10)
- Schema & serde — the contract with generating LLMs (10)
- Components — painters must never panic on degenerate input (9)
- Animation — presets must honour their configuration (8)
- Transitions & world — frame accounting and camera continuity (8)
- Layout & taffy — unit resolution and intrinsic measurement (8)
- Dataviz — degenerate scales, labels outside the measured box (8)
- HTML & CLI — commands must not lie about their exit code nor destroy source files (8)
- Paint pass — decoration order, opacity composition (7)
Activity
LeadcodeDev commentedon Aug 8, 2026
Workstream state — round 2 (parallel)
Three workstreams dispatched concurrently. Recorded here so the orchestration survives a session boundary.
Frozen contracts — read-only for every workstream
Componentenum and its dispatch arms —crates/rustmotion-components/src/lib.rsRustmotionError—crates/rustmotion-core/src/error.rsPaintertrait andPaintCtx—crates/rustmotion-core/src/traits/painter.rscrates/rustmotion-core/src/schema/A workstream needing a line in any of these reports the exact line instead of writing it; the orchestrator applies them all in one pass at integration.
File partition — writes are disjoint, reads may overlap freely
batchcrates/rustmotion-cli/src/commands/batch.rshtmlcrates/rustmotion-html/src/{element,lib,style}.rsdatavizcrates/rustmotion-components/src/{chart/bar,chart/mod,heatmap,progress,sparkline,table,treemap}.rsOrchestrator-owned convergence points, written by nobody else: every
lib.rsused for registration,mod.rs,Cargo.toml,Cargo.lock(regenerated, never hand-edited).rustmotion-html/src/lib.rsis owned by thehtmlworkstream rather than treated as a convergence point: it carries the transpiler itself, and no sibling touches it.Execution regime
Concurrent workstreams in a shared checkout. Sub-agents perform no git operations and run tests scoped to their own crate only — a full-suite run mid-round would test a tree carrying siblings' unfinished work. The orchestrator runs
fmt+clippy+ the full suite once, after integrating all three.Each agent gets its own
CARGO_TARGET_DIR: cargo locks the target directory, so a shared one would serialize exactly the parallelism the partition just bought.Decision log
LeadcodeDev commentedon Aug 8, 2026
Round 2 integrated — 6 workstreams landed, ~35 confirmed findings closed
chantier/audit-remediationnow carries six squashed workstreams. Full suite on the integrated tree: 752 passed, 0 failed;fmtandclippy --workspace -- -D warningsclean.batch— exit code, geometry bypass, path traversalstart_at, layout box, degenerate scalesSame defect, other files
The dataviz workstream owned seven files; three of its findings existed identically in files it did not own. Rather than leave a known bug behind a green suite, they were applied at integration:
progress_atignoringstart_atingauge.rsanddot_map.rs, thefilter_maplabel drift inchart/line.rs(×2) andchart/waterfall.rs, and the flat-series divisor instat.rs.This is what the report-don't-write rule bought: a sub-agent that widened its own scope would have produced a merge conflict; one that stayed silent would have shipped a partial fix.
Follow-up recorded, not done
progress_atnow exists in seven near-identical copies and the flat-series scale in three. The rule of three is well past — a crate-levelramp_progress(start_at, duration, time)would stop the next component reintroducing the defect. Deliberately deferred: an eight-file refactor would have buried sixteen bug fixes underneath it.Process note for whoever picks this up
Merging #146 with
--delete-branchremoved the base branch of a PR stack, which closed the dependent PRs (#147, #148) irrecoverably — a closed PR whose base is gone cannot be reopened or retargeted. They were recreated as #149 and #150 from the same commits. Do not use--delete-branchon a PR that is the base of another.Remaining
Validation géométrique (11) · Texte & polices (10) · Schéma & serde (10) · Animation (8) · Transitions & world (8) · Layout & taffy (8) · Paint pass (7) · Encoding remainder (9).
LeadcodeDev commentedon Aug 8, 2026
Workstream state — round 3 (parallel, 4 workstreams, 36 findings)
Four mutually disjoint domains. The remaining four (Geometry validation, Schema & serde, Animation, Layout & taffy) all collide with each other through
intrinsic.rs,scene.rs,animator.rsandpaint_pass.rs, so they are serialized into a later round rather than forced parallel.File partition — writes disjoint, reads free
encodagerustmotion/src/encode/{audio,video_audio,video/{ffmpeg,formats,h264}}.rs,rustmotion-cli/src/commands/{still,batch}.rstexterustmotion-components/src/{caption,intrinsic,codeblock/{highlight,render}}.rs,rustmotion-core/src/engine/{renderer/{fonts,text},text/cosmic}.rstransitionsrustmotion/src/engine/{world,render/scene}.rs,rustmotion/src/encode/video/tasks.rspaintrustmotion-core/src/engine/paint_pass.rs,rustmotion-components/src/legacy_dispatch.rs,rustmotion/src/engine/render/background.rsFrozen contracts unchanged from round 2:
Componentenum + dispatch,RustmotionError,Painter/PaintCtx, publicschema/types. Orchestrator-owned: registrationlib.rs,mod.rs,Cargo.toml;Cargo.lockregenerated, never hand-edited.intrinsic.rsis assigned totextefor this round.Layout & taffyandGeometry validationalso have findings in it — deliberately deferred rather than split, since two workstreams editing the same measurement code is the definition of a wrong decomposition.Execution regime
Unchanged: shared checkout, no git operations by sub-agents, per-agent
CARGO_TARGET_DIR, tests scoped to the owning crate. Orchestrator runsfmt+clippy --workspace+ full suite once after integrating all four.LeadcodeDev commentedon Aug 10, 2026
Clos : les 98 constats du périmètre sont corrigés et mergés dans
mainle 2026-08-10 via la PR #163 (rebase merge — les 14 commits de lots sont préservés individuellement, la bisection reste utilisable).CI sur
main: verte, les trois jobs.Les 14 lots
batchqui ne validait pas commerenderstart_at, boîte de layout, échelles dégénéréesworld: téléportation caméra et budget de framesVérification
cargo test --workspace: 21 cibles, 0 échec.fmt --checketclippy --workspace -D warningspropres. 6 nouveaux fichiers de test. 7 des 8 exemples passentrustmotion validate— le huitième est #157, dont l'échec est prouvé préexistant àmain.Ce qui reste, suivi ailleurs
Quatre défauts trouvés pendant la remédiation, tous hors du périmètre de cette issue :
examples/ferriskey-presentation.jsonéchouevalidate, préexistant àmainserde(alias): le schéma exporté déclare invalide ce que le moteur accepteEt les 78 constats non vérifiés restent non traités, comme annoncé dans le périmètre d'origine. 12 relèvent de la chaîne d'approvisionnement, explicitement exclue. Les 66 autres — surtout concurrence/performance, qualité de code et architecture — demandent une nouvelle passe de vérification adversariale avant tout correctif : le taux de faux positifs n'est pas nul, 4 constats ayant été réfutés d'emblée.