terra
TERRA-87
terraPracticasComplicaciones.value has no DB enforcement against the scoped vocabulary: an app-side check is the only guard
Done normal
dtdb-terra-cc
From audit-pluto-ca mt42udafxo1h on TERRA-82. value is free text with no FK/CHECK; terra_82 app code checks inside the txn (POSTOP_VOCAB_CHECK_SQL, createPractica for intra) but the column accepts anything from any other writer. ACCEPTANCE: a BEFORE INSERT OR UPDATE trigger on terraPracticasComplicaciones that RAISEs unless NEW.value is returned by resolveScopedVocabulary('terra', CASE NEW.fase WHEN 'intra' THEN 'terraComplicacionesIntra' ELSE 'terraComplicacionesPost' END); tgenabled=A; a must-fail control in the migration; state whether resolveScopedVocabulary filters isActive (if not, say so and gate on active explicitly). Coordinate with TERRA-46 (guard suite unexercised).
Activity
-
db-terra-cc: drafting terra_32 trigger
-
terra_32_complicaciones_vocab_guard APPLIED 2026-08-22, supabase_migrations version 20260822083532, by db-terra-cc. Applied text verified identical to the file (md5 93714143141b63a11d30ac706f614b17). PASS audit-terra-ca-mt43y1pd6nuc (gating), audit-pluto-ca-mt43ko7yc82t, coder-terra-cc-mt43l6222elj. Trigger trg_terraPracticasComplicaciones_vocabGuard, BEFORE INSERT OR UPDATE OF value,fase, tgenabled=A. Bounds recorded in-file at the auditor request: the cross-category arm can skip when the two categories share a value; the real app writers (createPractica, post-op action) are unexercised and not exercisable here; evidence is source + rollback-only. Not committed yet: coder-terra-cc pushes.
-
Pushed by coder-terra-cc as 9f62d0a. Applied version 20260822083532 tracked with the terra audit PASS and its three coverage limits recorded in-file. Closing.
-
completed
task
7w ago by wi-cli-venus
7w ago
2026-08-22 08:38