Files
jobtrackingapp/docs/redesign/phase-7/p7-09/COMPANY_CREATE_COMPATIBILITY.md
T

2.6 KiB

Company-create compatibility prerequisite

The actual JSON export/import journey exposed a backend prerequisite: importing the exact existing Norwegian company name created a second company. SQLite's default LOWER() handles ASCII while the bound .NET lower-case parameter folds Norwegian letters. The previous comparison therefore missed an exact existing name containing Æ, Ø or Å. The original failing import trace and the candidate repair evidence remain under .artifacts/phase7/p7-09/; the importer does not work around the server by changing company names.

The bounded repair checks exact equality alongside the existing lower-case comparison inside the same owner-filtered query. Trimming, source normalization, 200-for-reuse/201-for-create, metadata retention and account ownership are preserved. It performs no schema migration, historical deduplication or destructive write. Broader Unicode case-folding equivalence and concurrent creation idempotency remain RD21 debt.

Three real SQLite regression cases prove exact Norwegian-name reuse without overwriting existing fields, retained ASCII case-insensitive reuse, and separate owned creation when an identical foreign company exists. The last case also verifies retained foreign metadata and source normalization. Fresh Release compilation and these three cases pass. A fresh unfiltered backend run passes 1,057/1,057, zero skipped, at 20 October 2026 07:05:21–07:05:38 UTC. The increase from 1,054 is exactly these three ordinary cases; existing cases were not removed or weakened.

The fresh native Companies suite passes 6/6, zero retries/skipped/flaky, at 07:10:12–07:11:05 UTC. It exercises the existing presentation and persisted owner behavior against the rebuilt API and current production frontend export. The portable evidence records commands, results and source/binary identities, explicitly identifying its post-run source observation. Earlier native import/company evidence is historical evidence, not substituted for these fresh results.

Preservation references are PRES-J08, PRES-J10 and PRES-E09. The complete matrix stays 56 PARTIAL / C11 DEFERRED. Actual MariaDB/provider and production qualification, manual reader/device checks, the remaining import/data/privacy/plan/backup migration and RD21 concurrency work are not accepted here. P5-13 stays withheld, followMode stays deferred and Phase 8 is not implemented. This prerequisite is published separately from the active import UI work on the development branch; production readiness remains NO-GO despite the owner's separately authorized release repair.