Skip to content

Compare two versions of a set of DSN files

The version comparison checks two versions of the same set of DSN files with the same engine and the same options, then lists the differences in anomalies. It says whether version B regresses, improves or stays identical to version A. An exit code, 0 or 1, is meant for continuous integration. In the application, the same service is the Checks › Compare two versions screen: drop version A then version B and choose the options; the rest of this section describes it through the API.

When to use it:

  • After a correction: to check that the new version removes anomalies without creating new ones.
  • Between two versions of payroll software: the set of DSN files from the old version is set A, the one from the new version is set B.
  • In a continuous integration pipeline: the exit code tells you whether there is at least one regression.
Do not confuse it with the comparison of several files: the multi_fichiers option stays at false in the version comparison.
  1. Send a single request — POST /v1/controles/avec-pieces, as a multipart request. The manifest comes first and carries the function comparer. One request is enough: the comparison runs as a direct call, and function batches refuse it.
  2. Tell the two sets apart — The roles dsn_a and dsn_b identify set A and set B. The same file names are allowed in A and in B; within each set, the names must be unique.
  3. Describe each file — taille gives the exact number of bytes of the part. For a ZIP or gzip file, give contenant (zip or gzip), a name ending with the matching extension (.zip or .gz) and taille_decompressee, the total size in bytes once decompressed. For a folder, send each file with its relative path as its name.
  4. Set the options — The options of the check apply to both versions, notably annee_controle, etendu, enrichi, detail and strict; detail requires enrichi or etendu. The format is text, json or csv. All the anomalies are kept so that they can be compared: limite stays at zero, and multi_fichiers and masquer_comptes stay at false. The complet and declarations options do not apply to the comparison: a request that turns them on is refused with 422 options_incompatibles.
  5. Read the exit code — The X-DSN-Code-Sortie header is 0 with no regression and 1 with at least one. The body of the response is the document, byte for byte: UTF-8 text, JSON or UTF-8 CSV, with no envelope and no added separator.

With DSNLint Connect, the comparer A.dsn B.dsn command sends this request. For archives, describe the dsn_a and dsn_b files in --pieces-fichier, with their container and their decompressed limit. The comparer MCP tool takes pieces and options under the same names. The exit code is the API’s: 0 for no regression, 1 for at least one.

The reading options apply to both versions. Put them in the manifest’s options object, or pass them to DSNLint Connect with --option name=value.

  • Option
    fils
    Value and effect
    Fixed at 1. Each request is processed on a single thread.
  • Option
    max_decompresse
    Value and effect
    Integer of at least 1, in bytes; 2,147,483,648 (2 GiB) by default. Reading limit per compressed DSN file.
  • Option
    max_entrees
    Value and effect
    Integer of at least 1; 100,000 by default. Entry limit per archive.
  • Option
    profil_csv
    Value and effect
    With format=csv, set machine explicitly. The excel-fr default is not valid for comparison: it is rejected for this format. You receive raw CSV, without a ZIP.
These options can lower the reading limits, but cannot raise the service limits (see “Service limits”); the lower limit applies and exceeding it returns 413.

The files of the two sets are matched by their name:

  • For a folder or an archive, the name is the path relative to the root supplied, with case and sub-folders kept.
  • With fichiers_isoles set to true, each version has a single logical file, and the two files are matched even if their names differ. The pair then carries both names, as janvier-2026.dsn → mars-2026.dsn, or a single one if they are the same.
  • A ZIP file at the root is matched like a folder: its members have the same relative paths, and the name of the outer archive plays no part in the matching.
  • A file with no counterpart is listed and counted, without automatically becoming a regression. The summary counts it under non_apparies; the JSON lists it in seulement_a or seulement_b.

DSNLint distinguishes new, disappeared, common and modified anomalies. A shift in line numbers alone does not make an anomaly new; each result gives its line in both versions. A changed declared identity may appear as a disappearance and a new anomaly.

For each pair of files, the comparison sorts the anomalies into four categories:

  • Category
    New
    What it holds
    The anomalies present only in B.
  • Category
    Disappeared
    What it holds
    The anomalies present only in A.
  • Category
    Common
    What it holds
    The anomalies present in A and in B, with no difference.
  • Category
    Modified
    What it holds
    The anomalies present in A and in B with a different severity or value.

Each pair also receives a judgement:

  • Judgement
    Regression
    When
    B regresses if its verdict worsens, if it has a new blocking anomaly, or if a severity rises to the blocking level. With strict, a new warning is also a regression.
  • Judgement
    Improvement
    When
    B improves if it has a better verdict, a disappeared anomaly or a lowered severity, with no simultaneous regression.
  • Judgement
    Identical
    When
    The same anomalies, values and verdicts, whatever the line numbers.
  • Judgement
    Other difference
    When
    A pair that differs, with neither a regression nor an improvement.
A change of value alone is not a regression. The normative verdicts remain those of the check; the additional warnings requested with etendu are compared separately from the verdicts.

The summary gives the number of pairs, of files with no counterpart, of regressions, of improvements, of identical pairs and of other differences, then, for each check code, the number of new and disappeared anomalies.

The comparison returns three formats:

  • Format
    text
    What you receive
    The summary first, then the pairs that regress, then the others.
    Document name
    comparaison.txt
  • Format
    json
    What you receive
    The standalone contract comparaison-versions, version 1, described by a closed schema. The new, disappeared, common and modified categories are kept distinct; arrays are ordered by key and pairs are sorted by name.
    Document name
    comparaison.json
  • Format
    csv
    What you receive
    The raw machine profile, with nine columns: UTF-8 with no BOM, comma, LF line endings. It is not an archive.
    Document name
    comparaison.csv

The CSV has one line per anomaly that differs, with the columns fichier, sens (nouvelle, disparue or modifiee), code, gravite, rubrique, etablissement, individu, ligne_a and ligne_b. The severity is that of B if B exists, otherwise that of A. The common anomalies and the files with no counterpart stay in the text and the JSON; a comparison with no difference has only the CSV header.

A regression: janvier-2026.dsn as A and mars-2026.dsn as B, with fichiers_isoles. The pair carries the name janvier-2026.dsn → mars-2026.dsn. March brings 8 new anomalies and removes none: B goes from compliant to non-compliant, and X-DSN-Code-Sortie is 1.

comparaison.txt · lines 1 to 24 of 31
DSNLint — Comparaison de versions
1 paire, 0 fichier sans partenaire ; 1 régression, 0 amélioration, 0 paire identique, 0 autre différence.
Date qui n’existe pas au calendrier (CSL-04) : 1 nouvelle, 0 disparue
Rubrique obligatoire absente (CST-03) : 1 nouvelle, 0 disparue
Date de naissance incohérente avec le NIR (S21.G00.30.006/CCH-11) : 1 nouvelle, 0 disparue
Code de profession (PCS-ESE) inconnu de la nomenclature (S21.G00.40.004/CRE-11) : 1 nouvelle, 0 disparue
Fin prévisionnelle du contrat antérieure à son début (S21.G00.40.010/CCH-11) : 1 nouvelle, 0 disparue
Motif de recours du CDD absent (S21.G00.40.021/SIG-11) : 1 nouvelle, 0 disparue
Prélèvement à la source différent de l’assiette multipliée par le taux (S21.G00.50.009/CCH-11) : 1 nouvelle, 0 disparue
Cotisation de retraite complémentaire incomplète (S21.G00.81.001/SIG-18) : 1 nouvelle, 0 disparue

janvier-2026.dsn → mars-2026.dsn — régression ; A : conforme ; B : non conforme
8 nouvelles, 0 disparue, 0 commune, 0 modifiée
  Nouvelle : Date qui n’existe pas au calendrier (CSL-04) ; rubrique S21.G00.50.001 ; établissement 73282932000082 ; individu MATHIEU COLIN (1900675056810) ; contrat CTR-010 ; occurrence 1 ; ligne A absente ; ligne B 2062
    B : BLOQUANT ; valeur "30022026"
  Nouvelle : Rubrique obligatoire absente (CST-03) ; rubrique S21.G00.30.004 ; établissement 73282932000082 ; individu MASSON (1780859350814) ; contrat CTR-014 ; occurrence 1 ; ligne A absente ; ligne B 2823
    B : BLOQUANT
  Nouvelle : Date de naissance incohérente avec le NIR (S21.G00.30.006/CCH-11) ; rubrique S21.G00.30.006 ; établissement 73282932000074 ; individu AMELIE PERRIN (2930731555803) ; contrat CTR-003 ; occurrence 1 ; ligne A absente ; ligne B 528
    B : BLOQUANT ; valeur "08071994"
  Nouvelle : Code de profession (PCS-ESE) inconnu de la nomenclature (S21.G00.40.004/CRE-11) ; rubrique S21.G00.40.004 ; établissement 73282932000082 ; individu SARAH TESSIER (2981233063811) ; contrat CTR-011 ; occurrence 1 ; ligne A absente ; ligne B 2232
    B : BLOQUANT ; valeur "999z"
  Nouvelle : Fin prévisionnelle du contrat antérieure à son début (S21.G00.40.010/CCH-11) ; rubrique S21.G00.40.010 ; établissement 73282932000074 ; individu LOIC MARCHAND (1020535238806) ; contrat CTR-006 ; occurrence 1 ; ligne A absente ; ligne B 1136
    B : BLOQUANT ; valeur "31122025"
  Nouvelle : Motif de recours du CDD absent (S21.G00.40.021/SIG-11) ; rubrique S21.G00.40.021 ; établissement 73282932000074 ; individu LOIC MARCHAND (1020535238806) ; contrat CTR-006 ; occurrence 1 ; ligne A absente ; ligne B 1128
Excerpts from a real DSNLint API response, received with DSNLint Connect 1.3.0 on 5 December 2026, for public examples with fictitious data: janvier-2026.dsn, mars-2026.dsn. Engine outputs are in French. The same request sent with curl returns the same document, byte for byte.

An improvement: mars-2026.dsn as A and avril-2026.dsn as B. The 8 anomalies of March disappear: B is compliant, the pair is an improvement, and the code is 0.

comparaison.txt · lines 1 to 24 of 31
DSNLint — Comparaison de versions
1 paire, 0 fichier sans partenaire ; 0 régression, 1 amélioration, 0 paire identique, 0 autre différence.
Date qui n’existe pas au calendrier (CSL-04) : 0 nouvelle, 1 disparue
Rubrique obligatoire absente (CST-03) : 0 nouvelle, 1 disparue
Date de naissance incohérente avec le NIR (S21.G00.30.006/CCH-11) : 0 nouvelle, 1 disparue
Code de profession (PCS-ESE) inconnu de la nomenclature (S21.G00.40.004/CRE-11) : 0 nouvelle, 1 disparue
Fin prévisionnelle du contrat antérieure à son début (S21.G00.40.010/CCH-11) : 0 nouvelle, 1 disparue
Motif de recours du CDD absent (S21.G00.40.021/SIG-11) : 0 nouvelle, 1 disparue
Prélèvement à la source différent de l’assiette multipliée par le taux (S21.G00.50.009/CCH-11) : 0 nouvelle, 1 disparue
Cotisation de retraite complémentaire incomplète (S21.G00.81.001/SIG-18) : 0 nouvelle, 1 disparue

mars-2026.dsn → avril-2026.dsn — amélioration ; A : non conforme ; B : conforme
0 nouvelle, 8 disparues, 0 commune, 0 modifiée
  Disparue : Date qui n’existe pas au calendrier (CSL-04) ; rubrique S21.G00.50.001 ; établissement 73282932000082 ; individu MATHIEU COLIN (1900675056810) ; contrat CTR-010 ; occurrence 1 ; ligne A 2062 ; ligne B absente
    A : BLOQUANT ; valeur "30022026"
  Disparue : Rubrique obligatoire absente (CST-03) ; rubrique S21.G00.30.004 ; établissement 73282932000082 ; individu MASSON (1780859350814) ; contrat CTR-014 ; occurrence 1 ; ligne A 2823 ; ligne B absente
    A : BLOQUANT
  Disparue : Date de naissance incohérente avec le NIR (S21.G00.30.006/CCH-11) ; rubrique S21.G00.30.006 ; établissement 73282932000074 ; individu AMELIE PERRIN (2930731555803) ; contrat CTR-003 ; occurrence 1 ; ligne A 528 ; ligne B absente
    A : BLOQUANT ; valeur "08071994"
  Disparue : Code de profession (PCS-ESE) inconnu de la nomenclature (S21.G00.40.004/CRE-11) ; rubrique S21.G00.40.004 ; établissement 73282932000082 ; individu SARAH TESSIER (2981233063811) ; contrat CTR-011 ; occurrence 1 ; ligne A 2232 ; ligne B absente
    A : BLOQUANT ; valeur "999z"
  Disparue : Fin prévisionnelle du contrat antérieure à son début (S21.G00.40.010/CCH-11) ; rubrique S21.G00.40.010 ; établissement 73282932000074 ; individu LOIC MARCHAND (1020535238806) ; contrat CTR-006 ; occurrence 1 ; ligne A 1136 ; ligne B absente
    A : BLOQUANT ; valeur "31122025"
  Disparue : Motif de recours du CDD absent (S21.G00.40.021/SIG-11) ; rubrique S21.G00.40.021 ; établissement 73282932000074 ; individu LOIC MARCHAND (1020535238806) ; contrat CTR-006 ; occurrence 1 ; ligne A 1128 ; ligne B absente
Excerpts from a real DSNLint API response, received with DSNLint Connect 1.3.0 on 5 December 2026, for public examples with fictitious data: mars-2026.dsn, avril-2026.dsn. Engine outputs are in French. The same request sent with curl returns the same document, byte for byte.

Without masking, the text gives, for each anomaly, the establishment, the individual and the contract, with the value read. The Command tab of each proof shows the DSNLint Connect command.

With masquer_valeurs, the comparison applies full masking to both versions:

  • File names are replaced by ordered markers: fichier-1, fichier-2 and so on.
  • An establishment or a contract that has been removed appears as “masqué” (masked). No name and no raw message appears.
  • Each individual is represented by a pseudonym that remains stable within this comparison and changes with a new request. This pseudonym is short: two different individuals may, rarely, receive the same one.
  • The JSON states true in valeurs_masquees. The same inputs, options and year give the same bytes, except for the pseudonyms.

What also applies to the comparison:

  • The admission limits of the check: size of the body and cumulative uncompressed size, total number of lines, number of members, time, size of the output and memory. An output that is too large is refused in full.
  • Authentication, idempotency (the Idempotency-Key header is mandatory), quotas and counting are those of the other operations with supporting documents.
  • Individual counting stays one common maximum per establishment and per declared month, for the two versions: it never adds up the files, and the declaration fraction does not multiply the price.
  • No DSN data appears in the logs.

Errors are HTTP refusals, returned before any report begins:

  • 400 for an invalid request or reading, including a missing version A or B (demande_invalide).
  • 413 for a size or a memory limit exceeded.
  • 422 for incompatible options (options_incompatibles).
  • 408 when the check is interrupted before the end, by the time limit or by the service stopping (interrompu).
  • 503 when the service is short of memory at that moment: send again later.

The route POST /v1/controles/avec-pieces in the API reference

Receive DSN checks as JSON Lines
Previous section
DSN API: immediate or deferred response
Next section