Résumé : Context. AMS-02 on the International Space Station has been releasing data of unprecedented accuracy. This poses new challenges for their interpretation. Aims. We refine the methodology to get a statistically sound determination of the cosmic-ray propagation parameters. We inspect the numerical precision of the model calculation, nuclear cross-section uncertainties, and energy correlations in data systematic errors. Methods. We used the 1D diffusion model in USINE. Our χ2 analysis includes a covariance matrix of errors for AMS-02 systematics and nuisance parameters to account for cross-section uncertainties. Mock data were used to validate some of our choices. Results. We show that any mis-modelling of nuclear cross-section values or the energy correlation length of the covariance matrix of errors biases the analysis. It also makes good models (χmin2/d.o.f. ≈ 1) appear as excluded (χmin2/d.o.f. ≫ 1). We provide a framework to mitigate these effects (AMS-02 data are interpreted in a companion paper). Conclusion. New production cross-section data and the publication by the AMS-02 collaboration of a covariance matrix of errors for each data set would be an important step towards an unbiased view of cosmic-ray propagation in the Galaxy.