Traceability — Bill of Materials P0 fixes
Two critical bugs in the Bill of Materials traceability flow were identified and resolved. Both prevented operators from creating traceability records, and neither surfaced a clear error message — they failed silently with a generic error toast.
Fixed
Bill of Materials — records were silently failing to save
Adding a material to a product's bill of materials appeared to work but never actually persisted. The root cause was a misconfigured feature gate — the action was checking for a module name that didn't exist on any account, causing every attempt to be blocked before it reached the database. The gate has been corrected to the canonical module name across all traceability entry points.
Fixing this exposed a second issue: the traceability record creation was receiving the product's public URL identifier instead of its internal database identifier. These are intentionally different values (the URL identifier is human-readable; the database identifier is used for internal record linking). The page now supplies the correct identifier for each purpose. A regression test now covers both cases.
Regression tests added
Three automated regression tests now cover this flow: slug-based identifiers are correctly rejected, database identifiers are correctly accepted, and the supplier reference guard behaves as expected.