crypto-inventory: the negative control reads files normalized to LF (a Windows checkout without git attributes gave 34/35); .gitattributes with text=auto eol=lf for every checkout

This commit is contained in:
Aere Network 2026-10-18 09:01:14 +03:00
parent b6ed4d2b71
commit fab02f7952
3 changed files with 6 additions and 2 deletions

1
.gitattributes vendored Normal file
View File

@ -0,0 +1 @@
* text=auto eol=lf

View File

@ -62,4 +62,4 @@ interface, command line and data (`definePolicy`, `verifyLedger`, `approve`, ...
## Licence ## Licence
MIT, see [LICENSE](LICENSE). Files: 742 (pq-gateway 9, pq-kms 10, pq-pki 6, crypto-inventory 73, verify-layer 12, proof-kinds 3, control-plane 27, agents 39, identity 15, proof-of-ai 3, ai-trust 6, verifiable-data 7, market-settlement 9, payments 8, conformance 479, device-identity 11, exposure-report 18, readiness 4). MIT, see [LICENSE](LICENSE). Files: 743 (pq-gateway 9, pq-kms 10, pq-pki 6, crypto-inventory 73, verify-layer 12, proof-kinds 3, control-plane 27, agents 39, identity 15, proof-of-ai 3, ai-trust 6, verifiable-data 7, market-settlement 9, payments 8, conformance 479, device-identity 11, exposure-report 18, readiness 4).

View File

@ -347,7 +347,10 @@ if (linieBaza) {
let detaliu = ''; let detaliu = '';
try { try {
const cale = join(d, mu.fisier); const cale = join(d, mu.fisier);
const text = readFileSync(cale, 'utf8'); // 2026-10-18: citit cu LF oricum ar fi pe disc. Intr-o clona proaspata pe Windows (core.autocrlf, fara .gitattributes) fisierele ies
// cu CRLF, iar o ancora care cuprinde un rand nou "aparea de 0 ori" si mutatia iesea STRICAT numai la strain (34/35 masurat pe clona
// publica a lui aere-quantum, 35/35 acasa); copia plantata se scrie cu LF, ceea ce nu schimba nimic pentru node.
const text = readFileSync(cale, 'utf8').replace(/\r\n/g, '\n');
const n = text.split(mu.ancora).length - 1; const n = text.split(mu.ancora).length - 1;
if (!numeBaza.includes(mu.tinta) || !numeBaza.includes(mu.martor)) { if (!numeBaza.includes(mu.tinta) || !numeBaza.includes(mu.martor)) {
verdict = 'STRICAT'; detaliu = 'tinta sau martorul nu exista in suita'; verdict = 'STRICAT'; detaliu = 'tinta sau martorul nu exista in suita';