Skip to content

fix: protect historical reports from operational writes - #655

Merged
david-loe merged 1 commit into
mainfrom
fix/historical-report-mutations
Oct 29, 2026
Merged

david-loe merged 1 commit into
mainfrom
fix/historical-report-mutations

Conversation

@david-loe

Copy link
Copy Markdown
Owner

Historical reports could pass workflow and project authorization checks, allowing operational changes or deletion. Require current documents in the existing API checks and direct query filters for Travel, ExpenseReport, HealthCareCost and Advance.

Historical saves now skip accounting hooks, preventing project balance changes, advance offsets and usage or approved-travel updates. Snapshot creation and cascade history cleanup remain supported.

Validation

  • Backend suite: 440 tests passed, including 27 new historical-report regression tests.
  • Rebuilt and reran the 27 regression tests after final fixture cleanup changes.
  • Common suite: 137 tests passed.
  • Strict TypeScript build, Biome and dependency synchronization checks passed.

@coderabbitai

coderabbitai Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 14 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between aa68bf8 and 5639123.

Files selected for processing: 12
  • backend/controller/adminToolsController.ts
  • backend/controller/advanceController.ts
  • backend/controller/expenseReportController.ts
  • backend/controller/healthCareCostController.ts
  • backend/controller/travelController.ts
  • backend/models/advance.ts
  • backend/models/expenseReport.ts
  • backend/models/healthCareCost.ts
  • backend/models/helper.ts
  • backend/models/travel.ts
  • backend/retentionpolicy.ts
  • backend/tests/api/historicReports.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@david-loe
david-loe merged commit 3e3d244 into main Oct 29, 2026
10 checks passed
@david-loe
david-loe deleted the fix/historical-report-mutations branch November 2, 2026 09:10
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