Skip to content

fix: resolve silent data corruption bugs (P1) - #337

Merged
ajianaz merged 1 commit into
developfrom
fix/p1-silent-data-corruption
Jul 2, 2026
Merged

fix: resolve silent data corruption bugs (P1)#337
ajianaz merged 1 commit into
developfrom
fix/p1-silent-data-corruption

Conversation

@ajianaz

Copy link
Copy Markdown
Collaborator

Summary

Fixes 8 silent data corruption bugs that produce wrong output without any crash or error. All bugs are high-severity because they silently produce incorrect results.

Refs #333

Fixes

#BugFileImpact
#42Severity sort invertedsrc/engine/rules/mod.rsmax_findings truncation dropped the MOST important findings
#45Security findings dropped on LLM failuresrc/engine/review.rsSecurity findings silently lost when LLM call fails
#52HashMap nondeterministic hashsrc/engine/debt_tracker.rsSame snapshot content produced different filenames across runs
#53Debt score trend wrongsrc/engine/debt_tracker.rsQuality score change computed against overall avg instead of recent period
#54Category trend change inflatedsrc/engine/debt_tracker.rsPer-category delta included previous period, inflating totals
#92Config precedence invertedsrc/config/loader.rsAuto-detected provider preset overrode explicit config values
#93context_chain config ignoredsrc/config/schema.rscontext_chain setting in .cora.yaml had no effect
#96Hook install overwrites existing hookssrc/hook/install.rsExisting pre-commit hooks silently replaced without backup

Testing

  • All 609 tests pass
  • cargo clippy -- -D warnings clean
  • cargo fmt applied

Fixes:
- #42 Severity sort inverted: sort descending (Critical first) so max_findings truncation drops least important findings
- #45 Security findings dropped on LLM failure: include security_findings in fallback condition and summary
- #52 HashMap nondeterministic hash: sort HashMap entries by key before hashing for deterministic filenames
- #53 Debt score trend wrong: compute recent_avg_quality from recent slice instead of overall average
- #54 Category trend change inflated: build recent_category_counts from recent slice for accurate delta
- #92 Config precedence inverted: env vars > config > auto-detect > defaults
- #93 context_chain config ignored: copy context_chain from ReviewSection in merge_into
- #96 Hook install overwrites existing hooks: use sentinel marker, backup non-cora hooks, compose wrapper
Refs #333
@ajianaz
ajianaz merged commit 72c0f7a into developJul 2, 2026
10 checks passed
@ajianaz
ajianaz deleted the fix/p1-silent-data-corruption branch July 2, 2026 04:59
Sign up for freeto 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

@ajianaz