From 9af8306bde4372e21cad91b2607680829160633f Mon Sep 17 00:00:00 2001 From: Seongho Bae Date: Tue, 25 Aug 2026 14:02:50 +0900 Subject: [PATCH] fix(gates): align scheduler prompt test with reconciled contract and rustfmt role_contradiction The remote reconciliation of the hourly-scheduler prompt restored the fail-closed operational-logging guard (audit_event / try_record / OperationalLogRecord::new) alongside the gap-baseline-derived increment selection; the prompt-contract test now asserts both together instead of dropping the logging tokens. Also applies workspace rustfmt to the role_contradiction import order that #132 landed unformatted. --- crates/role_contradiction/src/lib.rs | 4 ++-- crates/role_contradiction/src/role.rs | 4 ++-- .../role_contradiction/tests/role_contradiction_contract.rs | 4 ++-- tests/quality/test_hourly_nim_product_development.py | 5 ++++- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/crates/role_contradiction/src/lib.rs b/crates/role_contradiction/src/lib.rs index 808a9c108..67cdf1dc9 100644 --- a/crates/role_contradiction/src/lib.rs +++ b/crates/role_contradiction/src/lib.rs @@ -12,6 +12,8 @@ mod role; /// Fail-closed role-contradiction errors. pub use error::RoleContradictionError; +/// Closed vocabulary of commercial roles that can change over time. +pub use role::ContextualRole; /// Fraction of recovered contextual roles that match known truth. pub use role::identity_recovery_rate; /// Refuse a contradictory customer/competitor pair in one group. @@ -20,5 +22,3 @@ pub use role::refuse_contradictory_roles; pub use role::refuse_role_as_entity_class; /// Return whether two roles contradict in the same group. pub use role::roles_contradict; -/// Closed vocabulary of commercial roles that can change over time. -pub use role::ContextualRole; diff --git a/crates/role_contradiction/src/role.rs b/crates/role_contradiction/src/role.rs index 8d37287b4..a893b32d5 100644 --- a/crates/role_contradiction/src/role.rs +++ b/crates/role_contradiction/src/role.rs @@ -104,8 +104,8 @@ pub fn identity_recovery_rate( #[cfg(test)] mod tests { use super::{ - identity_recovery_rate, refuse_contradictory_roles, refuse_role_as_entity_class, - roles_contradict, ContextualRole, + ContextualRole, identity_recovery_rate, refuse_contradictory_roles, + refuse_role_as_entity_class, roles_contradict, }; use crate::RoleContradictionError; diff --git a/crates/role_contradiction/tests/role_contradiction_contract.rs b/crates/role_contradiction/tests/role_contradiction_contract.rs index 0cf83f46c..7bf4628e4 100644 --- a/crates/role_contradiction/tests/role_contradiction_contract.rs +++ b/crates/role_contradiction/tests/role_contradiction_contract.rs @@ -1,8 +1,8 @@ //! Customer and competitor cannot occupy the same group at once. use role_contradiction::{ - identity_recovery_rate, refuse_contradictory_roles, refuse_role_as_entity_class, - roles_contradict, ContextualRole, RoleContradictionError, + ContextualRole, RoleContradictionError, identity_recovery_rate, refuse_contradictory_roles, + refuse_role_as_entity_class, roles_contradict, }; #[test] diff --git a/tests/quality/test_hourly_nim_product_development.py b/tests/quality/test_hourly_nim_product_development.py index afe24e1e1..65abacac6 100644 --- a/tests/quality/test_hourly_nim_product_development.py +++ b/tests/quality/test_hourly_nim_product_development.py @@ -171,7 +171,7 @@ def test_hourly_prompt_and_verifier_keep_commercial_quality_gates(self) -> None: "product-technical-gap-baseline.md", "gap id", "never invent weights", - "exactly one bounded increment", + "exactly one bounded pull request", "standalone", "modular MSA", "ContextualWisdomLab/.github", @@ -196,6 +196,9 @@ def test_hourly_prompt_and_verifier_keep_commercial_quality_gates(self) -> None: "Do not release", "Do not deploy", "Rust", + "audit_event", + "try_record", + "OperationalLogRecord::new", ): self.assertIn(token.casefold(), normalized)