Skip to content

docs(audits): explain why audit checks duplicate real-time validation - #1725

Open
kaligrafy wants to merge 3 commits into
chairemobilite:mainfrom
kaligrafy:docs/audits-revalidate-regardless-of-realtime
Open

docs(audits): explain why audit checks duplicate real-time validation#1725
kaligrafy wants to merge 3 commits into
chairemobilite:mainfrom
kaligrafy:docs/audits-revalidate-regardless-of-realtime

Conversation

@kaligrafy

@kaligrafy kaligrafy commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Clarifies in the audit READMEs that audit checks must validate interview data on its own merits, never assuming it was already validated in real time on the frontend.
  • Explains the two concrete reasons this matters: a respondent can leave a field invalid after passing through it (without correcting the red error shown in the frontend) and abandon the interview, or edit the stored interview data directly (e.g. via browser dev tools), bypassing real-time validation entirely.
  • Short version added to packages/evolution-backend/src/services/audits/README.md; more complete version with the two scenarios added to packages/evolution-backend/src/services/audits/auditChecks/README.md, linked from the short one.

No code changes — documentation only.

Test plan

  • Review rendered markdown for the two README files
  • Confirm the cross-link anchor (auditChecks/README.md#1-what-is-an-audit-check) resolves correctly on GitHub

Summary by CodeRabbit

  • Documentation
    • Clarified that audit checks independently re-validate stored interview data.
    • Documented scenarios where data may change or bypass real-time validation.
    • Added guidance to create corresponding audit checks for new real-time validations.

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Caution

Review failed

An error occurred during the review process. Please try again later.


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.

@greenscientist greenscientist left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Frankly I feel you are going into too much details here. I don't feel this is useful to add

Comment thread packages/evolution-backend/src/services/audits/auditChecks/README.md Outdated
@kaligrafy

Copy link
Copy Markdown
Contributor Author

#1726

@kaligrafy

kaligrafy commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Frankly I feel you are going into too much details here. I don't feel this is useful to add

En fait, je pense que c'est utile, car n'importe qui pourrait se poser la même question que toi: pourquoi les audits + validations temps réel, et donc ça explique pourquoi et ça relance le TODO de convertir tout en objets dans le frontend aussi. Si tu pense que c'est vraiment pas nécessaire, on peut rejeter cette PR.

Audit checks re-validate data regardless of frontend validation because
a respondent can leave a field invalid without correcting it, or edit
the stored interview data directly, bypassing real-time validation
entirely.
Once survey objects are unified between frontend and backend and
persisted as separate DB columns per attribute, most audit checks
could be reused directly as real-time validations, removing the
current duplication.
@kaligrafy
kaligrafy force-pushed the docs/audits-revalidate-regardless-of-realtime branch from 84fa965 to 2f813f7 Compare July 17, 2026 21:13
@kaligrafy
kaligrafy requested a review from tahini July 30, 2026 13:50
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.

2 participants